修复文本框链接问题
This commit is contained in:
@@ -1,80 +1,82 @@
|
||||
(function () {
|
||||
/* eslint-disable */
|
||||
if (window.frameElement.id) {
|
||||
let parent = window.parent,
|
||||
var parent = window.parent;
|
||||
//dialog对象
|
||||
dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )];
|
||||
//当前打开dialog的编辑器实例
|
||||
editor = dialog.editor;
|
||||
|
||||
dialog = parent.$EDITORUI[window.frameElement.id.replace(/_iframe$/, '')],
|
||||
UE = parent.UE;
|
||||
|
||||
editor = dialog.editor,
|
||||
domUtils = UE.dom.domUtils;
|
||||
|
||||
UE = parent.UE,
|
||||
utils = UE.utils;
|
||||
|
||||
domUtils = UE.dom.domUtils,
|
||||
browser = UE.browser;
|
||||
|
||||
utils = UE.utils,
|
||||
ajax = UE.ajax;
|
||||
|
||||
browser = UE.browser,
|
||||
/* eslint-disable */
|
||||
ajax = UE.ajax,
|
||||
$G = function ( id ) {
|
||||
return document.getElementById( id )
|
||||
};
|
||||
//focus元素
|
||||
$focus = function ( node ) {
|
||||
setTimeout( function () {
|
||||
if ( browser.ie ) {
|
||||
var r = node.createTextRange();
|
||||
r.collapse( false );
|
||||
r.select();
|
||||
} else {
|
||||
node.focus()
|
||||
}
|
||||
}, 0 )
|
||||
};
|
||||
window.nowEditor = {editor: editor, dialog: dialog};
|
||||
utils.loadFile(document,{
|
||||
href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(),
|
||||
tag:"link",
|
||||
type:"text/css",
|
||||
rel:"stylesheet"
|
||||
});
|
||||
lang = editor.getLang(dialog.className.split( "-" )[2]);
|
||||
if(lang){
|
||||
domUtils.on(window,'load',function () {
|
||||
|
||||
$G = function (id) {
|
||||
return document.getElementById(id)
|
||||
},
|
||||
$focus = function (node) {
|
||||
setTimeout(function () {
|
||||
if (browser.ie) {
|
||||
var r = node.createTextRange();
|
||||
r.collapse(false);
|
||||
r.select();
|
||||
} else {
|
||||
node.focus()
|
||||
}
|
||||
}, 0)
|
||||
};
|
||||
window.nowEditor = {editor: editor, dialog: dialog};
|
||||
utils.loadFile(document, {
|
||||
href: editor.options.themePath + editor.options.theme + '/dialogbase.css?cache=' + Math.random(),
|
||||
tag: 'link',
|
||||
type: 'text/css',
|
||||
rel: 'stylesheet'
|
||||
});
|
||||
var lang = editor.getLang(dialog.className.split('-')[2]);
|
||||
if (lang) {
|
||||
domUtils.on(window, 'load', function () {
|
||||
var langImgPath = editor.options.langPath + editor.options.lang + '/images/';
|
||||
// 针对静态资源
|
||||
for (var i in lang['static']) {
|
||||
var dom = $G(i);
|
||||
if (!dom) continue;
|
||||
let tagName = dom.tagName,
|
||||
content = lang['static'][i];
|
||||
if (content.src) {
|
||||
// clone
|
||||
content = utils.extend({}, content, false);
|
||||
content.src = langImgPath + content.src;
|
||||
}
|
||||
if (content.style) {
|
||||
content = utils.extend({}, content, false);
|
||||
content.style = content.style.replace(/url\s*\(/g, 'url(' + langImgPath)
|
||||
}
|
||||
switch (tagName.toLowerCase()) {
|
||||
case 'var':
|
||||
dom.parentNode.replaceChild(document.createTextNode(content), dom);
|
||||
break;
|
||||
case 'select':
|
||||
var ops = dom.options;
|
||||
for (var j = 0, oj; oj = ops[j];) {
|
||||
oj.innerHTML = content.options[j++];
|
||||
}
|
||||
for (var p in content) {
|
||||
p != 'options' && dom.setAttribute(p, content[p]);
|
||||
}
|
||||
break;
|
||||
default :
|
||||
domUtils.setAttributes(dom, content);
|
||||
}
|
||||
var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
|
||||
//针对静态资源
|
||||
for ( var i in lang["static"] ) {
|
||||
var dom = $G( i );
|
||||
if(!dom) continue;
|
||||
var tagName = dom.tagName,
|
||||
content = lang["static"][i];
|
||||
if(content.src){
|
||||
//clone
|
||||
content = utils.extend({},content,false);
|
||||
content.src = langImgPath + content.src;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(content.style){
|
||||
content = utils.extend({},content,false);
|
||||
content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath)
|
||||
}
|
||||
switch ( tagName.toLowerCase() ) {
|
||||
case "var":
|
||||
dom.parentNode.replaceChild( document.createTextNode( content ), dom );
|
||||
break;
|
||||
case "select":
|
||||
var ops = dom.options;
|
||||
for ( var j = 0, oj; oj = ops[j]; ) {
|
||||
oj.innerHTML = content.options[j++];
|
||||
}
|
||||
for ( var p in content ) {
|
||||
p != "options" && dom.setAttribute( p, content[p] );
|
||||
}
|
||||
break;
|
||||
default :
|
||||
domUtils.setAttributes( dom, content);
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
})();
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ var scrawl = function (options) {
|
||||
|
||||
if (img) {
|
||||
if (!scaleCon) {
|
||||
picBoard.style.cssText = "position:relative;z-index:1;"+picBoard.style.cssText;
|
||||
picBoard.style.cssText = "position:relative;z-index:999;"+picBoard.style.cssText;
|
||||
img.style.cssText = "position: absolute;top:" + (canvas.height - img.height) / 2 + "px;left:" + (canvas.width - img.width) / 2 + "px;";
|
||||
var scale = new ScaleBoy();
|
||||
picBoard.appendChild(scale.init());
|
||||
@@ -268,7 +268,7 @@ var scrawl = function (options) {
|
||||
picBoard.style.zIndex = "";
|
||||
} else {
|
||||
scaleCon.style.visibility = "visible";
|
||||
picBoard.style.cssText += "position:relative;z-index:1";
|
||||
picBoard.style.cssText += "position:relative;z-index:999";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user