[SSE mobile] debug 'add function' option

This commit is contained in:
Maxim Kadushkin 2017-01-11 13:54:32 +03:00
parent bf10598c25
commit a1b0a2a92c
3 changed files with 44 additions and 32 deletions

View file

@ -130,12 +130,14 @@ define([
layout: SSE.getController('AddChart').getView('AddChart').rootLayout()
});
if ( !options || options.panel == 'function' )
if ( !options || options.panel == 'function' ) {
view = SSE.getController('AddFunction').getView('AddFunction');
addViews.push({
caption: me.textFormula,
id: 'add-formula',
layout: SSE.getController('AddFunction').getView('AddFunction').rootLayout()
layout: options ? view.rootLayout() : view.layoutPanel()
});
}
if ( !options )
addViews.push({

View file

@ -2,38 +2,40 @@
<% if (view == 'root') { %>
<div id="add-function-root">
<div class="page-content">
<div class="list-block">
<ul>
<% _.each(quick, function(f) { %>
<li class="function">
<a data-func="<%= f.type %>" class="item-link no-indicator quick">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= f.caption %></div>
<div class="item-after"><span class="info"></span></div>
<div class="page" data-page="add-function">
<div class="page-content">
<div class="list-block">
<ul>
<% _.each(quick, function(f) { %>
<li class="function">
<a data-func="<%= f.type %>" class="item-link no-indicator quick">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= f.caption %></div>
<div class="item-after"><span class="info"></span></div>
</div>
</div>
</div>
</a>
</li>
<% }); %>
</ul>
</div>
<div class="content-block-title"><%= textGroups %></div>
<div class="list-block">
<ul class="groups">
<% for (var g in groups) { %>
<li>
<a data-type="<%= g %>" class="item-link group">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= groups[g] %></div>
</a>
</li>
<% }); %>
</ul>
</div>
<div class="content-block-title"><%= textGroups %></div>
<div class="list-block">
<ul class="groups">
<% for (var g in groups) { %>
<li>
<a data-type="<%= g %>" class="item-link group">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= groups[g] %></div>
</div>
</div>
</div>
</a>
</li>
<% }; %>
<ul>
</a>
</li>
<% }; %>
</ul>
</div>
</div>
</div>
</div>

View file

@ -137,6 +137,14 @@ define([
return '';
},
layoutPage: function () {
return this.layout ? this.layout.find('#add-function-root').html() : '';
},
layoutPanel: function() {
return this.layout ? this.layout.find('#add-function-root .page-content').html() : '';
},
initControls: function () {
//
},