dont fire open or preview events if no list item is selected
This commit is contained in:
parent
6353bcd8ba
commit
e10d2fc56a
|
@ -6713,19 +6713,23 @@ requires
|
|||
}
|
||||
|
||||
function open() {
|
||||
that.triggerEvent('open', {
|
||||
ids: getSelectedIds()
|
||||
var ids = getSelectedIds();
|
||||
ids.length && that.triggerEvent('open', {
|
||||
ids: ids
|
||||
});
|
||||
}
|
||||
|
||||
function preview() {
|
||||
self.preview = !self.preview;
|
||||
if (self.preview) {
|
||||
that.triggerEvent('openpreview', {
|
||||
ids: getSelectedIds()
|
||||
});
|
||||
} else {
|
||||
that.triggerEvent('closepreview');
|
||||
var ids = getSelectedIds();
|
||||
if (ids.length) {
|
||||
self.preview = !self.preview;
|
||||
if (self.preview) {
|
||||
that.triggerEvent('openpreview', {
|
||||
ids: getSelectedIds()
|
||||
});
|
||||
} else {
|
||||
that.triggerEvent('closepreview');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7178,6 +7182,7 @@ requires
|
|||
id: '',
|
||||
max: -1,
|
||||
min: 0,
|
||||
pageLength: 100,
|
||||
selected: [],
|
||||
request: function() {}, // {sort, range, keys, callback}
|
||||
sort: []
|
||||
|
@ -7267,6 +7272,7 @@ requires
|
|||
}),
|
||||
max: self.options.max,
|
||||
min: self.options.min,
|
||||
pageLength: self.options.pageLength,
|
||||
orientation: 'vertical',
|
||||
request: self.options.request,
|
||||
selected: self.options.selected,
|
||||
|
@ -7525,7 +7531,8 @@ requires
|
|||
var $input,
|
||||
html = $cell.html(),
|
||||
index = getColumnIndexById(key),
|
||||
width = self.options.columns[index].width;
|
||||
column = self.options.columns[index],
|
||||
width = column.width;
|
||||
Ox.print($item, $cell)
|
||||
$cell.empty()
|
||||
.addClass('OxEdit')
|
||||
|
@ -7533,6 +7540,7 @@ requires
|
|||
width: width + 'px'
|
||||
});
|
||||
$input = Ox.Input({
|
||||
autovalidate: column.input.autovalidate,
|
||||
style: 'square',
|
||||
value: html,
|
||||
width: width
|
||||
|
@ -7545,13 +7553,12 @@ requires
|
|||
})
|
||||
.bindEvent({
|
||||
blur: submit,
|
||||
submit: submit
|
||||
})
|
||||
.appendTo($cell)
|
||||
.focus();
|
||||
function submit() {
|
||||
var value = $input.value();
|
||||
$input.remove();
|
||||
//$input.loseFocus().remove();
|
||||
$cell.removeClass('OxEdit')
|
||||
.css({
|
||||
width: (width - 8) + 'px'
|
||||
|
|
Loading…
Reference in New Issue
Block a user