mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
Uploading and preparing the repository to the dev version.
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
This commit is contained in:
parent
afad45137e
commit
4cc2207513
846 changed files with 99453 additions and 2123 deletions
63
dev/Models/ComposeAttachmentModel.js
Normal file
63
dev/Models/ComposeAttachmentModel.js
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} sId
|
||||
* @param {string} sFileName
|
||||
* @param {?number=} nSize
|
||||
* @param {boolean=} bInline
|
||||
* @param {boolean=} bLinked
|
||||
* @param {string=} sCID
|
||||
* @param {string=} sContentLocation
|
||||
*/
|
||||
function ComposeAttachmentModel(sId, sFileName, nSize, bInline, bLinked, sCID, sContentLocation)
|
||||
{
|
||||
this.id = sId;
|
||||
this.isInline = Utils.isUnd(bInline) ? false : !!bInline;
|
||||
this.isLinked = Utils.isUnd(bLinked) ? false : !!bLinked;
|
||||
this.CID = Utils.isUnd(sCID) ? '' : sCID;
|
||||
this.contentLocation = Utils.isUnd(sContentLocation) ? '' : sContentLocation;
|
||||
this.fromMessage = false;
|
||||
|
||||
this.fileName = ko.observable(sFileName);
|
||||
this.size = ko.observable(Utils.isUnd(nSize) ? null : nSize);
|
||||
this.tempName = ko.observable('');
|
||||
|
||||
this.progress = ko.observable('');
|
||||
this.error = ko.observable('');
|
||||
this.waiting = ko.observable(true);
|
||||
this.uploading = ko.observable(false);
|
||||
this.enabled = ko.observable(true);
|
||||
|
||||
this.friendlySize = ko.computed(function () {
|
||||
var mSize = this.size();
|
||||
return null === mSize ? '' : Utils.friendlySize(this.size());
|
||||
}, this);
|
||||
}
|
||||
|
||||
ComposeAttachmentModel.prototype.id = '';
|
||||
ComposeAttachmentModel.prototype.isInline = false;
|
||||
ComposeAttachmentModel.prototype.isLinked = false;
|
||||
ComposeAttachmentModel.prototype.CID = '';
|
||||
ComposeAttachmentModel.prototype.contentLocation = '';
|
||||
ComposeAttachmentModel.prototype.fromMessage = false;
|
||||
ComposeAttachmentModel.prototype.cancel = Utils.emptyFunction;
|
||||
|
||||
/**
|
||||
* @param {AjaxJsonComposeAttachment} oJsonAttachment
|
||||
*/
|
||||
ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
|
||||
{
|
||||
var bResult = false;
|
||||
if (oJsonAttachment)
|
||||
{
|
||||
this.fileName(oJsonAttachment.Name);
|
||||
this.size(Utils.isUnd(oJsonAttachment.Size) ? 0 : Utils.pInt(oJsonAttachment.Size));
|
||||
this.tempName(Utils.isUnd(oJsonAttachment.TempName) ? '' : oJsonAttachment.TempName);
|
||||
this.isInline = false;
|
||||
|
||||
bResult = true;
|
||||
}
|
||||
|
||||
return bResult;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue