new WCF.ACP.Category.Delete('wcf\\data\\category\\CategoryAction', $('.jsCategory'));
{/if}
{if $objectType->getProcessor()->canEditCategory()}
- new WCF.Action.Toggle('wcf\\data\\category\\CategoryAction', $('.jsCategory'), '> .buttons > .jsToggleButton');
+ new WCF.Action.Toggle('wcf\\data\\category\\CategoryAction', '.jsCategory', '> .buttons > .jsToggleButton');
{if $categoryNodeList|count > 1}
var sortableNodes = $('.sortableNode');
//<![CDATA[
$(function() {
new WCF.Action.Delete('wcf\\data\\cronjob\\CronjobAction', '.jsCronjobRow');
- new WCF.Action.Toggle('wcf\\data\\cronjob\\CronjobAction', $('.jsCronjobRow'));
+ new WCF.Action.Toggle('wcf\\data\\cronjob\\CronjobAction', '.jsCronjobRow');
new WCF.Action.SimpleProxy({
action: 'execute',
className: 'wcf\\data\\cronjob\\CronjobAction',
new WCF.Action.Delete('wcf\\data\\language\\server\\LanguageServerAction', '.jsLanguageServerRow');
{/if}
{if $__wcf->getSession()->getPermission('admin.language.canEditServer')}
- new WCF.Action.Toggle('wcf\\data\\language\\server\\LanguageServerAction', $('.jsLanguageServerRow'));
+ new WCF.Action.Toggle('wcf\\data\\language\\server\\LanguageServerAction', '.jsLanguageServerRow');
{/if}
});
//]]>
//<![CDATA[
$(function() {
new WCF.Action.Delete('wcf\\data\\page\\menu\\item\\PageMenuItemAction', '.sortableNode');
- new WCF.Action.Toggle('wcf\\data\\page\\menu\\item\\PageMenuItemAction', $('.sortableNode'));
+ new WCF.Action.Toggle('wcf\\data\\page\\menu\\item\\PageMenuItemAction', '.sortableNode');
{if $headerItems|count}
new WCF.Sortable.List('pageMenuItemHeaderList', 'wcf\\data\\page\\menu\\item\\PageMenuItemAction', undefined, { protectRoot: true }, false, { menuPosition: 'header' });
<script type="text/javascript">
//<![CDATA[
$(function() {
- new WCF.Action.Toggle('wcf\\data\\style\\StyleAction', $('.buttonList'));
+ new WCF.Action.Toggle('wcf\\data\\style\\StyleAction', '.buttonList');
new WCF.ACP.Style.List();
});
//]]>
//<![CDATA[
$(function() {
new WCF.Action.Delete('wcf\\data\\package\\update\\server\\PackageUpdateServerAction', '.jsUpdateServerRow');
- new WCF.Action.Toggle('wcf\\data\\package\\update\\server\\PackageUpdateServerAction', $('.jsUpdateServerRow'));
+ new WCF.Action.Toggle('wcf\\data\\package\\update\\server\\PackageUpdateServerAction', '.jsUpdateServerRow');
});
//]]>
</script>
this._containerSelector = containerSelector;
this._className = className;
if (toggleButtonSelector) {
- this.toggleButtonSelector = toggleButtonSelector;
+ this._toggleButtonSelector = toggleButtonSelector;
}
// initialize proxy
this.proxy = new WCF.Action.Proxy(options);
// bind event listener
- WCF.DOMNodeInsertedHandler.addCallback('WCF.Action.Delete' + this._className.hashCode(), $.proxy(this._initElements, this));
+ this._initElements();
+ WCF.DOMNodeInsertedHandler.addCallback('WCF.Action.Toggle' + this._className.hashCode(), $.proxy(this._initElements, this));
},
/**
if (!WCF.inArray($containerID, this._containers)) {
this._containers.push($containerID);
- $container.find('.jsDeleteButton').click($.proxy(this._click, this));
+ $container.find(this._toggleButtonSelector).click($.proxy(this._click, this));
}
}, this));
},
triggerEffect: function(objectIDs) {
for (var $index in this._containers) {
var $container = $('#' + this._containers[$index]);
- var $toggleButton = $container.find(this.toggleButtonSelector);
+ var $toggleButton = $container.find(this. _toggleButtonSelector);
if (WCF.inArray($toggleButton.data('objectID'), objectIDs)) {
$container.wcfHighlight();
this._toggleButton($container, $toggleButton);