Author: nbelaevski
Date: 2010-07-10 08:10:46 -0400 (Sat, 10 Jul 2010)
New Revision: 17806
Added:
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryTiming.java
Removed:
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryAttachTiming.java
Modified:
root/examples/misc-demo/trunk/src/main/webapp/pages/jquery.xhtml
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/AbstractJQuery.java
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java
root/ui/misc/trunk/jquery/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js
Log:
https://jira.jboss.org/browse/RF-8882
Modified: root/examples/misc-demo/trunk/src/main/webapp/pages/jquery.xhtml
===================================================================
--- root/examples/misc-demo/trunk/src/main/webapp/pages/jquery.xhtml 2010-07-10 11:50:57
UTC (rev 17805)
+++ root/examples/misc-demo/trunk/src/main/webapp/pages/jquery.xhtml 2010-07-10 12:10:46
UTC (rev 17806)
@@ -15,8 +15,8 @@
Click here
</h:panelGroup>
- <misc:jQuery selector="#clickTest" event="click"
query="alert('immediate attachment')" attachTiming="immediate"
/>
- <misc:jQuery selector="#clickTestForReady" event="click"
query="alert('onready attachment')" attachTiming="onready"
/>
+ <misc:jQuery selector="#clickTest" event="click"
query="alert('immediate attachment')" timing="immediate"
/>
+ <misc:jQuery selector="#clickTestForReady" event="click"
query="alert('onready attachment')" timing="domready" />
<misc:jQuery selector="document.body"
query="css({'background-color': '#AAA'})" />
Modified:
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/AbstractJQuery.java
===================================================================
---
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/AbstractJQuery.java 2010-07-10
11:50:57 UTC (rev 17805)
+++
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/AbstractJQuery.java 2010-07-10
12:10:46 UTC (rev 17806)
@@ -54,8 +54,8 @@
@Attribute(defaultValue = "JQueryAttachType.DEFAULT")
public abstract JQueryAttachType getAttachType();
- @Attribute(defaultValue = "JQueryAttachTiming.DEFAULT")
- public abstract JQueryAttachTiming getAttachTiming();
+ @Attribute(defaultValue = "JQueryTiming.DEFAULT")
+ public abstract JQueryTiming getTiming();
}
Deleted:
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryAttachTiming.java
===================================================================
---
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryAttachTiming.java 2010-07-10
11:50:57 UTC (rev 17805)
+++
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryAttachTiming.java 2010-07-10
12:10:46 UTC (rev 17806)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.richfaces.component;
-
-/**
- * @author nick
- *
- */
-public enum JQueryAttachTiming {
-
- immediate, onready;
-
- public static final JQueryAttachTiming DEFAULT = immediate;
-
-}
Copied: root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryTiming.java
(from rev 17805,
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryAttachTiming.java)
===================================================================
--- root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryTiming.java
(rev 0)
+++
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/component/JQueryTiming.java 2010-07-10
12:10:46 UTC (rev 17806)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.richfaces.component;
+
+/**
+ * @author nick
+ *
+ */
+public enum JQueryTiming {
+
+ immediate, domready;
+
+ public static final JQueryTiming DEFAULT = domready;
+
+}
Modified:
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java
===================================================================
---
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java 2010-07-10
11:50:57 UTC (rev 17805)
+++
root/ui/misc/trunk/jquery/src/main/java/org/richfaces/renderkit/JQueryRendererBase.java 2010-07-10
12:10:46 UTC (rev 17806)
@@ -34,7 +34,7 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.RendererUtils;
import org.richfaces.component.AbstractJQuery;
-import org.richfaces.component.JQueryAttachTiming;
+import org.richfaces.component.JQueryTiming;
import org.richfaces.component.JQueryAttachType;
import org.richfaces.component.util.HtmlUtil;
@@ -69,7 +69,7 @@
rendererUtils.addToScriptHash(map, "event", jQuery.getEvent());
rendererUtils.addToScriptHash(map, "query", jQuery.getQuery());
rendererUtils.addToScriptHash(map, "attachType",
jQuery.getAttachType(), JQueryAttachType.DEFAULT.toString());
- rendererUtils.addToScriptHash(map, "attachTiming",
jQuery.getAttachTiming(), JQueryAttachTiming.DEFAULT.toString());
+ rendererUtils.addToScriptHash(map, "timing", jQuery.getTiming(),
JQueryTiming.DEFAULT.toString());
return ScriptUtils.toScript(map);
}
Modified:
root/ui/misc/trunk/jquery/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js
===================================================================
---
root/ui/misc/trunk/jquery/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js 2010-07-10
11:50:57 UTC (rev 17805)
+++
root/ui/misc/trunk/jquery/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js 2010-07-10
12:10:46 UTC (rev 17806)
@@ -45,7 +45,7 @@
};
var bind = function(options) {
- if (options.attachTimimg == 'immediate') {
+ if (options.timing == 'immediate') {
bindFunction(options);
} else {
jQuery(document).ready(function() {