Dodanie js/views/editor.js - widoku dla caƂego edytora.
authorzuber <marek@stepniowski.com>
Sun, 27 Sep 2009 20:27:00 +0000 (22:27 +0200)
committerzuber <marek@stepniowski.com>
Sun, 27 Sep 2009 20:27:00 +0000 (22:27 +0200)
project/static/js/models.js
project/static/js/views/editor.js [new file with mode: 0644]
project/templates/explorer/editor.html

index 96cab86..b2c7440 100644 (file)
@@ -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 (file)
index 0000000..b3c9563
--- /dev/null
@@ -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();
+  }
+});
index 89ff2f3..a6bcc41 100644 (file)
@@ -12,6 +12,7 @@
        {# App and views #}
        <script src="{{STATIC_URL}}js/app.js" type="text/javascript" charset="utf-8"></script>
        <script src="{{STATIC_URL}}js/views/view.js" type="text/javascript" charset="utf-8"></script>
+       <script src="{{STATIC_URL}}js/views/editor.js" type="text/javascript" charset="utf-8"></script>
        <script src="{{STATIC_URL}}js/views/button_toolbar.js" type="text/javascript" charset="utf-8"></script>
        <script src="{{STATIC_URL}}js/views/split.js" type="text/javascript" charset="utf-8"></script>
        <script src="{{STATIC_URL}}js/views/xml.js" type="text/javascript" charset="utf-8"></script>
     
 {% endblock %}
 
+{% block header-toolbar %}
+       <button>Merge</button> <button>Update</button>
+{% endblock %}
+
 {% block maincontent %}
        <div id="splitview">
                <div id="left-panel-container" class='panel-container'></div>
     {#         <p><button type="button" class="dialog-close-button">Close</button></p> #}
     {#     </div> #}
     {# </div> #}
-{% endblock maincontent %}    
+{% endblock maincontent %}