!function(a,b){"use strict";function c(a,c){var d=this;c=b.extend({},c),d.$element=a,d.options=c,d.$element.on("click","[data-notification-action=archive]",function(a){a.preventDefault();var c=b(this).closest("div[data-notification-alert-id]"),e=c.attr("data-notification-alert-id"),f=c.attr("data-token");b.ajax({url:CCM_DISPATCHER_FILENAME+"/ccm/system/notification/alert/archive",dataType:"json",data:{naID:e,ccm_token:f},type:"post"}),c.queue(function(){c.addClass("animated fadeOut"),c.dequeue()}).delay(500).queue(function(){c.remove(),c.dequeue(),d.handleEmpty()})}),d.$element.on("change","div[data-form=notification] select",function(a){var c=b(this).closest("form");c.ajaxSubmit({dataType:"html",beforeSubmit:function(){d.showLoader()},success:function(a){b("div[data-wrapper=desktop-waiting-for-me]").replaceWith(a)},complete:function(){d.hideLoader()}})}),d.$element.on("click","div.ccm-pagination-wrapper a",function(a){a.preventDefault(),d.showLoader(),window.scrollTo(0,0),b.concreteAjax({loader:!1,dataType:"html",url:b(this).attr("href"),method:"get",success:function(a){b("div[data-wrapper=desktop-waiting-for-me]").replaceWith(a)},complete:function(){d.hideLoader()}})}),d.$element.on("click","a[data-workflow-task]",function(a){var c=b(this).attr("data-workflow-task"),e=b(this).closest("form"),f=b(this).closest("div[data-notification-alert-id]");a.preventDefault(),e.append('<input type="hidden" name="action_'+c+'" value="'+c+'">'),e.ajaxSubmit({dataType:"json",beforeSubmit:function(){d.showLoader()},success:function(a){f.addClass("animated fadeOut"),setTimeout(function(){f.remove(),d.handleEmpty()},500)},complete:function(){d.hideLoader()}})}),d.$element.find(".dialog-launch").dialog()}c.prototype={handleEmpty:function(){var a=this,b=a.$element.find("div[data-notification-alert-id]");b.length<1&&a.$element.find("[data-notification-description=empty]").show()},showLoader:function(){b("div[data-list=notification]").addClass("ccm-block-desktop-waiting-for-me-loading")},hideLoader:function(){b("div[data-list=notification]").removeClass()}},b.fn.concreteNotificationList=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteNotificationList=c}(this,jQuery);