(function(){angular.module("silverpeas.directives").directive("suggestionboxDeletion",["context","$rootScope",function(c,b){return{restrict:"AE",templateUrl:webContext+"/suggestionBox/jsp/javaScript/angularjs/directives/suggestionbox-deletion.jsp",replace:true,link:function a(f,e,d){applyTokenSecurity("#suggestionDeletion");function g(h){jQuery("#suggestionDeletionMessage").html(h);return jQuery("#suggestionDeletion")}f.remove=function(i,k){var j=jQuery("#deleteSuggestionConfirmMessage").html().replace("@name@",i.title);var h=g(j);h.popup("confirmation",{callback:function(){if(!k){var l=f.suggestionBox;l.suggestions.remove(i.id).then(function(){b.$broadcast("suggestionModified",i.id)});return true}else{jQuery("#suggestionDeletionForm").attr("action",c.componentUriBase+"suggestions/"+i.id+"/delete").submit();return true}}})}}}}])})();