Changeset 3422
- Timestamp:
- 01/10/2006 05:16:17 AM (19 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-header.php
r3383 r3422 1 1 <?php 2 2 @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 3 if (!isset($_GET["page"])) require_once('admin.php'); ?> 3 if (!isset($_GET["page"])) require_once('admin.php'); 4 if ( $list_js || $cat_js ) 5 $sack_js = true; 6 if ( $editing ) { 7 $dbx_js = true; 8 $cat_js = true; 9 } 10 ?> 4 11 <?php get_admin_page_title(); ?> 5 12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 6 13 <html xmlns="http://www.w3.org/1999/xhtml"> 7 14 <head> 15 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" /> 8 16 <title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title> 9 17 <link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 10 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />11 12 18 <script type="text/javascript"> 13 19 //<![CDATA[ 14 15 function addLoadEvent(func) { 16 if ( typeof wpOnload != 'function' ) { 17 wpOnload = func; 18 } else { 19 var oldonload = wpOnload; 20 wpOnload = function() { 21 oldonload(); 22 func(); 23 } 24 } 25 } 26 27 <?php if ( isset($xfn) ) : ?> 28 29 function GetElementsWithClassName(elementName, className) { 30 var allElements = document.getElementsByTagName(elementName); 31 var elemColl = new Array(); 32 for (i = 0; i < allElements.length; i++) { 33 if (allElements[i].className == className) { 34 elemColl[elemColl.length] = allElements[i]; 35 } 36 } 37 return elemColl; 38 } 39 40 function meChecked() { 41 var undefined; 42 var eMe = document.getElementById('me'); 43 if (eMe == undefined) return false; 44 else return eMe.checked; 45 } 46 47 function upit() { 48 var isMe = meChecked(); //document.getElementById('me').checked; 49 var inputColl = GetElementsWithClassName('input', 'valinp'); 50 var results = document.getElementById('link_rel'); 51 var linkText, linkUrl, inputs = ''; 52 for (i = 0; i < inputColl.length; i++) { 53 inputColl[i].disabled = isMe; 54 inputColl[i].parentNode.className = isMe ? 'disabled' : ''; 55 if (!isMe && inputColl[i].checked && inputColl[i].value != '') { 56 inputs += inputColl[i].value + ' '; 57 } 58 } 59 inputs = inputs.substr(0,inputs.length - 1); 60 if (isMe) inputs='me'; 61 results.value = inputs; 62 } 63 64 function blurry() { 65 if (!document.getElementById) return; 66 67 var aInputs = document.getElementsByTagName('input'); 68 69 for (var i = 0; i < aInputs.length; i++) { 70 aInputs[i].onclick = aInputs[i].onkeyup = upit; 71 } 72 } 73 74 addLoadEvent(blurry); 75 <?php endif; ?> 20 function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}} 76 21 //]]> 77 22 </script> 78 23 <script type="text/javascript" src="../wp-includes/js/fat.js"></script> 24 <?php if ( $xfn_js ) { ?> 25 <script type="text/javascript" src="xfn.js"></script> 26 <?php } ?> 27 <?php if ( $sack_js ) { ?> 79 28 <script type="text/javascript" src="../wp-includes/js/tw-sack.js"></script> 29 <?php } ?> 30 <?php if ( $list_js ) { ?> 80 31 <script type="text/javascript" src="list-manipulation.js"></script> 81 <?php if ( isset( $editing ) ) : ?> 82 <?php if ( $editing && user_can_richedit() ) : ?> 83 <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20051211"></script> 84 <?php endif; ?> 32 <?php } ?> 33 <?php if ( $dbx_js ) { ?> 85 34 <script type="text/javascript" src="../wp-includes/js/dbx.js"></script> 86 35 <script type="text/javascript"> 87 36 //<![CDATA[ 88 37 addLoadEvent( function() { 89 38 <?php switch ( $pagenow ) : case 'post.php' : ?> 90 var manager = new dbxManager('postmeta'); //session ID [/-_a-zA-Z0-9/] 39 var manager = new dbxManager('postmeta'); 91 40 <?php break; case 'page-new.php' : ?> 92 var manager = new dbxManager('pagemeta'); //session ID [/-_a-zA-Z0-9/] 41 var manager = new dbxManager('pagemeta'); 93 42 <?php break; endswitch; ?> 94 43 }); 95 44 //]]> 96 45 </script> 97 46 <script type="text/javascript" src="../wp-includes/js/dbx-key.js"></script> 98 99 <?php if ( current_user_can('manage_categories') ) : ?> 100 <style type="text/css"> 101 #newcat { width: 120px; margin-right: 5px; } 102 input#catadd { background: #a4a4a4; 103 border-bottom: 1px solid #898989; 104 border-left: 1px solid #bcbcbc; 105 border-right: 1px solid #898989; 106 border-top: 1px solid #bcbcbc; 107 color: #fff; 108 font-size: 10px; 109 padding: 0; 110 margin: 0; 111 font-weight: bold; 112 height: 20px; 113 margin-bottom: 2px; 114 text-align: center; 115 width: 37px; } 116 #howto { 117 font-size: 11px; 118 margin: 0 5px; 119 display: block; 120 } 121 #jaxcat { 122 margin: 0; 123 padding: 0; 124 } 125 </style> 126 <script type="text/javascript"> 127 //<![CDATA[ 128 var ajaxCat = new sack(); 129 var newcat; 130 131 function newCatAddIn() { 132 if ( !document.getElementById('jaxcat') ) return false; 133 var ajaxcat = document.createElement('span'); 134 ajaxcat.id = 'ajaxcat'; 135 136 newcat = document.createElement('input'); 137 newcat.type = 'text'; 138 newcat.name = 'newcat'; 139 newcat.id = 'newcat'; 140 newcat.size = '16'; 141 newcat.setAttribute('autocomplete', 'off'); 142 newcat.onkeypress = ajaxNewCatKeyPress; 143 144 var newcatSub = document.createElement('input'); 145 newcatSub.type = 'button'; 146 newcatSub.name = 'Button'; 147 newcatSub.id = 'catadd'; 148 newcatSub.value = '<?php echo addslashes(__('Add')); ?>'; 149 newcatSub.onclick = ajaxNewCat; 150 151 ajaxcat.appendChild(newcat); 152 ajaxcat.appendChild(newcatSub); 153 document.getElementById('jaxcat').appendChild(ajaxcat); 154 155 howto = document.createElement('span'); 156 howto.innerHTML = '<?php echo addslashes(__('Separate multiple categories with commas.')); ?>'; 157 howto.id = 'howto'; 158 ajaxcat.appendChild(howto); 159 } 160 161 addLoadEvent(newCatAddIn); 162 163 function getResponseElement() { 164 var p = document.getElementById('ajaxcatresponse'); 165 if (!p) { 166 p = document.createElement('span'); 167 document.getElementById('jaxcat').appendChild(p); 168 p.id = 'ajaxcatresponse'; 169 } 170 return p; 171 } 172 173 function newCatLoading() { 174 var p = getResponseElement(); 175 p.innerHTML = '<?php echo addslashes(__('Sending Data...')); ?>'; 176 } 177 178 function newCatLoaded() { 179 var p = getResponseElement(); 180 p.innerHTML = '<?php echo addslashes(__('Data Sent...')); ?>'; 181 } 182 183 function newCatInteractive() { 184 var p = getResponseElement(); 185 p.innerHTML = '<?php echo addslashes(__('Processing Request...')); ?>'; 186 } 187 188 function newCatCompletion() { 189 var p = getResponseElement(); 190 var id = 0; 191 var ids = new Array(); 192 var names = new Array(); 193 194 ids = myPload( ajaxCat.response ); 195 names = myPload( newcat.value ); 196 for ( i = 0; i < ids.length; i++ ) { 197 id = ids[i].replace(/[\n\r]+/g, ""); 198 if ( id == '-1' ) { 199 p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>"; 200 return; 201 } 202 if ( id == '0' ) { 203 p.innerHTML = "<?php echo addslashes(__('That category name is invalid. Try something else.')); ?>"; 204 return; 205 } 206 207 var exists = document.getElementById('category-' + id); 208 209 if (exists) { 210 var moveIt = exists.parentNode; 211 var container = moveIt.parentNode; 212 container.removeChild(moveIt); 213 container.insertBefore(moveIt, container.firstChild); 214 moveIt.id = 'new-category-' + id; 215 exists.checked = 'checked'; 216 var nowClass = moveIt.className; 217 moveIt.className = nowClass + ' fade'; 218 Fat.fade_all(); 219 moveIt.className = nowClass; 220 } else { 221 var catDiv = document.getElementById('categorychecklist'); 222 var newLabel = document.createElement('label'); 223 newLabel.setAttribute('for', 'category-' + id); 224 newLabel.id = 'new-category-' + id; 225 newLabel.className = 'selectit fade'; 226 227 var newCheck = document.createElement('input'); 228 newCheck.type = 'checkbox'; 229 newCheck.value = id; 230 newCheck.name = 'post_category[]'; 231 newCheck.id = 'category-' + id; 232 newLabel.appendChild(newCheck); 233 234 var newLabelText = document.createTextNode(' ' + names[i]); 235 newLabel.appendChild(newLabelText); 236 237 catDiv.insertBefore(newLabel, catDiv.firstChild); 238 newCheck.checked = 'checked'; 239 240 Fat.fade_all(); 241 newLabel.className = 'selectit'; 242 } 243 newcat.value = ''; 244 } 245 p.parentNode.removeChild(p); 246 // var id = parseInt(ajaxCat.response, 10); 247 } 248 249 function ajaxNewCatKeyPress(e) { 250 if (!e) { 251 if (window.event) { 252 e = window.event; 253 } else { 254 return; 255 } 256 } 257 if (e.keyCode == 13) { 258 ajaxNewCat(); 259 e.returnValue = false; 260 e.cancelBubble = true; 261 return false; 262 } 263 } 264 265 function ajaxNewCat() { 266 var newcat = document.getElementById('newcat'); 267 var split_cats = new Array(1); 268 var catString = ''; 269 270 catString = 'ajaxnewcat=' + encodeURIComponent(newcat.value); 271 ajaxCat.requestFile = 'edit-form-ajax-cat.php'; 272 ajaxCat.method = 'GET'; 273 ajaxCat.onLoading = newCatLoading; 274 ajaxCat.onLoaded = newCatLoaded; 275 ajaxCat.onInteractive = newCatInteractive; 276 ajaxCat.onCompletion = newCatCompletion; 277 ajaxCat.runAJAX(catString); 278 } 279 280 function myPload( str ) { 281 var fixedExplode = new Array(); 282 var comma = new String(','); 283 var count = 0; 284 var currentElement = ''; 285 286 for( x=0; x < str.length; x++) { 287 andy = str.charAt(x); 288 if ( comma.indexOf(andy) != -1 ) { 289 currentElement = currentElement.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // trim 290 fixedExplode[count] = currentElement; 291 currentElement = ""; 292 count++; 293 } else { 294 currentElement += andy; 295 } 296 } 297 298 if ( currentElement != "" ) 299 fixedExplode[count] = currentElement; 300 return fixedExplode; 301 } 302 //]]> 303 </script> 304 <?php endif; ?> 305 306 <?php endif; ?> 307 47 <?php } ?> 48 <?php if ( $editing && user_can_richedit() ) { ?> 49 <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20051211"></script> 50 <?php } ?> 51 <?php if ( $cat_js ) { ?> 52 <script type="text/javascript" src="cat-js.php"></script> 53 <?php } ?> 308 54 <?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') ) : ?> 309 55 <style type="text/css">* html { overflow-x: hidden; }</style> 310 56 <?php endif; ?> 311 312 57 <?php do_action('admin_head'); ?> 313 58 </head> 314 59 <body> 315 316 60 <div id="wphead"> 317 61 <h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site') ?> »</a>)</span></h1> 318 62 </div> 319 320 <div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl') 321 ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Account'); ?></a>] </p></div> 63 <div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Account'); ?></a>] </p></div> 322 64 323 65 <?php -
trunk/wp-admin/admin.php
r3337 r3422 40 40 } 41 41 } 42 43 $xfn_js = $sack_js = $list_js = $cat_js = $dbx_js = $editing = false; 42 44 43 45 require(ABSPATH . '/wp-admin/menu.php'); -
trunk/wp-admin/categories.php
r3070 r3422 4 4 $title = __('Categories'); 5 5 $parent_file = 'edit.php'; 6 $list_js = true; 6 7 7 8 $wpvarstoreset = array('action','cat'); -
trunk/wp-admin/edit-comments.php
r3366 r3422 4 4 $title = __('Edit Comments'); 5 5 $parent_file = 'edit.php'; 6 $list_js = true; 6 7 7 8 require_once('admin-header.php'); -
trunk/wp-admin/edit-pages.php
r3303 r3422 3 3 $title = __('Pages'); 4 4 $parent_file = 'edit.php'; 5 $list_js = true; 5 6 require_once('admin-header.php'); 6 7 ?> -
trunk/wp-admin/edit.php
r3303 r3422 4 4 $title = __('Posts'); 5 5 $parent_file = 'edit.php'; 6 $list_js = true; 6 7 require_once('admin-header.php'); 7 8 -
trunk/wp-admin/link-add.php
r2893 r3422 26 26 } 27 27 28 $xfn = true;28 $xfn_js = true; 29 29 require('admin-header.php'); 30 30 ?> -
trunk/wp-admin/link-categories.php
r3295 r3422 6 6 $this_file='link-categories.php'; 7 7 $parent_file = 'link-manager.php'; 8 $list_js = true; 8 9 9 10 $wpvarstoreset = array('action', 'cat', 'auto_toggle'); -
trunk/wp-admin/link-manager.php
r3295 r3422 7 7 $title = __('Manage Links'); 8 8 $this_file = $parent_file = 'link-manager.php'; 9 $list_js = true; 9 10 10 11 $wpvarstoreset = array('action','cat_id', 'linkurl', 'name', 'image', … … 180 181 181 182 case 'linkedit': { 182 $xfn = true;183 184 185 186 187 188 183 $xfn_js = true; 184 include_once ('admin-header.php'); 185 if ( !current_user_can('manage_links') ) 186 die(__('You do not have sufficient permissions to edit the links for this blog.')); 187 188 $link_id = (int) $_GET['link_id']; 189 189 190 if ( !$link = get_link_to_edit($link_id) ) 190 191 die( __('Link not found.') ); 191 192 192 193 include('edit-link-form.php'); 193 194 break; 194 195 } // end linkedit 195 196 case __("Show"): -
trunk/wp-admin/moderation.php
r3295 r3422 4 4 $title = __('Moderate comments'); 5 5 $parent_file = 'edit.php'; 6 $list_js = true; 6 7 7 8 $wpvarstoreset = array('action', 'item_ignored', 'item_deleted', 'item_approved', 'item_spam', 'feelinglucky'); -
trunk/wp-admin/options-general.php
r3112 r3422 1 1 <?php 2 require_once(' admin.php');2 require_once('./admin.php'); 3 3 4 4 $title = __('General Options'); 5 5 $parent_file = 'options-general.php'; 6 6 7 include(' admin-header.php');7 include('./admin-header.php'); 8 8 ?> 9 9 10 <div class="wrap"> 11 <h2><?php _e('General Options') ?></h2> 12 <form name="form1" method="post" action="options.php"> 13 <input type="hidden" name="action" value="update" /> 14 <input type="hidden" name="page_options" value="blogname,blogdescription,siteurl,admin_email,users_can_register,gmt_offset,date_format,time_format,home,start_of_week,comment_registration,default_role" /> 15 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 10 <div class="wrap"> 11 <h2><?php _e('General Options') ?></h2> 12 <form method="post" action="options.php"> 13 <table class="optiontable"> 16 14 <tr valign="top"> 17 <th width="33%"scope="row"><?php _e('Weblog title:') ?></th>15 <th scope="row"><?php _e('Weblog title:') ?></th> 18 16 <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td> 19 17 </tr> … … 63 61 <fieldset class="options"> 64 62 <legend><?php _e('Date and Time') ?></legend> 65 <table width="100%" cellspacing="2" cellpadding="5" class="editform">63 <table class="optiontable"> 66 64 <tr> 67 <th scope="row" width="33%"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th>65 <th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th> 68 66 <td><code><?php echo gmdate('Y-m-d g:i:s a'); ?></code></td> 69 67 </tr> … … 99 97 </select></td> 100 98 </tr> 99 </table> 100 </fieldset> 101 101 102 </table> 102 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" /> 103 <input type="hidden" name="action" value="update" /> 104 <input type="hidden" name="page_options" value="blogname,blogdescription,siteurl,admin_email,users_can_register,gmt_offset,date_format,time_format,home,start_of_week,comment_registration,default_role" /> 105 </p> 106 </form> 103 107 104 </fieldset>105 <p class="submit">106 <input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" />107 </p>108 </form>109 108 </div> 110 <?php include("admin-footer.php") ?> 109 110 <?php include('./admin-footer.php') ?> -
trunk/wp-admin/options-misc.php
r3421 r3422 15 15 <fieldset class="options"> 16 16 <legend><?php _e('Uploading'); ?></legend> 17 <table width="100%" cellspacing="2" cellpadding="5" class="editform">18 <tr valign="top"> <th scope="row"><?php _e('Store uploads in this folder'); ?>:</th>19 <t d>20 < input name="fileupload_realpath" type="text" id="fileupload_realpath" class="code" value="<?php echo str_replace(ABSPATH, '', get_settings('fileupload_realpath')); ?>" size="40" />17 <table class="editform optiontable"> 18 <tr valign="top"> 19 <th scope="row"><?php _e('Store uploads in this folder'); ?>:</th> 20 <td><input name="fileupload_realpath" type="text" id="fileupload_realpath" class="code" value="<?php echo str_replace(ABSPATH, '', get_settings('fileupload_realpath')); ?>" size="40" /> 21 21 <br /> 22 22 <?php _e('Default is <code>wp-content/uploads</code>'); ?> 23 </td></tr> 24 <tr valign="top"><th scope="row" width="33%"> </th> 23 </td> 24 </tr> 25 <tr> 26 <td></td> 25 27 <td> 26 28 <label for="uploads_use_yearmonth_folders"> … … 28 30 <?php _e('Organize my uploads into month- and year-based folders'); ?> 29 31 </label> 30 </td></tr> 32 </td> 33 </tr> 31 34 </table> 32 35 </fieldset> -
trunk/wp-admin/wp-admin.css
r3349 r3422 295 295 296 296 .submit, .editform th, #postcustomsubmit { 297 text-align: right; 298 } 299 300 .optiontable { 301 width: 100%; 302 } 303 304 .optiontable td, .optiontable th { 305 padding: .5em; 306 } 307 308 .optiontable th { 309 width: 33%; 297 310 text-align: right; 298 311 } … … 903 916 filter: alpha(opacity=80); 904 917 } 918 919 #newcat { width: 120px; margin-right: 5px; } 920 input#catadd { background: #a4a4a4; 921 border-bottom: 1px solid #898989; 922 border-left: 1px solid #bcbcbc; 923 border-right: 1px solid #898989; 924 border-top: 1px solid #bcbcbc; 925 color: #fff; 926 font-size: 10px; 927 padding: 0; 928 margin: 0; 929 font-weight: bold; 930 height: 20px; 931 margin-bottom: 2px; 932 text-align: center; 933 width: 37px; } 934 #howto { 935 font-size: 11px; 936 margin: 0 5px; 937 display: block; 938 } 939 #jaxcat { 940 margin: 0; 941 padding: 0; 942 }
Note: See TracChangeset
for help on using the changeset viewer.