1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 07:32:39 +01:00

#47 - Fixes a few issues with the code.

This commit is contained in:
Abijeet 2017-06-10 22:55:36 +05:30
parent 552943c033
commit e155c52256
3 changed files with 2 additions and 4 deletions

View File

@ -272,7 +272,6 @@ module.exports = function (ngApp, events) {
$scope.draftsEnabled = $attrs.draftsEnabled === 'true'; $scope.draftsEnabled = $attrs.draftsEnabled === 'true';
$scope.isUpdateDraft = Number($attrs.pageUpdateDraft) === 1; $scope.isUpdateDraft = Number($attrs.pageUpdateDraft) === 1;
$scope.isNewPageDraft = Number($attrs.pageNewDraft) === 1; $scope.isNewPageDraft = Number($attrs.pageNewDraft) === 1;
$scope.commentsLoaded = false;
// Set initial header draft text // Set initial header draft text
if ($scope.isUpdateDraft || $scope.isNewPageDraft) { if ($scope.isUpdateDraft || $scope.isNewPageDraft) {
@ -687,7 +686,6 @@ module.exports = function (ngApp, events) {
const MarkdownIt = require("markdown-it"); const MarkdownIt = require("markdown-it");
const md = new MarkdownIt({html: true}); const md = new MarkdownIt({html: true});
let vm = this; let vm = this;
$scope.errors = {};
vm.saveComment = function () { vm.saveComment = function () {
let pageId = $scope.comment.pageId || $scope.pageId; let pageId = $scope.comment.pageId || $scope.pageId;

View File

@ -233,7 +233,7 @@ return [
'comment_created' => 'Comentario añadido', 'comment_created' => 'Comentario añadido',
'comment_updated' => 'Comentario actualizado', 'comment_updated' => 'Comentario actualizado',
'comment_deleted' => 'Comentario eliminado', 'comment_deleted' => 'Comentario eliminado',
'comment_updated_text' => 'Actualizado hace :updateDiff minutos por', 'comment_updated_text' => 'Actualizado hace :updateDiff por',
'comment_delete_confirm' => 'Esto eliminará el contenido del comentario. ¿Estás seguro de que quieres eliminar este comentario?', 'comment_delete_confirm' => 'Esto eliminará el contenido del comentario. ¿Estás seguro de que quieres eliminar este comentario?',
'comment_create' => 'Creado' 'comment_create' => 'Creado'
]; ];

View File

@ -3,7 +3,7 @@
<textarea name="markdown" rows="3" ng-model="comment.text" placeholder="{{ trans('entities.comment_placeholder') }}"></textarea> <textarea name="markdown" rows="3" ng-model="comment.text" placeholder="{{ trans('entities.comment_placeholder') }}"></textarea>
<input type="hidden" ng-model="comment.pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}"> <input type="hidden" ng-model="comment.pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}">
<button type="button" ng-if="::(isReply || isEdit)" class="button muted" ng-click="closeBox()">{{ trans('entities.comment_cancel') }}</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> <button type="submit" class="button pos" ng-click="vm.saveComment()">{{ trans('entities.comment_save') }}</button>
</form> </form>
</div> </div>