%PDF- %PDF-
Mini Shell

Mini Shell

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

define("feature/comments/comment-model",["backbone","backbone-brace","underscore","util/navbuilder"],function(E,C,B,A){var D=C.Model.extend({namedAttributes:{anchor:null,author:null,avatarSize:null,comments:null,createdDate:"number",html:"string",id:"number",isFocused:"boolean",isUnread:"boolean",parent:null,permittedOperations:null,text:"string",updatedDate:"number",version:"number"},validate:function(F){if(!F.text||!/\S/.test(F.text)){return AJS.I18n.getText("stash.web.comment.empty")}},url:function(){var H=A.parse(C.Model.prototype.url.apply(this,arguments));var F=this.get("anchor");if(F&&F.commitRange){var G=F.commitRange.sinceRevision;if(G){H.addQueryParam("since",G.id)}}H.addQueryParam("version",this.get("version")).addQueryParam("avatarSize",this.get("avatarSize")).addQueryParam("markup",true);return H.toString()},forEachCommentInThread:function(F){F(this);B.each(this.get("comments"),function(G){G.forEachCommentInThread(F)})},sync:function(H,G,F){return E.sync(H,G,B.extend(F,{statusCode:{"404":function(N,I,M,K,L){var J=K&&K.errors&&K.errors.length&&K.errors[0];if(J&&J.message&&/comment/i.test(J.message)){if(H==="create"&&G.get("parent")!=null){return{title:AJS.I18n.getText("stash.web.comment.notfound"),message:AJS.I18n.getText("stash.web.comment.reply.parent.notfound.message"),shouldReload:true,fallbackUrl:undefined}}else{if(H==="update"){return{title:AJS.I18n.getText("stash.web.comment.notfound"),message:AJS.I18n.getText("stash.web.comment.update.notfound.message"),shouldReload:true,fallbackUrl:undefined}}}}}}}))}});C.Mixins.applyMixin(D,{namedAttributes:{comments:[D]}});return D});

Zerion Mini Shell 1.0