2013-06-25 09:21:10 +02:00
|
|
|
|
"use strict";
|
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
define(
|
|
|
|
|
[
|
2013-07-01 06:17:52 +02:00
|
|
|
|
'app',
|
|
|
|
|
'Settings/SettingsModelBase'
|
|
|
|
|
], function (App, ModelBase) {
|
|
|
|
|
return ModelBase.extend({
|
|
|
|
|
|
|
|
|
|
baseInitialize: ModelBase.prototype.initialize,
|
|
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
|
var name = this.get('name');
|
|
|
|
|
|
|
|
|
|
this.successMessage = 'Saved ' + name + ' size settings';
|
|
|
|
|
this.errorMessage = 'Couldn\'t save ' + name + ' size settings';
|
|
|
|
|
|
|
|
|
|
this.baseInitialize.call(this);
|
|
|
|
|
},
|
2013-03-07 09:01:18 +01:00
|
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
|
mutators: {
|
|
|
|
|
thirtyMinuteSize: function () {
|
2013-06-28 19:25:09 +02:00
|
|
|
|
var maxSize = this.get('maxSize');
|
|
|
|
|
|
|
|
|
|
if (maxSize === 0) {
|
|
|
|
|
return 'No Limit';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (maxSize * 1024 * 1024 * 30).bytes(1);
|
2013-06-25 01:41:59 +02:00
|
|
|
|
},
|
|
|
|
|
sixtyMinuteSize : function () {
|
2013-06-28 19:25:09 +02:00
|
|
|
|
var maxSize = this.get('maxSize');
|
|
|
|
|
|
|
|
|
|
if (maxSize === 0) {
|
|
|
|
|
return 'No Limit';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (maxSize * 1024 * 1024 * 60).bytes(1);
|
2013-06-25 01:41:59 +02:00
|
|
|
|
}
|
2013-03-07 09:01:18 +01:00
|
|
|
|
}
|
2013-06-25 01:41:59 +02:00
|
|
|
|
});
|
2013-03-07 09:01:18 +01:00
|
|
|
|
});
|