// 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:
@@ -169,4 +169,5 @@ form.defaultForm{ background-color:#ebedf4; border:1px solid #ccced7; min-heig
|
||||
.product-tab-content h4.tab { display:none;}
|
||||
|
||||
/*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}
|
||||
<span style="color: #812143; font-weight: bold;">Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h à 18h
|
||||
{/if}
|
||||
| <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://www.prestashop.com/forums/" target="_blank" class="footer_link">{l s='Forum'}</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://www.prestashop.com/forums/" target="_blank" class="footer_link">{l s='Forum'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,5 +53,35 @@
|
||||
}
|
||||
</script>
|
||||
{/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>
|
||||
</html>
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
</script>
|
||||
<script type="text/javascript" src="../js/form.js"></script>
|
||||
{/if}
|
||||
<div class="toolbarBox">
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
@@ -75,6 +76,7 @@
|
||||
{/if}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
</div>
|
||||
</div>
|
||||
{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">
|
||||
{if $form_id}
|
||||
|
||||
@@ -37,8 +37,3 @@
|
||||
</table>
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
</form>
|
||||
|
||||
{*
|
||||
if (isset($this->_includeTab) AND sizeof($this->_includeTab))
|
||||
echo '<br /><br />';
|
||||
*}
|
||||
@@ -60,7 +60,8 @@
|
||||
{/if}{* End if simple_header *}
|
||||
|
||||
{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}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
@@ -68,6 +69,7 @@
|
||||
{/block}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
<a name="{$table}"> </a>
|
||||
|
||||
+31
-16
@@ -102,6 +102,9 @@ class AdminControllerCore extends Controller
|
||||
/** @var array list of toolbar buttons */
|
||||
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 */
|
||||
protected $show_toolbar = true;
|
||||
|
||||
@@ -272,10 +275,21 @@ class AdminControllerCore extends Controller
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
// Breadcrumbs
|
||||
$tabs= array();
|
||||
$tabs= Tab::recursiveTab($this->id, $tabs);
|
||||
$tabs= array_reverse($tabs);
|
||||
$tabs = array();
|
||||
$tabs = Tab::recursiveTab($this->id, $tabs);
|
||||
$tabs = array_reverse($tabs);
|
||||
$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
|
||||
foreach ($tabs AS $key => $item)
|
||||
$bread .= '<span class="breadcrumb item-'.$key.' ">'.$item['name'].'</span> : ';
|
||||
@@ -1307,8 +1321,10 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
|
||||
$helper->tpl_vars = $this->tpl_list_vars;
|
||||
$this->setHelperListDisplay($helper);
|
||||
return $helper->generateList($this->_list, $this->fieldsDisplay);
|
||||
$this->setHelperDisplay($helper);
|
||||
$list = $helper->generateList($this->_list, $this->fieldsDisplay);
|
||||
$this->toolbar_fix = false;
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1324,16 +1340,21 @@ class AdminControllerCore extends Controller
|
||||
* @param Helper $helper
|
||||
* @return void
|
||||
*/
|
||||
public function setHelperListDisplay(Helper $helper)
|
||||
public function setHelperDisplay(Helper $helper)
|
||||
{
|
||||
if (empty($this->toolbar_title))
|
||||
$this->initToolbarTitle();
|
||||
// tocheck
|
||||
if ($this->object && $this->object->id)
|
||||
$helper->id = $this->object->id;
|
||||
|
||||
// @todo : move that in Helper
|
||||
$helper->actions = $this->actions;
|
||||
$helper->simple_header = $this->list_simple_header;
|
||||
$helper->title = $this->toolbar_title;
|
||||
$helper->toolbar_btn = $this->toolbar_btn;
|
||||
$helper->show_toolbar = $this->show_toolbar;
|
||||
$helper->toolbar_fix = $this->toolbar_fix;
|
||||
$helper->bulk_actions = $this->bulk_actions;
|
||||
$helper->currentIndex = self::$currentIndex;
|
||||
$helper->className = $this->className;
|
||||
@@ -1371,19 +1392,11 @@ class AdminControllerCore extends Controller
|
||||
$this->getlanguages();
|
||||
$helper = new HelperForm($this);
|
||||
$helper->override_folder = $this->tpl_folder;
|
||||
$helper->currentIndex = self::$currentIndex;
|
||||
$helper->token = $this->token;
|
||||
$helper->table = $this->table;
|
||||
$helper->identifier = $this->identifier;
|
||||
$helper->id = $this->object->id;
|
||||
$this->setHelperDisplay($helper);
|
||||
$helper->languages = $this->_languages;
|
||||
$helper->default_form_language = $this->default_form_language;
|
||||
$helper->allow_employee_form_lang = $this->allow_employee_form_lang;
|
||||
$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;
|
||||
if ($this->tabAccess['view'])
|
||||
{
|
||||
@@ -1392,7 +1405,9 @@ class AdminControllerCore extends Controller
|
||||
else
|
||||
$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',
|
||||
'path_css' => _THEME_CSS_DIR_,
|
||||
'ad' => dirname($_SERVER["PHP_SELF"]),
|
||||
'show_toolbar' => $this->show_toolbar
|
||||
'show_toolbar' => $this->show_toolbar,
|
||||
'toolbar_fix' => $this->toolbar_fix,
|
||||
|
||||
));
|
||||
return parent::generate();
|
||||
}
|
||||
|
||||
@@ -589,6 +589,7 @@ class HelperListCore extends Helper
|
||||
'name' => isset($name) ? $name : null,
|
||||
'name_id' => isset($name_id) ? $name_id : null,
|
||||
'show_toolbar' => $this->show_toolbar,
|
||||
'toolbar_fix' => $this->toolbar_fix,
|
||||
|
||||
'back' => Tools::getValue('back'),
|
||||
'no_back' => $this->no_back,
|
||||
|
||||
@@ -67,7 +67,7 @@ class AdminCatalogController extends AdminController
|
||||
}
|
||||
self::$_category = new Category($id_category);
|
||||
if (!Validate::isLoadedObject(self::$_category))
|
||||
die('Category cannot be loaded');
|
||||
throw new PrestashopException('Category cannot be loaded');
|
||||
|
||||
$this->table = array('category', 'product');
|
||||
// $this->adminCategories = new AdminCategories();
|
||||
|
||||
@@ -329,7 +329,7 @@ class AdminTrackingController extends AdminController
|
||||
)
|
||||
AND quantity <= 0)';
|
||||
$this->list_title = $this->l('Product out of stock');
|
||||
$this->list_simple_header = 1;
|
||||
$this->list_simple_header = true;
|
||||
|
||||
$list = $this->initList();
|
||||
$this->_filter = '';
|
||||
@@ -347,6 +347,7 @@ class AdminTrackingController extends AdminController
|
||||
$this->_filter = 'AND active = 0';
|
||||
$this->list_no_filter = true;
|
||||
$this->list_title = $this->l('Product disabled');
|
||||
$this->list_simple_header = true;
|
||||
$list = $this->initList();
|
||||
$this->_filter = '';
|
||||
return $list;
|
||||
|
||||
Reference in New Issue
Block a user