/*globals Editor fileId SplitView PanelContainerView EditorView FlashView messageCenter*/
-var documentsUrl = '/platforma/api/documents/';
-
-
Editor.Model = Editor.Object.extend({
synced: false,
data: null
Editor.ToolbarButtonsModel = Editor.Model.extend({
- _className: 'Editor.ToolbarButtonsModel',
- serverURL: '/platforma/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)
});
var leftPanelView, rightPanelContainer, doc;
-$(function() {
+$(function()
+{
+ documentsUrl = $('#api-base-url').text() + '/';
+ toolbarUrl = $('#api-toolbar-url').text();
+
doc = new Editor.DocumentModel();
- var editor = new EditorView('#body-wrap', doc);
+ var editor = new EditorView('#body-wrap', doc);
editor.freeze();
+
var flashView = new FlashView('#flashview', messageCenter);
var splitView = new SplitView('#splitview', doc);
+
leftPanelView = new PanelContainerView('#left-panel-container', doc);
- rightPanelContainer = new PanelContainerView('#right-panel-container', doc);
+ rightPanelContainer = new PanelContainerView('#right-panel-container', doc);
});