Save attachments as ...

This commit is contained in:
RainLoop Team 2015-04-25 02:15:11 +04:00
parent f5f067f1f3
commit 48b91fb957
20 changed files with 687 additions and 76 deletions

View file

@ -59,47 +59,62 @@
/**
* @param {string} sDownload
* @param {string=} sCustomSpecSuffix
* @return {string}
*/
Links.prototype.attachmentDownload = function (sDownload)
Links.prototype.attachmentDownload = function (sDownload, sCustomSpecSuffix)
{
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + this.sSpecSuffix + '/Download/' + this.subQueryPrefix() + '/' + sDownload;
sCustomSpecSuffix = Utils.isUnd(sCustomSpecSuffix) ? this.sSpecSuffix : sCustomSpecSuffix;
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + sCustomSpecSuffix + '/Download/' +
this.subQueryPrefix() + '/' + sDownload;
};
/**
* @param {string} sDownload
* @param {string=} sCustomSpecSuffix
* @return {string}
*/
Links.prototype.attachmentPreview = function (sDownload)
Links.prototype.attachmentPreview = function (sDownload, sCustomSpecSuffix)
{
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + this.sSpecSuffix + '/View/' + this.subQueryPrefix() + '/' + sDownload;
sCustomSpecSuffix = Utils.isUnd(sCustomSpecSuffix) ? this.sSpecSuffix : sCustomSpecSuffix;
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + sCustomSpecSuffix + '/View/' +
this.subQueryPrefix() + '/' + sDownload;
};
/**
* @param {string} sDownload
* @param {string=} sCustomSpecSuffix
* @return {string}
*/
Links.prototype.attachmentThumbnailPreview = function (sDownload)
Links.prototype.attachmentThumbnailPreview = function (sDownload, sCustomSpecSuffix)
{
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + this.sSpecSuffix + '/ViewThumbnail/' + this.subQueryPrefix() + '/' + sDownload;
sCustomSpecSuffix = Utils.isUnd(sCustomSpecSuffix) ? this.sSpecSuffix : sCustomSpecSuffix;
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + sCustomSpecSuffix + '/ViewThumbnail/' +
this.subQueryPrefix() + '/' + sDownload;
};
/**
* @param {string} sDownload
* @param {string=} sCustomSpecSuffix
* @return {string}
*/
Links.prototype.attachmentPreviewAsPlain = function (sDownload)
Links.prototype.attachmentPreviewAsPlain = function (sDownload, sCustomSpecSuffix)
{
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + this.sSpecSuffix + '/ViewAsPlain/' + this.subQueryPrefix() + '/' + sDownload;
sCustomSpecSuffix = Utils.isUnd(sCustomSpecSuffix) ? this.sSpecSuffix : sCustomSpecSuffix;
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + sCustomSpecSuffix + '/ViewAsPlain/' +
this.subQueryPrefix() + '/' + sDownload;
};
/**
* @param {string} sDownload
* @param {string=} sCustomSpecSuffix
* @return {string}
*/
Links.prototype.attachmentFramed = function (sDownload)
Links.prototype.attachmentFramed = function (sDownload, sCustomSpecSuffix)
{
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + this.sSpecSuffix + '/FramedView/' + this.subQueryPrefix() + '/' + sDownload;
sCustomSpecSuffix = Utils.isUnd(sCustomSpecSuffix) ? this.sSpecSuffix : sCustomSpecSuffix;
return this.sServer + '/Raw/' + this.subQueryPrefix() + '/' + sCustomSpecSuffix + '/FramedView/' +
this.subQueryPrefix() + '/' + sDownload;
};
/**