mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
widget module
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9015 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8e20c6057e
commit
cc987e4fd6
7 changed files with 210 additions and 165 deletions
|
|
@ -49,9 +49,88 @@ function doShowSkinColorset()
|
|||
jQuery('select[name=colorset]').parents('li').show();
|
||||
}
|
||||
|
||||
var $current_filebox;
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
$('select[name=skin]').next('span').children().bind('click', function(e){
|
||||
$('select[name=skin]').next('input').bind('click', function(e){
|
||||
doDisplaySkinColorset();
|
||||
});
|
||||
doHideSkinColorset();
|
||||
|
||||
$('.filebox').bind('before-open.mw', function(){
|
||||
$('#filebox_upload').find('input[name=comment], input[name=addfile]').val('');
|
||||
});
|
||||
|
||||
$('.filebox').bind('filebox.selected', function(e, src){
|
||||
$(this)
|
||||
.siblings()
|
||||
.filter(function(){
|
||||
return this.nodeName.toLowerCase() != 'input';
|
||||
})
|
||||
.remove();
|
||||
|
||||
$(this).before('<img src="'+src+'" alt="" style="border: 1px solid #ccc; padding: 5px; max-height: 200px;"> <button class="filebox_del text" type="button">'+xe.lang.cmd_delete+'</button>');
|
||||
|
||||
$(this).siblings('input').val(src);
|
||||
|
||||
$('.filebox_del').bind('click', function(){
|
||||
$(this).siblings('input').val('');
|
||||
$(this).prev('img').remove();
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
|
||||
$('.filebox').click(function(){
|
||||
$current_filebox = $(this);
|
||||
});
|
||||
|
||||
$('#filebox_upload').find('input[type=submit]').click(function(){
|
||||
if ($('iframe[name=iframeTarget]').length < 1){
|
||||
var $iframe = $(document.createElement('iframe'));
|
||||
|
||||
$iframe.css('display', 'none');
|
||||
$iframe.attr('src', '#');
|
||||
$iframe.attr('name', 'iframeTarget');
|
||||
$iframe.load(function(){
|
||||
var data = eval('(' + $(window.iframeTarget.document.getElementsByTagName("body")[0]).html() + ')');
|
||||
|
||||
if (data.error){
|
||||
alert(data.message);
|
||||
return;
|
||||
}
|
||||
|
||||
$current_filebox.trigger('filebox.selected', [data.save_filename]);
|
||||
$current_filebox.trigger('close.mw');
|
||||
});
|
||||
|
||||
$('body').append($iframe.get(0));
|
||||
|
||||
$(this).parents('form').attr('target', 'iframeTarget');
|
||||
}
|
||||
});
|
||||
|
||||
$('#widget_code_form').bind('submit', function(){
|
||||
function on_complete(data){
|
||||
if (data.error){
|
||||
alert(data.message);
|
||||
return;
|
||||
}
|
||||
|
||||
$('#widget_code').val(data.widget_code);
|
||||
}
|
||||
|
||||
var datas = $(this).serializeArray();
|
||||
var params = new Object();
|
||||
for(var i in datas){
|
||||
var data = datas[i];
|
||||
|
||||
if(/\[\]$/.test(data.name)) data.name = data.name.replace(/\[\]$/, '');
|
||||
if(params[data.name]) params[data.name] += '|@|' + data.value;
|
||||
else params[data.name] = data.value;
|
||||
}
|
||||
|
||||
$.exec_json('widget.procWidgetGenerateCode', params, on_complete);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
(function($){
|
||||
|
||||
xe.ModuleListManager = xe.createApp("ModuleListManager", {
|
||||
values: null,
|
||||
keyObj: null,
|
||||
moduleNameObj: null,
|
||||
moduleSrlObj: null,
|
||||
selectedObj: null,
|
||||
$keyObj: null,
|
||||
$moduleNameObj: null,
|
||||
$moduleSrlObj: null,
|
||||
$selectedObj: null,
|
||||
|
||||
init: function(key, values){
|
||||
var values = this.values = values, self = this;
|
||||
var $keyObj = this.keyObj = $('input[name='+key+']');
|
||||
this.moduleNameObj = $keyObj.parent().find('.moduleList');
|
||||
this.moduleSrlObj = $keyObj.parent().find('.moduleIdList');
|
||||
this.selectedObj = $keyObj.parent().find('.modulelist_selected');
|
||||
|
||||
this.moduleSrlObj
|
||||
init: function(key){
|
||||
var self = this;
|
||||
var $keyObj = this.$keyObj = $('input[name='+key+']');
|
||||
this.$moduleNameObj = $keyObj.parent().find('.moduleList');
|
||||
this.$moduleSrlObj = $keyObj.parent().find('.moduleIdList');
|
||||
this.$selectedObj = $keyObj.parent().find('.modulelist_selected');
|
||||
|
||||
this.$moduleSrlObj
|
||||
.nextAll('button')
|
||||
.filter('.modulelist_add').bind('click', function(){ self.cast('MODULELIST_ADD'); return false; }).hide().end()
|
||||
.filter('.modulelist_del').bind('click', function(){ self.cast('MODULELIST_DEL'); return false; }).end()
|
||||
|
|
@ -27,37 +26,37 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {
|
|||
},
|
||||
|
||||
API_MODULELIST_ADD: function(){
|
||||
var moduleTitle = this.moduleNameObj.find('>option:selected').text();
|
||||
|
||||
this.moduleSrlObj
|
||||
var moduleTitle = this.$moduleNameObj.find('>option:selected').text();
|
||||
|
||||
this.$moduleSrlObj
|
||||
.find('>option:selected').clone(true)
|
||||
.text(function(){ return $(this).text() + ' ('+moduleTitle+')'; })
|
||||
.appendTo(this.selectedObj);
|
||||
.appendTo(this.$selectedObj);
|
||||
|
||||
this.removeDuplicated();
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MODULELIST_DEL: function(){
|
||||
this.selectedObj.find('>option:selected').remove();
|
||||
this.$selectedObj.find('>option:selected').remove();
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MODULELIST_UP: function(){
|
||||
var $selected = this.selectedObj.find('>option:selected');
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(0).prev('option').before($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MODULELIST_DOWN: function(){
|
||||
var $selected = this.selectedObj.find('>option:selected');
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(-1).next('option').after($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
removeDuplicated : function() {
|
||||
var selected = {};
|
||||
this.selectedObj.find('>option').each(function(){
|
||||
this.$selectedObj.find('>option').each(function(){
|
||||
if(selected[this.value]) $(this).remove();
|
||||
selected[this.value] = true;
|
||||
});
|
||||
|
|
@ -65,12 +64,12 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {
|
|||
|
||||
refreshValue : function() {
|
||||
var srls = [];
|
||||
|
||||
this.selectedObj.find('>option').each(function(){
|
||||
|
||||
this.$selectedObj.find('>option').each(function(){
|
||||
srls.push(this.value);
|
||||
});
|
||||
|
||||
this.keyObj.val(srls.join(','));
|
||||
|
||||
this.$keyObj.val(srls.join(','));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,117 +1,61 @@
|
|||
var MultiOrderManager = xe.createApp("MultiOrderManager", {
|
||||
options: null,
|
||||
values: null,
|
||||
keyObj: null,
|
||||
showObj: null,
|
||||
selectedObj: null,
|
||||
(function($){
|
||||
|
||||
init: function(key, options, values){
|
||||
var opstions = this.options = options;
|
||||
var values = this.values = values;
|
||||
var keyObj = this.keyObj = jQuery('input[name='+key+']');
|
||||
var showObj = this.showObj = keyObj.parent().find('.multiorder_show');
|
||||
var selectedObj = this.selectedObj = keyObj.parent().find('.multiorder_selected');
|
||||
xe.MultiOrderManager = xe.createApp("MultiOrderManager", {
|
||||
$keyObj: null,
|
||||
$showObj: null,
|
||||
$selectedObj: null,
|
||||
|
||||
for (var key in options){
|
||||
var option = options[key];
|
||||
var html = '<option value="'+key+'">'+option.value+'</option>';
|
||||
showObj.append(html);
|
||||
init: function(key){
|
||||
var self = this;
|
||||
var $keyObj = this.$keyObj = jQuery('input[name='+key+']');
|
||||
this.$showObj = $keyObj.parent().find('.multiorder_show');
|
||||
this.$selectedObj = $keyObj.parent().find('.multiorder_selected');
|
||||
|
||||
if (option.init){
|
||||
this.addValue(key);
|
||||
}
|
||||
}
|
||||
this.apply();
|
||||
|
||||
var thisObj = this;
|
||||
keyObj.parent().find('.multiorder_add').bind('click', function(){ thisObj.cast('MULTIORDER_ADD'); return false; });
|
||||
keyObj.parent().find('.multiorder_del').bind('click', function(){ thisObj.cast('MULTIORDER_DEL'); return false; });
|
||||
keyObj.parent().find('.multiorder_up').bind('click', function(){ thisObj.cast('MULTIORDER_UP'); return false; });
|
||||
keyObj.parent().find('.multiorder_down').bind('click', function(){ thisObj.cast('MULTIORDER_DOWN'); return false; });
|
||||
this.$showObj
|
||||
.nextAll('button')
|
||||
.filter('.multiorder_add').bind('click', function(){ self.cast('MULTIORDER_ADD'); return false; }).end()
|
||||
.filter('.multiorder_del').bind('click', function(){ self.cast('MULTIORDER_DEL'); return false; }).end()
|
||||
.filter('.multiorder_up').bind('click', function(){ self.cast('MULTIORDER_UP'); return false; }).end()
|
||||
.filter('.multiorder_down').bind('click', function(){ self.cast('MULTIORDER_DOWN'); return false; }).end()
|
||||
},
|
||||
|
||||
API_MULTIORDER_ADD: function(){
|
||||
var index = this.showObj.get(0).selectedIndex;
|
||||
if (index == -1) return;
|
||||
this.$showObj
|
||||
.find('>option:selected')
|
||||
.appendTo(this.$selectedObj);
|
||||
|
||||
if (this.addValue(index)) this.apply();
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_DEL: function(){
|
||||
var index = this.selectedObj.get(0).selectedIndex;
|
||||
if (index == -1) return;
|
||||
this.$selectedObj
|
||||
.find('>option:selected[default!="true"]')
|
||||
.appendTo(this.$showObj);
|
||||
|
||||
if (this.delValue(index)) this.apply();
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_UP: function(){
|
||||
var index = this.selectedObj.get(0).selectedIndex;
|
||||
if (index == -1) return;
|
||||
|
||||
if (this.up(index)) this.apply();
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(0).prev('option').before($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_DOWN: function(){
|
||||
var index = this.selectedObj.get(0).selectedIndex;
|
||||
if (index == -1) return;
|
||||
|
||||
if (this.down(index)) this.apply();
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(-1).next('option').after($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
addValue: function(index){
|
||||
var option = this.options[index];
|
||||
if (!option) return false;
|
||||
refreshValue : function() {
|
||||
var values = [];
|
||||
|
||||
if (this.values == undefined) this.values = new Array();
|
||||
for (var i in this.values){
|
||||
if (this.values[i].key == option.key) return false;
|
||||
}
|
||||
this.$selectedObj.find('>option').each(function(){
|
||||
values.push(this.value);
|
||||
});
|
||||
|
||||
this.values.push(option);
|
||||
return true;
|
||||
},
|
||||
|
||||
delValue: function(index){
|
||||
if (this.options[index].default) return false;
|
||||
|
||||
this.values.splice(index, 1);
|
||||
return true;
|
||||
},
|
||||
|
||||
up: function(index){
|
||||
if (index == 0) return false;
|
||||
|
||||
var targets = this.values.splice(index-1, 2);
|
||||
for(var i in targets){
|
||||
this.values.splice(index-1, 0, targets[i]);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
down: function(index){
|
||||
if (index == this.values.length-1) return false;
|
||||
|
||||
var targets = this.values.splice(index, 2);
|
||||
for(var i in targets){
|
||||
this.values.splice(index, 0, targets[i]);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
apply: function(){
|
||||
var keys = new Array();
|
||||
for (var i in this.values){
|
||||
keys.push(this.values[i].key);
|
||||
}
|
||||
this.keyObj.val(keys.join(','));
|
||||
|
||||
var prevValue = this.selectedObj.val();
|
||||
this.selectedObj.empty();
|
||||
for (var i in this.values){
|
||||
var option = this.values[i];
|
||||
var html = '<option value="'+option.key+'">'+option.value+'</option>';
|
||||
this.selectedObj.append(html);
|
||||
}
|
||||
this.selectedObj.val(prevValue);
|
||||
this.$keyObj.val(values.join(','));
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
@ -3,10 +3,22 @@
|
|||
<load target="js/multi_order.js" />
|
||||
<load target="js/module_list.js" />
|
||||
<!--%load_js_plugin("ui.colorpicker")-->
|
||||
|
||||
<script type="text/javascript">
|
||||
xe.lang.cmd_delete = '{$lang->cmd_delete}';
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
.filebox_item { border: 1px solid #ccc!important; padding: 5px; max-height: 200px; }
|
||||
</style>
|
||||
|
||||
<h2 class="h2">{$widget_info->title}</h2>
|
||||
<p>{$widget_info->description}</p>
|
||||
<form class="form" action="./" method="post">
|
||||
<form id="widget_code_form" class="form" action="./" method="post">
|
||||
<input type="hidden" name="module" value="widget" />
|
||||
<input type="hidden" name="act" value="procWidgetGenerateCode" />
|
||||
<input type="hidden" name="selected_widget" value="{$widget_info->widget}" />
|
||||
|
||||
<h3 class="h3">{$lang->cmd_generate_code}</h3>
|
||||
<p>{$lang->about_widget_code}</p>
|
||||
<ul>
|
||||
|
|
@ -56,58 +68,42 @@
|
|||
<option loop="$var->options => $key, $val" value="{$key}">{$val}</option>
|
||||
</select>
|
||||
<block cond="$var->type == 'select-multi-order'">
|
||||
<input type="hidden" name="{$id}" value="" />
|
||||
<select class="multiorder_show" size="8" multiple="multiple" style="width:290px;vertical-align:top"></select>
|
||||
{@$inits = array_keys($var->init_options)}
|
||||
<input type="hidden" name="{$id}" value="{implode(',', $inits)}" />
|
||||
<select class="multiorder_show" size="8" multiple="multiple" style="width:290px;vertical-align:top">
|
||||
<option loop="$var->options => $key, $val" cond="!$var->init_options[$key]" value="{$key}" default="true"|cond="$var->default_options[$key]">{$val}</option>
|
||||
</select>
|
||||
<button type="button" class="text multiorder_add" style="vertical-align:top">{$lang->cmd_insert}</button>
|
||||
<select class="multiorder_selected" size="8" multiple="multiple" style="width:290px;vertical-align:top"></select>
|
||||
<select class="multiorder_selected" size="8" multiple="multiple" style="width:290px;vertical-align:top">
|
||||
<option loop="$var->options => $key, $val" cond="$var->init_options[$key]" value="{$key}" default="true"|cond="$var->default_options[$key]">{$val}</option>
|
||||
</select>
|
||||
<button type="button" class="text multiorder_up" style="vertical-align:top">{$lang->cmd_move_up}</button>
|
||||
<button type="button" class="text multiorder_down" style="vertical-align:top">{$lang->cmd_move_down}</button>
|
||||
<button type="button" class="text multiorder_del" style="vertical-align:top">{$lang->cmd_delete}</button>
|
||||
<script type="text/javascript">
|
||||
var options = [
|
||||
<block loop="$var->options => $key, $val">
|
||||
{
|
||||
<block cond="$var->init_options[$key]">
|
||||
'init': true,
|
||||
</block>
|
||||
<block cond="!$var->init_options[$key]">
|
||||
'init': false,
|
||||
</block>
|
||||
<block cond="$var->default_options[$key]">
|
||||
'default': true,
|
||||
</block>
|
||||
<block cond="!$var->default_options[$key]">
|
||||
'default': false,
|
||||
</block>
|
||||
'key': '{$key}',
|
||||
'value': '{$val}'
|
||||
},
|
||||
</block>
|
||||
];
|
||||
new MultiOrderManager('{$id}', options);
|
||||
xe.registerApp(new xe.MultiOrderManager('{$id}'));
|
||||
</script>
|
||||
</block>
|
||||
<block cond="$var->type == 'mid_list'">
|
||||
{@debugPrint($mid_list)}
|
||||
<fieldset loop="$mid_list => $module_category_srl, $modules" style="border: 1px solid #ccc; margin:1em 0; padding:.5em 1em">
|
||||
<legend cond="$modules->title">{$modules->title}</legend>
|
||||
<legend cond="!$modules->title">{$lang->none_category}</legend>
|
||||
<div loop="$modules->list => $key, $val">
|
||||
<input type="checkbox" value="{$key}" name="{$id}" id="chk_mid_list_{$key}" />
|
||||
<input type="checkbox" value="{$key}" name="{$id}[]" id="chk_mid_list_{$key}" />
|
||||
<label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</block>
|
||||
<block cond="$var->type == 'member_group'">
|
||||
<block loop="$group_list => $key, $val">
|
||||
<input type="checkbox" value="{$key}" name="{$id}" id="chk_member_gruop_{$id}_{$key}" />
|
||||
<input type="checkbox" value="{$key}" name="{$id}[]" id="chk_member_gruop_{$id}_{$key}" />
|
||||
<label for="chk_member_gruop_{$id}_{$key}">{$val->title}</label>
|
||||
</block>
|
||||
</block>
|
||||
<block cond="$var->type == 'module_srl_list'">
|
||||
<input type="hidden" name="{$id}" value="" />
|
||||
<div class="a">
|
||||
<input type="text" /> <a href="#suggestion_{$suggestion_id}" class="tgAnchor findsite">사이트찾기</a>
|
||||
<input type="text" /> <a href="#suggestion_{$suggestion_id}" class="tgAnchor findsite">{$lang->find_site}</a>
|
||||
<div id="suggestion_{$suggestion_id}" class="tgContent suggestion">
|
||||
<ul>
|
||||
</ul>
|
||||
|
|
@ -123,12 +119,12 @@
|
|||
<button type="button" class="text modulelist_down" style="vertical-align:top">{$lang->cmd_move_down}</button>
|
||||
<button type="button" class="text modulelist_del" style="vertical-align:top">{$lang->cmd_delete}</button>
|
||||
<script type="text/javascript">
|
||||
xe.registerApp(new xe.ModuleListManager('{$id}'));
|
||||
xe.registerApp(new xe.ModuleListManager('{$id}'));
|
||||
</script>
|
||||
</block>
|
||||
<block cond="$var->type == 'mid'">
|
||||
<div class="a">
|
||||
<input type="text" /> <a href="#suggestion_{$suggestion_id}" class="tgAnchor findsite">사이트찾기</a>
|
||||
<input type="text" /> <a href="#suggestion_{$suggestion_id}" class="tgAnchor findsite">{$lang->find_site}</a>
|
||||
<div id="suggestion_{$suggestion_id}" class="tgContent suggestion">
|
||||
<ul>
|
||||
</ul>
|
||||
|
|
@ -138,15 +134,10 @@
|
|||
<p class="a"><select name="{$id}" class="moduleIdList" style="width:290px;"></select></p>
|
||||
</block>
|
||||
<block cond="$var->type == 'filebox'">
|
||||
<div id="filebox_preview_{$id}" style="width:100px;height:100px;display:none" ></div>
|
||||
<input type="hidden" name="{$id}" value="" />
|
||||
<span class="button black"><button type="button" onclick="XE.filebox.open(jQuery('[name={$id}]', '#fo_widget').get(0), '{$var->filter}')">{$lang->cmd_select}</button></span>
|
||||
<span id="filebox_cancel_{$id}" class="button red" style="display:none" ><button type="button" onclick="XE.filebox.cancel('{$id}')">{$lang->cmd_delete}</button></span>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XE.filebox.init('{$id}');
|
||||
//]]></script>
|
||||
<input type="hidden" name="{$id}" />
|
||||
<a class="modalAnchor filebox" href="#modalFilebox">{$lang->cmd_select}</a>
|
||||
</block>
|
||||
<select cond="$var->type == 'menu'" style="width:290px">
|
||||
<select cond="$var->type == 'menu'" name="{$id}" style="width:290px">
|
||||
<option value="">-</option>
|
||||
<option loop="$menu_list => $key, $val" value="{$val->menu_srl}">{$val->title}</option>
|
||||
</select>
|
||||
|
|
@ -155,4 +146,36 @@
|
|||
</li>
|
||||
</block>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn small"><input type="submit" value="{$lang->cmd_generate_code}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h3 class="h3">{$lang->widget_code}</h3>
|
||||
<p><textarea id="widget_code" style="width: 100%; height: 50px;" readonly="readonly"></textarea>
|
||||
|
||||
<div class="modal" id="modalFilebox">
|
||||
<div class="fg portlet">
|
||||
<h2 class="h2">FileBox</h2>
|
||||
<div class="filebox_list"></div>
|
||||
<h2 class="h2">Upload</h2>
|
||||
<form id="filebox_upload" class="form" action="./" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="module" />
|
||||
<input type="hidden" name="act" value="procModuleFileBoxAdd" />
|
||||
<input type="hidden" name="ajax" value="true" />
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q"><label for="comment">{$lang->description}</label></p>
|
||||
<p class="a"><input type="text" name="comment" id="comment" value="" /></p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="addfile">{$lang->file}</label></p>
|
||||
<p class="a"><input type="file" name="addfile" id="addfile" /></p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn small"><input type="submit" value="{$lang->cmd_submit}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
function init() {
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Showing a list of widgets
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -534,8 +534,8 @@
|
|||
$widget_content_header = sprintf('<div class="widgetOutput" widgetstyle="%s" style="%s" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s" widget="%s" %s >'.
|
||||
'<div class="widgetResize"></div>'.
|
||||
'<div class="widgetResizeLeft"></div>'.
|
||||
'<div class="widgetBorder">',$args->widgetstyle,$style,
|
||||
$widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left,
|
||||
'<div class="widgetBorder">',$args->widgetstyle,$style,
|
||||
$widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left,
|
||||
$widget, implode(' ',$attribute));
|
||||
|
||||
$widget_content_body = sprintf('<div style="%s">%s</div><div class="clear"></div>',$inner_style, $widget_content);
|
||||
|
|
@ -568,7 +568,7 @@
|
|||
if(!file_exists($class_file)) return sprintf(Context::getLang('msg_widget_is_not_exists'), $widget);
|
||||
// Widget classes include
|
||||
require_once($class_file);
|
||||
|
||||
|
||||
// Creating Objects
|
||||
$tmp_fn = create_function('', "return new {$widget}();");
|
||||
$oWidget = $tmp_fn();
|
||||
|
|
|
|||
|
|
@ -71,8 +71,9 @@
|
|||
// Get a mid list
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args->site_srl = $site_module_info->site_srl;
|
||||
$columnList = array('module_srl', 'module_category_srl', 'browser_title');
|
||||
$columnList = array('module_srl', 'module_category_srl', 'browser_title', 'mid');
|
||||
$mid_list = $oModuleModel->getMidList($args, $columnList);
|
||||
|
||||
// Get a list of groups
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups($site_module_info->site_srl);
|
||||
|
|
@ -97,7 +98,6 @@
|
|||
$this->setLayoutFile('popup_layout');
|
||||
// Set a template file
|
||||
$this->setTemplateFile('widget_generate_code');
|
||||
debugPrint($widget_info);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue