r1733 - branches/bxe_2_0/js
[email protected] Tue, 14 Aug 2007 14:13:10 +0200 (CEST)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Tue Aug 14 14:13:09 2007
New Revision: 1733
Log:
show scrollbars on validation errors
Modified:
branches/bxe_2_0/js/bxeFunctions.js
branches/bxe_2_0/js/widget.js
Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js (original)
+++ branches/bxe_2_0/js/bxeFunctions.js Tue Aug 14 14:13:09 2007
@@ -2236,10 +2236,11 @@
function bxe_validationAlert(messages) {
var widg = mozilla.getWidgetModalBox(bxe_i18n.getText("Validation Alert"));
+
for (i in messages) {
widg.addText( messages[i]["text"] );
}
- widg.show((window.innerWidth- 500)/2,50, "fixed");
+ widg.show((window.innerWidth- 500)/2,50, "fixed",true);
}
function bxe_getDirPart(path) {
Modified: branches/bxe_2_0/js/widget.js
==============================================================================
--- branches/bxe_2_0/js/widget.js (original)
+++ branches/bxe_2_0/js/widget.js Tue Aug 14 14:13:09 2007
@@ -45,28 +45,30 @@
this.Display = "inline";
return node;
}
-Widget.prototype.draw = function (display) {
+Widget.prototype.draw = function (display, noMaxHeight) {
if (display) {
this.node.style.display = display;
} else {
this.node.style.display = this.Display;
}
- this.fixOffscreenPosition();
+ this.fixOffscreenPosition(noMaxHeight);
}
-Widget.prototype.fixOffscreenPosition = function() {
+Widget.prototype.fixOffscreenPosition = function(noMaxHeight) {
var bottom = (this.node.offsetTop + this.node.offsetHeight);
this.node.style.maxHeight = window.innerHeight + 'px';
if (bottom > (window.innerHeight + window.scrollY)) {
this.node.style.top = (this.node.offsetTop - (bottom - (window.innerHeight + window.scrollY))) + "px";
}
-
if (this.node.offsetTop < 0) {
this.node.style.top = 0 + 'px';
this.node.style.overflow = 'auto';
+ } else if (noMaxHeight) {
+ this.node.style.overflowY = 'auto';
+ this.node.style.overflowX = 'hidden';
} else {
this.node.style.overflow = 'hidden';
}
@@ -1225,7 +1227,7 @@
}
-Widget_ModalBox.prototype.show = function(x,y, position) {
+Widget_ModalBox.prototype.show = function(x,y, position,noMaxHeight) {
try {
if (this.hasTable) {
var subm = document.createElement("input");
@@ -1277,7 +1279,7 @@
if (!position) { position = "absolute";};
this.position(x,y, position);
- this.draw();
+ this.draw(null,noMaxHeight);
}
catch (e) { bxe_catch_alert(e);}
bxe_deregisterKeyHandlers();
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs