Changeset 3407
- Timestamp:
- 01/05/2006 11:33:50 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/inline-uploading.php
r3398 r3407 335 335 } 336 336 function toggleLink(n) { 337 od=document.getElementById('div'+n);338 337 ol=document.getElementById('L'+n); 339 oi=document.getElementById('I'+n);340 if ( oi.innerHTML == usingthumbnail ) {341 img = imga[n];342 } else {343 img = imgb[n];344 }345 338 if ( ol.innerHTML == htmldecode(notlinked) ) { 346 od.innerHTML = ab[n]+img+'</a>';347 339 ol.innerHTML = linkedtoimage; 348 340 } else if ( ol.innerHTML == htmldecode(linkedtoimage) ) { 349 od.innerHTML = aa[n]+img+'</a>';350 341 ol.innerHTML = linkedtopage; 351 342 } else { 352 od.innerHTML = img;353 343 ol.innerHTML = notlinked; 354 344 } 345 updateImage(n); 355 346 } 356 347 function toggleOtherLink(n) { … … 370 361 } 371 362 function toggleImage(n) { 372 o = document.getElementById('image'+n);373 363 oi = document.getElementById('I'+n); 374 364 if ( oi.innerHTML == htmldecode(usingthumbnail) ) { 375 o.src = srcb[n];376 365 oi.innerHTML = usingoriginal; 377 366 } else { 378 o.src = srca[n];379 367 oi.innerHTML = usingthumbnail; 380 368 } 369 updateImage(n); 381 370 } 382 371 function toggleOtherIcon(n) { … … 399 388 od.className = 'otherwrap usingtext'; 400 389 } 401 390 function updateImage(n) { 391 od=document.getElementById('div'+n); 392 ol=document.getElementById('L'+n); 393 oi=document.getElementById('I'+n); 394 if ( oi.innerHTML == htmldecode(usingthumbnail) ) { 395 img = imga[n]; 396 } else { 397 img = imgb[n]; 398 } 399 if ( ol.innerHTML == htmldecode(linkedtoimage) ) { 400 od.innerHTML = ab[n]+img+'</a>'; 401 } else if ( ol.innerHTML == htmldecode(linkedtopage) ) { 402 od.innerHTML = aa[n]+img+'</a>'; 403 } else { 404 od.innerHTML = img; 405 } 406 } 402 407 var win = window.opener ? window.opener : window.dialogArguments; 403 408 if (!win) win = top; … … 408 413 h = o.innerHTML.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // Trim 409 414 h = h.replace(new RegExp(' (class|title|width|height|id|onclick|onmousedown)=([^\'"][^ ]*)( |/|>)', 'g'), ' $1="$2"$3'); // Enclose attribs in quotes 415 h = h.replace(new RegExp(' (width|height)=".*?"', 'g'), ''); // Drop size constraints 410 416 h = h.replace(new RegExp(' on(click|mousedown)="[^"]*"', 'g'), ''); // Drop menu events 411 417 h = h.replace(new RegExp('<(/?)A', 'g'), '<$1a'); // Lowercase tagnames
Note: See TracChangeset
for help on using the changeset viewer.