Skipping clearing of messages/errors if they haven't been open long enough to read.
This commit is contained in:
parent
99b2cd95f7
commit
9fed61aae1
4
NEWS
4
NEWS
|
@ -1,3 +1,7 @@
|
||||||
|
1.4.22:
|
||||||
|
* Skipping clearing of messages/errors if they haven't been open long enough
|
||||||
|
to read.
|
||||||
|
|
||||||
1.4.21: July 30, 2008:
|
1.4.21: July 30, 2008:
|
||||||
* Fixed bug in IE 7 in which there was too much horizontal spacing at very
|
* Fixed bug in IE 7 in which there was too much horizontal spacing at very
|
||||||
wide resolutions.
|
wide resolutions.
|
||||||
|
|
|
@ -2257,6 +2257,7 @@ Wiki.prototype.display_message = function ( text, nodes, position_after ) {
|
||||||
|
|
||||||
var div = DIV( { "class": "message" }, inner_div );
|
var div = DIV( { "class": "message" }, inner_div );
|
||||||
div.nodes = nodes;
|
div.nodes = nodes;
|
||||||
|
div.init_time = new Date();
|
||||||
|
|
||||||
if ( position_after )
|
if ( position_after )
|
||||||
insertSiblingNodesAfter( position_after, div )
|
insertSiblingNodesAfter( position_after, div )
|
||||||
|
@ -2297,6 +2298,7 @@ Wiki.prototype.display_error = function ( text, nodes, position_after ) {
|
||||||
|
|
||||||
var div = DIV( { "class": "error" }, inner_div );
|
var div = DIV( { "class": "error" }, inner_div );
|
||||||
div.nodes = nodes;
|
div.nodes = nodes;
|
||||||
|
div.init_time = new Date();
|
||||||
|
|
||||||
if ( position_after )
|
if ( position_after )
|
||||||
insertSiblingNodesAfter( position_after, div )
|
insertSiblingNodesAfter( position_after, div )
|
||||||
|
@ -2323,6 +2325,11 @@ Wiki.prototype.clear_messages = function () {
|
||||||
|
|
||||||
for ( var i in results ) {
|
for ( var i in results ) {
|
||||||
var result = results[ i ];
|
var result = results[ i ];
|
||||||
|
|
||||||
|
// only close the message if it's been open at least a quarter second
|
||||||
|
if ( new Date() - result.init_time < 250 )
|
||||||
|
continue
|
||||||
|
|
||||||
blindUp( result, options = { "duration": 0.25, afterFinish: function () {
|
blindUp( result, options = { "duration": 0.25, afterFinish: function () {
|
||||||
try {
|
try {
|
||||||
for ( var j in result.nodes )
|
for ( var j in result.nodes )
|
||||||
|
@ -2336,6 +2343,10 @@ Wiki.prototype.clear_messages = function () {
|
||||||
|
|
||||||
for ( var i in results ) {
|
for ( var i in results ) {
|
||||||
var result = results[ i ];
|
var result = results[ i ];
|
||||||
|
|
||||||
|
if ( new Date() - result.init_time < 250 )
|
||||||
|
continue
|
||||||
|
|
||||||
blindUp( result, options = { "duration": 0.25, afterFinish: function () {
|
blindUp( result, options = { "duration": 0.25, afterFinish: function () {
|
||||||
try {
|
try {
|
||||||
removeElement( result );
|
removeElement( result );
|
||||||
|
@ -2350,8 +2361,9 @@ Wiki.prototype.clear_pulldowns = function ( ephemeral_only ) {
|
||||||
for ( var i in results ) {
|
for ( var i in results ) {
|
||||||
var result = results[ i ];
|
var result = results[ i ];
|
||||||
|
|
||||||
// close the pulldown if it's been open at least a quarter second
|
// only close the pulldown if it's been open at least a quarter second
|
||||||
if ( new Date() - result.pulldown.init_time >= 250 ) {
|
if ( new Date() - result.pulldown.init_time < 250 )
|
||||||
|
continue
|
||||||
if ( ephemeral_only && !result.pulldown.ephemeral )
|
if ( ephemeral_only && !result.pulldown.ephemeral )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2359,7 +2371,6 @@ Wiki.prototype.clear_pulldowns = function ( ephemeral_only ) {
|
||||||
result.pulldown = null;
|
result.pulldown = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Wiki.prototype.delete_all_editors = function ( event ) {
|
Wiki.prototype.delete_all_editors = function ( event ) {
|
||||||
this.clear_messages();
|
this.clear_messages();
|
||||||
|
|
Reference in New Issue