// #PSCFV-94 - AdminProducts, AdminCatalog

// new menu style


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9515 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mMarinetti
2011-10-20 15:22:22 +00:00
parent 0598f561b7
commit 1e9e80b266
13 changed files with 4975 additions and 56 deletions
+1 -16
View File
@@ -84,21 +84,6 @@ if (Tools::isSubmit('ajaxProductManufacturers'))
}
}
if (Tools::isSubmit('ajaxProductQuantity'))
{
require_once(dirname(__FILE__).'/tabs/AdminCatalog.php');
$catalog = new AdminCatalog();
$admin = new AdminProducts();
$languages = Language::getLanguages(false);
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
$product = new Product((int)(Tools::getValue('id_product')));
if (!Validate::isLoadedObject($product))
die (Tools::displayError('Product cannot be loaded'));
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
echo $admin->ajaxProductQuantity($product);
}
if (Tools::isSubmit('ajaxReferrers'))
{
@@ -571,7 +556,7 @@ if (Tools::isSubmit('helpAccess'))
if (isset($item) AND isset($isoUser) AND isset($country))
die(HelpAccess::displayHelp($item, $isoUser, $country, $version));
die();
die('{nohelp}');
}
if (Tools::isSubmit('getHookableList'))
+1 -1
View File
@@ -4772,4 +4772,4 @@ class AdminProducts extends AdminTab
$this->displayErrors();
}
}
}
+16 -12
View File
@@ -36,23 +36,25 @@ input.button[disabled=disabled]:hover{background-color:#FFF6D3}
fieldset{background:#FFFFF0;border:1px solid #DFD5C3;font-size:1.1em;margin:0;padding:1em}
legend{background:#FFF6D3;border:1px solid #DFD5C3;font-weight:700;margin:0;padding:.2em .5em;text-align:left}
#menu{float:left;height:30px;line-height:normal;margin:10px 0 0;*margin:7px 0 0;padding:0;width:100%;padding:0 1px}
#menu li{background:url(bg-tab.png) repeat-x 0 -2px;float:left;height:29px;list-style:none;margin:0 1px 0 0;list-style:none;display:block;border:1px solid #999999;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px}
#menu li a{color:#000;display:block;height:20px;padding:8px 6px 4px 0;font-weight:bold;font-size:0.95em;}
#menu li.maintab{background:url(bg-tab.png) repeat-x 0 -2px;float:left;height:29px;list-style:none;margin:0 1px 0 0;list-style:none;display:block;border:1px solid #999999;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px}
#menu li.submenu_size .title{color:#000;display:block;height:20px;padding:8px 6px 4px 0;font-weight:bold;font-size:0.95em;}
#menu li.submenu_size .title{_display:inline;_padding:6px 5px 4px 0}
#menu li{_height:32px;_padding-top:3px}
#menu img{display:inline;padding:0 3px 0 6px;vertical-align:top;width:16px;height:16px}
#menu li.active,#menu li:hover{background-position:0 -38px;white-space:nowrap;}
#menu li.active a{color:#000}
#submenu{background:#ECEADE;clear:both;color:#666;margin:0;padding:0;border:1px solid #999999}
.submenu{background:#ECEADE;clear:both;color:#666;margin:0;padding:0;border:1px solid #999999;z-index:9999}
.withLeftBorder{background:transparent url(separator_subnav.png) no-repeat 0 5px}
#submenu li{display:inline;list-style:none;margin:0;background:transparent url(separator_subnav.png) no-repeat right 0;padding-left:7px;padding-right:7px;margin-top:8px;float:left;height:29px}
#submenu li a{text-decoration:underline}
#menu li{_height:32px;_padding-top:3px}
#menu li a{_display:inline;_padding:6px 5px 4px 0}
.tab-page {border:1px solid #ccc;background:#FFFFF0}
.tab-row .tab.selected {border:1px solid #ccc;background:#FFF6D3;margin:1px -3px -3px 0px;top:-2px}
.tab-row .tab {background:#EFEFEF}
.submenu li{list-style:none;margin:0;padding-left:7px;padding-right:7px;margin-top:8px;float:left;height:16px;}
.submenu li a{text-decoration:underline}
.tab-row {height:24px;width:100px;margin-left:25px;border:1px solid #cccccc}
.tab-row .tab .selected {background:#FFF6D3;margin:1px -3px -3px 25px;top:-2px;background-color:#eeeeee}
.tab-row .tab {background:#EFEFEF;width:100px;}
.tab-row .tab-page.selected {background:#FFF6D3;font-weight:bold;margin:1px -3px -3px 0px;top:-2px;background-color:#eeeeee}
.tab-row .tab-page {background:#EFEFEF;width:100px;}
hr {height: 1px;color:#E0D0B1;background-color:#E0D0B1}
#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}
#content {background-color:#FFF;border-left:1px solid #999999;border-right:1px solid #999999}
#content {background-color:#FFF;border-left:1px solid #999999;border-right:1px solid #999999; border-top:1px solid #999999}
input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #E0D0B1}
select {border: 1px solid #E0D0B1}
select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA}
@@ -85,4 +87,6 @@ a.module_toggle_all{color: #268CCD;}
.notifs_wrapper ul li {text-decoration: none;list-style: none;font-size:12px;padding:5px 0;}
#header_infos .notifs_wrapper a {font-weight: bold;color: black;}
.notifs_wrapper p {font-size: 12px;padding-top:8px;margin:0;border-top: 2px solid #E0E0E0;}
.notifs_wrapper p.no_notifs {border: none;}
.notifs_wrapper p.no_notifs {border: none;}
.productTabs ol{padding:0;}
.productTabs{background-color:#e0e0e0;border:1px solid #cccccc;position:absolute;top:100px;left:50px;}
+7 -6
View File
@@ -23,9 +23,9 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{include file='header.tpl'}
{if $display_header}
{include file='header.tpl'}
{/if}
{if isset($conf)}
<div class="conf">
<img src="../img/admin/ok2.png" alt="" />{$conf}
@@ -61,7 +61,7 @@
</div>
{/if}
{if count($informations) && $informations}
{if isset($informations) && count($informations) && $informations}
<div class="hint clear" style="display:block;">
{foreach $informations as $info}
{$info}
@@ -115,5 +115,6 @@
{/if}
{$page}
{include file='footer.tpl'}
{if $display_footer}
{include file='footer.tpl'}
{/if}
+1 -1
View File
@@ -108,4 +108,4 @@
</td>
{/if}
</tr>
{/foreach}
{/foreach}
@@ -0,0 +1,181 @@
<link href="../css/fileuploader.css" rel="stylesheet" type="text/css">
<script src="../js/fileuploader.js" type="text/javascript"></script>
<script src="../js/jquery/ui/jquery.ui.core.min.js" type="text/javascript"></script>
<script src="../js/jquery/ui/jquery.ui.widget.min.js" type="text/javascript"></script>
<script src="../js/jquery/ui/jquery.ui.progressbar.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/admin.js"></script>
{if isset($product_tabs)}
<div class="productTabs">
<ol class="tab">
{foreach $product_tabs key=numStep item=tab}
<li class="tab-row">
<a class="tab-page" id="link-{$tab.name}" href="{$tab.href}">{$tab.name}</a>{*todo href when nojs*}
</li>
{/foreach}
</ol>
</div>
<script type="text/javascript">
var toload = new Array();
var pos_select = {$pos_select};
$(document).ready(function(){
$(".tab-page").click(function(e){
e.preventDefault();
id = $(this).attr('id').substr(5);
$(".tab-page").removeClass('selected');
$("#product-tab-content").html("... LOADING ...");
$("#link-"+id).addClass('selected');
myurl = $(this).attr("href")+"&ajax=1";
$.ajax({
url : myurl,
async : true,
success :function(data)
{
$("#product-tab-content").html(data);
var languages = new Array();
if (id == 3)
populate_attrs();
if (id == 7)
{
$("#addAttachment").click(function() {
return !$("#selectAttachment1 option:selected").remove().appendTo("#selectAttachment2");
});
$("#removeAttachment").click(function() {
return !$("#selectAttachment2 option:selected").remove().appendTo("#selectAttachment1");
});
$("#product").submit(function() {
$("#selectAttachment1 option").each(function(i) {
$(this).attr("selected", "selected");
});
});
}
}
});
});
});
</script>
{***********************************************}
{********** TO CHECK !!!!!!!!!!!!!!! ***********}
<script type="text/javascript">
// <![CDATA[
ThickboxI18nImage = "{l s='Image'}";
ThickboxI18nOf = "{l s='of'}";
ThickboxI18nClose = "{l s='Close'}";
ThickboxI18nOrEscKey = "{l s='(or "Esc")'}";
ThickboxI18nNext = "{l s='Next >'}";
ThickboxI18nPrev = "{l s='< Previous'}";
tb_pathToImage = "../img/loadingAnimation.gif";
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
function toggleVirtualProduct(elt)
{
$("#is_virtual_file_product").hide();
$("#virtual_good_attributes").hide();
if (elt.checked)
{
$('#virtual_good').show('slow');
$('#virtual_good_more').show('slow');
getE('out_of_stock_1').checked = 'checked';
getE('out_of_stock_2').disabled = 'disabled';
getE('out_of_stock_3').disabled = 'disabled';
getE('label_out_of_stock_2').setAttribute('for', '');
getE('label_out_of_stock_3').setAttribute('for', '');
}
else
{
$('#virtual_good').hide('slow');
$('#virtual_good_more').hide('slow');
getE('out_of_stock_2').disabled = false;
getE('out_of_stock_3').disabled = false;
getE('label_out_of_stock_2').setAttribute('for', 'out_of_stock_2');
getE('label_out_of_stock_3').setAttribute('for', 'out_of_stock_3');
}
}
function uploadFile()
{
$.ajaxFileUpload (
{
url:'./uploadProductFile.php',
secureuri:false,
fileElementId:'virtual_product_file',
dataType: 'xml',
success: function (data, status)
{
data = data.getElementsByTagName('return')[0];
var result = data.getAttribute("result");
var msg = data.getAttribute("msg");
var fileName = data.getAttribute("filename")
if(result == "error")
$("#upload-confirmation").html('<p>error: ' + msg + '</p>');
else
{
$('#virtual_product_file').remove();
$('#virtual_product_file_label').hide();
$('#file_missing').hide();
$('#delete_downloadable_product').show();
$('#virtual_product_name').attr('value', fileName);
$('#upload-confirmation').html(
'<a class="link" href="get-file-admin.php?file='+msg+'&filename='+fileName+'">{l s='The file'}&nbsp;"' + fileName + '"&nbsp;{l s='has successfully been uploaded'}</a>' +
'<input type="hidden" id="virtual_product_filename" name="virtual_product_filename" value="' + msg + '" />');
}
}
}
);
}
function uploadFile2()
{
var link = '';
$.ajaxFileUpload (
{
url:'./uploadProductFileAttribute.php',
secureuri:false,
fileElementId:'virtual_product_file_attribute',
dataType: 'xml',
success: function (data, status)
{
data = data.getElementsByTagName('return')[0];
var result = data.getAttribute("result");
var msg = data.getAttribute("msg");
var fileName = data.getAttribute("filename");
if(result == "error")
$("#upload-confirmation2").html('<p>error: ' + msg + '</p>');
else
{
$('#virtual_product_file_attribute').remove();
$('#virtual_product_file_label').hide();
$('#file_missing').hide();
$('#delete_downloadable_product_attribute').show();
$('#virtual_product_name_attribute').attr('value', fileName);
$('#upload-confirmation2').html(
'<a class="link" href="get-file-admin.php?file='+msg+'&filename='+fileName+'">{l s='The file'}&nbsp;"' + fileName + '"&nbsp;{l s='has successfully been uploaded'}</a>' +
'<input type="hidden" id="virtual_product_filename_attribute" name="virtual_product_filename_attribute" value="' + msg + '" />');
link = $("#delete_downloadable_product_attribute").attr('href');
$("#delete_downloadable_product_attribute").attr('href', link+"&file="+msg);
}
}
}
);
}
//]]>
</script>
<form action="{$form_action}" method="post" enctype="multipart/form-data" name="product" id="product">
{$draft_warning}
<input type="hidden" name="id_product" value="{$id_product}" />
<input type="hidden" name="tabs" id="tabs" value="0" />
<div class="tab-pane" id="tabPane1">
<div id="product-tab-content">
{$content}
</div>
</form>
<br/>
<a href="{$link->getAdminLink('AdminCatalog')}"><img src="../img/admin/arrow2.gif" />{l s='Back to list'}</a><br/>
{else}
{$content}
{/if}
@@ -0,0 +1,130 @@
<div class="tab-page" id="step2">
<h4 class="tab" >2. {l s='Images'} (<span id="countImage">{$countImages}</span>)</h4>
<table cellpadding="5">
<tr>
<td><b>{if isset($id_image)}{l s='Edit this product image'}{else}{l s='Add a new image to this product'}{/if}</b></td>
</tr>
</table>
<hr style="width: 100%;" /><br />
<table cellpadding="5" style="width:100%">
<tr>
<td class="col-left">{l s='File:'}</td>
<td style="padding-bottom:5px;">
<div id="file-uploader">
<noscript>
<p>{l s='Please enable JavaScript to use file uploader:'}</p>
</noscript>
</div>
<div id="progressBarImage" class="progressBarImage"></div>
<div id="showCounter" style="display:none;"><span id="imageUpload">0</span><span id="imageTotal">0</span></div>
<ul id="listImage"></ul>
<script type="text/javascript">var upbutton = "{l s='Upload a file'}"; </script>
<script type="text/javascript">
function deleteImg(id)
{
var conf = confirm("{l s='Are you sure?'}");
if (conf)
$.post(
"ajax-tab.php",
{
action: "deleteImage",
id_image:id,
id_product : "{$id_product}",
id_category : "{$id_category_default}",
token : "{$token}",
tab : "AdminProducts",
ajax : 1,
updateproduct : 1},
function (data) {
if (data)
{
cover = 0;
if(data.imageDeleted)
{
if ($("#tr_" + id).find(".covered").attr("src") == "../img/admin/enabled.gif")
cover = 1;
$("#tr_" + id).remove();
}
if (cover)
$("#imageTable tr").eq(1).find(".covered").attr("src", "../img/admin/enabled.gif");
$("#countImage").html(parseInt($("#countImage").html()) - 1);
// refreshImagePositions($("#imageTable"));
}
});
return false;
}
function delQueue(id)
{
$("#img" + id).fadeOut("slow");
$("#img" + id).remove();
}
$(document).ready(function () {
var filecheck = 1;
var uploader = new qq.FileUploader({
element: document.getElementById("file-uploader"),
action: "ajax-tab.php",
debug: false,
params: {
id_product : "{$id_product}",
id_category : "{$id_category_default}",
token : "{$token}",
tab : "AdminProducts",
updateproduct : 1,
addImage : 1,
ajaxMode : 1,
ajax: 1,
},
onComplete: function(id, fileName, responseJSON){
var percent = ((filecheck * 100) / nbfile);
$("#progressBarImage").progressbar({
value: percent
});
if (percent != 100)
{
$("#imageUpload").html(parseInt(filecheck));
$("#imageTotal").html(" / " + parseInt(nbfile) + " {l s='Images'}");
$("#progressBarImage").show();
$("#showCounter").show();
}
else
{
$("#progressBarImage").progressbar({
value: 0
});
$("#progressBarImage").hide();
$("#showCounter").hide();
nbfile = 0;
filecheck = 0;
}
if (responseJSON.success)
{
$("#imageTable tr:last").after(responseJSON.success);
$("#countImage").html(parseInt($("#countImage").html()) + 1);
$("#img" + id).remove();
}
else
{
$("#img" + id).addClass("red");
$("#img" + id + " .errorImg").html(responseJSON.error);
$("#img" + id + " .errorImg").show();
}
if (percent >= 100)
{
refreshImagePositions($("#imageTable"));
}
filecheck++;
},
onSubmit: function(id, filename){
$("#imageTable").show();
$("#listImage").append("<li id=\'img"+id+"\'><div class=\"float\" >" + filename + "</div></div><a style=\"margin-left:10px;\" href=\"javascript:delQueue(" + id +");\"><img src=\"../img/admin/disabled.gif\" alt=\"\" border=\"0\"></a><p class=\"errorImg\"></p></li>");
},
});
});
</script>
{$content}
@@ -0,0 +1,90 @@
<div class="" id="step1">
<h4 class="tab">1. {l s='Info.'}</h4>
<script type="text/javascript">
$(document).ready(function() {
updateCurrentText();
updateFriendlyURL();
$.ajax({
url: "ajax-tab.php",
cache: false,
dataType: "json",
data: {
ajaxProductManufacturers:"1",
ajax : '1',
token : "{$token}",
controller : "AdminProducts",
action : "productManufacturers",
},
success: function(j) {
var options = $("select#id_manufacturer").html();
if (j)
for (var i = 0; i < j.length; i++)
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
$("select#id_manufacturer").replaceWith("<select id=\"id_manufacturer\">"+options+"</select>");
},
error: function(XMLHttpRequest, textStatus, errorThrown)
{
$("select#id_manufacturer").replaceWith("<p id=\"id_manufacturer\">[TECHNICAL ERROR] ajaxProductManufacturers: "+textStatus+"</p>");
}
});
$.ajax({
url: "ajax-tab.php",
cache: false,
dataType: "json",
data: {
ajaxProductSuppliers:"1",
ajax : '1',
token : "{$token}",
controller : "AdminProducts",
action : "productSuppliers",
},
success: function(j) {
var options = $("select#id_supplier").html();
if (j)
for (var i = 0; i < j.length; i++)
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
$("select#id_supplier").replaceWith("<select id=\"id_supplier\">"+options+"</select>");
},
error: function(XMLHttpRequest, textStatus, errorThrown)
{
$("select#id_supplier").replaceWith("<p id=\"id_supplier\">[TECHNICAL ERROR] ajaxProductSuppliers : "+textStatus+"</p>");
}
});
if ($('#available_for_order').is(':checked')){
$('#show_price').attr('checked', 'checked');
$('#show_price').attr('disabled', 'disabled');
}
else {
$('#show_price').attr('disabled', '');
}
});
</script>
<b>{l s='Product global information'}</b>&nbsp;-&nbsp;
<h3>{l s='Current product:'}<span id="current_product" style="font-weight: normal;">{l s='no name'}</span></h3>
<script type="text/javascript">
{$combinationImagesJs}
$(document).ready(function(){
$('#id_mvt_reason').change(function(){
updateMvtStatus($(this).val());
});
updateMvtStatus($(this).val());
});
function updateMvtStatus(id_mvt_reason)
{
if (id_mvt_reason == -1)
return $('#mvt_sign').hide();
if ($('#id_mvt_reason option:selected').attr('rel') == -1)
$('#mvt_sign').html('<img src="../img/admin/arrow_down.png" /> {l s='Decrease your stock'}');
else
$('#mvt_sign').html('<img src="../img/admin/arrow_up.png" /> {l s='Increase your stock'}');
$('#mvt_sign').show();
}
</script>
{$content}
@@ -0,0 +1,59 @@
<a href="#" onclick="$('#add_specific_price').slideToggle();return false;"><img src="../img/admin/add.gif" alt="" />{l s='Add a new specific price'}</a>
<div id="add_specific_price" style="display: none;">
<input type="hidden" name="sp_id_shop" value="0" />
<label>{l s='For:'}</label>
<div class="margin-form">
<select name="sp_id_shop">
<option value="0">{l s='All shops'}</option>
{foreach from=$shops item=shop}
<option value="{$shop['id_shop']}">{$shop['name']|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
<select name="sp_id_currency" id="spm_currency_0" onchange="changeCurrencySpecificPrice(0);">
<option value="0">{l s='All currencies'}</option>
{foreach from=$currencies item=currency}
<option value="{$currency['id_currency']}">{$currency['name']|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
<select name="sp_id_country">
<option value="0">{l s='All countries'}</option>
{foreach from=$countries item=country}
<option value="{$country['id_country']}">{$country['name']|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
<select name="sp_id_group">
<option value="0">{l s='All groups'}</option>
{foreach from=$groups item=group}
<option value="'.(int)($group['id_group']).'">'.{$group['name']}</option>
{/foreach}
</select>
</div>
<label>{l s='Available from:'}</label>
<div class="margin-form">
<input class="datepicker" type="text" name="sp_from" value="" style="text-align: center" id="sp_from" /><span style="font-weight:bold; color:#000000; font-size:12px"> {l s='to'}</span>
<input class="datepicker" type="text" name="sp_to" value="" style="text-align: center" id="sp_to" />
</div>
<label>{l s='Starting at'}</label>
<div class="margin-form">
<input type="text" name="sp_from_quantity" value="1" size="3" /> <span style="font-weight:bold; color:#000000; font-size:12px">{l s='unit'}</span>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".datepicker").datepicker({
prevText: '',
nextText: ''
});
});
</script>
<label>{l s='Product price'}
{if $country_display_tax_label}
{l s='(tax excl.):'}
{/if}
</label>
{$content}
+9 -3
View File
@@ -320,12 +320,19 @@
'AdminBackupController' => '',
'AdminCarriersControllerCore' => 'controllers/admin/AdminCarriersController.php',
'AdminCarriersController' => '',
'AdminCatalogController' => 'controllers/admin/AdminCatalogController.php',
'AdminContactsControllerCore' => 'controllers/admin/AdminContactsController.php',
'AdminContactsController' => '',
'AdminCountriesControllerCore' => 'controllers/admin/AdminCountriesController.php',
'AdminCountriesController' => '',
'AdminCurrenciesControllerCore' => 'controllers/admin/AdminCurrenciesController.php',
'AdminCurrenciesController' => '',
'AdminDbControllerCore' => 'controllers/admin/AdminDbController.php',
'AdminDbController' => '',
'AdminDeliverySlipControllerCore' => 'controllers/admin/AdminDeliverySlipController.php',
'AdminDeliverySlipController' => '',
'AdminEmailsControllerCore' => 'controllers/admin/AdminEmailsController.php',
'AdminEmailsController' => '',
'AdminGendersController' => 'controllers/admin/AdminGendersController.php',
'AdminGroupShopControllerCore' => 'controllers/admin/AdminGroupShopController.php',
'AdminGroupShopController' => '',
@@ -333,10 +340,10 @@
'AdminHomeController' => 'override/controllers/admin/AdminHomeController.php',
'AdminImagesController' => 'controllers/admin/AdminImagesController.php',
'AdminOrderMessageController' => 'controllers/admin/AdminOrderMessageController.php',
'AdminProductsController' => 'controllers/admin/AdminProductsController.php',
'AdminQuickAccessesController' => 'controllers/admin/AdminQuickAccessesController.php',
'AdminRequestSqlControllerCore' => 'controllers/admin/AdminRequestSqlController.php',
'AdminRequestSqlController' => '',
'AdminReturnStatesController' => 'controllers/admin/AdminReturnStatesController.php',
'AdminSearchEnginesControllerCore' => 'controllers/admin/AdminSearchEnginesController.php',
'AdminSearchEnginesController' => '',
'AdminShopUrlControllerCore' => 'controllers/admin/AdminShopUrlController.php',
@@ -345,13 +352,12 @@
'AdminStatesController' => '',
'AdminStockControllerCore' => 'controllers/admin/AdminStockController.php',
'AdminStockController' => '',
'AdminStockCoverController' => 'controllers/admin/AdminStockCoverController.php',
'AdminStockInstantStateControllerCore' => 'controllers/admin/AdminStockInstantStateController.php',
'AdminStockInstantStateController' => '',
'AdminStockManagementController' => 'controllers/admin/AdminStockManagementController.php',
'AdminStoresControllerCore' => 'controllers/admin/AdminStoresController.php',
'AdminStoresController' => '',
'AdminTaxRulesGroupControllerCore' => 'controllers/admin/AdminTaxRulesGroupController.php',
'AdminTaxRulesGroupController' => '',
'AdminToolsControllerCore' => 'controllers/admin/AdminToolsController.php',
'AdminToolsController' => 'override/controllers/admin/AdminToolsController.php',
'AdminTrackingController' => 'controllers/admin/AdminTrackingController.php',
@@ -25,17 +25,14 @@
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
include(_PS_ADMIN_DIR_.'/tabs/AdminCategories.php');
include(_PS_ADMIN_DIR_.'/tabs/AdminProducts.php');
class AdminCatalog extends AdminTab
class AdminCatalogController extends AdminController
{
/** @var object AdminCategories() instance */
private $adminCategories;
//private $adminCategories;
/** @var object AdminProducts() instance */
private $adminProducts;
// private $adminProducts;
/** @var object AttributeGenerator() instance */
private $attributeGenerator;
@@ -73,8 +70,8 @@ class AdminCatalog extends AdminTab
die('Category cannot be loaded');
$this->table = array('category', 'product');
$this->adminCategories = new AdminCategories();
$this->adminProducts = new AdminProducts();
// $this->adminCategories = new AdminCategories();
// $this->adminProducts = new AdminProducts();
parent::__construct();
}
@@ -108,7 +105,7 @@ class AdminCatalog extends AdminTab
}
$this->attributeGenerator->postProcess();
}
$this->adminProducts->postProcess($this->token);
// $this->adminProducts->postProcess($this->token);
}
public function ajaxProcess()
{
@@ -132,7 +129,7 @@ class AdminCatalog extends AdminTab
$this->imageResize->displayErrors();
}
public function display()
public function initContent()
{
// @todo : this has to be dealt in AdminAttributeGenerator !!
if (isset($_GET['attributegenerator']))
@@ -160,13 +157,7 @@ class AdminCatalog extends AdminTab
if (Tools::getValue($tab.'Orderby') && Tools::getValue($tab.'Orderway'))
$catBarIndex = preg_replace('/&'.$tab.'Orderby=([a-z _]*)&'.$tab.'Orderway=([a-z]*)/i', '', self::$currentIndex);
echo '<div class="cat_bar"><span style="color: #3C8534;">'.$this->l('Current category').' :</span>&nbsp;&nbsp;&nbsp;'.getPath($catBarIndex, $id_category, '', '', 'catalog', $home).'</div>';
//echo '<h2>'.$this->l('Categories').'</h2>';
echo '<h1><a class="button" href="'.$this->context->link->getAdminLink('AdminCategories').'">'.$this->l('Categories').'</a></h1>';
//$this->adminCategories->display($this->token);
echo '<div style="margin:10px">&nbsp;</div>';
echo '<h1><a class="button" href="'.$this->context->link->getAdminLink('AdminProducts').'">'.$this->l('Products').'</a></h1>';
//$this->adminProducts->display($this->token);
$this->context->smarty->assign('cat_bar',getPath($catBarIndex, $id_category, '', '', 'catalog', $home));
}
}
}
File diff suppressed because it is too large Load Diff
+3
View File
@@ -1713,3 +1713,6 @@ div.progressBarImage
text-align: center;
float: left;
}
#menu .submenu_size .submenu { display: none; position:absolute}
#menu .submenu_size:hover > .submenu { display: block; }
.submenu li{float:none;clear:left;}