From: zuber Date: Sun, 27 Sep 2009 20:27:00 +0000 (+0200) Subject: Dodanie js/views/editor.js - widoku dla całego edytora. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/84132f4ec69d46ec216d1fe1d5adc5e5ee8a4798?ds=sidebyside Dodanie js/views/editor.js - widoku dla całego edytora. --- diff --git a/project/static/js/models.js b/project/static/js/models.js index 96cab868..b2c7440c 100644 --- a/project/static/js/models.js +++ b/project/static/js/models.js @@ -143,6 +143,7 @@ var leftPanelView, rightPanelContainer, doc; $(function() { doc = new Editor.DocumentModel(); + var editor = new EditorView('body', doc); var splitView = new SplitView('#splitview', doc); leftPanelView = new PanelContainerView('#left-panel-container', doc); rightPanelContainer = new PanelContainerView('#right-panel-container', doc); diff --git a/project/static/js/views/editor.js b/project/static/js/views/editor.js new file mode 100644 index 00000000..b3c9563b --- /dev/null +++ b/project/static/js/views/editor.js @@ -0,0 +1,12 @@ +/*global View render_template panels */ +var EditorView = View.extend({ + _className: 'EditorView', + element: null, + model: null, + template: null, + + init: function(element, model, template) { + this._super(element, model, template); + this.model.load(); + } +}); diff --git a/project/templates/explorer/editor.html b/project/templates/explorer/editor.html index 89ff2f37..a6bcc41a 100644 --- a/project/templates/explorer/editor.html +++ b/project/templates/explorer/editor.html @@ -12,6 +12,7 @@ {# App and views #} + @@ -82,6 +83,10 @@ {% endblock %} +{% block header-toolbar %} + +{% endblock %} + {% block maincontent %}
@@ -120,4 +125,4 @@ {#

#} {#
#} {# #} -{% endblock maincontent %} +{% endblock maincontent %}