some more bugfixes

This commit is contained in:
rlx 2011-09-17 13:05:16 +00:00
parent ef1fa5fe84
commit 73fb2e3229
3 changed files with 10 additions and 9 deletions

View file

@ -53,7 +53,6 @@ Ox.App = function(options) {
options <f> get or set options options <f> get or set options
@*/ @*/
that.api.api(function(result) { that.api.api(function(result) {
Ox.print('RESULT', result)
Ox.forEach(result.data.actions, function(val, key) { Ox.forEach(result.data.actions, function(val, key) {
that.api[key] = function(/*data, age, callback*/) { that.api[key] = function(/*data, age, callback*/) {
var data = {}, age = -1, callback = null; var data = {}, age = -1, callback = null;

View file

@ -846,14 +846,14 @@ Ox.List = function(options, self) {
clickable, editable; clickable, editable;
//alert('singleclick') //alert('singleclick')
if (pos > -1) { if (pos > -1) {
if (!e.metaKey && !e.shiftKey && isSelected(pos)) { if (!data.metaKey && !data.shiftKey && isSelected(pos)) {
//alert('??') //alert('??')
if (self.selected.length > 1) { if (self.selected.length > 1) {
// click on one of multiple selected items // click on one of multiple selected items
//alert('!!') //alert('!!')
select(pos); select(pos);
} else if (self.options.type == 'text' && self.hadFocus) { } else if (self.options.type == 'text' && self.hadFocus) {
$cell = findCell(e); $cell = findCell(data);
if ($cell) { if ($cell) {
clickable = $cell.is('.OxClickable'); clickable = $cell.is('.OxClickable');
editable = $cell.is('.OxEditable') && !$cell.is('.OxEdit'); editable = $cell.is('.OxEditable') && !$cell.is('.OxEdit');

View file

@ -4254,12 +4254,14 @@ Ox.unserialize <f> Parses query parameters into an object
Ox.unserialize = function(str, toNumber) { Ox.unserialize = function(str, toNumber) {
var obj = {}; var obj = {};
Ox.forEach(str.split('&'), function(val) { Ox.forEach(str.split('&'), function(val) {
if (val) {
var arr = val.split('='); var arr = val.split('=');
obj[arr[0]] = !toNumber ? arr[1] obj[arr[0]] = !toNumber ? arr[1]
: arr[1].indexOf(',') == -1 ? +arr[1] : arr[1].indexOf(',') == -1 ? +arr[1]
: arr[1].split(',').map(function(val) { : arr[1].split(',').map(function(val) {
return +val; return +val;
}); });
}
}); });
return obj; return obj;
}; };