// Groups and language bootsrapify

This commit is contained in:
Jerome Nadaud
2013-10-01 15:14:46 +02:00
parent 14b584fc01
commit 759a3e191a
3 changed files with 8 additions and 9 deletions
@@ -103,7 +103,7 @@
} }
else else
{ {
$('#group_discount_category_table').append('<tr class="alt_row" id="'+jsonData.id_category+'"><td>'+jsonData.catPath+'</td><td>{l s='Discount:'}'+jsonData.discount+'{l s='%'}</td><td><a href="#" onclick="deleteCategoryReduction('+jsonData.id_category+');"><img src="../img/admin/delete.gif"></a></td></tr>'); $('#group_discount_category_table').append('<tr class="alt_row" id="'+jsonData.id_category+'"><td>'+jsonData.catPath+'</td><td>{l s='Discount:'}'+jsonData.discount+'{l s='%'}</td><td><a href="#" onclick="deleteCategoryReduction('+jsonData.id_category+');" class="btn btn-default"><i class="icon-trash"></i> {l s='Delete'}</a></td></tr>');
var input_hidden = document.createElement("input"); var input_hidden = document.createElement("input");
input_hidden.setAttribute('type', 'hidden'); input_hidden.setAttribute('type', 'hidden');
@@ -123,7 +123,6 @@
function initFancyBox() function initFancyBox()
{ {
$('[name="id_category"]:checked').removeAttr('checked'); $('[name="id_category"]:checked').removeAttr('checked');
collapseAllCategories();
$('#category_reduction_fancybox').val('0.00'); $('#category_reduction_fancybox').val('0.00');
} }
</script> </script>
@@ -136,8 +135,8 @@
<td>{$category.path}</td> <td>{$category.path}</td>
<td>{l s='Discount: %d%%' sprintf=$category.reduction}</td> <td>{l s='Discount: %d%%' sprintf=$category.reduction}</td>
<td> <td>
<a href="#" onclick="deleteCategoryReduction({$category.id_category});"> <a href="#" onclick="deleteCategoryReduction({$category.id_category});"class="btn btn-default">
<img src="../img/admin/delete.gif"> <i class="icon-trash"></i> {l s='Delete'}
</a> </a>
<input type="hidden" class="category_reduction" name="category_reduction[{$category.id_category}]" value="{$category.reduction}"> <input type="hidden" class="category_reduction" name="category_reduction[{$category.id_category}]" value="{$category.reduction}">
</td> </td>
+2 -2
View File
@@ -339,7 +339,7 @@ class AdminGroupsControllerCore extends AdminController
$category['reduction'] = $category_reduction[$category['id_category']]; $category['reduction'] = $category_reduction[$category['id_category']];
$category_reductions[(int)$category['id_category']] = array( $category_reductions[(int)$category['id_category']] = array(
'path' => getPath(self::$currentIndex.'?tab=AdminCategories', (int)$category['id_category']), 'path' => getPath(Context::getContext()->link->getAdminLink('AdminCategories'), (int)$category['id_category']),
'reduction' => (float)$category['reduction'] * 100, 'reduction' => (float)$category['reduction'] * 100,
'id_category' => (int)$category['id_category'] 'id_category' => (int)$category['id_category']
); );
@@ -349,7 +349,7 @@ class AdminGroupsControllerCore extends AdminController
foreach ($category_reduction as $key => $val) foreach ($category_reduction as $key => $val)
if (!array_key_exists($key, $category_reductions)) if (!array_key_exists($key, $category_reductions))
$category_reductions[(int)$key] = array( $category_reductions[(int)$key] = array(
'path' => getPath(self::$currentIndex.'?tab=AdminCategories', $key), 'path' => getPath(Context::getContext()->link->getAdminLink('AdminCategories'), $key),
'reduction' => (float)$val * 100, 'reduction' => (float)$val * 100,
'id_category' => (int)$key 'id_category' => (int)$key
); );
@@ -91,9 +91,9 @@ class AdminLanguagesControllerCore extends AdminController
); );
$this->bulk_actions = array( $this->bulk_actions = array(
'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash'),
'enableSelection' => array('text' => $this->l('Enable selection')), 'enableSelection' => array('text' => $this->l('Enable selection'), 'icon' => 'icon-ok'),
'disableSelection' => array('text' => $this->l('Disable selection')) 'disableSelection' => array('text' => $this->l('Disable selection'), 'icon' => 'icon-ban-circle')
); );
$this->specificConfirmDelete = $this->l('When you delete a language, all related translations in the database will be deleted. Are you sure you want to proceed?'); $this->specificConfirmDelete = $this->l('When you delete a language, all related translations in the database will be deleted. Are you sure you want to proceed?');