mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
Finishing fix of Trac449:display selection of favorite organizations
SVN:trunk[1526]
This commit is contained in:
@@ -63,18 +63,16 @@ function DisplayPreferences($oP)
|
||||
// All checked
|
||||
$oP->add_ready_script(
|
||||
<<<EOF
|
||||
var pager = $('#user_prefs form .pager');
|
||||
if (pager.length > 0)
|
||||
if ($('#user_prefs table.pagination').length > 0)
|
||||
{
|
||||
console.log("PAGINATED display");
|
||||
// paginated display, restore the selection
|
||||
var pager = $('#user_prefs form .pager');
|
||||
$(':input[name=selectionMode]', pager).val('negative');
|
||||
$('#user_prefs table.listResults').trigger('load_selection');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("Non-paginated display");
|
||||
CheckAll('#user_prefs .listResults :checkbox:not(:disabled)', true);
|
||||
}
|
||||
EOF
|
||||
@@ -86,11 +84,10 @@ EOF
|
||||
$oP->add_ready_script(
|
||||
<<<EOF
|
||||
var aChecked = ["$sChecked"];
|
||||
var pager = $('#user_prefs form .pager');
|
||||
if (pager.length > 0)
|
||||
if ($('#user_prefs table.pagination').length > 0)
|
||||
{
|
||||
console.log("PAGINATED display");
|
||||
// paginated display, restore the selection
|
||||
var pager = $('#user_prefs form .pager');
|
||||
$(':input[name=selectionMode]', pager).val('positive');
|
||||
for (i=0; i<aChecked.length; i++)
|
||||
{
|
||||
@@ -101,7 +98,6 @@ EOF
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("Non-paginated display");
|
||||
$('#user_prefs form :checkbox[name^=selectObject]').each( function()
|
||||
{
|
||||
if ($.inArray($(this).val(), aChecked) > -1)
|
||||
|
||||
Reference in New Issue
Block a user