[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() 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({ addViews.push({
caption: me.textFormula, caption: me.textFormula,
id: 'add-formula', id: 'add-formula',
layout: SSE.getController('AddFunction').getView('AddFunction').rootLayout() layout: options ? view.rootLayout() : view.layoutPanel()
}); });
}
if ( !options ) if ( !options )
addViews.push({ addViews.push({

View file

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

View file

@ -137,6 +137,14 @@ define([
return ''; 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 () { initControls: function () {
// //
}, },