mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
issue 70 admin UI/UX developemnt in data import module
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8799 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e46231ae96
commit
5d415ec3c3
8 changed files with 147 additions and 17 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<grants />
|
||||
<permissions />
|
||||
<actions>
|
||||
<action name="dispImporterAdminContent" type="view" standalone="true" admin_index="true" menu_name="importer" menu_index="true" />
|
||||
<action name="dispImporterAdminImportForm" type="view" standalone="true" admin_index="true" menu_name="importer" menu_index="true" />
|
||||
|
||||
<action name="procImporterAdminImport" type="controller" standalone="true" />
|
||||
<action name="procImporterAdminPreProcessing" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -53,6 +53,16 @@
|
|||
|
||||
$this->setTemplateFile($template_filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display a form to upload the xml file
|
||||
**/
|
||||
function dispImporterAdminImportForm() {
|
||||
$oDocumentModel = &getModel('document'); //for document lang use in this page
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<include target="./header.html" />
|
||||
<form action="./" class="form" method="get" onsubmit="return doPreProcessing(this)" id="fo_import">
|
||||
<load target="js/importer_admin.js" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="./" class="form" method="get" onsubmit="return doPreProcessing(this)" id="moduleImportForm">
|
||||
<input type="hidden" name="type" value="module" />
|
||||
<input type="hidden" name="target_module" value="" id="target_module" />
|
||||
<h2 class="h2">{$lang->type_module}</h2>
|
||||
|
|
@ -13,18 +18,20 @@
|
|||
<li>
|
||||
<p class="q">{$lang->data_destination}</p>
|
||||
<div class="a">
|
||||
<input type="text" /> <a href="#suggestion1" class="tgAnchor">{$lang->find_site}</a>
|
||||
<input type="text" name="site_keyword" /> <a href="#suggestion1" class="tgAnchor findsite">{$lang->find_site}</a>
|
||||
<div id="suggestion1" class="tgContent suggestion">
|
||||
<ul>
|
||||
<li><button type="button">#</button></li>
|
||||
<li><button type="button">#</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="a">
|
||||
<select class="moduleList" style="width:290px">
|
||||
<option>{$lang->select_module}</option>
|
||||
</select>
|
||||
</p>
|
||||
<p class="a">
|
||||
<select style="width:290px">
|
||||
<option>{$lang->select_module_id}</option>
|
||||
<option>#</option>
|
||||
</select>
|
||||
</p>
|
||||
</li>
|
||||
|
|
@ -72,36 +79,30 @@
|
|||
<li>
|
||||
<p class="q">{$lang->document_destination}</p>
|
||||
<div class="a">
|
||||
<input type="text" /> <a href="#suggestion2" class="tgAnchor">{$lang->find_site}</a>
|
||||
<input type="text" name="site_keyword" /> <a href="#suggestion2" class="tgAnchor findsite">{$lang->find_site}</a>
|
||||
<div id="suggestion2" class="tgContent suggestion">
|
||||
<ul>
|
||||
<li><button type="button">#</button></li>
|
||||
<li><button type="button">#</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="a">
|
||||
<select name="_target_module" style="width:290px">
|
||||
<option>{$lang->select_module_id}</option>
|
||||
<option>#</option>
|
||||
</select>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->guestbook_destination}</p>
|
||||
<div class="a">
|
||||
<input type="text" /> <a href="#suggestion3" class="tgAnchor">{$lang->find_site}</a>
|
||||
<input type="text" name="site_keyword" /> <a href="#suggestion3" class="tgAnchor findsite">{$lang->find_site}</a>
|
||||
<div id="suggestion3" class="tgContent suggestion">
|
||||
<ul>
|
||||
<li><button type="button">#</button></li>
|
||||
<li><button type="button">#</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="a">
|
||||
<select name="_guestbook_target_module" style="width:290px">
|
||||
<option>{$lang->select_module_id}</option>
|
||||
<option>#</option>
|
||||
</select>
|
||||
</p>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -171,3 +171,92 @@ function insertSelectedModule(id, module_srl, mid, browser_title) {
|
|||
get_by_id(id).value = module_srl;
|
||||
get_by_id('_'+id).value = browser_title + ' ('+mid+')';
|
||||
}
|
||||
|
||||
var currentClickedObject = null;
|
||||
var currentClickedSiteObject = null;
|
||||
jQuery(function($){
|
||||
|
||||
$('a.findsite')
|
||||
.bind('before-open.tc', function(){
|
||||
var $this = $(this), $layer = $($this.attr('href')), $ul = $layer.find('>ul'), $button;
|
||||
currentClickedObject = $this;
|
||||
var searchKeyword = $this.prev('input[name=site_keyword]').val();
|
||||
var params = new Array();
|
||||
var response_tags = ['error', 'message', 'site_list'];
|
||||
params['domain'] = searchKeyword;
|
||||
exec_xml('site','getSiteAllList',params, completeGetSiteAllList, response_tags);
|
||||
});
|
||||
|
||||
$('div.suggestion')
|
||||
.delegate('button', 'click', function(){
|
||||
var $this = $(this), site_srl = $this.data('site_srl');
|
||||
currentClickedSiteObject = $this;
|
||||
|
||||
// TODO : 모듈 목록을 찾아서 셀렉트 박스에 할당
|
||||
var params = new Array();
|
||||
var response_tags = ['error', 'message', 'module_list'];
|
||||
params['site_srl'] = site_srl;
|
||||
|
||||
exec_xml('module','procModuleAdminGetList',params, completeGetModuleList, response_tags);
|
||||
});
|
||||
|
||||
$('select.moduleList').change(function(){
|
||||
alert(this);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
xe.siteAllList = [];
|
||||
|
||||
function completeGetSiteAllList(ret_obj)
|
||||
{
|
||||
if(!jQuery.isArray(ret_obj['site_list']['item'])) xe.siteAllList = [ret_obj['site_list']['item']];
|
||||
else xe.siteAllList = ret_obj['site_list']['item'];
|
||||
|
||||
var $layer = jQuery(currentClickedObject.attr('href')), $ul = $layer.find('>ul'), $button;
|
||||
$ul.empty();
|
||||
for(var i=0,c=xe.siteAllList.length; i < c; i++) {
|
||||
$button = jQuery('<button type="button">'+xe.siteAllList[i].domain+'</button>');
|
||||
$button.data('domain', xe.siteAllList[i].domain).data('site_srl', xe.siteAllList[i].site_srl);
|
||||
|
||||
jQuery('<li>').append($button).appendTo($ul);
|
||||
}
|
||||
}
|
||||
|
||||
var module_list = '';
|
||||
function completeGetModuleList(ret_obj, response_tags)
|
||||
{
|
||||
module_list = ret_obj['module_list'];
|
||||
var htmlListBuffer = '';
|
||||
|
||||
for(var x in module_list)
|
||||
{
|
||||
if(x == 'page') continue;
|
||||
var moduleObject = module_list[x];
|
||||
htmlListBuffer += '<option value="'+x+'">'+moduleObject.title+'</option>';
|
||||
}
|
||||
currentClickedSiteObject.parents('li').find('select:first').html(htmlListBuffer).prop('selectedIndex', 0).change();
|
||||
//makeMidList(jQuery('#module_list').val());
|
||||
}
|
||||
|
||||
/*jQuery(document).ready(function($){
|
||||
$('#module_list').bind('change', function(e){
|
||||
makeMidList($('#module_list').val());
|
||||
});
|
||||
$('#mid_list').bind('change', function(e){
|
||||
doGetCategoryFromModule($('#mid_list').val());
|
||||
});
|
||||
});*/
|
||||
|
||||
function makeMidList(moduleName)
|
||||
{
|
||||
var mid_list = module_list[moduleName].list;
|
||||
var htmlListBuffer = '';
|
||||
for(var x in mid_list)
|
||||
{
|
||||
var moduleInstance = mid_list[x];
|
||||
htmlListBuffer += '<option value="'+moduleInstance.module_srl+'">'+x+'</option>';
|
||||
}
|
||||
jQuery('#mid_list').html(htmlListBuffer);
|
||||
doGetCategoryFromModule(jQuery('#mid_list').val());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue