From 736af28d7287b477c7b5f155edf81040c7e779cc Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 23 Jan 2006 10:13:14 +0000 Subject: WP Merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@509 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-admin/inline-uploading.php | 44 +++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) (limited to 'wp-inst/wp-admin/inline-uploading.php') diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php index c6260e9..88b1239 100644 --- a/wp-inst/wp-admin/inline-uploading.php +++ b/wp-inst/wp-admin/inline-uploading.php @@ -261,8 +261,8 @@ imgb[{$ID}] = '\"{$title}\"$__using_title"; - $script .= "aa[{$ID}] = '{$title}'; -ab[{$ID}] = '{$title}'; + $script .= "aa[{$ID}] = ''; +ab[{$ID}] = ''; title[{$ID}] = '{$title}'; filename[{$ID}] = '{$filename}'; icon[{$ID}] = '{$icon}'; @@ -350,19 +350,13 @@ function toggleLink(n) { updateImage(n); } function toggleOtherLink(n) { - od=document.getElementById('div'+n); ol=document.getElementById('L'+n); - oi=document.getElementById('p'+n); - ih=oi.innerHTML; if ( ol.innerHTML == htmldecode(linkedtofile) ) { - od.innerHTML = aa[n]; ol.innerHTML = linkedtopage; } else { - od.innerHTML = ab[n]; ol.innerHTML = linkedtofile; } - oi=document.getElementById('p'+n); - oi.innerHTML = ih; + updateOtherIcon(n); } function toggleImage(n) { oi = document.getElementById('I'+n); @@ -375,22 +369,18 @@ function toggleImage(n) { } function toggleOtherIcon(n) { od = document.getElementById('div'+n); - o = document.getElementById('p'+n); oi = document.getElementById('I'+n); if ( oi.innerHTML == htmldecode(usingtitle) ) { - o.innerHTML = filename[n]; oi.innerHTML = usingfilename; + od.className = 'otherwrap usingtext'; } else if ( oi.innerHTML == htmldecode(usingfilename) && icon[n] != '' ) { - o.innerHTML = icon[n]; oi.innerHTML = usingicon; + od.className = 'otherwrap usingicon'; } else { - o.innerHTML = title[n]; oi.innerHTML = usingtitle; - } - if ( oi.innerHTML == usingicon ) - od.className = 'otherwrap usingicon'; - else od.className = 'otherwrap usingtext'; + } + updateOtherIcon(n); } function updateImage(n) { od=document.getElementById('div'+n); @@ -409,6 +399,26 @@ function updateImage(n) { od.innerHTML = img; } } +function updateOtherIcon(n) { + od=document.getElementById('div'+n); + ol=document.getElementById('L'+n); + oi=document.getElementById('I'+n); + if ( oi.innerHTML == htmldecode(usingfilename) ) { + txt = filename[n]; + } else if ( oi.innerHTML == htmldecode(usingicon) ) { + txt = icon[n]; + } else { + txt = title[n]; + } + if ( ol.innerHTML == htmldecode(linkedtofile) ) { + od.innerHTML = ab[n]+txt+''; + } else if ( ol.innerHTML == htmldecode(linkedtopage) ) { + od.innerHTML = aa[n]+txt+''; + } else { + od.innerHTML = txt; + } +} + var win = window.opener ? window.opener : window.dialogArguments; if (!win) win = top; tinyMCE = win.tinyMCE; -- cgit