Changeset 4970
- Timestamp:
- 03/06/2007 05:35:01 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
- 5 moved
- wp-admin/cat.js (moved) (moved from trunk/wp-admin/cat-js.php) (2 diffs)
- wp-admin/dbx-admin-key.js (moved) (moved from trunk/wp-admin/dbx-admin-key-js.php) (4 diffs)
- wp-admin/upload.js (moved) (moved from trunk/wp-admin/upload-js.php) (7 diffs)
- wp-includes/js/autosave.js (moved) (moved from trunk/wp-includes/js/autosave-js.php) (7 diffs)
- wp-includes/js/list-manipulation.js (modified) (2 diffs)
- wp-includes/js/wp-ajax.js (moved) (moved from trunk/wp-includes/js/wp-ajax-js.php) (6 diffs)
- wp-includes/script-loader.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/cat.js
r4969 r4970 1 <?php2 require_once('../wp-config.php');3 cache_javascript_headers();4 ?>5 1 addLoadEvent(function(){catList=new listMan('categorychecklist');catList.ajaxRespEl='jaxcat';catList.topAdder=1;catList.alt=0;catList.showLink=0;}); 6 2 addLoadEvent(newCatAddIn); … … 9 5 if ( !jaxcat ) 10 6 return false; 11 Element.update(jaxcat,'<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value=" <?php echo js_escape(__('Add')); ?>"/><span id="howto"><?php echo js_escape(__('Separate multiple categories with commas.')); ?></span></span>');7 Element.update(jaxcat,'<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="' + catL10n.add + '"/><span id="howto">' + catL10n.how + '</span></span>'); 12 8 $('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); }; 13 9 $('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); }; -
trunk/wp-admin/dbx-admin-key.js
r4969 r4970 1 <?php 2 require_once('admin.php'); 3 cache_javascript_headers(); 4 5 switch ( $_GET['pagenow'] ) : 6 case 'post.php' : 7 case 'post-new.php' : 8 $man = 'postmeta'; 9 break; 10 case 'page.php' : 11 case 'page-new.php' : 12 $man = 'pagemeta'; 13 break; 14 case 'link.php' : 15 $man = 'linkmeta'; 16 break; 17 default: 18 exit; 19 break; 20 endswitch; 21 ?> 22 addLoadEvent( function() {var manager = new dbxManager('<?php echo $man; ?>');} ); 1 addLoadEvent( function() {var manager = new dbxManager( dbxL10n.mananger );} ); 23 2 24 3 addLoadEvent( function() … … 27 6 var meta = new dbxGroup( 28 7 'grabit', // container ID [/-_a-zA-Z0-9/] 29 'vertical', // orientation ['vertical'|'horizontal']8 'vertical', // orientation ['vertical'|'horizontal'] 30 9 '10', // drag threshold ['n' pixels] 31 10 'no', // restrict drag movement to container axis ['yes'|'no'] … … 33 12 'yes', // include open/close toggle buttons ['yes'|'no'] 34 13 'closed', // default state ['open'|'closed'] 35 '<?php echo js_escape(__('open')); ?>', // word for "open", as in "open this box"36 '<?php echo js_escape(__('close')); ?>', // word for "close", as in "close this box"37 '<?php echo js_escape(__('click-down and drag to move this box')); ?>',// sentence for "move this box" by mouse38 '<?php echo js_escape(__('click to %toggle% this box')); ?>',// pattern-match sentence for "(open|close) this box" by mouse39 '<?php echo js_escape(__('use the arrow keys to move this box')); ?>',// sentence for "move this box" by keyboard40 '<?php echo js_escape(__(', or press the enter key to %toggle% it')); ?>',// pattern-match sentence-fragment for "(open|close) this box" by keyboard14 dbxL10n.open, // word for "open", as in "open this box" 15 dbxL10n.close, // word for "close", as in "close this box" 16 dbxL10n.moveMouse, // sentence for "move this box" by mouse 17 dbxL10n.toggleMouse, // pattern-match sentence for "(open|close) this box" by mouse 18 dbxL10n.moveKey, // sentence for "move this box" by keyboard 19 dbxL10n.toggleKey, // pattern-match sentence-fragment for "(open|close) this box" by keyboard 41 20 '%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts 42 21 ); … … 51 30 52 31 var advanced = new dbxGroup( 53 'advancedstuff', // container ID [/-_a-zA-Z0-9/]54 'vertical', // orientation ['vertical'|'horizontal']55 '10', // drag threshold ['n' pixels]32 'advancedstuff', 33 'vertical', 34 '10', 56 35 'yes', // restrict drag movement to container axis ['yes'|'no'] 57 '10', // animate re-ordering [frames per transition, or '0' for no effect]58 'yes', // include open/close toggle buttons ['yes'|'no']59 'closed', // default state ['open'|'closed']60 '<?php echo js_escape(__('open')); ?>', // word for "open", as in "open this box"61 '<?php echo js_escape(__('close')); ?>', // word for "close", as in "close this box"62 '<?php echo js_escape(__('click-down and drag to move this box')); ?>', // sentence for "move this box" by mouse63 '<?php echo js_escape(__('click to %toggle% this box')); ?>', // pattern-match sentence for "(open|close) this box" by mouse64 '<?php echo js_escape(__('use the arrow keys to move this box')); ?>', // sentence for "move this box" by keyboard65 '<?php echo js_escape(__(', or press the enter key to %toggle% it')); ?>', // pattern-match sentence-fragment for "(open|close) this box" by keyboard36 '10', 37 'yes', 38 'closed', 39 dbxL10n.open, 40 dbxL10n.close, 41 dbxL10n.moveMouse, 42 dbxL10n.toggleMouse, 43 dbxL10n.moveKey, 44 dbxL10n.toggleKey, 66 45 '%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts 67 46 ); -
trunk/wp-admin/upload.js
r4969 r4970 1 <?php require_once('admin.php'); cache_javascript_headers(); ?>2 1 addLoadEvent( function() { 3 2 theFileList = { … … 70 69 params.ID = ''; 71 70 params.action = ''; 72 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('« Back')); ?></a>"; 73 } else { 74 h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('« Back')) ?></a>"; 75 } 71 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "'"; 72 } else { 73 h += "<a href='#' onclick='return theFileList.cancelView();'"; 74 } 75 h += " title='" + this.browseTitle + "' class='back'>" + this.back + "</a>"; 76 76 h += "<div id='file-title'>" 77 77 if ( 0 == this.currentImage.isImage ) 78 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title=' <?php echo attribute_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>";78 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='" + this.directTitle + "'>" + this.currentImage.title + "</a></h2>"; 79 79 else 80 80 h += "<h2>" + this.currentImage.title + "</h2>"; 81 81 h += " — <span>"; 82 h += "<a href='#' onclick='return theFileList.editView(" + id + ");'> <?php echo attribute_escape(__('Edit')); ?></a>"82 h += "<a href='#' onclick='return theFileList.editView(" + id + ");'>" + this.edit + "</a>" 83 83 h += "</span>"; 84 84 h += '</div>' 85 85 h += "<div id='upload-file-view' class='alignleft'>"; 86 86 if ( 1 == this.currentImage.isImage ) { 87 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title=' <?php echo attribute_escape(__('Direct link to file')); ?>'>";87 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='" + this.directTitle + "'>"; 88 88 h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 89 89 h += "</a>"; … … 99 99 checked = 'display-full'; 100 100 if ( this.currentImage.thumb ) { 101 display.push("<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' /> <?php echo attribute_escape(__('Thumbnail')); ?></label><br />");101 display.push("<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' /> " + this.thumb + "</label><br />"); 102 102 checked = 'display-thumb'; 103 103 } 104 display.push("<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo attribute_escape(__('Full size')); ?></label>");104 display.push("<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> " + this.full + "</label>"); 105 105 } else if ( this.currentImage.thumb ) { 106 display.push("<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' /> <?php echo attribute_escape(__('Icon')); ?></label>");106 display.push("<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' /> " + this.icon + "</label>"); 107 107 } 108 108 if ( display.length ) { 109 display.push("<br /><label for='display-title'><input type='radio' name='display' id='display-title' value='title' /> <?php echo attribute_escape(__('Title')); ?></label>");110 h += "<tr><th style='padding-bottom:.5em'> <?php echo attribute_escape(__('Show:')); ?></th><td style='padding-bottom:.5em'>";109 display.push("<br /><label for='display-title'><input type='radio' name='display' id='display-title' value='title' /> " + this.title + "</label>"); 110 h += "<tr><th style='padding-bottom:.5em'>" + this.show + "</th><td style='padding-bottom:.5em'>"; 111 111 $A(display).each( function(i) { h += i; } ); 112 112 h += "</td></tr>"; 113 113 } 114 114 115 h += "<tr><th> <?php echo attribute_escape(__('Link to:')); ?></th><td>";116 h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo attribute_escape(__('File')); ?></label><br />";117 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo attribute_escape(__('Page')); ?></label><br />";118 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo attribute_escape(__('None')); ?></label>";115 h += "<tr><th>" + this.link + "</th><td>"; 116 h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> " + this.file + "</label><br />"; 117 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> " + this.page + "</label><br />"; 118 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> " + this.none + "</label>"; 119 119 h += "</td></tr>"; 120 120 121 121 h += "<tr><td colspan='2'><p class='submit'>"; 122 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value=' <?php echo attribute_escape(__('Send to editor »')); ?>' />";122 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='" + this.editorText + "' />"; 123 123 h += "</p></td></tr></table>"; 124 124 h += "</form>"; … … 148 148 params.ID = ''; 149 149 params.action = ''; 150 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('« Back')); ?></a>"; 151 } else { 152 h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('« Back')); ?></a>"; 153 } 150 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "'"; 151 } else { 152 h += "<a href='#' onclick='return theFileList.cancelView();'"; 153 } 154 h += " title='" + this.browseTitle + "' class='back'>" + this.back + "</a>"; 154 155 h += "<div id='file-title'>" 155 156 if ( 0 == this.currentImage.isImage ) 156 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title=' <?php echo attribute_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>";157 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='" + this.directTitle + "'>" + this.currentImage.title + "</a></h2>"; 157 158 else 158 159 h += "<h2>" + this.currentImage.title + "</h2>"; 159 160 h += " — <span>"; 160 h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'> <?php echo attribute_escape(__('Insert')); ?></a>"161 h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'>" + this.insert + "</a>"; 161 162 h += "</span>"; 162 163 h += '</div>' 163 164 h += "<div id='upload-file-view' class='alignleft'>"; 164 165 if ( 1 == this.currentImage.isImage ) { 165 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title=' <?php echo wp_specialchars(__('Direct link to file')); ?>'>";166 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='" + this.directTitle + "'>"; 166 167 h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 167 168 h += "</a>"; … … 171 172 172 173 173 h += "<table><col /><col class='widefat' /><tr>" 174 h += "<th scope='row'><label for='url'> <?php echo attribute_escape(__('URL')); ?></label></th>";174 h += "<table><col /><col class='widefat' /><tr>"; 175 h += "<th scope='row'><label for='url'>" + this.urlText + "</label></th>"; 175 176 h += "<td><input type='text' id='url' class='readonly' value='" + this.currentImage.srcBase + this.currentImage.src + "' readonly='readonly' /></td>"; 176 177 h += "</tr><tr>"; 177 h += "<th scope='row'><label for='post_title'> <?php echo attribute_escape(__('Title')); ?></label></th>";178 h += "<th scope='row'><label for='post_title'>" + this.title + "</label></th>"; 178 179 h += "<td><input type='text' id='post_title' name='post_title' value='" + this.currentImage.title + "' /></td>"; 179 180 h += "</tr><tr>"; 180 h += "<th scope='row'><label for='post_content'> <?php echo attribute_escape(__('Description')); ?></label></th>";181 h += "<th scope='row'><label for='post_content'>" + this.desc + "</label></th>"; 181 182 h += "<td><textarea name='post_content' id='post_content'>" + this.currentImage.description + "</textarea></td>"; 182 h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value=' <?php echo attribute_escape(__('Delete File')); ?>' onclick='theFileList.deleteFile(" + id + ");' />";183 h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='" + this.deleteText + "' onclick='theFileList.deleteFile(" + id + ");' />"; 183 184 h += "<input type='hidden' name='from_tab' value='" + this.tab + "' />"; 184 185 h += "<input type='hidden' name='action' id='action-value' value='save' />"; 185 186 h += "<input type='hidden' name='ID' value='" + id + "' />"; 186 187 h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />"; 187 h += "<div class='submit'><input type='submit' value=' <?php echo attribute_escape(__('Save »')); ?>' /></div>";188 h += "<div class='submit'><input type='submit' value='" + this.saveText + "' /></div>"; 188 189 h += "</td></tr></table></form>"; 189 190 … … 258 259 259 260 deleteFile: function(id) { 260 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 + "'); ?>") ) {261 if ( confirm( this.confirmText.replace(/%title%/g, this.currentImage.title) ) ) { 261 262 $('action-value').value = 'delete'; 262 263 $('upload-file').submit(); … … 267 268 268 269 }; 270 Object.extend( theFileList, uploadL10n ); 269 271 theFileList.initializeVars(); 270 272 theFileList.initializeLinks(); -
trunk/wp-includes/js/autosave.js
r4969 r4970 1 <?php @require_once('../../wp-config.php');2 cache_javascript_headers();3 ?>4 1 var autosaveLast = ''; 5 2 var autosavePeriodical; … … 9 6 autosaveLast = form.post_title.value+form.content.value; 10 7 // Keep autosave_interval in sync with edit_post(). 11 autosavePeriodical = new PeriodicalExecuter(autosave, <?php echo apply_filters('autosave_interval', '120'); ?>);8 autosavePeriodical = new PeriodicalExecuter(autosave, autosaveL10n.autosaveInterval); 12 9 //Disable autosave after the form has been submitted 13 10 if(form.addEventListener) { … … 41 38 42 39 if(isNaN(res)) { 43 message = "<?php echo js_escape(__('Error: ')); ?>" + response;40 message = autosaveL10n.errorText.replace(/%response%/g, response); 44 41 } else { 45 message = "<?php echo js_escape(__('Saved at ')); ?>" + autosave_cur_time();42 message = autosaveL10n.saveText.replace(/%time%/g, autosave_cur_time()); 46 43 $('post_ID').name = "post_ID"; 47 44 $('post_ID').value = res; … … 53 50 nonceAjax.setVar("cookie", document.cookie); 54 51 nonceAjax.setVar("post_type", $('post_type').value); 55 nonceAjax.requestFile = "<?php echo get_option('siteurl'); ?>/wp-admin/admin-ajax.php";52 nonceAjax.requestFile = autosaveL10n.requestFile; 56 53 nonceAjax.onCompletion = autosave_update_nonce; 57 54 nonceAjax.method = "POST"; … … 64 61 65 62 function autosave_loading() { 66 $('autosave').innerHTML = "<?php echo js_escape(__('Saving Draft...')); ?>";63 $('autosave').innerHTML = autosaveL10n.savingText; 67 64 } 68 65 … … 73 70 74 71 if(isNaN(res)) { 75 message = "<?php echo js_escape(__('Error: ')); ?>" + response;72 message = autosaveL10n.errorText.replace(/%response%/g, response); 76 73 } else { 77 message = "<?php echo js_escape(__('Saved at ')); ?>" + autosave_cur_time() + ".";74 message = autosaveL10n.saveText.replace(/%time%/g, autosave_cur_time()); 78 75 } 79 76 $('autosave').innerHTML = message; … … 149 146 } 150 147 151 autosaveAjax.requestFile = "<?php echo get_option('siteurl'); ?>/wp-admin/admin-ajax.php";148 autosaveAjax.requestFile = autosaveL10n.requestFile; 152 149 autosaveAjax.method = "POST"; 153 150 autosaveAjax.element = null; -
trunk/wp-includes/js/list-manipulation.js
r4968 r4970 9 9 obj=theList; 10 10 if ( !message ) 11 message = obj.delText.replace(/% /g, what);11 message = obj.delText.replace(/%thing%/g, what); 12 12 if( confirm(message) ) 13 13 return obj.ajaxDelete( what, id ); … … 37 37 formStore: null, 38 38 39 jumpText: ' Jump to new item',40 delText: ' Are you sure you want to delete this %s?',39 jumpText: '', // We get these from listManL10n 40 delText: '', 41 41 42 42 initialize: function(theListId) { -
trunk/wp-includes/js/wp-ajax.js
r4969 r4970 1 <?php @require_once('../../wp-config.php'); cache_javascript_headers(); ?>2 1 var WPAjax = Class.create(); 3 2 Object.extend(WPAjax.prototype, Ajax.Request.prototype); … … 5 4 WPComplete: false, // onComplete function 6 5 WPError: false, // onWPError function 6 defaultUrl: '', // We get these from WPAjaxL10n 7 permText: '', 8 strangeText: '', 9 whoaText: '', 10 7 11 initialize: function(url, responseEl) { 8 12 var tempObj = this; … … 20 24 } 21 25 }); 22 this.url = url ? url : '<?php bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php';26 this.url = url ? url : this.defaultUrl; 23 27 this.getResponseElement(responseEl); 24 28 }, … … 53 57 var r = parseInt(r,10); 54 58 if ( -1 == r ) { 55 Element.update(this.myResponseElement,"<div class='error'><p> <?php _e("You don't have permission to do that."); ?></p></div>");59 Element.update(this.myResponseElement,"<div class='error'><p>" + this.permText + "</p></div>"); 56 60 return false; 57 61 } else if ( 0 == r ) { 58 Element.update(this.myResponseElement,"<div class='error'><p> <?php _e("Something strange happened. Try refreshing the page."); ?></p></div>");62 Element.update(this.myResponseElement,"<div class='error'><p>" + this.strangeText + "</p></div>"); 59 63 return false; 60 64 } … … 72 76 }); 73 77 78 Event.observe( window, 'load', function() { Object.extend(WPAjax.prototype, WPAjaxL10n); }, false ) 79 74 80 Ajax.activeSendCount = 0; 75 81 Ajax.Responders.register( { … … 80 86 wpBeforeUnload = window.onbeforeunload; 81 87 window.onbeforeunload = function() { 82 return "<?php js_escape(__("Slow down, I'm still sending your data!")); ?>";88 return WPAjax.whoaText; 83 89 } 84 90 }, -
trunk/wp-includes/script-loader.php
r4968 r4970 20 20 $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070225' ); 21 21 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0-0'); 22 $this->add( 'autosave', '/wp-includes/js/autosave-js.php', array('prototype', 'sack'), '20070116'); 23 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '20070118'); 24 $this->add( 'listman', '/wp-includes/js/list-manipulation.js', array('wp-ajax', 'fat'), '20070305'); 22 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('prototype', 'sack'), '20070306'); 23 $this->localize( 'autosave', 'autosaveL10n', array( 24 'autosaveInterval' => apply_filters('autosave_interval', '120'), 25 'errorText' => __('Error: %response%'), 26 'saveText' => __('Saved at %time%.'), 27 'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php', 28 'savingText' => __('Saving Draft...') 29 ) ); 30 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306'); 31 $this->localize( 'wp-ajax', 'WPAjaxL10n', array( 32 'defaultUrl' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php', 33 'permText' => __("You don't have permission to do that."), 34 'strangeText' => __("Something strange happened. Try refreshing the page."), 35 'whoaText' => __("Slow down, I'm still sending your data!") 36 ) ); 37 $this->add( 'listman', '/wp-includes/js/list-manipulation.js', array('wp-ajax', 'fat'), '20070306'); 25 38 $this->localize( 'listman', 'listManL10n', array( 26 39 'jumpText' => __('Jump to new item'), 27 'delText' => __('Are you sure you want to delete this % s?')40 'delText' => __('Are you sure you want to delete this %thing%?') 28 41 ) ); 29 42 $this->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.7.0'); … … 38 51 $this->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.1.1'); 39 52 if ( is_admin() ) { 40 $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' ); 41 $this->add( 'ajaxcat', '/wp-admin/cat-js.php', array('listman'), '20070118' ); 53 global $pagenow; 54 $man = false; 55 switch ( $pagenow ) : 56 case 'post.php' : 57 case 'post-new.php' : 58 $man = 'postmeta'; 59 break; 60 case 'page.php' : 61 case 'page-new.php' : 62 $man = 'pagemeta'; 63 break; 64 case 'link.php' : 65 $man = 'linkmeta'; 66 break; 67 endswitch; 68 if ( $man ) { 69 $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key.js', array('dbx'), '20070306' ); 70 $this->localize( 'dbx-admin-key', 'dbxL10n', array( 71 'manager' => $man, 72 'open' => __('open'), 73 'close' => __('close'), 74 'moveMouse' => __('click-down and drag to move this box'), 75 'toggleMouse' => __('click to %toggle% this box'), 76 'moveKey' => __('use the arrow keys to move this box'), 77 'toggleKey' => __(', or press the enter key to %toggle% it'), 78 ) ); 79 } 80 $this->add( 'ajaxcat', '/wp-admin/cat.js', array('listman'), '20070306' ); 81 $this->localize( 'ajaxcat', 'catL10n', array( 82 'add' => attribute_escape(__('Add')), 83 'how' => __('Separate multiple categories with commas.') 84 ) ); 42 85 $this->add( 'admin-categories', '/wp-admin/categories.js', array('listman'), '3684' ); 43 86 $this->add( 'admin-custom-fields', '/wp-admin/custom-fields.js', array('listman'), '3733' ); … … 45 88 $this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '4583' ); 46 89 $this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' ); 47 $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '20070118' ); 90 $this->add( 'upload', '/wp-admin/upload.js', array('prototype'), '20070306' ); 91 $this->localize( 'upload', 'uploadL10n', array( 92 'browseTitle' => attribute_escape(__('Browse your files')), 93 'back' => __('« Back'), 94 'directTitle' => attribute_escape(__('Direct link to file')), 95 'edit' => __('Edit'), 96 'thumb' => __('Thumbnail'), 97 'full' => __('Full size'), 98 'icon' => __('Icon'), 99 'title' => __('Title'), 100 'show' => __('Show:'), 101 'link' => __('Link to:'), 102 'file' => __('File'), 103 'page' => __('Page'), 104 'none' => __('None'), 105 'editorText' => attribute_escape(__('Send to editor »')), 106 'insert' => __('Insert'), 107 'urlText' => __('URL'), 108 'desc' => __('Description'), 109 'deleteText' => attribute_escape(__('Delete File')), 110 'saveText' => attribute_escape(__('Save »')), 111 'confirmText' => __("Are you sure you want to delete the file '%title%'?\nClick ok to delete or cancel to go back.") 112 ) ); 48 113 } 49 114 }
Note: See TracChangeset for help on using the changeset viewer.