JBoss Rich Faces SVN: r12480 - in trunk/test-applications/realworld/web/src/main/webapp: META-INF/skins and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-01-29 07:15:08 -0500 (Thu, 29 Jan 2009)
New Revision: 12480
Modified:
trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties
trunk/test-applications/realworld/web/src/main/webapp/includes/image/folders.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/friendFolders.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/mainImage.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/index/login.xhtml
trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css
Log:
Fix some design bugs
Modified: trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties 2009-01-29 11:54:16 UTC (rev 12479)
+++ trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties 2009-01-29 12:15:08 UTC (rev 12480)
@@ -1,6 +1,6 @@
#Colors
headerBackgroundColor=#A84807
-headerGradientColor=#F2F7FF
+headerGradientColor=#ffffff
headerTextColor=#000000
headerWeightFont=bold
@@ -11,7 +11,7 @@
controlTextColor=#000000
controlBackgroundColor=#ffffff
-additionalBackgroundColor=#ECF4FE
+additionalBackgroundColor=#D7D7D7
shadowBackgroundColor=#000000
shadowOpacity=1
@@ -22,7 +22,7 @@
tabBackgroundColor=#C6DEFF
tabDisabledTextColor=#8DB7F3
-trimColor=#D6E6FB
+trimColor=#A84807
tipBackgroundColor=#FAE6B0
tipBorderColor=#E5973E
@@ -49,7 +49,7 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
-tableBorderWidth=1px
+tableBorderWidth=0px
#Calendar colors
@@ -68,8 +68,8 @@
warningColor=#FFE6E6
warningBackgroundColor=#FF0000
-editorBackgroundColor=#D7D7D7
-editBackgroundColor=#FEFFDA
+editorBackgroundColor=#A84807
+editBackgroundColor=#ffffff
#Gradients
gradientType=plain
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/folders.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/friendFolders.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/mainImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/index/login.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css 2009-01-29 11:54:16 UTC (rev 12479)
+++ trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css 2009-01-29 12:15:08 UTC (rev 12480)
@@ -126,4 +126,92 @@
.table-boby-column2{
vertical-align: top;
+}
+
+.login-panel{
+ width: 400px;
+}
+
+input[type='submit'], input[type='button'] {
+ background: #414141;
+ color: white;
+ margin: 5px;
+ border-color: black;
+}
+
+.login-table-col{
+ text-align: center;
+}
+
+.login-body-table-col{
+ align: middle;
+ vertical-align: middle;
+ height: 100%;
+}
+
+.main-image{
+ border: none;
+}
+
+.all-images{
+ border: none;
+}
+
+.message {
+ border: 1px solid #FFCC00;
+ padding: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ background-color: #F0F8FF;
+ font-size: 12px;
+ color: red;
+}
+
+.name {
+ vertical-align: top;
+ font-weight: bold;
+ width: 115px;
+ float: left;
+ padding: 5px;
+ margin-top: 3px;
+ clear: left;
+}
+.value {
+ float: left;
+ padding: 5px;
+}
+
+.error {
+ float: left;
+ padding: 5px;
+ color: red;
+}
+.errors {
+ color: red;
+ vertical-align: middle;
+}
+img.errors {
+ padding-right: 5px;
+}
+.errors input {
+ border: 1px solid red;
+}
+.errors textarea {
+ border: 1px solid red;
+}
+
+.required {
+ color: red;
+ padding-left: 2px;
+}
+
+.rich-stglpanel-body {
+ overflow: auto;
+}
+.top {
+ vertical-align: top;
+}
+.info {
+ height: 202px;
+ overflow: auto;
}
\ No newline at end of file
15 years, 11 months
JBoss Rich Faces SVN: r12479 - in trunk/test-applications/realworld/web/src/main: java/org/richfaces/realworld/modalpanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-29 06:54:16 -0500 (Thu, 29 Jan 2009)
New Revision: 12479
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/linkPanel.xhtml
Log:
Add modal panel validation for add album popup.
Enable default context menu for links management popup.
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-29 08:27:36 UTC (rev 12478)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-29 11:54:16 UTC (rev 12479)
@@ -86,7 +86,7 @@
conversationState.setSelectedAlbum(albumItem.getAlbum());
}
imageAction.editImage(image, parentChanged);
- oncomplete = "$('imageModalPanel').component.hide()";
+ setOncomplete();
}
@Observer(Constants.ADD_IMAGE_EVENT)
@@ -95,6 +95,7 @@
TreeAlbumItem albumItem = (TreeAlbumItem)treeMyAlbumsItem.getNode(image.getAlbumName());
conversationState.setSelectedAlbum(albumItem.getAlbum());
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.IMAGE_PREVIEW);
+ //setOncomplete();
}
public void editComment(Comment comment) {
@@ -124,6 +125,10 @@
imageAction.vote(image, Long.valueOf(ratingBinder.getInputSlider().getValue().toString()));
}
+ private void setOncomplete() {
+ oncomplete = "$('imageModalPanel').component.hide()";
+ }
+
private boolean parentChanged(Image image, TreeAlbumItem parent) {
return !parent.getAlbum().getName().equals(image.getAlbumName());
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-01-29 08:27:36 UTC (rev 12478)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-01-29 11:54:16 UTC (rev 12479)
@@ -87,11 +87,6 @@
private void setOncomplete() {
oncomplete = "$('albumModalPanel').component.hide()";
-// FacesContext context = FacesContext.getCurrentInstance();
-// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
-// if (ajaxContext.isAjaxRequest()) {
-// ajaxContext.setOncomplete(new JSLiteral("$('albumModalPanel').component.hide()"));
-// }
}
public String getCaption() {
@@ -113,6 +108,7 @@
public void addAlbum(ActionEvent event){
this.album.setParent(parent);
albumManager.addAlbum();
+ setOncomplete();
}
public Album getParent() {
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/linkPanel.xhtml
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12478 - in trunk/test-applications/realworld/web/src/main: java/org/richfaces/realworld/util and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-29 03:27:36 -0500 (Thu, 29 Jan 2009)
New Revision: 12478
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/friendFolders.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/search/searchResults.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-01-29 00:07:14 UTC (rev 12477)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-01-29 08:27:36 UTC (rev 12478)
@@ -46,7 +46,7 @@
@In("#{messages['album_present']}")
private String ALBUM_WITH_THIS_NAME_ALREADY_PRESENT;
- @In(create=true) @Out TreeMyAlbumsItem treeMyAlbumsItem;
+ @In(required=false, create=false) @Out(required=false) TreeMyAlbumsItem treeMyAlbumsItem;
@In(create=true, required=true) @Out
private Album album;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-01-29 00:07:14 UTC (rev 12477)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-01-29 08:27:36 UTC (rev 12478)
@@ -44,7 +44,7 @@
@Name("dndManager")
public class DnDManager implements DropListener {
- @In @Out TreeMyAlbumsItem treeMyAlbumsItem;
+ @In(required=false, create=false) @Out(required=false) TreeMyAlbumsItem treeMyAlbumsItem;
@In("#{messages['album_present']}")
private String ALBUM_WITH_THIS_NAME_ALREADY_PRESENT;
@In User user;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-29 00:07:14 UTC (rev 12477)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-29 08:27:36 UTC (rev 12478)
@@ -52,7 +52,7 @@
@In(create=true)
FileManager fileManager;
- @In(create=true) @Out TreeMyAlbumsItem treeMyAlbumsItem;
+ @In(required=false, create=false) @Out(required=false) TreeMyAlbumsItem treeMyAlbumsItem;
@In(create=true) @Out
private ConversationState conversationState;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-01-29 00:07:14 UTC (rev 12477)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-01-29 08:27:36 UTC (rev 12478)
@@ -75,7 +75,7 @@
private NavigationEnum mainArea;
@In private User user;
- @In(required=false) private TreeMyAlbumsItem treeMyAlbumsItem;
+ @In(required=false, create=false) private TreeMyAlbumsItem treeMyAlbumsItem;
public Integer getSelectedImageIndex() {
return selectedImageIndex;
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/friendFolders.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/search/searchResults.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12475 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-01-28 15:25:42 -0500 (Wed, 28 Jan 2009)
New Revision: 12475
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java
Log:
RF-5679
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml 2009-01-28 18:42:52 UTC (rev 12474)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml 2009-01-28 20:25:42 UTC (rev 12475)
@@ -23,8 +23,13 @@
</h:selectBooleanCheckbox-->
</h:form>
<h:form id="mainForm">
- <rich:dataGrid id="dataGrid" value="#{dataGrid.model}" var="element" elements="#{dataGrid.elements}" ajaxKeys="#{dataGrid.ajaxKeys}">
+ <rich:dataGrid id="dataGrid" value="#{dataGrid.model}" var="element"
+ elements="#{dataGrid.elements}" ajaxKeys="#{dataGrid.ajaxKeys}"
+ stateVar="stateVar" rowKeyVar="rowKeyVar">
<h:panelGroup>
+ <h:outputText id="rowKeyVar" value="#{rowKeyVar} "></h:outputText>
+ <h:outputText id="first" value="#{stateVar.range.firstRow} "></h:outputText>
+ <h:outputText id="rows" value="#{stateVar.range.rows} "></h:outputText>
<h:outputText value="#{element.cell1}"></h:outputText>
<h:inputText id="inputText" value="#{element.cell2}" validator="#{dataGrid.validate}"></h:inputText>
<h:outputText value="#{element.cell3}"></h:outputText>
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java 2009-01-28 18:42:52 UTC (rev 12474)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java 2009-01-28 20:25:42 UTC (rev 12475)
@@ -85,6 +85,20 @@
chekStructure(3, 7);
}
+ /**
+ * components using rowKeyVar and stateVar variables are correctly output to the client
+ */
+ @Test
+ public void testVars(Template template) {
+ init(template);
+ Assert.assertEquals(selenium.getText(dataGrid + ":2:first"), "0", "Attribute 'stateVar' works wrong.");
+ Assert.assertEquals(selenium.getText(dataGrid + ":2:rows"), "0", "Attribute 'stateVar' works wrong.");
+ int rows = selenium.getXpathCount("id('"+ dataGrid + "')/tbody/tr").intValue();
+ for (int i = 0; i < rows; i++) {
+ Assert.assertEquals(selenium.getText(dataGrid + ":" + i + ":rowKeyVar"), Integer.toString(i));
+ }
+ }
+
private void chekStructure(int ... notEqualRows) {
String dataTableRowLocator = "id('"+ dataTable + "')/tbody/tr";
int count = selenium.getXpathCount(dataTableRowLocator).intValue();
15 years, 11 months
JBoss Rich Faces SVN: r12474 - trunk/framework/api/src/main/java/org/ajax4jsf/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-01-28 13:42:52 -0500 (Wed, 28 Jan 2009)
New Revision: 12474
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/component/IterationStateHolder.java
Log:
Javadoc updated for the case of null value
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/component/IterationStateHolder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/IterationStateHolder.java 2009-01-28 17:46:21 UTC (rev 12473)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/IterationStateHolder.java 2009-01-28 18:42:52 UTC (rev 12474)
@@ -38,8 +38,10 @@
public Object getIterationState();
/**
- * Restore component state from previsious saved value.
- * @param state request-scope component state. Details are subject for a component implementation
+ * Set component state for the next iteration. State can be either previously saved iteration state
+ * or <code>null</code> value. In the second case component should reset its state to the initial.
+ * @param state request-scope component state or <code>null</code>. Details are subject for a component
+ * implementation
*/
public void setIterationState( Object state);
15 years, 11 months
JBoss Rich Faces SVN: r12473 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-28 12:46:21 -0500 (Wed, 28 Jan 2009)
New Revision: 12473
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
Log:
the same
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-28 17:32:26 UTC (rev 12472)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-28 17:46:21 UTC (rev 12473)
@@ -127,9 +127,7 @@
writeStatus("Otherwise not, only via buttons");
enableManualInput(false);
Assert.assertEquals(getSpinnerValue(), "20");
-// selenium.type("name=" + spinnerId, "30");
-// Assert.assertEquals(getSpinnerValue(), "20");
-
+ Assert.assertFalse(selenium.isEditable("name=" + spinnerId), "Spinner has to be read only");
writeStatus("Via buttons? you are welcome:");
clickUp();
Assert.assertEquals(getSpinnerValue(), "30");
@@ -158,8 +156,7 @@
clickUp();
Assert.assertEquals(getSpinnerValue(), "20");
writeStatus("Nor by hand");
-// selenium.type("name=" + spinnerId, "30");
-// Assert.assertEquals(getSpinnerValue(), "20");
+ Assert.assertFalse(selenium.isEditable("name=" + spinnerId), "Spinner has to be read only");
}
private void clickUp() {
15 years, 11 months
JBoss Rich Faces SVN: r12472 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/inputNumberSpinner and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-28 12:32:26 -0500 (Wed, 28 Jan 2009)
New Revision: 12472
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSpinnerBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5890
https://jira.jboss.org/jira/browse/RF-5891
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSpinnerBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSpinnerBean.java 2009-01-28 17:13:18 UTC (rev 12471)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InputNumberSpinnerBean.java 2009-01-28 17:32:26 UTC (rev 12472)
@@ -4,6 +4,10 @@
private Integer value = 20;
+ private boolean disabled = false;
+
+ private boolean enableManualInput = true;
+
/**
* Gets value of value field.
* @return value of value field
@@ -20,8 +24,42 @@
this.value = value;
}
+ /**
+ * Gets value of disabled field.
+ * @return value of disabled field
+ */
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ /**
+ * Set a new value for disabled field.
+ * @param disabled a new value for disabled field
+ */
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ /**
+ * Gets value of enableManualInput field.
+ * @return value of enableManualInput field
+ */
+ public boolean isEnableManualInput() {
+ return enableManualInput;
+ }
+
+ /**
+ * Set a new value for enableManualInput field.
+ * @param enableManualInput a new value for enableManualInput field
+ */
+ public void setEnableManualInput(boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
public void reset() {
this.value = 20;
+ this.disabled = false;
+ this.enableManualInput = true;
}
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-28 17:13:18 UTC (rev 12471)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-28 17:32:26 UTC (rev 12472)
@@ -34,6 +34,8 @@
private final static String FORM_ID = "autoTestForm:";
+ private final static String CONTROL_FORM_ID = "control:";
+
@Test
public void testCycleMode(Template template) {
renderPage(template, RESET_METHOD);
@@ -107,6 +109,59 @@
tester.testValidatorAndValidatorMessageAttributes(true);
}
+ @Test
+ public void testEnableManualInputAttribute(Template template) {
+ renderPage(template, RESET_METHOD);
+ writeStatus("Check enableManualInput = false makes input read-only");
+ String spinnerId = getParentId() + FORM_ID + "componentId";
+
+ writeStatus("Check if enableManualInput == true component's value can be edited manually");
+ Assert.assertEquals(getSpinnerValue(), "20");
+ selenium.type("name=" + spinnerId, "30");
+ Assert.assertEquals(getSpinnerValue(), "30");
+
+ writeStatus("Via buttons as before too:");
+ clickUp();
+ Assert.assertEquals(getSpinnerValue(), "40");
+
+ writeStatus("Otherwise not, only via buttons");
+ enableManualInput(false);
+ Assert.assertEquals(getSpinnerValue(), "20");
+// selenium.type("name=" + spinnerId, "30");
+// Assert.assertEquals(getSpinnerValue(), "20");
+
+ writeStatus("Via buttons? you are welcome:");
+ clickUp();
+ Assert.assertEquals(getSpinnerValue(), "30");
+ }
+
+ @Test
+ public void testDisabledAttribute(Template template) {
+ renderPage(template, RESET_METHOD);
+ writeStatus("Check component can be disabled");
+ String spinnerId = getParentId() + FORM_ID + "componentId";
+
+ writeStatus("Check while component is not disabled its value can be edited at liberty");
+ Assert.assertEquals(getSpinnerValue(), "20");
+ writeStatus("Via buttons:");
+ clickUp();
+ Assert.assertEquals(getSpinnerValue(), "30");
+ writeStatus("By hand");
+ selenium.type("name=" + spinnerId, "40");
+ Assert.assertEquals(getSpinnerValue(), "40");
+
+ writeStatus("Ruffle! Disable the spinner and check there is nothing can be edited");
+ disable(true);
+
+ Assert.assertEquals(getSpinnerValue(), "20");
+ writeStatus("neither via buttons:");
+ clickUp();
+ Assert.assertEquals(getSpinnerValue(), "20");
+ writeStatus("Nor by hand");
+// selenium.type("name=" + spinnerId, "30");
+// Assert.assertEquals(getSpinnerValue(), "20");
+ }
+
private void clickUp() {
String id = getParentId() + FORM_ID + "componentIdButtons";
selenium.fireEvent("xpath=//table[@id='" + id + "']/tbody/tr[1]/td", "mousedown");
@@ -123,6 +178,16 @@
return selenium.getValue("name=" + getParentId() + FORM_ID + "componentId");
}
+ private void disable(boolean disabled) {
+ runScript("$('" + getParentId() + CONTROL_FORM_ID + "disabled" + "').checked=" + disabled);
+ clickCommandAndWait(getParentId() + CONTROL_FORM_ID + "apply");
+ }
+
+ private void enableManualInput(boolean enabled) {
+ runScript("$('" + getParentId() + CONTROL_FORM_ID + "enableManualInput" + "').checked=" + enabled);
+ clickCommandAndWait(getParentId() + CONTROL_FORM_ID + "apply");
+ }
+
@Override
public void changeValue() {
clickUp();
15 years, 11 months
JBoss Rich Faces SVN: r12471 - in trunk/test-applications/realworld: web/src/main/java/org/richfaces/realworld/fileupload and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-28 12:13:18 -0500 (Wed, 28 Jan 2009)
New Revision: 12471
Modified:
trunk/test-applications/realworld/tests/src/test/java/org/richfaces/realworld/SeleniumTestBase.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/SearchManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java
trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForUser.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/multyMode.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/imageScroller.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/search/advancedSearch.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/loginPrefsTab.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
Log:
Modified: trunk/test-applications/realworld/tests/src/test/java/org/richfaces/realworld/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/realworld/tests/src/test/java/org/richfaces/realworld/SeleniumTestBase.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/tests/src/test/java/org/richfaces/realworld/SeleniumTestBase.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -27,7 +27,7 @@
public abstract class SeleniumTestBase implements RichSeleniumTest {
/** Specifies the time to wait for page rendering */
- private static final Integer pageRenderTime = 20000;
+ private static final Integer pageRenderTime = 60000;
/** Specifies the time to wait for ajax processing */
protected static final int ajaxCompletionTime = 20000;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -30,9 +30,9 @@
import javax.imageio.ImageIO;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.ui.graphicImage.Image;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.util.ImageUtils;
@@ -55,7 +55,9 @@
public FileManager(){
FacesContext fc = FacesContext.getCurrentInstance();
- this.setUploadRoot(fc.getExternalContext().getInitParameter(Constants.UPLOAD_ROOT));
+ if(fc!=null){
+ this.setUploadRoot(fc.getExternalContext().getInitParameter(Constants.UPLOAD_ROOT));
+ }
}
public String getFileSeparator() {
@@ -133,8 +135,8 @@
createDirectoryIfNotExist(fileName);
try {
writeFileTodisk(data, fileName, 0, 0, "" );
- writeFileTodisk(data, fileName, 50, 50, _MINI );
- writeFileTodisk(data, fileName, 600, 400, _MEDIUM );
+ writeFileTodisk(data, fileName, 100, 100, _MINI );
+ writeFileTodisk(data, fileName, 500, 500, _MEDIUM );
} catch (IOException e) {
return false;
}
@@ -149,7 +151,6 @@
ImageIO.write(bsrc, Constants.JPG, new File(dest));
return;
}
-
BufferedImage bdest = new ImageUtils(bsrc).resizeImage(width, height);
/*
BufferedImage bdest = new BufferedImage(width, height,
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -43,6 +43,7 @@
import org.richfaces.realworld.domain.MetaTag;
import org.richfaces.realworld.domain.Rank;
import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.util.ConversationState;
@@ -157,6 +158,7 @@
Events.instance().raiseEvent(Constants.ADD_IMAGE_EVENT, file.getImage());
}
fileWrapper.getFiles().clear();
+ Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,NavigationEnum.IMAGE_PREVIEW);
}
public boolean isFileUploadRendered() {
@@ -176,10 +178,10 @@
public void changeMode() {
if (getSelectedMode().equals(Constants.SINGLE)) {
setFileQuantity(Constants.SINGLE_MODE_FILE_QUANTITY);
- setImmediateUpload(false);
+ setImmediateUpload(true);
} else if (getSelectedMode().equals(Constants.MULTY)) {
setFileQuantity(Constants.MULTY_MODE_FILE_QUANTITY);
- setImmediateUpload(true);
+ setImmediateUpload(false);
}
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/SearchManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/SearchManager.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/SearchManager.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -69,11 +69,13 @@
}
public List<Image> popularImages(){
- return searchService.popularImages();
+ findedImages = searchService.popularImages();
+ return findedImages;
}
public List<Image> worstImages(){
- return searchService.worstImages();
+ findedImages = searchService.worstImages();
+ return findedImages;
}
private Map<String, Object> populateMap(String additionalParams) {
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -66,7 +66,9 @@
if (fileName == null) {
return null;
}
- FileManager fileManager = (FileManager)Component.getInstance(Constants.FILE_MANAGER, true);
+ FileManager fileManager = new FileManager();
+ String uploadRoot = request.getSession().getServletContext().getInitParameter(Constants.UPLOAD_ROOT);
+ fileManager.setUploadRoot(uploadRoot);
File file = fileManager.getImage(fileName);
InputStream paintData = null;
byte[] data = new byte[(int) file.length() - 1];
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -285,7 +285,7 @@
setSelectedImage(null);
}
- public void incrementSlideshowIndex() {
+ public void incrementSlideShowIndex() {
int index = getSelectedAlbum().getIndex(getSelectedImage());
if(getSelectedAlbum().getImages().size() == index +1){
index = -1;
@@ -308,7 +308,7 @@
public boolean isNextExist(){
int index = getSelectedAlbum().getIndex(getSelectedImage());
int size = getSelectedAlbum().getCountImages();
- return index < size - 2;
+ return index < size - 1;
}
public boolean isPrevExist(){
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -61,10 +61,16 @@
public BufferedImage resizeImage(double width, double height)
throws IOException {
-
+
if (width > height) {
+ if(this.bufferedImage.getWidth() < width){
+ return bufferedImage;
+ }
scaleToWidth((int) width);
} else {
+ if(this.bufferedImage.getHeight() < height){
+ return bufferedImage;
+ }
scaleToHeight((int) height);
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java 2009-01-28 17:13:18 UTC (rev 12471)
@@ -30,6 +30,7 @@
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.service.Constants;
@Name("renderLogic")
@@ -74,6 +75,14 @@
return !identity.hasRole(Constants.ADMIN_ROLE);
}
+ public boolean isOwner(User u){
+ return user.equals(u);
+ }
+
+ public boolean isProfileSelected(){
+ return conversationState.getMainArea() == NavigationEnum.USER_PREFS;
+ }
+
public boolean shouldRenderFileUpload(){
return conversationState.getSelectedAlbum()!=null && conversationState.getSelectedAlbum().getOwner().equals(user);
}
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForUser.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/multyMode.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/imageScroller.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/search/advancedSearch.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/loginPrefsTab.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml 2009-01-28 16:04:23 UTC (rev 12470)
+++ trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml 2009-01-28 17:13:18 UTC (rev 12471)
@@ -49,7 +49,7 @@
value="/img/shell/general_panelbar_bullet.gif" />
<a4j:commandLink rendered="#{!renderLogic.isUserGuest()}"
value="#{messages['menu.file']}"
- actionListener="#{treeManager.setMainArea(navigationHelper.navigationEnumFileUpload)}"
+ actionListener="#{conversationState.setMainArea(navigationHelper.navigationEnumFileUpload)}"
reRender="mainform:mainArea" />
</rich:toolBarGroup>
<rich:toolBarGroup location="right">
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12470 - in trunk/docs/common-resources/en/src/main: xslt and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-01-28 11:04:23 -0500 (Wed, 28 Jan 2009)
New Revision: 12470
Modified:
trunk/docs/common-resources/en/src/main/css/html-common.css
trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl
Log:
https://jira.jboss.org/jira/browse/RF-5833 - feedback was implemented without php and prototype
Modified: trunk/docs/common-resources/en/src/main/css/html-common.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html-common.css 2009-01-28 15:18:39 UTC (rev 12469)
+++ trunk/docs/common-resources/en/src/main/css/html-common.css 2009-01-28 16:04:23 UTC (rev 12470)
@@ -224,7 +224,7 @@
color: #415973;
}
-#message{
+#feedback-emailContent{
width: 200px;
height: 150px;
padding: 2px;
@@ -236,7 +236,7 @@
color: #415973;
}
-.feedback-textbox, #message{
+.feedback-textbox, #feedback-emailContent{
background-color:#FFFFFF;
border:1px solid #A5ACB2;
padding:2px 1px 3px 5px;
@@ -262,6 +262,5 @@
overflow: hidden;
border: none;
background-color: #F5F5F5;
- /* visibility: hidden;*/
}
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl 2009-01-28 15:18:39 UTC (rev 12469)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl 2009-01-28 16:04:23 UTC (rev 12470)
@@ -94,19 +94,19 @@
</a>
<!--div id="feedback-state"><xsl:text> </xsl:text></div-->
<iframe id='feedback-iFrame' name="feedback-iFrame"><xsl:text> </xsl:text></iframe>
- <form id="feedback-mailform" method="post" action="http://localhost:8080/feedback/FeedbackRF" target="feedback-iFrame">
+ <form id="feedback-mailform" method="post" action="http://192.168.0.194:8090/feedbackRF/FeedbackRF" target="feedback-iFrame">
<div class="feedback-textbox-div">
Subject:<input type="text" id="subject" name="subject" title="Enter the subject of your message" class="feedback-textbox" />
</div>
<div class="feedback-textbox-div">
<span style="vertical-align: top;">Message:</span>
- <textarea name="message" title="Type here the text of your message" id="message"><xsl:text> </xsl:text></textarea>
+ <textarea name="emailContent" title="Type here the text of your message" id="feedback-emailContent"><xsl:text> </xsl:text></textarea>
</div>
<div class="feedback-textbox-div">
- Your name:<input type="text" id="name" name="name" title="Enter your name" class="feedback-textbox" />
+ Your name:<input type="text" id="senderName" name="senderName" title="Enter your name" class="feedback-textbox" />
</div>
<div class="feedback-textbox-div">
- Your email:<input type="text" id="email" name="email" title="Enter your email address" class="feedback-textbox" />
+ Your email:<input type="text" id="from" name="from" title="Enter your email address" class="feedback-textbox" />
</div>
<span class="feedback-button-container">
<input type="submit" value="Send Message" name="submit" class="feedback-formbutton" title="Send Message" />
15 years, 11 months
JBoss Rich Faces SVN: r12469 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-01-28 10:18:39 -0500 (Wed, 28 Jan 2009)
New Revision: 12469
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
Log:
https://jira.jboss.org/jira/browse/RF-5756
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2009-01-28 15:18:36 UTC (rev 12468)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2009-01-28 15:18:39 UTC (rev 12469)
@@ -98,7 +98,7 @@
var items = this.getItems();
if (items.length != 0) {
if (this.iframe) {
- Element.hide(this.iframe);
+ Element.show(this.iframe);
}
this.listParent.style.display = "";
if (this.selectFirstOnUpdate) {
15 years, 11 months