[feature/ajax] Remove not working module enable/disable ajax code

PHPBB3-10270
This commit is contained in:
Igor Wiedler 2012-03-31 00:59:49 +02:00
parent 9b971c9fb1
commit d3e7744dd6
2 changed files with 4 additions and 1 deletions

View file

@ -148,7 +148,7 @@
<tr> <tr>
<td style="width: 5%; text-align: center;">{modules.MODULE_IMAGE}</td> <td style="width: 5%; text-align: center;">{modules.MODULE_IMAGE}</td>
<td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td> <td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}" data-ajax="act-deact">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}" data-ajax="act-deact">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td> <td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td>
<td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;"> <td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;">
<!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW --> <!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW -->
{ICON_MOVE_UP_DISABLED} {ICON_MOVE_UP_DISABLED}

View file

@ -89,7 +89,9 @@ phpbb.add_ajax_callback('forum_up', function() {
phpbb.add_ajax_callback('activate_deactivate', function(res) { phpbb.add_ajax_callback('activate_deactivate', function(res) {
var el = $(this), var el = $(this),
new_href = el.attr('href'); new_href = el.attr('href');
el.text(res.text); el.text(res.text);
if (new_href.indexOf('deactivate') !== -1) if (new_href.indexOf('deactivate') !== -1)
{ {
new_href = new_href.replace('deactivate', 'activate') new_href = new_href.replace('deactivate', 'activate')
@ -98,6 +100,7 @@ phpbb.add_ajax_callback('activate_deactivate', function(res) {
{ {
new_href = new_href.replace('activate', 'deactivate') new_href = new_href.replace('activate', 'deactivate')
} }
el.attr('href', new_href); el.attr('href', new_href);
}); });