[fusion-commits] r1604 - in trunk: lib widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Oct 23 10:20:59 EDT 2008
Author: pagameba
Date: 2008-10-23 10:20:59 -0400 (Thu, 23 Oct 2008)
New Revision: 1604
Modified:
trunk/lib/jxlib.uncompressed.js
trunk/widgets/CursorPosition.js
Log:
Re #115. Update Jx to get a bug fix for dialog z index stuff, adjust cursor position widget to have a proper default value.
Modified: trunk/lib/jxlib.uncompressed.js
===================================================================
--- trunk/lib/jxlib.uncompressed.js 2008-10-23 13:11:43 UTC (rev 1603)
+++ trunk/lib/jxlib.uncompressed.js 2008-10-23 14:20:59 UTC (rev 1604)
@@ -10513,7 +10513,7 @@
*/
if (!Jx.Dialog.Stack) {
Jx.Dialog.Stack = [];
- Jx.Dialog.ZIndex = [100];
+ Jx.Dialog.ZIndex = [];
}
this.isOpening = false;
@@ -10562,8 +10562,9 @@
handle: this.title,
onBeforeStart: (function(){
Jx.Dialog.Stack.erase(this).push(this);
+ var baseZIndex = Jx.Dialog.Stack[0].domObj.style.zIndex;
Jx.Dialog.Stack.each(function(d, i) {
- d.domObj.setStyle('zIndex',101+i);
+ d.domObj.setStyle('zIndex',baseZIndex+i);
});
}).bind(this),
onStart: (function() {
@@ -10628,8 +10629,9 @@
/* this adjusts the z-index of the dialogs when activated */
this.domObj.addEvent('mousedown', (function(){
Jx.Dialog.Stack.erase(this).push(this);
+ var baseZIndex = Jx.Dialog.Stack[0].domObj.style.zIndex;
Jx.Dialog.Stack.each(function(d, i) {
- d.domObj.setStyle('zIndex',101+i);
+ d.domObj.setStyle('zIndex',baseZIndex+i);
});
}).bind(this));
},
@@ -10708,6 +10710,9 @@
show : function( ) {
/* get the z-index right */
Jx.Dialog.Stack.push(this);
+ if (Jx.Dialog.ZIndex.length == 0) {
+ Jx.Dialog.ZIndex[0] = this.domObj.getStyle('z-index');
+ }
/* do the modal thing */
if (this.options.modal) {
this.blanket.setStyles({
@@ -10718,9 +10723,9 @@
}
/* display the dialog */
this.domObj.setStyles({
- 'zIndex': Jx.Dialog.ZIndex[0]++,
'display': 'block',
- 'visibility': 'hidden'
+ 'visibility': 'hidden',
+ 'z-index': Jx.Dialog.ZIndex[0]++
});
if (this.options.closed) {
var margin = this.domObj.getMarginSize();
@@ -10733,6 +10738,14 @@
this.contentContainer.resize({forceResize: true});
this.layoutContent();
this.firstShow = false;
+ /* if the chrome got built before the first dialog show, it might
+ * not have been properly created and we should clear it so it
+ * does get built properly
+ */
+ if (this.chrome) {
+ this.chrome.dispose();
+ this.chrome = null;
+ }
}
/* update or create the chrome */
this.showChrome(this.domObj);
Modified: trunk/widgets/CursorPosition.js
===================================================================
--- trunk/widgets/CursorPosition.js 2008-10-23 13:11:43 UTC (rev 1603)
+++ trunk/widgets/CursorPosition.js 2008-10-23 14:20:59 UTC (rev 1604)
@@ -72,7 +72,7 @@
this.domSpan.className = 'spanCursorPosition';
this.domSpan.innerHTML = this.emptyText;
this.emptyText = json.EmptyText ? json.EmptyText[0] :
- (this.domObj ? this.domObj.innerHTML : null);
+ (this.domObj ? this.domObj.innerHTML : '');
if (this.domObj) {
this.domObj.innerHTML = '';
this.domObj.appendChild(this.domSpan);
More information about the fusion-commits
mailing list