Lists: Add getPasteIndex method
This commit is contained in:
parent
7db11814e3
commit
603dfa3d3a
5 changed files with 22 additions and 0 deletions
|
@ -101,6 +101,10 @@ Ox.CustomList = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
that.getPasteIndex = function() {
|
||||
return self.$list.getPasteIndex();
|
||||
};
|
||||
|
||||
/*@
|
||||
hasFocus <f> has Focus
|
||||
@*/
|
||||
|
|
|
@ -177,6 +177,10 @@ Ox.IconList = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
that.getPasteIndex = function() {
|
||||
return that.$element.getPasteIndex();
|
||||
};
|
||||
|
||||
/*@
|
||||
hasFocus <f> hasFocus
|
||||
@*/
|
||||
|
|
|
@ -198,6 +198,10 @@ Ox.InfoList = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
that.getPasteIndex = function() {
|
||||
return that.$element.getPasteIndex();
|
||||
};
|
||||
|
||||
/*@
|
||||
hasFocus <f> hasFocus
|
||||
@*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue