diff --git a/resources/assets/js/controllers.js b/resources/assets/js/controllers.js index 9067f6ca4..28a45e591 100644 --- a/resources/assets/js/controllers.js +++ b/resources/assets/js/controllers.js @@ -357,8 +357,6 @@ module.exports = function (ngApp, events) { /** * Save a draft update into the system via an AJAX request. - * @param title - * @param html */ function saveDraft() { var data = { @@ -373,9 +371,17 @@ module.exports = function (ngApp, events) { var updateTime = moment.utc(moment.unix(responseData.data.timestamp)).toDate(); $scope.draftText = responseData.data.message + moment(updateTime).format('HH:mm'); if (!$scope.isNewPageDraft) $scope.isUpdateDraft = true; + showDraftSaveNotification(); }); } + function showDraftSaveNotification() { + $scope.draftUpdated = true; + $timeout(() => { + $scope.draftUpdated = false; + }, 2000) + } + $scope.forceDraftSave = function() { saveDraft(); }; diff --git a/resources/assets/sass/_pages.scss b/resources/assets/sass/_pages.scss index 03faef344..3cc41df07 100644 --- a/resources/assets/sass/_pages.scss +++ b/resources/assets/sass/_pages.scss @@ -20,6 +20,16 @@ } } +.draft-notification { + pointer-events: none; + transform: scale(0); + transition: transform ease-in-out 120ms; + transform-origin: 50% 50%; + &.visible { + transform: scale(1); + } +} + .page-style.editor { padding: 0 !important; } diff --git a/resources/assets/sass/styles.scss b/resources/assets/sass/styles.scss index a6c364018..210432588 100644 --- a/resources/assets/sass/styles.scss +++ b/resources/assets/sass/styles.scss @@ -72,7 +72,7 @@ body.dragging, body.dragging * { border-radius: 3px; box-shadow: $bs-med; z-index: 999999; - display: table; + display: block; cursor: pointer; max-width: 480px; i, span { diff --git a/resources/views/pages/form.blade.php b/resources/views/pages/form.blade.php index 366316b33..5aee9c596 100644 --- a/resources/views/pages/form.blade.php +++ b/resources/views/pages/form.blade.php @@ -13,8 +13,9 @@
-