details: /erp/devel/pi/rev/e9887e3d41ff
changeset: 9340:e9887e3d41ff
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Dec 23 16:44:49 2010 +0100
summary: Changed yes/no form field to checkbox, start of SearchItem
implementation
details: /erp/devel/pi/rev/361bb98358e8
changeset: 9341:361bb98358e8
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Dec 23 16:45:18 2010 +0100
summary: Changed yes/no form field to checkbox, start of SearchItem
implementation
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
| 20 +++++
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/ico-to-new-tab.png
| 0
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/search_picker.png
| 0
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKSearchUIDefinition.java
| 39
++++++++++
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/YesNoUIDefinition.java
| 7 +-
5 files changed, 65 insertions(+), 1 deletions(-)
diffs (102 lines):
diff -r 0e7efa8fc09d -r 361bb98358e8
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Thu Dec 23 16:16:56 2010 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
Thu Dec 23 16:45:18 2010 +0100
@@ -18,6 +18,8 @@
*/
// = Form Item Widgets =
// Contains the following widgets:
+// * OBCheckBoxItem: yes/no item.
+// * OBSearchItem: item used for search fields.
// * OBFormButton: button used in forms.
// * OBTextItem: string/text item
// * OBTextAreaItem: string/text-area item
@@ -28,6 +30,24 @@
// * OBFKComboBoxItem: combo box for foreign key references
// * OBListComboBoxItem: combo box for list references
+// == OBCheckboxItem ==
+// Item used for Openbravo yes/no fields.
+isc.ClassFactory.defineClass('OBCheckboxItem', CheckboxItem);
+
+// == OBSearchItem ==
+// Item used for Openbravo search fields.
+isc.ClassFactory.defineClass('OBSearchItem', StaticTextItem);
+
+isc.OBSearchItem.addProperties({
+ showPickerIcon: true,
+ pickerIconHeight: 21,
+ pickerIconWidth: 21,
+ pickerIconSrc:
'[SKINIMG]../../org.openbravo.client.application/images/form/search_picker.png',
+ showPicker: function() {
+ this.openWindow();
+ }
+});
+
// == OBEncryptedItem ==
// The type used for encrypted items.
isc.ClassFactory.defineClass('OBEncryptedItem', isc.PasswordItem);
diff -r 0e7efa8fc09d -r 361bb98358e8
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/ico-to-new-tab.png
Binary file
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/ico-to-new-tab.png
has changed
diff -r 0e7efa8fc09d -r 361bb98358e8
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/search_picker.png
Binary file
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/images/form/search_picker.png
has changed
diff -r 0e7efa8fc09d -r 361bb98358e8
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKSearchUIDefinition.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKSearchUIDefinition.java
Thu Dec 23 16:45:18 2010 +0100
@@ -0,0 +1,39 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.1 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2010 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s): ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.client.kernel.reference;
+
+import org.openbravo.model.ad.ui.Field;
+
+/**
+ * Implementation of the foreign key ui definition which handles the classic
search references.
+ *
+ * @author mtaal
+ */
+public class FKSearchUIDefinition extends ForeignKeyUIDefinition {
+
+ @Override
+ public String getFormEditorType() {
+ return "OBSearchItem";
+ }
+
+ public String getFieldProperties(Field field) {
+ return getGridFieldProperties(field);
+ }
+
+}
diff -r 0e7efa8fc09d -r 361bb98358e8
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/YesNoUIDefinition.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/YesNoUIDefinition.java
Thu Dec 23 16:16:56 2010 +0100
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/YesNoUIDefinition.java
Thu Dec 23 16:45:18 2010 +0100
@@ -33,8 +33,13 @@
}
@Override
+ public String getFilterEditorType() {
+ return "OBYesNoItem";
+ }
+
+ @Override
public String getFormEditorType() {
- return "OBYesNoItem";
+ return "OBCheckboxItem";
}
@Override
------------------------------------------------------------------------------
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