mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 07:42:11 +09:00
favorite feature enhancement
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9045 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8ab1295893
commit
cb0fafd5f3
3 changed files with 33 additions and 23 deletions
|
|
@ -22,7 +22,7 @@
|
|||
* @return none
|
||||
**/
|
||||
function procAdminRecompileCacheFile() {
|
||||
// rename cache dir
|
||||
// rename cache dir
|
||||
$temp_cache_dir = './files/cache_'. time();
|
||||
FileHandler::rename('./files/cache', $temp_cache_dir);
|
||||
FileHandler::makeDir('./files/cache');
|
||||
|
|
@ -165,16 +165,19 @@
|
|||
{
|
||||
$favoriteSrl = $output->get('favoriteSrl');
|
||||
$output = $this->_deleteFavorite($favoriteSrl);
|
||||
$result = 'off';
|
||||
}
|
||||
|
||||
// if not exists, insert favorite
|
||||
else
|
||||
{
|
||||
$output = $this->_insertFavorite($siteSrl, $moduleName);
|
||||
$result = 'on';
|
||||
}
|
||||
|
||||
if (!$output->toBool()) return $output;
|
||||
|
||||
$this->add('result', $result);
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
|
|
@ -278,15 +281,15 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
function procAdminRemoveIcons(){
|
||||
$iconname = Context::get('iconname');
|
||||
function procAdminRemoveIcons(){
|
||||
$iconname = Context::get('iconname');
|
||||
$file_exist = FileHandler::readFile(_XE_PATH_.'files/attach/xeicon/'.$iconname);
|
||||
if($file_exist) {
|
||||
@FileHandler::removeFile(_XE_PATH_.'files/attach/xeicon/'.$iconname);
|
||||
} else {
|
||||
return new Object(-1,'fail_to_delete');
|
||||
}
|
||||
$this->setMessage('success_deleted');
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,17 +4,18 @@
|
|||
* @brief module 모듈의 관리자용 javascript
|
||||
**/
|
||||
/* 모듈 즐겨찾기 */
|
||||
function doToggleFavoriteModule(module_name) {
|
||||
var params = new Array();
|
||||
params['module_name'] = module_name;
|
||||
params['site_srl'] = '0';
|
||||
exec_xml('admin','procAdminToggleFavorite',params, completeToggleFavoriteModule);
|
||||
function doToggleFavoriteModule(obj, module_name) {
|
||||
function on_complete(data){
|
||||
console.log(data);
|
||||
if (data.result == 'on')
|
||||
jQuery(obj).removeClass('fvOff').addClass('fvOn').html(xe.lang.favorite_on);
|
||||
else
|
||||
jQuery(obj).removeClass('fvOn').addClass('fvOff').html(xe.lang.favorite_off);
|
||||
}
|
||||
|
||||
jQuery.exec_json('admin.procAdminToggleFavorite', {'module_name': module_name, 'site_srl': 0}, on_complete);
|
||||
}
|
||||
|
||||
function completeToggleFavoriteModule(ret_obj) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
/* 카테고리 관련 작업들 */
|
||||
function doUpdateCategory(module_category_srl, message) {
|
||||
if(typeof(message)!='undefined'&&!confirm(message)) return;
|
||||
|
|
@ -113,7 +114,7 @@ function doInsertAdmin() {
|
|||
var members = new Array();
|
||||
for(var i=0;i<sel_obj.options.length;i++) {
|
||||
members[members.length] = sel_obj.options[i].value;
|
||||
|
||||
|
||||
}
|
||||
fo_obj.admin_member.value = members.join(',');
|
||||
|
||||
|
|
@ -131,7 +132,7 @@ function doDeleteAdmin() {
|
|||
var members = new Array();
|
||||
for(var i=0;i<sel_obj.options.length;i++) {
|
||||
members[members.length] = sel_obj.options[i].value;
|
||||
|
||||
|
||||
}
|
||||
fo_obj.admin_member.value = members.join(',');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
<!--%import("js/module_admin.js")-->
|
||||
|
||||
<script type="text/javascript">
|
||||
xe.lang.favorite_on = '{$lang->favorite}({$lang->on})';
|
||||
xe.lang.favorite_off = '{$lang->favorite}({$lang->off})';
|
||||
</script>
|
||||
|
||||
<div class="content" id="content">
|
||||
<h1 class="h1">Installed Module</h1>
|
||||
<div class="table even easyList">
|
||||
|
|
@ -8,23 +14,23 @@
|
|||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">즐겨찾기</th>
|
||||
<th scope="col">{$lang->favorite}</th>
|
||||
<th scope="col" class="title">{$lang->module_name}</th>
|
||||
<th scope="col">{$lang->version}</th>
|
||||
<th scope="col">{$lang->author}</th>
|
||||
<th scope="col">{$lang->path}</th>
|
||||
<th scope="col">{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($module_list as $key => $val)-->
|
||||
<tr>
|
||||
<td>
|
||||
<td>
|
||||
<!--@if(in_array($val->module,$favoriteModuleList))-->
|
||||
<a href="#" class="fvOn" onClick="doToggleFavoriteModule('{$val->module}')">즐겨찾기(켜짐)</a>
|
||||
<a href="#" class="fvOn" onclick="doToggleFavoriteModule(this, '{$val->module}'); return false;">{$lang->favorite}({$lang->on})</a>
|
||||
<!--@else-->
|
||||
<a href="#" class="fvOff" onClick="doToggleFavoriteModule('{$val->module}')">즐겨찾기(꺼짐)</a>
|
||||
<!--@end-->
|
||||
<a href="#" class="fvOff" onclick="doToggleFavoriteModule(this, '{$val->module}'); return false;">{$lang->favorite}({$lang->off})</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="title">
|
||||
<p><a href="{getUrl('','module','admin','act',$val->admin_index_act)}">{$val->title}</a></p>
|
||||
|
|
@ -48,7 +54,7 @@
|
|||
<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
<td>{$val->path}</td>
|
||||
<td>{$val->path}</td>
|
||||
<td>
|
||||
<!--@if($val->delete_url)-->
|
||||
<a href="{$val->delete_url}">{$lang->cmd_delete}</a>
|
||||
|
|
@ -56,7 +62,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue