// no need for the event to do anything more.
event.stopPropagation();
event.preventDefault();
+ scope.closeBox();
+ });
+
+ scope.closeBox = function () {
element.remove();
scope.$destroy();
- });
+ }
}
}
}]);
event.stopPropagation();
event.preventDefault();
if (commentId === scope.comment.id && !scope.isNew) {
- element.remove();
- scope.$destroy();
+ scope.closeBox();
}
});
+
+ scope.closeBox = function () {
+ element.remove();
+ scope.$destroy();
+ }
}
}
}]);
'no_comments' => 'No Comments',
'x_comments' => ':numComments Comments',
'one_comment' => '1 Comment',
- 'comments_loading' => 'Loading...'
+ 'comments_loading' => 'Loading...',
+ 'comment_save' => 'Save Comment',
+ 'comment_cancel' => 'Cancel'
];
\ No newline at end of file
@if($errors->has('markdown')) class="neg" @endif>@if(isset($model) ||
old('markdown')){{htmlspecialchars( old('markdown') ? old('markdown') : ($model->markdown === '' ? $model->html : $model->markdown))}}@endif</textarea>
<input type="hidden" ng-model="comment.pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}">
- <button type="submit" class="button pos" ng-click="vm.saveComment(isReply)">Save</button>
+ <button type="button" ng-if="::(isReply || isEdit)" class="button muted" ng-click="closeBox()">{{ trans('entities.comment_cancel') }}</button>
+ <button type="submit" class="button pos" ng-click="vm.saveComment(isReply)">{{ trans('entities.comment_save') }}</button>
</form>
</div>