IDEMPIERE-369 Master Detail layout improvements. Improve Firefox compatibility. Still some layout issue but at least it run now.

This commit is contained in:
Heng Sin Low 2012-10-10 17:08:50 +08:00
parent 0bca8c738b
commit 273887a8f6
3 changed files with 29 additions and 1 deletions

View File

@ -38,6 +38,7 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
<javascript src="/js/persist-min.js" charset="UTF-8"/>
<javascript src="/js/token.js" charset="UTF-8"/>
<javascript src="/js/window.js" charset="UTF-8"/>
<javascript src="/js/jquery-patch.js" charset="UTF-8"/>
<javascript package="jawwa.atmosphere" merge="false" />

View File

@ -25,7 +25,7 @@
<!-- change to false to use compress js which is much smaller -->
<client-config>
<debug-js>false</debug-js>
<debug-js>true</debug-js>
<processing-prompt-delay>500</processing-prompt-delay>
</client-config>

27
org.adempiere.ui.zk/js/jquery-patch.js vendored Normal file
View File

@ -0,0 +1,27 @@
//patch for jquery bug under firefox
(function(undefined) {
var rupper = /([A-Z]|^ms)/g;
if ( document.defaultView && document.defaultView.getComputedStyle ) {
getComputedStyle = function( elem, name ) {
var ret, defaultView, computedStyle;
//added try catch for firefox
try {
name = name.replace( rupper, "-$1" ).toLowerCase();
if ( !(defaultView = elem.ownerDocument.defaultView) ) {
return undefined;
}
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name );
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
ret = jQuery.style( elem, name );
}
}
} catch (err) {}
return ret;
};
}
})();