JBoss Rich Faces SVN: r7248 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-26 08:18:41 -0400 (Wed, 26 Mar 2008)
New Revision: 7248
Modified:
trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
Log:
http://jira.jboss.com/jira/browse/RF-2174
Classes usage images were added
Modified: trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-03-26 12:18:13 UTC (rev 7247)
+++ trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-03-26 12:18:41 UTC (rev 7248)
@@ -666,7 +666,7 @@
<section>
<title>Definition of Custom Style Classes</title>
- <para>The following picture illustrates how CSS classes define styles for component elements.</para>
+ <para>The following pictures illustrate how CSS classes define styles for component elements.</para>
<figure>
@@ -674,11 +674,19 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/pickList2.png"/>
+ <imagedata fileref="images/pickListClasses1.png"/>
</imageobject>
</mediaobject>
-
</figure>
+
+ <figure>
+ <title>Classes names</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/pickListClasses2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<table id="pickListC">
<title>Classes names that define a list representation</title>
@@ -759,7 +767,7 @@
</thead>
<tbody>
<row>
- <entry>rich-picklist-target-cel</entry>
+ <entry>rich-picklist-target-cell</entry>
<entry>Defines styles for a cell in a source list</entry>
</row>
<row>
16 years, 9 months
JBoss Rich Faces SVN: r7247 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-26 08:18:13 -0400 (Wed, 26 Mar 2008)
New Revision: 7247
Added:
trunk/docs/userguide/en/src/main/resources/images/pickListClasses2.png
Log:
http://jira.jboss.com/jira/browse/RF-2174
Classes usage images
Added: trunk/docs/userguide/en/src/main/resources/images/pickListClasses2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/pickListClasses2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r7246 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-26 08:18:02 -0400 (Wed, 26 Mar 2008)
New Revision: 7246
Added:
trunk/docs/userguide/en/src/main/resources/images/pickListClasses1.png
Log:
http://jira.jboss.com/jira/browse/RF-2174
Classes usage images
Added: trunk/docs/userguide/en/src/main/resources/images/pickListClasses1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/pickListClasses1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r7245 - branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-26 08:14:45 -0400 (Wed, 26 Mar 2008)
New Revision: 7245
Modified:
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-2482
Modified: branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-26 12:09:36 UTC (rev 7244)
+++ branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-26 12:14:45 UTC (rev 7245)
@@ -523,28 +523,39 @@
return result;
}
+ /**
+ * Write labels used in the Calendar component, taken from message bundles.
+ * Try to use bundle1 at first. If the 1st bundle is null or it doesn't
+ * contain requested message key, use the bundle2.
+ * @param bundle1 - 1st bundle to be used as a source for messages
+ * @param bundle2 - 2nd bundle to be used as a source for messages
+ * @param name - name of the requested label
+ * @param writer - response writer
+ * @throws IOException
+ */
public void writeStringsFromBundle(ResourceBundle bundle1, ResourceBundle bundle2, String name,
- ResponseWriter writer) throws IOException {
-
- String label = null;
+ ResponseWriter writer) throws IOException {
+ String label = null;
+ String bundleKey = "RICH_CALENDAR_" + name.toUpperCase() + "_LABEL";
+
+ if (bundle1 != null) {
try {
- if(null != bundle1){
- label = bundle1.getString("RICH_CALENDAR_" + name.toUpperCase() + "_LABEL");
- }
-
- } catch (MissingResourceException e) {
- // Current key wasn't found in application bundle, use CALENDAR_BUNDLE
- try {
-
- if(null != bundle2){
- label = bundle2.getString("RICH_CALENDAR_" + name.toUpperCase() + "_LABEL");
- }
- } catch (MissingResourceException exc) {
- // Current key wasn't found, use default, ignore this exception.
- }
- }
- writeStringFoundInBundle(name, label, writer);
-
+ label = bundle1.getString(bundleKey);
+ } catch (MissingResourceException mre) {
+ // Current key was not found, ignore this exception;
+ }
+ }
+ // Current key wasn't found in application bundle, use CALENDAR_BUNDLE,
+ // if it is not null
+ if ((label == null) && (bundle2 != null)) {
+ try {
+ label = bundle2.getString(bundleKey);
+ } catch (MissingResourceException mre) {
+ // Current key was not found, ignore this exception;
+ }
+ }
+
+ writeStringFoundInBundle(name, label, writer);
}
public void writeStringFoundInBundle(String name, String value, ResponseWriter writer) throws IOException {
16 years, 9 months
JBoss Rich Faces SVN: r7244 - trunk/framework/impl/src/main/javascript/scriptaculous.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-03-26 08:09:36 -0400 (Wed, 26 Mar 2008)
New Revision: 7244
Added:
trunk/framework/impl/src/main/javascript/scriptaculous/scriptaculous.js
Modified:
trunk/framework/impl/src/main/javascript/scriptaculous/builder.js
trunk/framework/impl/src/main/javascript/scriptaculous/controls.js
trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js
trunk/framework/impl/src/main/javascript/scriptaculous/effects.js
trunk/framework/impl/src/main/javascript/scriptaculous/slider.js
trunk/framework/impl/src/main/javascript/scriptaculous/sound.js
trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js
Log:
http://jira.jboss.com/jira/browse/RF-2773
updated to version 1.8.1
Modified: trunk/framework/impl/src/main/javascript/scriptaculous/builder.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/builder.js 2008-03-26 12:08:42 UTC (rev 7243)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/builder.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -1,4 +1,4 @@
-// script.aculo.us builder.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us builder.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
Modified: trunk/framework/impl/src/main/javascript/scriptaculous/controls.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/controls.js 2008-03-26 12:08:42 UTC (rev 7243)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/controls.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -1,4 +1,4 @@
-// script.aculo.us controls.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us controls.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
@@ -88,7 +88,7 @@
Element.hide(this.update);
Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
- Event.observe(this.element, 'keypress', this.onKeyPress.bindAsEventListener(this));
+ Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this));
},
show: function() {
@@ -144,12 +144,12 @@
case Event.KEY_UP:
this.markPrevious();
this.render();
- if(Prototype.Browser.WebKit) Event.stop(event);
+ Event.stop(event);
return;
case Event.KEY_DOWN:
this.markNext();
this.render();
- if(Prototype.Browser.WebKit) Event.stop(event);
+ Event.stop(event);
return;
}
else
Modified: trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js 2008-03-26 12:08:42 UTC (rev 7243)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -1,4 +1,4 @@
-// script.aculo.us dragdrop.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us dragdrop.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi(a)oriontransfer.co.nz)
Modified: trunk/framework/impl/src/main/javascript/scriptaculous/effects.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/effects.js 2008-03-26 12:08:42 UTC (rev 7243)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/effects.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -1,4 +1,4 @@
-// script.aculo.us effects.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us effects.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Contributors:
@@ -1076,11 +1076,11 @@
Element.getStyles = function(element) {
element = $(element);
var css = element.currentStyle, styles;
- styles = Element.CSS_PROPERTIES.inject({ }, function(hash, property) {
- hash.set(property, css[property]);
- return hash;
+ styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) {
+ results[property] = css[property];
+ return results;
});
- if (!styles.opacity) styles.set('opacity', element.getOpacity());
+ if (!styles.opacity) styles.opacity = element.getOpacity();
return styles;
};
};
Added: trunk/framework/impl/src/main/javascript/scriptaculous/scriptaculous.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/scriptaculous.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/scriptaculous.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -0,0 +1,58 @@
+// script.aculo.us scriptaculous.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Scriptaculous = {
+ Version: '1.8.1',
+ require: function(libraryName) {
+ // inserting via DOM fails in Safari 2.0, so brute force approach
+ document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
+ },
+ REQUIRED_PROTOTYPE: '1.6.0',
+ load: function() {
+ function convertVersionString(versionString){
+ var r = versionString.split('.');
+ return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
+ }
+
+ if((typeof Prototype=='undefined') ||
+ (typeof Element == 'undefined') ||
+ (typeof Element.Methods=='undefined') ||
+ (convertVersionString(Prototype.Version) <
+ convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
+ throw("script.aculo.us requires the Prototype JavaScript framework >= " +
+ Scriptaculous.REQUIRED_PROTOTYPE);
+
+ $A(document.getElementsByTagName("script")).findAll( function(s) {
+ return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
+ }).each( function(s) {
+ var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
+ var includes = s.src.match(/\?.*load=([a-z,]*)/);
+ (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
+ function(include) { Scriptaculous.require(path+include+'.js') });
+ });
+ }
+}
+
+Scriptaculous.load();
\ No newline at end of file
Modified: trunk/framework/impl/src/main/javascript/scriptaculous/slider.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/slider.js 2008-03-26 12:08:42 UTC (rev 7243)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/slider.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -1,4 +1,4 @@
-// script.aculo.us slider.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us slider.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
// Copyright (c) 2005-2007 Marty Haught, Thomas Fuchs
//
Modified: trunk/framework/impl/src/main/javascript/scriptaculous/sound.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/sound.js 2008-03-26 12:08:42 UTC (rev 7243)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/sound.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -1,4 +1,4 @@
-// script.aculo.us sound.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us sound.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
Modified: trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js 2008-03-26 12:08:42 UTC (rev 7243)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js 2008-03-26 12:09:36 UTC (rev 7244)
@@ -1,4 +1,4 @@
-// script.aculo.us unittest.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
+// script.aculo.us unittest.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
16 years, 9 months
JBoss Rich Faces SVN: r7243 - trunk/ui/calendar/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-26 08:08:42 -0400 (Wed, 26 Mar 2008)
New Revision: 7243
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-2482
Modified: trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-26 11:43:55 UTC (rev 7242)
+++ trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-26 12:08:42 UTC (rev 7243)
@@ -525,35 +525,39 @@
return result;
}
+ /**
+ * Write labels used in the Calendar component, taken from message bundles.
+ * Try to use bundle1 at first. If the 1st bundle is null or it doesn't
+ * contain requested message key, use the bundle2.
+ * @param bundle1 - 1st bundle to be used as a source for messages
+ * @param bundle2 - 2nd bundle to be used as a source for messages
+ * @param name - name of the requested label
+ * @param writer - response writer
+ * @throws IOException
+ */
public void writeStringsFromBundle(ResourceBundle bundle1, ResourceBundle bundle2, String name,
- ResponseWriter writer) throws IOException {
-
- String label = null;
- if(null != bundle1){
- try {
- label = bundle1.getString("RICH_CALENDAR_" + name.toUpperCase() + "_LABEL");
- } catch (MissingResourceException e) {
- // Current key wasn't found in application bundle, use CALENDAR_BUNDLE
- try {
- if(null != bundle2){
- label = bundle2.getString("RICH_CALENDAR_" + name.toUpperCase() + "_LABEL");
- }
- } catch (MissingResourceException exc) {
- // Current key wasn't found, use default, ignore this exception.
- }
- }
-
- }else if(null != bundle2){
- try {
- label = bundle2.getString("RICH_CALENDAR_" + name.toUpperCase() + "_LABEL");
- } catch (MissingResourceException exc) {
- // Current key wasn't found, use default, ignore this exception.
- }
-
- }
-
- writeStringFoundInBundle(name, label, writer);
-
+ ResponseWriter writer) throws IOException {
+ String label = null;
+ String bundleKey = "RICH_CALENDAR_" + name.toUpperCase() + "_LABEL";
+
+ if (bundle1 != null) {
+ try {
+ label = bundle1.getString(bundleKey);
+ } catch (MissingResourceException mre) {
+ // Current key was not found, ignore this exception;
+ }
+ }
+ // Current key wasn't found in application bundle, use CALENDAR_BUNDLE,
+ // if it is not null
+ if((label == null) && (bundle2 != null)) {
+ try {
+ label = bundle2.getString(bundleKey);
+ } catch (MissingResourceException mre) {
+ // Current key was not found, ignore this exception;
+ }
+ }
+
+ writeStringFoundInBundle(name, label, writer);
}
public void writeStringFoundInBundle(String name, String value, ResponseWriter writer) throws IOException {
16 years, 9 months
JBoss Rich Faces SVN: r7242 - in trunk: ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-03-26 07:43:55 -0400 (Wed, 26 Mar 2008)
New Revision: 7242
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-2551
Modified: trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java 2008-03-26 10:59:00 UTC (rev 7241)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java 2008-03-26 11:43:55 UTC (rev 7242)
@@ -7,6 +7,7 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.Writer;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -75,9 +76,16 @@
protected List<?> parseExpressiion(String expressionString) throws SAXException {
try {
- List<?> result = new RichMacroDefinition(new StringReader(expressionString)).expression();
+ if (expressionString.length() != 0) {
+ List<?> result = new RichMacroDefinition(new StringReader(expressionString)).expression();
- return result;
+ return result;
+ } else {
+ List<Object> list = new ArrayList<Object>(1);
+ list.add("");
+
+ return list;
+ }
} catch (Exception e) {
throw new SAXException(e.getMessage(), e);
}
@@ -86,9 +94,9 @@
private void encodeExpressionString(String string) throws IOException,
SAXException {
- if (string.length() == 0) {
+ /*if (string.length() == 0) {
this.outputWriter.write("\'\'");
- }
+ }*/
List<?> parsedExpressiion = parseExpressiion(string);
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-26 10:59:00 UTC (rev 7241)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-26 11:43:55 UTC (rev 7242)
@@ -124,7 +124,7 @@
if (!window.opera)
{
var parentOffset = element.getOffsetParent().viewportOffset();
- ox -= parentOffset[0];
+ ox -= parentOffset[0];
oy -= parentOffset[1];
} else if (element.offsetParent)
{
16 years, 9 months
JBoss Rich Faces SVN: r7241 - in branches/3.1.x/ui/calendar/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-26 06:59:00 -0400 (Wed, 26 Mar 2008)
New Revision: 7241
Modified:
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-2757
Modified: branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-26 09:26:06 UTC (rev 7240)
+++ branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-26 10:59:00 UTC (rev 7241)
@@ -71,7 +71,12 @@
protected static final String WEEK_DAY_LABELS = "weekDayLabels";
- public static final String DATE_SCROLL = "DateScroll";
+ /**
+ * The constant used to resolve id of hidden input placed on the page
+ * for storing current date in "MM/yyyy" format.
+ * Actual id of hidden input used on the page is #{clientId}InputCurrentDate
+ */
+ public static final String CURRENT_DATE_INPUT = "InputCurrentDate";
protected static final String MARKUP_SUFFIX = "Markup";
@@ -139,12 +144,9 @@
Map requestParameterMap = context.getExternalContext()
.getRequestParameterMap();
- String currentDateString = (String) requestParameterMap.get(clientId
- + DATE_SCROLL);
+ String currentDateString = (String) requestParameterMap.get(clientId + CURRENT_DATE_INPUT);
if (currentDateString != null) {
- // ((UICalendar) component)
- // .setCurrentDate(convertCurrentDate(currentDateString));
CurrentDateChangeEvent ev = new CurrentDateChangeEvent(component,
currentDateString);
ev.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
@@ -316,10 +318,7 @@
}
options.put("oncomplete", oncompleteDefinition);
- Map parametersMap = (Map) options.get("parameters");
JSReference requestValue = new JSReference("requestValue");
- parametersMap.remove(clientId);
- parametersMap.put(clientId + DATE_SCROLL, requestValue);
ajaxFunction.addParameter(options);
JSFunctionDefinition definition = new JSFunctionDefinition();
definition.addParameter(requestValue);
Modified: branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-26 09:26:06 UTC (rev 7240)
+++ branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-26 10:59:00 UTC (rev 7241)
@@ -1652,21 +1652,25 @@
if (this.getCurrentMonth()!=month || this.getCurrentYear()!=year)
{
var date = new Date(year, month,1);
- if (this.invokeEvent("currentdateselect", $(this.id), null, date))
- {
- this.currentDate = date;
- this.onUpdate();
- }
+ // fix for RF-2450.
+ // Wrong sequence: at first the hidden input with current date value
+ // should be updated in function onUpdate()
+ // and then the "currentdateselect" Event should be fired.
+ this.currentDate = date;
+ this.onUpdate();
+ this.invokeEvent("currentdateselect", $(this.id), null, date);
}
},
changeCurrentDateOffset: function(yearOffset, monthOffset) {
var date = new Date(this.currentDate.getFullYear()+yearOffset, this.currentDate.getMonth()+monthOffset,1);
- if (this.invokeEvent("currentdateselect", $(this.id), null, date))
- {
- this.currentDate = date;
- this.onUpdate();
- }
+ // fix for RF-2450.
+ // Wrong sequence: at first the hidden input with current date value
+ // should be updated in function onUpdate()
+ // and then the "currentdateselect" Event should be fired.
+ this.currentDate = date;
+ this.onUpdate();
+ this.invokeEvent("currentdateselect", $(this.id), null, date);
},
today: function(noUpdate, noHighlight) {
16 years, 9 months
JBoss Rich Faces SVN: r7240 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-26 05:26:06 -0400 (Wed, 26 Mar 2008)
New Revision: 7240
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
[RF-2756] simplification
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-26 03:12:49 UTC (rev 7239)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-26 09:26:06 UTC (rev 7240)
@@ -492,12 +492,11 @@
for (var e in this.events) {
if (e && this.events[e]) {
if(e == 'onupload') {
- this.element.observe("rich:" + e, (function (handler) {
- return function(event) {
- if(handler(event) !== false) {
- event.memo.entry.upload();
- }
- }.bind(this);}.bind(this))(this.events[e]));
+ this.element.observe("rich:onupload", function(event) {
+ if(this.events['onupload'](event) !== false) {
+ event.memo.entry.upload();
+ }
+ }.bindAsEventListener(this));
} else {
this.element.observe("rich:" + e, this.events[e]);
}
16 years, 9 months
JBoss Rich Faces SVN: r7239 - trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-25 23:12:49 -0400 (Tue, 25 Mar 2008)
New Revision: 7239
Modified:
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js
Log:
http://jira.jboss.com/jira/browse/RF-2579
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js 2008-03-26 00:16:39 UTC (rev 7238)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js 2008-03-26 03:12:49 UTC (rev 7239)
@@ -13,6 +13,29 @@
Richfaces.SelectItem = Class.create();
+Richfaces.SelectItem.findElement = function(elt, id) {
+ var e = elt;
+
+ if (e) {
+ if (e.id == id) {
+ return e;
+ }
+
+ e = e.firstChild;
+ while (e) {
+ var result = arguments.callee(e, id);
+
+ if (result) {
+ return result;
+ }
+
+ e = e.nextSibling;
+ }
+ }
+
+ return null;
+};
+
Richfaces.SelectItem.prototype = {
initialize : function(label, id, node) {
this._label = label;
@@ -21,8 +44,8 @@
this._node.item = this;
this._id = id;
- //TODO 2 optimize
- this.input = $(node.id + "StateInput");
+ //XXX 2 optimize
+ this.input = Richfaces.SelectItem.findElement(node, node.id + "StateInput");
this.selected = /^s/.test(this.input.value);
this.active = /^s?a/.test(this.input.value);
16 years, 9 months