added notification for adding images in post editor, added animation to working icon

nodejs-version-freeze
Ro 4 years ago
parent fdde954822
commit ca481d2b91

@ -21,6 +21,7 @@ html(xmlns='http://www.w3.org/1999/xhtml', lang='en', xml:lang="en")
svg(viewBox="0 0 20 20" class="icons")
use#submit-update(xlink:href='/assets/images/global/sprite.svg#entypo-emoji-sad')
.notify-icon#notify-working
#notify-working-box
svg(viewBox="0 0 20 20" class="icons")
use#submit-update(xlink:href='/assets/images/global/sprite.svg#entypo-cog')
p#message-text This is a message

@ -225,13 +225,16 @@ export default class PostEditor {
}
handleImageUpload(type, files) {
let self = this;
notify.alert('Uploading Image', null);
admin
.imageUpload(type, files)
.then(r => {
if (r.type == DataEvent.POST_IMAGE_ADDED)
self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, r.url);
notify.alert('Image Added to Entry', true);
})
.catch(() => {
notify.alert('Uh oh. Image not added', false);
//console.log('ERROR', err);
});
}

@ -42,7 +42,22 @@ svg.icons
transform: rotateX(-120deg)
transform-origin: 50% 0
#notify-good, #notify-lame, #notify-working
display: none
display: block
#notify-working-box
-webkit-animation: spin 2s linear infinite
-moz-animation: spin 2s linear infinite
animation: spin 2s linear infinite
@-moz-keyframes spin
100%
-moz-transform: rotate(360deg)
@-webkit-keyframes spin
100%
-webkit-transform: rotate(360deg)
@keyframes spin
100%
-webkit-transform: rotate(360deg)
transform: rotate(360deg)
.notify-icon
background: $black
padding: 8px 5px 5px 5px

Loading…
Cancel
Save