Better tab order, indenting

git-svn-id: https://develop.svn.wordpress.org/trunk@2747 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-08-03 01:56:02 +00:00
parent e0dd38aa87
commit 68ee8caad4
2 changed files with 41 additions and 41 deletions

View File

@ -7,45 +7,45 @@ $parent_file = 'options-general.php';
function add_js() { function add_js() {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
function GetElementsWithClassName(elementName, className) { function GetElementsWithClassName(elementName, className) {
var allElements = document.getElementsByTagName(elementName); var allElements = document.getElementsByTagName(elementName);
var elemColl = new Array(); var elemColl = new Array();
for (i = 0; i < allElements.length; i++) { for (i = 0; i < allElements.length; i++) {
if (allElements[i].className == className) { if (allElements[i].className == className) {
elemColl[elemColl.length] = allElements[i]; elemColl[elemColl.length] = allElements[i];
} }
} }
return elemColl; return elemColl;
} }
function upit() { function upit() {
var inputColl = GetElementsWithClassName('input', 'tog'); var inputColl = GetElementsWithClassName('input', 'tog');
var structure = document.getElementById('permalink_structure'); var structure = document.getElementById('permalink_structure');
var inputs = ''; var inputs = '';
for (i = 0; i < inputColl.length; i++) { for (i = 0; i < inputColl.length; i++) {
if ( inputColl[i].checked && inputColl[i].value != '') { if ( inputColl[i].checked && inputColl[i].value != '') {
inputs += inputColl[i].value + ' '; inputs += inputColl[i].value + ' ';
} }
} }
inputs = inputs.substr(0,inputs.length - 1); inputs = inputs.substr(0,inputs.length - 1);
if ( 'custom' != inputs ) if ( 'custom' != inputs )
structure.value = inputs; structure.value = inputs;
} }
function blurry() { function blurry() {
if (!document.getElementById) return; if (!document.getElementById) return;
var aInputs = document.getElementsByTagName('input'); var aInputs = document.getElementsByTagName('input');
for (var i = 0; i < aInputs.length; i++) { for (var i = 0; i < aInputs.length; i++) {
aInputs[i].onclick = aInputs[i].onkeyup = upit; aInputs[i].onclick = aInputs[i].onkeyup = upit;
} }
} }
window.onload = blurry; window.onload = blurry;
//]]> //]]>
</script> </script>
<?php <?php
} }
add_filter('admin_head', 'add_js'); add_filter('admin_head', 'add_js');

View File

@ -228,10 +228,10 @@ if ( $error )
<p><label><?php _e('Username:') ?><br /><input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label></p> <p><label><?php _e('Username:') ?><br /><input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label></p>
<p><label><?php _e('Password:') ?><br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label></p> <p><label><?php _e('Password:') ?><br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label></p>
<p> <p>
<label><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> <label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
<?php _e('Remember me'); ?></label></p> <?php _e('Remember me'); ?></label></p>
<p class="submit"> <p class="submit">
<input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> &raquo;" tabindex="3" /> <input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> &raquo;" tabindex="4" />
<input type="hidden" name="redirect_to" value="<?php echo $redirect_to; ?>" /> <input type="hidden" name="redirect_to" value="<?php echo $redirect_to; ?>" />
</p> </p>
</form> </form>