diff --git a/admin-dev/themes/default/css/admin-theme.css b/admin-dev/themes/default/css/admin-theme.css index e083b06d8..0d522f211 100644 --- a/admin-dev/themes/default/css/admin-theme.css +++ b/admin-dev/themes/default/css/admin-theme.css @@ -353,7 +353,7 @@ small { cite { font-style: normal; } -.text-muted { +.text-muted, .hook_panel .module_description, .hook_panel_header .hook_description { color: #999999; } .text-primary { @@ -3966,7 +3966,7 @@ a.list-group-item { .panel-info > .panel-footer + .panel-collapse .panel-body, #header_notifs_icon_wrapper .notifs_panel .panel-info > .notifs_panel_footer + .panel-collapse .panel-body { border-bottom-color: #bce8f1; } -.well { +.well, .hook_panel { min-height: 20px; padding: 19px; margin-bottom: 20px; @@ -3975,7 +3975,7 @@ a.list-group-item { border-radius: 3px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } - .well blockquote { + .well blockquote, .hook_panel blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } @@ -5449,7 +5449,7 @@ a .icon-flip-vertical:before { .icon-repeat:before { content: "\f01e"; } -.icon-refresh:before { +.icon-refresh:before, .process-icon-refresh:before { content: "\f021"; } .icon-list-alt:before { @@ -6228,7 +6228,7 @@ a .icon-flip-vertical:before { .icon-css3:before { content: "\f13c"; } -.icon-anchor:before { +.icon-anchor:before, .process-icon-anchor:before { content: "\f13d"; } .icon-unlock-alt:before { @@ -7044,21 +7044,6 @@ input[type="password"].input-tiny { width: 80px; float: left; } -.fixed-width-XS { - width: 40px; } - -.fixed-width-S { - width: 80px; } - -.fixed-width-M { - width: 120px; } - -.fixed-width-L { - width: 160px; } - -.fixed-width-XL { - width: 200px; } - .btn-group-action { display: inline-block; white-space: nowrap; } @@ -7133,12 +7118,6 @@ hr { .table tr th:last-child { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } - .table .btn-group { - float: right; } - .table .btn-group .btn { - float: left; } - .table .btn { - float: right; } tr.filter { background-color: #c5c5c5; } @@ -7223,11 +7202,28 @@ tr.filter { color: white; cursor: pointer; font-size: 16px; - background-color: rgba(0, 0, 0, 0.8); } + background-color: rgba(0, 0, 0, 0.5); } + #footer #go-top:hover { + background-color: black; } #nobootstrap { float: left; } +.fixed-width-XS { + width: 40px; } + +.fixed-width-S { + width: 80px; } + +.fixed-width-M { + width: 120px; } + +.fixed-width-L { + width: 160px; } + +.fixed-width-XL { + width: 200px; } + .box-stats { padding: 10px; margin-bottom: 20px; @@ -7334,3 +7330,96 @@ tr.filter { display: inline; } #topbar .submenu { display: none; } + +.hook_panel { + -webkit-box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset; + box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset; + padding: 10px 10px 5px 10px; + margin-bottom: 3px !important; } + .hook_panel .module_name { + font-size: 1.2em; } + +.hook_panel_header { + margin: 0 -10px 0 -10px; + padding: 0 10px 10px 10px; } + .hook_panel_header .hook_name { + font-weight: 400; + font-size: 1.2em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + color: #1d7878; + border: solid 1px #cccccc; + background-color: white; + padding: 0 4px; } + .hook_panel_header .hook_title { + text-transform: uppercase; + font-size: 1em; } + .hook_panel_header .hook_description { + padding: 3px 0 0 3px; } + +.module_list .module_list_item { + display: table; + width: 100%; + padding: 5px 0; + margin-bottom: 4px; + background-color: white; + -webkit-box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px, rgba(0, 0, 0, 0.1) 0 -2px 0 inset; + box-shadow: rgba(0, 0, 0, 0.3) 0 0 3px, rgba(0, 0, 0, 0.1) 0 -2px 0 inset; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; } + +.module_col_select { + display: table-cell; + vertical-align: middle; + text-align: center; + width: 22px; + min-height: 35px; + border-right: 1px solid #dddddd; } + +.module_col_position { + display: table-cell; + vertical-align: middle; + width: 50px; + text-align: right; } + .module_col_position .positions { + font-family: "Ubuntu", sans-serif; + font-weight: 200; + text-shadow: white 1px 1px; + padding: 0 5px; + font-size: 1.6em; + color: #aaaaaa; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 3px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 3px inset; + border: solid 1px #cccccc; + background-color: #eeeeee; } + +.module_col_icon { + display: table-cell; + text-align: center; + vertical-align: middle; + width: 50px; } + +.module_col_infos { + display: table-cell; + vertical-align: middle; + height: 50px; } + +.module_col_actions { + width: 160px; + display: table-cell; + vertical-align: middle; + text-align: right; + padding: 0 10px; } + .module_col_actions .btn-group { + text-align: left; } diff --git a/admin-dev/themes/default/css/admin-theme.sass b/admin-dev/themes/default/css/admin-theme.sass index 6313f0912..766811553 100755 --- a/admin-dev/themes/default/css/admin-theme.sass +++ b/admin-dev/themes/default/css/admin-theme.sass @@ -116,6 +116,7 @@ html, body margin: 0 .notifs_panel_footer @extend .panel-footer + #header_nav_toggle background-color: black border: none @@ -507,6 +508,10 @@ html, body @extend .icon-remove .process-icon-new-url @extend .icon-plus-sign-alt +.process-icon-anchor + @extend .icon-anchor +.process-icon-refresh + @extend .icon-refresh .navbar-inner box-shadow: none!important @@ -544,18 +549,6 @@ input[type="password"].input-tiny width: 80px float: left -//some helpers to get fixed width -.fixed-width-XS - width: 40px -.fixed-width-S - width: 80px -.fixed-width-M - width: 120px -.fixed-width-L - width: 160px -.fixed-width-XL - width: 200px - .btn-group-action display: inline-block white-space: nowrap @@ -632,12 +625,6 @@ hr tr th:last-child border-top-right-radius: 3px border-bottom-right-radius: 3px - .btn-group - float: right - .btn - float: left - .btn - float: right //filter table tr.filter @@ -723,7 +710,9 @@ tr.filter color: #fff cursor: pointer font-size: 16px - background-color: rgba(0,0,0,0.8) + background-color: rgba(0,0,0,0.5) + &:hover + background-color: black #nobootstrap float: left @@ -731,12 +720,27 @@ tr.filter //WIP +//some helpers to get fixed width +.fixed-width-XS + width: 40px +.fixed-width-S + width: 80px +.fixed-width-M + width: 120px +.fixed-width-L + width: 160px +.fixed-width-XL + width: 200px + + + +// temp fix for latest bootstrap input[type="text"],input[type="search"],input[type="password"], textarea, select @extend .form-control - fieldset > .row @extend .form-group + .box-stats padding: 10px margin-bottom: 20px @@ -806,7 +810,7 @@ fieldset > .row .highlighted background-color: blue -.list-toolbar-btn +//.list-toolbar-btn #topbar @@ -835,4 +839,92 @@ fieldset > .row li display: inline .submenu - display: none \ No newline at end of file + display: none + +.hook_panel + @extend .well + //@include background-image(linear-gradient(#fff, #ccc)) + //@include box-shadow(rgba(black,0.10) 0 -2px 0 inset) + @include box-shadow(rgba(white,0.9) 0 0 0 1px inset) + padding: 10px 10px 5px 10px + margin-bottom: 3px!important + .module_name + font-size: 1.2em + .module_description + @extend .text-muted + + +.hook_panel_header + margin: 0 -10px 0 -10px + padding: 0 10px 10px 10px + .hook_name + font-weight: 400 + font-size: 1.2em + @include border-radius(3px) + color: $brand-primary + border: solid 1px #ccc + background-color: white + padding: 0 4px + .hook_title + text-transform: uppercase + font-size: 1em + .hook_description + @extend .text-muted + padding: 3px 0 0 3px + + +.module_list + //@extend .list-group + .module_list_item + display: table + width: 100% + padding: 5px 0 + margin-bottom: 4px + background-color: white + @include box-shadow(rgba(0,0,0,0.3) 0 0 3px,rgba(black,0.10) 0 -2px 0 inset) + @include border-radius(3px) + +.module_col_select + display: table-cell + vertical-align: middle + text-align: center + width: 22px + min-height: 35px + border-right: 1px solid #ddd +.module_col_position + display: table-cell + vertical-align: middle + width: 50px + text-align: right + .positions + font-family: $headings-font-family + font-weight: 200 + @include text-shadow(white 1px 1px) + padding: 0 5px + font-size: 1.6em + color: #aaa + @include border-radius(3px) + @include box-shadow(rgba(0,0,0,0.2) 0 1px 3px inset) + border: solid 1px #ccc + background-color: #eee + + +.module_col_icon + display: table-cell + text-align: center + vertical-align: middle + width: 50px +.module_col_infos + display: table-cell + vertical-align: middle + height: 50px +.module_col_actions + width: 160px + display: table-cell + vertical-align: middle + text-align: right + padding: 0 10px + .btn-group + text-align: left + + diff --git a/admin-dev/themes/default/template/controllers/modules/content.tpl b/admin-dev/themes/default/template/controllers/modules/content.tpl index 58546be45..4e58e5b6d 100644 --- a/admin-dev/themes/default/template/controllers/modules/content.tpl +++ b/admin-dev/themes/default/template/controllers/modules/content.tpl @@ -24,6 +24,7 @@ *} {if isset($module_content)} + {$module_content} {else} {if !isset($smarty.get.configure)} diff --git a/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl b/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl index 394bf7bf4..faa9d0498 100644 --- a/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl +++ b/admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl @@ -32,178 +32,141 @@ {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
{block name="leadin"}{/block}
-
-
- - - - -

- -

-
-
-
-
-
-
- - +
+
+ + + + - {if !$can_move} +

+ +

+ + +
+
+ +{if !$can_move} {l s='If you want to order/move the following data, please select a shop from the shop list.'} - {/if} - - {foreach $hooks as $hook} -
+{/if} +{foreach $hooks as $hook} +
- - - - - - - - - - - {if $hook['module_count'] && $can_move} - - {/if} - - - - - {if !empty($hook['description'])} - - - - {/if} - {if $hook['module_count']} - {foreach $hook['modules'] as $position => $module} - {if isset($module['instance'])} - - - {if !$display_key} - - - - - - {/if} - {/foreach} - {else} - - - - {/if} - -
- - -

- {$hook['title']} - - {$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if} - ({l s='Technical name: '}{$hook['name']}) -

-
-

- [{$hook['description']}] -

-
- - {$module@iteration}= 2} align=center class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}"> - {if $can_move} - - {l s='Up'} -
- - {l s='Down'} - - {/if} -
-
- {else} -
-
- {/if} -

- {$module['instance']->name|stripslashes} - {$module['instance']->displayName|stripslashes} -

-
-
{l s='Version:'}
-
- {if $module['instance']->version}v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if} -
-
{l s='Description:'}
-
- {$module['instance']->description} -
-
-
-
-
- {l s='Choose an action'} - - -
-
-

