%PDF- %PDF-
Mini Shell

Mini Shell

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

define("page/source",["jquery","memoir","stash/api/util/navbuilder","util/ajax","util/events","model/commit-range","model/file-change","model/file-content-modes","model/page-state","model/path","model/revision","model/revision-reference","widget/faux-scrollbar","feature/changeset/changeset-badge","feature/file-content","layout/page-scrolling-manager","exports"],function(E,M,P,L,A,G,J,B,K,Q,I,S,F,D,H,C,R){var N;R.onReady=function(i,s,X,g,d,W,l){C.acceptScrollForwardingRequests();var q=new F();A.on("stash.feature.fileContent.fileBlameExpandedStateChanged",function(){q.containerSizeChanged()});var p=window.location.href,V=new Q(i),f=new S(s),Z=new I(X),U=B.DIFF===g?B.DIFF:B.SOURCE;var k=new H(d,W,H.sourcePreset);A.on("memoir.changestate",function(AC){var AA,x,AD,t;var u=AC.state;if(u){AA=new Q(u.path);x=new S(u.headRef);AD=u.untilRevision?new I(u.untilRevision):null;t=u.mode?u.mode:B.SOURCE;var AE=Z?Z.getId():null,AF=AD?AD.getId():null;var v=AA.toString()!==V.toString(),z=f.getId()!==x.getId(),AB=AF!==AE,w=t!==U,y=v||z||AB||w;V=AA;Z=AD;f=x;U=t;if(z){A.trigger("stash.page.source.revisionRefChanged",null,f)}if(y){n()}p=window.location.href}else{var AG=o(Y(window.location.href),Y(p));if(!AG){window.location.reload()}}});function e(){return new G({untilRevision:Z,sinceRevision:Z.hasParents()?Z.getParents()[0]:undefined})}function Y(t){var u=t.lastIndexOf("#");return u===-1?t:t.substring(0,u-1)}function o(u,t){return u.lastIndexOf(t)===u.length-t.length}A.on("stash.feature.fileContent.optionsChanged",function(u){var t=["hideComments","hideEdiff"];if(!_.contains(t,u.key)){n()}});var b=null;function n(){if(b){b.abort();b=null}if(!Z){b=c(V,f);k.reset();b.always(function(){b=null}).done(function(t){Z=t;n()})}else{a().then(T);m(Z)}}function a(){var u=E.extend({toolbarWebFragmentLocationPrimary:"stash.file-content."+U+".toolbar.primary",toolbarWebFragmentLocationSecondary:"stash.file-content."+U+".toolbar.secondary"},H[U+"Preset"]);u.relevantContextLines=l;var t=new J({commitRange:e(),path:V,repository:K.getRepository()});return k.init(t,f,j(),u)}function T(){var u=U===B.DIFF;var t=!u&&k.$self.find(".source-container")[0];if(t){q.init(t,{hideAbove:false})}else{q.destroy();q=new F()}}function m(t){E(".branch-selector-toolbar .changeset-badge-container").empty().append(D.create(t.toJSON(),K.getRepository().toJSON())).fadeIn("fast")}function r(v,u,t,w){return{path:v.toString(),headRef:u.toJSON(),untilRevision:t?t.toJSON():null,mode:w}}function h(w,u,t,x){var v=P.currentRepo();if(x===B.DIFF){v=v.diff(new J({commitRange:new G({untilRevision:t}),path:w,repository:K.getRepository()}))}else{v=v.browse().path(w);if(t){v=v.until(t.getId())}}if(!u.isDefault()){v=v.at(u.getId())}M.pushState(r(w,u,t,x),null,v.build())}function j(){var u=window.location.hash,t=u.match(/#(\d+)/);return t&&Number(t[1])}function c(v,x){var u=P.rest().currentRepo().commit(x.getLatestChangeset());var w=L.rest({url:u.withParams({path:v.toString(),avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})}).build(),statusCode:{"404":function(){return E.Deferred().resolve({id:x.getId(),displayId:x.getDisplayId(),author:{name:"Unknown"},authorTimestamp:NaN})}}}),t=w.then(function(y){return new I(y)});A.trigger("stash.page.source.requestedRevisionData");return t.promise(w)}M.initialState(r(V,f,Z,U));a().then(T);A.on("stash.layout.branch.revisionRefChanged",function(t){if(f!==t){h(V,t,null,"source")}});A.on("stash.feature.*.untilRevisionChanged",function(t){if(Z.getId()!==t.getId()){h(V,f,t,U)}});A.on("stash.feature.*.requestedModeChange",function(t){if(U!==t){h(V,f,Z,t)}});A.on("stash.feature.sourceview.onError",function(t){E(".branch-selector-toolbar .changeset-badge-container").fadeOut("fast")});A.on("stash.layout.*.urlChanged",function(t){window.location=t});A.on("stash.feature.*.urlChanged",function(t){window.location=t});A.on("stash.widget.branchselector.dialogShown",function(){N=true});A.on("stash.widget.branchselector.dialogHidden",function(){N=false});E(window).on("hashchange",function(){p=window.location.href;if(M.nativeSupport()){M.replaceState(r(V,f,Z),null,p)}var t=window.location.hash.substring(1).match(/\d+/);A.trigger("stash.page.source.selectedLineChanged",null,t?Number(t[0]):null)});A.on("stash.widget.keyboard-shortcuts.register-contexts",function(t){t.enableContext("sourceview");t.enableContext("diff-view")});O()};function O(){A.on("stash.keyboard.shortcuts.requestOpenParentHandler",function(T){(this.execute?this:AJS.whenIType(T)).execute(function(){if(!N){var U=E(".breadcrumbs").find("a:last");if(U.length){if(M.nativeSupport()){U.click()}else{window.location.href=U.attr("href")}}}})})}});

Zerion Mini Shell 1.0