parent
43eb8c4946
commit
49641a31d0
|
|
@ -19,6 +19,7 @@
|
|||
this.options = options
|
||||
this.$el= $(element)
|
||||
this.$form = this.$el.closest('form')
|
||||
this.$toolbar = $('[data-container-toolbar]', this.$form)
|
||||
this.alias = $('[data-container-alias]', this.$form).val()
|
||||
|
||||
this.init();
|
||||
|
|
@ -40,7 +41,7 @@
|
|||
$(window).resize($.proxy(this.updateWidth, this))
|
||||
this.updateWidth()
|
||||
|
||||
if (!Modernizr.touch)
|
||||
if (!Modernizr.touch) {
|
||||
this.$el.sortable({
|
||||
vertical: false,
|
||||
handle: '.drag-handle',
|
||||
|
|
@ -53,6 +54,7 @@
|
|||
self.postSortOrders()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.$el.on('hidden.oc.inspector', '[data-inspectable]', function() {
|
||||
var values = $('[data-inspector-values]', this).val(),
|
||||
|
|
@ -126,7 +128,11 @@
|
|||
.isotope('reloadItems')
|
||||
.isotope({ sortBy: 'original-order' })
|
||||
|
||||
$('li.item', this.$el).css({'width': '', 'height': ''})
|
||||
var $items = $('li.item', this.$el)
|
||||
|
||||
$items.css({'width': '', 'height': ''})
|
||||
|
||||
$('> .dropdown', this.$toolbar).toggleClass('dropup', !!$items.length)
|
||||
}
|
||||
|
||||
ReportContainer.prototype.setSortOrders = function() {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
</ul>
|
||||
|
||||
<?php if ($this->canAddAndDelete): ?>
|
||||
<?= $this->makePartial('widget_toolbar') ?>
|
||||
<div id="<?= $this->getId('container-toolbar') ?>" data-container-toolbar>
|
||||
<?= $this->makePartial('widget_toolbar') ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue