Changeset 9084
- Timestamp:
- 10/16/2014 06:20:17 PM (10 years ago)
- Location:
- trunk/src/bp-xprofile
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/admin/css/admin-rtl.css
r8958 r9084 250 250 width: 100%; 251 251 } 252 253 #bp-xprofile-add-field .titlewrap, 254 #bp-xprofile-add-field-group .titlewrap { 255 margin-bottom: 20px; 256 } -
trunk/src/bp-xprofile/admin/css/admin.css
r8952 r9084 250 250 width: 100%; 251 251 } 252 253 #bp-xprofile-add-field .titlewrap, 254 #bp-xprofile-add-field-group .titlewrap { 255 margin-bottom: 20px; 256 } -
trunk/src/bp-xprofile/admin/js/admin.js
r8648 r9084 120 120 } 121 121 122 function titleHint( id ) { 123 id = id || 'title'; 124 125 var title = jQuery('#' + id), titleprompt = jQuery('#' + id + '-prompt-text'); 126 127 if ( '' === title.val() ) { 128 titleprompt.removeClass('screen-reader-text'); 129 } 130 131 titleprompt.click(function(){ 132 jQuery(this).addClass('screen-reader-text'); 133 title.focus(); 134 }); 135 136 title.blur(function(){ 137 if ( '' === this.value ) { 138 titleprompt.removeClass('screen-reader-text'); 139 } 140 }).focus(function(){ 141 titleprompt.addClass('screen-reader-text'); 142 }).keydown(function(e){ 143 titleprompt.addClass('screen-reader-text'); 144 jQuery(this).unbind(e); 145 }); 146 }; 147 122 148 jQuery( document ).ready( function() { 123 149 124 150 // Set focus in Field Title, if we're on the right page 125 151 jQuery( '#bp-xprofile-add-field #title' ).focus(); 126 152 127 153 // Set up deleting options ajax 128 154 jQuery( 'a.ajax-option-delete' ).on( 'click', function() { … … 197 223 // Allow reordering of field options 198 224 enableSortableFieldOptions( jQuery('#fieldtype :selected').val() ); 225 226 // Handle title placeholder text the WordPress way 227 titleHint( 'title' ); 199 228 200 229 // tabs init with a custom tab template and an "add" callback filling in the content -
trunk/src/bp-xprofile/bp-xprofile-classes.php
r9075 r9084 494 494 <?php endif; ?> 495 495 496 <form action="<?php echo esc_url( $action ); ?>" method="post">496 <form id="bp-xprofile-add-field-group" action="<?php echo esc_url( $action ); ?>" method="post"> 497 497 <div id="poststuff"> 498 498 <div id="post-body" class="metabox-holder columns-2"> … … 500 500 <div id="titlediv"> 501 501 <div id="titlewrap"> 502 <label class="screen-reader-text" id="title-prompt-text" for="title"><?php esc_html_e( 'Field Group Title', 'buddypress') ?></label>503 <input type="text" name="group_name" autocomplete="off" id="title" value="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr_x( 'Group Name', 'XProfile admin edit group', 'buddypress' ); ?>" />502 <label id="title-prompt-text" for="title"><?php esc_html_e( 'Field Group Name', 'buddypress') ?></label> 503 <input type="text" name="group_name" id="title" value="<?php echo esc_attr( $this->name ); ?>" autocomplete="off" /> 504 504 </div> 505 505 </div> … … 921 921 <div id="post-body-content"> 922 922 <div id="titlediv"> 923 <input type="text" name="title" id="title" value="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr_x( 'Field Name', 'XProfile admin edit field', 'buddypress' ); ?>" /> 923 <div class="titlewrap"> 924 <label id="title-prompt-text" for="title"><?php echo esc_attr_x( 'Field Name', 'XProfile admin edit field', 'buddypress' ); ?></label> 925 <input type="text" name="title" id="title" value="<?php echo esc_attr( $this->name ); ?>" autocomplete="off" /> 926 </div> 924 927 </div> 925 928 <div class="postbox">
Note: See TracChangeset
for help on using the changeset viewer.