mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 15:19:57 +09:00
issue 2242, added multilingual on widget style, fixed a bug that does not load css after add widget
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11057 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c1c0a39c72
commit
2e8412c322
4 changed files with 48 additions and 18 deletions
|
|
@ -361,11 +361,11 @@ function doAddWidgetCode(widget_code) {
|
|||
|
||||
// css 추가
|
||||
var tmp = widget_code;
|
||||
while(tmp.indexOf("<!--Meta:")>-1) {
|
||||
var pos = tmp.indexOf("<!--Meta:");
|
||||
while(tmp.indexOf("<!--#Meta:")>-1) {
|
||||
var pos = tmp.indexOf("<!--#Meta:");
|
||||
tmp = tmp.substr(pos);
|
||||
var eos = tmp.indexOf("-->");
|
||||
var cssfile = tmp.substr(9,eos-9);
|
||||
var cssfile = tmp.substr(10,eos-10);
|
||||
if(cssfile.indexOf('.js')>-1) {
|
||||
tmp = tmp.substr(eos);
|
||||
continue;
|
||||
|
|
@ -373,7 +373,7 @@ function doAddWidgetCode(widget_code) {
|
|||
if(!cssfile) break;
|
||||
tmp = tmp.substr(eos);
|
||||
|
||||
var cssfile = request_uri+'/'+cssfile;
|
||||
var cssfile = request_uri+cssfile;
|
||||
if(typeof(document.createStyleSheet)=='undefined') {
|
||||
var css ='<link rel="stylesheet" href="'+cssfile+'" />';
|
||||
var dummy = xCreateElement("DIV");
|
||||
|
|
@ -400,7 +400,10 @@ function doAddWidgetCode(widget_code) {
|
|||
script = script.replace(/^<script([^>]*)>/i,'').replace(/<\/script>$/i,'');
|
||||
|
||||
writedText = null;
|
||||
eval(script);
|
||||
try{
|
||||
eval(script);
|
||||
}catch(e){}
|
||||
|
||||
widget_code = widget_code.substr(0,pos)+writedText+widget_code.substr(pos+length);
|
||||
tmp = widget_code.toLowerCase();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@
|
|||
|
||||
<include target="widget_generate_code.filebox.html" />
|
||||
<include target="widget_generate_code.multilang.html" />
|
||||
<include target="widget_generate_code.multilang.textarea.html" />
|
||||
<include target="widget_generate_code.multilang.textarea.html" />
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<load target="../../admin/tpl/js/admin.js" usecdn="true" />
|
||||
<load target="../../admin/tpl/css/admin.css" usecdn="true" />
|
||||
<load cond="$lang_type='ko'" target="../../admin/tpl/css/admin_ko.css" usecdn="true" />
|
||||
<load cond="$lang_type='en'" target="../../admin/tpl/css/admin_en.css" usecdn="true" />
|
||||
<load cond="$lang_type=='ko'" target="../../admin/tpl/css/admin_ko.css" usecdn="true" />
|
||||
<load cond="$lang_type=='en'" target="../../admin/tpl/css/admin_en.css" usecdn="true" />
|
||||
<load target="css/widget.css" usecdn="true" />
|
||||
<load target="js/generate_code.js" usecdn="true" />
|
||||
<load target="js/multi_lang.js" usecdn="true" />
|
||||
<!--%load_js_plugin("ui.colorpicker")-->
|
||||
|
||||
<script>
|
||||
|
|
@ -63,13 +64,29 @@
|
|||
</block>
|
||||
{@$not_first = true}
|
||||
<li>
|
||||
<p class="q">{$var->name}</p>
|
||||
<p class="a">
|
||||
<input cond="$var->type == 'text'" type="text" name="{$id}" />
|
||||
<p class="q"><label for="{$id}">{$var->name}</label></p>
|
||||
<div class="a extra_vars">
|
||||
<div cond="$var->type == 'text'" class="multiLangEdit">
|
||||
{@$use_multilang = TRUE}
|
||||
<input type="hidden" name="{$id}" value="" class="vLang" />
|
||||
<input type="text" id="{$id}" class="vLang" />
|
||||
<span class="desc"><a href="#langEdit" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
|
||||
<script>
|
||||
xe.registerApp(new xe.MultiLangManager('{$id}'));
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<input cond="$var->type == 'color'" type="text" name="{$id}" class="color-indicator" />
|
||||
|
||||
<textarea cond="$var->type == 'textarea'" name="{$id}" rows="8" cols="42"></textarea>
|
||||
<div cond="$var->type == 'textarea'" class="multiLangEdit">
|
||||
{@$use_multilang_textarea = TRUE}
|
||||
<input type="hidden" name="{$id}" value="" class="vLang" />
|
||||
<textarea id="{$id}" rows="8" cols="42"></textarea>
|
||||
<span class="desc"><a href="#langEditTextarea" class="editUserLang tgAnchor">{$lang->cmd_set_multilingaul}</a></span>
|
||||
<script>
|
||||
xe.registerApp(new xe.MultiLangManager('{$id}'));
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<select cond="$var->type == 'select'" name="{$id}">
|
||||
<option loop="$var->options => $key, $val" value="{$key}">{$val}</option>
|
||||
|
|
@ -80,7 +97,7 @@
|
|||
<a href="#modalFilebox" class="modalAnchor filebox">{$lang->cmd_select}</a>
|
||||
{@$use_filebox = TRUE}
|
||||
</block>
|
||||
</p>
|
||||
</div>
|
||||
<p class="desc">{$var->description}</p>
|
||||
</li>
|
||||
</block>
|
||||
|
|
@ -91,6 +108,11 @@
|
|||
<span class="btn small"><input type="submit" value="{$lang->cmd_setup}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
xe.current_lang = "{$lang_type}";
|
||||
</script>
|
||||
<include target="widget_generate_code.filebox.html" />
|
||||
<include target="widget_generate_code.multilang.html" />
|
||||
<include target="widget_generate_code.multilang.textarea.html" />
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue