forked from saurabh/orbit4-5
fixed insert image problem in text for widget
This commit is contained in:
parent
55483420cb
commit
b94f3ca2a1
|
@ -42,6 +42,14 @@ $(document).ready(function(){
|
||||||
language = t[t.length-1];
|
language = t[t.length-1];
|
||||||
|
|
||||||
language = (language == "tw" ? "zh_tw" : language);
|
language = (language == "tw" ? "zh_tw" : language);
|
||||||
|
language = decodeURIComponent(language);
|
||||||
|
if(language.endsWith("]")){
|
||||||
|
var re = ("\\[(.*)]"),
|
||||||
|
matches = language.match(re);
|
||||||
|
if(matches){
|
||||||
|
language = matches[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -69,6 +77,7 @@ var initAssets = function(){
|
||||||
deleteBtn.hide();
|
deleteBtn.hide();
|
||||||
})
|
})
|
||||||
insertBtn.bind(clickEvent,function(){
|
insertBtn.bind(clickEvent,function(){
|
||||||
|
console.log(language);
|
||||||
var alt_text = $("#"+language+"_desc_"+$("input[type=checkbox]:checked").val()).val();
|
var alt_text = $("#"+language+"_desc_"+$("input[type=checkbox]:checked").val()).val();
|
||||||
alt_text = (alt_text ? alt_text : "This is an image");
|
alt_text = (alt_text ? alt_text : "This is an image");
|
||||||
if(url){
|
if(url){
|
||||||
|
|
Loading…
Reference in New Issue