{l s='No module was found for this hook.'}

-
+
+ {$hook['name']} + {$hook['title']} + + + {if $hook['module_count'] && $can_move} + + {/if} + {$hook['module_count']} {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if} + + {if !empty($hook['description'])} +
{$hook['description']}
+ {/if} +
+ + {if $hook['module_count']} +
+ {foreach $hook['modules'] as $position => $module} + {if isset($module['instance'])} +
+
+ +
+ {if !$display_key} +
= 2}class="dragHandle"{/if} id="td_{$hook['id_hook']}_{$module['instance']->id}"> + {$module@iteration} + {if $can_move} + + + + {/if} +
+ {/if} +
+ {$module['instance']->name|stripslashes} +
+
+ {$module['instance']->displayName|stripslashes} {if $module['instance']->version} +  - v{if $module['instance']->version|intval == $module['instance']->version}{sprintf('%.1f', $module['instance']->version)}{else}{$module['instance']->version|floatval}{/if}{/if} + +
{$module['instance']->description}
+ + +
+ + {/if} + {/foreach} +
+ {else} + + {/if} +
+{/foreach} +
+
- {/foreach} -
- - - -
- + +
-
-

{l s='LiveEdit'}

+
+
+
+

{l s='LiveEdit'}

{if $live_edit}

