diff options
author | Marvin Borner | 2018-07-13 19:06:45 +0200 |
---|---|---|
committer | Marvin Borner | 2018-07-13 19:06:45 +0200 |
commit | 6fcfb7c04d32e1c8b26a312295bf7ac3ec2d2ad7 (patch) | |
tree | dbc87ef16fa01d5d99116de283592b8fe5e02944 /public/bower_components/ckeditor/plugins/easyimage | |
parent | dfd839f27146df0ad0494e11734fc7d310c70ebf (diff) |
Fixed many permissions and began admin interface
Diffstat (limited to 'public/bower_components/ckeditor/plugins/easyimage')
18 files changed, 147 insertions, 0 deletions
diff --git a/public/bower_components/ckeditor/plugins/easyimage/dialogs/easyimagealt.js b/public/bower_components/ckeditor/plugins/easyimage/dialogs/easyimagealt.js new file mode 100644 index 0000000..c216286 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/dialogs/easyimagealt.js @@ -0,0 +1,6 @@ +/* + Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.dialog.add("easyimageAlt",function(a){return{title:a.lang.easyimage.commands.altText,minWidth:200,minHeight:30,onOk:function(){var a=CKEDITOR.tools.trim(this.getValueOf("info","txtAlt"));this._.selectedImage.setAttribute("alt",a)},onHide:function(){delete this._.selectedImage},onShow:function(){var b=this.getContentElement("info","txtAlt");this._.selectedImage=a.widgets.focused.parts.image;b.setValue(this._.selectedImage.getAttribute("alt"));b.focus()},contents:[{id:"info",label:a.lang.easyimage.commands.altText, +accessKey:"I",elements:[{type:"text",id:"txtAlt",label:a.lang.easyimage.commands.altText}]}]}});
\ No newline at end of file diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealigncenter.png b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealigncenter.png Binary files differnew file mode 100644 index 0000000..424be40 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealigncenter.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealignleft.png b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealignleft.png Binary files differnew file mode 100644 index 0000000..7a520be --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealignleft.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealignright.png b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealignright.png Binary files differnew file mode 100644 index 0000000..d096f33 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealignright.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealt.png b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealt.png Binary files differnew file mode 100644 index 0000000..3b99772 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagealt.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagefull.png b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagefull.png Binary files differnew file mode 100644 index 0000000..37bc79d --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimagefull.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/easyimageside.png b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimageside.png Binary files differnew file mode 100644 index 0000000..d096f33 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimageside.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/easyimageupload.png b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimageupload.png Binary files differnew file mode 100644 index 0000000..8ea9725 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/easyimageupload.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealigncenter.png b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealigncenter.png Binary files differnew file mode 100644 index 0000000..633a4fe --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealigncenter.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealignleft.png b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealignleft.png Binary files differnew file mode 100644 index 0000000..d60710f --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealignleft.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealignright.png b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealignright.png Binary files differnew file mode 100644 index 0000000..aaac75f --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealignright.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealt.png b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealt.png Binary files differnew file mode 100644 index 0000000..a39c3dd --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagealt.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagefull.png b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagefull.png Binary files differnew file mode 100644 index 0000000..2de074a --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimagefull.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimageside.png b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimageside.png Binary files differnew file mode 100644 index 0000000..aaac75f --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimageside.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimageupload.png b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimageupload.png Binary files differnew file mode 100644 index 0000000..d0f21ae --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/icons/hidpi/easyimageupload.png diff --git a/public/bower_components/ckeditor/plugins/easyimage/lang/en.js b/public/bower_components/ckeditor/plugins/easyimage/lang/en.js new file mode 100644 index 0000000..34f0fe7 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/lang/en.js @@ -0,0 +1,5 @@ +/* + Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +CKEDITOR.plugins.setLang("easyimage","en",{commands:{fullImage:"Full Size Image",sideImage:"Side Image",altText:"Change image alternative text",upload:"Upload Image"},uploadFailed:"Your image could not be uploaded due to a network error."});
\ No newline at end of file diff --git a/public/bower_components/ckeditor/plugins/easyimage/plugin.js b/public/bower_components/ckeditor/plugins/easyimage/plugin.js new file mode 100644 index 0000000..291c765 --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/plugin.js @@ -0,0 +1,18 @@ +/* + Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ +(function(){function g(a){return CKEDITOR.tools.capitalize(a,!0)}function n(a,c){function b(a){return function(b,d){var c=b.widgets.focused,e=CKEDITOR.TRISTATE_DISABLED;c&&"easyimage"===c.name&&(e=a&&a.call(this,c,b,d)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);this.setState(e)}}function e(a,c,d,f){d.type="widget";d.widget="easyimage";d.group=d.group||"easyimage";d.element="figure";c=new CKEDITOR.style(d);a.filter.allow(c);c=new CKEDITOR.styleCommand(c);c.contextSensitive=!0;c.refresh=b(function(a, +b,c){return this.style.checkActive(c,b)});a.addCommand(f,c);c=a.getCommand(f);c.enable=function(){};c.refresh(a,a.elementPath());return c}a.addCommand("easyimageAlt",new CKEDITOR.dialogCommand("easyimageAlt",{startDisabled:!0,contextSensitive:!0,refresh:b()}));(function(b){function c(a,b){var d=a.match(/^easyimage(.+)$/);if(d){var e=(d[1][0]||"").toLowerCase()+d[1].substr(1);if(d[1]in b)return d[1];if(e in b)return e}return null}a.on("afterCommandExec",function(d){c(d.data.name,b)&&(a.forceNextSelectionCheck(), +a.selectionChange(!0))});a.on("beforeCommandExec",function(d){c(d.data.name,b)&&d.data.command.style.checkActive(d.editor.elementPath(),a)&&(d.cancel(),a.focus())});for(var d in b)e(a,d,b[d],"easyimage"+g(d))})(c)}function p(a){var c=a.config.easyimage_toolbar;a.plugins.contextmenu&&(c.split&&(c=c.split(",")),a.addMenuGroup("easyimage"),CKEDITOR.tools.array.forEach(c,function(b){b=a.ui.items[b];a.addMenuItem(b.name,{label:b.label,command:b.command,group:"easyimage"})}))}function q(a){var c=a.sender.editor, +b=c.config.easyimage_toolbar;b.split&&(b=b.split(","));CKEDITOR.tools.array.forEach(b,function(b){b=c.ui.items[b];a.data[b.name]=c.getCommand(b.command).state})}function r(a,c){var b=a.config,e=b.easyimage_class,b={name:"easyimage",allowedContent:{figure:{classes:b.easyimage_sideClass},img:{attributes:"!src,srcset,alt,width,sizes"}},requiredContent:"figure; img[!src]",styleableElements:"figure",supportedTypes:/image\/(jpeg|png|gif|bmp)/,loaderType:CKEDITOR.plugins.cloudservices.cloudServicesLoader, +progressReporterType:CKEDITOR.plugins.imagebase.progressBar,upcasts:{figure:function(a){if((!e||a.hasClass(e))&&1===a.find("img",!0).length)return a}},init:function(){function b(a,c){var e=a.$;if(e.complete&&e.naturalWidth)return c(e.naturalWidth);a.once("load",function(){c(e.naturalWidth)})}var c=this.parts.image;c&&!c.$.complete&&b(c,function(){var b=a._.easyImageToolbarContext.toolbar._view;b.rect.visible&&b.attach(b._pointedElement,{focusElement:!1})});c=this.element.data("cke-upload-id");"undefined"!== +typeof c&&(this.setData("uploadId",c),this.element.data("cke-upload-id",!1));this.on("contextMenu",q);a.config.easyimage_class&&this.addClass(a.config.easyimage_class);this.on("uploadStarted",function(){var a=this;b(a.parts.image,function(b){a.parts.image.hasAttribute("width")||(a.editor.fire("lockSnapshot"),a.parts.image.setAttribute("width",b),a.editor.fire("unlockSnapshot"))})});this.on("uploadDone",function(a){a=a.data.loader.responseData.response;var b=CKEDITOR.plugins.easyimage._parseSrcSet(a); +this.parts.image.setAttributes({"data-cke-saved-src":a["default"],src:a["default"],srcset:b,sizes:"100vw"})});this.on("uploadFailed",function(){alert(this.editor.lang.easyimage.uploadFailed)});this._loadDefaultStyle()},_loadDefaultStyle:function(){var b=!1,e=a.config.easyimage_defaultStyle,d;for(d in c){var f=a.getCommand("easyimage"+g(d));!b&&f&&f.style&&-1!==CKEDITOR.tools.array.indexOf(f.style.group,"easyimage")&&this.checkStyleActive(f.style)&&(b=!0)}!b&&e&&a.getCommand("easyimage"+g(e))&&this.applyStyle(a.getCommand("easyimage"+ +g(e)).style)}};e&&(b.requiredContent+="(!"+e+")",b.allowedContent.figure.classes="!"+e+","+b.allowedContent.figure.classes);a.plugins.link&&(b=CKEDITOR.plugins.imagebase.addFeature(a,"link",b));b=CKEDITOR.plugins.imagebase.addFeature(a,"upload",b);b=CKEDITOR.plugins.imagebase.addFeature(a,"caption",b);CKEDITOR.plugins.imagebase.addImageWidget(a,"easyimage",b)}function t(a){a.on("paste",function(c){if(!a.isReadOnly&&c.data.dataValue.match(/<img[\s\S]+data:/i)){c=c.data;var b=document.implementation.createHTMLDocument(""), +b=new CKEDITOR.dom.element(b.body),e=a.widgets.registered.easyimage,g=0,h,d,f,l;b.data("cke-editable",1);b.appendHtml(c.dataValue);d=b.find("img");for(l=0;l<d.count();l++){f=d.getItem(l);var k=(h=f.getAttribute("src"))&&"data:"==h.substring(0,5),m=null===f.data("cke-realelement");k&&m&&!f.isReadOnly(1)&&(g++,1<g&&(k=a.getSelection().getRanges(),k[0].enlarge(CKEDITOR.ENLARGE_ELEMENT),k[0].collapse(!1)),h.match(/image\/([a-z]+?);/i),k=e._spawnLoader(a,h,e),h=e._insertWidget(a,e,h,!1,{uploadId:k.id}), +h.data("cke-upload-id",k.id),h.replace(f))}c.dataValue=b.getHtml()}})}function u(a){a.ui.addButton("EasyImageUpload",{label:a.lang.easyimage.commands.upload,command:"easyimageUpload",toolbar:"insert,1"});a.addCommand("easyimageUpload",{exec:function(){var c=CKEDITOR.dom.element.createFromHtml('\x3cinput type\x3d"file" accept\x3d"image/*" multiple\x3d"multiple"\x3e');c.once("change",function(b){b=b.data.getTarget();b.$.files.length&&a.fire("paste",{method:"paste",dataValue:"",dataTransfer:new CKEDITOR.plugins.clipboard.dataTransfer({files:b.$.files})})}); +c.$.click()}})}var m=!1;CKEDITOR.plugins.easyimage={_parseSrcSet:function(a){var c=[],b;for(b in a)"default"!==b&&c.push(a[b]+" "+b+"w");return c.join(", ")}};CKEDITOR.plugins.add("easyimage",{requires:"imagebase,balloontoolbar,button,dialog,cloudservices",lang:"en",icons:"easyimagefull,easyimageside,easyimagealt,easyimagealignleft,easyimagealigncenter,easyimagealignright,easyimageupload",hidpi:!0,onLoad:function(){CKEDITOR.dialog.add("easyimageAlt",this.path+"dialogs/easyimagealt.js")},init:function(a){if(!CKEDITOR.env.ie|| +11<=CKEDITOR.env.version)m||(CKEDITOR.document.appendStyleSheet(this.path+"styles/easyimage.css"),m=!0),a.addContentsCss&&a.addContentsCss(this.path+"styles/easyimage.css")},afterInit:function(a){if(!CKEDITOR.env.ie||11<=CKEDITOR.env.version){var c;c=CKEDITOR.tools.object.merge({full:{attributes:{"class":"easyimage-full"},label:a.lang.easyimage.commands.fullImage},side:{attributes:{"class":"easyimage-side"},label:a.lang.easyimage.commands.sideImage},alignLeft:{attributes:{"class":"easyimage-align-left"}, +label:a.lang.common.alignLeft},alignCenter:{attributes:{"class":"easyimage-align-center"},label:a.lang.common.alignCenter},alignRight:{attributes:{"class":"easyimage-align-right"},label:a.lang.common.alignRight}},a.config.easyimage_styles);r(a,c);t(a);n(a,c);a.ui.addButton("EasyImageAlt",{label:a.lang.easyimage.commands.altText,command:"easyimageAlt",toolbar:"easyimage,3"});for(var b in c)a.ui.addButton("EasyImage"+g(b),{label:c[b].label,command:"easyimage"+g(b),toolbar:"easyimage,99",icon:c[b].icon, +iconHiDpi:c[b].iconHiDpi});p(a);c=a.config.easyimage_toolbar;a._.easyImageToolbarContext=a.balloonToolbars.create({buttons:c.join?c.join(","):c,widgets:["easyimage"]});u(a)}}});CKEDITOR.config.easyimage_class="easyimage";CKEDITOR.config.easyimage_styles={};CKEDITOR.config.easyimage_defaultStyle="full";CKEDITOR.config.easyimage_toolbar=["EasyImageFull","EasyImageSide","EasyImageAlt"]})();
\ No newline at end of file diff --git a/public/bower_components/ckeditor/plugins/easyimage/styles/easyimage.css b/public/bower_components/ckeditor/plugins/easyimage/styles/easyimage.css new file mode 100644 index 0000000..f12c1cb --- /dev/null +++ b/public/bower_components/ckeditor/plugins/easyimage/styles/easyimage.css @@ -0,0 +1,118 @@ +/* +Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license +*/ + +.easyimage, .cke_widget_wrapper_easyimage { + background: transparent; + border: none; + outline: 0px; + display: block; + padding: 0; + clear: both; +} + +/* +The outline is not a part of the element's dimensions. A border needs to be used as an outline to align the linked image with a caption. +*/ +.easyimage a > img { + outline: none; + border: 1px solid #0782C1; + box-sizing: border-box; + padding: 1px; +} + +.cke_widget_wrapper_easyimage figure { + margin: 0; +} + +.easyimage img, .cke_widget_uploadeasyimage img { + display: block; + height: auto; + margin: 0 auto; + max-width: 100%; +} + +.cke_widget_wrapper_easyimage-side, :not(.cke_widget_wrapper_easyimage):not(.cke_widget_wrapper_easyimage-side) > .easyimage-side, +.cke_widget_wrapper_easyimage-align-right, :not(.cke_widget_wrapper_easyimage):not(.cke_widget_wrapper_easyimage-align-right) > .easyimage-align-right { + /* + The :not() selector will be used for Easy Image content ouside of the editor, for example: when the editor was destroyed. + See https://github.com/ckeditor/ckeditor-dev/pull/1150#discussion_r150415261 for more details. + */ + float: right; + max-width: 50%; + /* + In case of placement inside the parent container like a table cell, 'min-width' is needed to prevent the widget from having + tiny sizes. The `em` unit is used so it works well and has proper proportions to the textual content around (#1553). + */ + min-width: 10em; + margin-left: 1.5em; +} + +/* +Overwrite 'max-width: 50%' with 'max-width: 50vw' to prevent the native Chrome bug: +https://bugs.chromium.org/p/chromium/issues/detail?id=803045 (#1550). +*/ +body.cke_editable > .cke_widget_wrapper_easyimage-side { + max-width: 50vw; +} + +.cke_widget_wrapper_easyimage-align-left, :not(.cke_widget_wrapper_easyimage):not(.cke_widget_wrapper_easyimage-align-left) > .easyimage-align-left { + float: left; + max-width: 50%; + min-width: 10em; + margin-right: 1.5em; +} + +.cke_widget_wrapper_easyimage-align-center, :not(.cke_widget_wrapper_easyimage):not(.cke_widget_wrapper_easyimage-align-center) > .easyimage-align-center { + margin: 0 auto; + max-width: 90%; +} + +.easyimage .cke_widget_editable { + background-color: #f7f7f7; + /* Add border so when caption is focused, blue border does not cause flickering. */ + border: 1px solid #f7f7f7; + color: #333; + padding: .8em; +} + +.cke_widget_wrapper:hover .easyimage .cke_widget_editable { + outline: 3px solid transparent; +} + +.cke_widget_wrapper .easyimage .cke_widget_editable.cke_widget_editable_focused { + background-color: #fff; + border-color: #48a3f5; + outline: none; +} + +/* Loaders */ + +.cke_widget_element.easyimage { + position: relative; +} + +.cke_loader { + position: absolute; + top: 0px; + left: 0px; + right: 0px; +} + +.cke_loader .cke_bar { + height: 10px; + background: #6a9ed1; + width: 0; +} + +/* Fancy opacity effect discussed in #1533. Transition is assigned in this awkward way so that it **does not** happen for +the initial render, otherwise it would start transitioning from opacity 1 to 0.x upon the first render. */ + +.cke_widget_wrapper_easyimage:not(.cke_widget_wrapper_uploading) figure img { + transition: opacity 0.3s ease-in-out; +} + +.cke_widget_wrapper_easyimage.cke_widget_wrapper_uploading figure img { + opacity: 0.75; +} |