Lists: Add getPasteIndex method

This commit is contained in:
rolux 2014-02-12 13:56:54 +00:00
parent 7db11814e3
commit 603dfa3d3a
5 changed files with 22 additions and 0 deletions

View file

@ -101,6 +101,10 @@ Ox.CustomList = function(options, self) {
return that;
};
that.getPasteIndex = function() {
return self.$list.getPasteIndex();
};
/*@
hasFocus <f> has Focus
@*/

View file

@ -177,6 +177,10 @@ Ox.IconList = function(options, self) {
return that;
};
that.getPasteIndex = function() {
return that.$element.getPasteIndex();
};
/*@
hasFocus <f> hasFocus
@*/

View file

@ -198,6 +198,10 @@ Ox.InfoList = function(options, self) {
return that;
};
that.getPasteIndex = function() {
return that.$element.getPasteIndex();
};
/*@
hasFocus <f> hasFocus
@*/

View file

@ -1589,6 +1589,12 @@ Ox.List = function(options, self) {
return that;
};
that.getPasteIndex = function() {
return self.selected.length
? Ox.max(self.selected) + 1
: self.items.length;
};
/*@
invertSelection <f> Invert selection
() -> <o> The list

View file

@ -1074,6 +1074,10 @@ Ox.TableList = function(options, self) {
return self.columnWidths[pos];
};
that.getPasteIndex = function() {
return that.$body.getPasteIndex();
};
// FIXME: needed?
that.getVisibleColumns = function() {
return self.visibleColumns.map(function(column) {