mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
issue 207, added common libs
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9720 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
40782981e8
commit
9dcbf6a9c6
9 changed files with 345 additions and 14 deletions
|
|
@ -351,13 +351,17 @@
|
|||
|
||||
$this->setMessage('success_registed');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
global $lang;
|
||||
htmlHeader();
|
||||
alertScript($lang->success_registed);
|
||||
closePopupScript();
|
||||
htmlFooter();
|
||||
Context::close();
|
||||
exit;
|
||||
if (Context::get('success_return_url')) {
|
||||
$this->setRedirectUrl(Context::get('success_return_url'));
|
||||
}else{
|
||||
global $lang;
|
||||
htmlHeader();
|
||||
alertScript($lang->success_registed);
|
||||
closePopupScript();
|
||||
htmlFooter();
|
||||
Context::close();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -424,13 +428,17 @@
|
|||
}
|
||||
$this->setMessage('success_registed');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
global $lang;
|
||||
htmlHeader();
|
||||
alertScript($lang->success_registed);
|
||||
closePopupScript();
|
||||
htmlFooter();
|
||||
Context::close();
|
||||
exit;
|
||||
if (Context::get('success_return_url')) {
|
||||
$this->setRedirectUrl(Context::get('success_return_url'));
|
||||
}else{
|
||||
global $lang;
|
||||
htmlHeader();
|
||||
alertScript($lang->success_registed);
|
||||
closePopupScript();
|
||||
htmlFooter();
|
||||
Context::close();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
33
modules/module/tpl/include.manage_selected.html
Normal file
33
modules/module/tpl/include.manage_selected.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<load target="js/manage_selected_module.js" usecdn="true" />
|
||||
|
||||
<div id="manageSelectedModule" class="modal">
|
||||
<div class="fg">
|
||||
<h2 class="h2">{$lang->do_selected}</h2>
|
||||
|
||||
<div class="table even">
|
||||
<table width="100%" cellspacing="0" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->mid}</th>
|
||||
<th scope="col">{$lang->browser_title}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="manageSelectedModuleBody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="cnb">
|
||||
<a href="#manageSelectedModuleSetup" class="tgAnchor">{$lang->bundle_setup}</a>
|
||||
|
|
||||
<a href="#manageSelectedModuleAddition" class="tgAnchor">{$lang->bundle_addition_setup}</a>
|
||||
|
|
||||
<a href="#manageSelectedModuleGrant" class="tgAnchor">{$lang->bundle_grant_setup}</a>
|
||||
</div>
|
||||
|
||||
<include target="include.module_setup.html" />
|
||||
<include target="include.module_addition_setup.html" />
|
||||
<include target="include.module_grant_setup.html" />
|
||||
<include target="include.multilang.textarea.html" />
|
||||
</div>
|
||||
</div>
|
||||
3
modules/module/tpl/include.module_addition_setup.html
Normal file
3
modules/module/tpl/include.module_addition_setup.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div id="manageSelectedModuleAddition" class="tgContent">
|
||||
{$setup_content}
|
||||
</div>
|
||||
49
modules/module/tpl/include.module_grant_setup.html
Normal file
49
modules/module/tpl/include.module_grant_setup.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<load target="js/module_admin.js" usecdn="true" />
|
||||
<script type="text/javascript">
|
||||
jQuery( function() { jQuery('.grant_default').change( function(event) { doShowGrantZone(); } ); doShowGrantZone() } );
|
||||
</script>
|
||||
|
||||
<form ruleset="insertModulesGrant" action="./" method="post" id="manageSelectedModuleGrant">
|
||||
<input type="hidden" name="module" value="module" />
|
||||
<input type="hidden" name="act" value="procModuleAdminModuleGrantSetup" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="module_srls" value="{$module_srls}" />
|
||||
<h3 class="h3">{$lang->permission_setting}</h3>
|
||||
<p>{$lang->about_grant_deatil}</p>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->grant}</th>
|
||||
<th scope="col" colspan="3">{$lang->target}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<!--@foreach($grant_list as $grant_name => $grant_item)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<th scope="row">{$grant_item->title}</th>
|
||||
<td >
|
||||
<select name="{$grant_name}_default" class="grant_default">
|
||||
<!--@if($grant_item->default == 'guest')--><option value="0">{$lang->grant_to_all}</option><!--@end-->
|
||||
<!--@if($grant_item->default != 'manager')--><option value="-1">{$lang->grant_to_login_user}</option><!--@end-->
|
||||
<!--@if($grant_item->default != 'manager')--><option value="-2" <!--@if($default_grant[$grant_name]=='site')-->selected="selected"<!--@end-->>{$lang->grant_to_site_user}</option><!--@end-->
|
||||
<option value="">{$lang->grant_to_group}</option>
|
||||
</select>
|
||||
<div id="zone_{$grant_name}" style="display:none">
|
||||
<!--@foreach($group_list as $group_srl => $group_item)-->
|
||||
<input type="checkbox" class="checkbox" name="{$grant_name}" value="{$group_item->group_srl}" id="grant_{$grant_name}_{$group_srl}" />
|
||||
<label for="grant_{$grant_name}_{$group_srl}">{$group_item->title}</label>
|
||||
<!--@end-->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
76
modules/module/tpl/include.module_setup.html
Normal file
76
modules/module/tpl/include.module_setup.html
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<div id="manageSelectedModuleSetup">
|
||||
<h3 class="h3">{$lang->bundle_setup}</h3>
|
||||
<form ruleset="insertModuleSetup" action="./" method="post" class="form tgContent">
|
||||
<input type="hidden" name="module" value="module" />
|
||||
<input type="hidden" name="act" value="procModuleAdminModuleSetup" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="module_srls" value="" />
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q"><label for="module_category_srl">{$lang->module_category}</label></p>
|
||||
<p class="a">
|
||||
<select name="module_category_srl" id="module_category_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<!--@foreach($module_category as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($module_info->module_category_srl==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</p>
|
||||
<p class="desc">{$lang->about_module_category}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="layout_srl">{$lang->layout}</label></p>
|
||||
<p class="a">
|
||||
<select name="layout_srl" id="layout_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<!--@foreach($layout_list as $key => $val)-->
|
||||
<option value="{$val->layout_srl}" <!--@if($module_info->layout_srl==$val->layout_srl)-->selected="selected"<!--@end-->>{$val->title} ({$val->layout})</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</p>
|
||||
<p class="desc">{$lang->about_layout}</p>
|
||||
</li>
|
||||
<li cond="count($skin_list)">
|
||||
<p class="q"><label for="skin">{$lang->skin}</label></p>
|
||||
<p class="a">
|
||||
<select name="skin" id="skin">
|
||||
<!--@foreach($skin_list as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($module_info->skin==$key ||(!$module_info->skin && $key=='xe_board'))-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</p>
|
||||
<p class="desc">{$lang->about_skin}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="description">{$lang->description}</label></p>
|
||||
<p class="a">
|
||||
<textarea name="description" id="description" rows="4" cols="45">{htmlspecialchars($module_info->description)}</textarea>
|
||||
</p>
|
||||
<p class="desc">{$lang->about_description}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="header_text">{$lang->header_text}</label></p>
|
||||
<p class="a multiLangEdit">
|
||||
{@$use_multilang_textarea=true}
|
||||
<input type="hidden" name="header_text" class="vLang" />
|
||||
<textarea id="header_text" rows="4" cols="45" class="vLang"></textarea>
|
||||
<span class="desc"><a href="#langEditTextarea" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
|
||||
</p>
|
||||
<p class="desc">{$lang->about_header_text}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="footer_text">{$lang->footer_text}</label></p>
|
||||
<p class="a multiLangEdit">
|
||||
<input type="hidden" name="footer_text" class="vLang" />
|
||||
<textarea id="footer_text" rows="4" cols="45" class="vLang"></textarea>
|
||||
<span class="desc"><a href="#langEditTextarea" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
|
||||
</p>
|
||||
<p class="desc">{$lang->about_footer_text}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
23
modules/module/tpl/include.multilang.html
Normal file
23
modules/module/tpl/include.multilang.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<block cond="$use_multilang">
|
||||
<div id="langEdit" class="langEdit tgContent">
|
||||
<ul class="langList"></ul>
|
||||
<div class="langInput form">
|
||||
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
|
||||
<ul>
|
||||
{@
|
||||
/* move current language to the top */
|
||||
$a = array($lang_type=>$lang_supported[$lang_type]);
|
||||
unset($lang_supported[$lang_type]);
|
||||
$lang_supported = array_merge($a, $lang_supported);
|
||||
}
|
||||
<li loop="$lang_supported=>$code,$name" class="{$code}"><label for="{$code}_var1">{$name}</label> <input type="text" value="" id="{$code}_var1" /></li>
|
||||
</ul>
|
||||
<div class="action">
|
||||
<div class="btnArea">
|
||||
<span class="btn small"><input type="submit" value="{$lang->use}|{$lang->use_after_save}" /></span>
|
||||
</div>
|
||||
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">{$lang->multilingual_manager}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
27
modules/module/tpl/include.multilang.textarea.html
Normal file
27
modules/module/tpl/include.multilang.textarea.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<block cond="$use_multilang_textarea">
|
||||
<style type="text/css">
|
||||
#langEditTextarea textarea { width: 258px; }
|
||||
</style>
|
||||
|
||||
<div id="langEditTextarea" class="langEdit tgContent">
|
||||
<ul class="langList"></ul>
|
||||
<div class="langInput form">
|
||||
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
|
||||
<ul>
|
||||
{@
|
||||
/* move current language to the top */
|
||||
$a = array($lang_type=>$lang_supported[$lang_type]);
|
||||
unset($lang_supported[$lang_type]);
|
||||
$lang_supported = array_merge($a, $lang_supported);
|
||||
}
|
||||
<li loop="$lang_supported=>$code,$name" class="{$code}"><label for="{$code}_var1">{$name}</label> <textarea id="{$code}_var1"></textarea></li>
|
||||
</ul>
|
||||
<div class="action">
|
||||
<div class="btnArea">
|
||||
<span class="btn small"><input type="submit" value="{$lang->use}|{$lang->use_after_save}" /></span>
|
||||
</div>
|
||||
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">{$lang->multilingual_manager}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
37
modules/module/tpl/js/manage_selected_module.js
Normal file
37
modules/module/tpl/js/manage_selected_module.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// manage selected module
|
||||
jQuery(function($){
|
||||
|
||||
$('#manageSelectedModule .cnb a.tgAnchor')
|
||||
.bind('before-open.tc', function(){
|
||||
var self = this;
|
||||
$('#manageSelectedModule a.tgAnchor')
|
||||
.filter(function(){
|
||||
if (this == self) return false;
|
||||
return true;
|
||||
})
|
||||
.trigger('close.tc');
|
||||
});
|
||||
|
||||
$('a.modalAnchor[href=#manageSelectedModule]')
|
||||
.bind('before-open.mw', function(){
|
||||
var $selectedModule = $('input[type=checkbox].selectedModule:checked');
|
||||
var $selectedBody = $('#manageSelectedModuleBody');
|
||||
|
||||
if (!$selectedModule.length) return false;
|
||||
|
||||
$selectedBody.empty();
|
||||
|
||||
var module_srls = new Array();
|
||||
$selectedModule.each(function(){
|
||||
var $this = $(this);
|
||||
var row = '<tr><td>' + $this.data('mid') + '</td><td>' + $this.data('browser_title') + '</td></tr>';
|
||||
$selectedBody.append(row);
|
||||
module_srls.push($this.val());
|
||||
});
|
||||
|
||||
$('#manageSelectedModuleSetup input[name=module_srls]').val(module_srls);
|
||||
$('#manageSelectedModuleAddition input[name=target_module_srl]').val(module_srls);
|
||||
$('#manageSelectedModuleGrant input[name=module_srls]').val(module_srls);
|
||||
});
|
||||
|
||||
});
|
||||
75
modules/module/tpl/js/multi_order.js
Normal file
75
modules/module/tpl/js/multi_order.js
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
(function($){
|
||||
|
||||
xe.MultiOrderManager = xe.createApp("MultiOrderManager", {
|
||||
$keyObj: null,
|
||||
$showObj: null,
|
||||
$selectedObj: null,
|
||||
|
||||
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');
|
||||
|
||||
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()
|
||||
|
||||
this.cast('MULTIORDER_SYNC');
|
||||
},
|
||||
|
||||
API_MULTIORDER_ADD: function(){
|
||||
this.$showObj
|
||||
.find('>option:selected')
|
||||
.appendTo(this.$selectedObj);
|
||||
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_DEL: function(){
|
||||
this.$selectedObj
|
||||
.find('>option:selected[default!="true"]')
|
||||
.appendTo(this.$showObj);
|
||||
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_UP: function(){
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(0).prev('option').before($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_DOWN: function(){
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(-1).next('option').after($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_SYNC: function(){
|
||||
var values = this.$keyObj.val().split(',');
|
||||
this.$selectedObj.find('>option').appendTo(this.$showObj);
|
||||
|
||||
var targets = [];
|
||||
for(var i in values){
|
||||
var target = this.$showObj.find('>option[value='+values[i]+']').get(0);
|
||||
if (target != undefined) targets.push(target);
|
||||
}
|
||||
$(targets).appendTo(this.$selectedObj);
|
||||
},
|
||||
|
||||
refreshValue : function() {
|
||||
var values = [];
|
||||
|
||||
this.$selectedObj.find('>option').each(function(){
|
||||
values.push(this.value);
|
||||
});
|
||||
|
||||
this.$keyObj.val(values.join(','));
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue