582
+ − 1
// Message box and visual effect system
+ − 2
+ − 3
/**
+ − 4
* The ultimate message box framework for Javascript
+ − 5
* Syntax is (almost) identical to the MessageBox command in NSIS
+ − 6
* @param int type - a bitfield consisting of the MB_* constants
+ − 7
* @param string title - the blue text at the top of the window
+ − 8
* @param string text - HTML for the body of the message box
+ − 9
* Properties:
+ − 10
* onclick - an array of functions to be called on button click events
+ − 11
* NOTE: key names are to be strings, and they must be the value of the input, CaSe-SeNsItIvE
+ − 12
* onbeforeclick - same as onclick but called before the messagebox div is destroyed
+ − 13
* Methods:
+ − 14
* destroy: kills the running message box
+ − 15
* Example:
+ − 16
* var my_message = new MessageBox(MB_OK|MB_ICONSTOP, 'Error logging in', 'The username and/or password is incorrect. Please check the username and retype your password');
+ − 17
* my_message.onclick['OK'] = function() {
+ − 18
* document.getElementById('password').value = '';
+ − 19
* };
+ − 20
* Deps:
+ − 21
* Modern browser that supports DOM
+ − 22
* darken() and enlighten() (above)
+ − 23
* opacity() - required for darken() and enlighten()
+ − 24
* MB_* constants are defined in enano-lib-basic.js
+ − 25
*/
+ − 26
+ − 27
var mb_current_obj;
+ − 28
var mb_previously_had_darkener = false;
+ − 29
+ − 30
function MessageBox(type, title, message)
+ − 31
{
+ − 32
if ( !aclDisableTransitionFX )
+ − 33
{
+ − 34
load_component('flyin');
+ − 35
}
+ − 36
+ − 37
var y = getScrollOffset();
+ − 38
+ − 39
// Prevent multiple instances
+ − 40
if ( document.getElementById('messageBox') )
+ − 41
return;
+ − 42
+ − 43
if ( document.getElementById('specialLayer_darkener') )
+ − 44
if ( document.getElementById('specialLayer_darkener').style.display == 'block' )
+ − 45
mb_previously_had_darkener = true;
+ − 46
if ( !mb_previously_had_darkener )
+ − 47
darken(true);
+ − 48
if ( aclDisableTransitionFX )
+ − 49
{
+ − 50
document.getElementById('specialLayer_darkener').style.zIndex = '5';
+ − 51
}
+ − 52
var master_div = document.createElement('div');
694
43367c66d869
Couple of fixes (hacks) for Opera and the aftermath of that z-index change to darken() and enlighten() fadefilters; added ajaxOpenDirectACLRule() to placeholder list
Dan
diff
changeset
+ − 53
master_div.style.zIndex = getHighestZ() + 1;
582
+ − 54
var mydiv = document.createElement('div');
+ − 55
mydiv.style.height = '200px';
+ − 56
w = getWidth();
+ − 57
h = getHeight();
+ − 58
if ( aclDisableTransitionFX )
+ − 59
{
+ − 60
master_div.style.left = ((w / 2) - 200)+'px';
+ − 61
master_div.style.top = ((h / 2) + y - 120)+'px';
+ − 62
master_div.style.position = 'absolute';
+ − 63
}
+ − 64
else
+ − 65
{
+ − 66
master_div.style.top = '-10000px';
+ − 67
master_div.style.position = ( IE ) ? 'absolute' : 'fixed';
+ − 68
}
1091
+ − 69
z = ( aclDisableTransitionFX ) ? document.getElementById('specialLayer_darkener').style.zIndex + 1: getHighestZ() + 1;
582
+ − 70
mydiv.style.backgroundColor = '#FFFFFF';
+ − 71
mydiv.style.padding = '10px';
+ − 72
mydiv.style.marginBottom = '1px';
+ − 73
mydiv.id = 'messageBox';
+ − 74
mydiv.style.overflow = 'auto';
+ − 75
+ − 76
var buttondiv = document.createElement('div');
+ − 77
+ − 78
mydiv.style.width = '400px';
+ − 79
buttondiv.style.width = '400px';
+ − 80
+ − 81
w = getWidth();
+ − 82
h = getHeight();
+ − 83
if ( aclDisableTransitionFX )
+ − 84
{
+ − 85
//buttondiv.style.left = ((w / 2) - 200)+'px';
+ − 86
//buttondiv.style.top = ((h / 2) + y + 101)+'px';
+ − 87
}
+ − 88
//buttondiv.style.position = ( IE ) ? 'absolute' : 'fixed';
+ − 89
z = ( aclDisableTransitionFX ) ? document.getElementById('specialLayer_darkener').style.zIndex : getHighestZ();
+ − 90
buttondiv.style.backgroundColor = '#C0C0C0';
+ − 91
buttondiv.style.padding = '10px';
+ − 92
buttondiv.style.textAlign = 'right';
+ − 93
buttondiv.style.verticalAlign = 'middle';
+ − 94
buttondiv.id = 'messageBoxButtons';
+ − 95
+ − 96
this.clickHandler = function() { messagebox_click(this, mb_current_obj); };
+ − 97
+ − 98
if( ( type & MB_ICONINFORMATION || type & MB_ICONSTOP || type & MB_ICONQUESTION || type & MB_ICONEXCLAMATION ) && !(type & MB_ICONLOCK) )
+ − 99
{
+ − 100
mydiv.style.paddingLeft = '50px';
+ − 101
mydiv.style.width = '360px';
+ − 102
mydiv.style.backgroundRepeat = 'no-repeat';
+ − 103
mydiv.style.backgroundPosition = '8px 8px';
+ − 104
}
+ − 105
else if ( type & MB_ICONLOCK )
+ − 106
{
+ − 107
mydiv.style.paddingLeft = '50px';
+ − 108
mydiv.style.width = '360px';
+ − 109
mydiv.style.backgroundRepeat = 'no-repeat';
+ − 110
}
+ − 111
+ − 112
if(type & MB_ICONINFORMATION)
+ − 113
{
+ − 114
mydiv.style.backgroundImage = 'url(\''+scriptPath+'/images/info.png\')';
+ − 115
}
+ − 116
+ − 117
if(type & MB_ICONQUESTION)
+ − 118
{
+ − 119
mydiv.style.backgroundImage = 'url(\''+scriptPath+'/images/question.png\')';
+ − 120
}
+ − 121
+ − 122
if(type & MB_ICONSTOP)
+ − 123
{
+ − 124
mydiv.style.backgroundImage = 'url(\''+scriptPath+'/images/error.png\')';
+ − 125
}
+ − 126
+ − 127
if(type & MB_ICONEXCLAMATION)
+ − 128
{
+ − 129
mydiv.style.backgroundImage = 'url(\''+scriptPath+'/images/warning.png\')';
+ − 130
}
+ − 131
+ − 132
if(type & MB_ICONLOCK)
+ − 133
{
+ − 134
mydiv.style.backgroundImage = 'url(\''+scriptPath+'/images/lock.png\')';
+ − 135
}
+ − 136
+ − 137
if(type & MB_OK)
+ − 138
{
+ − 139
btn = document.createElement('input');
+ − 140
btn.type = 'button';
+ − 141
btn.value = $lang.get('etc_ok');
+ − 142
btn._GenericName = 'OK';
+ − 143
btn.onclick = this.clickHandler;
+ − 144
btn.style.margin = '0 3px';
+ − 145
buttondiv.appendChild(btn);
+ − 146
}
+ − 147
+ − 148
if(type & MB_OKCANCEL)
+ − 149
{
+ − 150
btn = document.createElement('input');
+ − 151
btn.type = 'button';
+ − 152
btn.value = $lang.get('etc_ok');
+ − 153
btn._GenericName = 'OK';
+ − 154
btn.onclick = this.clickHandler;
+ − 155
btn.style.margin = '0 3px';
+ − 156
buttondiv.appendChild(btn);
+ − 157
+ − 158
btn = document.createElement('input');
+ − 159
btn.type = 'button';
+ − 160
btn.value = $lang.get('etc_cancel');
+ − 161
btn._GenericName = 'Cancel';
+ − 162
btn.onclick = this.clickHandler;
+ − 163
btn.style.margin = '0 3px';
+ − 164
buttondiv.appendChild(btn);
+ − 165
}
+ − 166
+ − 167
if(type & MB_YESNO)
+ − 168
{
+ − 169
btn = document.createElement('input');
+ − 170
btn.type = 'button';
+ − 171
btn.value = $lang.get('etc_yes');
+ − 172
btn._GenericName = 'Yes';
+ − 173
btn.onclick = this.clickHandler;
+ − 174
btn.style.margin = '0 3px';
+ − 175
buttondiv.appendChild(btn);
+ − 176
+ − 177
btn = document.createElement('input');
+ − 178
btn.type = 'button';
+ − 179
btn.value = $lang.get('etc_no');
+ − 180
btn._GenericName = 'No';
+ − 181
btn.onclick = this.clickHandler;
+ − 182
btn.style.margin = '0 3px';
+ − 183
buttondiv.appendChild(btn);
+ − 184
}
+ − 185
+ − 186
if(type & MB_YESNOCANCEL)
+ − 187
{
+ − 188
btn = document.createElement('input');
+ − 189
btn.type = 'button';
+ − 190
btn.value = $lang.get('etc_yes');
+ − 191
btn._GenericName = 'Yes';
+ − 192
btn.onclick = this.clickHandler;
+ − 193
btn.style.margin = '0 3px';
+ − 194
buttondiv.appendChild(btn);
+ − 195
+ − 196
btn = document.createElement('input');
+ − 197
btn.type = 'button';
+ − 198
btn.value = $lang.get('etc_no');
+ − 199
btn._GenericName = 'No';
+ − 200
btn.onclick = this.clickHandler;
+ − 201
btn.style.margin = '0 3px';
+ − 202
buttondiv.appendChild(btn);
+ − 203
+ − 204
btn = document.createElement('input');
+ − 205
btn.type = 'button';
+ − 206
btn.value = $lang.get('etc_cancel');
+ − 207
btn._GenericName = 'Cancel';
+ − 208
btn.onclick = this.clickHandler;
+ − 209
btn.style.margin = '0 3px';
+ − 210
buttondiv.appendChild(btn);
+ − 211
}
+ − 212
+ − 213
heading = document.createElement('h2');
+ − 214
heading.innerHTML = title;
+ − 215
heading.style.color = '#50A0D0';
+ − 216
heading.style.fontFamily = 'trebuchet ms, verdana, arial, helvetica, sans-serif';
+ − 217
heading.style.fontSize = '12pt';
+ − 218
heading.style.fontWeight = 'lighter';
+ − 219
heading.style.textTransform = 'lowercase';
+ − 220
heading.style.marginTop = '0';
+ − 221
mydiv.appendChild(heading);
+ − 222
+ − 223
var text = document.createElement('div');
+ − 224
text.innerHTML = String(message);
+ − 225
this.text_area = text;
+ − 226
mydiv.appendChild(text);
+ − 227
+ − 228
this.updateContent = function(text)
+ − 229
{
+ − 230
this.text_area.innerHTML = text;
+ − 231
};
+ − 232
+ − 233
this.destroy = function()
+ − 234
{
+ − 235
var mbdiv = document.getElementById('messageBox');
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 236
mbdiv.parentNode.parentNode.removeChild(mbdiv.parentNode);
582
+ − 237
if ( !mb_previously_had_darkener )
+ − 238
enlighten(true);
+ − 239
};
+ − 240
+ − 241
//domObjChangeOpac(0, mydiv);
+ − 242
//domObjChangeOpac(0, master_div);
+ − 243
+ − 244
body = document.getElementsByTagName('body');
+ − 245
body = body[0];
+ − 246
master_div.appendChild(mydiv);
+ − 247
master_div.appendChild(buttondiv);
+ − 248
+ − 249
body.appendChild(master_div);
+ − 250
+ − 251
if ( !aclDisableTransitionFX )
+ − 252
setTimeout('mb_runFlyIn();', 100);
+ − 253
+ − 254
this.onclick = new Array();
+ − 255
this.onbeforeclick = new Array();
+ − 256
mb_current_obj = this;
+ − 257
}
+ − 258
+ − 259
var messagebox = MessageBox;
+ − 260
+ − 261
function mb_runFlyIn()
+ − 262
{
+ − 263
var mydiv = document.getElementById('messageBox');
+ − 264
var maindiv = mydiv.parentNode;
+ − 265
fly_in_top(maindiv, true, false);
+ − 266
}
+ − 267
+ − 268
function messagebox_click(obj, mb)
+ − 269
{
+ − 270
val = ( typeof ( obj._GenericName ) == 'string' ) ? obj._GenericName : obj.value;
+ − 271
if(typeof mb.onbeforeclick[val] == 'function')
+ − 272
{
+ − 273
var o = mb.onbeforeclick[val];
+ − 274
var resp = o();
+ − 275
if ( resp )
+ − 276
return false;
+ − 277
o = false;
+ − 278
}
+ − 279
+ − 280
var mydiv = document.getElementById('messageBox');
+ − 281
var maindiv = mydiv.parentNode;
+ − 282
+ − 283
if ( aclDisableTransitionFX )
+ − 284
{
+ − 285
var mbdiv = document.getElementById('messageBox');
+ − 286
mbdiv.parentNode.removeChild(mbdiv.nextSibling);
+ − 287
mbdiv.parentNode.removeChild(mbdiv);
+ − 288
if ( !mb_previously_had_darkener )
+ − 289
enlighten(true);
+ − 290
}
+ − 291
else
+ − 292
{
+ − 293
var to = fly_out_top(maindiv, true, false);
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 294
setTimeout("var mbdiv = document.getElementById('messageBox'); mbdiv.parentNode.parentNode.removeChild(mbdiv.parentNode); if ( !mb_previously_had_darkener ) enlighten(true);", to);
582
+ − 295
}
+ − 296
if(typeof mb.onclick[val] == 'function')
+ − 297
{
811
5c807fe77020
Added support for live re-auth and de-auth; fully AJAX, no page reload required, plus plugin-usable API.
Dan
diff
changeset
+ − 298
(mb.onclick[val])();
582
+ − 299
}
+ − 300
}
+ − 301
+ − 302
function testMessageBox()
+ − 303
{
+ − 304
mb = new MessageBox(MB_OKCANCEL|MB_ICONINFORMATION, 'Javascripted dynamic message boxes', 'This is soooooo coool, now if only document.createElement() worked in IE!<br />this is some more text<br /><br /><br /><br /><br />this is some more text<br /><br /><br /><br /><br />this is some more text<br /><br /><br /><br /><br />this is some more text<br /><br /><br /><br /><br />this is some more text<br /><br /><br /><br /><br />this is some more text<br /><br /><br /><br /><br />this is some more text<br /><br /><br /><br /><br />this is some more text');
+ − 305
mb.onclick['OK'] = function()
+ − 306
{
+ − 307
alert('You clicked OK!');
+ − 308
}
+ − 309
mb.onbeforeclick['Cancel'] = function()
+ − 310
{
+ − 311
alert('You clicked Cancel!');
+ − 312
}
+ − 313
}
+ − 314
+ − 315
/**
+ − 316
* The miniPrompt function, for creating small prompts and dialogs. The window will be flown in and the window darkened with opac=0.4.
+ − 317
* @param function Will be passed an HTMLElement that is the body of the prompt window; the function can do with this as it pleases
+ − 318
*/
+ − 319
+ − 320
function miniPrompt(call_on_create)
+ − 321
{
+ − 322
if ( !aclDisableTransitionFX )
+ − 323
{
779
609e35845ec3
load_component() now accepts an array, and most JS components are loaded all in one request now. Totally modular baby. And failsafe too.
Dan
diff
changeset
+ − 324
load_component(['flyin', 'jquery', 'jquery-ui', 'fadefilter']);
582
+ − 325
}
854
+ − 326
else
+ − 327
{
+ − 328
load_component(['fadefilter']);
+ − 329
}
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 330
var darkener = darken(aclDisableTransitionFX, 40, 'miniprompt_darkener');
582
+ − 331
+ − 332
var wrapper = document.createElement('div');
+ − 333
wrapper.className = 'miniprompt';
+ − 334
var top = document.createElement('div');
+ − 335
top.className = 'mp-top';
+ − 336
var body = document.createElement('div');
+ − 337
body.className = 'mp-body';
+ − 338
var bottom = document.createElement('div');
+ − 339
bottom.className = 'mp-bottom';
+ − 340
if ( typeof(call_on_create) == 'function' )
+ − 341
{
+ − 342
call_on_create(body);
+ − 343
}
+ − 344
wrapper.appendChild(top);
+ − 345
wrapper.appendChild(body);
+ − 346
wrapper.appendChild(bottom);
+ − 347
var left = ( getWidth() / 2 ) - ( 388 / 2 );
+ − 348
wrapper.style.left = left + 'px';
+ − 349
var top = getScrollOffset() - 27;
+ − 350
wrapper.style.top = top + 'px';
+ − 351
domObjChangeOpac(0, wrapper);
+ − 352
var realbody = document.getElementsByTagName('body')[0];
+ − 353
realbody.appendChild(wrapper);
+ − 354
+ − 355
if ( aclDisableTransitionFX )
+ − 356
{
+ − 357
domObjChangeOpac(100, wrapper);
+ − 358
}
+ − 359
else
+ − 360
{
+ − 361
fly_in_top(wrapper, true, true);
+ − 362
+ − 363
setTimeout(function()
+ − 364
{
+ − 365
domObjChangeOpac(100, wrapper);
+ − 366
}, 40);
+ − 367
}
628
+ − 368
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 369
// set the darkener's onclick to refocus/shake the miniprompt
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 370
darkener.miniprompt = wrapper;
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 371
darkener.onclick = function()
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 372
{
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 373
if ( !aclDisableTransitionFX )
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 374
{
699
c7d737202d59
Removed Adobe Spry and replaced with jQuery. Please report any new bugs on the forums or via IRC. In a related note, auto-completion should work now at least for usernames. Still hacking away at page name completion...
Dan
diff
changeset
+ − 375
$(this.miniprompt).effect("pulsate", { times: 2 }, 200);
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 376
}
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 377
}
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 378
628
+ − 379
return wrapper;
582
+ − 380
}
+ − 381
+ − 382
/**
+ − 383
* For a given element, loops through the element and all of its ancestors looking for a miniPrompt div, and returns it. Returns false on failure.
+ − 384
* @param object:HTMLElement Child node to scan
+ − 385
* @return object
+ − 386
*/
+ − 387
+ − 388
function miniPromptGetParent(obj)
+ − 389
{
+ − 390
while ( true )
+ − 391
{
+ − 392
// prevent infinite loops
+ − 393
if ( !obj || obj.tagName == 'BODY' )
+ − 394
return false;
+ − 395
+ − 396
if ( $dynano(obj).hasClass('miniprompt') )
+ − 397
{
+ − 398
return obj;
+ − 399
}
+ − 400
obj = obj.parentNode;
+ − 401
}
+ − 402
return false;
+ − 403
}
+ − 404
+ − 405
/**
+ − 406
* Destroys the first miniPrompt div encountered by recursively checking all parent nodes.
+ − 407
* Usage: <a href="javascript:miniPromptDestroy(this);">click</a>
+ − 408
* @param object:HTMLElement a child of the div.miniprompt
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 409
* @param bool (DEPRECATED) If true, does not call enlighten().
582
+ − 410
*/
+ − 411
+ − 412
function miniPromptDestroy(obj, nofade)
+ − 413
{
+ − 414
obj = miniPromptGetParent(obj);
+ − 415
if ( !obj )
+ − 416
return false;
+ − 417
+ − 418
// found it
+ − 419
var parent = obj.parentNode;
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 420
// if ( !nofade )
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 421
// enlighten(aclDisableTransitionFX);
887
+ − 422
enlighten((aclDisableTransitionFX || nofade), 'miniprompt_darkener');
+ − 423
if ( aclDisableTransitionFX || nofade )
582
+ − 424
{
+ − 425
parent.removeChild(obj);
+ − 426
}
+ − 427
else
+ − 428
{
+ − 429
var timeout = fly_out_top(obj, true, true);
+ − 430
setTimeout(function()
+ − 431
{
+ − 432
parent.removeChild(obj);
+ − 433
}, timeout);
+ − 434
}
+ − 435
}
+ − 436
+ − 437
/**
+ − 438
* Simple test case
+ − 439
*/
+ − 440
+ − 441
function miniPromptTest()
+ − 442
{
+ − 443
miniPrompt(function(div) { div.innerHTML = 'hello world! <a href="#" onclick="miniPromptDestroy(this); return false;">destroy me</a>'; });
+ − 444
}
+ − 445
+ − 446
/**
+ − 447
* Message box system for miniPrompts. Less customization but easier to scale than the regular messageBox framework.
+ − 448
* @example
+ − 449
<code>
+ − 450
miniPromptMessage({
+ − 451
title: 'Delete page',
+ − 452
message: 'Do you really want to delete this page? This is reversible unless you clear the page logs.',
+ − 453
buttons: [
+ − 454
{
+ − 455
text: 'Delete',
+ − 456
color: 'red',
+ − 457
style: {
+ − 458
fontWeight: 'bold'
+ − 459
},
+ − 460
onclick: function() {
+ − 461
ajaxDeletePage();
+ − 462
miniPromptDestroy(this);
+ − 463
}
+ − 464
},
+ − 465
{
+ − 466
text: 'cancel',
+ − 467
onclick: function() {
+ − 468
miniPromptDestroy(this);
+ − 469
}
+ − 470
}
+ − 471
]
+ − 472
});
+ − 473
</code>
+ − 474
*/
+ − 475
+ − 476
function miniPromptMessage(parms)
+ − 477
{
628
+ − 478
if ( ( !parms.title && !parms.message ) || !parms.buttons )
582
+ − 479
return false;
+ − 480
+ − 481
return miniPrompt(function(parent)
+ − 482
{
+ − 483
try
+ − 484
{
628
+ − 485
if ( parms.title )
+ − 486
{
+ − 487
var h3 = document.createElement('h3');
+ − 488
h3.appendChild(document.createTextNode(parms.title));
+ − 489
}
+ − 490
if ( parms.message )
582
+ − 491
{
628
+ − 492
var body = document.createElement('p');
+ − 493
var message = parms.message.split(unescape('%0A'));
+ − 494
for ( var i = 0; i < message.length; i++ )
+ − 495
{
+ − 496
body.appendChild(document.createTextNode(message[i]));
+ − 497
if ( i + 1 < message.length )
+ − 498
body.appendChild(document.createElement('br'));
+ − 499
}
582
+ − 500
}
+ − 501
+ − 502
parent.style.textAlign = 'center';
+ − 503
628
+ − 504
if ( parms.title )
+ − 505
parent.appendChild(h3);
+ − 506
if ( parms.message )
+ − 507
parent.appendChild(body);
582
+ − 508
parent.appendChild(document.createElement('br'));
+ − 509
+ − 510
// construct buttons
+ − 511
for ( var i = 0; i < parms.buttons.length; i++ )
+ − 512
{
+ − 513
var button = parms.buttons[i];
+ − 514
button.input = document.createElement('a');
+ − 515
button.input.href = '#';
+ − 516
button.input.clickAction = button.onclick;
+ − 517
button.input.className = 'abutton';
+ − 518
if ( button.color )
+ − 519
{
+ − 520
button.input.className += ' abutton_' + button.color;
+ − 521
}
+ − 522
button.input.appendChild(document.createTextNode(button.text));
+ − 523
if ( button.style )
+ − 524
{
+ − 525
for ( var j in button.style )
+ − 526
{
+ − 527
button.input.style[j] = button.style[j];
+ − 528
}
+ − 529
}
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 530
if ( button.sprite )
673
99c617146a34
Added abutton_img class + supporting properties in miniPromptMessage to allow icons on abuttons
Dan
diff
changeset
+ − 531
{
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 532
var sprite = gen_sprite(button.sprite[0], button.sprite[1], button.sprite[2], button.sprite[3], button.sprite[4]);
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 533
sprite.style.position = 'relative';
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 534
sprite.style.top = '3px';
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 535
button.input.insertBefore(sprite, button.input.firstChild);
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 536
insertAfter(button.input, document.createTextNode(' '), sprite);
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 537
}
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 538
else if ( button.image )
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 539
{
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 540
button.input.className += ' icon';
673
99c617146a34
Added abutton_img class + supporting properties in miniPromptMessage to allow icons on abuttons
Dan
diff
changeset
+ − 541
button.input.style.backgroundImage = 'url(' + button.image + ')';
99c617146a34
Added abutton_img class + supporting properties in miniPromptMessage to allow icons on abuttons
Dan
diff
changeset
+ − 542
}
582
+ − 543
button.input.onclick = function(e)
+ − 544
{
+ − 545
try
+ − 546
{
+ − 547
this.clickAction(e);
+ − 548
}
+ − 549
catch(e)
+ − 550
{
+ − 551
console.error(e);
+ − 552
}
+ − 553
return false;
+ − 554
}
+ − 555
parent.appendChild(button.input);
+ − 556
}
694
43367c66d869
Couple of fixes (hacks) for Opera and the aftermath of that z-index change to darken() and enlighten() fadefilters; added ajaxOpenDirectACLRule() to placeholder list
Dan
diff
changeset
+ − 557
// don't focus this in opera - it looks kinda ugly
43367c66d869
Couple of fixes (hacks) for Opera and the aftermath of that z-index change to darken() and enlighten() fadefilters; added ajaxOpenDirectACLRule() to placeholder list
Dan
diff
changeset
+ − 558
if ( parms.buttons[0] && !window.opera )
582
+ − 559
{
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 560
var timeout = ( aclDisableTransitionFX ) ? 10 : 1000;
582
+ − 561
setTimeout(function()
+ − 562
{
+ − 563
parms.buttons[0].input.focus();
677
2a263b598a2b
Improved miniPrompt and fadefilter to properly overlap parent modal windows. MessageBox() is next. Fixed pref_disable_js_fx not working due to wrong type (number instead of boolean).
Dan
diff
changeset
+ − 564
}, timeout);
582
+ − 565
}
+ − 566
}
+ − 567
catch ( e )
+ − 568
{
+ − 569
console.error(e);
+ − 570
}
+ − 571
});
+ − 572
}
+ − 573
906
+ − 574
/**
+ − 575
* Identical to whiteOutElement(), but safe to call on miniPrompt divs.
+ − 576
*/
+ − 577
+ − 578
function whiteOutMiniPrompt(el)
+ − 579
{
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 580
el = miniPromptGetParent(el);
906
+ − 581
var width = 320;
+ − 582
var height = $dynano(el).Height() - 58;
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 583
var topoffset = 27;
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 584
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 585
var container = document.createElement('div');
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 586
container.style.padding = topoffset + 'px 0 0 0';
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 587
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 588
var top = getScrollOffset();
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 589
var left = getWidth() / 2 - width / 2;
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 590
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 591
// using fixed here allows modal windows to be blacked out
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 592
container.style.position = 'absolute';
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 593
container.style.top = ( top - topoffset ) + 'px';
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 594
container.style.left = left + 'px';
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 595
container.style.zIndex = 1000;
906
+ − 596
+ − 597
var blackout = document.createElement('div');
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 598
blackout.style.backgroundColor = '#ffffff';
906
+ − 599
blackout.style.width = width + 'px';
+ − 600
blackout.style.height = height + 'px';
+ − 601
domObjChangeOpac(60, blackout);
+ − 602
var background = ( $dynano(el).Height() < 48 ) ? 'url(' + scriptPath + '/images/loading.gif)' : 'url(' + scriptPath + '/includes/clientside/tinymce/themes/advanced/skins/default/img/progress.gif)';
+ − 603
blackout.style.backgroundImage = background;
+ − 604
blackout.style.backgroundPosition = 'center center';
+ − 605
blackout.style.backgroundRepeat = 'no-repeat';
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 606
blackout.isMiniPrompt = true;
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 607
blackout.miniPromptObj = el;
906
+ − 608
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 609
container.appendChild(blackout);
906
+ − 610
var body = document.getElementsByTagName('body')[0];
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 611
body.appendChild(container);
906
+ − 612
+ − 613
return blackout;
+ − 614
}
+ − 615
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 616
function whiteOutDestroyOnMiniPrompt(whitey)
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 617
{
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 618
var body = document.getElementsByTagName('body')[0];
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 619
var parent = whitey.miniPromptObj;
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 620
fly_out_top([parent, whitey.parentNode], true, true);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 621
setTimeout(function()
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 622
{
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 623
body.removeChild(parent);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 624
body.removeChild(whitey.parentNode);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 625
}, 1000 * FI_MULTIPLIER);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 626
enlighten(true, 'miniprompt_darkener');
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 627
}
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 628
582
+ − 629
function testMPMessageBox()
+ − 630
{
+ − 631
miniPromptMessage({
+ − 632
title: 'The Game of LIFE question #73',
+ − 633
message: 'You just got your girlfriend pregnant. Please select an option:',
+ − 634
buttons: [
+ − 635
{
+ − 636
text: 'Abort',
+ − 637
color: 'red',
+ − 638
style: {
+ − 639
fontWeight: 'bold'
+ − 640
},
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 641
sprite: [ cdnPath + '/images/icons/abortretryignore-sprite.png', 16, 16, 0, 0 ],
582
+ − 642
onclick: function() {
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 643
var w = whiteOutMiniPrompt(this);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 644
var me = this;
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 645
setTimeout(function()
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 646
{
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 647
whiteOutReportSuccess(w, true);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 648
void(me);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 649
setTimeout(function()
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 650
{
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 651
miniPromptDestroy(me);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 652
}, 1250);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 653
}, 500);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 654
return false;
582
+ − 655
}
+ − 656
},
+ − 657
{
+ − 658
text: 'Retry',
+ − 659
color: 'blue',
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 660
sprite: [ cdnPath + '/images/icons/abortretryignore-sprite.png', 16, 16, 0, 16 ],
582
+ − 661
onclick: function() {
1125
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 662
var w = whiteOutMiniPrompt(this);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 663
setTimeout(function()
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 664
{
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 665
whiteOutReportSuccess(w);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 666
}, 1500);
367768040a61
Javascript lib: UX: When whiteOutReportSuccess() is called on a whiteout over a miniPrompt, the miniPrompt and whiteout are now flown out together. Also, a bit of improvement to message box DOM object destruction code; this fixes problems with message boxes appearing below the shade when ajax auth is done 3 or more times in one page load.
Dan
diff
changeset
+ − 667
return false;
582
+ − 668
}
+ − 669
},
+ − 670
{
+ − 671
text: 'Ignore',
+ − 672
color: 'green',
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 673
sprite: [ cdnPath + '/images/icons/abortretryignore-sprite.png', 16, 16, 0, 32 ],
582
+ − 674
onclick: function() {
+ − 675
miniPromptDestroy(this);
+ − 676
}
+ − 677
}
+ − 678
]
+ − 679
});
+ − 680
}
+ − 681