Editor - Codeblock UI
This commit is contained in:
1 parent
f7ba9ad143
commit
f7ce81e8c9
8 files changed
+75
-30
No files matched your search
+1
-1
@@ -1 +1 @@
|
|||||||
@charset "UTF-8";a,hr{padding:0}a,button,input,select,textarea{margin:0}article,aside,details,figure,footer,header,hr,main,nav,section,summary{display:block}.container,sub,sup{position:relative}abbr,address,article,aside,audio,b,blockquote,body,body div,caption,cite,code,dd,del,details,dfn,dl,dt,em,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font-weight:400;vertical-align:baseline;background:0 0}input[type=checkbox],th{vertical-align:bottom}embed,img,object{max-width:100%}ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}a{font-size:100%;vertical-align:baseline;background:0 0;color:#3949ab;text-decoration:none}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted #000;cursor:help}#alerts>ul>li,.button,.clickable,button,input[type=button],input[type=file],input[type=submit],label{cursor:pointer}th{font-weight:700}td{font-weight:400;vertical-align:top}hr{height:1px;border:0;border-top:1px solid #ccc;margin:1em 0}input,select{vertical-align:middle}pre{white-space:pre;white-space:pre-wrap;white-space:pre-line;word-wrap:break-word}input[type=radio]{vertical-align:text-bottom}.ie7 input[type=checkbox]{vertical-align:baseline}.ie6 input{vertical-align:text-bottom}input,select,textarea{font:99% sans-serif}table{border-collapse:separate;border-spacing:0;font:100%}small{font-size:85%}strong{font-weight:700}td,td img{vertical-align:top}sub,sup{font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}code,kbd,pre,samp{font-family:monospace,sans-serif}button,input[type=button]{width:auto;overflow:visible}.ie7 img{-ms-interpolation-mode:bicubic}.clearfix:after{content:" ";display:block;clear:both}@font-face{font-family:core-icons;src:url(/fonts/core-icons.ttf?a4cyvk) format("truetype"),url(/fonts/core-icons.woff?a4cyvk) format("woff"),url(/fonts/core-icons.svg?a4cyvk#core-icons) format("svg");font-weight:400;font-style:normal}[class*=" icon-"],[class^=icon-]{font-family:core-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.button,html{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.icon-th-small:before{content:""}.icon-th-menu:before{content:""}.icon-th-list:before{content:""}.icon-th-large:before{content:""}.icon-home:before{content:""}.icon-location:before{content:""}.icon-link:before{content:""}.icon-starburst:before{content:""}.icon-starburst-outline:before{content:""}.icon-star:before{content:""}.icon-flow-children:before{content:""}.icon-export:before{content:""}.icon-delete:before{content:""}.icon-delete-outline:before{content:""}.icon-cloud-storage:before{content:""}.icon-backspace:before{content:""}.icon-attachment:before{content:""}.icon-arrow-move:before{content:""}.icon-warning:before{content:""}.icon-location-arrow:before{content:""}.icon-point-of-interest:before{content:""}.icon-infinity:before{content:""}.icon-eye:before{content:""}.icon-refresh:before{content:""}.icon-pin:before{content:""}.icon-eject:before{content:""}.icon-arrow-sync:before{content:""}.icon-arrow-shuffle:before{content:""}.icon-arrow-repeat:before{content:""}.icon-arrow-minimise:before{content:""}.icon-arrow-maximise:before{content:""}.icon-arrow-loop:before{content:""}.icon-spanner:before{content:""}.icon-power:before{content:""}.icon-flag:before{content:""}.icon-th-large-outline:before{content:""}.icon-th-small-outline:before{content:""}.icon-th-menu-outline:before{content:""}.icon-th-list-outline:before{content:""}.icon-home-outline:before{content:""}.icon-trash:before{content:""}.icon-star-outline:before{content:""}.icon-mail:before{content:""}.icon-heart-outline:before{content:""}.icon-flash-outline:before{content:""}.icon-watch:before{content:""}.icon-warning-outline:before{content:""}.icon-location-arrow-outline:before{content:""}.icon-info-outline:before{content:""}.icon-backspace-outline:before{content:""}.icon-upload-outline:before{content:""}.icon-tag:before{content:""}.icon-tabs-outline:before{content:""}.icon-pin-outline:before{content:""}.icon-pipette:before{content:""}.icon-pencil:before{content:""}.icon-folder:before{content:""}.icon-folder-delete:before{content:""}.icon-folder-add:before{content:""}.icon-edit:before{content:""}.icon-document:before{content:""}.icon-document-delete:before{content:""}.icon-document-add:before{content:""}.icon-brush:before{content:""}.icon-thumbs-up:befLine truncated
|
@charset "UTF-8";a,hr{padding:0}a,button,input,select,textarea{margin:0}article,aside,details,figure,footer,header,hr,main,nav,section,summary{display:block}.container,sub,sup{position:relative}abbr,address,article,aside,audio,b,blockquote,body,body div,caption,cite,code,dd,del,details,dfn,dl,dt,em,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font-weight:400;vertical-align:baseline;background:0 0}input[type=checkbox],th{vertical-align:bottom}embed,img,object{max-width:100%}ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}a{font-size:100%;vertical-align:baseline;background:0 0;color:#3949ab;text-decoration:none}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted #000;cursor:help}#alerts>ul>li,.button,.clickable,button,input[type=button],input[type=file],input[type=submit],label{cursor:pointer}th{font-weight:700}td{font-weight:400;vertical-align:top}hr{height:1px;border:0;border-top:1px solid #ccc;margin:1em 0}input,select{vertical-align:middle}pre{white-space:pre;white-space:pre-wrap;white-space:pre-line;word-wrap:break-word}input[type=radio]{vertical-align:text-bottom}.ie7 input[type=checkbox]{vertical-align:baseline}.ie6 input{vertical-align:text-bottom}input,select,textarea{font:99% sans-serif}table{border-collapse:separate;border-spacing:0;font:100%}small{font-size:85%}strong{font-weight:700}td,td img{vertical-align:top}sub,sup{font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}code,kbd,pre,samp{font-family:monospace,sans-serif}button,input[type=button]{width:auto;overflow:visible}.ie7 img{-ms-interpolation-mode:bicubic}.clearfix:after{content:" ";display:block;clear:both}@font-face{font-family:core-icons;src:url(/fonts/core-icons.ttf?a4cyvk) format("truetype"),url(/fonts/core-icons.woff?a4cyvk) format("woff"),url(/fonts/core-icons.svg?a4cyvk#core-icons) format("svg");font-weight:400;font-style:normal}[class*=" icon-"],[class^=icon-]{font-family:core-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.button,html{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.icon-th-small:before{content:""}.icon-th-menu:before{content:""}.icon-th-list:before{content:""}.icon-th-large:before{content:""}.icon-home:before{content:""}.icon-location:before{content:""}.icon-link:before{content:""}.icon-starburst:before{content:""}.icon-starburst-outline:before{content:""}.icon-star:before{content:""}.icon-flow-children:before{content:""}.icon-export:before{content:""}.icon-delete:before{content:""}.icon-delete-outline:before{content:""}.icon-cloud-storage:before{content:""}.icon-backspace:before{content:""}.icon-attachment:before{content:""}.icon-arrow-move:before{content:""}.icon-warning:before{content:""}.icon-location-arrow:before{content:""}.icon-point-of-interest:before{content:""}.icon-infinity:before{content:""}.icon-eye:before{content:""}.icon-refresh:before{content:""}.icon-pin:before{content:""}.icon-eject:before{content:""}.icon-arrow-sync:before{content:""}.icon-arrow-shuffle:before{content:""}.icon-arrow-repeat:before{content:""}.icon-arrow-minimise:before{content:""}.icon-arrow-maximise:before{content:""}.icon-arrow-loop:before{content:""}.icon-spanner:before{content:""}.icon-power:before{content:""}.icon-flag:before{content:""}.icon-th-large-outline:before{content:""}.icon-th-small-outline:before{content:""}.icon-th-menu-outline:before{content:""}.icon-th-list-outline:before{content:""}.icon-home-outline:before{content:""}.icon-trash:before{content:""}.icon-star-outline:before{content:""}.icon-mail:before{content:""}.icon-heart-outline:before{content:""}.icon-flash-outline:before{content:""}.icon-watch:before{content:""}.icon-warning-outline:before{content:""}.icon-location-arrow-outline:before{content:""}.icon-info-outline:before{content:""}.icon-backspace-outline:before{content:""}.icon-upload-outline:before{content:""}.icon-tag:before{content:""}.icon-tabs-outline:before{content:""}.icon-pin-outline:before{content:""}.icon-pipette:before{content:""}.icon-pencil:before{content:""}.icon-folder:before{content:""}.icon-folder-delete:before{content:""}.icon-folder-add:before{content:""}.icon-edit:before{content:""}.icon-document:before{content:""}.icon-document-delete:before{content:""}.icon-document-add:before{content:""}.icon-brush:before{content:""}.icon-thumbs-up:befLine truncated
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function setInputSelection(e,t,a){if(e.focus(),"undefined"!=typeof e.selectionStart)e.selectionStart=t,e.selectionEnd=a;else if(document.selection&&document.selection.createRange){e.select();var o=document.selection.createRange();o.collapse(!0),o.moveEnd("character",a),o.moveStart("character",t),o.select()}}function makeSafePath(e){var t=_.split(_.trim(e),"/");return t=_.map(t,function(e){return _.kebabCase(_.deburr(_.trim(e)))}),_.join(_.filter(t,function(e){return!_.isEmpty(e)}),"/")}var _createClass=function(){function e(e,t){for(var a=0;a<t.length;a++){var o=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,a,o){return a&&e(t.prototype,a),o&&e(t,o),t}}();jQuery(document).ready(function(e){var t=this;e("a").smoothScroll({speed:400,offset:-70});new Sticky(".stickyscroll");e(window).bind("beforeunload",function(){e("#notifload").addClass("active")}),e(document).ajaxSend(function(){e("#notifload").addClass("active")}).ajaxComplete(function(){e("#notifload").removeClass("active")});var a=new Alerts;alertsData&&_.forEach(alertsData,function(e){a.push(e)});var o=io(window.location.origin);if(e("#search-input").length){e("#search-input").focus(),e(".searchresults").css("display","block");var n=new Vue({el:"#header-container",data:{searchq:"",searchres:[],searchsuggest:[],searchload:0,searchactive:!1,searchmoveidx:0,searchmovekey:"",searchmovearr:[]},watch:{searchq:function(e,t){n.searchmoveidx=0,e.length>=3?(n.searchactive=!0,n.searchload++,o.emit("search",{terms:e},function(e){n.searchres=e.match,n.searchsuggest=e.suggest,n.searchmovearr=_.concat([],n.searchres,n.searchsuggest),n.searchload>0&&n.searchload--})):(n.searchactive=!1,n.searchres=[],n.searchsuggest=[],n.searchmovearr=[],n.searchload=0)},searchmoveidx:function(e,t){e>0?n.searchmovekey=n.searchmovearr[e-1]?"res."+n.searchmovearr[e-1]._id:"sug."+n.searchmovearr[e-1]:n.searchmovekey=""}},methods:{useSuggestion:function(e){n.searchq=e},closeSearch:function(){n.searchq=""},moveSelectSearch:function(){if(!(n.searchmoveidx<1)){var e=n.searchmoveidx-1;n.searchmovearr[e]?window.location.assign("/"+n.searchmovearr[e]._id):n.searchq=n.searchmovearr[e]}},moveDownSearch:function(){n.searchmoveidx<n.searchmovearr.length&&n.searchmoveidx++},moveUpSearch:function(){n.searchmoveidx>0&&n.searchmoveidx--}}});e("main").on("click",n.closeSearch)}if(e("#page-type-view").length&&!function(){var t="home"!==e("#page-type-view").data("entrypath")?e("#page-type-view").data("entrypath"):"",o=t+"/new-page";e(".btn-create-prompt").on("click",function(a){e("#txt-create-prompt").val(o),e("#modal-create-prompt").toggleClass("is-active"),setInputSelection(e("#txt-create-prompt").get(0),t.length+1,o.length),e("#txt-create-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-create-prompt").on("keypress",function(t){13===t.which&&e(".btn-create-go").trigger("click")}),e(".btn-create-go").on("click",function(t){var a=makeSafePath(e("#txt-create-prompt").val());_.isEmpty(a)?e("#txt-create-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-create-prompt").parent().addClass("is-loading"),window.location.assign("/create/"+a))}),""!==t&&e(".btn-move-prompt").removeClass("is-hidden");var n=_.lastIndexOf(t,"/")+1;e(".btn-move-prompt").on("click",function(a){e("#txt-move-prompt").val(t),e("#modal-move-prompt").toggleClass("is-active"),setInputSelection(e("#txt-move-prompt").get(0),n,t.length),e("#txt-move-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-move-prompt").on("keypress",function(t){13===t.which&&e(".btn-move-go").trigger("click")}),e(".btn-move-go").on("click",function(o){var n=makeSafePath(e("#txt-move-prompt").val());_.isEmpty(n)||n===t||"home"===n?e("#txt-move-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-move-prompt").parent().addClass("is-loading"),e.ajax(window.location.href,{data:{move:n},dataType:"json",method:"PUT"}).then(function(e,t,o){e.ok?window.location.assign("/"+n):a.pushError("Something went wrong",e.error)},function(e,t,o){a.pushError("Something went wrong","Save operation failed.")}))})}(),e("#page-type-create").length){var i;!function(){var n=e("#page-type-create").data("entrypath");e(".btn-create-discard").on("click",function(t){e("#modal-create-discard").toggleClass("is-active")}),1===e("#mk-editor").length&&!function(){var r=!1;Vue.filter("filesize",function(e){return _.toUpper(filesize(e))});var l=new Vue({el:"#modal-editor-image",data:{isLoading:!1,isLoadingText:"",newFolderName:"",newFolderShow:!1,newFolderError:!1,fetchFromUrlURL:"",fetchFromUrlShow:!1,folders:[],currentFolder:"",currentImage:"",currentAlign:"left",images:[],uploadSucceeded:!1,postUploadChecks:0,renameImageShow:!1,renameImageId:"",renameImageFilename:"",deleteImageShow:!1,deleteImageId:"",deleteImaLine truncated
|
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function setInputSelection(e,t,a){if(e.focus(),"undefined"!=typeof e.selectionStart)e.selectionStart=t,e.selectionEnd=a;else if(document.selection&&document.selection.createRange){e.select();var o=document.selection.createRange();o.collapse(!0),o.moveEnd("character",a),o.moveStart("character",t),o.select()}}function makeSafePath(e){var t=_.split(_.trim(e),"/");return t=_.map(t,function(e){return _.kebabCase(_.deburr(_.trim(e)))}),_.join(_.filter(t,function(e){return!_.isEmpty(e)}),"/")}var _createClass=function(){function e(e,t){for(var a=0;a<t.length;a++){var o=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,a,o){return a&&e(t.prototype,a),o&&e(t,o),t}}();jQuery(document).ready(function(e){var t=this;e("a").smoothScroll({speed:400,offset:-70});new Sticky(".stickyscroll");e(window).bind("beforeunload",function(){e("#notifload").addClass("active")}),e(document).ajaxSend(function(){e("#notifload").addClass("active")}).ajaxComplete(function(){e("#notifload").removeClass("active")});var a=new Alerts;alertsData&&_.forEach(alertsData,function(e){a.push(e)});var o=io(window.location.origin);if(e("#search-input").length){e("#search-input").focus(),e(".searchresults").css("display","block");var n=new Vue({el:"#header-container",data:{searchq:"",searchres:[],searchsuggest:[],searchload:0,searchactive:!1,searchmoveidx:0,searchmovekey:"",searchmovearr:[]},watch:{searchq:function(e,t){n.searchmoveidx=0,e.length>=3?(n.searchactive=!0,n.searchload++,o.emit("search",{terms:e},function(e){n.searchres=e.match,n.searchsuggest=e.suggest,n.searchmovearr=_.concat([],n.searchres,n.searchsuggest),n.searchload>0&&n.searchload--})):(n.searchactive=!1,n.searchres=[],n.searchsuggest=[],n.searchmovearr=[],n.searchload=0)},searchmoveidx:function(e,t){e>0?n.searchmovekey=n.searchmovearr[e-1]?"res."+n.searchmovearr[e-1]._id:"sug."+n.searchmovearr[e-1]:n.searchmovekey=""}},methods:{useSuggestion:function(e){n.searchq=e},closeSearch:function(){n.searchq=""},moveSelectSearch:function(){if(!(n.searchmoveidx<1)){var e=n.searchmoveidx-1;n.searchmovearr[e]?window.location.assign("/"+n.searchmovearr[e]._id):n.searchq=n.searchmovearr[e]}},moveDownSearch:function(){n.searchmoveidx<n.searchmovearr.length&&n.searchmoveidx++},moveUpSearch:function(){n.searchmoveidx>0&&n.searchmoveidx--}}});e("main").on("click",n.closeSearch)}if(e("#page-type-view").length&&!function(){var t="home"!==e("#page-type-view").data("entrypath")?e("#page-type-view").data("entrypath"):"",o=t+"/new-page";e(".btn-create-prompt").on("click",function(a){e("#txt-create-prompt").val(o),e("#modal-create-prompt").toggleClass("is-active"),setInputSelection(e("#txt-create-prompt").get(0),t.length+1,o.length),e("#txt-create-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-create-prompt").on("keypress",function(t){13===t.which&&e(".btn-create-go").trigger("click")}),e(".btn-create-go").on("click",function(t){var a=makeSafePath(e("#txt-create-prompt").val());_.isEmpty(a)?e("#txt-create-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-create-prompt").parent().addClass("is-loading"),window.location.assign("/create/"+a))}),""!==t&&e(".btn-move-prompt").removeClass("is-hidden");var n=_.lastIndexOf(t,"/")+1;e(".btn-move-prompt").on("click",function(a){e("#txt-move-prompt").val(t),e("#modal-move-prompt").toggleClass("is-active"),setInputSelection(e("#txt-move-prompt").get(0),n,t.length),e("#txt-move-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-move-prompt").on("keypress",function(t){13===t.which&&e(".btn-move-go").trigger("click")}),e(".btn-move-go").on("click",function(o){var n=makeSafePath(e("#txt-move-prompt").val());_.isEmpty(n)||n===t||"home"===n?e("#txt-move-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-move-prompt").parent().addClass("is-loading"),e.ajax(window.location.href,{data:{move:n},dataType:"json",method:"PUT"}).then(function(e,t,o){e.ok?window.location.assign("/"+n):a.pushError("Something went wrong",e.error)},function(e,t,o){a.pushError("Something went wrong","Save operation failed.")}))})}(),e("#page-type-create").length){var i;!function(){var n=e("#page-type-create").data("entrypath");e(".btn-create-discard").on("click",function(t){e("#modal-create-discard").toggleClass("is-active")}),1===e("#mk-editor").length&&!function(){var r=!1;Vue.filter("filesize",function(e){return _.toUpper(filesize(e))});var l=new Vue({el:"#modal-editor-image",data:{isLoading:!1,isLoadingText:"",newFolderName:"",newFolderShow:!1,newFolderError:!1,fetchFromUrlURL:"",fetchFromUrlShow:!1,folders:[],currentFolder:"",currentImage:"",currentAlign:"left",images:[],uploadSucceeded:!1,postUploadChecks:0,renameImageShow:!1,renameImageId:"",renameImageFilename:"",deleteImageShow:!1,deleteImageId:"",deleteImaLine truncated
|
||||||
@@ -44,9 +44,20 @@ let vueCodeBlock = new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
open: (ev) => {
|
||||||
|
$('#modal-editor-codeblock').addClass('is-active');
|
||||||
|
|
||||||
|
_.delay(() => {
|
||||||
|
codeEditor.resize();
|
||||||
|
codeEditor.focus();
|
||||||
|
codeEditor.setAutoScrollEditorIntoView(true);
|
||||||
|
codeEditor.renderer.updateFull();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
},
|
||||||
cancel: (ev) => {
|
cancel: (ev) => {
|
||||||
mdeModalOpenState = false;
|
mdeModalOpenState = false;
|
||||||
$('#modal-editor-codeblock').slideUp();
|
$('#modal-editor-codeblock').removeClass('is-active');
|
||||||
},
|
},
|
||||||
insertCode: (ev) => {
|
insertCode: (ev) => {
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ let vueImage = new Vue({
|
|||||||
|
|
||||||
open: () => {
|
open: () => {
|
||||||
mdeModalOpenState = true;
|
mdeModalOpenState = true;
|
||||||
$('#modal-editor-image').slideDown();
|
$('#modal-editor-image').addClass('is-active');
|
||||||
vueImage.refreshFolders();
|
vueImage.refreshFolders();
|
||||||
},
|
},
|
||||||
cancel: (ev) => {
|
cancel: (ev) => {
|
||||||
mdeModalOpenState = false;
|
mdeModalOpenState = false;
|
||||||
$('#modal-editor-image').slideUp();
|
$('#modal-editor-image').removeClass('is-active');
|
||||||
},
|
},
|
||||||
|
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
|
|||||||
@@ -138,10 +138,7 @@ if($('#mk-editor').length === 1) {
|
|||||||
codeEditor.setValue('');
|
codeEditor.setValue('');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#modal-editor-codeblock').slideDown(400, () => {
|
vueCodeBlock.open();
|
||||||
codeEditor.resize();
|
|
||||||
codeEditor.focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -102,6 +102,20 @@ .editor-modal-imagechoices {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
> em {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 25px;
|
||||||
|
color: mc('grey', '500');
|
||||||
|
|
||||||
|
> i {
|
||||||
|
font-size: 32px;
|
||||||
|
margin-right: 10px;
|
||||||
|
color: mc('grey', '300');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
> figure {
|
> figure {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -235,12 +249,31 @@ .ace-container {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ace_scroller {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.ace_content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
#page-type-source .ace-container {
|
#page-type-source .ace-container {
|
||||||
min-height: 95vh;
|
min-height: 95vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
#modal-editor-codeblock .ace-container {
|
#modal-editor-codeblock .ace-container {
|
||||||
height: 400px;
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
#codeblock-editor {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#source-display, #codeblock-editor {
|
#source-display, #codeblock-editor {
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
|
|
||||||
.modallayer#modal-editor-codeblock
|
.modal#modal-editor-codeblock
|
||||||
.modallayer-content
|
.modal-background
|
||||||
|
.modal-container
|
||||||
|
.modal-content.is-expanded
|
||||||
|
|
||||||
.columns
|
header.is-green
|
||||||
.column
|
span Insert Code Block
|
||||||
h3 Code Block
|
|
||||||
.column.is-narrow
|
|
||||||
p.control
|
|
||||||
span.select
|
|
||||||
select(style={width: '300px'}, v-model='modeSelected')
|
|
||||||
option(v-for="mode in modes" v-bind:value='mode.name') {{ mode.caption }}
|
|
||||||
.column.is-narrow
|
|
||||||
.control.is-grouped
|
|
||||||
p.control
|
|
||||||
a.button.is-warning.is-outlined(v-on:click="cancel") Cancel
|
|
||||||
p.control
|
|
||||||
a.button.is-primary.is-outlined(v-on:click="insertCode") Insert Code Block
|
|
||||||
|
|
||||||
.ace-container(style={'border-radius':'5px'})
|
section.is-gapless
|
||||||
#codeblock-editor
|
.columns.is-stretched
|
||||||
|
.column.is-one-quarter.modal-sidebar.is-green(style={'max-width':'350px'})
|
||||||
|
.model-sidebar-header Language
|
||||||
|
.model-sidebar-content
|
||||||
|
p.control.is-fullwidth
|
||||||
|
select(v-model='modeSelected')
|
||||||
|
option(v-for="mode in modes" v-bind:value='mode.name') {{ mode.caption }}
|
||||||
|
.column.ace-container
|
||||||
|
#codeblock-editor
|
||||||
|
|
||||||
|
footer
|
||||||
|
a.button.is-grey.is-outlined(v-on:click="cancel") Discard
|
||||||
|
a.button.is-green(v-on:click="insertCode") Insert Code Block
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
li(v-for="fld in folders")
|
li(v-for="fld in folders")
|
||||||
a(v-on:click="selectFolder(fld)", v-bind:class="{ 'is-active': currentFolder === fld }")
|
a(v-on:click="selectFolder(fld)", v-bind:class="{ 'is-active': currentFolder === fld }")
|
||||||
i.icon-folder2
|
i.icon-folder2
|
||||||
span /{{ fld }}
|
span / {{ fld }}
|
||||||
.model-sidebar-header Alignment
|
.model-sidebar-header Alignment
|
||||||
.model-sidebar-content
|
.model-sidebar-content
|
||||||
p.control.is-fullwidth
|
p.control.is-fullwidth
|
||||||
@@ -43,7 +43,9 @@
|
|||||||
img(v-bind:src="'/uploads/t/' + img._id + '.png'")
|
img(v-bind:src="'/uploads/t/' + img._id + '.png'")
|
||||||
span: strong {{ img.basename }}
|
span: strong {{ img.basename }}
|
||||||
span {{ img.filesize | filesize }}
|
span {{ img.filesize | filesize }}
|
||||||
em(v-show="images.length < 1") This folder is empty.
|
em(v-show="images.length < 1")
|
||||||
|
i.icon-marquee-minus
|
||||||
|
| This folder is empty.
|
||||||
footer
|
footer
|
||||||
a.button.is-grey.is-outlined(v-on:click="cancel") Discard
|
a.button.is-grey.is-outlined(v-on:click="cancel") Discard
|
||||||
a.button.is-green(v-on:click="insertImage") Insert Image
|
a.button.is-green(v-on:click="insertImage") Insert Image
|
||||||
|
|||||||
Reference in new issue
Block a user