From 01a0d56e3260610ae583c87d9f3ee64bc469fbb9 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Tue, 9 Oct 2012 02:37:16 +0000 Subject: [PATCH] Issue 2380: Admin UI Refactoring - Advanced - Layouts git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11636 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/layout/layout.admin.controller.php | 9 +- modules/layout/layout.admin.view.php | 42 ---- .../layout/tpl/after_delete_config_image.html | 7 - modules/layout/tpl/css/adminEdit.css | 3 - modules/layout/tpl/installed_layout_list.html | 4 +- modules/layout/tpl/js/adminEdit.js | 6 +- .../layout/tpl/layout_all_instance_list.html | 76 +++---- modules/layout/tpl/layout_detail_info.html | 79 ------- modules/layout/tpl/layout_edit.html | 122 ++++++----- modules/layout/tpl/layout_image_list.html | 26 --- modules/layout/tpl/layout_instance_list.html | 175 ++++++++------- modules/layout/tpl/layout_modify.html | 205 +++++++++--------- 12 files changed, 306 insertions(+), 448 deletions(-) delete mode 100644 modules/layout/tpl/after_delete_config_image.html delete mode 100644 modules/layout/tpl/css/adminEdit.css delete mode 100644 modules/layout/tpl/layout_detail_info.html delete mode 100644 modules/layout/tpl/layout_image_list.html diff --git a/modules/layout/layout.admin.controller.php b/modules/layout/layout.admin.controller.php index 5335fde9e..be99f3886 100644 --- a/modules/layout/layout.admin.controller.php +++ b/modules/layout/layout.admin.controller.php @@ -235,10 +235,13 @@ if(!$force) { $layoutInfo = $oLayoutModel->getLayout($layout_srl); - $layoutList = $oLayoutModel->getLayoutInstanceList($layoutInfo->site_srl, $layoutInfo->layout_type, $layoutInfo->layout, array('layout_srl')); - if(count($layoutList) <= 1) + if($layoutInfo) { - return new Object(-1, 'msg_at_least_one_layout'); + $layoutList = $oLayoutModel->getLayoutInstanceList($layoutInfo->site_srl, $layoutInfo->layout_type, $layoutInfo->layout, array('layout_srl')); + if(count($layoutList) <= 1) + { + return new Object(-1, 'msg_at_least_one_layout'); + } } } diff --git a/modules/layout/layout.admin.view.php b/modules/layout/layout.admin.view.php index 047394c53..44594e4c8 100644 --- a/modules/layout/layout.admin.view.php +++ b/modules/layout/layout.admin.view.php @@ -354,28 +354,6 @@ } - /** - * Pop-up details of the layout(conf/info.xml) - * @deprecated - * @return void - **/ - function dispLayoutAdminInfo() { - // Get the layout information - $oLayoutModel = &getModel('layout'); - $layout_info = $oLayoutModel->getLayoutInfo(Context::get('selected_layout')); - Context::set('layout_info', $layout_info); - // Set the layout to be pop-up - $this->setLayoutFile('popup_layout'); - - $security = new Security(); - $security->encodeHTML('layout_list..'); - $security->encodeHTML('layout_list..author..'); - $security->encodeHTML('layout_list..history..'); - $security->encodeHTML('layout_list..history..author..'); - // Set a template file - $this->setTemplateFile('layout_detail_info'); - } - /** * Modify admin layout of faceoff * @deprecated @@ -424,26 +402,6 @@ $this->setTemplateFile('faceoff_layout_edit'); } - /** - * display used images info for faceoff - * @deprecated - * @return void - **/ - function dispLayoutAdminLayoutImageList(){ - $layout_srl = Context::get('layout_srl'); - $oLayoutModel = &getModel('layout'); - // Image List - $layout_image_list = $oLayoutModel->getUserLayoutImageList($layout_srl); - Context::set('layout_image_list',$layout_image_list); - // Path - $layout_image_path = $oLayoutModel->getUserLayoutImagePath($layout_srl); - Context::set('layout_image_path',$layout_image_path); - - $this->setLayoutFile('popup_layout'); - - $this->setTemplateFile('layout_image_list'); - } - /** * Copy layout instance * @return void diff --git a/modules/layout/tpl/after_delete_config_image.html b/modules/layout/tpl/after_delete_config_image.html deleted file mode 100644 index a88425dcc..000000000 --- a/modules/layout/tpl/after_delete_config_image.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/modules/layout/tpl/css/adminEdit.css b/modules/layout/tpl/css/adminEdit.css deleted file mode 100644 index fe84194c6..000000000 --- a/modules/layout/tpl/css/adminEdit.css +++ /dev/null @@ -1,3 +0,0 @@ -.uploaded_image_list {list-style: none; margin: 0; padding: 0;} -.uploaded_image_list li {display: inline-block; margin-right: 10px;} -.uploaded_image_list img {border: 1px #ccc solid; padding: 3px; width: 96px; height: 96px;} \ No newline at end of file diff --git a/modules/layout/tpl/installed_layout_list.html b/modules/layout/tpl/installed_layout_list.html index f296a13d1..3cd5dbacb 100644 --- a/modules/layout/tpl/installed_layout_list.html +++ b/modules/layout/tpl/installed_layout_list.html @@ -36,7 +36,7 @@ {$layout->path} - {$lang->cmd_delete} + {$lang->cmd_delete} @@ -48,7 +48,7 @@ - - {$layout->path} - {$lang->cmd_delete} + {$lang->cmd_delete} diff --git a/modules/layout/tpl/js/adminEdit.js b/modules/layout/tpl/js/adminEdit.js index c0ffa12e3..7dcb47c78 100644 --- a/modules/layout/tpl/js/adminEdit.js +++ b/modules/layout/tpl/js/adminEdit.js @@ -2,8 +2,8 @@ jQuery(document).ready(function($){ $('.uploaded_image').css('cursor', 'pointer'); $('.uploaded_image_path').hide(); $('.uploaded_image').bind('click', function(e){ - var path = $(this).siblings('.uploaded_image_path').html(); - var html = '
' + path + '
'; + var path = $(this).find('.uploaded_image_path').html(); + var html = '
' + path + '
'; $('.selected_image_path').remove(); $('.uploaded_image_list').after(html); @@ -21,4 +21,4 @@ function doPreviewLayoutCode() $form.removeAttr('target'); $act.val(og_act); -} \ No newline at end of file +} diff --git a/modules/layout/tpl/layout_all_instance_list.html b/modules/layout/tpl/layout_all_instance_list.html index b9c3ea247..76090406f 100644 --- a/modules/layout/tpl/layout_all_instance_list.html +++ b/modules/layout/tpl/layout_all_instance_list.html @@ -3,48 +3,44 @@ -
- - - - - - - - - - - - - - - + +
- -
{$lang->number}{$lang->layout_name}{$lang->title}{$lang->regdate}{$lang->cmd_layout_management}{$lang->cmd_layout_edit}{$lang->cmd_copy}{$lang->cmd_delete}
+ + + + + + + + + + + + + {@$count=1} - + {@$layout_name = $layout['title']} {@unset($layout['title'])} - - - - - - - - - + + + + + + + + - - - -
{$lang->number}{$lang->layout_name}{$lang->title}{$lang->regdate}{$lang->cmd_layout_management}{$lang->cmd_layout_edit}{$lang->cmd_copy}{$lang->cmd_delete}
{$count++}{$layout_name}{$item->title}{zdate($item->regdate, "Y-m-d")}{$lang->cmd_layout_management}{$lang->cmd_layout_edit}{$lang->cmd_copy} -
- - - +
{$count++}{$layout_name}{$item->title}{zdate($item->regdate, "Y-m-d")}{$lang->cmd_layout_management}{$lang->cmd_layout_edit}{$lang->cmd_copy} + + + + - - -
-
+ + + + + + + diff --git a/modules/layout/tpl/layout_detail_info.html b/modules/layout/tpl/layout_detail_info.html deleted file mode 100644 index 0eca4c26d..000000000 --- a/modules/layout/tpl/layout_detail_info.html +++ /dev/null @@ -1,79 +0,0 @@ -

{$lang->layout_maker}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang->title}
{$layout_info->title} ver {$layout_info->version}
{$lang->author}
- - {$author->name} ({$author->homepage}, {$author->email_address})
- -
{$lang->homepage}
{$layout_info->homepage}
{$lang->regdate}
{zdate($layout_info->date, 'Y-m-d')}
{$lang->layout_license}
- {nl2br(trim($layout_info->license))} - -

