summaryrefslogtreecommitdiffstats
path: root/wp-admin/upload-js.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-11-24 16:16:44 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-11-24 16:16:44 +0000
commit600b71019494e1c29898a620e58c0d2602f37b74 (patch)
tree21181d77ad4ebbcd42cd883e509c08a568d29514 /wp-admin/upload-js.php
parent7935d0bd9ef23d32ae29a95bd6c3ea0b6eab2973 (diff)
downloadwordpress-mu-600b71019494e1c29898a620e58c0d2602f37b74.tar.gz
wordpress-mu-600b71019494e1c29898a620e58c0d2602f37b74.tar.xz
wordpress-mu-600b71019494e1c29898a620e58c0d2602f37b74.zip
WP Merge to 4524
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@810 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/upload-js.php')
-rw-r--r--wp-admin/upload-js.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php
index c92439f..ca51e3f 100644
--- a/wp-admin/upload-js.php
+++ b/wp-admin/upload-js.php
@@ -74,7 +74,7 @@ addLoadEvent( function() {
params.action = '';
h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='Browse your files' class='back'>&laquo; Back</a>";
} else {
- h += "<a href='#' onclick='theFileList.cancelView()' title='Browse your files' class='back'>&laquo; Back</a>";
+ h += "<a href='#' onclick='return theFileList.cancelView();' title='Browse your files' class='back'>&laquo; Back</a>";
}
h += "<div id='file-title'>"
if ( !this.currentImage.isImage )
@@ -82,7 +82,7 @@ addLoadEvent( function() {
else
h += "<h2>" + this.currentImage.title + "</h2>";
h += " &#8212; <span>";
- h += "<a href='#' onclick='theFileList.editView(" + id + ")'>Edit</a>"
+ h += "<a href='#' onclick='return theFileList.editView(" + id + ");'>Edit</a>"
h += "</span>";
h += '</div>'
h += "<div id='upload-file-view' class='alignleft'>";
@@ -97,20 +97,20 @@ addLoadEvent( function() {
h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>";
h += "<table>";
if ( this.currentImage.thumb ) {
- h += "<tr><th style='padding-bottom:.5em'>Show:</th><td style='padding-bottom:.5em'>";
- h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> Thumbnail</label><br />";
- h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> Full size</label>";
+ h += "<tr><th style='padding-bottom:.5em'><?php echo addslashes(__('Show:')); ?></th><td style='padding-bottom:.5em'>";
+ h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo addslashes(__('Thumbnail')); ?></label><br />";
+ h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo addslashes(__('Full size')); ?></label>";
h += "</td></tr>";
}
- h += "<tr><th>Link to:</th><td>";
- h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> File</label><br />";
- h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> Page</label><br />";
- h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> None</label>";
+ h += "<tr><th><?php echo addslashes(__('Link to:')); ?></th><td>";
+ h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo addslashes(__('File')); ?></label><br />";
+ h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo addslashes(__('Page')); ?></label><br />";
+ h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo addslashes(__('None')); ?></label>";
h += "</td></tr>";
h += "<tr><td colspan='2'><p class='submit'>";
- h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='Send to editor &raquo;' />";
+ h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo addslashes(__('Send to editor')); ?> &raquo;' />";
h += "</p></td></tr></table>";
h += "</form>";
@@ -136,7 +136,7 @@ addLoadEvent( function() {
params.action = '';
h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='Browse your files' class='back'>&laquo; Back</a>";
} else {
- h += "<a href='#' onclick='theFileList.cancelView()' title='Browse your files' class='back'>&laquo; Back</a>";
+ h += "<a href='#' onclick='return theFileList.cancelView();' title='Browse your files' class='back'>&laquo; Back</a>";
}
h += "<div id='file-title'>"
if ( !this.currentImage.isImage )
@@ -144,7 +144,7 @@ addLoadEvent( function() {
else
h += "<h2>" + this.currentImage.title + "</h2>";
h += " &#8212; <span>";
- h += "<a href='#' onclick='theFileList.imageView(" + id + ")'>Insert</a>"
+ h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'>Insert</a>"
h += "</span>";
h += '</div>'
h += "<div id='upload-file-view' class='alignleft'>";
@@ -221,7 +221,7 @@ addLoadEvent( function() {
display = 'full';
if ( 'none' != link )
- h += "<a href='" + ( 'file' == link ? ( this.currentImage.srcBase + this.currentImage.src ) : ( this.currentImage.page + "' rel='attachment wp-att-" + this.currentImage.ID + "'" ) ) + "' title='" + this.currentImage.title + "'>";
+ h += "<a href='" + ( 'file' == link ? ( this.currentImage.srcBase + this.currentImage.src ) : ( this.currentImage.page + "' rel='attachment wp-att-" + this.currentImage.ID ) ) + "' title='" + this.currentImage.title + "'>";
if ( display )
h += "<img src='" + ( 'thumb' == display ? ( this.currentImage.thumbBase + this.currentImage.thumb ) : ( this.currentImage.srcBase + this.currentImage.src ) ) + "' alt='" + this.currentImage.title + "' />";
else
@@ -233,9 +233,10 @@ addLoadEvent( function() {
if ( !win )
win = top;
tinyMCE = win.tinyMCE;
- if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') )
- win.tinyMCE.execCommand('mceInsertContent', false, h);
- else
+ if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) {
+ tinyMCE.selectedInstance.getWin().focus();
+ tinyMCE.execCommand('mceInsertContent', false, h);
+ } else
win.edInsertContent(win.edCanvas, h);
if ( !this.ID )
this.cancelView();
@@ -243,7 +244,7 @@ addLoadEvent( function() {
},
deleteFile: function(id) {
- if ( confirm("Are you sure you want to delete the file '" + this.currentImage.title + "'?\nClick ok to delete or cancel to go back.") ) {
+ if ( confirm("<?php printf(js_escape(__("Are you sure you want to delete the file '%s'?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") ) {
$('action-value').value = 'delete';
$('upload-file').submit();
return true;