İlk temizlik tamamlandı bir önceki projeden
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
CKEDITOR.dialog.add("a11yHelp",function(f){function m(a){for(var b,c,h=[],d=0;d<g.length;d++)c=g[d],b=a/g[d],1<b&&2>=b&&(a-=c,h.push(e[c]));h.push(e[a]||String.fromCharCode(a));return h.join("+")}function t(a,b){var c=f.getCommandKeystroke(b,!0);return c.length?CKEDITOR.tools.array.map(c,m).join(" / "):a}var a=f.lang.a11yhelp,b=f.lang.common.keyboard,p=CKEDITOR.tools.getNextId(),q=/\$\{(.*?)\}/g,g=[CKEDITOR.ALT,CKEDITOR.SHIFT,CKEDITOR.CTRL],e={8:b[8],9:a.tab,13:b[13],16:b[16],17:b[17],18:b[18],19:a.pause,
|
||||
20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:b[35],36:b[36],37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:b[46],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8,105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,
|
||||
122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=b[18];e[CKEDITOR.SHIFT]=b[16];e[CKEDITOR.CTRL]=CKEDITOR.env.mac?b[224]:b[17];return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:f.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},
|
||||
html:function(){for(var b='\x3cdiv class\x3d"cke_accessibility_legend" role\x3d"document" aria-labelledby\x3d"'+p+'_arialbl" tabIndex\x3d"-1"\x3e%1\x3c/div\x3e\x3cspan id\x3d"'+p+'_arialbl" class\x3d"cke_voice_label"\x3e'+a.contents+" \x3c/span\x3e",e=[],c=a.legend,h=c.length,d=0;d<h;d++){for(var f=c[d],g=[],r=f.items,m=r.length,n=0;n<m;n++){var k=r[n],l=CKEDITOR.env.edge&&k.legendEdge?k.legendEdge:k.legend,l=l.replace(q,t);l.match(q)||g.push("\x3cdt\x3e%1\x3c/dt\x3e\x3cdd\x3e%2\x3c/dd\x3e".replace("%1",
|
||||
k.name).replace("%2",l))}e.push("\x3ch1\x3e%1\x3c/h1\x3e\x3cdl\x3e%2\x3c/dl\x3e".replace("%1",f.name).replace("%2",g.join("")))}return b.replace("%1",e.join(""))}()+'\x3cstyle type\x3d"text/css"\x3e.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}\x3c/style\x3e'}]}],
|
||||
buttons:[CKEDITOR.dialog.cancelButton]}});
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
CKEDITOR.dialog.add("about",function(a){a=a.lang.about;var b=CKEDITOR.getUrl(CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png");return{title:a.dlgTitle,minWidth:390,minHeight:210,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'\x3cstyle type\x3d"text/css"\x3e.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+
|
||||
b+");"+(CKEDITOR.env.hidpi?"background-size:194px 58px;":"")+'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}.cke_about_container \x3e p,.cke_rtl .cke_about_container \x3e p{text-align:center;}\x3c/style\x3e\x3cdiv class\x3d"cke_about_container"\x3e\x3cdiv class\x3d"cke_about_logo"\x3e\x3c/div\x3e\x3cp\x3eCKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+
|
||||
')\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://ckeditor.com/"\x3ehttps://ckeditor.com\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.moreInfo+'\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://ckeditor.com/legal/ckeditor-oss-license/"\x3ehttps://ckeditor.com/legal/ckeditor-oss-license/\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.copy.replace("$1",'\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://cksource.com/"\x3eCKSource\x3c/a\x3e - Frederico Knabben')+
|
||||
"\x3c/p\x3e\x3c/div\x3e"}]}],buttons:[CKEDITOR.dialog.cancelButton]}});
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
.cke_balloon.cke_balloontoolbar
|
||||
{
|
||||
position: absolute;
|
||||
z-index: 10000;
|
||||
outline: none;
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #d1d1d1;
|
||||
}
|
||||
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle
|
||||
{
|
||||
position: absolute;
|
||||
border-style: solid;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* The .cke_balloon_content container height will be stretched to children height, so padding is properly applied. */
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_content
|
||||
{
|
||||
float: left;
|
||||
min-height: 10px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
/* Removes bottom margins from buttons/combos so only '.cke_balloon_content' padding decides about balloon toolbar padding. */
|
||||
.cke_balloon.cke_balloontoolbar .cke_toolgroup,
|
||||
.cke_balloon.cke_balloontoolbar .cke_combo_button
|
||||
{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_content > span:last-child > a.cke_combo_button,
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_content > span:last-child.cke_toolgroup {
|
||||
margin-right: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_inner,
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_outer
|
||||
{
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* align: [ hcenter ] */
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_outer.cke_balloon_triangle_align_hcenter
|
||||
{
|
||||
left: 50%;
|
||||
margin-left: -7px;
|
||||
}
|
||||
|
||||
/* side: [ bottom, top ] */
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_outer.cke_balloon_triangle_bottom,
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_outer.cke_balloon_triangle_top
|
||||
{
|
||||
border-color: #d1d1d1 transparent;
|
||||
}
|
||||
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_inner.cke_balloon_triangle_bottom,
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_inner.cke_balloon_triangle_top
|
||||
{
|
||||
border-color: #f8f8f8 transparent;
|
||||
left: -7px;
|
||||
}
|
||||
|
||||
/* side: [ bottom ] */
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_outer.cke_balloon_triangle_bottom
|
||||
{
|
||||
border-width: 7px 7px 0;
|
||||
bottom: -7px;
|
||||
}
|
||||
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_inner.cke_balloon_triangle_bottom
|
||||
{
|
||||
border-width: 7px 7px 0;
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
/* side: [ top ] */
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_outer.cke_balloon_triangle_top
|
||||
{
|
||||
border-width: 0 7px 7px;
|
||||
top: -7px;
|
||||
}
|
||||
|
||||
.cke_balloon.cke_balloontoolbar .cke_balloon_triangle_inner.cke_balloon_triangle_top
|
||||
{
|
||||
border-width: 0 7px 7px;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
Base64Image Plugin for CKEditor 4
|
||||
=================================
|
||||
|
||||
Created by ALL-INKL.COM - Neue Medien Münnich - 04. Feb 2014
|
||||
|
||||
Adds images from local client as base64 string into the source without server
|
||||
side processing. You can also add external image urls into the source.
|
||||
|
||||
## Requirements
|
||||
The Browser must support the JavaScript File API.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download the plugin from http://github.com/nmmf/base64image
|
||||
|
||||
2. Extract (decompress) the downloaded file into the plugins folder of your
|
||||
CKEditor installation.
|
||||
Example: http://example.com/ckeditor/plugins/base64image
|
||||
|
||||
3. Enable the plugin by using the extraPlugins configuration setting.
|
||||
Example: CKEDITOR.config.extraPlugins = "base64image";
|
||||
@@ -0,0 +1,503 @@
|
||||
/*
|
||||
* Created by ALL-INKL.COM - Neue Medien Muennich - 04. Feb 2014
|
||||
* Licensed under the terms of GPL, LGPL and MPL licenses.
|
||||
*/
|
||||
CKEDITOR.dialog.add("base64imageDialog", function(editor){
|
||||
|
||||
var t = null,
|
||||
selectedImg = null,
|
||||
orgWidth = null, orgHeight = null,
|
||||
imgPreview = null, urlCB = null, urlI = null, fileCB = null, imgScal = 1, lock = true;
|
||||
|
||||
/* Check File Reader Support */
|
||||
function fileSupport() {
|
||||
var r = false, n = null;
|
||||
try {
|
||||
if(FileReader) {
|
||||
var n = document.createElement("input");
|
||||
if(n && "files" in n) r = true;
|
||||
}
|
||||
} catch(e) { r = false; }
|
||||
n = null;
|
||||
return r;
|
||||
}
|
||||
var fsupport = fileSupport();
|
||||
|
||||
/* Load preview image */
|
||||
function imagePreviewLoad(s) {
|
||||
|
||||
/* no preview */
|
||||
if(typeof(s) != "string" || !s) {
|
||||
imgPreview.getElement().setHtml("");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create image */
|
||||
var i = new Image();
|
||||
|
||||
/* Display loading text in preview element */
|
||||
imgPreview.getElement().setHtml("Loading...");
|
||||
|
||||
/* When image is loaded */
|
||||
i.onload = function() {
|
||||
|
||||
/* Remove preview */
|
||||
imgPreview.getElement().setHtml("");
|
||||
|
||||
/* Set attributes */
|
||||
if(orgWidth == null || orgHeight == null) {
|
||||
t.setValueOf("tab-properties", "width", this.width);
|
||||
t.setValueOf("tab-properties", "height", this.height);
|
||||
imgScal = 1;
|
||||
if(this.height > 0 && this.width > 0) imgScal = this.width / this.height;
|
||||
if(imgScal <= 0) imgScal = 1;
|
||||
} else {
|
||||
orgWidth = null;
|
||||
orgHeight = null;
|
||||
}
|
||||
this.id = editor.id+"previewimage";
|
||||
this.setAttribute("style", "max-width:400px;max-height:100px;");
|
||||
this.setAttribute("alt", "");
|
||||
|
||||
/* Insert preview image */
|
||||
try {
|
||||
var p = imgPreview.getElement().$;
|
||||
if(p) p.appendChild(this);
|
||||
} catch(e) {}
|
||||
|
||||
};
|
||||
|
||||
/* Error Function */
|
||||
i.onerror = function(){ imgPreview.getElement().setHtml(""); };
|
||||
i.onabort = function(){ imgPreview.getElement().setHtml(""); };
|
||||
|
||||
/* Load image */
|
||||
i.src = s;
|
||||
}
|
||||
|
||||
/* Change input values and preview image */
|
||||
function imagePreview(src){
|
||||
|
||||
/* Remove preview */
|
||||
imgPreview.getElement().setHtml("");
|
||||
|
||||
if(src == "base64") {
|
||||
|
||||
/* Disable Checkboxes */
|
||||
if(urlCB) urlCB.setValue(false, true);
|
||||
if(fileCB) fileCB.setValue(false, true);
|
||||
|
||||
} else if(src == "url") {
|
||||
|
||||
/* Ensable Image URL Checkbox */
|
||||
if(urlCB) urlCB.setValue(true, true);
|
||||
if(fileCB) fileCB.setValue(false, true);
|
||||
|
||||
/* Load preview image */
|
||||
if(urlI) imagePreviewLoad(urlI.getValue());
|
||||
|
||||
} else if(fsupport) {
|
||||
|
||||
/* Ensable Image File Checkbox */
|
||||
if(urlCB) urlCB.setValue(false, true);
|
||||
if(fileCB) fileCB.setValue(true, true);
|
||||
|
||||
/* Read file and load preview */
|
||||
var fileI = t.getContentElement("tab-source", "file");
|
||||
var n = null;
|
||||
try { n = fileI.getInputElement().$; } catch(e) { n = null; }
|
||||
if(n && "files" in n && n.files && n.files.length > 0 && n.files[0]) {
|
||||
if("type" in n.files[0] && !n.files[0].type.match("image.*")) return;
|
||||
if(!FileReader) return;
|
||||
imgPreview.getElement().setHtml("Loading...");
|
||||
var fr = new FileReader();
|
||||
fr.onload = (function(f) { return function(e) {
|
||||
imgPreview.getElement().setHtml("");
|
||||
imagePreviewLoad(e.target.result);
|
||||
}; })(n.files[0]);
|
||||
fr.onerror = function(){ imgPreview.getElement().setHtml(""); };
|
||||
fr.onabort = function(){ imgPreview.getElement().setHtml(""); };
|
||||
fr.readAsDataURL(n.files[0]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* Calculate image dimensions */
|
||||
function getImageDimensions() {
|
||||
var o = {
|
||||
"w" : t.getContentElement("tab-properties", "width").getValue(),
|
||||
"h" : t.getContentElement("tab-properties", "height").getValue(),
|
||||
"uw" : "px",
|
||||
"uh" : "px"
|
||||
};
|
||||
if(o.w.indexOf("%") >= 0) o.uw = "%";
|
||||
if(o.h.indexOf("%") >= 0) o.uh = "%";
|
||||
o.w = parseInt(o.w, 10);
|
||||
o.h = parseInt(o.h, 10);
|
||||
if(isNaN(o.w)) o.w = 0;
|
||||
if(isNaN(o.h)) o.h = 0;
|
||||
return o;
|
||||
}
|
||||
|
||||
/* Set image dimensions */
|
||||
function imageDimensions(src) {
|
||||
var o = getImageDimensions();
|
||||
var u = "px";
|
||||
if(src == "width") {
|
||||
if(o.uw == "%") u = "%";
|
||||
o.h = Math.round(o.w / imgScal);
|
||||
} else {
|
||||
if(o.uh == "%") u = "%";
|
||||
o.w = Math.round(o.h * imgScal);
|
||||
}
|
||||
if(u == "%") {
|
||||
o.w += "%";
|
||||
o.h += "%";
|
||||
}
|
||||
t.getContentElement("tab-properties", "width").setValue(o.w),
|
||||
t.getContentElement("tab-properties", "height").setValue(o.h)
|
||||
}
|
||||
|
||||
/* Set integer Value */
|
||||
function integerValue(elem) {
|
||||
var v = elem.getValue(), u = "";
|
||||
if(v.indexOf("%") >= 0) u = "%";
|
||||
v = parseInt(v, 10);
|
||||
if(isNaN(v)) v = 0;
|
||||
elem.setValue(v+u);
|
||||
}
|
||||
|
||||
if(fsupport) {
|
||||
|
||||
/* Dialog with file and url image source */
|
||||
var sourceElements = [
|
||||
{
|
||||
type: "hbox",
|
||||
widths: ["70px"],
|
||||
children: [
|
||||
{
|
||||
type: "checkbox",
|
||||
id: "urlcheckbox",
|
||||
style: "margin-top:5px",
|
||||
label: editor.lang.common.url+":"
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
id: "url",
|
||||
label: "",
|
||||
onChange: function(){ imagePreview("url"); }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "hbox",
|
||||
widths: ["70px"],
|
||||
children: [
|
||||
{
|
||||
type: "checkbox",
|
||||
id: "filecheckbox",
|
||||
style: "margin-top:5px",
|
||||
label: editor.lang.common.upload+":"
|
||||
},
|
||||
{
|
||||
type: "file",
|
||||
id: "file",
|
||||
label: "",
|
||||
onChange: function(){ imagePreview("file"); }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "html",
|
||||
id: "preview",
|
||||
html: new CKEDITOR.template("<div style=\"text-align:center;\"></div>").output()
|
||||
}
|
||||
];
|
||||
|
||||
} else {
|
||||
|
||||
/* Dialog with url image source */
|
||||
var sourceElements = [
|
||||
{
|
||||
type: "text",
|
||||
id: "url",
|
||||
label: editor.lang.common.url,
|
||||
onChange: function(){ imagePreview("url"); }
|
||||
},
|
||||
{
|
||||
type: "html",
|
||||
id: "preview",
|
||||
html: new CKEDITOR.template("<div style=\"text-align:center;\"></div>").output()
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/* Dialog */
|
||||
return {
|
||||
title: editor.lang.common.image,
|
||||
minWidth: 450,
|
||||
minHeight: 180,
|
||||
onLoad: function(){
|
||||
|
||||
if(fsupport) {
|
||||
|
||||
/* Get checkboxes */
|
||||
urlCB = this.getContentElement("tab-source", "urlcheckbox");
|
||||
fileCB = this.getContentElement("tab-source", "filecheckbox");
|
||||
|
||||
/* Checkbox Events */
|
||||
urlCB.getInputElement().on("click", function(){ imagePreview("url"); });
|
||||
fileCB.getInputElement().on("click", function(){ imagePreview("file"); });
|
||||
|
||||
}
|
||||
|
||||
/* Get url input element */
|
||||
urlI = this.getContentElement("tab-source", "url");
|
||||
|
||||
/* Get image preview element */
|
||||
imgPreview = this.getContentElement("tab-source", "preview");
|
||||
|
||||
/* Constrain proportions or not */
|
||||
this.getContentElement("tab-properties", "lock").getInputElement().on("click", function(){
|
||||
if(this.getValue()) lock = true; else lock = false;
|
||||
if(lock) imageDimensions("width");
|
||||
}, this.getContentElement("tab-properties", "lock"));
|
||||
|
||||
/* Change Attributes Events */
|
||||
this.getContentElement("tab-properties", "width").getInputElement().on("keyup", function(){ if(lock) imageDimensions("width"); });
|
||||
this.getContentElement("tab-properties", "height").getInputElement().on("keyup", function(){ if(lock) imageDimensions("height"); });
|
||||
this.getContentElement("tab-properties", "vmargin").getInputElement().on("keyup", function(){ integerValue(this); }, this.getContentElement("tab-properties", "vmargin"));
|
||||
this.getContentElement("tab-properties", "hmargin").getInputElement().on("keyup", function(){ integerValue(this); }, this.getContentElement("tab-properties", "hmargin"));
|
||||
this.getContentElement("tab-properties", "border").getInputElement().on("keyup", function(){ integerValue(this); }, this.getContentElement("tab-properties", "border"));
|
||||
|
||||
},
|
||||
onShow: function(){
|
||||
|
||||
/* Remove preview */
|
||||
imgPreview.getElement().setHtml("");
|
||||
|
||||
t = this, orgWidth = null, orgHeight = null, imgScal = 1, lock = true;
|
||||
|
||||
/* selected image or null */
|
||||
selectedImg = editor.getSelection();
|
||||
if(selectedImg) selectedImg = selectedImg.getSelectedElement();
|
||||
if(!selectedImg || selectedImg.getName() !== "img") selectedImg = null;
|
||||
|
||||
/* Set input values */
|
||||
t.setValueOf("tab-properties", "lock", lock);
|
||||
t.setValueOf("tab-properties", "vmargin", "0");
|
||||
t.setValueOf("tab-properties", "hmargin", "0");
|
||||
t.setValueOf("tab-properties", "border", "0");
|
||||
t.setValueOf("tab-properties", "align", "none");
|
||||
if(selectedImg) {
|
||||
|
||||
/* Set input values from selected image */
|
||||
if(typeof(selectedImg.getAttribute("width")) == "string") orgWidth = selectedImg.getAttribute("width");
|
||||
if(typeof(selectedImg.getAttribute("height")) == "string") orgHeight = selectedImg.getAttribute("height");
|
||||
if((orgWidth == null || orgHeight == null) && selectedImg.$) {
|
||||
orgWidth = selectedImg.$.width;
|
||||
orgHeight = selectedImg.$.height;
|
||||
}
|
||||
if(orgWidth != null && orgHeight != null) {
|
||||
t.setValueOf("tab-properties", "width", orgWidth);
|
||||
t.setValueOf("tab-properties", "height", orgHeight);
|
||||
orgWidth = parseInt(orgWidth, 10);
|
||||
orgHeight = parseInt(orgHeight, 10);
|
||||
imgScal = 1;
|
||||
if(!isNaN(orgWidth) && !isNaN(orgHeight) && orgHeight > 0 && orgWidth > 0) imgScal = orgWidth / orgHeight;
|
||||
if(imgScal <= 0) imgScal = 1;
|
||||
}
|
||||
|
||||
if(typeof(selectedImg.getAttribute("src")) == "string") {
|
||||
if(selectedImg.getAttribute("src").indexOf("data:") === 0) {
|
||||
imagePreview("base64");
|
||||
imagePreviewLoad(selectedImg.getAttribute("src"));
|
||||
} else {
|
||||
t.setValueOf("tab-source", "url", selectedImg.getAttribute("src"));
|
||||
}
|
||||
}
|
||||
if(typeof(selectedImg.getAttribute("alt")) == "string") t.setValueOf("tab-properties", "alt", selectedImg.getAttribute("alt"));
|
||||
if(typeof(selectedImg.getAttribute("hspace")) == "string") t.setValueOf("tab-properties", "hmargin", selectedImg.getAttribute("hspace"));
|
||||
if(typeof(selectedImg.getAttribute("vspace")) == "string") t.setValueOf("tab-properties", "vmargin", selectedImg.getAttribute("vspace"));
|
||||
if(typeof(selectedImg.getAttribute("border")) == "string") t.setValueOf("tab-properties", "border", selectedImg.getAttribute("border"));
|
||||
if(typeof(selectedImg.getAttribute("align")) == "string") {
|
||||
switch(selectedImg.getAttribute("align")) {
|
||||
case "top":
|
||||
case "text-top":
|
||||
t.setValueOf("tab-properties", "align", "top");
|
||||
break;
|
||||
case "baseline":
|
||||
case "bottom":
|
||||
case "text-bottom":
|
||||
t.setValueOf("tab-properties", "align", "bottom");
|
||||
break;
|
||||
case "left":
|
||||
t.setValueOf("tab-properties", "align", "left");
|
||||
break;
|
||||
case "right":
|
||||
t.setValueOf("tab-properties", "align", "right");
|
||||
break;
|
||||
}
|
||||
}
|
||||
t.selectPage("tab-properties");
|
||||
}
|
||||
|
||||
},
|
||||
onOk : function(){
|
||||
|
||||
/* Get image source */
|
||||
var src = "";
|
||||
try { src = CKEDITOR.document.getById(editor.id+"previewimage").$.src; } catch(e) { src = ""; }
|
||||
if(typeof(src) != "string" || src == null || src === "") return;
|
||||
|
||||
/* selected image or new image */
|
||||
if(selectedImg) var newImg = selectedImg; else var newImg = editor.document.createElement("img");
|
||||
newImg.setAttribute("src", src);
|
||||
src = null;
|
||||
|
||||
/* Set attributes */
|
||||
newImg.setAttribute("alt", t.getValueOf("tab-properties", "alt").replace(/^\s+/, "").replace(/\s+$/, ""));
|
||||
var attr = {
|
||||
"width" : ["width", "width:#;", "integer", 1],
|
||||
"height" : ["height", "height:#;", "integer", 1],
|
||||
"vmargin" : ["vspace", "margin-top:#;margin-bottom:#;", "integer", 0],
|
||||
"hmargin" : ["hspace", "margin-left:#;margin-right:#;", "integer", 0],
|
||||
"align" : ["align", ""],
|
||||
"border" : ["border", "border:# solid black;", "integer", 0]
|
||||
}, css = [], value, cssvalue, attrvalue, k;
|
||||
for(k in attr) {
|
||||
|
||||
value = t.getValueOf("tab-properties", k);
|
||||
attrvalue = value;
|
||||
cssvalue = value;
|
||||
unit = "px";
|
||||
|
||||
if(k == "align") {
|
||||
switch(value) {
|
||||
case "top":
|
||||
case "bottom":
|
||||
attr[k][1] = "vertical-align:#;";
|
||||
break;
|
||||
case "left":
|
||||
case "right":
|
||||
attr[k][1] = "float:#;";
|
||||
break;
|
||||
default:
|
||||
value = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(attr[k][2] == "integer") {
|
||||
if(value.indexOf("%") >= 0) unit = "%";
|
||||
value = parseInt(value, 10);
|
||||
if(isNaN(value)) value = null; else if(value < attr[k][3]) value = null;
|
||||
if(value != null) {
|
||||
if(unit == "%") {
|
||||
attrvalue = value+"%";
|
||||
cssvalue = value+"%";
|
||||
} else {
|
||||
attrvalue = value;
|
||||
cssvalue = value+"px";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(value != null) {
|
||||
newImg.setAttribute(attr[k][0], attrvalue);
|
||||
css.push(attr[k][1].replace(/#/g, cssvalue));
|
||||
}
|
||||
|
||||
}
|
||||
if(css.length > 0) newImg.setAttribute("style", css.join(""));
|
||||
|
||||
/* Insert new image */
|
||||
if(!selectedImg) editor.insertElement(newImg);
|
||||
|
||||
/* Resize image */
|
||||
if(editor.plugins.imageresize) editor.plugins.imageresize.resize(editor, newImg, 800, 800);
|
||||
|
||||
},
|
||||
|
||||
/* Dialog form */
|
||||
contents: [
|
||||
{
|
||||
id: "tab-source",
|
||||
label: editor.lang.common.generalTab,
|
||||
elements: sourceElements
|
||||
},
|
||||
{
|
||||
id: "tab-properties",
|
||||
label: editor.lang.common.advancedTab,
|
||||
elements: [
|
||||
{
|
||||
type: "text",
|
||||
id: "alt",
|
||||
label: editor.lang.base64image.alt
|
||||
},
|
||||
{
|
||||
type: 'hbox',
|
||||
widths: ["15%", "15%", "70%"],
|
||||
children: [
|
||||
{
|
||||
type: "text",
|
||||
width: "45px",
|
||||
id: "width",
|
||||
label: editor.lang.common.width
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
width: "45px",
|
||||
id: "height",
|
||||
label: editor.lang.common.height
|
||||
},
|
||||
{
|
||||
type: "checkbox",
|
||||
id: "lock",
|
||||
label: editor.lang.base64image.lockRatio,
|
||||
style: "margin-top:18px;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'hbox',
|
||||
widths: ["23%", "30%", "30%", "17%"],
|
||||
style: "margin-top:10px;",
|
||||
children: [
|
||||
{
|
||||
type: "select",
|
||||
id: "align",
|
||||
label: editor.lang.common.align,
|
||||
items: [
|
||||
[editor.lang.common.notSet, "none"],
|
||||
[editor.lang.common.alignTop, "top"],
|
||||
[editor.lang.common.alignBottom, "bottom"],
|
||||
[editor.lang.common.alignLeft, "left"],
|
||||
[editor.lang.common.alignRight, "right"]
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
width: "45px",
|
||||
id: "vmargin",
|
||||
label: editor.lang.base64image.vSpace
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
width: "45px",
|
||||
id: "hmargin",
|
||||
label: editor.lang.base64image.hSpace
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
width: "45px",
|
||||
id: "border",
|
||||
label: editor.lang.base64image.border
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","af",{
|
||||
"alt":"Alternatiewe teks",
|
||||
"lockRatio":"Vaste proporsie",
|
||||
"vSpace":"VSpasie",
|
||||
"hSpace":"HSpasie",
|
||||
"border":"Rand"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","ar",{
|
||||
"alt":"عنوان الصورة",
|
||||
"lockRatio":"تناسق الحجم",
|
||||
"vSpace":"تباعد عمودي",
|
||||
"hSpace":"تباعد أفقي",
|
||||
"border":"سمك الحدود"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","bg",{
|
||||
"alt":"Алтернативен текст",
|
||||
"lockRatio":"Заключване на съотношението",
|
||||
"vSpace":"Вертикален отстъп",
|
||||
"hSpace":"Хоризонтален отстъп",
|
||||
"border":"Рамка"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","bn",{
|
||||
"alt":"বিকল্প টেক্সট",
|
||||
"lockRatio":"অনুপাত লক কর",
|
||||
"vSpace":"ভার্টিকেল স্পেস",
|
||||
"hSpace":"হরাইজন্টাল স্পেস",
|
||||
"border":"বর্ডার"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","bs",{
|
||||
"alt":"Tekst na slici",
|
||||
"lockRatio":"Zakljuèaj odnos",
|
||||
"vSpace":"VSpace",
|
||||
"hSpace":"HSpace",
|
||||
"border":"Okvir"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","ca",{
|
||||
"alt":"Text alternatiu",
|
||||
"lockRatio":"Bloqueja les proporcions",
|
||||
"vSpace":"Espaiat vert.",
|
||||
"hSpace":"Espaiat horit.",
|
||||
"border":"Vora"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","cs",{
|
||||
"alt":"Alternativní text",
|
||||
"lockRatio":"Zámek",
|
||||
"vSpace":"Vertikální mezera",
|
||||
"hSpace":"Horizontální mezera",
|
||||
"border":"Okraje"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","cy",{
|
||||
"alt":"Testun Amgen",
|
||||
"lockRatio":"Cloi Cymhareb",
|
||||
"vSpace":"BwlchF",
|
||||
"hSpace":"BwlchLl",
|
||||
"border":"Ymyl"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","da",{
|
||||
"alt":"Alternativ tekst",
|
||||
"lockRatio":"Lås størrelsesforhold",
|
||||
"vSpace":"Lodret margen",
|
||||
"hSpace":"Vandret margen",
|
||||
"border":"Ramme"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","de",{
|
||||
"alt":"Alternativer Text",
|
||||
"lockRatio":"Größenverhältnis beibehalten",
|
||||
"vSpace":"Vertikal-Abstand",
|
||||
"hSpace":"Horizontal-Abstand",
|
||||
"border":"Rahmen"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","el",{
|
||||
"alt":"Εναλλακτικό Κείμενο",
|
||||
"lockRatio":"Κλείδωμα Αναλογίας",
|
||||
"vSpace":"VSpace",
|
||||
"hSpace":"HSpace",
|
||||
"border":"Περίγραμμα"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","en-au",{
|
||||
"alt":"Alternative Text",
|
||||
"lockRatio":"Lock Ratio",
|
||||
"vSpace":"VSpace",
|
||||
"hSpace":"HSpace",
|
||||
"border":"Border"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","en-ca",{
|
||||
"alt":"Alternative Text",
|
||||
"lockRatio":"Lock Ratio",
|
||||
"vSpace":"VSpace",
|
||||
"hSpace":"HSpace",
|
||||
"border":"Border"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","en-gb",{
|
||||
"alt":"Alternative Text",
|
||||
"lockRatio":"Lock Ratio",
|
||||
"vSpace":"VSpace",
|
||||
"hSpace":"HSpace",
|
||||
"border":"Border"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","en",{
|
||||
"alt":"Alternative Text",
|
||||
"lockRatio":"Lock Ratio",
|
||||
"vSpace":"VSpace",
|
||||
"hSpace":"HSpace",
|
||||
"border":"Border"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","eo",{
|
||||
"alt":"Anstataŭiga Teksto",
|
||||
"lockRatio":"Konservi Proporcion",
|
||||
"vSpace":"Vertikala Spaco",
|
||||
"hSpace":"Horizontala Spaco",
|
||||
"border":"Bordero"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","es",{
|
||||
"alt":"Texto Alternativo",
|
||||
"lockRatio":"Proporcional",
|
||||
"vSpace":"Esp.Vert",
|
||||
"hSpace":"Esp.Horiz",
|
||||
"border":"Borde"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","et",{
|
||||
"alt":"Alternatiivne tekst",
|
||||
"lockRatio":"Lukusta kuvasuhe",
|
||||
"vSpace":"V. vaheruum",
|
||||
"hSpace":"H. vaheruum",
|
||||
"border":"Joon"
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Translation from original CKEDITOR language files:
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("base64image","eu",{
|
||||
"alt":"Ordezko Testua",
|
||||
"lockRatio":"Erlazioa Blokeatu",
|
||||
"vSpace":"VSpace",
|
||||
"hSpace":"HSpace",
|
||||
"border":"Ertza"
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user