{$layout_info->license_link}

- -   -
{$lang->description}
{nl2br(trim($layout_info->description))}
-
- - -

{$lang->layout_history}

- -
- - - - - - - -
- {$history->version}
- {zdate($history->date, 'Y-m-d')} -
- -

{$author->name} ({$author->homepage} / {$author->email_address})

- - -

{nl2br(trim($history->description))}

- - - - -
-
- diff --git a/modules/layout/tpl/layout_edit.html b/modules/layout/tpl/layout_edit.html index f0fe3de94..2a6682c09 100644 --- a/modules/layout/tpl/layout_edit.html +++ b/modules/layout/tpl/layout_edit.html @@ -1,89 +1,93 @@ - -

{$selected_layout->layout_title}

+

{$selected_layout->layout_title}

-

{$selected_layout->title} ver {$selected_layout->version} ({$selected_layout->layout})

+

{$selected_layout->title} ver {$selected_layout->version} ({$selected_layout->layout})

{nl2br($lang->about_layout_code)}

-

{$lang->layout_image_repository}

-

{nl2br($lang->about_layout_image_repository)}

+
+

{$lang->layout_image_repository}

+

{nl2br($lang->about_layout_image_repository)}

-
-
    -
  • +
      +
    • {@$ext=substr(strrchr($file,'.'),1)} -
      +
      -
      -
      {$layout_image_path}{$file}
      -
      - - - - +
      +

      {$layout_image_path}{$file}

      + + + + + - - + + +
      +
    -
    - - - -
      -
    • -

      {$lang->msg_layout_image_target}

      -
    • -
    -
    - + + + + + + +
    + + {$lang->msg_layout_image_target} +
    +
    +
    + +
    -
