From 3e0bdbd84c30621633e9fa8b356259e1211b980e Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 9 Mar 2007 15:25:41 +0000 Subject: WP Merge - deleted files git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@910 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/upload-js.php | 271 ------------------------------------------------- 1 file changed, 271 deletions(-) delete mode 100644 wp-admin/upload-js.php (limited to 'wp-admin/upload-js.php') diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php deleted file mode 100644 index b406355..0000000 --- a/wp-admin/upload-js.php +++ /dev/null @@ -1,271 +0,0 @@ - -addLoadEvent( function() { - theFileList = { - currentImage: {ID: 0}, - nonce: '', - tab: '', - postID: 0, - - initializeVars: function() { - this.urlData = document.location.href.split('?'); - this.params = this.urlData[1].toQueryParams(); - this.postID = this.params['post_id']; - this.tab = this.params['tab']; - this.style = this.params['style']; - this.ID = this.params['ID']; - if ( !this.style ) - this.style = 'default'; - var nonceEl = $('nonce-value'); - if ( nonceEl ) - this.nonce = nonceEl.value; - if ( this.ID ) { - this.grabImageData( this.ID ); - this.imageView( this.ID ); - } - }, - - initializeLinks: function() { - if ( this.ID ) - return; - $$('a.file-link').each( function(i) { - var id = i.id.split('-').pop(); - i.onclick = function(e) { theFileList[ 'inline' == theFileList.style ? 'imageView' : 'editView' ](id, e); } - } ); - }, - - grabImageData: function(id) { - if ( id == this.currentImage.ID ) - return; - var thumbEl = $('attachment-thumb-url-' + id); - if ( thumbEl ) { - this.currentImage.thumb = ( 0 == id ? '' : thumbEl.value ); - this.currentImage.thumbBase = ( 0 == id ? '' : $('attachment-thumb-url-base-' + id).value ); - } else { - this.currentImage.thumb = false; - } - this.currentImage.src = ( 0 == id ? '' : $('attachment-url-' + id).value ); - this.currentImage.srcBase = ( 0 == id ? '' : $('attachment-url-base-' + id).value ); - this.currentImage.page = ( 0 == id ? '' : $('attachment-page-url-' + id).value ); - this.currentImage.title = ( 0 == id ? '' : $('attachment-title-' + id).value ); - this.currentImage.description = ( 0 == id ? '' : $('attachment-description-' + id).value ); - var widthEl = $('attachment-width-' + id); - if ( widthEl ) { - this.currentImage.width = ( 0 == id ? '' : widthEl.value ); - this.currentImage.height = ( 0 == id ? '' : $('attachment-height-' + id).value ); - } else { - this.currentImage.width = false; - this.currentImage.height = false; - } - this.currentImage.isImage = ( 0 == id ? 0 : $('attachment-is-image-' + id).value ); - this.currentImage.ID = id; - }, - - imageView: function(id, e) { - this.prepView(id); - var h = ''; - - h += "
" - if ( this.ID ) { - var params = $H(this.params); - params.ID = ''; - params.action = ''; - h += "' class='back'>"; - } else { - h += "' class='back'>"; - } - h += "
" - if ( 0 == this.currentImage.isImage ) - h += "

'>" + this.currentImage.title + "

"; - else - h += "

" + this.currentImage.title + "

"; - h += " — "; - h += "" - h += ""; - h += '
' - h += "
"; - if ( 1 == this.currentImage.isImage ) { - h += "'>"; - h += "" + this.currentImage.title + ""; - h += ""; - } else - h += ' '; - h += "
"; - - h += "
"; - h += ""; - var display = []; - var checked = 'display-title'; - if ( 1 == this.currentImage.isImage ) { - checked = 'display-full'; - if ( this.currentImage.thumb ) { - display.push("
"); - checked = 'display-thumb'; - } - display.push(""); - } else if ( this.currentImage.thumb ) { - display.push(""); - } - if ( display.length ) { - display.push("
"); - h += ""; - } - - h += ""; - - h += "
"; - $A(display).each( function(i) { h += i; } ); - h += "
"; - h += "
"; - h += "
"; - h += ""; - h += "

"; - h += "' />"; - h += "

"; - h += "
"; - - h += "
"; - - new Insertion.Top('upload-content', h); - var displayEl = $(checked); - if ( displayEl ) - displayEl.checked = true; - - if (e) Event.stop(e); - return false; - }, - - editView: function(id, e) { - this.prepView(id); - var h = ''; - - var action = 'upload.php?style=' + this.style + '&tab=upload'; - if ( this.postID ) - action += '&post_id=' + this.postID; - - h += "
"; - if ( this.ID ) { - var params = $H(this.params); - params.ID = ''; - params.action = ''; - h += "' class='back'>"; - } else { - h += "' class='back'>"; - } - h += "
" - if ( 0 == this.currentImage.isImage ) - h += "

'>" + this.currentImage.title + "

"; - else - h += "

" + this.currentImage.title + "

"; - h += " — "; - h += "" - h += ""; - h += '
' - h += "
"; - if ( 1 == this.currentImage.isImage ) { - h += "'>"; - h += "" + this.currentImage.title + ""; - h += ""; - } else - h += ' '; - h += "
"; - - - h += "" - h += ""; - h += ""; - h += ""; - h += ""; - h += ""; - h += ""; - h += ""; - h += ""; - h += "
' onclick='theFileList.deleteFile(" + id + ");' />"; - h += ""; - h += ""; - h += ""; - h += ""; - h += "
' />
"; - h += "
"; - - new Insertion.Top('upload-content', h); - if (e) Event.stop(e); - return false; - }, - - prepView: function(id) { - this.cancelView( true ); - var filesEl = $('upload-files'); - if ( filesEl ) - filesEl.hide(); - var navEl = $('current-tab-nav'); - if ( navEl ) - navEl.hide(); - this.grabImageData(id); - }, - - cancelView: function( prep ) { - if ( !prep ) { - var filesEl = $('upload-files'); - if ( filesEl ) - Element.show(filesEl); - var navEl = $('current-tab-nav'); - if ( navEl ) - Element.show(navEl); - } - if ( !this.ID ) - this.grabImageData(0); - var div = $('upload-file'); - if ( div ) - Element.remove(div); - return false; - }, - - sendToEditor: function(id) { - this.grabImageData(id); - var link = ''; - var display = ''; - var h = ''; - - link = $A(document.forms.uploadoptions.elements.link).detect( function(i) { return i.checked; } ).value; - displayEl = $A(document.forms.uploadoptions.elements.display).detect( function(i) { return i.checked; } ) - if ( displayEl ) - display = displayEl.value; - else if ( 1 == this.currentImage.isImage ) - display = 'full'; - - if ( 'none' != link ) - h += ""; - if ( display && 'title' != display ) - h += "" + this.currentImage.title + ""; - else - h += this.currentImage.title; - if ( 'none' != link ) - h += ""; - - var win = window.opener ? window.opener : window.dialogArguments; - if ( !win ) - win = top; - tinyMCE = win.tinyMCE; - 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(); - return false; - }, - - deleteFile: function(id) { - if ( confirm("") ) { - $('action-value').value = 'delete'; - $('upload-file').submit(); - return true; - } - return false; - } - - }; - theFileList.initializeVars(); - theFileList.initializeLinks(); -} ); -- cgit