// Stock: Add Stock Management in admin tabs - extend HelperList to render simple lists without filter, sorting, pagination, ...

This commit is contained in:
dSevere
2011-10-18 17:11:13 +00:00
parent c7b4750e82
commit a7654b10c1
10 changed files with 364 additions and 222 deletions

View File

@@ -0,0 +1,27 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 9197 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$href}">
<img src="../img/admin/arrow_up.png" alt="{$action}" title="{$action}" /></a>

View File

@@ -41,7 +41,7 @@ $(document).ready(function() {
context: this,
async: false,
success: function(data) {
if(typeof(data.use_parent_structure) == 'undefined' || data.use_parent_structure)
if(typeof(data.use_parent_structure) == 'undefined' || (data.use_parent_structure == true))
$.each(data.data, function(it, row)
{
if($('#details_{$id}').parent().parent().hasClass('alt_row'))
@@ -65,7 +65,7 @@ $(document).ready(function() {
var content = $('<tr class="details_{$id} alt_row"></tr>');
else
var content = $('<tr class="details_{$id}"></tr>');
content.append($('<td>'+data+'</td>').attr('colspan', $('#details_{$id}').parent().parent().find('td').length));
content.append($('<td style="border:none!important;">'+data.data+'</td>').attr('colspan', $('#details_{$id}').parent().parent().find('td').length));
$('#details_{$id}').parent().parent().after(content);
}
this.dataMaped = true;

View File

@@ -0,0 +1,27 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 9197 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$href}">
<img src="../img/admin/arrow_down.png" alt="{$action}" title="{$action}" /></a>

View File

@@ -0,0 +1,27 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 9197 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$href}">
<img src="../img/admin/arrow-right.png" alt="{$action}" title="{$action}" /></a>

View File

@@ -31,7 +31,7 @@
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
>
<td class="center">
{if $bulk_actions AND isset($listSkipDelete) AND !in_array($tr.$identifier, $listSkipDelete)}
{if $bulk_actions AND array_key_exists('delete', $list_skip_actions) AND !in_array($tr.$identifier, $list_skip_actions['delete'])}
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
{/if}
</td>

View File

@@ -1,5 +1,5 @@
{*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -35,8 +35,10 @@
</td>
</tr>
</table>
{if !$simple_header}
<input type="hidden" name="token" value="{$token}" />
</form>
{/if}
{*
if (isset($this->_includeTab) AND sizeof($this->_includeTab))
echo '<br /><br />';

View File

@@ -24,7 +24,10 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{if !$simple_header}
<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(document).ready(function() {
$('.filter').keypress(function(event){
@@ -57,9 +60,12 @@
<br /><a href="{$currentIndex}&add{$table}&token={$token}"><img src="../img/admin/add.gif" border="0" /> {l s='Add new'}</a><br /><br />
{/if}
<a name="{$table}">&nbsp;</a>
<form method="post" action="{$action}" class="form">
{/if}{* End if simple_header *}
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
<table>
<table style="table-layout: fixed; width: 100%;">
{if !$simple_header}
<tr>
<td style="vertical-align: bottom;">
<span style="float: left;">
@@ -88,22 +94,25 @@
<span class="clear"></span>
</td>
</tr>
{/if}
<tr>
<td>
<td{if $simple_header} style="border:none;"{/if}>
<table
{if $table_id} id={$table_id}{/if}
class="table {if $table_dnd}tableDnd{/if}"
cellpadding="0" cellspacing="0">
cellpadding="0" cellspacing="0"
style="width: 100%; margin-bottom:10px;"
>
<thead>
<tr class="nodrag nodrop">
<th>
<th style="width:10px;">
{if $delete}
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
{/if}
</th>
{foreach $fields_display AS $key => $params}
<th {if isset($params.widthColumn)} style="width: {$params.widthColumn}px"{/if}>{$params.title}
{if !isset($params.orderby) || $params.orderby}
<th {if isset($params.widthColumn)} style="width: {if $params.widthColumn == 'auto'}auto{else}{$params.widthColumn}px{/if}"{/if}>{$params.title}
{if (!isset($params.orderby) || $params.orderby) && !$simple_header}
<br />
<a href="{$currentIndex}&{$identifier}={$id_cat}&{$table}Orderby={$key|urlencode}&{$table}Orderway=desc&token={$token}">
<img border="0" src="../img/admin/down{if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')}'_d'{/if}.gif" />
@@ -128,6 +137,7 @@
<th style="width: 52px">{l s='Actions'}</th>
{/if}
</tr>
{if !$simple_header}
<tr class="nodrag nodrop" style="height: 35px;">
<td class="center">
{if $delete}
@@ -175,4 +185,5 @@
<td class="center">--</td>
{/if}
</tr>
{/if}
</thead>