|
|
@@ -37,7 +37,7 @@
|
|
|
<%def name="layout_toolbar()">
|
|
|
|
|
|
<div class="card card-toolbar" data-bind="slideVisible: isEditing">
|
|
|
- <div style="float: left" data-bind="visible: ! $root.isNested">
|
|
|
+ <div style="float: left">
|
|
|
<div class="toolbar-label">${_('LAYOUT')}</div>
|
|
|
<a href="javascript: oneSixthLeftLayout(viewModel)" onmouseover="viewModel.previewColumns('oneSixthLeft')" onmouseout="viewModel.previewColumns('')">
|
|
|
<div class="layout-container">
|
|
|
@@ -115,19 +115,19 @@
|
|
|
|
|
|
<script type="text/html" id="column-template">
|
|
|
<div data-bind="css: klass">
|
|
|
- <div class="container-fluid" data-bind="visible: $root.isEditing() && ! $root.isNested()">
|
|
|
+ <div class="container-fluid" data-bind="visible: $root.isEditing()">
|
|
|
<div data-bind="click: function(){$data.addEmptyRow(true)}, css: {'add-row': true, 'is-editing': $root.isEditing}, sortable: { data: drops, isEnabled: $root.isEditing, 'afterMove': function(event){var widget=event.item; var _r = $data.addEmptyRow(true); _r.addWidget(widget);$('.card-body').slideDown('fast', function(){$(window).scrollTop(lastWindowScrollPosition)}); columnDropAdditionalHandler(widget)}, options: {'placeholder': 'add-row-highlight', 'greedy': true, 'stop': function(event, ui){$('.card-body').slideDown('fast', function(){$(window).scrollTop(lastWindowScrollPosition)});}}}"></div>
|
|
|
</div>
|
|
|
<div data-bind="template: { name: 'row-template', foreach: rows}">
|
|
|
</div>
|
|
|
- <div class="container-fluid" data-bind="visible: $root.isEditing() && (rows().length > 0 || $root.isNested())">
|
|
|
+ <div class="container-fluid" data-bind="visible: $root.isEditing() && rows().length > 0">
|
|
|
<div data-bind="click: function(){$data.addEmptyRow()}, css: {'add-row': true, 'is-editing': $root.isEditing}, sortable: { data: drops, isEnabled: $root.isEditing, 'afterMove': function(event){var widget=event.item; var _r = $data.addEmptyRow(); _r.addWidget(widget);$('.card-body').slideDown('fast', function(){$(window).scrollTop(lastWindowScrollPosition)}); columnDropAdditionalHandler(widget)}, options: {'placeholder': 'add-row-highlight', 'greedy': true, 'stop': function(event, ui){$('.card-body').slideDown('fast', function(){$(window).scrollTop(lastWindowScrollPosition)});}}}"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</script>
|
|
|
|
|
|
<script type="text/html" id="row-template">
|
|
|
- <div class="emptyRow" data-bind="visible: widgets().length == 0 && $index() == 0 && $root.isEditing() && $parent.size() > 4 && $parent.rows().length == 1 && ! $root.isNested">
|
|
|
+ <div class="emptyRow" data-bind="visible: widgets().length == 0 && $index() == 0 && $root.isEditing() && $parent.size() > 4 && $parent.rows().length == 1">
|
|
|
<img src="/static/art/hint_arrow_flipped.png" style="float:left; margin-right: 10px"/>
|
|
|
<div style="float:left; text-align: center; width: 260px">${_('Drag any of the widgets inside your empty row')}</div>
|
|
|
<div class="clearfix"></div>
|
|
|
@@ -136,14 +136,13 @@
|
|
|
<div class="row-header" data-bind="visible: $root.isEditing">
|
|
|
<span class="muted">${_('Row')}</span>
|
|
|
<div style="display: inline; margin-left: 60px">
|
|
|
- <a href="javascript:void(0)" data-bind="visible: $root.isNested, click: function(){ $data.addEmptyColumn(); }"><i class="fa fa-columns"></i></a>
|
|
|
<a href="javascript:void(0)" data-bind="visible: $index()<$parent.rows().length-1, click: function(){moveDown($parent, this)}"><i class="fa fa-chevron-down"></i></a>
|
|
|
<a href="javascript:void(0)" data-bind="visible: $index()>0, click: function(){moveUp($parent, this)}"><i class="fa fa-chevron-up"></i></a>
|
|
|
<a href="javascript:void(0)" data-bind="visible: $parent.rows().length > 1, click: function(){remove($parent, this)}"><i class="fa fa-times"></i></a>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div data-bind="visible: columns().length == 0, style: { 'border-bottom': $root.isNested() ? 'none' : '' }, css: {'row-fluid': true, 'row-container':true, 'is-editing': $root.isEditing},
|
|
|
- sortable: { template: 'widget-template', data: widgets, allowDrop: $root.isEditing() && (! $root.isNested() || ($root.isNested() && widgets().length < 1)), isEnabled: $root.isEditing() && (! $root.isNested() || ($root.isNested() && widgets().length < 1)),
|
|
|
+ <div data-bind="css: {'row-fluid': true, 'row-container':true, 'is-editing': $root.isEditing},
|
|
|
+ sortable: { template: 'widget-template', data: widgets, isEnabled: $root.isEditing,
|
|
|
options: {'handle': '.move-widget', 'opacity': 0.7, 'placeholder': 'row-highlight', 'greedy': true,
|
|
|
'stop': function(event, ui){$('.card-body').slideDown('fast', function(){$(window).scrollTop(lastWindowScrollPosition)});},
|
|
|
'helper': function(event){lastWindowScrollPosition = $(window).scrollTop(); $('.card-body').slideUp('fast'); var _par = $('<div>');_par.addClass('card card-widget');var _title = $('<h2>');_title.addClass('card-heading simple');_title.text($(event.toElement).text());_title.appendTo(_par);_par.height(80);_par.width(180);return _par;}},
|
|
|
@@ -252,4 +251,3 @@
|
|
|
|
|
|
</%def>
|
|
|
|
|
|
-
|