Skip to content

Commit

Permalink
Merge pull request #228 from m1x0n/preview-small-fix
Browse files Browse the repository at this point in the history
Block UI until content loaded on url paste widget
  • Loading branch information
m1x0n committed Oct 20, 2015
2 parents 2aade5a + 09c69b5 commit f5e42b9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
4 changes: 4 additions & 0 deletions public/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,10 @@ div .fa-05 {
display: block;
}

a.cke_dialog_ui_button_readonly {
background-image: linear-gradient(to bottom,#ffa166,#ffa166) !important;
}

/*
|------------------------------------------------------------------------------
| Roles
Expand Down
12 changes: 6 additions & 6 deletions public/js/vendor/ckeditor/contents.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ blockquote
border-width: 0;
}

blockquote .author {
font-style: normal;
font-weight: bold;
margin-bottom: 0.7em;
display: inline-block;
}
blockquote .author {
font-style: normal;
font-weight: bold;
margin-bottom: 0.7em;
display: inline-block;
}

.cke_contents_ltr blockquote
{
Expand Down
10 changes: 10 additions & 0 deletions public/js/vendor/ckeditor/plugins/linkwithpreview/dialogs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ CKEDITOR.dialog.add('linkWithPreviewDialog', function (editor) {
this.setupContent(this.element, this.definition);
},
onOk: function () {
if (
this.parts.footer.$.getElementsByTagName('a')[0]
.classList.contains('cke_dialog_ui_button_readonly')
) {
return false;
}
this.commitContent(this.element);

if (this.insertMode) {
Expand Down Expand Up @@ -175,10 +181,14 @@ CKEDITOR.dialog.add('linkWithPreviewDialog', function (editor) {
);
this.dialog.preview.style.display = 'block';
this.dialog.preview.classList.add('preload');
this.dialog.parts.footer.$.getElementsByTagName('a')[0]
.classList.add('cke_dialog_ui_button_readonly');
},
preloadHide: function (image) {
this.dialog.preview.setAttribute('src', image);
this.dialog.preview.classList.remove('preload');
this.dialog.parts.footer.$.getElementsByTagName('a')[0]
.classList.remove('cke_dialog_ui_button_readonly');
}
};
});

0 comments on commit f5e42b9

Please sign in to comment.