forked from 0x2620/oxjs
misc fixes
This commit is contained in:
parent
44a8ff015c
commit
8ea49fab73
10 changed files with 41 additions and 16 deletions
|
|
@ -19,7 +19,7 @@ Ox.List <f:Ox.Element> List Element
|
|||
keys <a|[]> keys of the list items
|
||||
max <n|-1> Maximum number of items that can be selected (-1 for all)
|
||||
min <n|0> Minimum number of items that must be selected
|
||||
orientation <s|vertical> 'horizontal' or 'vertical'
|
||||
orientation <s|vertical> 'horizontal', 'vertical' or 'both'
|
||||
pageLength <n|100> number of items per page
|
||||
selected <a|[]> ids of the selected elements
|
||||
sort <a|[]> sort order
|
||||
|
|
@ -120,9 +120,9 @@ Ox.List = function(options, self) {
|
|||
key_control_v: pasteItems,
|
||||
key_control_x: cutItems,
|
||||
key_delete: deleteItems,
|
||||
key_end: scrollToFirst,
|
||||
key_end: scrollToLast,
|
||||
key_enter: open,
|
||||
key_home: scrollToLast,
|
||||
key_home: scrollToFirst,
|
||||
key_pagedown: scrollPageDown,
|
||||
key_pageup: scrollPageUp,
|
||||
key_section: preview, // fixme: firefox gets keyCode 0 when pressing space
|
||||
|
|
@ -1158,7 +1158,7 @@ Ox.List = function(options, self) {
|
|||
|
||||
function setSelected(ids, callback) {
|
||||
// fixme: no case where callback is set
|
||||
// fixme: can't use selectNone here,
|
||||
// note: can't use selectNone here,
|
||||
// since it'd trigger a select event
|
||||
var counter = 0;
|
||||
self.$items.forEach(function($item, pos) {
|
||||
|
|
@ -1650,7 +1650,9 @@ Ox.List = function(options, self) {
|
|||
value <s> value, can be whatever that property is
|
||||
@*/
|
||||
that.value = function(id, key, value) {
|
||||
var pos = getPositionById(id),
|
||||
// id can be a number and will then be interpreted as position
|
||||
Ox.print('that.value id key value', id, key, value)
|
||||
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||
$item = self.$items[pos],
|
||||
data = $item.options('data');
|
||||
if (arguments.length == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue