JBoss Rich Faces SVN: r4217 - branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-23 07:20:45 -0500 (Fri, 23 Nov 2007)
New Revision: 4217
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
saveState method for ListShuttle was added
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-23 12:19:36 UTC (rev 4216)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-23 12:20:45 UTC (rev 4217)
@@ -90,7 +90,6 @@
this.moveItem(sourceComponent, targetComponent, item);
}
this.controlListManager();
-
this.saveState();
}
},
@@ -101,8 +100,6 @@
}
this.addItem(targetComponent, item);
this.removeItem(sourceComponent, item);
-
- this.saveState();
},
removeItem : function(component, item) {
@@ -112,8 +109,6 @@
if (item == component.activeItem) {
component.activeItem == null;
}
-
- this.saveState();
},
addItem : function(component, item) {
@@ -121,8 +116,11 @@
Richfaces.SelectItems.doNormal(item._node);
component.shuttleTbody.insertBefore(item._node, null);
component.shuttleItems.push(item);
-
- this.saveState();
+ },
+
+ saveState : function() {
+ this.targetList.saveState();
+ this.sourceList.saveState();
}
}
18 years, 5 months
JBoss Rich Faces SVN: r4216 - in branches/3.1.x/ui/orderingList/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-23 07:19:36 -0500 (Fri, 23 Nov 2007)
New Revision: 4216
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/Control.js
Log:
show/hide of controls was changed
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-11-23 03:16:44 UTC (rev 4215)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-11-23 12:19:36 UTC (rev 4216)
@@ -211,7 +211,7 @@
writer.startElement(HTML.DIV_ELEM, orderingList);
writer.writeAttribute(HTML.id_ATTRIBUTE, clientId + helper.getIdSuffix(), null); //FIXME:
- writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_button_border " + (enabled ? "ol_control_shown" : "ol_control_hidden") + currentStyle, null);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_button_border " + currentStyle, null); //HTML.class_ATTRIBUTE, "ol_button_border " + (enabled ? "ol_control_shown" : "ol_control_hidden") + currentStyle
if (!useFacet) {
writer.startElement(HTML.DIV_ELEM, orderingList);
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/Control.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/Control.js 2007-11-23 03:16:44 UTC (rev 4215)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/Control.js 2007-11-23 12:19:36 UTC (rev 4216)
@@ -8,12 +8,12 @@
//this.isShown ? this.doShow() : this.doHide();
}
-Control.CLASSES = {
+/*Control.CLASSES = {
first : {hidden : "ol_button_border ol_control_hidden", shown : "ol_button_border ol_control_shown"},
down : {hidden : "ol_button_border ol_control_hidden", shown : "ol_button_border ol_control_shown"},
up : {hidden : "ol_button_border ol_control_hidden", shown : "ol_button_border ol_control_shown"},
last : {hidden : "ol_button_border ol_control_hidden", shown : "ol_button_border ol_control_shown"}
-};
+};*/
Control.prototype.doShow = function() {
this.isShown = true;
@@ -45,11 +45,13 @@
}
Control.prototype.doHideNode = function(node) {
- node.className = Control.CLASSES[this.action].hidden;
+ //node.className = Control.CLASSES[this.action].hidden;
+ node.hide();
}
Control.prototype.doShowNode = function(node) {
- node.className = Control.CLASSES[this.action].shown;
+ //node.className = Control.CLASSES[this.action].shown;
+ node.show();
}
18 years, 5 months
JBoss Rich Faces SVN: r4215 - branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-22 22:16:44 -0500 (Thu, 22 Nov 2007)
New Revision: 4215
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
saveState & toString moved to base class
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-23 03:16:40 UTC (rev 4214)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-23 03:16:44 UTC (rev 4215)
@@ -90,6 +90,8 @@
this.moveItem(sourceComponent, targetComponent, item);
}
this.controlListManager();
+
+ this.saveState();
}
},
@@ -99,6 +101,8 @@
}
this.addItem(targetComponent, item);
this.removeItem(sourceComponent, item);
+
+ this.saveState();
},
removeItem : function(component, item) {
@@ -108,6 +112,8 @@
if (item == component.activeItem) {
component.activeItem == null;
}
+
+ this.saveState();
},
addItem : function(component, item) {
@@ -115,7 +121,9 @@
Richfaces.SelectItems.doNormal(item._node);
component.shuttleTbody.insertBefore(item._node, null);
component.shuttleItems.push(item);
- },
+
+ this.saveState();
+ }
}
18 years, 5 months
JBoss Rich Faces SVN: r4214 - branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-22 22:16:40 -0500 (Thu, 22 Nov 2007)
New Revision: 4214
Modified:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
saveState & toString moved to base class
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-22 21:18:41 UTC (rev 4213)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-23 03:16:40 UTC (rev 4214)
@@ -341,7 +341,32 @@
return true;
}
return false;
+ },
+
+ getAsString : function() {
+ var result = new Array();
+ for (var i = 0; i < this.shuttleItems.length; i++) {
+ var item = this.shuttleItems[i];
+ result.push(item._id);
+ if (item._selected) {
+ result.push(Richfaces.OrderingList.SELECTION_MARKER);
+ }
+ if (this.activeItem && (this.activeItem.rowIndex == item._node.rowIndex)) {
+ result.push(Richfaces.OrderingList.ACTIVITY_MARKER);
+ }
+ if (i != (this.shuttleItems.length - 1)) {
+ result.push(Richfaces.OrderingList.ITEM_SEPARATOR);
+ }
+ }
+ return result.join("");
+ },
+
+ saveState : function() {
+ if (this.activeItem != null || (this.selectedItems.length > 0)) {
+ this.valueKeeper.value = this.getAsString();
+ }
}
+
}
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-22 21:18:41 UTC (rev 4213)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-23 03:16:40 UTC (rev 4214)
@@ -144,30 +144,6 @@
break;
case 32 : this.invertSelection(event); this.saveState(); break; //blank
}
- },
-
- toString : function() {
- var result = new Array();
- for (var i = 0; i < this.shuttleItems.length; i++) {
- var item = this.shuttleItems[i];
- result.push(item._id);
- if (item._selected) {
- result.push(Richfaces.OrderingList.SELECTION_MARKER);
- }
- if (this.activeItem && (this.activeItem.rowIndex == item._node.rowIndex)) {
- result.push(Richfaces.OrderingList.ACTIVITY_MARKER);
- }
- if (i != (this.shuttleItems.length - 1)) {
- result.push(Richfaces.OrderingList.ITEM_SEPARATOR);
- }
- }
- return result.join("");
- },
-
- saveState : function() {
- if (this.activeItem != null || (this.selectedItems.length > 0)) {
- this.valueKeeper.value = this.toString();
- }
}
});
18 years, 5 months
JBoss Rich Faces SVN: r4213 - branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 16:18:41 -0500 (Thu, 22 Nov 2007)
New Revision: 4213
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
Log:
refactoring of rendering methods
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-11-22 21:12:54 UTC (rev 4212)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-11-22 21:18:41 UTC (rev 4213)
@@ -141,14 +141,20 @@
public void encodeCaption(FacesContext context, UIComponent component)
throws IOException {
+ encodeCaption(context, component, OrderingListRendererBase.FACET_CAPTION, "ol_label ol_out_label rich-ordering-list-caption");
+
+ }
+
+ protected void encodeCaption(FacesContext context, UIComponent component, String facetCaption, String captionStyle)
+ throws IOException {
ResponseWriter writer = context.getResponseWriter();
- UIComponent facetEl = component.getFacet(OrderingListRendererBase.FACET_CAPTION);
+ UIComponent facetEl = component.getFacet(facetCaption);
boolean renderFacet = ((facetEl != null) && facetEl.isRendered());
String captionAttr = (String) component.getAttributes().get(OrderingListRendererBase.ATTRIBUTE_CAPTION_LABEL);
if (renderFacet || (captionAttr != null)) {
writer.startElement(HTML.DIV_ELEM, component);
- writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_label ol_out_label rich-ordering-list-caption", null);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, captionStyle, null);
if (renderFacet) {
renderChild(context, facetEl);
} else {
@@ -156,22 +162,27 @@
}
writer.endElement(HTML.DIV_ELEM);
}
-
+
}
public void encodeHeader(FacesContext context, UIOrderingBaseComponent component)
throws IOException {
+ encodeHeader(context, component, "rich-table-header", "ol_col rich-table-header-cell", "headerClass");
+ }
+
+ protected void encodeHeader(FacesContext context, UIOrderingBaseComponent component, String rowStyle,
+ String styleCell, String headerClassAttr) throws IOException {
ResponseWriter writer = context.getResponseWriter();
//UIComponent header = orderingList.getHeader();
Iterator headers = component.columns();
if (headers.hasNext()) {
writer.startElement("thead", component);
- String headerClass = (String) component.getAttributes().get("headerClass");
+ String headerClass = (String) component.getAttributes().get(headerClassAttr);
writer.startElement("tr", component);
- encodeStyleClass(writer, null, "rich-table-header", null, headerClass);
- encodeHeaderFacets(context, writer, headers, "ol_col rich-table-header-cell", headerClass, "header", "th", component);
+ encodeStyleClass(writer, null, rowStyle, null, headerClass);
+ encodeHeaderFacets(context, writer, headers, styleCell, headerClass, "header", "th", component);
writer.endElement("tr");
@@ -267,7 +278,8 @@
protected void encodeHeaderFacets(FacesContext context, ResponseWriter writer,
Iterator headers, String skinCellClass,
- String headerClass, String facetName, String element, UIOrderingBaseComponent orderingList)
+ String headerClass, String facetName, String element, UIOrderingBaseComponent orderingList
+ )
throws IOException {
while (headers.hasNext()) {
UIComponent column = (UIComponent) headers.next();
18 years, 5 months
JBoss Rich Faces SVN: r4212 - branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 16:12:54 -0500 (Thu, 22 Nov 2007)
New Revision: 4212
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
controls disable/enable
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 20:19:10 UTC (rev 4211)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 21:12:54 UTC (rev 4212)
@@ -4,9 +4,11 @@
Richfaces.ListShuttle.prototype = {
initialize: function(targetList, sourceList, clientId, controlIds) {
- //this.targetList = Richfaces.ListBase.apply(Richfaces.ListBase.constructor(), listParams[1]);
- //this.sourceList = Richfaces.OrderingList.apply(Richfaces.OrderingList.constructor(), listParams[0]);
+ $(targetList.shuttleTable.id).observe("click", function(e) {this.onclickHandler(window.event || e, targetList)}.bindAsEventListener(this));
+ $(sourceList.shuttleTable.id).observe("click", function(e) {this.onclickHandler(window.event || e, sourceList)}.bindAsEventListener(this));
+
+
this.targetList = targetList;
this.sourceList = sourceList;
@@ -28,25 +30,36 @@
},
controlListManager : function() {
- if (this.sourceList.shuttleItems.length < 1) {
- this.controlsProcessing(["copyAll"]);
- } else if (this.targetList.shuttleItems.length < 1) {
- this.controlsProcessing(["removeAll"]);
- } else if (this.sourceList.selectedItems.length < 1) {
- this.controlsProcessing(["copy"]);
- } else if (this.targetList.selectedItems.length < 1) {
- this.controlsProcessing(["remove"]);
- } else {
- this.controlsProcessing();
- }
+ //this.controlsProcessing();
+ this.controlsProcessing(["copy", "copyAll", "removeAll" ,"remove"], "enable");
+ if (this.sourceList.shuttleItems.length < 1)
+ this.controlsProcessing(["copy", "copyAll"], "disable");
+ if (this.sourceList.selectedItems.length < 1)
+ this.controlsProcessing(["copy"] , "disable");
+ if (this.targetList.shuttleItems.length < 1)
+ this.controlsProcessing(["removeAll" ,"remove"], "disable");
+ if (this.targetList.selectedItems.length < 1) {
+ this.controlsProcessing(["remove"], "disable");
+ }
},
- controlsProcessing : function(disabledControls) {
+ onclickHandler : function(event, component) {
+ component.onclickHandler(event);
+ this.controlListManager();
+ Event.stop(event);
+ },
+
+ controlsProcessing : function(disabledControls , action) {
for (var i = 0; i < this.controlList.length; i++) {
control = this.controlList[i];
if (control != null) {
- if (disabledControls != null && disabledControls.indexOf(control.action) != -1) control.doDisable();
- else control.doEnable();
+ if (disabledControls != null && disabledControls.indexOf(control.action) != -1) {
+ if (action == "disable") {
+ control.doDisable();
+ } else {
+ control.doEnable();
+ }
+ }
}
}
},
@@ -76,6 +89,7 @@
var item = items[i];
this.moveItem(sourceComponent, targetComponent, item);
}
+ this.controlListManager();
}
},
@@ -89,8 +103,7 @@
removeItem : function(component, item) {
var items = component.shuttleItems;
- var selectedItems = component.selectedItems;
- selectedItems.remove(item._node);
+ component.selectedItems.remove(item._node);
items.remove(item);
if (item == component.activeItem) {
component.activeItem == null;
@@ -107,7 +120,7 @@
}
Richfaces.ListShuttle.HANDLERS = {
- copy: function (e) { this.moveItem(this.sourceList, this.targetList, this.sourceList.selectedItems); return false; },
+ copy: function (e) { this.moveItems(this.sourceList, this.targetList, this.sourceList.selectedItems); return false; },
copyAll: function (e) { this.moveItems(this.sourceList, this.targetList, this.sourceList.shuttleItems); return false; },
remove: function (e) { this.moveItems(this.targetList, this.sourceList, this.targetList.selectedItems); return false; },
removeAll: function (e) { this.moveItems(this.targetList, this.sourceList, this.targetList.shuttleItems); return false; }
18 years, 5 months
JBoss Rich Faces SVN: r4211 - branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 15:19:10 -0500 (Thu, 22 Nov 2007)
New Revision: 4211
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
copy/remove functionality
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 18:58:38 UTC (rev 4210)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 20:19:10 UTC (rev 4211)
@@ -70,29 +70,38 @@
}*/
moveItems : function(sourceComponent, targetComponent, items) {
- for (var item in items) {
- moveItem(sourceComponent, targetComponent, item);
- }
+ if (items.length > 0) {
+ var length = items.length;
+ for (var i = 0; items.length > 0;) {
+ var item = items[i];
+ this.moveItem(sourceComponent, targetComponent, item);
+ }
+ }
},
moveItem : function(sourceComponent, targetComponent, item) {
- addItem(targetComponent, item);
- removeItem(sourceComponent, item);
+ if (!(item instanceof Richfaces.SelectItem)) {
+ item = sourceComponent.getSelectItemByNode(item);
+ }
+ this.addItem(targetComponent, item);
+ this.removeItem(sourceComponent, item);
},
removeItem : function(component, item) {
var items = component.shuttleItems;
var selectedItems = component.selectedItems;
+ selectedItems.remove(item._node);
items.remove(item);
- selectedItems.remove(item);
if (item == component.activeItem) {
component.activeItem == null;
}
},
addItem : function(component, item) {
- var newItem = Object.clone(item);
- component.shuttleItems.push(newItem);
+ //var newItem = Object.clone(item);
+ Richfaces.SelectItems.doNormal(item._node);
+ component.shuttleTbody.insertBefore(item._node, null);
+ component.shuttleItems.push(item);
},
}
@@ -100,6 +109,6 @@
Richfaces.ListShuttle.HANDLERS = {
copy: function (e) { this.moveItem(this.sourceList, this.targetList, this.sourceList.selectedItems); return false; },
copyAll: function (e) { this.moveItems(this.sourceList, this.targetList, this.sourceList.shuttleItems); return false; },
- remove: function (e) { this.moveItem(this.targetList, this.sourceList, this.targetList.selectedItems); return false; },
+ remove: function (e) { this.moveItems(this.targetList, this.sourceList, this.targetList.selectedItems); return false; },
removeAll: function (e) { this.moveItems(this.targetList, this.sourceList, this.targetList.shuttleItems); return false; }
};
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4210 - in branches/3.1.x/sandbox/ui/listShuttle/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 13:58:38 -0500 (Thu, 22 Nov 2007)
New Revision: 4210
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
controls for shuttle
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 18:23:14 UTC (rev 4209)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 18:58:38 UTC (rev 4210)
@@ -11,16 +11,16 @@
this.sourceList = sourceList;
this.controlList = new Array();
- this.initControlList(controlIds);
+ this.initControlList(clientId, controlIds);
},
- initControlList : function(ids) {
+ initControlList : function(clientId, ids) {
for (var i = 0; i < ids.length; i++) {
var id = ids[i];
- var node = document.getElementById(clientId + id[0]);
- var disNode = document.getElementById(clientId + id[1]);
+ var node = $(clientId + id[0]);
+ var disNode = $(clientId + id[1]);
if (node && disNode) {
- Shuttle.addClickListener(node, Richfaces.ListShuttle.HANDLERS[id[0]].bindAsEventListener(this));
+ node.observe("click", Richfaces.ListShuttle.HANDLERS[id[0]].bindAsEventListener(this));
this.controlList[i] = new Control(node, disNode, false, false, id[0]);
}
}
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 18:23:14 UTC (rev 4209)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 18:58:38 UTC (rev 4210)
@@ -29,7 +29,7 @@
<table id="#{clientId}">
<tr>
<td>
- <div style="display:inline;" id="#{clientId}sourceList" x:passThruWithExclusions="id,style">
+ <div id="#{clientId}sourceList" x:passThruWithExclusions="id">
<input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
<input id="#{clientId}valueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
@@ -63,17 +63,17 @@
</div>
</td>
<td>
- <a id="#{clientId}copy" href="#">copy</a>
- <a id="#{clientId}disCopy" href="#">dcopy</a>
- <a id="#{clientId}copyAll" href="#">copyAll</a>
- <a id="#{clientId}disCopyAll" href="#">dcopyAll</a>
- <a id="#{clientId}remove" href="#">remove</a>
- <a id="#{clientId}disRemove" href="#">dremove</a>
- <a id="#{clientId}removeAll" href="#">removeAll</a>
+ <a id="#{clientId}copy" href="#">copy</a><br/>
+ <a id="#{clientId}disCopy" href="#">dcopy</a><br/>
+ <a id="#{clientId}copyAll" href="#">copyAll</a><br/>
+ <a id="#{clientId}disCopyAll" href="#">dcopyAll</a><br/>
+ <a id="#{clientId}remove" href="#">remove</a><br/>
+ <a id="#{clientId}disRemove" href="#">dremove</a><br/>
+ <a id="#{clientId}removeAll" href="#">removeAll</a><br/>
<a id="#{clientId}disRemoveAll" href="#">dremoveAll</a>
</td>
<td>
- <div id="#{clientId}targetList" style="display:inline-block;" x:passThruWithExclusions="id,style">
+ <div id="#{clientId}targetList" x:passThruWithExclusions="id">
<input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
<input id="#{clientId}tlValueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
@@ -103,14 +103,14 @@
</td>
<td class="ol_center_button_col_valign">
<div class="ol_button_layout">
- <a id="#{clientId}first" href="#">top</a>
- <a id="#{clientId}disfirst" href="#">disTop</a>
- <a id="#{clientId}up" href="#">up</a>
- <a id="#{clientId}disUp" href="#">disUp</a>
- <a id="#{clientId}down" href="#">down</a>
- <a id="#{clientId}disDown" href="#">disDown</a>
- <a id="#{clientId}last" href="#">bottom</a>
- <a id="#{clientId}dislast" href="#">disBottom</a>
+ <a id="#{clientId}targetListfirst" href="#">top</a><br/>
+ <a id="#{clientId}targetListdisfirst" href="#">disTop</a><br/>
+ <a id="#{clientId}targetListup" href="#">up</a><br/>
+ <a id="#{clientId}targetListdisup" href="#">disUp</a><br/>
+ <a id="#{clientId}targetListdown" href="#">down</a><br/>
+ <a id="#{clientId}targetListdisdown" href="#">disDown</a><br/>
+ <a id="#{clientId}targetListlast" href="#">bottom</a><br/>
+ <a id="#{clientId}targetListdislast" href="#">disBottom</a>
</div>
</td>
</tr>
@@ -132,10 +132,11 @@
document.body.onselectstart = function() {return false;};
document.body.className = "body";
function init() {
- var cotrolsIdPrefix = [['copy', 'disCopy'], ['copyAll', 'disCopyAll'], ['remove', 'disRemove'], ['removeAll','disRemoveAll']];
- var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}targetList', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
- new Richfaces.ListBase('#{cId}sourceList', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', '#{cId}tlValueKeeper', cotrolsIdPrefix, '#{cId}tlSortLabel', function() {#{component.attributes['onorderchanged']}}),
- "#{cId}", cotrolsIdPrefix);
+ var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
+ var listShuttleCotrolsIdPrefix = [['copy', 'disCopy'], ['copyAll', 'disCopyAll'], ['remove', 'disRemove'], ['removeAll','disRemoveAll']];
+ var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}targetList', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', '#{cId}tlValueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
+ new Richfaces.ListBase('#{cId}sourceList', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper'),
+ "#{cId}", listShuttleCotrolsIdPrefix);
var sourceLayoutManager = new LayoutManager('#{cId}internal_header_tab', '#{cId}internal_tab');
var targetLayoutManager = new LayoutManager('#{cId}tlInternal_header_tab', '#{cId}tlInternal_tab');
sourceLayoutManager.widthSynchronization();
18 years, 5 months
JBoss Rich Faces SVN: r4209 - branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 13:23:14 -0500 (Thu, 22 Nov 2007)
New Revision: 4209
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
controls for shuttle
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 18:21:18 UTC (rev 4208)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 18:23:14 UTC (rev 4209)
@@ -132,7 +132,7 @@
document.body.onselectstart = function() {return false;};
document.body.className = "body";
function init() {
- var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
+ var cotrolsIdPrefix = [['copy', 'disCopy'], ['copyAll', 'disCopyAll'], ['remove', 'disRemove'], ['removeAll','disRemoveAll']];
var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}targetList', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
new Richfaces.ListBase('#{cId}sourceList', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', '#{cId}tlValueKeeper', cotrolsIdPrefix, '#{cId}tlSortLabel', function() {#{component.attributes['onorderchanged']}}),
"#{cId}", cotrolsIdPrefix);
18 years, 5 months
JBoss Rich Faces SVN: r4208 - branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 13:21:18 -0500 (Thu, 22 Nov 2007)
New Revision: 4208
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
controls for shuttle
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 18:14:23 UTC (rev 4207)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 18:21:18 UTC (rev 4208)
@@ -14,6 +14,7 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
scripts/extend.js,
+ scripts/ShuttleUtils.js
scripts/SelectItem.js,
scripts/LayoutManager.js
scripts/Control.js,
@@ -25,78 +26,100 @@
<f:clientId var="clientId"/>
<vcp:body>
<f:clientId var="clientId"/>
- <div id="#{clientId}" style="display:inline;">
- <div id="#{clientId}sourceList" x:passThruWithExclusions="id">
- <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
- <input id="#{clientId}valueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
-
- <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="ol_body">
- <tbody>
- <tr>
- <td class="ol_caption">
- <f:call name="encodeSLCaption"/>
- </td>
- </tr>
- <tr>
- <td>
- <div id="#{clientId}headerBox" class="ol_list ol_outputlist">
- <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
- <table id="#{clientId}internal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
- <f:call name="encodeSLHeader"/>
- </table>
- </div>
- <div id="#{clientId}contentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
- <table id="#{clientId}internal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tbody">
- <f:call name="encodeSLRows" />
- </tbody>
- </table>
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div id="#{clientId}targetList" x:passThruWithExclusions="id">
- <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
- <input id="#{clientId}tlValueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
-
- <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="ol_body">
- <tbody>
- <tr>
- <td colspan="2" class="ol_caption">
- <f:call name="encodeTLCaption"/>
- </td>
- </tr>
- <tr>
- <td>
- <div id="#{clientId}tlHeaderBox" class="ol_list ol_outputlist">
- <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
- <table id="#{clientId}tlInternal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
- <f:call name="encodeTLHeader"/>
- </table>
- </div>
- <div id="#{clientId}tlContentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
- <table id="#{clientId}tlInternal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tlTbody">
- <f:call name="encodeTLRows" />
- </tbody>
- </table>
- </div>
- </div>
- </td>
- <td class="ol_center_button_col_valign">
- <div class="ol_button_layout">
- <f:call name="encodeTLControlsFacets" />
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
+ <table id="#{clientId}">
+ <tr>
+ <td>
+ <div style="display:inline;" id="#{clientId}sourceList" x:passThruWithExclusions="id,style">
+ <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+ <input id="#{clientId}valueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
+
+ <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="ol_body">
+ <tbody>
+ <tr>
+ <td class="ol_caption">
+ <f:call name="encodeSLCaption"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="#{clientId}headerBox" class="ol_list ol_outputlist">
+ <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
+ <table id="#{clientId}internal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
+ <f:call name="encodeSLHeader"/>
+ </table>
+ </div>
+ <div id="#{clientId}contentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
+ <table id="#{clientId}internal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tbody">
+ <f:call name="encodeSLRows" />
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ <td>
+ <a id="#{clientId}copy" href="#">copy</a>
+ <a id="#{clientId}disCopy" href="#">dcopy</a>
+ <a id="#{clientId}copyAll" href="#">copyAll</a>
+ <a id="#{clientId}disCopyAll" href="#">dcopyAll</a>
+ <a id="#{clientId}remove" href="#">remove</a>
+ <a id="#{clientId}disRemove" href="#">dremove</a>
+ <a id="#{clientId}removeAll" href="#">removeAll</a>
+ <a id="#{clientId}disRemoveAll" href="#">dremoveAll</a>
+ </td>
+ <td>
+ <div id="#{clientId}targetList" style="display:inline-block;" x:passThruWithExclusions="id,style">
+ <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+ <input id="#{clientId}tlValueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
+
+ <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="ol_body">
+ <tbody>
+ <tr>
+ <td colspan="2" class="ol_caption">
+ <f:call name="encodeTLCaption"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="#{clientId}tlHeaderBox" class="ol_list ol_outputlist">
+ <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
+ <table id="#{clientId}tlInternal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
+ <f:call name="encodeTLHeader"/>
+ </table>
+ </div>
+ <div id="#{clientId}tlContentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
+ <table id="#{clientId}tlInternal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tlTbody">
+ <f:call name="encodeTLRows" />
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td class="ol_center_button_col_valign">
+ <div class="ol_button_layout">
+ <a id="#{clientId}first" href="#">top</a>
+ <a id="#{clientId}disfirst" href="#">disTop</a>
+ <a id="#{clientId}up" href="#">up</a>
+ <a id="#{clientId}disUp" href="#">disUp</a>
+ <a id="#{clientId}down" href="#">down</a>
+ <a id="#{clientId}disDown" href="#">disDown</a>
+ <a id="#{clientId}last" href="#">bottom</a>
+ <a id="#{clientId}dislast" href="#">disBottom</a>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
</vcp:body>
<f:clientId var="cId"/>
<script type="text/javascript">
18 years, 5 months