details: /erp/devel/pi/rev/e3c01207c07b
changeset: 9412:e3c01207c07b
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 14:51:43 2010 +0100
summary: Related to search field implementation
details: /erp/devel/pi/rev/2e422891f487
changeset: 9413:2e422891f487
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 14:53:11 2010 +0100
summary: Implemented link button component in ob-grid, changed
OBGridLinkField to OBGridLinkButton incl. its styles
details: /erp/devel/pi/rev/0c7e309a7233
changeset: 9414:0c7e309a7233
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 14:58:40 2010 +0100
summary: Upgraded weld to cr1
details: /erp/devel/pi/rev/8b300083866c
changeset: 9415:8b300083866c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 14:59:06 2010 +0100
summary: Implemented link functionality in querylist
details: /erp/devel/pi/rev/a26f5d98adaa
changeset: 9416:a26f5d98adaa
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 14:59:43 2010 +0100
summary: Upgraded weld to cr1
details: /erp/devel/pi/rev/473c74bfe603
changeset: 9417:473c74bfe603
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 14:59:52 2010 +0100
summary: Upgraded weld to cr1
details: /erp/devel/pi/rev/3862a5fa9cea
changeset: 9418:3862a5fa9cea
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 14:59:59 2010 +0100
summary: Upgraded weld to cr1
details: /erp/devel/pi/rev/699e50cead36
changeset: 9419:699e50cead36
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 15:00:08 2010 +0100
summary: Upgraded weld to cr1
details: /erp/devel/pi/rev/a54517e0a3f5
changeset: 9420:a54517e0a3f5
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Dec 27 15:02:44 2010 +0100
summary: merged
diffstat:
modules/org.openbravo.base.weld/lib/runtime/cdi-api.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-api-1.1.Beta2.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-api.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-core-1.1.0.Beta2.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-core.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core-1.1.0.Beta2.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-spi-1.1.Beta2.jar
| 0
modules/org.openbravo.base.weld/lib/runtime/weld-spi.jar
| 0
modules/org.openbravo.base.weld/lib/test/weld-se-core-1.1.0.Beta2.jar
| 0
modules/org.openbravo.base.weld/src/META-INF/beans.xml
| 2 +-
modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl
| 4 +
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFormComponent.java
| 5 +
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
| 61
+++++++++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 8 +-
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
| 24 +-
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.js
| 4 +-
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
| 1 +
src-wad/src/org/openbravo/wad/Wad.java
| 7 +-
src/org/openbravo/erpCommon/utility/Menu_data.xsql
| 3 +-
src/org/openbravo/erpCommon/utility/Utility.java
| 5 +
src/org/openbravo/erpCommon/utility/VerticalMenu.java
| 3 +-
22 files changed, 101 insertions(+), 26 deletions(-)
diffs (truncated from 307 to 300 lines):
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/cdi-api.jar
Binary file modules/org.openbravo.base.weld/lib/runtime/cdi-api.jar has changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-api-1.1.Beta2.jar
Binary file modules/org.openbravo.base.weld/lib/runtime/weld-api-1.1.Beta2.jar
has changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-api.jar
Binary file modules/org.openbravo.base.weld/lib/runtime/weld-api.jar has changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-core-1.1.0.Beta2.jar
Binary file
modules/org.openbravo.base.weld/lib/runtime/weld-core-1.1.0.Beta2.jar has
changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-core.jar
Binary file modules/org.openbravo.base.weld/lib/runtime/weld-core.jar has
changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core-1.1.0.Beta2.jar
Binary file
modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core-1.1.0.Beta2.jar
has changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core.jar
Binary file modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core.jar
has changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-spi-1.1.Beta2.jar
Binary file modules/org.openbravo.base.weld/lib/runtime/weld-spi-1.1.Beta2.jar
has changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/runtime/weld-spi.jar
Binary file modules/org.openbravo.base.weld/lib/runtime/weld-spi.jar has changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/lib/test/weld-se-core-1.1.0.Beta2.jar
Binary file
modules/org.openbravo.base.weld/lib/test/weld-se-core-1.1.0.Beta2.jar has
changed
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.base.weld/src/META-INF/beans.xml
--- a/modules/org.openbravo.base.weld/src/META-INF/beans.xml Mon Dec 27
13:43:16 2010 +0100
+++ b/modules/org.openbravo.base.weld/src/META-INF/beans.xml Mon Dec 27
15:02:44 2010 +0100
@@ -35,7 +35,7 @@
<weld:exclude name="org.openbravo.authentication.**"/>
<weld:exclude name="org.openbravo.**.ad_*.**"/>
<weld:exclude name="org.openbravo.**.test.**">
- <weld:if-class-available
name="!org.junit.runners.BlockJUnit4ClassRunner"/>
+ <weld:if-class-available
name="!org.jboss.ejb3.api.spi.EJBContainerWrapper"/>
</weld:exclude>
</weld:scan>
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl
Mon Dec 27 13:43:16 2010 +0100
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl
Mon Dec 27 15:02:44 2010 +0100
@@ -32,6 +32,10 @@
startRow: ${fieldDefinition.startRow},
endRow: ${fieldDefinition.endRow},
width: '*',
+ <#if fieldDefinition.searchField>
+ displayField: '${fieldDefinition.name?js_string}._identifier',
+ valueField: '${fieldDefinition.name?js_string}',
+ </#if>
<#else>
type: 'OBSectionItem',
sectionExpanded: true,
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFormComponent.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFormComponent.java
Mon Dec 27 13:43:16 2010 +0100
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFormComponent.java
Mon Dec 27 15:02:44 2010 +0100
@@ -30,6 +30,7 @@
import org.openbravo.client.kernel.BaseTemplateComponent;
import org.openbravo.client.kernel.KernelUtils;
import org.openbravo.client.kernel.Template;
+import org.openbravo.client.kernel.reference.FKSearchUIDefinition;
import org.openbravo.client.kernel.reference.UIDefinition;
import org.openbravo.client.kernel.reference.UIDefinitionController;
import org.openbravo.dal.service.OBDal;
@@ -149,6 +150,10 @@
private String label;
private UIDefinition uiDefinition;
+ public boolean isSearchField() {
+ return uiDefinition instanceof FKSearchUIDefinition;
+ }
+
public String getType() {
return getUIDefinition().getName();
}
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Mon Dec 27 13:43:16 2010 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Mon Dec 27 15:02:44 2010 +0100
@@ -23,7 +23,54 @@
// The OBGrid combines common grid functionality usefull for different
// grid implementations.
isc.OBGrid.addProperties({
-
+
+ recordComponentPoolingMode: 'recycle',
+ showRecordComponentsByCell: true,
+ recordComponentPosition: 'within',
+ poolComponentsPerColumn: true,
+ showRecordComponents: true,
+
+ createRecordComponent: function(record, colNum){
+ var field = this.getField(colNum);
+ if (field.isLink && record[field.name]) {
+ var linkButton = isc.OBGridLinkButton.create({
+ grid: this,
+ title: record[field.name],
+ record: record,
+ rowNum: this.getRecordIndex(record),
+ colNum: colNum
+ });
+ return linkButton;
+ }
+ return null;
+ },
+
+ updateRecordComponent: function(record, colNum, component, recordChanged){
+ var field = this.getField(colNum);
+ if (field.isLink && record[field.name]) {
+ component.setTitle(record[field.name]);
+ component.record = record;
+ component.rowNum = this.getRecordIndex(record);
+ component.colNum = colNum;
+ return component;
+ }
+ return null;
+ },
+
+ initWidget: function(){
+ // prevent the value to be displayed in case of a link
+ var i, field, formatCellValueFunction = function(value, record, rowNum,
colNum, grid){
+ return '';
+ };
+ for (i = 0; i < this.fields.length; i++) {
+ field = this.fields[i];
+ if (field.isLink) {
+ field.formatCellValue = formatCellValueFunction;
+ }
+ }
+ return this.Super('initWidget', arguments);
+ },
+
// = exportData =
// The exportData function exports the data of the grid to a file. The user
will
// be presented with a save-as dialog.
@@ -56,7 +103,7 @@
if (field.summaryFunction === "sum" && this.summaryRowStyle_sum) {
return this.summaryRowStyle_sum;
} else if (field.summaryFunction === "avg" && this.summaryRowStyle_avg) {
- return this.summaryRowStyle_avg
+ return this.summaryRowStyle_avg;
} else if (this.summaryRowStyle_other) {
return this.summaryRowStyle_other;
} else {
@@ -67,4 +114,12 @@
isc.ClassFactory.defineClass('OBGridHeaderImgButton', isc.ImgButton);
-isc.ClassFactory.defineClass('OBGridLinkField', isc.Button);
\ No newline at end of file
+isc.ClassFactory.defineClass('OBGridLinkButton', isc.Button);
+isc.OBGridLinkButton.addProperties({
+
+ action: function(){
+ if (this.grid && this.grid.cellClick) {
+ this.grid.cellClick(this.record, this.rowNum, this.colNum);
+ }
+ }
+});
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Mon Dec 27 13:43:16 2010 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Mon Dec 27 15:02:44 2010 +0100
@@ -946,9 +946,11 @@
for (var i=0; i<properties.length; i++){
var value = record[properties[i].property];
- allProperties[properties[i].column] = value;
- if (properties[i].sessionProperty){
- sessionProperties[properties[i].column] = value;
+ if (typeof value !== 'undefined') {
+ allProperties[properties[i].column] = value;
+ if (properties[i].sessionProperty) {
+ sessionProperties[properties[i].column] = value;
+ }
}
}
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
---
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
Mon Dec 27 13:43:16 2010 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.css
Mon Dec 27 15:02:44 2010 +0100
@@ -183,31 +183,31 @@
}
-.OBGridLinkField,
-.OBGridLinkFieldOver,
-.OBGridLinkFieldDown,
-.OBGridLinkFieldFocused,
-.OBGridLinkFieldFocusedOver,
-.OBGridLinkFieldFocusedDown {
+.OBGridLinkButton,
+.OBGridLinkButtonOver,
+.OBGridLinkButtonDown,
+.OBGridLinkButtonFocused,
+.OBGridLinkButtonFocusedOver,
+.OBGridLinkButtonFocusedDown {
font-family: arial, sans-serif;
vertical-align: middle;
background: transparent;
padding: 0px 4px 2px 4px;
}
-.OBGridLinkField,
-.OBGridLinkFieldFocused {
+.OBGridLinkButton,
+.OBGridLinkButtonFocused {
color: #00A651;
}
-.OBGridLinkFieldOver {
+.OBGridLinkButtonOver {
color: #00A651;
text-decoration: underline;
}
-.OBGridLinkFieldDown,
-.OBGridLinkFieldFocusedOver,
-.OBGridLinkFieldFocusedDown {
+.OBGridLinkButtonDown,
+.OBGridLinkButtonFocusedOver,
+.OBGridLinkButtonFocusedDown {
color: #004E27;
text-decoration: underline;
}
\ No newline at end of file
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.js
Mon Dec 27 13:43:16 2010 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-grid-styles.js
Mon Dec 27 15:02:44 2010 +0100
@@ -122,8 +122,8 @@
align: 'center'
});
-isc.OBGridLinkField.addProperties({
- baseStyle: 'OBGridLinkField',
+isc.OBGridLinkButton.addProperties({
+ baseStyle: 'OBGridLinkButton',
showDown: true,
showFocused: true,
showFocusedAsOver: true,
diff -r 099b47520e74 -r a54517e0a3f5
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
---
a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
Mon Dec 27 13:43:16 2010 +0100
+++
b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
Mon Dec 27 15:02:44 2010 +0100
@@ -63,6 +63,7 @@
field.put("type", uiDefinition.getName());
if (column.isHasLink()) {
field.put("OB_HasLink", true);
+ field.put("isLink", true);
field.put("OB_LinkExpression", column.getLinkExpression());
final Tab tab = column.getTab();
final Entity entity =
ModelProvider.getInstance().getEntity(tab.getTable().getName());
diff -r 099b47520e74 -r a54517e0a3f5 src-wad/src/org/openbravo/wad/Wad.java
--- a/src-wad/src/org/openbravo/wad/Wad.java Mon Dec 27 13:43:16 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/Wad.java Mon Dec 27 15:02:44 2010 +0100
@@ -737,8 +737,9 @@
ArrayList<WadData> servlets = new ArrayList<WadData>();
for (WadData tab : allTabs) {
String tabClassName = "org.openbravo.erpWindows."
- + ("0".equals(tab.windowmodule) ? "" : tab.windowpackage) +
tab.windowname + "."
- + tab.tabname;
+ + ("0".equals(tab.windowmodule) ? "" : tab.windowpackage + ".") +
tab.windowname + "."
+ + tab.tabname + ("0".equals(tab.tabmodule) ? "" : tab.adTabId);
+
WadData servlet = new WadData();
servlet.displayname = tabClassName;
servlet.name = "W" + tab.adTabId;
@@ -760,7 +761,7 @@
ArrayList<WadData> mappings = new ArrayList<WadData>();
for (WadData tab : allTabs) {
String prefix = "/" + ("0".equals(tab.windowmodule) ? "" :
tab.windowpackage)
- + tab.windowname + "/" + tab.tabname;
+ + tab.windowname + "/" + tab.tabname + ("0".equals(tab.tabmodule) ?
"" : tab.adTabId);
WadData mapping = new WadData();
mapping.name = "W" + tab.adTabId;
diff -r 099b47520e74 -r a54517e0a3f5
src/org/openbravo/erpCommon/utility/Menu_data.xsql
--- a/src/org/openbravo/erpCommon/utility/Menu_data.xsql Mon Dec 27
13:43:16 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/Menu_data.xsql Mon Dec 27
15:02:44 2010 +0100
@@ -49,7 +49,8 @@
MW.AD_Module_ID as windowModule, MT.AD_Module_ID as tabModule,
MW.JAVAPACKAGE as windowPackage, MT.JAVAPACKAGE as tabPackage,
AD_MAPPING_FORMAT(to_char(w.name)) as windowName,
- AD_MAPPING_FORMAT(to_char(t.name)) as tabName
+ AD_MAPPING_FORMAT(to_char(t.name)) as tabName,
+ t.ad_tab_id
FROM AD_TREENODE tn,
(SELECT m.AD_Menu_ID, COALESCE(m_t.NAME, m.NAME) AS NAME,
COALESCE(m_t.DESCRIPTION, m.Description) AS DESCRIPTION,
m.IsSummary,m.Action, m.AD_Window_ID, m.AD_Process_ID,
diff -r 099b47520e74 -r a54517e0a3f5
src/org/openbravo/erpCommon/utility/Utility.java
--- a/src/org/openbravo/erpCommon/utility/Utility.java Mon Dec 27 13:43:16
2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/Utility.java Mon Dec 27 15:02:44
2010 +0100
@@ -2352,6 +2352,11 @@
url += tab.getWindow().getModule().getJavaPackage();
}
url += mappingFormat(tab.getWindow().getName()) + "/" +
mappingFormat(tab.getName());
+
+ if (!"0".equals(tab.getModule().getId())) {
+ url += tab.getId();
+ }
+
if ("R".equals(type)) {
url += "_Relation.html";
} else if ("X".equals(type)) {
diff -r 099b47520e74 -r a54517e0a3f5
src/org/openbravo/erpCommon/utility/VerticalMenu.java
--- a/src/org/openbravo/erpCommon/utility/VerticalMenu.java Mon Dec 27
13:43:16 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/VerticalMenu.java Mon Dec 27
15:02:44 2010 +0100
@@ -415,7 +415,8 @@
if (menuItem.mappingname.equals("")) {
if (menuItem.action.equals("W")) {
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits