Editor.ToolbarButtonsModel = Editor.Model.extend({
- className: 'Editor.ToolbarButtonsModel',
- serverURL: '/api/toolbar/buttons',
+ className: 'Editor.ToolbarButtonsModel',
buttons: {},
init: function() {
load: function() {
if (!this.get('buttons').length) {
$.ajax({
- url: this.serverURL,
+ url: toolbarUrl,
dataType: 'json',
success: this.loadSucceeded.bind(this)
});
$(function()
{
documentsUrl = $('#api-base-url').text() + '/';
- Editor.ToolbarButtonsModel.serverURL = $('#api-toolbar-url').text();
+ toolbarUrl = $('#api-toolbar-url').text();
doc = new Editor.DocumentModel();
var editor = new EditorView('#body-wrap', doc);