Commit 71c4ec39 authored by Thimo Kraemer's avatar Thimo Kraemer

Convert client action params to camel-case

parent 6f6d3d2f
...@@ -725,7 +725,10 @@ kss._EventHandler.prototype = { ...@@ -725,7 +725,10 @@ kss._EventHandler.prototype = {
this.error('Skipping non-existent client action "' + action + '"'); this.error('Skipping non-existent client action "' + action + '"');
return; return;
} }
params = params || {}; var _params = {};
kss.each(params, function(value, key) {
_params[kss.camelCase(key)] = value;
});
action = {name: action, type: 'client'}; action = {name: action, type: 'client'};
this._callBinders('onstart', action); this._callBinders('onstart', action);
var error; var error;
...@@ -734,9 +737,9 @@ kss._EventHandler.prototype = { ...@@ -734,9 +737,9 @@ kss._EventHandler.prototype = {
var nodes = kss.cssQuery(selector, this.node, true); var nodes = kss.cssQuery(selector, this.node, true);
this.log('Execute client action "' + action.name + '" for ' this.log('Execute client action "' + action.name + '" for '
+ nodes.length + ' node(s) (selector "' + selector + '")'); + nodes.length + ' node(s) (selector "' + selector + '")');
this.debug('Parameters:', params); this.debug('Parameters:', _params);
kss.each(nodes, function(node) { kss.each(nodes, function(node) {
kss._actionProviders[action.name].call(this, node, params); kss._actionProviders[action.name].call(this, node, _params);
}, this); }, this);
} }
catch (err) { catch (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment