Author: nbelaevski
Date: 2007-06-25 15:06:28 -0400 (Mon, 25 Jun 2007)
New Revision: 1311
Modified:
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js
Log:
Resolved bug: drag/drop participants weren't able to override drag indicator params
Modified:
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js
===================================================================
---
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js 2007-06-25
18:43:42 UTC (rev 1310)
+++
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js 2007-06-25
19:06:28 UTC (rev 1311)
@@ -6,17 +6,21 @@
setContent: function(name, single, params) {
Element.clearChildren(this);
- if (!params) {
- params = {};
+ var p = DnD.getDnDDefaultParams(this);
+
+ if (!p) {
+ p = {};
}
- Object.extend(params, DnD.getDnDDefaultParams(this));
-
- if (!params['marker']) {
- if (params[name]) {
- params['marker'] = params[name];
+ if (params) {
+ Object.extend(p, params);
+ }
+
+ if (!p['marker']) {
+ if (p[name]) {
+ p['marker'] = p[name];
} else {
- params['marker'] = this.markers[name];
+ p['marker'] = this.markers[name];
}
}
@@ -28,7 +32,7 @@
parts = this.indicatorTemplates['multi'];
}
- new Insertion.Top(this, parts.invoke('getOuterHTML',
params).join(''));
+ new Insertion.Top(this, parts.invoke('getOuterHTML', p).join(''));
},
show: function() {
Show replies by date