From 96043b79aa61c2c386a08b75773fd0693c169aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Thu, 2 Jul 2015 13:04:36 +0200 Subject: [PATCH] 6a9d65de27669cd5a3433838bf69f3d09810ca5d --- dist/index.html | 6 +- dist/js/app-loader.js | 2 +- dist/js/app.js | 49 +++++-- dist/js/libs.js | 16 +-- dist/js/maps/app.js.map | 2 +- dist/js/maps/libs.js.map | 2 +- dist/js/templates.js | 18 +-- dist/locales/locale-de.json | 76 +++++----- dist/locales/locale-fr.json | 2 +- dist/locales/locale-zh-hant.json | 232 +++++++++++++++---------------- dist/styles/main.css | 4 +- 11 files changed, 216 insertions(+), 193 deletions(-) diff --git a/dist/index.html b/dist/index.html index eacc696..a851826 100644 --- a/dist/index.html +++ b/dist/index.html @@ -84,8 +84,8 @@

- - - + + + \ No newline at end of file diff --git a/dist/js/app-loader.js b/dist/js/app-loader.js index e7e7886..af01e32 100644 --- a/dist/js/app-loader.js +++ b/dist/js/app-loader.js @@ -1,7 +1,7 @@ (function() { var promise, version; - version = 1435131710616; + version = 1435835032000; window.taigaConfig = { "api": "http://localhost:8000/api/v1/", diff --git a/dist/js/app.js b/dist/js/app.js index 8158349..835c1f5 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -20778,15 +20778,26 @@ uploadComplete = (function(_this) { return function(evt) { return $rootScope.$apply(function() { - var data, model; + var data, model, ref, status; file.status = "done"; + status = evt.target.status; try { data = JSON.parse(evt.target.responseText); } catch (_error) { data = {}; } - model = $model.make_model(urlName, data); - return defered.resolve(model); + if (status >= 200 && status < 400) { + model = $model.make_model(urlName, data); + return defered.resolve(model); + } else { + response = { + status: status, + data: { + _error_message: (ref = data['attached_file']) != null ? ref[0] : void 0 + } + }; + return defered.reject(response); + } }); }; })(this); @@ -23189,6 +23200,9 @@ baseUrl = "https://talky.io/"; } else if (this.project.get("videoconferences") === "jitsi") { baseUrl = "https://meet.jit.si/"; + url = this.project.get("slug") + "-" + taiga.slugify(this.project.get("videoconferences_salt")); + url = url.replace(/-/g, ""); + return baseUrl + url; } else { return ""; } @@ -23708,14 +23722,14 @@ function ProfileContactsController(userService, currentUserService) { this.userService = userService; this.currentUserService = currentUserService; + this.currentUser = this.currentUserService.getUser(); + this.isCurrentUser = false; + if (this.currentUser && this.currentUser.get("id") === this.user.get("id")) { + this.isCurrentUser = true; + } } ProfileContactsController.prototype.loadContacts = function() { - this.currentUser = this.currentUserService.getUser(); - this.isCurrentUser = false; - if (this.currentUser.get("id") === this.user.get("id")) { - this.isCurrentUser = true; - } return this.userService.getContacts(this.user.get("id")).then((function(_this) { return function(contacts) { return _this.contacts = contacts; @@ -24147,8 +24161,8 @@ return this.rs.projects.getProjectStats(projectId); }; - ProjectsService.prototype.getProjectsByUserId = function(userId) { - return this.rs.projects.getProjectsByUserId(userId).then((function(_this) { + ProjectsService.prototype.getProjectsByUserId = function(userId, paginate) { + return this.rs.projects.getProjectsByUserId(userId, paginate).then((function(_this) { return function(projects) { return projects.map(_this._decorate.bind(_this)); }; @@ -24242,14 +24256,23 @@ return Immutable.fromJS(result.data); }); }; - service.getProjectsByUserId = function(userId) { - var params, url; + service.getProjectsByUserId = function(userId, paginate) { + var httpOptions, params, url; + if (paginate == null) { + paginate = false; + } url = urlsService.resolve("projects"); + httpOptions = {}; + if (!paginate) { + httpOptions.headers = { + "x-disable-pagination": "1" + }; + } params = { "member": userId, "order_by": "memberships__user_order" }; - return http.get(url, params).then(function(result) { + return http.get(url, params, httpOptions).then(function(result) { return Immutable.fromJS(result.data); }); }; diff --git a/dist/js/libs.js b/dist/js/libs.js index ed539a4..ce3f70a 100644 --- a/dist/js/libs.js +++ b/dist/js/libs.js @@ -28,14 +28,14 @@ $translate.use($translate.use())}return $fallbackWasString?$fallbackLanguage[0]: break;case"urlstrict":regExp=/^(https?|s?ftp|git):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF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dateIso":regExp=/^(\d{4})\D?(0[1-9]|1[0-2])\D?([12]\d|0[1-9]|3[01])$/;break;case"phone":regExp=/^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/}return regExp?regExp.test(val):!1},regexp:function(val,regExp,self){return new RegExp(regExp,self.options.regexpFlag||"").test(val)},minlength:function(val,min){return val.length>=min},maxlength:function(val,max){return val.length<=max},rangelength:function(val,arrayRange){return val.length>=arrayRange[0]&&val.length<=arrayRange[1]},min:function(val,min){return Number(val)>=min},max:function(val,max){return Number(val)<=max},range:function(val,arrayRange){return val>=arrayRange[0]&&val<=arrayRange[1]},equalto:function(val,elem,self){return self.options.validateIfUnchanged=!0,val===$(elem).val()},mincheck:function(obj,val){return validators.minlength(obj,val)},maxcheck:function(obj,val){return validators.maxlength(obj,val)},rangecheck:function(obj,arrayRange){return validators.rangelength(obj,arrayRange)}},messages={defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",urlstrict:"This value should be a valid url.",number:"This value should be a valid number.",digits:"This value should be digits.",dateIso:"This value should be a valid date (YYYY-MM-DD).",alphanum:"This value should be alphanumeric.",phone:"This value should be a valid phone number."},notnull:"This value should not be null.",notblank:"This value should not be blank.",required:"This value is required.",regexp:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or less.",rangelength:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or less.",rangecheck:"You must select between %s and %s choices.",equalto:"This value should be the same."},formatMessage=function(message,args){return _.isArray(args)||(args=[args]),message.indexOf("%s")>=0?message.replace(/%s/g,function(){return String(args.shift())}):message.indexOf("%e")>=0?message.replace(/%e/g,function(){return String($(args.shift()).val())}):message},toInt=function(num){return parseInt(num,10)},_checksley=function(options){var element,instance,_options;if(element=$(this),!element.is("form, input, select, textarea"))throw"element is not a valid element for checksley";if(instance=element.data("checksley"),(void 0===instance||null===instance)&&(_options={},_.isPlainObject(options)&&(_options=options),instance=element.is("input[type=radio], input[type=checkbox]")?new FieldMultiple(element,options):element.is("input, select, textarea")?new Field(element,options):new Form(element,options)),!_.isString(options))return instance;switch(options){case"validate":return instance.validate();case"destroy":return instance.destroy();case"reset":return instance.reset()}},Checksley=function(){function Checksley(jq){this.jq=void 0===jq?window.jQuery||window.Zepto:jq,this.messages={"default":{defaultMessage:"Invalid"}},this.lang=this.detectLang()}return Checksley.prototype.updateDefaults=function(options){return _.merge(defaults,options)},Checksley.prototype.updateValidators=function(_validators){return _.extend(validators,_validators)},Checksley.prototype.updateMessages=function(lang,messages,overwrite){return null==overwrite&&(overwrite=!1),void 0===this.messages[lang]&&(this.messages[lang]={}),overwrite?this.messages[lang]=messages:_.merge(this.messages[lang],messages)},Checksley.prototype.injectPlugin=function(){return this.jq.fn.checksley=_checksley},Checksley.prototype.setLang=function(lang){return this.lang=lang},Checksley.prototype.detectLang=function(){return this.jq("html").attr("lang")||"default"},Checksley.prototype.getMessage=function(key,lang){var message;return void 0===lang&&(lang=this.lang),messages=this.messages[lang],void 0===messages&&(messages={}),message=messages[key],void 0===message?"default"===lang?this.getMessage("defaultMessage",lang):this.getMessage(key,"default"):message},Checksley}(),Field=function(){function Field(elm,options){null==options&&(options={}),this.id=_.uniqueId("field-"),this.element=$(elm),this.validatedOnce=!1,this.options=_.merge({},defaults,options),this.isRadioOrCheckbox=!1,this.validators=validators,this.resetConstraints(),this.bindEvents(),this.bindData()}return Field.prototype.bindData=function(){return this.element.data("checksley-field",this)},Field.prototype.unbindData=function(){return this.element.data("checksley-field",null)},Field.prototype.focus=function(){return this.element.focus()},Field.prototype.eventValidate=function(event){var trigger,value;return trigger=this.element.data("trigger"),value=this.getValue(),("keyup"!==event.type||/keyup/i.test(trigger)||this.validatedOnce)&&("change"!==event.type||/change/i.test(trigger)||this.validatedOnce)?value.length_i;_i++)message=messages[_i],_results.push(this.addError(this.makeErrorElement("custom",message)));return _results},Field.prototype.makeErrorElement=function(constraintName,message){var element;return element=$("
  • ",{"class":"checksley-"+constraintName}),element.html(message),element.addClass(constraintName),element},Field.prototype.addError=function(errorElement){var container,selector;return container=this.getErrorContainer(),selector=this.options.containerErrorsSelector,this.options.onlyOneErrorElement&&container.find(selector).length?void 0:container.append(errorElement)},Field.prototype.reset=function(){return this.handleClasses(null),this.resetConstraints(),this.removeErrors()},Field.prototype.removeErrors=function(){return $("#"+this.errorContainerId()).remove()},Field.prototype.getValue=function(){return this.element.val()},Field.prototype.errorContainerId=function(){return"checksley-error-"+this.id},Field.prototype.errorContainerClass=function(){return"checksley-error-list"},Field.prototype.getErrorContainer=function(){var container,definedContainer,errorContainerEl,params,preferenceSelector;return errorContainerEl=$("#"+this.errorContainerId()),1===errorContainerEl.length?errorContainerEl:(params={"class":this.errorContainerClass(),id:this.errorContainerId()},errorContainerEl=$("