Skip to content

Commit

Permalink
Don't show 'No Description' if user can't edit
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Jan 15, 2014
1 parent f7d4c28 commit 4be3850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rd_ui/app/scripts/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ directives.directive('editInPlace', function () {
template: function(tElement, tAttrs) {
var elType = tAttrs.editor || 'input';
var placeholder = tAttrs.placeholder || 'Click to edit';
return '<span ng-click="editable && edit()" ng-bind="value"></span>' +
'<span ng-click="editable && edit()" ng-show="!value">' + placeholder + '</span>' +
return '<span ng-click="editable && edit()" ng-bind="value || placeholder"></span>' +
'<span ng-click="editable && edit()" ng-show="!value && editable">' + placeholder + '</span>' +
'<{elType} ng-model="value" class="form-control" rows="2"></{elType}>'.replace('{elType}', elType);
},
link: function ($scope, element, attrs) {
Expand Down

0 comments on commit 4be3850

Please sign in to comment.