2013-07-11 23:02:18 +04:00
|
|
|
/*global window, document, Ghost, $, _, Backbone */
|
|
|
|
(function () {
|
2013-09-24 14:46:30 +04:00
|
|
|
'use strict';
|
2013-07-11 23:02:18 +04:00
|
|
|
|
2013-10-08 19:39:07 +04:00
|
|
|
Ghost.Models.Widget = Ghost.TemplateModel.extend({
|
2013-07-11 23:02:18 +04:00
|
|
|
|
|
|
|
defaults: {
|
2013-09-24 14:46:30 +04:00
|
|
|
title: '',
|
|
|
|
name: '',
|
|
|
|
author: '',
|
|
|
|
applicationID: '',
|
|
|
|
size: '',
|
2013-07-11 23:02:18 +04:00
|
|
|
content: {
|
|
|
|
template: '',
|
|
|
|
data: {
|
|
|
|
number: {
|
|
|
|
count: 0,
|
|
|
|
sub: {
|
|
|
|
value: 0,
|
2013-09-24 14:46:30 +04:00
|
|
|
dir: '', // "up" or "down"
|
|
|
|
item: '',
|
|
|
|
period: ''
|
2013-07-11 23:02:18 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
settingsPane: false,
|
|
|
|
enabled: false,
|
|
|
|
options: [{
|
2013-09-24 14:46:30 +04:00
|
|
|
title: 'ERROR',
|
|
|
|
value: 'Widget options not set'
|
2013-07-11 23:02:18 +04:00
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
Ghost.Collections.Widgets = Backbone.Collection.extend({
|
2013-09-15 15:13:06 +04:00
|
|
|
// url: Ghost.settings.apiRoot + '/widgets/', // What will this be?
|
2013-07-11 23:02:18 +04:00
|
|
|
model: Ghost.Models.Widget
|
|
|
|
});
|
|
|
|
|
|
|
|
}());
|