updateElement

This commit is contained in:
j 2014-05-17 13:45:57 +02:00
commit 877e867d03
35 changed files with 516 additions and 314 deletions

View file

@ -11,9 +11,50 @@ oml.ui.list = function() {
oml.$ui.previewDialog.close();
delete oml.$ui.previewDialog;
},
copy: function(data) {
oml.clipboard.copy(data.ids, 'item');
},
copyadd: function(data) {
oml.clipboard.copy(data.ids, 'item');
},
cut: function(data) {
var listData = oml.getListData();
if (listData.editable && listData.type == 'static') {
oml.clipboard.copy(data.ids, 'item');
oml.doHistory('cut', data.ids, ui._list, function() {
oml.UI.set({listSelection: []});
oml.reloadList();
});
}
},
cutadd: function(data) {
var listData = oml.getListData();
if (listData.editable && listData.type == 'static') {
oml.clipboard.add(data.ids, 'item');
oml.doHistory('cut', data.ids, ui._list, function() {
oml.UI.set({listSelection: []});
oml.reloadList();
});
}
},
'delete': function() {
var listData = oml.getListData();
if (listData.editable && listData.type == 'static') {
oml.doHistory('delete', data.ids, ui._list, function() {
oml.UI.set({listSelection: []});
oml.reloadList();
});
}
},
init: function(data) {
oml.$ui.statusbar.set('total', data);
},
key_control_delete: function() {
var listData = oml.getListData();
if (listData.own) {
oml.ui.deleteItemsDialog().open();
}
},
open: function(data) {
oml.UI.set({
item: data.ids[0],
@ -32,7 +73,7 @@ oml.ui.list = function() {
}
});
} else {
oml.$ui.previewDialog.update();
oml.$ui.previewDialog.updateElement();
}
},
resize: function(data) {
@ -65,6 +106,10 @@ oml.ui.list = function() {
oml.enableDragAndDrop(that);
that.updateElement = function() {
that.reloadList(true);
};
return that;
};