JBoss Rich Faces SVN: r7850 - branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-15 14:37:19 -0400 (Tue, 15 Apr 2008)
New Revision: 7850
Modified:
branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3014
Modified: branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-15 18:13:05 UTC (rev 7849)
+++ branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-15 18:37:19 UTC (rev 7850)
@@ -177,7 +177,8 @@
zindex: #{component.zindex},
onhide: #{onhide},
-
+ onshow: #{onshow},
+
keepVisualState: #{component.keepVisualState},
showWhenRendered: #{component.showWhenRendered},
selectBehavior: "#{component.tridentIVEngineSelectBehavior}",
16 years, 9 months
JBoss Rich Faces SVN: r7849 - branches/3.2.x/docs/userguide.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-04-15 14:13:05 -0400 (Tue, 15 Apr 2008)
New Revision: 7849
Modified:
branches/3.2.x/docs/userguide/pom.xml
Log:
fix xml plugin version
Modified: branches/3.2.x/docs/userguide/pom.xml
===================================================================
--- branches/3.2.x/docs/userguide/pom.xml 2008-04-15 18:05:21 UTC (rev 7848)
+++ branches/3.2.x/docs/userguide/pom.xml 2008-04-15 18:13:05 UTC (rev 7849)
@@ -560,6 +560,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
+ <version>1.0-beta-2</version>
<executions>
<execution>
<id>transformTld</id>
16 years, 9 months
JBoss Rich Faces SVN: r7848 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-04-15 14:05:21 -0400 (Tue, 15 Apr 2008)
New Revision: 7848
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-1207 - Details of Usage changed according to doc file
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml 2008-04-15 18:04:57 UTC (rev 7847)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml 2008-04-15 18:05:21 UTC (rev 7848)
@@ -28,13 +28,13 @@
<title>Key Features</title>
<itemizedlist>
<listitem><para>ProgressBar shows the status of downloads</para></listitem>
- <listitem><para>Highly customizable look and feel</para></listitem>
<listitem><para>File types, file sizes and files count restrictions</para></listitem>
<listitem><para>Multiple files upload support</para></listitem>
<listitem><para>Possibility to cancel the request</para></listitem>
<listitem><para>One request for every upload</para></listitem>
<listitem><para>Automatic uploads</para></listitem>
<listitem><para>Supports standard JSF internationalization</para></listitem>
+ <listitem><para>Highly customizable look and feel</para></listitem>
<listitem><para>Disablement support</para></listitem>
</itemizedlist>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-04-15 18:04:57 UTC (rev 7847)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-04-15 18:05:21 UTC (rev 7848)
@@ -357,16 +357,13 @@
</imageobject>
</mediaobject>
</figure>
- <para>It's possible to program events for fileUpload from JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
+ <para>It's possible to handle events for fileUpload from JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:fileUpload ... id="upload">
- ...
- </rich:fileUpload>
- ...
-<h:commandButton value="Click me" onclick="#{rich:component('upload')}.enable(event)"/>
+<rich:fileUpload id="upload" disabled="false"/>
+<h:commandButton onclick="${rich:component('upload')}.disable(event); return false;" value="Disable" />
...]]></programlisting>
<para>The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component allows to use internationalization method
to redefine and localize the labels. You could use application resource bundle and define
16 years, 9 months
JBoss Rich Faces SVN: r7847 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-04-15 14:04:57 -0400 (Tue, 15 Apr 2008)
New Revision: 7847
Modified:
trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
Log:
http://jira.jboss.com/jira/browse/RF-1216 - Details of Usage changed according to doc file
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2008-04-15 17:03:14 UTC (rev 7846)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2008-04-15 18:04:57 UTC (rev 7847)
@@ -23,15 +23,27 @@
<section>
<title>Key Features</title>
<itemizedlist>
- <listitem>Highly customizable look and feel</listitem>
- <listitem>Disablement support</listitem>
- <listitem>Browser like selection</listitem>
- <listitem>Smart user-defined positioning</listitem>
+ <listitem>
+ <para>Client side suggestions</para>
+ </listitem>
+ <listitem>
+ <para>Browser like selection</para>
+ </listitem>
+ <listitem>
+ <para>Smart user-defined positioning</para>
+ </listitem>
<!--listitem>Possible to set the popup appearance delay through <emphasis><property>"showDelay"</property></emphasis>
or <emphasis><property>"minChars"</property></emphasis> attributes
</listitem-->
- <listitem>Seam entity converter support</listitem>
-
+ <listitem>
+ <para>Seam entity converter support</para>
+ </listitem>
+ <listitem>
+ <para>Highly customizable look and feel</para>
+ </listitem>
+ <listitem>
+ <para>Disablement support</para>
+ </listitem>
</itemizedlist>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-04-15 17:03:14 UTC (rev 7846)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-04-15 18:04:57 UTC (rev 7847)
@@ -64,8 +64,13 @@
<title>Details of Usage</title>
<para>The <emphasis role="bold">
<property><rich:comboBox></property>
- </emphasis> component consists of an <property>input field</property>, the <property>button</property> and the <property>popup list</property> of suggestions
+ </emphasis>
+ is a simplified suggestion box component, that provides input with client side suggestions.
+ <!--
+ component consists of an <property>input field</property>, the <property>button</property> and the <property>popup list</property> of suggestions
attached to input. If you want to see the popup list you can press the <property>button</property> or type the first letter of suggested word in the <property>input field</property>.
+ -->
+
The component could be in two states:
<!-- NEED DESCRIPTION "HOW TO MANAGE THIS"-->
@@ -91,7 +96,8 @@
<listitem>
<para>
Using the <emphasis role="bold"><property><f:selectItem /></property></emphasis> or <emphasis role="bold">
- <property><f:selectItems /></property></emphasis> facets
+ <property><f:selectItems /></property></emphasis> facets which considers only
+ <emphasis role="bold"><property><value /></property></emphasis> attribute.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -136,7 +142,7 @@
<para>
The <emphasis><property> "selectFirstOnUpdate"</property></emphasis> attribute defines if the first value from suggested is selected in a popup list.
- If it's "false" nothing is selected in the list before a user hovers some item with the mouse. Also nothing could be selected after the mouse is out the list.
+ If it's "false" nothing is selected in the list before a user hovers some item with the mouse.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -234,7 +240,7 @@
</listitem>
</itemizedlist>
</para>
- <para>It's possible to program events for comboBox from JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
+ <para>It's possible to handle events for comboBox from JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
16 years, 9 months
JBoss Rich Faces SVN: r7846 - branches/3.1.x/samples/modalpanel-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-15 13:03:14 -0400 (Tue, 15 Apr 2008)
New Revision: 7846
Modified:
branches/3.1.x/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-3078
http://jira.jboss.com/jira/browse/RF-2366
Modified: branches/3.1.x/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2008-04-15 17:03:10 UTC (rev 7845)
+++ branches/3.1.x/samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2008-04-15 17:03:14 UTC (rev 7846)
@@ -104,8 +104,10 @@
<f:verbatim>
<a href="javascript:Richfaces.showModalPanel('_form:_panel2');">Show 2nd panel</a>
+ <div style="width: 700px; height: 700px; border: 1px solid red;">I'm big DIV</div>
</f:verbatim>
+
<mp:modalPanel height="200" top="100" width="450" id="_panel2" controlsClass="pointerCursor" zindex="500">
<f:facet name="header">
<f:verbatim>
@@ -149,6 +151,7 @@
<a href="javascript:Richfaces.showModalPanel(':_panel', {top: 'auto', width: 800});">Show: width = 800; top = auto</a>
<a href="javascript:Richfaces.showModalPanel(':_panel', {width: 1});">Show: width = 1</a>
<a href="javascript:Richfaces.showModalPanel('eventInfoID');">Show autosized panel</a>
+ <a href="javascript:Richfaces.showModalPanel('eventInfoID', {width: 1100, height: 700});">Show big autosized panel</a>
</f:verbatim>
@@ -162,7 +165,7 @@
</f:facet>
- <h:outputText value="Eventsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ..." />
+ <h:outputText value="Eventsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ..." />
</mp:modalPanel>
</h:panelGrid>
16 years, 9 months
JBoss Rich Faces SVN: r7845 - in branches/3.1.x/ui/modal-panel/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-15 13:03:10 -0400 (Tue, 15 Apr 2008)
New Revision: 7845
Modified:
branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3078
http://jira.jboss.com/jira/browse/RF-2366
Modified: branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-04-15 16:26:00 UTC (rev 7844)
+++ branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-04-15 17:03:10 UTC (rev 7845)
@@ -6,9 +6,6 @@
window.Richfaces = {};
}
-sizeA = 4;
-sizeB = 40;
-
function discardElement(element) {
var garbageBin = document.getElementById('IELeakGarbageBin');
if (!garbageBin) {
@@ -48,42 +45,18 @@
ModalPanel.panels = new Array();
-ModalPanel.Context = Class.create();
-ModalPanel.Context.prototype = {
- initialize: function(modalPanel) {
- this.cdiv = modalPanel.contentDiv;
- this.isPositionFixed = Richfaces.getComputedStyle(this.cdiv, "position") == "fixed";
- },
-
- left: function(offset) {
- return offset;
- },
-
- top: function(offset) {
- return offset;
- },
-
- width: function() {
- return $(this.cdiv).offsetWidth;
- },
-
- height: function() {
- return $(this.cdiv).offsetHeight;
+function getSizeElement() {
+ var element;
+ if (RichFaces.navigatorType() != "OPERA" && document.compatMode=='CSS1Compat') {
+ element = document.documentElement;
+ } else {
+ element = document.body;
}
+
+ return element;
}
- function getSizeElement() {
- var element;
- if (RichFaces.navigatorType() != "OPERA" && document.compatMode=='CSS1Compat') {
- element = document.documentElement;
- } else {
- element = document.body;
- }
- return element;
- }
-
-
ModalPanel.prototype = {
initialize: function(id, options) {
this["rich:destructor"] = "destroy";
@@ -96,17 +69,16 @@
this.baseZIndex = this.options.zindex ? this.options.zindex : 100;
- this.minWidth = Math.max(this.options.minWidth, 2*sizeA + 2);
- this.minHeight = Math.max(this.options.minHeight, 2*sizeA + 2);
+ this.minWidth = Math.max(this.options.minWidth, 2*ModalPanel.Sizer.INITIAL_MIN + 2);
+ this.minHeight = Math.max(this.options.minHeight, 2*ModalPanel.Sizer.INITIAL_MIN + 2);
this.div = id + "Div";
this.cursorDiv = id + "CursorDiv";
this.cdiv = id + "CDiv";
this.contentDiv = id + "ContentDiv";
+ this.contentTable = id + "ContentTable";
this.shadowDiv = id + "ShadowDiv";
- this.context = new ModalPanel.Context(this);
-
this.borders = new Array();
if (this.options.resizeable) {
@@ -159,7 +131,6 @@
this.eventOnHide = new Function("event",this.options.onhide).bindAsEventListener(this);
}
-
ModalPanel.panels.push(this);
this.eventFirstOnfocus = this.firstOnfocus.bindAsEventListener(this);
@@ -171,7 +142,25 @@
this.selectBehavior = options.selectBehavior;
},
+ width: function() {
+ return this.getContentElement().offsetWidth;
+ },
+
+ height: function() {
+ return this.getContentElement().offsetHeight;
+ },
+
+ getContentElement: function() {
+ if (!this._sizedElement) {
+ this._sizedElement = this.options.autosized ? $(this.contentTable) : $(this.contentDiv);
+ }
+
+ return this._sizedElement;
+ },
+
destroy: function() {
+ this._sizedElement = null;
+
ModalPanel.panels = ModalPanel.panels.without(this);
this.traverseSelects(true);
@@ -450,12 +439,10 @@
Object.extend(this.userOptions, opts);
}
- var eContentDiv = $(this.contentDiv);
+ var eContentElt = this.getContentElement();
var eShadowDiv = $(this.shadowDiv);
- if (this.options.autosized) {
- eContentDiv.style.overflow = "";
- } else {
+ if (!this.options.autosized) {
if (options.width && options.width == -1)
options.width = 300;
if (options.height && options.height == -1)
@@ -470,7 +457,7 @@
if (eIframe) {
eIframe.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
}
- eContentDiv.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
+ eContentElt.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
eShadowDiv.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
}
@@ -482,7 +469,7 @@
if (eIframe) {
eIframe.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
}
- eContentDiv.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
+ eContentElt.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
eShadowDiv.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
}
@@ -547,15 +534,12 @@
_left = parseInt(options.left, 10);
} else {
var cw = getSizeElement().clientWidth;
- if (RichFaces.navigatorType() == "OPERA")
- _left = (cw - eContentDiv.style.width.replace("px", "")) / 2;
- else {
- var _width = Richfaces.getComputedStyleSize(eContentDiv, "width");
- if (isNaN(_width))
- _width = eContentDiv.clientWidth;
- _left = (cw - _width) / 2;
- }
-
+ var _width = this.width(); //Richfaces.getComputedStyleSize(eContentElt, "width");
+ if (cw >= _width) {
+ _left = (cw - _width) / 2;
+ } else {
+ _left = 0;
+ }
}
this.setLeft(_left);
@@ -567,15 +551,11 @@
_top = parseInt(options.top, 10);
} else {
var cw = getSizeElement().clientHeight;
- if (RichFaces.navigatorType() == "OPERA")
- {
- _top = (cw - eContentDiv.style.height.replace("px", "")) / 2;
- }
- else {
- var _height = Richfaces.getComputedStyleSize(eContentDiv, "height");
- if (isNaN(_height))
- _height = eContentDiv.clientHeight;
+ var _height = this.height(); //Richfaces.getComputedStyleSize(eContentElt, "height");
+ if (cw >= _height) {
_top = (cw - _height) / 2;
+ } else {
+ _top = 0;
}
}
@@ -690,14 +670,14 @@
var vetoeChange = false;
var newSize;
- var eContentDiv = $(this.contentDiv);
+ var eContentElt = this.getContentElement();
var eShadowDiv = $(this.shadowDiv);
// Avoid currentStyle bug in opera
if (RichFaces.navigatorType() != "OPERA")
- newSize = Richfaces.getComputedStyleSize(eContentDiv, "width");
+ newSize = Richfaces.getComputedStyleSize(eContentElt, "width");
else
- newSize = this._getStyle(eContentDiv, "width");
+ newSize = this._getStyle(eContentElt, "width");
var oldSize = newSize;
newSize += diff.deltaWidth || 0;
@@ -735,9 +715,9 @@
// Avoid currentStyle bug in opera
if (RichFaces.navigatorType() != "OPERA")
- newSize = Richfaces.getComputedStyleSize(eContentDiv, "height");
+ newSize = Richfaces.getComputedStyleSize(eContentElt, "height");
else
- newSize = this._getStyle(eContentDiv, "height")//;Richfaces.getComputedStyleSize(eContentDiv, "height");
+ newSize = this._getStyle(eContentElt, "height")//;Richfaces.getComputedStyleSize(eContentDiv, "height");
var oldSize = newSize;
newSize += diff.deltaHeight || 0;
@@ -781,7 +761,7 @@
Element.setStyle(eCdiv, cssHash);
- Element.setStyle(eContentDiv, cssHashWH);
+ Element.setStyle(eContentElt, cssHashWH);
this.correctShadowSize();
if (this.iframe) {
Element.setStyle($(this.iframe), cssHashWH);
@@ -790,22 +770,22 @@
Object.extend(this.userOptions, cssHash);
Object.extend(this.userOptions, cssHashWH);
- var w = this.context.width();
- var h = this.context.height();
+ var w = this.width();
+ var h = this.height();
- this.context.reduced = null;
+ this.reductionData = null;
- if (w <= 2*sizeB) {
- this.context.reduced = {};
- this.context.reduced.w = w;
+ if (w <= 2*ModalPanel.Sizer.INITIAL_MAX) {
+ this.reductionData = {};
+ this.reductionData.w = w;
}
- if (h <= 2*sizeB) {
- if (!this.context.reduced) {
- this.context.reduced = {};
+ if (h <= 2*ModalPanel.Sizer.INITIAL_MAX) {
+ if (!this.reductionData) {
+ this.reductionData = {};
}
- this.context.reduced.h = h;
+ this.reductionData.h = h;
}
if (this.header) {
@@ -844,8 +824,7 @@
correctShadowSize: function(event) {
var eShadowDiv = $(this.shadowDiv);
- var eContentDiv = $(this.contentDiv);
- if (!eShadowDiv || !eContentDiv) {
+ if (!eShadowDiv) {
return;
}
var eIframe = $(this.iframe);
@@ -857,8 +836,8 @@
dx = eShadowDiv.offsetWidth-eShadowDiv.clientWidth;
dy = eShadowDiv.offsetHeight-eShadowDiv.clientHeight;
}
- var w = eContentDiv.offsetWidth;
- var h = eContentDiv.offsetHeight;
+ var w = this.width();
+ var h = this.height();
eShadowDiv.style.width = (w-dx)+"px";
eShadowDiv.style.height = (h-dy)+"px";
Modified: branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
===================================================================
--- branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-04-15 16:26:00 UTC (rev 7844)
+++ branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-04-15 17:03:10 UTC (rev 7845)
@@ -123,6 +123,9 @@
ModalPanel.Sizer = Class.create();
+ModalPanel.Sizer.INITIAL_MIN = 4;
+ModalPanel.Sizer.INITIAL_MAX = 40;
+
ModalPanel.Sizer.Diff = Class.create();
ModalPanel.Sizer.Diff.prototype = {
initialize: function(dX, dY, dWidth, dHeight) {
@@ -145,15 +148,15 @@
var width = 0;
var height = 0;
- var context = modalPanel.context;
+ var reductionData = modalPanel.reductionData;
- if (context.reduced) {
- if (context.reduced.w) {
- width = context.reduced.w / 2;
+ if (reductionData) {
+ if (reductionData.w) {
+ width = reductionData.w / 2;
}
- if (context.reduced.h) {
- height = context.reduced.h / 2;
+ if (reductionData.h) {
+ height = reductionData.h / 2;
}
}
@@ -163,7 +166,7 @@
elt.reducedWidth = elt.style.width;
}
elt.style.width = width + 'px';
- } else if (width < sizeB && /* TODO fix the dirty code */elt.reducedWidth == sizeB + 'px') {
+ } else if (width < ModalPanel.Sizer.INITIAL_MAX && /* TODO fix the dirty code */elt.reducedWidth == ModalPanel.Sizer.INITIAL_MAX + 'px') {
elt.style.width = width + 'px';
}
} else {
@@ -179,7 +182,7 @@
elt.reducedHeight = elt.style.height;
}
elt.style.height = height + 'px';
- } else if (height < sizeB && /* TODO fix the dirty code */elt.reducedHeight == sizeB + 'px') {
+ } else if (height < ModalPanel.Sizer.INITIAL_MAX && /* TODO fix the dirty code */elt.reducedHeight == ModalPanel.Sizer.INITIAL_MAX + 'px') {
elt.style.height = height + 'px';
}
} else {
@@ -191,10 +194,8 @@
},
doSetupPosition: function (modalPanel, elt, left, top) {
- var context = modalPanel.context;
-
- elt.style.left = context.left(left) + 'px';
- elt.style.top = context.top(top) + 'px';
+ elt.style.left = left + 'px';
+ elt.style.top = top + 'px';
},
doPosition: function (modalPanel, elt) {
@@ -219,7 +220,7 @@
ModalPanel.Sizer.N = new ModalPanel.Sizer();
ModalPanel.Sizer.N.doPosition = function (modalPanel, elt) {
- elt.style.width = modalPanel.context.width() + 'px';
+ elt.style.width = modalPanel.width() + 'px';
this.doSetupPosition(modalPanel, elt, 0, 0);
};
ModalPanel.Sizer.N.doDiff = function(dx, dy) {
@@ -229,7 +230,7 @@
ModalPanel.Sizer.NEU = new ModalPanel.Sizer();
ModalPanel.Sizer.NEU.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth, 0);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth, 0);
};
ModalPanel.Sizer.NEU.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, dy, dx, -dy);
@@ -238,7 +239,7 @@
ModalPanel.Sizer.NEL = new ModalPanel.Sizer();
ModalPanel.Sizer.NEL.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth, 0);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth, 0);
};
ModalPanel.Sizer.NEL.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, dy, dx, -dy);
@@ -246,8 +247,8 @@
ModalPanel.Sizer.E = new ModalPanel.Sizer();
ModalPanel.Sizer.E.doPosition = function (modalPanel, elt) {
- elt.style.height = modalPanel.context.height() + 'px';
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth, 0);
+ elt.style.height = modalPanel.height() + 'px';
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth, 0);
};
ModalPanel.Sizer.E.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, dx, 0);
@@ -256,8 +257,8 @@
ModalPanel.Sizer.SEU = new ModalPanel.Sizer();
ModalPanel.Sizer.SEU.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth,
- modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth,
+ modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SEU.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, dx, dy);
@@ -266,8 +267,8 @@
ModalPanel.Sizer.SEL = new ModalPanel.Sizer();
ModalPanel.Sizer.SEL.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, modalPanel.context.width() - elt.clientWidth,
- modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, modalPanel.width() - elt.clientWidth,
+ modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SEL.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, dx, dy);
@@ -275,8 +276,8 @@
ModalPanel.Sizer.S = new ModalPanel.Sizer();
ModalPanel.Sizer.S.doPosition = function (modalPanel, elt) {
- elt.style.width = modalPanel.context.width() + 'px';
- this.doSetupPosition(modalPanel, elt, 0, modalPanel.context.height() - elt.clientHeight);
+ elt.style.width = modalPanel.width() + 'px';
+ this.doSetupPosition(modalPanel, elt, 0, modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.S.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(0, 0, 0, dy);
@@ -285,7 +286,7 @@
ModalPanel.Sizer.SWL = new ModalPanel.Sizer();
ModalPanel.Sizer.SWL.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, 0, modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, 0, modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SWL.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(dx, 0, -dx, dy);
@@ -294,7 +295,7 @@
ModalPanel.Sizer.SWU = new ModalPanel.Sizer();
ModalPanel.Sizer.SWU.doPosition = function (modalPanel, elt) {
this.doSetupSize(modalPanel, elt);
- this.doSetupPosition(modalPanel, elt, 0, modalPanel.context.height() - elt.clientHeight);
+ this.doSetupPosition(modalPanel, elt, 0, modalPanel.height() - elt.clientHeight);
};
ModalPanel.Sizer.SWU.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(dx, 0, -dx, dy);
@@ -302,7 +303,7 @@
ModalPanel.Sizer.W = new ModalPanel.Sizer();
ModalPanel.Sizer.W.doPosition = function (modalPanel, elt) {
- elt.style.height = modalPanel.context.height() + 'px';
+ elt.style.height = modalPanel.height() + 'px';
this.doSetupPosition(modalPanel, elt, 0, 0);
};
ModalPanel.Sizer.W.doDiff = function(dx, dy) {
@@ -320,8 +321,7 @@
ModalPanel.Header = new ModalPanel.Sizer();
ModalPanel.Header.doPosition = function (modalPanel, elt) {
- //elt.style.width = modalPanel.context.width() - 2*sizeA + 'px';
- //this.doSetupPosition(modalPanel, elt, 0, 0);
+
};
ModalPanel.Header.doDiff = function(dx, dy) {
return new ModalPanel.Sizer.Diff(dx, dy, 0, 0);
Modified: branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-15 16:26:00 UTC (rev 7844)
+++ branches/3.1.x/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-15 17:03:10 UTC (rev 7845)
@@ -105,15 +105,18 @@
tableStyle += "width: " + (width > 0 ? width : 1) + "px;";
tableStyle += "height: " + (height > 0 ? height : 1) + "px;";
+ divStyle = "";
+
} else {
tableStyle = "height: 100%; width: 100%;";
+ divStyle = "overflow: hidden;";
}
]]>
</jsp:scriptlet>
- <div id="#{clientId}ContentDiv" style="position: absolute; z-index: 2; overflow: hidden; #{component.attributes['style']}" class="dr-mpnl-pnl rich-mp-content">
+ <div id="#{clientId}ContentDiv" style="#{divStyle} position: absolute; z-index: 2; #{component.attributes['style']}" class="dr-mpnl-pnl rich-mp-content">
- <table style="#{tableStyle}" border="0" cellpadding="0" cellspacing="0">
+ <table id="#{clientId}ContentTable" style="#{tableStyle}" border="0" cellpadding="0" cellspacing="0">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("header")!=null && component.getFacet("header").isRendered()) {]]>
</jsp:scriptlet>
16 years, 9 months
JBoss Rich Faces SVN: r7844 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-04-15 12:26:00 -0400 (Tue, 15 Apr 2008)
New Revision: 7844
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
http://jira.jboss.com/jira/browse/RF-3040 added description about the "oncurrentdateselected" "oncurrentdateselect" events
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-04-15 16:10:57 UTC (rev 7843)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-04-15 16:26:00 UTC (rev 7844)
@@ -153,7 +153,27 @@
</emphasis> could be used for possibility of date selection canceling. See an example below:</para>
<programlisting role="XML"><![CDATA[...
<rich:calendar id="date" value="#{bean.dateTest}" ondateselect="if (!confirm('Are you sure to change date?')){return false;}"/>
-...]]></programlisting>
+ ...]]></programlisting>
+ <para>
+
+ <emphasis>
+ <property>"oncurrentdataselected"</property>
+ </emphasis> event is fired when the "next/previous month" or "next/previous year" button is pressed,
+ and the value is <property>applied</property>.
+ </para>
+ <para>
+ <emphasis>
+ <property>"oncurrentdataselect"</property>
+ </emphasis> event is fired when the "next/previous month" or "next/previous year" button is pressed,
+ but the value is <property>not applied</property> yet (you can change the logic of upplying the value). Also this event could be used for possibility of "next/previous month" or "next/previous year" selection canceling. See an example below:
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:calendar id="date" value="#{bean.dateTest}" oncurrentdateselect="if (!confirm('Are you sure to change month(year)?')){return false;}"
+oncurrentdateselected="alert('month(year) select:'+event.rich.date.toString());"/>
+ ...]]></programlisting>
<para>How to use these attributes see also on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092275#..."
>RichFaces Users Forum</ulink>.</para>
16 years, 9 months
JBoss Rich Faces SVN: r7843 - in trunk/test-applications/seleniumTest/src/main/webapp: pages/ajaxCommandLink and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-04-15 12:10:57 -0400 (Tue, 15 Apr 2008)
New Revision: 7843
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
Log:
css style added
Modified: trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml 2008-04-15 15:50:31 UTC (rev 7842)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/template.xhtml 2008-04-15 16:10:57 UTC (rev 7843)
@@ -24,6 +24,9 @@
return;
}
</script>
+ <style type="text/css">
+ <ui:insert name="style"/>
+ </style>
</head>
<f:view>
<body>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r7842 - in branches/3.1.x: ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-04-15 11:50:31 -0400 (Tue, 15 Apr 2008)
New Revision: 7842
Modified:
branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-3046
Modified: branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-15 15:25:13 UTC (rev 7841)
+++ branches/3.1.x/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-15 15:50:31 UTC (rev 7842)
@@ -79,7 +79,9 @@
width="#{suggestionBox.width}"
height="#{suggestionBox.height}"
shadowDepth="#{suggestionBox.shadowDepth}"
- cellpadding="#{suggestionBox.cellpadding}">
+ cellpadding="#{suggestionBox.cellpadding}"
+ requestDelay="2000"
+ nothingLabel="nothing">
<a4j:ajaxListener type="org.richfaces.AjaxListener"/>
<h:column>
Modified: branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-04-15 15:25:13 UTC (rev 7841)
+++ branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-04-15 15:50:31 UTC (rev 7842)
@@ -630,7 +630,7 @@
this.prevIndex = -1;
var nothingLabel = $(this.update.id + "NothingLabel");
- if (nothingLabel) {
+ if (nothingLabel && this.hasFocus && !this.wasBlur) {
if (this.entryCount < 1) {
Element.show(nothingLabel);
Event.observe(nothingLabel, "click", this.onNothingLabelClick);
16 years, 9 months
JBoss Rich Faces SVN: r7841 - in trunk: ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-04-15 11:25:13 -0400 (Tue, 15 Apr 2008)
New Revision: 7841
Modified:
trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-3046
Modified: trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-15 14:39:29 UTC (rev 7840)
+++ trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-15 15:25:13 UTC (rev 7841)
@@ -80,6 +80,8 @@
height="#{suggestionBox.height}"
shadowDepth="#{suggestionBox.shadowDepth}"
cellpadding="#{suggestionBox.cellpadding}"
+ requestDelay="2000"
+ nothingLabel="nothing"
usingSuggestObjects="#{suggestionBox.usingSuggestObjects}">
<a4j:ajaxListener type="org.richfaces.AjaxListener"/>
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-04-15 14:39:29 UTC (rev 7840)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-04-15 15:25:13 UTC (rev 7841)
@@ -656,7 +656,7 @@
this.prevIndex = -1;
var nothingLabel = $(this.update.id + "NothingLabel");
- if (nothingLabel) {
+ if (nothingLabel && this.hasFocus && !this.wasBlur) {
if (this.entryCount < 1) {
Element.show(nothingLabel);
Event.observe(nothingLabel, "click", this.onNothingLabelClick);
16 years, 9 months