;(function($){"use strict";ips.controller.register('ips.admin.files.multimod',{initialize:function(){this.on('submit','[data-role="moderationTools"]',this.moderationSubmit);},moderationSubmit:function(e){var action=this.scope.find('[data-role="moderationAction"]').val();switch(action){case'delete':this._modActionDelete(e);break;default:$(document).trigger('moderationSubmitted');break;}},_modActionDelete:function(e){var self=this;if(self._bypassDeleteCheck){return;}
e.preventDefault();var count=parseInt(this.scope.find('[data-role="moderation"]:checked').length);ips.ui.alert.show({type:'confirm',icon:'warn',message:(count>1)?ips.pluralize(ips.getString('delete_confirm_many'),count):ips.getString('delete_confirm'),callbacks:{ok:function(){$(document).trigger('moderationSubmitted');self._bypassDeleteCheck=true;self.scope.find('[data-role="moderationTools"]').trigger('submit');}}});}});}(jQuery));;