Back from Typescript to ES2015

This commit is contained in:
RainLoop Team 2016-06-27 21:14:33 +03:00
parent a74a92638a
commit 40b3f929e9
16 changed files with 305 additions and 358 deletions

View file

@ -11,7 +11,6 @@
Enums = require('Common/Enums'),
Globals = require('Common/Globals'),
Utils = require('Common/Utils'),
Spec = require('Common/Spec'),
Links = require('Common/Links'),
Audio = require('Common/Audio'),
@ -103,7 +102,7 @@
this.friendlySize = Utils.friendlySize(this.estimatedSize);
this.cidWithOutTags = this.cid.replace(/^<+/, '').replace(/>+$/, '');
this.fileNameExt = Spec.getFileExtension(this.fileName);
this.fileNameExt = Utils.getFileExtension(this.fileName);
this.fileType = AttachmentModel.staticFileType(this.fileNameExt, this.mimeType);
bResult = true;
@ -489,7 +488,7 @@
aTypes = _.uniq(_.compact(_.map(aData, function (aItem) {
return aItem ? AttachmentModel.staticFileType(
Spec.getFileExtension(aItem[0]), aItem[1]) : '';
Utils.getFileExtension(aItem[0]), aItem[1]) : '';
})));
if (aTypes && 1 === aTypes.length && aTypes[0])

View file

@ -8,7 +8,6 @@
ko = require('ko'),
Utils = require('Common/Utils'),
Spec = require('Common/Spec'),
AttachmentModel = require('Model/Attachment'),
@ -68,11 +67,11 @@
}, this);
this.mimeType = ko.computed(function () {
return Spec.mimeContentType(this.fileName());
return Utils.mimeContentType(this.fileName());
}, this);
this.fileExt = ko.computed(function () {
return Spec.getFileExtension(this.fileName());
return Utils.getFileExtension(this.fileName());
}, this);
this.regDisposables([this.progressText, this.progressStyle, this.title, this.friendlySize, this.mimeType, this.fileExt]);