0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/admin/assets/js/models/widget.js
Matthew Harrison-Jones 2e44a1f845 Converted static Widgets to Backbone.
Moved static HTML Widgets to Backbone.

Might need to move Widget data else where to keep it clean.
Will need to also implement API for future use.
2013-06-09 10:56:10 +01:00

43 lines
No EOL
1.1 KiB
JavaScript

/*global window, document, Ghost, $, Backbone, _ */
(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
});
}());