[-] BO : Bulk action management repaired
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11386 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -36,14 +36,13 @@
|
||||
var ajaxCurrentIndex = '{$ajaxCurrentIndex}';
|
||||
var by = '{l s='by'}';
|
||||
var errorLogin = '{l s='Could not login to Addons'}';
|
||||
|
||||
{if isset($smarty.get.anchor)}
|
||||
$('document').ready( function() {
|
||||
$.scrollTo('#{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''}', 1200, {literal}{offset: -100}{/literal});
|
||||
});
|
||||
{/if}
|
||||
{if isset($smarty.get.anchor)}var anchor = '{$smarty.get.anchor|htmlentities|replace:'(':''|replace:')':''|replace:'{':''|replace:'}':''}';{else}var anchor = '';{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
{literal}
|
||||
|
||||
function getPrestaStore(){if(getE("prestastore").style.display!='block')return;$.post(dirNameCurrentIndex+"/ajax.php",{page:"prestastore"},function(a){getE("prestastore-content").innerHTML=a;})}
|
||||
function truncate_author(author){return ((author.length > 20) ? author.substring(0, 20)+"..." : author);}
|
||||
function modules_management(action)
|
||||
@@ -65,7 +64,19 @@
|
||||
}
|
||||
document.location.href=currentIndex+'&token='+token+'&'+action+'='+module_list.substring(1, module_list.length);
|
||||
}
|
||||
|
||||
|
||||
$('document').ready( function() {
|
||||
|
||||
|
||||
|
||||
// ScrollTo
|
||||
if (anchor != '')
|
||||
$.scrollTo('#'+anchor, 1200, {offset: -100});
|
||||
|
||||
|
||||
|
||||
// AutoComplete Search
|
||||
$('input[name="filtername"]').autocomplete(moduleList, {
|
||||
minChars: 0,
|
||||
width: 310,
|
||||
@@ -84,13 +95,30 @@
|
||||
$('input[name="filtername"]').result(function(event, data, formatted) {
|
||||
$('#filternameForm').submit();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Method to check / uncheck all modules checkbox
|
||||
$('#checkme').click(function()
|
||||
{
|
||||
if ($(this).attr("rel") == 'false')
|
||||
{
|
||||
$(this).attr("checked", "checked");
|
||||
$(this).attr("rel", "true");
|
||||
$("input[name=modules]").attr("checked", "checked");
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).attr("checked", "");
|
||||
$(this).attr("rel", "false");
|
||||
$("input[name=modules]").attr("checked", "");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Method to reload filter in ajax
|
||||
$(document).ready(function(){
|
||||
// Method to reload filter in ajax
|
||||
$('.categoryModuleFilterLink').click(function()
|
||||
{
|
||||
$('.categoryModuleFilterLink').css('background-color', 'white');
|
||||
@@ -125,25 +153,22 @@
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
|
||||
$(document).ready(function(){
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajaxMode : "1",
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "refreshModuleList"
|
||||
// Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajaxMode : "1",
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "refreshModuleList"
|
||||
},
|
||||
success : function(res,textStatus,jqXHR)
|
||||
{
|
||||
@@ -155,12 +180,11 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
});
|
||||
catch(e) { }
|
||||
|
||||
|
||||
// Method to log on PrestaShop Addons WebServices
|
||||
$(document).ready(function(){
|
||||
|
||||
// Method to log on PrestaShop Addons WebServices
|
||||
$('#addons_login_button').click(function()
|
||||
{
|
||||
var username_addons = $("#username_addons").val();
|
||||
@@ -204,6 +228,9 @@
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
@@ -33,11 +33,7 @@
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th class="center">
|
||||
<input type="checkbox" onclick="" class="noborder" name="checkme"><br>
|
||||
<!-- TODO
|
||||
<a href="#"><img border="0" src="../img/admin/down.gif"></a>
|
||||
<a href="#"><img border="0" src="../img/admin/up_d.gif"></a>
|
||||
-->
|
||||
<input type="checkbox" rel="false" class="noborder" id="checkme"><br>
|
||||
</th>
|
||||
<th class="center"></th>
|
||||
<th>{l s='Module name'}</th>
|
||||
@@ -46,7 +42,7 @@
|
||||
<tbody>
|
||||
{foreach from=$modules item=module}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="modules" value="{$module->name}" class="noborder"></td>
|
||||
<td><input type="checkbox" name="modules" value="{$module->name}" {if !isset($module->confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if} class="noborder"></td>
|
||||
<td><img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}"></td>
|
||||
<td>
|
||||
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
|
||||
@@ -74,7 +70,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><a href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed"><span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span></a></td>
|
||||
<td><a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed"><span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
|
||||
@@ -48,6 +48,12 @@
|
||||
|
||||
<div id="moduleContainer">
|
||||
{include file='modules/list.tpl'}
|
||||
{if count($modules)}
|
||||
<div style="margin-top: 12px;">
|
||||
<input type="button" class="button big" value="Install the selection" onclick="modules_management('install')"/>
|
||||
<input type="button" class="button big" value="Uninstall the selection" onclick="modules_management('uninstall')" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -817,7 +817,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
$modules[$km]->categoryName = (isset($this->list_modules_categories[$module->tab]['name']) ? $this->list_modules_categories[$module->tab]['name'] : $this->list_modules_categories['others']['name']);
|
||||
$modules[$km]->options['install_url'] = self::$currentIndex.'&install='.urlencode($module->name).'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name);
|
||||
$modules[$km]->options['uninstall_url'] = self::$currentIndex.'&uninstall='.urlencode($module->name).'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name);
|
||||
$modules[$km]->options['uninstall_onclick'] = ((!method_exists($module, 'onclickOption')) ? ((empty($module->confirmUninstall)) ? '' : 'if(confirm(\''.addslashes($module->confirmUninstall).'\')) ').'document.location.href=\''.$modules[$km]->options['uninstall_url'].'\'' : $module->onclickOption('uninstall', $modules[$km]->options['uninstall_url']));
|
||||
$modules[$km]->options['uninstall_onclick'] = ((!method_exists($module, 'onclickOption')) ? ((empty($module->confirmUninstall)) ? '' : 'return confirm(\''.addslashes($module->confirmUninstall).'\');') : $module->onclickOption('uninstall', $modules[$km]->options['uninstall_url']));
|
||||
if (Tools::getValue('module_name') == $module->name && (int)Tools::getValue('conf') > 0)
|
||||
$modules[$km]->message = $this->_conf[(int)Tools::getValue('conf')];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user