details: /erp/devel/pi/rev/7114e9b28201
changeset: 9755:7114e9b28201
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Jan 13 07:09:42 2011 +0100
summary: Changed scrollto of linked items section
details: /erp/devel/pi/rev/56650fa197bf
changeset: 9756:56650fa197bf
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Jan 13 07:09:55 2011 +0100
summary: Solved jslint warning
details: /erp/devel/pi/rev/dbfec82c9bb1
changeset: 9757:dbfec82c9bb1
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Jan 13 07:10:14 2011 +0100
summary: Small change in how module dependency cycles are reported
diffstat:
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
| 5 +
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-linked-items.js
| 30 +++++++++-
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
| 10 ++-
3 files changed, 39 insertions(+), 6 deletions(-)
diffs (117 lines):
diff -r c6cdf4a358a7 -r dbfec82c9bb1
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
Thu Jan 13 07:06:26 2011 +0100
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
Thu Jan 13 07:10:14 2011 +0100
@@ -327,6 +327,11 @@
private String command;
public String getLabel() {
+ // this type of escaping not needed for javascript
+ // gives jslint warnings
+ if (label.contains("\\>")) {
+ return label.replace("\\>", ">");
+ }
return label;
}
diff -r c6cdf4a358a7 -r dbfec82c9bb1
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-linked-items.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-linked-items.js
Thu Jan 13 07:06:26 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-linked-items.js
Thu Jan 13 07:10:14 2011 +0100
@@ -31,6 +31,7 @@
width: '100%',
height: '100%',
overflow: 'hidden',
+ canFocus: true,
// don't expand as a default
sectionExpanded: false,
@@ -43,7 +44,7 @@
init: function(){
// override the one passed in
- this.defaultValue = OB.I18N.getLabel('OBUIAPP_LinkedItemsTitle');
+ this.defaultValue = OB.I18N.getLabel('OBUIAPP_LinkedItemsTitle');
this.sectionExpanded = false;
// tell the form who we are
@@ -72,6 +73,18 @@
expandSection: function(){
var ret = this.Super('expandSection', arguments);
this.getLinkedItemPart().setExpanded(true);
+
+ // after doing the linked item section check if this
+ // can replace the scrollto below
+ // this.canvasItem.focusInItem();
+
+ // NOTE: if the layout structure changes then this needs to be
+ // changed probably to see where the scrollbar is to scroll
+
+ // call with a small delay to let the item be expanded
+ // form.parentElement is the one holding the scrollbar apparently
+ this.form.parentElement.delayCall('scrollToBottom', null, 200);
+
return ret;
},
@@ -81,7 +94,7 @@
}
});
-isc.ClassFactory.defineClass('OBLinkedItemLayout', isc.HLayout);
+isc.ClassFactory.defineClass('OBLinkedItemLayout', isc.VLayout);
isc.OBLinkedItemLayout.addProperties({
@@ -108,6 +121,11 @@
return ret;
},
+ // never disable this item
+ isDisabled: function(){
+ return false;
+ },
+
getForm: function(){
return this.canvasItem.form;
},
@@ -163,5 +181,11 @@
// pointer back to this item: canvasItem
// for setting more properties use canvasProperties, etc. see
// the docs
- canvasConstructor: 'OBLinkedItemLayout'
+ canvasConstructor: 'OBLinkedItemLayout',
+
+ // never disable this one
+ isDisabled: function(){
+ return false;
+ }
+
});
diff -r c6cdf4a358a7 -r dbfec82c9bb1
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
Thu Jan 13 07:06:26 2011 +0100
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
Thu Jan 13 07:10:14 2011 +0100
@@ -183,11 +183,14 @@
if (module.getId().equals("0")) {
return 0;
}
- // have been here, go away, with a high number
+ // have been here, go away, with a signal number that there is a loop
// infinite loop
if (modules.contains(module)) {
- log.warn("Cyclic relation in module dependencies of module " + module);
- return 100;
+ log.error("Cyclic relation in module dependencies of module " + module);
+ for (Module moduleCycle : modules) {
+ log.error(moduleCycle.getName());
+ }
+ throw new OBException("Cycle detected in module dependencies");
}
modules.add(module);
int currentLevel = 0;
@@ -197,6 +200,7 @@
currentLevel = computedLevel;
}
}
+ modules.remove(module);
return currentLevel;
}
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits