%PDF- %PDF-
| Direktori : /data/old/home/stash/atlassian-stash/static/page/repository/empty/ |
| Current File : //data/old/home/stash/atlassian-stash/static/page/repository/empty/empty-repository-min.js |
define("page/repository/emptyRepository",["aui","jquery","util/ajax","util/events","model/page-state","exports"],function(E,G,F,D,C,A){function B(H,I){G("#empty-repository-instructions").html(stash.page.emptyRepositoryInstructions({repository:C.getRepository().toJSON(),cloneUrl:I,currentUser:C.getCurrentUser().toJSON()}))}D.on("stash.feature.repository.clone.protocol.initial",B);D.on("stash.feature.repository.clone.protocol.changed",B);A.onReady=function(L){if(G("#empty-repository-instructions:empty").length){B(null,C.getRepository().getCloneUrl())}if(L){var M="/browse",K=window.location.href.lastIndexOf(M),H=K===-1?window.location.href:window.location.href.substr(0,K);var O=G('<div id="initialising" />'),N=G("<h2></h2>"),I=G("#content .content-body");N.text(AJS.I18n.getText("stash.web.repository.initialising"));var J=G.browser.msie&&parseInt(G.browser.version,10)<9?I.find("pre").andBack():I;J.css("opacity",0.2);N.appendTo(O);O.appendTo(I.parent());O.spin("large");F.poll({url:H,tick:function(Q){var P=Q&&Q.state;if(P==="AVAILABLE"){return true}else{if(P==="INITIALISATION_FAILED"){return false}else{return undefined}}}}).always(function(){O.spinStop();O.remove();J.fadeTo("fast",1)}).fail(function(S,R,P,Q){I.empty().css("padding","16px");if(S.status===200){G(widget.aui.message.error({content:E.escapeHtml(Q.statusMessage)})).appendTo(I)}})}}});require("page/repository/emptyRepository");