JBoss Rich Faces SVN: r18144 - root/examples/iteration-demo/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-07-19 08:28:10 -0400 (Mon, 19 Jul 2010)
New Revision: 18144
Modified:
root/examples/iteration-demo/trunk/pom.xml
Log:
fix pom.xml
Modified: root/examples/iteration-demo/trunk/pom.xml
===================================================================
--- root/examples/iteration-demo/trunk/pom.xml 2010-07-19 11:25:43 UTC (rev 18143)
+++ root/examples/iteration-demo/trunk/pom.xml 2010-07-19 12:28:10 UTC (rev 18144)
@@ -82,12 +82,15 @@
<groupId>org.richfaces.ui.iteration</groupId>
<artifactId>richfaces-ui-iteration-impl</artifactId>
</dependency>
-
- <!-- TODO: this should be inherited from richfaces-ui-iteration-ui -->
<dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
</dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
<!-- API implementation for runtime -->
<dependency>
@@ -95,14 +98,17 @@
<artifactId>richfaces-core-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.commons</groupId>
+ <artifactId>richfaces-commons-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
-
<!-- JSF -->
<dependency>
<groupId>${jsf2.api.groupid}</groupId>
14 years, 5 months
JBoss Rich Faces SVN: r18143 - in root/core/trunk/impl/src: test/resources/javascript and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-19 07:25:43 -0400 (Mon, 19 Jul 2010)
New Revision: 18143
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js
Log:
BaseComponent function updated
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-07-18 21:46:19 UTC (rev 18142)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-07-19 11:25:43 UTC (rev 18143)
@@ -54,16 +54,7 @@
var $p = {};
- /**
- * Method extends child class prototype with parent prototype
- * and return the object with parent's protected methods
- *
- * @function
- * @name RichFaces.BaseComponent.extend
- *
- * @return {object}
- * */
- richfaces.BaseComponent.extend = function (parent, child, h) {
+ var extend = function (parent, child, h) {
h = h || {};
var F = richfaces.blankFunction;
F.prototype = parent.prototype;
@@ -74,15 +65,30 @@
var r = jQuery.extend({}, $p, h||{});
}
+ var _parent = child;
+
// create wrapper with protected methods and variables
- child.extend = function (_parent, _child, _h) {
+ child.extend = function (_child, _h) {
_h = _h || {};
var _r = jQuery.extend({}, r||h||{}, _h||{});
- return richfaces.BaseComponent.extend(_parent, _child, _r);
+ return extend(_parent, _child, _r);
}
return r||h;
};
+ /**
+ * Method extends child class prototype with parent prototype
+ * and return the object with parent's protected methods
+ *
+ * @function
+ * @name RichFaces.BaseComponent.extend
+ *
+ * @return {object}
+ * */
+ richfaces.BaseComponent.extend = function(child, h) {
+ return extend(richfaces.BaseComponent, child, h);
+ };
+
$.extend(richfaces.BaseComponent.prototype, (function (params) {
return {
/**
Modified: root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js
===================================================================
--- root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js 2010-07-18 21:46:19 UTC (rev 18142)
+++ root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js 2010-07-19 11:25:43 UTC (rev 18143)
@@ -7,7 +7,7 @@
};
var $p ={a:function(){return "hello"}};
- $p = richfaces.BaseComponent.extend(richfaces.BaseComponent, MyComponent, $p);
+ $p = richfaces.BaseComponent.extend(MyComponent, $p);
var $super = MyComponent.$super;
jQuery.extend(MyComponent.prototype, (function () {
@@ -45,7 +45,7 @@
$super.constructor.call(this, componentId);
};
var $p = {b:"b"};
- $p = MyComponent.extend(MyComponent, MyComponent2, $p);
+ $p = MyComponent.extend(MyComponent2, $p);
equals(typeof $p.a, "function", "ComponentCreation: inherit protected method from MyComponent2");
var $super = MyComponent2.$super;
jQuery.extend(MyComponent2.prototype, (function () {
@@ -68,7 +68,7 @@
$super.constructor.call(this, componentId);
};
var $p = {c:"c"};
- $p = MyComponent2.extend(MyComponent2, MyComponent3, $p);
+ $p = MyComponent2.extend(MyComponent3, $p);
equals(typeof $p.a, "function", "ComponentCreation: inherit protected method from MyComponent2");
equals(typeof $p.b, "string", "ComponentCreation: inherit static protected property from MyComponent3");
var $super = MyComponent3.$super;
14 years, 5 months
JBoss Rich Faces SVN: r18142 - management/design-4x/skins.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2010-07-18 17:46:19 -0400 (Sun, 18 Jul 2010)
New Revision: 18142
Modified:
management/design-4x/skins/classic.skin.properties
management/design-4x/skins/deepMarine.skin.properties
management/design-4x/skins/emeraldTown.skin.properties
management/design-4x/skins/ruby.skin.properties
management/design-4x/skins/wine.skin.properties
Log:
Modified: management/design-4x/skins/classic.skin.properties
===================================================================
--- management/design-4x/skins/classic.skin.properties 2010-07-18 17:01:52 UTC (rev 18141)
+++ management/design-4x/skins/classic.skin.properties 2010-07-18 21:46:19 UTC (rev 18142)
@@ -47,7 +47,7 @@
tableBackgroundColor=#FFFFFF
tableHeaderBackgroundColor=#4A75B5
-tableSubHeaderBackgroundColor=#C6D6EA
+tableSubHeaderBackgroundColor=#93C4E5
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
Modified: management/design-4x/skins/deepMarine.skin.properties
===================================================================
--- management/design-4x/skins/deepMarine.skin.properties 2010-07-18 17:01:52 UTC (rev 18141)
+++ management/design-4x/skins/deepMarine.skin.properties 2010-07-18 21:46:19 UTC (rev 18142)
@@ -46,13 +46,13 @@
tableBackgroundColor=#FFFFFF
-tableHeaderBackgroundColor=#008894
+tableHeaderBackgroundColor=#82C9CF
tableSubHeaderBackgroundColor=#C9EDF0
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
tableBorderWidth=1px
-tableHeaderTextColor=#FFFFFF
+tableHeaderTextColor=#005E67
Modified: management/design-4x/skins/emeraldTown.skin.properties
===================================================================
--- management/design-4x/skins/emeraldTown.skin.properties 2010-07-18 17:01:52 UTC (rev 18141)
+++ management/design-4x/skins/emeraldTown.skin.properties 2010-07-18 21:46:19 UTC (rev 18142)
@@ -51,7 +51,7 @@
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
tableBorderWidth=1px
-tableHeaderTextColor=#FFFFFF
+tableHeaderTextColor=#005000
Modified: management/design-4x/skins/ruby.skin.properties
===================================================================
--- management/design-4x/skins/ruby.skin.properties 2010-07-18 17:01:52 UTC (rev 18141)
+++ management/design-4x/skins/ruby.skin.properties 2010-07-18 21:46:19 UTC (rev 18142)
@@ -45,13 +45,13 @@
buttonFamilyFont=Arial, Verdana, sans-serif
tableBackgroundColor=#FFFFFF
-tableHeaderBackgroundColor=#D6E6FB
+tableHeaderBackgroundColor=#EB9A99
tableSubHeaderBackgroundColor=#F7DBDB
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
tableBorderWidth=1px
-tableHeaderTextColor=#FFFFFF
+tableHeaderTextColor=#980808
#Calendar colors
calendarWeekBackgroundColor=#f5f5f5
Modified: management/design-4x/skins/wine.skin.properties
===================================================================
--- management/design-4x/skins/wine.skin.properties 2010-07-18 17:01:52 UTC (rev 18141)
+++ management/design-4x/skins/wine.skin.properties 2010-07-18 21:46:19 UTC (rev 18142)
@@ -46,13 +46,13 @@
tableBackgroundColor=#FFFFFF
-tableHeaderBackgroundColor=#9AB37D
+tableHeaderBackgroundColor=#BCD0A5
tableSubHeaderBackgroundColor=#E4F1D5
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#ECE3CD
tableBorderColor=#B6AD84
tableBorderWidth=1px
-tableHeaderTextColor=#FFFFFF
+tableHeaderTextColor=#495A34
#Calendar colors
14 years, 5 months
JBoss Rich Faces SVN: r18141 - in management/design-4x: dropDownMenu and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2010-07-18 13:01:52 -0400 (Sun, 18 Jul 2010)
New Revision: 18141
Added:
management/design-4x/dropDownMenu/
management/design-4x/dropDownMenu/images/
management/design-4x/dropDownMenu/images/ico1.gif
management/design-4x/dropDownMenu/images/ico2.gif
management/design-4x/dropDownMenu/images/menu_item_bg.gif
management/design-4x/dropDownMenu/images/menu_list_bg.gif
management/design-4x/dropDownMenu/images/node.gif
management/design-4x/dropDownMenu/images/spacer.gif
management/design-4x/dropDownMenu/menu.html
management/design-4x/slider/
management/design-4x/slider/images/
management/design-4x/slider/images/bg.gif
management/design-4x/slider/images/bg_field.gif
management/design-4x/slider/images/handler.gif
management/design-4x/slider/images/selected.gif
management/design-4x/slider/slider.htm
management/design-4x/spinner/
management/design-4x/spinner/images/
management/design-4x/spinner/images/bg_btn.png
management/design-4x/spinner/images/bg_field.png
management/design-4x/spinner/images/button_down.gif
management/design-4x/spinner/images/button_up.gif
management/design-4x/spinner/spinner.htm
Modified:
management/design-4x/inplaceEditor/images/bg_shadow.png
management/design-4x/inplaceEditor/inplaceInput.html
management/design-4x/inplaceEditor/inplaceSelect.html
Log:
Added: management/design-4x/dropDownMenu/images/ico1.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/dropDownMenu/images/ico1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/dropDownMenu/images/ico2.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/dropDownMenu/images/ico2.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/dropDownMenu/images/menu_item_bg.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/dropDownMenu/images/menu_item_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/dropDownMenu/images/menu_list_bg.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/dropDownMenu/images/menu_list_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/dropDownMenu/images/node.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/dropDownMenu/images/node.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/dropDownMenu/images/spacer.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/dropDownMenu/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/dropDownMenu/menu.html
===================================================================
--- management/design-4x/dropDownMenu/menu.html (rev 0)
+++ management/design-4x/dropDownMenu/menu.html 2010-07-18 17:01:52 UTC (rev 18141)
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+ <title></title>
+<style>
+.menu_list_border {
+ border : 1px solid #bfbfc0; /*panelBorderColor*/
+ background-color : #e7f2fb; /*additionalBackgroundColor*/
+ float : left;
+ position : absolute;
+}
+.menu_sublist {
+ top : -8;
+ left:13;
+}
+.menu_list_bg {
+ border-top : 1px solid #e7f2fb; /*additionalBackgroundColor*/
+ border-left : 1px solid #e7f2fb; /*additionalBackgroundColor*/
+ border-right : 1px solid #e7f2fb; /*additionalBackgroundColor*/
+ background : url(images/menu_list_bg.gif) repeat-y left; /*from additionalBackgroundColor (left) to tabBackgroundColor (right)*/
+}
+.menu_item {
+ padding : 1px 35px 1px 1px;
+ white-space : nowrap;
+ font-family : verdana; /*generalFamilyFont*/
+ font-size : 12px; /*generalSizeFont*/
+ position : relative;
+}
+.menu_item_unselect {
+ border : 1px solid transparent;
+ padding : 1px 36px 2px 2px;
+}
+.menu_item_select {
+ border : 1px solid #4a70ab; /*headerBackgroundColor*/
+ cursor : pointer;
+ padding : 1px 36px 2px 2px;
+ background : url(menu_item_bg.gif) /*from additionalBackgroundColor (top) to tabBackgroundColor (bottom)*/ repeat-x top #a9c5e7;
+}
+.menu_item_disabled {
+ border : 1px solid transparent;
+ cursor : default;
+ color : #839eca; /*tabDisabledTextColor*/
+}
+.menu_ico {
+ margin-right : 10px;
+}
+.menu_ico img{
+ vertical-align: middle;
+}
+.menu_item a {
+ color : #000000; /*generalTextColor*/
+ text-decoration : none;
+}
+.menu_separator {
+ font-size : 0px;
+ border-top: 1px solid #bfbfc0; /*panelBorderColor*/
+ margin : 2px 0px 2px 24px;
+}
+.menu_node {
+ position : absolute;
+ background : url(images/node.gif) no-repeat top;
+ width : 7px;
+ height : 7px;
+ top : 7px;
+ right : 6px;
+ font-size : 1px;
+}
+.menu_item_disabled .menu_node {
+ background-position : bottom;
+}
+
+.menu_strut {
+ font-size : 0px;
+ border: 0px;
+ margin : 0px;
+ width : 250px;
+ background : #e7f2fb; /*additionalBackgroundColor*/
+}
+</style>
+
+</head>
+
+<body>
+
+<div style="position : absolute; top : 30px; left: 30px;">
+
+<div class="menu_list_border menu_list_position">
+ <div class="menu_list_bg">
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span><a href="#">testString 1.1</a></div>
+ <div class="menu_separator"></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/ico1.gif"></span><a href="#">testString 1.2</a></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/ico2.gif"></span><a href="#">testString 1.3</a><div class="menu_node">
+
+ <div class="menu_list_border menu_sublist">
+ <div class="menu_list_bg">
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span><a href="#">testString 2.1</a></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/ico1.gif"></span><a href="#">testString 2.2</a></div>
+ <div class="menu_separator"></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/ico2.gif"></span><a href="#"><span style="display : inline-block"><img width="60" height="60" src="images/ico2.gif" style="margin-right : 10px" align="left">This is example of any content.<br><b style="color : red">Warning!!</b><br>Content MUST be inline and should contain only one string<br>(one inline element)!!</span></a><div class="menu_node">
+
+ <div class="menu_list_border menu_sublist">
+ <div class="menu_list_bg">
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span><a href="#">testString 3.1</a></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/ico1.gif"></span><a href="#">testString 3.2</a></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/ico2.gif"></span><a href="#">testString 3.3</a></div>
+ <div class="menu_separator"></div>
+ <div class="menu_item menu_item_disabled"><img width="16" height="16" src="images/spacer.gif" class="menu_ico">testString 3.4</div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span><a href="#">testString 3.3</a></div>
+ <div class="menu_strut"><img src="spacer.gif" width="1" height="1" alt="" border="0"></div>
+ </div>
+ </div>
+
+ </div></div>
+ <div class="menu_separator"></div>
+ <div class="menu_item menu_item_disabled"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span>testString 2.4<div class="menu_node"></div></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span><a href="#">testString 2.5</a></div>
+ <div class="menu_strut"><img src="images/spacer.gif" width="1" height="1" alt="" border="0"></div>
+ </div>
+ </div>
+
+
+ </div></div>
+ <div class="menu_separator"></div>
+ <div class="menu_item menu_item_disabled"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span>testString 1.4<div class="menu_node"></div></div>
+ <div class="menu_item menu_item_unselect" onmouseover="this.className='menu_item menu_item_select'" onmouseout="this.className='menu_item menu_item_unselect'"><span class="menu_ico"><img width="16" height="16" src="images/spacer.gif"></span><a href="#">testString 1.5</a></div>
+ <div class="menu_strut"><img src="images/spacer.gif" width="1" height="1" alt="" border="0"></div>
+ </div>
+</div>
+
+</div>
+</div>
+
+</body>
+</html>
Modified: management/design-4x/inplaceEditor/images/bg_shadow.png
===================================================================
(Binary files differ)
Modified: management/design-4x/inplaceEditor/inplaceInput.html
===================================================================
--- management/design-4x/inplaceEditor/inplaceInput.html 2010-07-16 19:10:46 UTC (rev 18140)
+++ management/design-4x/inplaceEditor/inplaceInput.html 2010-07-18 17:01:52 UTC (rev 18141)
@@ -31,15 +31,15 @@
.is_btn_set{ position : absolute; top:0px; left : 100px; white-space : nowrap}
-.is_shadow{ top:0; left:0; position : absolute;}
-.is_shadow_size{ width : 34px; height : 16px;}
-.is_shadow_tl{ background : url(images/bg_shadow.png) repeat-x top left;}
-.is_shadow_tr{ background : url(images/bg_shadow.png) repeat-x top right;}
-.is_shadow_bl{ background : url(images/bg_shadow.png) repeat-x bottom left;}
-.is_shadow_br{ background : url(images/bg_shadow.png) repeat-x bottom right;}
-
.is_btn_preposition { position : absolute; bottom : 0px; right : 0px; wigth : 1px; height : 1px;}
-.is_btn_position { position : absolute; top : 0px; right : 0px; white-space : nowrap;}
+.is_btn_position { position : absolute; top : 1px; right : 0px; white-space : nowrap;}
+
+
+.is_btn_shadow {position: relative; padding : 6px 6px 6px 6px; top : -6px; right : -6px;}
+.is_btn_shadow_t {background: url(images/bg_shadow.png) top left; position: absolute; width: 6px; top: 0px; bottom: 6px; left : 0px}
+.is_btn_shadow_l {background: url(images/bg_shadow.png) bottom left; position: absolute; height: 6px; bottom: 0px; left: 0px; right: 6px;}
+.is_btn_shadow_r {background: url(images/bg_shadow.png) bottom right; position: absolute; width: 6px; top: 6px; bottom: 0px; right: 0px;}
+.is_btn_shadow_b {background: url(images/bg_shadow.png) right top; position: absolute; height: 6px; top: 0px; left: 6px; right: 0px;}
</style>
</head>
@@ -64,36 +64,22 @@
<input type="Text" value="New York" class="is_field">
<div class="is_btn_preposition">
-
- <div class="is_btn_position">
- <div class="is_shadow">
- <table cellpadding="0" cellspacing="0" border="0" class="is_shadow_size">
- <tr>
- <td class="is_shadow_tl">
- <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
- </td>
- <td class="is_shadow_tr">
- <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
- </td>
- </tr>
- <tr>
- <td class="is_shadow_bl">
- <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
- </td>
- <td class="is_shadow_br">
- <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
- </td>
- </tr>
- </table>
+ <div class="is_btn_position">
+ <div class="is_btn_shadow">
+ <div class="is_btn_shadow_t"></div>
+ <div class="is_btn_shadow_l"></div>
+ <div class="is_btn_shadow_r"></div>
+ <div class="is_btn_shadow_b"></div>
+
+ <div style="position : relative">
+ <input type="image" src="images/ico_ok.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'"><input type="image" src="images/ico_cancel.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'"><br>
+ </div>
+ </div>
</div>
- <div style="position : relative">
- <input type="image" src="images/ico_ok.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'"><input type="image" src="images/ico_cancel.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'">
- </div>
</div>
+
</div>
-
</div>
- </div>
Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said. That would give McCain added momentum heading into a debate Wednesday and next week's Super Tuesday contests
</div>
</fieldset>
Modified: management/design-4x/inplaceEditor/inplaceSelect.html
===================================================================
--- management/design-4x/inplaceEditor/inplaceSelect.html 2010-07-16 19:10:46 UTC (rev 18140)
+++ management/design-4x/inplaceEditor/inplaceSelect.html 2010-07-18 17:01:52 UTC (rev 18141)
@@ -27,12 +27,6 @@
padding : 0px;
margin : 0px;}
.insel_btn_set{ position : absolute; top:0px; left : 112px; white-space : nowrap}
-.insel_shadow{ top:0; left:0; position : absolute;}
-.insel_shadow_size{ width : 34px; height : 16px;}
-.insel_shadow_tl{ background : url(images/bg_shadow.png) repeat-x top left;}
-.insel_shadow_tr{ background : url(images/bg_shadow.png) repeat-x top right;}
-.insel_shadow_bl{ background : url(images/bg_shadow.png) repeat-x bottom left;}
-.insel_shadow_br{ background : url(images/bg_shadow.png) repeat-x bottom right;}
.insel_list_cord{ position : relative; font-size : 0px;d@isplay : none}/*DDL is hidden!!!!!*/
.insel_list_position{ position : absolute; top: 0px; left: -1px; }
@@ -42,6 +36,25 @@
.insel_select{ padding : 1px; width : 100%; background-color: #DFE8F6; border : 1px dotted #a3bae9;/*generalTextColor*/}
.insel_width_list{ width : 250px;}
+
+.insel_list_cord{ position : relative; font-size : 0px;d@isplay : none}/*DDL is hidden!!!!!*/
+.insel_list_decoration{ border : 1px solid #A6A6A6 /*panelBorderColor*/; padding : 0px; background : #FFFFFF; /*tableBackgroundColor*/}
+.insel_list_scroll{ overflow : auto; overflow-x : hidden;}
+.insel_option{ padding : 2px; white-space : nowrap; cursor : default;}
+.insel_select{ padding : 1px; width : 100%; background-color: #DFE8F6; border : 1px dotted #a3bae9;/*generalTextColor*/}
+
+
+
+.insel_btn_preposition { position : absolute; top : 0px; right : 0px; wigth : 1px; height : 1px;}
+.insel_btn_position { position : absolute; top : 0px; left : 0px; white-space : nowrap;}
+
+.insel_btn_shadow {position: relative; padding : 6px 6px 6px 6px; top : -6px; right : -6px;}
+.insel_shadow {position: relative; padding : 6px 6px 6px 6px; top : -6px; left : -6px;}
+
+.insel_shadow_t {background: url(images/bg_shadow.png) top left; position: absolute; width: 6px; top: 0px; bottom: 6px; left : 0px}
+.insel_shadow_l {background: url(images/bg_shadow.png) bottom left; position: absolute; height: 6px; bottom: 0px; left: 0px; right: 6px;}
+.insel_shadow_r {background: url(images/bg_shadow.png) bottom right; position: absolute; width: 6px; top: 6px; bottom: 0px; right: 0px;}
+.insel_shadow_b {background: url(images/bg_shadow.png) right top; position: absolute; height: 6px; top: 0px; left: 6px; right: 0px;}
</style>
</head>
@@ -66,46 +79,46 @@
<div class="insel_default_state">New York
<div class="insel_edit_state">
<input readonly="readonly" type="Text" value="New York" class="insel_field">
- <div class="insel_btn_set">
- <div class="insel_shadow">
- <table cellpadding="0" cellspacing="0" border="0" class="insel_shadow_size">
- <tr>
- <td class="insel_shadow_tl">
- <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
- </td>
- <td class="insel_shadow_tr">
- <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
- </td>
- </tr>
- <tr>
- <td class="insel_shadow_bl">
- <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
- </td>
- <td class="insel_shadow_br">
- <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
- </td>
- </tr>
- </table>
+
+ <div class="insel_btn_preposition">
+ <div class="insel_btn_position">
+ <div class="insel_btn_shadow">
+ <div class="insel_shadow_t"></div>
+ <div class="insel_shadow_l"></div>
+ <div class="insel_shadow_r"></div>
+ <div class="insel_shadow_b"></div>
+
+ <div style="position : relative">
+ <input type="image" src="images/ico_ok.gif" class="insel_btn" onmousedown="this.className='insel_btn_press'" onmouseout="this.className='insel_btn'" onmouseup="this.className='insel_btn'"><input type="image" src="images/ico_cancel.gif" class="insel_btn" onmousedown="this.className='insel_btn_press'" onmouseout="this.className='insel_btn'" onmouseup="this.className='insel_btn'"><br>
+ </div>
+ </div>
+ </div>
</div>
- <div style="position : relative">
- <input type="image" src="images/ico_ok.gif" class="insel_btn" onmousedown="this.className='insel_btn_press'" onmouseout="this.className='insel_btn'" onmouseup="this.className='insel_btn'"><input type="image" src="images/ico_cancel.gif" class="insel_btn" onmousedown="this.className='insel_btn_press'" onmouseout="this.className='insel_btn'" onmouseup="this.className='insel_btn'">
- </div>
- </div>
+
+
+
+
<div class="insel_list_cord">
- <img src="images/bg_shadow.png" width="1" height="1" alt="" border="0" style="position : absolute; width : 260px; height : 109px; margin-left : -4px; margin-top : -2px;">
<div class="insel_list_position insel_width_list">
- <div class="insel_list_decoration">
- <div class="insel_list_scroll">
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 1</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 2</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 3</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 4</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 6</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 7</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 8</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 9</div>
- <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 0</div>
+ <div class="insel_shadow">
+ <div class="insel_shadow_t"></div>
+ <div class="insel_shadow_l"></div>
+ <div class="insel_shadow_r"></div>
+ <div class="insel_shadow_b"></div>
+
+ <div class="insel_list_decoration">
+ <div class="insel_list_scroll">
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 1</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 2</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 3</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 4</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 6</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 7</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 8</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 9</div>
+ <div class="insel_option insel_font" onmouseout="this.className='insel_option insel_font'" onmouseover="this.className='insel_option insel_font insel_select'">Option 0</div>
+ </div>
</div>
</div>
</div>
Added: management/design-4x/slider/images/bg.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/slider/images/bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/slider/images/bg_field.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/slider/images/bg_field.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/slider/images/handler.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/slider/images/handler.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/slider/images/selected.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/slider/images/selected.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/slider/slider.htm
===================================================================
--- management/design-4x/slider/slider.htm (rev 0)
+++ management/design-4x/slider/slider.htm 2010-07-18 17:01:52 UTC (rev 18141)
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+
+
+
+<html>
+<head>
+<title></title>
+<style>
+
+.sldr_size {display : inline-block; position : relative; width : 200px;}
+.sldr_min {display : inline-block; font-size : 11px; position : relative; border-left : 1px solid #c0c0c0; padding-left : 3px; font-family: arial; font-size:11px; color:#000000;}
+.sldr_max {display : inline-block; font-size : 11px; position : absolute; top : 0px; right : -2px; border-right : 1px solid #c0c0c0; padding-right : 3px; font-family: arial; font-size:11px; color:#000000;}
+.sldr_track {background : url(images/bg.gif) 1px 1px repeat-x #FFFFFF; border: 1px solid #C0C0C0; display : inline-block; font-size : 1px; width : 100%; height : 6px; margin-top : 3px; position : relative;}
+.sldr_handler {position : absolute; top : -1px; left : 20px;}
+.sldr_field {background : url(images/bg_field.gif) top repeat-x #fff; font-family: arial; font-size:11px; color:#000000; border: 1px inset #C0C0C0; margin: 0px 10px 0px 10px;}
+
+</style>
+
+</head>
+<body>
+
+<span class="sldr_shell">
+ <span class="sldr_size">
+ <span class="sldr_min">
+ 0
+ </span>
+ <span class="sldr_max">
+ 100
+ </span>
+ <br>
+ <span class="sldr_track">
+ <img src="images/handler.gif" width="7" height="8" alt="" border="0" class="sldr_handler">
+ </span>
+ </span>
+ <input class="sldr_field" size="3" value="10" type="text">
+</span>
+
+
+
+</body>
+</html>
\ No newline at end of file
Added: management/design-4x/spinner/images/bg_btn.png
===================================================================
(Binary files differ)
Property changes on: management/design-4x/spinner/images/bg_btn.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/spinner/images/bg_field.png
===================================================================
(Binary files differ)
Property changes on: management/design-4x/spinner/images/bg_field.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/spinner/images/button_down.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/spinner/images/button_down.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/spinner/images/button_up.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/spinner/images/button_up.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/spinner/spinner.htm
===================================================================
--- management/design-4x/spinner/spinner.htm (rev 0)
+++ management/design-4x/spinner/spinner.htm 2010-07-18 17:01:52 UTC (rev 18141)
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+
+
+<html>
+<head>
+<title></title>
+
+<style>
+
+.spnr_field_width{ width : 150px;}
+.spnr_field{ position : relative; border : 1px solid #A6A6A6/*panelBorderColor*/; display : inline-block; background : url(images/bg_field.png) top left repeat-x/*gradient - from additionalBackgroundColor to controlBackgroundColor, background-color - controlBackgroundColor*/; font-size : 1px;}
+.spnr_tank {display : block; position : relative; overflow : hidden; text-align : left; padding-right : 19px;}
+
+.spnr_bn{margin:0 1px 1px 0;display:block;}
+.spnr_bp{margin:1px 0 0 1px;display:block;}
+
+.spnr_font{color : #000000/*generalTextColor*/}
+.spnr_input {border : 0px; background : none; width : 100%; margin : 0px;}
+
+.spnr_button{ background : url(images/bg_btn.png) top left repeat-x #C0D1E7/*gradient - from headerGradientColor to headerBackgroundColor, background-color - headerBackgroundColor*/; text-align : center; border-left : 1px solid #A6A6A6/*panelBorderColor*/; width : 16px; position : absolute; top : 0px; right : 0px; height : 30px; display : block;}
+.spnr_button_down{ text-align : center; width : 15px; position : absolute; top : 50%; right : 0px; padding-top : 1px }
+.spnr_button_up{ text-align : center; width : 15px; position : absolute; bottom : 50%; right : 0px; padding-top : 1px }
+
+</style>
+</head>
+
+<body>
+
+<span class=" spnr_field_width spnr_field">
+ <span class="spnr_tank">
+ <input type="Text" class="spnr_font spnr_input">
+ <span class="spnr_button">
+ </span>
+ <input class="spnr_button_up spnr_bn" onclick="return false" onmousedown="this.className='spnr_button_up spnr_bp'" onmouseout="this.className='spnr_button_up spnr_bn'" onmouseup="this.className='spnr_button_up spnr_bn'" src="images/button_up.gif" border="0" type="image">
+ <input class="spnr_button_down spnr_bn" onclick="return false" onmousedown="this.className='spnr_button_down spnr_bp'" onmouseout="this.className='spnr_button_down spnr_bn'" onmouseup="this.className='spnr_button_down spnr_bn'" src="images/button_down.gif" border="0" type="image">
+ </span>
+</span>
+
+
+
+</body>
+</html>
\ No newline at end of file
14 years, 5 months
JBoss Rich Faces SVN: r18140 - tags/4.0.0.20100715-M1.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-16 15:10:46 -0400 (Fri, 16 Jul 2010)
New Revision: 18140
Added:
tags/4.0.0.20100715-M1/build/
Modified:
tags/4.0.0.20100715-M1/
tags/4.0.0.20100715-M1/pom.xml
Log:
set externals to release tags
Property changes on: tags/4.0.0.20100715-M1
___________________________________________________________________
Name: svn:externals
+ ^/root/commons/tags/richfaces-commons-4.0.0.20100715-M1 commons
^/root/cdk/tags/richfaces-cdk-4.0.0.20100715-M1 cdk
^/root/build/bom/tags/richfaces-bom-4.0.0.20100715-M1 build/bom
^/root/core/tags/richfaces-core-4.0.0.20100715-M1 core
^/root/ui/core/tags/richfaces-ui-core-4.0.0.20100715-M1 ui/core
^/root/ui/iteration/tags/richfaces-ui-iteration-4.0.0.20100715-M1 ui/iteration
^/root/ui/misc/tags/richfaces-ui-misc-4.0.0.20100715-M1 ui/misc
^/root/ui/output/tags/richfaces-ui-output-4.0.0.20100715-M1 ui/output
^/root/ui/dist/tags/richfaces-ui-dist-4.0.0.20100715-M1 ui/dist
^/root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.20100715-M1 archetypes/richfaces-archetype-simpleapp
^/root/examples/core-demo/tags/richfaces-core-demo-4.0.0.20100715-M1 examples/core-demo
^/root/examples/richfaces-showcase/tags/richfaces-showcase-4.0.0.20100715-M1 examples/richfaces-showcase
^/root/docs/tags/richfaces-docs-4.0.0.20100715-M1 docs
^/root/dist/tags/richfaces-dist-4.0.0.20100715-M1 dist
Modified: tags/4.0.0.20100715-M1/pom.xml
===================================================================
--- tags/4.0.0.20100715-M1/pom.xml 2010-07-16 17:55:38 UTC (rev 18139)
+++ tags/4.0.0.20100715-M1/pom.xml 2010-07-16 19:10:46 UTC (rev 18140)
@@ -11,22 +11,6 @@
<packaging>pom</packaging>
<name>Richfaces Aggregator</name>
- <properties>
- <richfaces.bom.path>trunk</richfaces.bom.path>
- <richfaces.commons.path>trunk</richfaces.commons.path>
- <richfaces.cdk.path>trunk</richfaces.cdk.path>
- <richfaces.core.path>trunk</richfaces.core.path>
- <richfaces.ui.core.path>trunk</richfaces.ui.core.path>
- <richfaces.ui.iteration.path>trunk</richfaces.ui.iteration.path>
- <richfaces.ui.misc.path>trunk</richfaces.ui.misc.path>
- <richfaces.ui.output.path>trunk</richfaces.ui.output.path>
- <richfaces.ui.dist.path>trunk</richfaces.ui.dist.path>
- <richfaces.archetype.simpleapp.path>trunk</richfaces.archetype.simpleapp.path>
- <richfaces.examples.core-demo.path>trunk</richfaces.examples.core-demo.path>
- <richfaces.examples.showcase.path>trunk</richfaces.examples.showcase.path>
- <richfaces.docs.path>trunk</richfaces.docs.path>
- <richfaces.dist.path>trunk</richfaces.dist.path>
- </properties>
<modules>
<!-- These trunk settings, and this pom.xml will be removed -->
@@ -35,23 +19,23 @@
<!--<module>build/resources/trunk/checkstyle</module>-->
<!--<module>build/resources/trunk/faces-shade-transformers</module>-->
- <module>build/bom/${richfaces.bom.path}</module>
- <module>commons/${richfaces.commons.path}</module>
- <module>cdk/${richfaces.cdk.path}</module>
- <module>core/${richfaces.core.path}</module>
+ <module>build/bom</module>
+ <module>commons/</module>
+ <module>cdk</module>
+ <module>core</module>
<!-- richfaces ui -->
- <module>ui/core/${richfaces.ui.core.path}</module>
- <module>ui/iteration/${richfaces.ui.iteration.path}</module>
- <module>ui/misc/${richfaces.ui.misc.path}</module>
- <module>ui/output/${richfaces.ui.output.path}</module>
- <module>ui/dist/${richfaces.ui.dist.path}</module>
+ <module>ui/core</module>
+ <module>ui/iteration</module>
+ <module>ui/misc</module>
+ <module>ui/output</module>
+ <module>ui/dist</module>
<!-- Remaining -->
- <module>archetypes/richfaces-archetype-simpleapp/${richfaces.archetype.simpleapp.path}</module>
- <module>examples/core-demo/${richfaces.examples.core-demo.path}</module>
- <module>examples/richfaces-showcase/${richfaces.examples.showcase.path}</module>
- <module>docs/${richfaces.docs.path}</module>
+ <module>archetypes/richfaces-archetype-simpleapp</module>
+ <module>examples/core-demo</module>
+ <module>examples/richfaces-showcase</module>
+ <module>docs</module>
</modules>
<profiles>
@@ -65,50 +49,8 @@
<profile>
<id>release</id>
<modules>
- <module>dist/${richfaces.dist.path}</module>
+ <module>dist</module>
</modules>
</profile>
- <profile>
- <id>tag_based</id>
- <properties>
- <!-- TODO this can be generalized, and driven by property file, or script -->
- <build-version>4.0.0.20100715-M1</build-version>
- <richfaces.bom.path>tags/richfaces-bom-${build-version}</richfaces.bom.path>
- <richfaces.commons.path>tags/richfaces-commons-${build-version}</richfaces.commons.path>
- <richfaces.cdk.path>tags/richfaces-cdk-${build-version}</richfaces.cdk.path>
- <richfaces.core.path>tags/richfaces-core-${build-version}</richfaces.core.path>
- <richfaces.ui.core.path>tags/richfaces-ui-core-${build-version}</richfaces.ui.core.path>
- <richfaces.ui.iteration.path>tags/richfaces-ui-iteration-${build-version}</richfaces.ui.iteration.path>
- <richfaces.ui.misc.path>tags/richfaces-ui-misc-${build-version}</richfaces.ui.misc.path>
- <richfaces.ui.output.path>tags/richfaces-ui-output-${build-version}</richfaces.ui.output.path>
- <richfaces.ui.dist.path>tags/richfaces-ui-dist-${build-version}</richfaces.ui.dist.path>
- <richfaces.archetype.simpleapp.path>tags/richfaces-archetype-simpleapp-${build-version}</richfaces.archetype.simpleapp.path>
- <richfaces.examples.core-demo.path>tags/richfaces-core-demo-${build-version}</richfaces.examples.core-demo.path>
- <richfaces.examples.showcase.path>tags/richfaces-showcase-${build-version}</richfaces.examples.showcase.path>
- <richfaces.docs.path>tags/richfaces-docs-${build-version}</richfaces.docs.path>
- <richfaces.dist.path>tags/richfaces-dist-${build-version}</richfaces.dist.path>
- </properties>
- </profile>
- <profile>
- <id>branch_based</id>
- <properties>
- <!-- TODO this can be generalized, and driven by property file, or script -->
- <build-version>4.0.0.20100715-M1</build-version>
- <richfaces.bom.path>branches/richfaces-bom-${build-version}</richfaces.bom.path>
- <richfaces.commons.path>branches/richfaces-commons-${build-version}</richfaces.commons.path>
- <richfaces.cdk.path>branches/richfaces-cdk-${build-version}</richfaces.cdk.path>
- <richfaces.core.path>branches/richfaces-core-${build-version}</richfaces.core.path>
- <richfaces.ui.core.path>branches/richfaces-ui-core-${build-version}</richfaces.ui.core.path>
- <richfaces.ui.iteration.path>branches/richfaces-ui-iteration-${build-version}</richfaces.ui.iteration.path>
- <richfaces.ui.misc.path>branches/richfaces-ui-misc-${build-version}</richfaces.ui.misc.path>
- <richfaces.ui.output.path>branches/richfaces-ui-output-${build-version}</richfaces.ui.output.path>
- <richfaces.ui.dist.path>branches/richfaces-ui-dist-${build-version}</richfaces.ui.dist.path>
- <richfaces.archetype.simpleapp.path>branches/richfaces-archetype-simpleapp-${build-version}</richfaces.archetype.simpleapp.path>
- <richfaces.examples.core-demo.path>branches/richfaces-core-demo-${build-version}</richfaces.examples.core-demo.path>
- <richfaces.examples.showcase.path>branches/richfaces-showcase-${build-version}</richfaces.examples.showcase.path>
- <richfaces.docs.path>branches/richfaces-docs-${build-version}</richfaces.docs.path>
- <richfaces.dist.path>branches/richfaces-dist-${build-version}</richfaces.dist.path>
- </properties>
- </profile>
</profiles>
</project>
14 years, 5 months
JBoss Rich Faces SVN: r18139 - tags/4.0.0.20100715-M1.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-16 13:55:38 -0400 (Fri, 16 Jul 2010)
New Revision: 18139
Added:
tags/4.0.0.20100715-M1/pom.xml
Log:
4.0.0.20100715-M1
Copied: tags/4.0.0.20100715-M1/pom.xml (from rev 18137, root/pom.xml)
===================================================================
--- tags/4.0.0.20100715-M1/pom.xml (rev 0)
+++ tags/4.0.0.20100715-M1/pom.xml 2010-07-16 17:55:38 UTC (rev 18139)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>root</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Richfaces Aggregator</name>
+
+ <properties>
+ <richfaces.bom.path>trunk</richfaces.bom.path>
+ <richfaces.commons.path>trunk</richfaces.commons.path>
+ <richfaces.cdk.path>trunk</richfaces.cdk.path>
+ <richfaces.core.path>trunk</richfaces.core.path>
+ <richfaces.ui.core.path>trunk</richfaces.ui.core.path>
+ <richfaces.ui.iteration.path>trunk</richfaces.ui.iteration.path>
+ <richfaces.ui.misc.path>trunk</richfaces.ui.misc.path>
+ <richfaces.ui.output.path>trunk</richfaces.ui.output.path>
+ <richfaces.ui.dist.path>trunk</richfaces.ui.dist.path>
+ <richfaces.archetype.simpleapp.path>trunk</richfaces.archetype.simpleapp.path>
+ <richfaces.examples.core-demo.path>trunk</richfaces.examples.core-demo.path>
+ <richfaces.examples.showcase.path>trunk</richfaces.examples.showcase.path>
+ <richfaces.docs.path>trunk</richfaces.docs.path>
+ <richfaces.dist.path>trunk</richfaces.dist.path>
+ </properties>
+
+ <modules>
+ <!-- These trunk settings, and this pom.xml will be removed -->
+ <!-- Added bom, parent, for temp integration -->
+ <!--<module>build/parent/tags/richfaces-parent-5</module>-->
+ <!--<module>build/resources/trunk/checkstyle</module>-->
+ <!--<module>build/resources/trunk/faces-shade-transformers</module>-->
+
+ <module>build/bom/${richfaces.bom.path}</module>
+ <module>commons/${richfaces.commons.path}</module>
+ <module>cdk/${richfaces.cdk.path}</module>
+ <module>core/${richfaces.core.path}</module>
+
+ <!-- richfaces ui -->
+ <module>ui/core/${richfaces.ui.core.path}</module>
+ <module>ui/iteration/${richfaces.ui.iteration.path}</module>
+ <module>ui/misc/${richfaces.ui.misc.path}</module>
+ <module>ui/output/${richfaces.ui.output.path}</module>
+ <module>ui/dist/${richfaces.ui.dist.path}</module>
+
+ <!-- Remaining -->
+ <module>archetypes/richfaces-archetype-simpleapp/${richfaces.archetype.simpleapp.path}</module>
+ <module>examples/core-demo/${richfaces.examples.core-demo.path}</module>
+ <module>examples/richfaces-showcase/${richfaces.examples.showcase.path}</module>
+ <module>docs/${richfaces.docs.path}</module>
+ </modules>
+
+ <profiles>
+ <profile>
+ <id>sandbox</id>
+ <modules>
+ <module>ui-sandbox</module>
+ <module>examples-sandbox/trunk</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>release</id>
+ <modules>
+ <module>dist/${richfaces.dist.path}</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>tag_based</id>
+ <properties>
+ <!-- TODO this can be generalized, and driven by property file, or script -->
+ <build-version>4.0.0.20100715-M1</build-version>
+ <richfaces.bom.path>tags/richfaces-bom-${build-version}</richfaces.bom.path>
+ <richfaces.commons.path>tags/richfaces-commons-${build-version}</richfaces.commons.path>
+ <richfaces.cdk.path>tags/richfaces-cdk-${build-version}</richfaces.cdk.path>
+ <richfaces.core.path>tags/richfaces-core-${build-version}</richfaces.core.path>
+ <richfaces.ui.core.path>tags/richfaces-ui-core-${build-version}</richfaces.ui.core.path>
+ <richfaces.ui.iteration.path>tags/richfaces-ui-iteration-${build-version}</richfaces.ui.iteration.path>
+ <richfaces.ui.misc.path>tags/richfaces-ui-misc-${build-version}</richfaces.ui.misc.path>
+ <richfaces.ui.output.path>tags/richfaces-ui-output-${build-version}</richfaces.ui.output.path>
+ <richfaces.ui.dist.path>tags/richfaces-ui-dist-${build-version}</richfaces.ui.dist.path>
+ <richfaces.archetype.simpleapp.path>tags/richfaces-archetype-simpleapp-${build-version}</richfaces.archetype.simpleapp.path>
+ <richfaces.examples.core-demo.path>tags/richfaces-core-demo-${build-version}</richfaces.examples.core-demo.path>
+ <richfaces.examples.showcase.path>tags/richfaces-showcase-${build-version}</richfaces.examples.showcase.path>
+ <richfaces.docs.path>tags/richfaces-docs-${build-version}</richfaces.docs.path>
+ <richfaces.dist.path>tags/richfaces-dist-${build-version}</richfaces.dist.path>
+ </properties>
+ </profile>
+ <profile>
+ <id>branch_based</id>
+ <properties>
+ <!-- TODO this can be generalized, and driven by property file, or script -->
+ <build-version>4.0.0.20100715-M1</build-version>
+ <richfaces.bom.path>branches/richfaces-bom-${build-version}</richfaces.bom.path>
+ <richfaces.commons.path>branches/richfaces-commons-${build-version}</richfaces.commons.path>
+ <richfaces.cdk.path>branches/richfaces-cdk-${build-version}</richfaces.cdk.path>
+ <richfaces.core.path>branches/richfaces-core-${build-version}</richfaces.core.path>
+ <richfaces.ui.core.path>branches/richfaces-ui-core-${build-version}</richfaces.ui.core.path>
+ <richfaces.ui.iteration.path>branches/richfaces-ui-iteration-${build-version}</richfaces.ui.iteration.path>
+ <richfaces.ui.misc.path>branches/richfaces-ui-misc-${build-version}</richfaces.ui.misc.path>
+ <richfaces.ui.output.path>branches/richfaces-ui-output-${build-version}</richfaces.ui.output.path>
+ <richfaces.ui.dist.path>branches/richfaces-ui-dist-${build-version}</richfaces.ui.dist.path>
+ <richfaces.archetype.simpleapp.path>branches/richfaces-archetype-simpleapp-${build-version}</richfaces.archetype.simpleapp.path>
+ <richfaces.examples.core-demo.path>branches/richfaces-core-demo-${build-version}</richfaces.examples.core-demo.path>
+ <richfaces.examples.showcase.path>branches/richfaces-showcase-${build-version}</richfaces.examples.showcase.path>
+ <richfaces.docs.path>branches/richfaces-docs-${build-version}</richfaces.docs.path>
+ <richfaces.dist.path>branches/richfaces-dist-${build-version}</richfaces.dist.path>
+ </properties>
+ </profile>
+ </profiles>
+</project>
14 years, 5 months
JBoss Rich Faces SVN: r18138 - tags.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-16 13:54:51 -0400 (Fri, 16 Jul 2010)
New Revision: 18138
Added:
tags/4.0.0.20100715-M1/
Log:
4.0.0.20100715-M1
14 years, 5 months
JBoss Rich Faces SVN: r18137 - root/ui/output/trunk/panels/ui/src/main/resources/META-INF/resources/script.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-07-16 09:30:37 -0400 (Fri, 16 Jul 2010)
New Revision: 18137
Modified:
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/resources/script/popupPanel.js
Log:
Fix call of attachToDom
Modified: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/resources/script/popupPanel.js
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/resources/script/popupPanel.js 2010-07-16 13:22:48 UTC (rev 18136)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/resources/script/popupPanel.js 2010-07-16 13:30:37 UTC (rev 18137)
@@ -38,7 +38,7 @@
$super.constructor.call(this,id);
this.markerId = id;
- $p.attachToDom.call(this, id);
+ $super.attachToDom.call(this, id);
id = "#" + id;
this.options = options;
14 years, 5 months
JBoss Rich Faces SVN: r18136 - root/examples/misc-demo/trunk/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-16 09:22:48 -0400 (Fri, 16 Jul 2010)
New Revision: 18136
Modified:
root/examples/misc-demo/trunk/src/main/webapp/pages/index.xhtml
Log:
Added missing body/head JSF tags
Modified: root/examples/misc-demo/trunk/src/main/webapp/pages/index.xhtml
===================================================================
--- root/examples/misc-demo/trunk/src/main/webapp/pages/index.xhtml 2010-07-16 11:37:20 UTC (rev 18135)
+++ root/examples/misc-demo/trunk/src/main/webapp/pages/index.xhtml 2010-07-16 13:22:48 UTC (rev 18136)
@@ -5,36 +5,38 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:fn="http://richfaces.org/misc">
<f:view>
- <h:form>
- <h:outputLabel value="Role name:" for="roleName" />
- <h:inputText value="#{userBean.rolename}" id="roleName" />
- <br />
- <h:commandLink value="Apply role name" />
- </h:form>
-
- <f:subview id="view">
- <h:form id="myForm">
- <h:inputText id="input" value="abc" />
+ <h:head></h:head>
+ <h:body>
+ <h:form>
+ <h:outputLabel value="Role name:" for="roleName" />
+ <h:inputText value="#{userBean.rolename}" id="roleName" />
+ <br />
+ <h:commandLink value="Apply role name" />
</h:form>
- </f:subview>
- <h:outputText value="#{fn:clientId('input')}" />
- <br />
- <h:outputText value="#{fn:element('input')}" />
- <br />
- <h:outputText value="#{fn:component('input')}" />
- <br />
- <h:outputText value="#{fn:findComponent('input').value}" />
- <br />
-
- Roles:
- <h:outputText rendered="#{fn:isUserInRole('admin, user')}"
- value="admin or user" />
- <br />
- <h:outputText rendered="#{fn:isUserInRole('admin')}" value="admin" />
- <br />
- <h:outputText rendered="#{fn:isUserInRole('user')}" value="user" />
- <br />
+ <f:subview id="view">
+ <h:form id="myForm">
+ <h:inputText id="input" value="abc" />
+ </h:form>
+ </f:subview>
+ <h:outputText value="#{fn:clientId('input')}" />
+ <br />
+ <h:outputText value="#{fn:element('input')}" />
+ <br />
+ <h:outputText value="#{fn:component('input')}" />
+ <br />
+ <h:outputText value="#{fn:findComponent('input').value}" />
+ <br />
+
+ Roles:
+ <h:outputText rendered="#{fn:isUserInRole('admin, user')}"
+ value="admin or user" />
+ <br />
+ <h:outputText rendered="#{fn:isUserInRole('admin')}" value="admin" />
+ <br />
+ <h:outputText rendered="#{fn:isUserInRole('user')}" value="user" />
+ <br />
+ </h:body>
</f:view>
</html>
14 years, 5 months
JBoss Rich Faces SVN: r18135 - in root/ui-sandbox/inputs/trunk/combobox/src/main: resources/META-INF/resources/org.richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-16 07:37:20 -0400 (Fri, 16 Jul 2010)
New Revision: 18135
Added:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.ecss
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
Removed:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.ecss
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/SelectBase.js
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java
Log:
https://jira.jboss.org/browse/RF-8875
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java 2010-07-16 11:23:15 UTC (rev 18134)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/java/org/richfaces/renderkit/ComboBoxRendererBase.java 2010-07-16 11:37:20 UTC (rev 18135)
@@ -53,9 +53,9 @@
@ResourceDependency(name = "richfaces-event.js"),
@ResourceDependency(name = "richfaces-base-component.js"),
@ResourceDependency(name = "richfaces-selection.js"),
- @ResourceDependency(library = "org.richfaces", name = "SelectBase.js"),
- @ResourceDependency(library = "org.richfaces", name = "ComboBox.js"),
- @ResourceDependency(library = "org.richfaces", name = "ComboBox.ecss")
+ @ResourceDependency(library = "org.richfaces", name = "AutoCompleteBase.js"),
+ @ResourceDependency(library = "org.richfaces", name = "AutoComplete.js"),
+ @ResourceDependency(library = "org.richfaces", name = "AutoComplete.ecss")
})
public abstract class ComboBoxRendererBase extends InputRendererBase implements MetaComponentRenderer {
Copied: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.ecss (from rev 18076, root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.ecss)
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.ecss (rev 0)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.ecss 2010-07-16 11:37:20 UTC (rev 18135)
@@ -0,0 +1,152 @@
+.cb_field_width {
+ width: 200px;
+}
+
+.cb_list_width {
+ width: 200px;
+}
+
+.cb_list_height {
+ max-height: 100px;
+ min-height: 20px;
+}
+
+.cb_input.cb_font, .cb_option.cb_font {
+ color: '#{richSkin.generalTextColor}';
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+}
+
+input.cb_input {
+ border-width: 0px;
+ background: none;
+ width: 100%;
+}
+
+.cb_field {
+ position: inline-block;
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.panelBorderColor}';
+ display: inline-block;
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.ComboBoxFieldGradient']})";
+ background-repeat: repeat-x;
+ background-position: top left;
+ background-color: '#{richSkin.controlBackgroundColor}';
+}
+
+.cb_button {
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.ComboBoxButtonGradient']})";
+ background-repeat: repeat-x;
+ background-position: top left;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ text-align: center;
+ border-left-style: solid;
+ border-left-width: 1px;
+ border-left-color: '#{richSkin.panelBorderColor}';
+ width: 15px;
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ height: 200px;
+ padding-top: 1px
+}
+
+.cb_button_arrow {
+ background-position: center;
+ background-repeat: no-repeat;
+ background-image: "url(#{resource['org.richfaces:combo_down_button.gif']})";
+ cursor: pointer;
+ width: 15px;
+ height: 15px;
+}
+
+.cb_list_cord {
+ position: absolute;
+ font-size: 0px;
+ display: none;
+} /*DDL is hidden!!!!!*/
+
+.cb_list_decoration {
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.panelBorderColor}';
+ padding: 0px;
+ background-color: '#{richSkin.tableBackgroundColor}';
+}
+
+.cb_list_scroll {
+ overflow: auto;
+ overflow-x: hidden;
+}
+
+.cb_option {
+ padding: 2px;
+ white-space: nowrap;
+ cursor: default;
+ list-style-type: none;
+}
+
+.cb_select {
+ padding: 1px;
+ width: 100%;
+ background-color: #DFE8F6;
+ border-width: 1px;
+ border-style: dotted;
+ border-color: '#{richSkin.generalTextColor}';
+}
+
+.cb_shadow {
+ border: 0px solid red;
+ display: inline-block;
+ position: absolute;
+ float: left;
+ padding: 6px 6px 6px 6px;
+ top: -6px;
+ left: -7px;
+}
+
+.cb_shadow_t {
+ background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
+ background-position: top left;
+ position: absolute;
+ width: 6px;
+ top: 0px;
+ bottom: 6px;
+ left: 0px
+}
+
+.cb_shadow_l {
+ background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
+ background-position: bottom left;
+ position: absolute;
+ height: 6px;
+ bottom: 0px;
+ left: 0px;
+ right: 6px;
+}
+
+.cb_shadow_r {
+ background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
+ background-position: bottom right;
+ position: absolute;
+ width: 6px;
+ top: 6px;
+ bottom: 0px;
+ right: 0px;
+}
+
+.cb_shadow_b {
+ background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
+ background-position: right top;
+ position: absolute;
+ height: 6px;
+ top: 0px;
+ left: 6px;
+ right: 0px;
+}
+
+.cb_list_ul {
+ margin: 0px;
+ padding: 0px;
+}
\ No newline at end of file
Copied: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js (from rev 18076, root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.js)
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js (rev 0)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-16 11:37:20 UTC (rev 18135)
@@ -0,0 +1,301 @@
+(function ($, rf) {
+ rf.utils = rf.utils || {};
+
+ rf.utils.Cache = function (data, options) {
+ this.key = options.key;
+ this.cache = {}
+ this.cache[this.key] = data || [];
+ this.values = options.parse && options.parse(data) || this.cache[this.key];
+ };
+
+ var getItems = function (key) {
+ var newCache = [];
+
+ if (key.length < this.key.length) {
+ return newCache;
+ }
+
+ if (this.cache[key]) {
+ newCache = this.cache[key];
+ } else {
+ var itemsCache = this.cache[this.key];
+ for (var i = 0; i<this.values.length; i++) {
+ var value = this.values[i].toLowerCase();
+ var p = value.indexOf(key.toLowerCase());
+ if (p == 0) {
+ newCache.push(itemsCache[i]);
+ }
+ }
+
+ if ((!this.lastKey || key.indexOf(this.lastKey)!=0) && newCache.length > 0) {
+ //console && console.log && console.log("added key:"+key+" length:" + newCache.length)
+ this.cache[key] = newCache;
+ if (newCache.length==1) {
+ this.lastKey = key;
+ }
+ }
+ }
+
+ return newCache;
+ };
+
+ var isCached = function (key) {
+ return this.cache[key];
+ }
+
+ $.extend(rf.utils.Cache.prototype, (function () {
+ return {
+ getItems: getItems,
+ isCached: isCached
+ };
+ })());
+
+})(jQuery, RichFaces);
+
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+ // Constructor definition
+ rf.ui.ComboBox = function(componentId, fieldId, options) {
+ this.namespace = "."+rf.Event.createNamespace(this.name, this.componentId);
+ this.options = {};
+ // call constructor of parent class
+ $super.constructor.call(this, componentId+ID.SELECT, fieldId, options);
+ this.attachToDom.call(this, componentId);
+ this.componentId = componentId;
+ this.options = $.extend(this.options, defaultOptions, options);
+ this.inputValue = this.getInputValue();
+ this.index = -1;
+ this.isFirstAjax = true;
+ bindEventHandlers.call(this);
+ updateItemsList.call(this, "");
+ };
+
+ var $p ={};
+
+ // Extend component class and add protected methods from parent class to our container
+ $p = rf.ui.SelectBase.extend(rf.ui.SelectBase, rf.ui.ComboBox, $p);
+
+ // define super class link
+ var $super = rf.ui.ComboBox.$super;
+
+ var defaultOptions = {
+ selectedItemClass:'cb_select',
+ autoFill:true,
+ minChars:1,
+ selectFirst:true,
+ ajaxMode:true
+ };
+
+ var ID = {
+ SELECT:'List',
+ ITEMS:'Items'
+ };
+
+ var REGEXP_TRIM = /^[\n\s]*(.*)[\n\s]*$/;
+
+ var getData = function (nodeList) {
+ var data = [];
+ nodeList.each(function () {;
+ data.push($(this).text().replace(REGEXP_TRIM, "$1"));
+ });
+ return data;
+ }
+
+ var bindEventHandlers = function () {
+ rf.Event.bind(rf.getDomElement(this.componentId+ID.ITEMS).parentNode, "click"+this.namespace+" mouseover"+this.namespace, onMouseAction, this);
+ };
+
+ var onMouseAction = function(event) {
+ console && console.log && console.log("mouseAction:" + event.type);
+ var element = $(event.target).closest(".rf-ac-i", event.currentTarget).get(0);
+
+ if (element) {
+ if (event.type=="mouseover") {
+ var index = this.items.index(element);
+ if (index!=this.index) {
+ this.selectItem(index);
+ }
+ } else {
+ this.changeValue(event, this.getSelectedItemValue());
+ rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
+ this.hide(event);
+ }
+ }
+ };
+
+ var updateItemsList = function (value) {
+ this.items = $(rf.getDomElement(this.componentId+ID.ITEMS)).find(".rf-ac-i");
+ this.cache = new rf.utils.Cache(this.items, {
+ parse: getData,
+ key: value
+ });
+ };
+
+ var scrollToSelectedItem = function() {
+ var offset = 0;
+ this.items.slice(0, this.index).each(function() {
+ offset += this.offsetHeight;
+ });
+ var itemsContainer = this.items.first().parent().parent();
+ if(offset < itemsContainer.scrollTop()) {
+ itemsContainer.scrollTop(offset);
+ } else {
+ offset+=this.items.get(this.index).offsetHeight;
+ if(offset - itemsContainer.scrollTop() > itemsContainer.get(0).clientHeight) {
+ itemsContainer.scrollTop(offset - itemsContainer.innerHeight());
+ }
+ }
+ };
+
+ var autoFill = function (inputValue, value) {
+ if( this.options.autoFill) {
+ var field = rf.getDomElement(this.fieldId);
+ var start = rf.Selection.getStart(field);
+ this.setInputValue(inputValue + value.substring(inputValue.length));
+ rf.Selection.set(field, start, field.value.length);
+ }
+ };
+
+ var callAjax = function(event) {
+
+ var _this = this;
+ var ajaxSuccess = function () {
+ updateItemsList.call(_this, _this.inputValue);
+ if (_this.options.selectFirst) {
+ _this.selectItem(0);
+ }
+ }
+
+ var ajaxError = function () {
+ alert("error");
+ }
+
+ this.isFirstAjax = false;
+ //caution: JSF submits inputs with empty names causing "WARNING: Parameters: Invalid chunk ignored." in Tomcat log
+ var params = {};
+ params[this.componentId + ".ajax"] = "1";
+
+ rf.ajax(this.componentId, event, {parameters: params, error: ajaxError, complete:ajaxSuccess});
+ };
+
+ $.extend(rf.ui.ComboBox.prototype, (function () {
+ return {
+ name:"CompoBox",
+ destroy: function () {
+ //TODO: add all unbind
+ rf.Event.unbind(rf.getDomElement(this.componentId+ID.ITEMS).parentNode, this.namespace);
+ $super.destroy.call(this);
+ },
+ getNamespace: function () {
+ return this.namespace;
+ },
+
+ selectItem: function(index, isOffset, noAutoFill) {
+ if (this.items.length==0) return;
+
+ if (this.index!=-1) {
+ this.items.eq(this.index).removeClass(this.options.selectedItemClass);
+ }
+
+ if (index==undefined) {
+ this.index = -1;
+ return;
+ }
+
+ if (isOffset) {
+ this.index += index;
+ if ( this.index<0 ) {
+ this.index = this.items.length - 1;
+ } else if (this.index >= this.items.length) {
+ this.index = 0;
+ }
+ } else {
+ if (index<0) {
+ index = 0;
+ } else if (index>=this.items.length) {
+ index = this.items.length - 1;
+ }
+ this.index = index;
+ }
+ var item = this.items.eq(this.index);
+ item.addClass(this.options.selectedItemClass);
+
+ scrollToSelectedItem.call(this);
+ !noAutoFill && autoFill.call(this, this.inputValue, this.getSelectedItemValue());
+ },
+
+ selectPrevItem: function () {
+ this.selectItem(-1, true);
+ },
+ selectNextItem: function () {
+ this.selectItem(1, true);
+ },
+ selectPageUp: function () {
+
+ },
+ selectPageDown: function () {
+
+ },
+ onBeforeShow: function (event) {
+ },
+
+ onEnter: function (event) {
+ this.changeValue(event, this.getSelectedItemValue());
+ rf.getDomElement(this.fieldId).blur();
+ rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
+ rf.getDomElement(this.fieldId).focus();
+ },
+
+ changeValue: function (event, value) {
+ this.selectItem();
+
+ if (typeof value == "undefined") {
+ // called from show method, not actually value changed
+ if (this.items.length==0 && this.inputValue.length>=this.options.minChars && this.isFirstAjax) {
+ this.options.ajaxMode && callAjax.call(this, event);
+ }
+ return;
+ }
+
+ // TODO: ajax call here if needed
+ if (( value.toLowerCase().indexOf(this.cache.key.toLowerCase())!=0 || this.inputValue.length==0) &&
+ value.length>=this.options.minChars) {
+ this.inputValue = value;
+ this.options.ajaxMode && callAjax.call(this, event);
+ return;
+ }
+
+ var newItems = this.cache.getItems(value);
+ this.items = $(newItems);
+ //TODO: works only with simple markup, not with <tr>
+ $(rf.getDomElement(this.componentId+ID.ITEMS)).empty().append(newItems);
+ this.index = -1;
+ this.inputValue = value;
+ if (this.options.selectFirst) {
+ this.selectItem(0, false, event.which == rf.KEYS.BACKSPACE);
+ }
+ },
+
+ getSelectedItemValue: function () {
+ if ( this.index>=0) {
+ return getData(this.items.eq(this.index))[0];
+ }
+ return undefined;
+ },
+
+ onShow: function (event) {
+ if (this.items && this.items.length>0) {
+ //??TODO it's nessesary only if not changed value
+ if (this.options.selectFirst) {
+ this.selectItem(0);
+ }
+ }
+ },
+
+ onHide: function () {
+ this.selectItem();
+ }
+ };
+ })());
+})(jQuery, RichFaces);
\ No newline at end of file
Copied: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js (from rev 18076, root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/SelectBase.js)
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js (rev 0)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-16 11:37:20 UTC (rev 18135)
@@ -0,0 +1,266 @@
+// TODO: move this extend to RichFaces.Event for exapmle
+$.extend(RichFaces.Event, {
+ bindScrollEventHandlers: function(element, handler, component) {
+ var elements = [];
+ element = RichFaces.getDomElement(element).parentNode;
+ while (element && element!=window.document.body)
+ {
+ if (element.offsetWidth!=element.scrollWidth || element.offsetHeight!=element.scrollHeight)
+ {
+ elements.push(element);
+ RichFaces.Event.bind(element, "scroll"+component.getNamespace(), handler, component);
+ }
+ element = element.parentNode;
+ }
+ return elements;
+ },
+ unbindScrollEventHandlers: function(elements, component) {
+ RichFaces.Event.unbind(elements, component.getNamespace());
+ elements = null;
+ }
+});
+
+(function (rf) {
+ rf.KEYS = {
+ BACKSPACE: 8,
+ TAB: 9,
+ RETURN: 13,
+ ESC: 27,
+ PAGEUP: 33,
+ PAGEDOWN: 34,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ DEL: 46,
+ }
+})(RichFaces);
+
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ // Constructor definition
+ rf.ui.SelectBase = function(selectId, fieldId, options) {
+ // call constructor of parent class
+ $super.constructor.call(this, selectId);
+ this.selectId = selectId;
+ this.fieldId = fieldId;
+ this.options = $.extend({}, defaultOptions, options);
+ this.namespace = this.namespace || "."+rf.Event.createNamespace(this.name, this.selectId);
+ this.currentValue = this.getInputValue();
+ bindEventHandlers.call(this);
+ };
+
+ var $p ={};
+
+ // Extend component class and add protected methods from parent class to our container
+ $p = rf.BaseComponent.extend(rf.BaseComponent, rf.ui.SelectBase, $p);
+
+ // define super class link
+ var $super = rf.ui.SelectBase.$super;
+
+ var defaultOptions = {
+ changeDelay:8
+ };
+
+ var bindEventHandlers = function() {
+ if (this.options.buttonId) {
+ rf.Event.bindById(this.options.buttonId, "mousedown"+this.namespace, onButtonShow, this);
+ rf.Event.bindById(this.options.buttonId, "mouseup"+this.namespace, onSelectMouseUp, this);
+ }
+
+ var inputEventHandlers = {};
+ inputEventHandlers["focus"+this.namespace] = onFocus;
+ inputEventHandlers["blur"+this.namespace] = onBlur;
+ inputEventHandlers["click"+this.namespace] = onClick;
+ inputEventHandlers[($.browser.opera ? "keypress" : "keydown")+this.namespace] = onKeyDown;
+ rf.Event.bindById(this.fieldId, inputEventHandlers, this);
+
+ inputEventHandlers = {};
+ //inputEventHandlers["click"+this.namespace] = onSelectClick;
+ inputEventHandlers["mousedown"+this.namespace] = onSelectMouseDown;
+ inputEventHandlers["mouseup"+this.namespace] = onSelectMouseUp;
+ rf.Event.bindById(this.selectId, inputEventHandlers, this);
+ };
+
+ var onSelectMouseDown = function () {
+ this.isMouseDown = true;
+ //console && console.log && console.log("onMouseDown");
+ };
+ var onSelectMouseUp = function () {
+ //this.isMouseDown = false;
+ rf.getDomElement(this.fieldId).focus();
+ //console && console.log && console.log("onMouseUp");
+ };
+
+ var onButtonShow = function (event) {
+ this.isMouseDown = true;
+ //console && console.log && console.log("onButtonShow - "+this.timeoutId);
+ if (this.timeoutId) {
+ window.clearTimeout(this.timeoutId);
+ this.timeoutId = null;
+ rf.getDomElement(this.fieldId).focus();
+ }
+
+ if (this.isVisible) {
+ this.hide(event);
+ } else {
+ onShow.call(this, event);
+ //rf.getDomElement(this.fieldId).focus();
+ }
+ };
+
+ var onFocus = function (event) {
+ //console && console.log && console.log("onFocus");
+ };
+
+ var onBlur = function (event) {
+ //console && console.log && console.log("onBlur");
+ if (this.isMouseDown) {
+ rf.getDomElement(this.fieldId).focus();
+ this.isMouseDown = false;
+ //console && console.log && console.log("---------> and focus");
+ } else if (this.isVisible && !this.isMouseDown/*&& checkOnBlur.call(this, event)*/) {
+ var _this = this;
+ this.timeoutId = window.setTimeout(function(){_this.hide();}, 200);
+ }
+ };
+
+ var onClick = function (event) {
+ };
+
+ var onChange = function (event) {
+ var value = this.getInputValue();
+ var flag = value != this.currentValue;
+ //TODO: is it needed to chesk keys?
+ if (event.which == rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT || flag) {
+ if (flag) {
+ this.changeValue(event, value);
+ onShow.call(this, event, true);
+ }
+ }
+ };
+
+ var onShow = function (event, noChangeValue) {
+ !noChangeValue && this.changeValue(event);
+ this.show(event);
+ };
+
+ var onKeyDown = function (event) {
+ switch(event.which) {
+ case rf.KEYS.UP:
+ event.preventDefault();
+ if (this.isVisible) {
+ this.selectPrevItem();
+ }
+ break;
+ case rf.KEYS.DOWN:
+ event.preventDefault();
+ if (this.isVisible) {
+ this.selectNextItem();
+ } else {
+ onShow.call(this, event);
+ }
+ break;
+ case rf.KEYS.PAGEUP:
+ event.preventDefault();
+ if (this.isVisible) {
+ this.selectPageUp();
+ }
+ break;
+ case rf.KEYS.PAGEDOWN:
+ event.preventDefault();
+ if (this.isVisible) {
+ this.selectPageDown();
+ }
+ break;
+ case rf.KEYS.TAB:
+ case rf.KEYS.RETURN:
+ //TODO draft code, merge with code from combobox.js
+ event.preventDefault();
+ this.onEnter(event);
+ /*if( selectCurrentItem() ) {
+ event.preventDefault();
+ //TODO: bind form submit event handler to cancel form submit under the opera
+ //cancelSubmit = true;
+ return false;
+ }*/
+ this.hide();
+ return false;
+ break;
+ case rf.KEYS.ESC:
+ this.hide();
+ break;
+ default:
+ if (!this.options.selectOnly) {
+ var _this = this;
+ window.clearTimeout(this.changeTimerId);
+ this.changeTimerId = window.setTimeout(function(){onChange.call(_this, event);}, this.options.changeDelay)
+ }
+ break;
+ }
+ }
+
+ $.extend(rf.ui.SelectBase.prototype, (function () {
+ return {
+ name:"SelectBase",
+ show: function (event) {
+ if (!this.isVisible) {
+ if (this.onBeforeShow(event)!=false) {
+ $(rf.getDomElement(this.selectId)).setPosition({id: this.fieldId}, {type:"DROPDOWN", offset:[0,20]}).show();
+ this.isVisible = true;
+ this.scrollElements = rf.Event.bindScrollEventHandlers(this.selectId, this.hide, this, this.namespace);
+ if (this.onShow) {
+ this.onShow(event);
+ }
+ }
+ }
+ },
+ hide: function (event) {
+ if (this.isVisible) {
+ rf.Event.unbindScrollEventHandlers(this.scrollElements, this);
+ $(rf.getDomElement(this.selectId)).hide();
+ this.isVisible = false;
+ if (this.onHide) {
+ this.onHide(event);
+ }
+ }
+ },
+ destroy: function () {
+ //TODO: add all unbind
+ rf.Event.unbindById(this.options.buttonId, this.namespace);
+ rf.Event.unbindById(this.fieldId, this.namespace);
+ $super.destroy.call(this);
+ },
+ getNamespace: function () {
+ return this.namespace;
+ },
+
+ selectPrevItem: function () {
+ },
+ selectNextItem: function () {
+ },
+ selectPageUp: function () {
+ },
+ selectPageDown: function () {
+ },
+ onBeforeShow: function () {
+ },
+ getInputValue: function () {
+ return this.fieldId ? rf.getDomElement(this.fieldId).value : undefined;
+ },
+ updateInputValue: function (value) {
+ if (this.fieldId) {
+ rf.getDomElement(this.fieldId).value = value;
+ return value;
+ } else {
+ return "";
+ }
+ },
+ setInputValue: function (value) {
+ this.currentValue = this.updateInputValue(value);
+ }
+ };
+ })());
+})(jQuery, RichFaces);
\ No newline at end of file
Deleted: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.ecss
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.ecss 2010-07-16 11:23:15 UTC (rev 18134)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.ecss 2010-07-16 11:37:20 UTC (rev 18135)
@@ -1,152 +0,0 @@
-.cb_field_width {
- width: 100px;
-}
-
-.cb_list_width {
- width: 200px;
-}
-
-.cb_list_height {
- max-height: 100px;
- min-height: 20px;
-}
-
-.cb_input.cb_font, .cb_option.cb_font {
- color: '#{richSkin.generalTextColor}';
- font-size: '#{richSkin.generalSizeFont}';
- font-family: '#{richSkin.generalFamilyFont}';
-}
-
-input.cb_input {
- border-width: 0px;
- background: none;
- width: 100%;
-}
-
-.cb_field {
- position: inline-block;
- border-width: 1px;
- border-style: solid;
- border-color: '#{richSkin.panelBorderColor}';
- display: inline-block;
- background-image: "url(#{resource['org.richfaces.renderkit.html.images.ComboBoxFieldGradient']})";
- background-repeat: repeat-x;
- background-position: top left;
- background-color: '#{richSkin.controlBackgroundColor}';
-}
-
-.cb_button {
- background-image: "url(#{resource['org.richfaces.renderkit.html.images.ComboBoxButtonGradient']})";
- background-repeat: repeat-x;
- background-position: top left;
- background-color: '#{richSkin.headerBackgroundColor}';
- text-align: center;
- border-left-style: solid;
- border-left-width: 1px;
- border-left-color: '#{richSkin.panelBorderColor}';
- width: 15px;
- position: absolute;
- top: 0px;
- right: 0px;
- height: 200px;
- padding-top: 1px
-}
-
-.cb_button_arrow {
- background-position: center;
- background-repeat: no-repeat;
- background-image: "url(#{resource['org.richfaces:combo_down_button.gif']})";
- cursor: pointer;
- width: 15px;
- height: 15px;
-}
-
-.cb_list_cord {
- position: absolute;
- font-size: 0px;
- display: none;
-} /*DDL is hidden!!!!!*/
-
-.cb_list_decoration {
- border-width: 1px;
- border-style: solid;
- border-color: '#{richSkin.panelBorderColor}';
- padding: 0px;
- background-color: '#{richSkin.tableBackgroundColor}';
-}
-
-.cb_list_scroll {
- overflow: auto;
- overflow-x: hidden;
-}
-
-.cb_option {
- padding: 2px;
- white-space: nowrap;
- cursor: default;
- list-style-type: none;
-}
-
-.cb_select {
- padding: 1px;
- width: 100%;
- background-color: #DFE8F6;
- border-width: 1px;
- border-style: dotted;
- border-color: '#{richSkin.generalTextColor}';
-}
-
-.cb_shadow {
- border: 0px solid red;
- display: inline-block;
- position: absolute;
- float: left;
- padding: 6px 6px 6px 6px;
- top: -6px;
- left: -7px;
-}
-
-.cb_shadow_t {
- background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
- background-position: top left;
- position: absolute;
- width: 6px;
- top: 0px;
- bottom: 6px;
- left: 0px
-}
-
-.cb_shadow_l {
- background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
- background-position: bottom left;
- position: absolute;
- height: 6px;
- bottom: 0px;
- left: 0px;
- right: 6px;
-}
-
-.cb_shadow_r {
- background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
- background-position: bottom right;
- position: absolute;
- width: 6px;
- top: 6px;
- bottom: 0px;
- right: 0px;
-}
-
-.cb_shadow_b {
- background-image: "url(#{resource['org.richfaces:combo_list_shadow.png']})";
- background-position: right top;
- position: absolute;
- height: 6px;
- top: 0px;
- left: 6px;
- right: 0px;
-}
-
-.cb_list_ul {
- margin: 0px;
- padding: 0px;
-}
\ No newline at end of file
Deleted: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.js 2010-07-16 11:23:15 UTC (rev 18134)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/ComboBox.js 2010-07-16 11:37:20 UTC (rev 18135)
@@ -1,295 +0,0 @@
-(function ($, rf) {
- rf.utils = rf.utils || {};
-
- rf.utils.Cache = function (data, options) {
- this.key = options.key;
- this.cache = {}
- this.cache[this.key] = data || [];
- this.values = options.parse && options.parse(data) || this.cache[this.key];
- };
-
- var getItems = function (key) {
- var newCache = [];
-
- if (key.length < this.key.length) {
- return newCache;
- }
-
- if (this.cache[key]) {
- newCache = this.cache[key];
- } else {
- var itemsCache = this.cache[this.key];
- for (var i = 0; i<this.values.length; i++) {
- var value = this.values[i].toLowerCase();
- var p = value.indexOf(key.toLowerCase());
- if (p == 0) {
- newCache.push(itemsCache[i]);
- }
- }
-
- if ((!this.lastKey || key.indexOf(this.lastKey)!=0) && newCache.length > 0) {
- //console && console.log && console.log("added key:"+key+" length:" + newCache.length)
- this.cache[key] = newCache;
- if (newCache.length==1) {
- this.lastKey = key;
- }
- }
- }
-
- return newCache;
- };
-
- var isCached = function (key) {
- return this.cache[key];
- }
-
- $.extend(rf.utils.Cache.prototype, (function () {
- return {
- getItems: getItems,
- isCached: isCached
- };
- })());
-
-})(jQuery, RichFaces);
-
-(function ($, rf) {
-
- rf.ui = rf.ui || {};
- // Constructor definition
- rf.ui.ComboBox = function(componentId, fieldId, options) {
- this.namespace = "."+rf.Event.createNamespace(this.name, this.componentId);
- this.options = {};
- // call constructor of parent class
- $super.constructor.call(this, componentId+ID.SELECT, fieldId, options);
- $p.attachToDom.call(this, componentId);
- this.componentId = componentId;
- this.options = $.extend(this.options, defaultOptions, options);
- this.inputValue = this.getInputValue();
- this.index = -1;
- this.isFirstAjax = true;
- bindEventHandlers.call(this);
- updateItemsList.call(this, "");
- };
-
- var $p ={};
-
- // Extend component class and add protected methods from parent class to our container
- $p = rf.ui.SelectBase.extend(rf.ui.SelectBase, rf.ui.ComboBox, $p);
-
- // define super class link
- var $super = rf.ui.ComboBox.$super;
-
- var defaultOptions = {
- selectedItemClass:'cb_select',
- autoFill:true,
- minChars:1,
- selectFirst:true,
- ajaxMode:true
- };
-
- var ID = {
- SELECT:'List',
- ITEMS:'Items'
- };
-
- var REGEXP_TRIM = /^[\n\s]*(.*)[\n\s]*$/;
-
- var getData = function (nodeList) {
- var data = [];
- nodeList.each(function () {;
- data.push($(this).text().replace(REGEXP_TRIM, "$1"));
- });
- return data;
- }
-
- var bindEventHandlers = function () {
- rf.Event.bind(rf.getDomElement(this.componentId+ID.ITEMS).parentNode, "click"+this.namespace+" mouseover"+this.namespace, onMouseAction, this);
- };
-
- var onMouseAction = function(event) {
- console && console.log && console.log("mouseAction:" + event.type);
- var element = $(event.target).closest(".rf-ac-i", event.currentTarget).get(0);
-
- if (element) {
- if (event.type=="mouseover") {
- var index = this.items.index(element);
- if (index!=this.index) {
- this.selectItem(index);
- }
- } else {
- this.changeValue(event, this.getSelectedItemValue());
- rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
- this.hide(event);
- }
- }
- };
-
- var updateItemsList = function (value) {
- this.items = $(rf.getDomElement(this.componentId+ID.ITEMS)).find(".rf-ac-i");
- this.cache = new rf.utils.Cache(this.items, {
- parse: getData,
- key: value
- });
- };
-
- var scrollToSelectedItem = function() {
- var offset = 0;
- this.items.slice(0, this.index).each(function() {
- offset += this.offsetHeight;
- });
- var itemsContainer = this.items.first().parent().parent();
- if(offset < itemsContainer.scrollTop()) {
- itemsContainer.scrollTop(offset);
- } else {
- offset+=this.items.get(this.index).offsetHeight;
- if(offset - itemsContainer.scrollTop() > itemsContainer.get(0).clientHeight) {
- itemsContainer.scrollTop(offset - itemsContainer.innerHeight());
- }
- }
- };
-
- var autoFill = function (inputValue, value) {
- if( this.options.autoFill) {
- var field = rf.getDomElement(this.fieldId);
- var start = rf.Selection.getStart(field);
- field.value = inputValue + value.substring(inputValue.length);
- rf.Selection.set(field, start, field.value.length);
- }
- };
-
- var callAjax = function(event) {
-
- var _this = this;
- var ajaxSuccess = function () {
- updateItemsList.call(_this, _this.inputValue);
- if (_this.options.selectFirst) {
- _this.selectItem(0);
- }
- }
-
- var ajaxError = function () {
- alert("error");
- }
-
- this.isFirstAjax = false;
- //caution: JSF submits inputs with empty names causing "WARNING: Parameters: Invalid chunk ignored." in Tomcat log
- var params = {};
- params[this.componentId + ".ajax"] = "1";
-
- rf.ajax(this.componentId, event, {parameters: params, error: ajaxError, complete:ajaxSuccess});
- };
-
- // Add new properties and methods
- $.extend(rf.ui.ComboBox.prototype, (function () {
- return {
- name:"CompoBox",
- destroy: function () {
- //TODO: add all unbind
- rf.Event.unbind(rf.getDomElement(this.componentId+ID.ITEMS).parentNode, this.namespace);
- $super.destroy.call(this);
- },
- getNamespace: function () {
- return this.namespace;
- },
-
- selectItem: function(index, isOffset, noAutoFill) {
- if (this.items.length==0) return;
-
- if (this.index!=-1) {
- this.items.eq(this.index).removeClass(this.options.selectedItemClass);
- }
-
- if (index==undefined) {
- this.index = -1;
- return;
- }
-
- if (isOffset) {
- this.index += index;
- if ( this.index<0 ) {
- this.index = this.items.length - 1;
- } else if (this.index >= this.items.length) {
- this.index = 0;
- }
- } else {
- if (index<0) {
- index = 0;
- } else if (index>=this.items.length) {
- index = this.items.length - 1;
- }
- this.index = index;
- }
- var item = this.items.eq(this.index);
- item.addClass(this.options.selectedItemClass);
-
- scrollToSelectedItem.call(this);
- !noAutoFill && autoFill.call(this, this.inputValue, this.getSelectedItemValue());
- },
-
- selectPrevItem: function () {
- this.selectItem(-1, true);
- },
- selectNextItem: function () {
- this.selectItem(1, true);
- },
- selectPageUp: function () {
-
- },
- selectPageDown: function () {
-
- },
- onBeforeShow: function (event) {
- },
-
- changeValue: function (event, value) {
- this.selectItem();
-
- if (typeof value == "undefined") {
- // called from show method, not actually value changed
- if (this.items.length==0 && this.inputValue.length>=this.options.minChars && this.isFirstAjax) {
- this.options.ajaxMode && callAjax.call(this, event);
- }
- return;
- }
-
- // TODO: ajax call here if needed
- if (( value.toLowerCase().indexOf(this.cache.key.toLowerCase())!=0 || this.inputValue.length==0) &&
- value.length>=this.options.minChars) {
- this.inputValue = value;
- this.options.ajaxMode && callAjax.call(this, event);
- return;
- }
-
- var newItems = this.cache.getItems(value);
- this.items = $(newItems);
- //TODO: works only with simple markup, not with <tr>
- $(rf.getDomElement(this.componentId+ID.ITEMS)).empty().append(newItems);
- this.index = -1;
- this.inputValue = value;
- if (this.options.selectFirst) {
- this.selectItem(0, false, event.which == rf.KEYS.BACKSPACE);
- }
- },
-
- getSelectedItemValue: function () {
- if ( this.index>=0) {
- return getData(this.items.eq(this.index))[0];
- }
- return undefined;
- },
-
- onShow: function (event) {
- if (this.items && this.items.length>0) {
- //??TODO it's nessesary only if not changed value
- if (this.options.selectFirst) {
- this.selectItem(0);
- }
- }
- },
-
- onHide: function () {
- this.selectItem();
- }
- };
- })());
-})(jQuery, RichFaces);
\ No newline at end of file
Deleted: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/SelectBase.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/SelectBase.js 2010-07-16 11:23:15 UTC (rev 18134)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/SelectBase.js 2010-07-16 11:37:20 UTC (rev 18135)
@@ -1,276 +0,0 @@
-// TODO: move this extend to RichFaces.Event for exapmle
-$.extend(RichFaces.Event, {
- bindScrollEventHandlers: function(element, handler, component) {
- var elements = [];
- element = RichFaces.getDomElement(element).parentNode;
- while (element && element!=window.document.body)
- {
- if (element.offsetWidth!=element.scrollWidth || element.offsetHeight!=element.scrollHeight)
- {
- elements.push(element);
- RichFaces.Event.bind(element, "scroll"+component.getNamespace(), handler, component);
- }
- element = element.parentNode;
- }
- return elements;
- },
- unbindScrollEventHandlers: function(elements, component) {
- RichFaces.Event.unbind(elements, component.getNamespace());
- elements = null;
- }
-});
-
-(function (rf) {
- rf.KEYS = {
- BACKSPACE: 8,
- TAB: 9,
- RETURN: 13,
- ESC: 27,
- PAGEUP: 33,
- PAGEDOWN: 34,
- LEFT: 37,
- UP: 38,
- RIGHT: 39,
- DOWN: 40,
- DEL: 46,
- }
-})(RichFaces);
-
-(function ($, rf) {
-
- rf.ui = rf.ui || {};
-
- // Constructor definition
- rf.ui.SelectBase = function(selectId, fieldId, options) {
- // call constructor of parent class
- $super.constructor.call(this, selectId);
- this.selectId = selectId;
- this.fieldId = fieldId;
- this.options = $.extend({}, defaultOptions, options);
- this.namespace = this.namespace || "."+rf.Event.createNamespace(this.name, this.selectId);
- this.currentValue = this.getInputValue();
- bindEventHandlers.call(this);
- };
-
- var $p ={};
-
- // Extend component class and add protected methods from parent class to our container
- $p = rf.BaseComponent.extend(rf.BaseComponent, rf.ui.SelectBase, $p);
-
- // define super class link
- var $super = rf.ui.SelectBase.$super;
-
- var defaultOptions = {
- changeDelay:8
- };
-
- var bindEventHandlers = function() {
- if (this.options.buttonId) {
- rf.Event.bindById(this.options.buttonId, "mousedown"+this.namespace, onButtonShow, this);
- rf.Event.bindById(this.options.buttonId, "mouseup"+this.namespace, onSelectMouseUp, this);
- }
-
- var inputEventHandlers = {};
- inputEventHandlers["focus"+this.namespace] = onFocus;
- inputEventHandlers["blur"+this.namespace] = onBlur;
- inputEventHandlers["click"+this.namespace] = onClick;
- inputEventHandlers[($.browser.opera ? "keypress" : "keydown")+this.namespace] = onKeyDown;
- rf.Event.bindById(this.fieldId, inputEventHandlers, this);
-
- inputEventHandlers = {};
- //inputEventHandlers["click"+this.namespace] = onSelectClick;
- inputEventHandlers["mousedown"+this.namespace] = onSelectMouseDown;
- inputEventHandlers["mouseup"+this.namespace] = onSelectMouseUp;
- rf.Event.bindById(this.selectId, inputEventHandlers, this);
- }
-
- /*var onSelectClick = function () {
- };*/
-
- var onSelectMouseDown = function () {
- this.isMouseDown = true;
- //console && console.log && console.log("onMouseDown");
- };
- var onSelectMouseUp = function () {
- //this.isMouseDown = false;
- rf.getDomElement(this.fieldId).focus();
- //console && console.log && console.log("onMouseUp");
- };
-
- var onButtonShow = function (event) {
- this.isMouseDown = true;
- //console && console.log && console.log("onButtonShow - "+this.timeoutId);
- if (this.timeoutId) {
- window.clearTimeout(this.timeoutId);
- this.timeoutId = null;
- rf.getDomElement(this.fieldId).focus();
- }
-
- if (this.isVisible) {
- this.hide(event);
- } else {
- onShow.call(this, event);
- //rf.getDomElement(this.fieldId).focus();
- }
- };
-
- var onFocus = function (event) {
- //console && console.log && console.log("onFocus");
- };
-
- var onBlur = function (event) {
- //console && console.log && console.log("onBlur");
- if (this.isMouseDown) {
- rf.getDomElement(this.fieldId).focus();
- this.isMouseDown = false;
- //console && console.log && console.log("---------> and focus");
- } else if (this.isVisible && !this.isMouseDown/*&& checkOnBlur.call(this, event)*/) {
- var _this = this;
- this.timeoutId = window.setTimeout(function(){_this.hide();}, 200);
- }
- };
-
- var onClick = function (event) {
- };
-
- var onChange = function (event) {
- var value = this.getInputValue();
- var flag = value != this.currentValue;
- //TODO: is it needed to chesk keys?
- if (event.which == rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT || flag) {
- if (flag) {
- this.changeValue(event, value);
- this.currentValue = value;
- onShow.call(this, event, true);
- }
- }
- }
-
- var onShow = function (event, noChangeValue) {
- !noChangeValue && this.changeValue(event);
- this.show(event);
- }
-
-
- /*var checkOnBlur = function (event) {
- var e = $(rf.getDomElement(this.options.buttonId));
- return (e == event.target) || $(event.target).closest(e);
- };*/
-
- var onKeyDown = function (event) {
- switch(event.which) {
- case rf.KEYS.UP:
- event.preventDefault();
- if (this.isVisible) {
- this.selectPrevItem();
- }
- break;
- case rf.KEYS.DOWN:
- event.preventDefault();
- if (this.isVisible) {
- this.selectNextItem();
- } else {
- onShow.call(this, event);
- }
- break;
- case rf.KEYS.PAGEUP:
- event.preventDefault();
- if (this.isVisible) {
- this.selectPageUp();
- }
- break;
- case rf.KEYS.PAGEDOWN:
- event.preventDefault();
- if (this.isVisible) {
- this.selectPageDown();
- }
- break;
- case rf.KEYS.TAB:
- case rf.KEYS.RETURN:
- //TODO draft code, merge with code from combobox.js
- event.preventDefault();
- this.changeValue(event, this.getSelectedItemValue());
- rf.getDomElement(this.fieldId).blur();
- rf.Selection.setCaretTo(rf.getDomElement(this.fieldId));
- rf.getDomElement(this.fieldId).focus();
- /*if( selectCurrentItem() ) {
- event.preventDefault();
- //TODO: bind form submit event handler to cancel form submit under the opera
- //cancelSubmit = true;
- return false;
- }*/
- this.hide();
- return false;
- break;
- case rf.KEYS.ESC:
- this.hide();
- break;
- default:
- if (!this.options.selectOnly) {
- var _this = this;
- window.clearTimeout(this.changeTimerId);
- this.changeTimerId = window.setTimeout(function(){onChange.call(_this, event);}, this.options.changeDelay)
- }
- break;
- }
- }
-
- // Add new properties and methods
- $.extend(rf.ui.SelectBase.prototype, (function () {
- return {
- name:"SelectBase",
- show: function (event) {
- if (!this.isVisible) {
- if (this.onBeforeShow(event)!=false) {
- $(rf.getDomElement(this.selectId)).setPosition({id: this.fieldId}, {type:"DROPDOWN", offset:[0,20]}).show();
- this.isVisible = true;
- this.scrollElements = rf.Event.bindScrollEventHandlers(this.selectId, this.hide, this, this.namespace);
- if (this.onShow) {
- this.onShow(event);
- }
- }
- }
- },
- hide: function (event) {
- if (this.isVisible) {
- rf.Event.unbindScrollEventHandlers(this.scrollElements, this);
- $(rf.getDomElement(this.selectId)).hide();
- this.isVisible = false;
- if (this.onHide) {
- this.onHide(event);
- }
- }
- },
- destroy: function () {
- //TODO: add all unbind
- rf.Event.unbindById(this.options.buttonId, this.namespace);
- rf.Event.unbindById(this.fieldId, this.namespace);
- $super.destroy.call(this);
- },
- getNamespace: function () {
- return this.namespace;
- },
-
- selectPrevItem: function () {
- },
- selectNextItem: function () {
- },
- selectPageUp: function () {
- },
- selectPageDown: function () {
- },
- onBeforeShow: function () {
- },
- getInputValue: function () {
- return this.fieldId ? rf.getDomElement(this.fieldId).value : undefined;;
- },
- getSelectedItemValue: function () {
- }
- /*setInputValue: function (value) {
- this.currentValue = value;
- rf.getDomElement(this.fieldId).value = value;
- }*/
-
- };
- })());
-})(jQuery, RichFaces);
\ No newline at end of file
14 years, 5 months