Author: nbelaevski
Date: 2007-03-21 08:45:20 -0400 (Wed, 21 Mar 2007)
New Revision: 110
Modified:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js
Log:
If params are missing, defaults were not set
Modified:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js
===================================================================
---
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js 2007-03-21
10:57:43 UTC (rev 109)
+++
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js 2007-03-21
12:45:20 UTC (rev 110)
@@ -2,10 +2,13 @@
var attr = elt.attributes["rich:defaultdndparams"];
if (attr) {
- return attr.value.parseJSON();
+ var params = attr.value.parseJSON();
+ if (params) {
+ return params;
+ }
}
- return null;
+ return {};
}
DnD.getDnDMergedParams = function(elt, name) {
@@ -38,9 +41,6 @@
DnD.setDefaultDnDParams = function(params) {
if (params) {
if (drag && drag.source && drag.source.getDraggableItems &&
drag.source.getDraggableItems() > 1) {
- if (!params) {
- params = {};
- }
var itemsCount = drag.source.getDraggableItems();
params["count"] = itemsCount;
Show replies by date