even more tutorial in editor (status bar)
authorJan Szejko <janek37@gmail.com>
Thu, 30 Mar 2017 11:31:54 +0000 (13:31 +0200)
committerJan Szejko <janek37@gmail.com>
Thu, 30 Mar 2017 11:33:45 +0000 (13:33 +0200)
src/editor/modules/rng/mainLayout.html
src/editor/modules/rng/rng.js
src/fnpjs/layout.js

index 825ae38..461c2a3 100644 (file)
@@ -5,5 +5,5 @@
     <div style="clear:both"></div>
     <div fnpjs-place="mainView">
     </div>
     <div style="clear:both"></div>
     <div fnpjs-place="mainView">
     </div>
-    <div fnpjs-place="bottomPanel"></div>
+    <div fnpjs-place="bottomPanel"<% if(tutorial) { %> data-toggle="tutorial" data-tutorial="<%= tutorial.index %>" data-placement="top" data-content="<%= tutorial.text %>"<% } %>></div>
 </div>
\ No newline at end of file
 </div>
\ No newline at end of file
index fc4afb0..f933ec1 100644 (file)
@@ -30,7 +30,7 @@ return function(sandbox) {
     
 
     var views = {
     
 
     var views = {
-        mainLayout: new layout.Layout(mainLayoutTemplate),
+        mainLayout: new layout.Layout(mainLayoutTemplate, sandbox.getTutorialItem('statusBar')),
         mainTabs: (new tabs.View()).render(),
         visualEditing: new layout.Layout(visualEditingLayoutTemplate),
         diffLayout: new layout.Layout(diffLayoutTemplate)
         mainTabs: (new tabs.View()).render(),
         visualEditing: new layout.Layout(visualEditingLayoutTemplate),
         diffLayout: new layout.Layout(diffLayoutTemplate)
index 68d4738..715d2d2 100644 (file)
@@ -1,9 +1,9 @@
 define(['libs/jquery', 'libs/underscore'], function($ ,_) {
     'use strict';
       
 define(['libs/jquery', 'libs/underscore'], function($ ,_) {
     'use strict';
       
-    var Layout = function(template) {
+    var Layout = function(template, tutorial) {
         var layout = this;
         var layout = this;
-        this.dom = $(_.template(template)());
+        this.dom = $(_.template(template)({tutorial: tutorial}));
         this.views = {};
         
         this.dom.onShow = function() {
         this.views = {};
         
         this.dom.onShow = function() {