// added fixed toolbar, norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9904 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
601c4ded53
commit
100dc43616
10 files changed
+79
-30
No files matched your search
@@ -169,4 +169,5 @@ form.defaultForm{ background-color:#ebedf4; border:1px solid #ccced7; min-heig
|
|||||||
.product-tab-content h4.tab { display:none;}
|
.product-tab-content h4.tab { display:none;}
|
||||||
|
|
||||||
/*FOOTER*/
|
/*FOOTER*/
|
||||||
#footer {height:40px;background:#ECEADE url(footer-bg.png) repeat-x scroll left bottom;border:1px solid #999999;font-size:12px;clear:both;font-size:0.9em;color:#666666}
|
#footer {height:40px;background:#ECEADE url(footer-bg.png) repeat-x scroll left bottom;border:1px solid #999999;font-size:12px;clear:both;font-size:0.9em;color:#666666}
|
||||||
|
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;}
|
||||||
@@ -37,9 +37,9 @@
|
|||||||
{if $iso_is_fr}
|
{if $iso_is_fr}
|
||||||
<span style="color: #812143; font-weight: bold;">Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h à 18h
|
<span style="color: #812143; font-weight: bold;">Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h à 18h
|
||||||
{/if}
|
{/if}
|
||||||
| <a href="http://www.prestashop.com/en/contact_us/" target="_blank" class="footer_link">{l s='Contact'}</a>
|
| <a href="http://www.prestashop.com/en/contact_us/" target="_blank" class="footer_link">{l s='Contact'}</a>
|
||||||
| <a href="http://forge.prestashop.com" target="_blank" class="footer_link">{l s='Bug Tracker'}</a>
|
| <a href="http://forge.prestashop.com" target="_blank" class="footer_link">{l s='Bug Tracker'}</a>
|
||||||
| <a href="http://www.prestashop.com/forums/" target="_blank" class="footer_link">{l s='Forum'}</a>
|
| <a href="http://www.prestashop.com/forums/" target="_blank" class="footer_link">{l s='Forum'}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -53,5 +53,35 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
var placeholder = $(".toolbar-placeholder");
|
||||||
|
var message = $('.toolbarHead');
|
||||||
|
var view = $(window);
|
||||||
|
|
||||||
|
// bind only if placeholder exists
|
||||||
|
if (placeholder.length)
|
||||||
|
view.bind("scroll resize", function(e)
|
||||||
|
{
|
||||||
|
if(e.type == 'resize')
|
||||||
|
message.css('width', message.width());
|
||||||
|
|
||||||
|
var placeholderTop = placeholder.offset().top;
|
||||||
|
var viewTop = view.scrollTop() + 15;
|
||||||
|
|
||||||
|
if ((viewTop > placeholderTop) && !message.hasClass("fix-toolbar"))
|
||||||
|
{
|
||||||
|
message.css('width', message.width());
|
||||||
|
message.addClass("fix-toolbar");
|
||||||
|
}
|
||||||
|
else if ( (viewTop <= placeholderTop) && message.hasClass("fix-toolbar"))
|
||||||
|
{
|
||||||
|
message.css('width', 'auto');
|
||||||
|
message.removeClass("fix-toolbar");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -64,7 +64,8 @@
|
|||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="../js/form.js"></script>
|
<script type="text/javascript" src="../js/form.js"></script>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="toolbarBox">
|
<div class="toolbar-placeholder">
|
||||||
|
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
|
||||||
{if $show_toolbar}
|
{if $show_toolbar}
|
||||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||||
<div class="pageTitle">
|
<div class="pageTitle">
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{if isset($fields.title)}<h2>{$fields.title}</h2>{/if}
|
{if isset($fields.title)}<h2>{$fields.title}</h2>{/if}
|
||||||
<form id="{$table}_form" class="defaultForm" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
|
<form id="{$table}_form" class="defaultForm" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
|
||||||
{if $form_id}
|
{if $form_id}
|
||||||
|
|||||||
@@ -37,8 +37,3 @@
|
|||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="token" value="{$token}" />
|
<input type="hidden" name="token" value="{$token}" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{*
|
|
||||||
if (isset($this->_includeTab) AND sizeof($this->_includeTab))
|
|
||||||
echo '<br /><br />';
|
|
||||||
*}
|
|
||||||
@@ -60,7 +60,8 @@
|
|||||||
{/if}{* End if simple_header *}
|
{/if}{* End if simple_header *}
|
||||||
|
|
||||||
{if $show_toolbar}
|
{if $show_toolbar}
|
||||||
<div class="toolbarBox">
|
<div class="toolbar-placeholder">
|
||||||
|
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
|
||||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||||
<div class="pageTitle">
|
<div class="pageTitle">
|
||||||
<h3>{block name=pageTitle}
|
<h3>{block name=pageTitle}
|
||||||
@@ -68,6 +69,7 @@
|
|||||||
{/block}</h3>
|
{/block}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
<a name="{$table}"> </a>
|
<a name="{$table}"> </a>
|
||||||
|
|||||||
+31
-16
@@ -102,6 +102,9 @@ class AdminControllerCore extends Controller
|
|||||||
/** @var array list of toolbar buttons */
|
/** @var array list of toolbar buttons */
|
||||||
protected $toolbar_btn = null;
|
protected $toolbar_btn = null;
|
||||||
|
|
||||||
|
/** @var array list of toolbar buttons */
|
||||||
|
protected $toolbar_fix = true;
|
||||||
|
|
||||||
/** @var boolean set to false to hide toolbar and page title */
|
/** @var boolean set to false to hide toolbar and page title */
|
||||||
protected $show_toolbar = true;
|
protected $show_toolbar = true;
|
||||||
|
|
||||||
@@ -272,10 +275,21 @@ class AdminControllerCore extends Controller
|
|||||||
public function initToolbarTitle()
|
public function initToolbarTitle()
|
||||||
{
|
{
|
||||||
// Breadcrumbs
|
// Breadcrumbs
|
||||||
$tabs= array();
|
$tabs = array();
|
||||||
$tabs= Tab::recursiveTab($this->id, $tabs);
|
$tabs = Tab::recursiveTab($this->id, $tabs);
|
||||||
$tabs= array_reverse($tabs);
|
$tabs = array_reverse($tabs);
|
||||||
$bread = '';
|
$bread = '';
|
||||||
|
switch ($this->display)
|
||||||
|
{
|
||||||
|
case 'edit':
|
||||||
|
array_pop($tabs);
|
||||||
|
$tabs[] = array('name' => sprintf($this->l('Edit %s'), $this->table));
|
||||||
|
break;
|
||||||
|
case 'add':
|
||||||
|
array_pop($tabs);
|
||||||
|
$tabs[] = array('name' => sprintf($this->l('Add %s'), $this->table));
|
||||||
|
break;
|
||||||
|
}
|
||||||
// note : this should use a tpl file
|
// note : this should use a tpl file
|
||||||
foreach ($tabs AS $key => $item)
|
foreach ($tabs AS $key => $item)
|
||||||
$bread .= '<span class="breadcrumb item-'.$key.' ">'.$item['name'].'</span> : ';
|
$bread .= '<span class="breadcrumb item-'.$key.' ">'.$item['name'].'</span> : ';
|
||||||
@@ -1307,8 +1321,10 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$helper->tpl_vars = $this->tpl_list_vars;
|
$helper->tpl_vars = $this->tpl_list_vars;
|
||||||
$this->setHelperListDisplay($helper);
|
$this->setHelperDisplay($helper);
|
||||||
return $helper->generateList($this->_list, $this->fieldsDisplay);
|
$list = $helper->generateList($this->_list, $this->fieldsDisplay);
|
||||||
|
$this->toolbar_fix = false;
|
||||||
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1324,16 +1340,21 @@ class AdminControllerCore extends Controller
|
|||||||
* @param Helper $helper
|
* @param Helper $helper
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setHelperListDisplay(Helper $helper)
|
public function setHelperDisplay(Helper $helper)
|
||||||
{
|
{
|
||||||
if (empty($this->toolbar_title))
|
if (empty($this->toolbar_title))
|
||||||
$this->initToolbarTitle();
|
$this->initToolbarTitle();
|
||||||
|
// tocheck
|
||||||
|
if ($this->object && $this->object->id)
|
||||||
|
$helper->id = $this->object->id;
|
||||||
|
|
||||||
// @todo : move that in Helper
|
// @todo : move that in Helper
|
||||||
$helper->actions = $this->actions;
|
$helper->actions = $this->actions;
|
||||||
$helper->simple_header = $this->list_simple_header;
|
$helper->simple_header = $this->list_simple_header;
|
||||||
$helper->title = $this->toolbar_title;
|
$helper->title = $this->toolbar_title;
|
||||||
$helper->toolbar_btn = $this->toolbar_btn;
|
$helper->toolbar_btn = $this->toolbar_btn;
|
||||||
$helper->show_toolbar = $this->show_toolbar;
|
$helper->show_toolbar = $this->show_toolbar;
|
||||||
|
$helper->toolbar_fix = $this->toolbar_fix;
|
||||||
$helper->bulk_actions = $this->bulk_actions;
|
$helper->bulk_actions = $this->bulk_actions;
|
||||||
$helper->currentIndex = self::$currentIndex;
|
$helper->currentIndex = self::$currentIndex;
|
||||||
$helper->className = $this->className;
|
$helper->className = $this->className;
|
||||||
@@ -1371,19 +1392,11 @@ class AdminControllerCore extends Controller
|
|||||||
$this->getlanguages();
|
$this->getlanguages();
|
||||||
$helper = new HelperForm($this);
|
$helper = new HelperForm($this);
|
||||||
$helper->override_folder = $this->tpl_folder;
|
$helper->override_folder = $this->tpl_folder;
|
||||||
$helper->currentIndex = self::$currentIndex;
|
$this->setHelperDisplay($helper);
|
||||||
$helper->token = $this->token;
|
|
||||||
$helper->table = $this->table;
|
|
||||||
$helper->identifier = $this->identifier;
|
|
||||||
$helper->id = $this->object->id;
|
|
||||||
$helper->languages = $this->_languages;
|
$helper->languages = $this->_languages;
|
||||||
$helper->default_form_language = $this->default_form_language;
|
$helper->default_form_language = $this->default_form_language;
|
||||||
$helper->allow_employee_form_lang = $this->allow_employee_form_lang;
|
$helper->allow_employee_form_lang = $this->allow_employee_form_lang;
|
||||||
$helper->fields_value = $this->getFieldsValue($this->object);
|
$helper->fields_value = $this->getFieldsValue($this->object);
|
||||||
$helper->toolbar_btn = $this->toolbar_btn;
|
|
||||||
$helper->title = $this->toolbar_title;
|
|
||||||
$helper->show_toolbar = $this->show_toolbar;
|
|
||||||
$helper->no_back = isset($this->no_back) ? $this->no_back : false;
|
|
||||||
$helper->tpl_vars = $this->tpl_form_vars;
|
$helper->tpl_vars = $this->tpl_form_vars;
|
||||||
if ($this->tabAccess['view'])
|
if ($this->tabAccess['view'])
|
||||||
{
|
{
|
||||||
@@ -1392,7 +1405,9 @@ class AdminControllerCore extends Controller
|
|||||||
else
|
else
|
||||||
$helper->tpl_vars['back'] = Tools::safeOutput(Tools::getValue(self::$currentIndex.'&token='.$this->token));
|
$helper->tpl_vars['back'] = Tools::safeOutput(Tools::getValue(self::$currentIndex.'&token='.$this->token));
|
||||||
}
|
}
|
||||||
return $helper->generateForm($this->fields_form);
|
$form = $helper->generateForm($this->fields_form);
|
||||||
|
$this->toolbar_fix = false;
|
||||||
|
return $form;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,9 @@ class HelperFormCore extends Helper
|
|||||||
'iso' => file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en',
|
'iso' => file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en',
|
||||||
'path_css' => _THEME_CSS_DIR_,
|
'path_css' => _THEME_CSS_DIR_,
|
||||||
'ad' => dirname($_SERVER["PHP_SELF"]),
|
'ad' => dirname($_SERVER["PHP_SELF"]),
|
||||||
'show_toolbar' => $this->show_toolbar
|
'show_toolbar' => $this->show_toolbar,
|
||||||
|
'toolbar_fix' => $this->toolbar_fix,
|
||||||
|
|
||||||
));
|
));
|
||||||
return parent::generate();
|
return parent::generate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ class HelperListCore extends Helper
|
|||||||
'name' => isset($name) ? $name : null,
|
'name' => isset($name) ? $name : null,
|
||||||
'name_id' => isset($name_id) ? $name_id : null,
|
'name_id' => isset($name_id) ? $name_id : null,
|
||||||
'show_toolbar' => $this->show_toolbar,
|
'show_toolbar' => $this->show_toolbar,
|
||||||
|
'toolbar_fix' => $this->toolbar_fix,
|
||||||
|
|
||||||
'back' => Tools::getValue('back'),
|
'back' => Tools::getValue('back'),
|
||||||
'no_back' => $this->no_back,
|
'no_back' => $this->no_back,
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class AdminCatalogController extends AdminController
|
|||||||
}
|
}
|
||||||
self::$_category = new Category($id_category);
|
self::$_category = new Category($id_category);
|
||||||
if (!Validate::isLoadedObject(self::$_category))
|
if (!Validate::isLoadedObject(self::$_category))
|
||||||
die('Category cannot be loaded');
|
throw new PrestashopException('Category cannot be loaded');
|
||||||
|
|
||||||
$this->table = array('category', 'product');
|
$this->table = array('category', 'product');
|
||||||
// $this->adminCategories = new AdminCategories();
|
// $this->adminCategories = new AdminCategories();
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ class AdminTrackingController extends AdminController
|
|||||||
)
|
)
|
||||||
AND quantity <= 0)';
|
AND quantity <= 0)';
|
||||||
$this->list_title = $this->l('Product out of stock');
|
$this->list_title = $this->l('Product out of stock');
|
||||||
$this->list_simple_header = 1;
|
$this->list_simple_header = true;
|
||||||
|
|
||||||
$list = $this->initList();
|
$list = $this->initList();
|
||||||
$this->_filter = '';
|
$this->_filter = '';
|
||||||
@@ -347,6 +347,7 @@ class AdminTrackingController extends AdminController
|
|||||||
$this->_filter = 'AND active = 0';
|
$this->_filter = 'AND active = 0';
|
||||||
$this->list_no_filter = true;
|
$this->list_no_filter = true;
|
||||||
$this->list_title = $this->l('Product disabled');
|
$this->list_title = $this->l('Product disabled');
|
||||||
|
$this->list_simple_header = true;
|
||||||
$list = $this->initList();
|
$list = $this->initList();
|
||||||
$this->_filter = '';
|
$this->_filter = '';
|
||||||
return $list;
|
return $list;
|
||||||
|
|||||||
Reference in new issue
Block a user