Skip to content
Browse files

replaced checkboxes with red crosses

removed the submit button
reduced width for the last two columns
  • Loading branch information...
1 parent b6a1765 commit fe7b0b72acb4f665eb5fa8f3751cdfd9c08b73a9 emanuele committed Jan 19, 2012
Showing with 15 additions and 13 deletions.
  1. +8 −11 IntegrationHooks.template.php
  2. +7 −2 Subs-IntegrationHooks.php
View
19 IntegrationHooks.template.php
@@ -23,21 +23,18 @@ function integrationHooks_switchstatus(id)
else if (elem.value == \'disable\')
elem.value = \'enable\';
- deselectAll(elem.form);
-
document.forms["' . $context['default_list'] . '"].submit();
}
- function deselectAll(oForm, sMask, bIgnoreDisabled)
+ function integrationHooks_remove(id)
{
- for (var i = 0; i < oForm.length; i++)
- {
- if (!(\'name\' in oForm[i]) || (typeof(sMask) == \'string\' && oForm[i].name.substr(0, sMask.length) != sMask && oForm[i].id.substr(0, sMask.length) != sMask))
- continue;
-
- if (!oForm[i].disabled || (typeof(bIgnoreDisabled) == \'boolean\' && bIgnoreDisabled))
- oForm[i].checked = false;
- }
+ var elem = document.getElementById(\'input_remove_\'+id);
+ if (elem.value == \'enable\')
+ elem.value = \'disable\';
+ else if (elem.value == \'disable\')
+ elem.value = \'enable\';
+
+ document.forms["' . $context['default_list'] . '"].submit();
}
// ]]></script>';
}
View
9 Subs-IntegrationHooks.php
@@ -161,11 +161,16 @@ function list_integration_hooks()
),
'check' => array(
'header' => array(
- 'value' => $txt['hooks_button_remove'] . ' <input type="checkbox" onclick="invertAll(this, this.form);" class="input_check" />',
+ 'value' => $txt['hooks_button_remove'],
),
'data' => array(
'function' => create_function('$data', '
- return \'<input type="checkbox" name="remove[\' . $data[\'hook_name\'] . \'][]" value="\' . $data[\'function_name\'] . \'"\' . ($data[\'hook_exists\'] ? \' disabled="disabled"\' : \'\') . \' class="input_check" />\';
+ if (!$data[\'hook_exists\'])
+ return \'
+ <a href="" onclick="integrationHooks_remove(this.id); return false;" id="remove_\' . $data[\'id\'] . \'">
+ <img src="\' . $settings[\'images_url\'] . \'/admin/post_moderation_\' . $data[\'status\'] . \'.gif" alt="\' . $data[\'img_text\'] . \'" title="\' . $data[\'img_text\'] . \'" />
+ </a>
+ <input id="input_remove_\' . $data[\'id\'] . \'" type="hidden" name="remove[\' . $data[\'hook_name\'] . \'][\' . $data[\'function_name\'] . \']" value="\' . ($data[\'enabled\'] ? \'enable\' : \'disable\') . \'" />\';
'),
'class' => 'centertext',
),

0 comments on commit fe7b0b7

Please sign in to comment.
Something went wrong with that request. Please try again.