+
-
-

{$lang->faceoff_export}

+
+

{$lang->faceoff_export}

{nl2br($lang->about_faceoff_export)}

- -
+

+ {$lang->layout_btn_export} +

+
-
-
+ -

HTML

-
- - {$widget->title} +
+

HTML

+ + +
-

CSS

-
- -
-
- -
-
- - -
- -
+
+

CSS

+ +
+ +
+ + + + + + + +
+ + diff --git a/modules/layout/tpl/layout_image_list.html b/modules/layout/tpl/layout_image_list.html deleted file mode 100644 index 169a847ae..000000000 --- a/modules/layout/tpl/layout_image_list.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - -

레이아웃 이미지 목록

- - {@$ext=substr(strrchr($file,'.'),1)} -
- - - - - - -
- -
- - - - - -
- diff --git a/modules/layout/tpl/layout_instance_list.html b/modules/layout/tpl/layout_instance_list.html index 07fc5e208..2c97201bb 100644 --- a/modules/layout/tpl/layout_instance_list.html +++ b/modules/layout/tpl/layout_instance_list.html @@ -3,81 +3,104 @@ -

{$layout_info->title} ver {$layout_info->version} ({$layout_info->layout})

-
- - - - - - - - - - - - - - - - - - - - - - - -
{$lang->no}{$lang->title}{$lang->regdate}{$lang->cmd_layout_management}{$lang->cmd_layout_edit}{$lang->cmd_copy}{$lang->cmd_delete}
{$no+1}{$layout->title}{zdate($layout->regdate, "Y-m-d")}{$lang->cmd_layout_management}{$lang->cmd_layout_edit}{$lang->cmd_copy} -
- - - - -
-
-
- -