{l s='You have to select a shop to use LiveEdit'}

{else}

{l s='Click here to be redirected to the Front Office of your shop where you can move and delete modules directly.'}

- + {l s='Run LiveEdit'} {/if}
-
\ No newline at end of file +
diff --git a/admin-dev/themes/default/template/footer.tpl b/admin-dev/themes/default/template/footer.tpl index 02a1e22c5..87b81e8a9 100644 --- a/admin-dev/themes/default/template/footer.tpl +++ b/admin-dev/themes/default/template/footer.tpl @@ -58,6 +58,12 @@ {/if}
+
{* ajaxBox allows*} diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 53e062db7..0e6dbe4c4 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -691,35 +691,33 @@ class AdminModulesControllerCore extends AdminController $hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id; $tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang='; - $toolbar = ' - - - - '; + $language = ''; + foreach (Language::getLanguages(false) as $language) + $language .= ''.$language['iso_code'].''; + + $this->context->smarty->assign(array( + 'module_name' => $module->name, + 'backlink' => $backlink, + 'module_hooklink' => $hooklink, + 'module_language' => $language + )); + // Display checkbox in toolbar if multishop if (Shop::isFeatureActive()) { $activateOnclick = 'onclick="location.href = \''.$this->getCurrentUrl('enable').'&enable=\'+(($(this).attr(\'checked\')) ? 1 : 0)"'; - $toolbar .= ' - - '; + $multishop .= 'all shops'; } - $toolbar .= '
'.$this->l('Module').' '.$module->name.''.$this->l('Back').''.$this->l('Manage hooks').''.$this->l('Manage translations').' '; - foreach (Language::getLanguages(false) as $language) - $toolbar .= ''.$language['iso_code'].''; - $toolbar .= '
- active) ? 'checked="checked"' : '').' '.$activateOnclick.' /> '.$this->l('Activate module for').' '; + $multishop = 'active) ? 'checked="checked"' : '').' '.$activateOnclick.' /> '.$this->l('Activate module for').' '; if (Shop::getContext() == Shop::CONTEXT_SHOP) $toolbar .= 'shop '.$this->context->shop->name.''; elseif (Shop::getContext() == Shop::CONTEXT_GROUP) { $shop_group = new ShopGroup((int)Shop::getContextShopGroupID()); - $toolbar .= 'all shops of group shop '.$shop_group->name.''; + $multishop .= 'all shops of group shop '.$shop_group->name.''; } else - $toolbar .= 'all shops'; - $toolbar .= '
'; if (Shop::isFeatureActive() && isset(Context::getContext()->tmpOldShop)) @@ -728,7 +726,8 @@ class AdminModulesControllerCore extends AdminController unset(Context::getContext()->tmpOldShop); } // Display module configuration - $this->context->smarty->assign('module_content', $toolbar.'
 
'.$echo.'
 
'.$toolbar); + $header = $this->context->smarty->fetch('controllers/modules/configure.tpl'); + $this->context->smarty->assign('module_content', $header.$echo ); } elseif ($echo === true) {