%PDF- %PDF-
Mini Shell

Mini Shell

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

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

Zerion Mini Shell 1.0