Author: maksimkaszynski
Date: 2007-11-26 13:21:51 -0500 (Mon, 26 Nov 2007)
New Revision: 4271
Modified:
branches/3.1.x/sandbox/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js
Log:
Allowed decoration of components context menu is attached to
Modified:
branches/3.1.x/sandbox/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js
===================================================================
---
branches/3.1.x/sandbox/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js 2007-11-26
18:21:42 UTC (rev 4270)
+++
branches/3.1.x/sandbox/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js 2007-11-26
18:21:51 UTC (rev 4271)
@@ -15,7 +15,8 @@
Richfaces.ContextMenu.prototype = {
- initialize: function(id, evaluator) {
+ initialize: function(id, evaluator, options) {
+ this.options = options || {};
this.id = id;
this.evaluator = evaluator;
$(id).component = this;
@@ -31,6 +32,11 @@
element = element.parentNode;
}
}
+
+ if (element) {
+ this.applyDecoration(element);
+ }
+
//Strip 'on' here
var evnName = event.substr(2);
var listener = this.show.bindAsEventListener(this, context);
@@ -73,6 +79,16 @@
// do not destroy menu
//var oldContext = this.context || {};
return true;
+ },
+
+ applyDecoration : function(element) {
+
+ $(element).addClassName("rich-cm-attached");
+
+ /*var f = this.options.applyDecorations;
+ if (f) {
+ f(element);
+ }*/
}
};
Show replies by date