2013-06-25 16:23:09 +04:00
|
|
|
/*global window, document, Ghost, $, _, Backbone */
|
2013-06-09 13:56:10 +04:00
|
|
|
(function () {
|
2013-09-24 14:46:30 +04:00
|
|
|
'use strict';
|
2013-06-09 13:56:10 +04:00
|
|
|
|
|
|
|
Ghost.Models.Widget = Backbone.Model.extend({
|
|
|
|
|
|
|
|
defaults: {
|
2013-09-24 14:46:30 +04:00
|
|
|
title: '',
|
|
|
|
name: '',
|
|
|
|
author: '',
|
|
|
|
applicationID: '',
|
|
|
|
size: '',
|
2013-06-09 13:56:10 +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-06-09 13:56:10 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
settingsPane: false,
|
|
|
|
enabled: false,
|
|
|
|
options: [{
|
2013-09-24 14:46:30 +04:00
|
|
|
title: 'ERROR',
|
|
|
|
value: 'Widget options not set'
|
2013-06-09 13:56:10 +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-06-09 13:56:10 +04:00
|
|
|
model: Ghost.Models.Widget
|
|
|
|
});
|
|
|
|
|
|
|
|
}());
|