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