Skip to content

Commit

Permalink
#1669 Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Nov 19, 2020
1 parent bcdef7d commit 0fd7464
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 67 deletions.
5 changes: 5 additions & 0 deletions frontend/app/styles/updatable.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@
.updatable-input.updatable-input-tags {

}

.updatable-input.updatable-input-text .updatable-input-markdown .updatable-input-icon {
float:left;
margin-left: 0;
}
41 changes: 0 additions & 41 deletions frontend/app/views/directives/updatable-tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
<small class="updatable-input-icon" ng-class="{'lg': value.length > 0}">
<i class="glyphicon glyphicon-pencil"></i>
</small>


<!-- <span class="tags-list flexwrap" ng-if="value.length > 0">
<small class="updatable-input-icon" style="line-height:18px;">
<i class="glyphicon glyphicon-pencil"></i>
</small>
</span> -->
</span>

<span ng-show="updatable.updating">
Expand All @@ -35,35 +26,3 @@
</div>
</span>
</div>

<!--
<span ng-hide="updatable.updating" ng-init="active = false" ng-mouseenter="active = true" ng-mouseleave="active = false">
<span class="updatable-value" ng-show="!value || value.length === 0" style="vertical-align:top; white-space: pre-wrap"><span class="text-warning"><em>Not Specified</em></span></span>
<span class="tags-list flexwrap">
<span ng-repeat="tag in value" class="label label-primary mb-xxxs mr-xxxs">{{tag.text}}</span>
<small ng-show="active" style="line-height:18px;" class="mb-xxxs mr-xxxs">
<a href class="clickable" tooltip-popup-delay='500' uib-tooltip="edit">
<i class="glyphicon glyphicon-pencil" ng-click="edit()"></i>
</a>
</small>
</span>
</span>
<span ng-show="updatable.updating">
<div class="form-group">
<tags-input class="ti-input-sm" min-length="2" ng-model="value" placeholder="Add labels" replace-spaces-with-dashes="false">
<auto-complete ng-if="source" min-length="3" debounce-delay="400" source="source($query)"></auto-complete>
</tags-input>
</div>
<div class="form-group">
<span class="btn" ng-click='update()' tooltip-placement="top" tooltip-popup-delay='500' uib-tooltip="save">
<i class="text-success glyphicon glyphicon-ok"></i>
</span>
<span class="btn" ng-click='cancel()' tooltip-placement="top" tooltip-popup-delay='500' uib-tooltip="cancel">
<i class="text-danger glyphicon glyphicon-remove"></i>
</span>
</div>
</span>
-->
51 changes: 25 additions & 26 deletions frontend/app/views/directives/updatable-text.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
<span ng-if="!updatable.updating" ng-init="active = false" ng-mouseenter="active = true" ng-mouseleave="active = false">
<span ng-if="value.length > 0">
<small>
<a href class="clickable" uib-tooltip="edit" ng-click="edit()">
<i class="glyphicon glyphicon-pencil"></i>
</a>
<div class="updatable-input updatable-input-text">
<!-- Display empty text -->
<span ng-if="!updatable.updating && (!value || value.length ===0 )" class="updatable-input-value-wrapper" ng-click="edit()">
<span class="updatable-value text-warning"><em>Not Specified</em></span>

<small class="updatable-input-icon">
<i class="glyphicon glyphicon-pencil"></i>
</small>
<div marked="value" class="markdown"></div>
</span>
<span ng-if="!value">
<span class="text-warning">
<em>Not specified</em>
</span>
<small ng-show="active">
<a href class="clickable" uib-tooltip="edit" ng-click="edit()">
<i class="glyphicon glyphicon-pencil"></i>
</a>

<!-- Display empty text -->
<span ng-if="!updatable.updating && value.length >0" class="updatable-input-value-wrapper updatable-input-markdown">
<small class="updatable-input-icon" ng-click="edit()">
<i class="glyphicon glyphicon-pencil"></i>
</small>

<div marked="value" class="markdown"></div>
</span>
</span>

<span ng-init="updatable.dropdownOpen=false" ng-show="updatable.updating">
<div class="form-group">
<div class="form-group" ng-show="updatable.updating">
<textarea name="content" class="content-box" markdown-editor="{'iconlibrary': 'fa', addExtraButtons: true, resize: 'vertical'}" rows="10" ng-model="value"></textarea>

<div>
<span class="btn" ng-click='update()' tooltip-placement="top" tooltip-popup-delay='500' uib-tooltip="save">
<i class="text-success glyphicon glyphicon-ok"></i>
</span>
<span class="btn" ng-click='cancel()' tooltip-placement="top" tooltip-popup-delay='500' uib-tooltip="cancel">
<i class="text-danger glyphicon glyphicon-remove"></i>
</span>
<div class="mt-xxxs">
<div class="btn-group btn-group-sm">
<button type="button" class="btn btn-sm btn-default" ng-click='update()'>
<i class="text-success glyphicon glyphicon-ok"></i>
</button>
<button type="button" class="btn btn-sm btn-default" ng-click='cancel()'>
<i class="text-danger glyphicon glyphicon-remove"></i>
</button>
</div>
<a class="pull-right" href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" target="_blank">
<i class="fa fa-question-circle"></i> Markdown Reference</a>
</div>
</div>
</span>
</div>

0 comments on commit 0fd7464

Please sign in to comment.