diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-23 10:13:14 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-23 10:13:14 +0000 |
| commit | 736af28d7287b477c7b5f155edf81040c7e779cc (patch) | |
| tree | b50cf0d54fb1fde7217e2e39a636ef372db46a5b /wp-inst/wp-admin/inline-uploading.php | |
| parent | e22e581d7d6ed4f7962a2dca899c59655ddf0994 (diff) | |
| download | wordpress-mu-736af28d7287b477c7b5f155edf81040c7e779cc.tar.gz wordpress-mu-736af28d7287b477c7b5f155edf81040c7e779cc.tar.xz wordpress-mu-736af28d7287b477c7b5f155edf81040c7e779cc.zip | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@509 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/inline-uploading.php')
| -rw-r--r-- | wp-inst/wp-admin/inline-uploading.php | 44 |
1 files changed, 27 insertions, 17 deletions
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}] = '<img id=\"image{$ID}\" src=\"{$image['guid']}\" alt=\"{$title}\" $filename = basename($attachment['guid']);
$icon = get_attachment_icon($ID);
$toggle_icon = "<a id=\"I{$ID}\" onclick=\"toggleOtherIcon({$ID});return false;\" href=\"javascript:void()\">$__using_title</a>";
- $script .= "aa[{$ID}] = '<a id=\"p{$ID}\" rel=\"attachment\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$title}</a>';
-ab[{$ID}] = '<a id=\"p{$ID}\" href=\"{$filename}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$title}</a>';
+ $script .= "aa[{$ID}] = '<a id=\"p{$ID}\" rel=\"attachment\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">';
+ab[{$ID}] = '<a id=\"p{$ID}\" href=\"{$filename}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">';
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+'</a>';
+ } else if ( ol.innerHTML == htmldecode(linkedtopage) ) {
+ od.innerHTML = aa[n]+txt+'</a>';
+ } else {
+ od.innerHTML = txt;
+ }
+}
+
var win = window.opener ? window.opener : window.dialogArguments;
if (!win) win = top;
tinyMCE = win.tinyMCE;
|
