Your IP : 216.73.216.95


Current Path : /var/www/ljmtc/cbt/admin/tool/policy/amd/build/
Upload File :
Current File : /var/www/ljmtc/cbt/admin/tool/policy/amd/build/policyactions.min.js

define ("tool_policy/policyactions",["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f=function(a){this.registerEvents(a)};f.prototype.registerEvents=function(f){f.on("click",function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i=a.Deferred(),j=a.Deferred(),k=d.create({title:i,body:j,large:!0}).then(function(a){a.getRoot().on(e.hidden,function(){a.destroy()});return a}).then(function(a){a.show();return a}).catch(c.exception),l=b.call([{methodname:"tool_policy_get_policy_version",args:{versionid:g,behalfid:h}}]);a.when(l[0]).then(function(a){if(a.result.policy){i.resolve(a.result.policy.name);j.resolve(a.result.policy.content);return a}else{throw new Error(a.warnings[0].message)}}).catch(function(a){k.then(function(a){a.hide();a.destroy();return a}).catch(c.exception);return c.addNotification({message:a,type:"error"})})})};return{init:function init(b){b=a(b);return new f(b)}}});
//# sourceMappingURL=policyactions.min.js.map