Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | array( |
37 | 37 | 'src' => 'Modules/Toolbar/Toolbar.js', |
38 | 38 | 'class' => 'wikiEditor.config.toolbar', |
39 | | - 'version' => 26 |
| 39 | + 'version' => 27 |
40 | 40 | ), |
41 | 41 | array( |
42 | 42 | 'src' => 'Modules/TemplateEditor/TemplateEditor.js', |
— | — | @@ -44,10 +44,10 @@ |
45 | 45 | ), |
46 | 46 | ), |
47 | 47 | 'combined' => array( |
48 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 28 ), |
| 48 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 29 ), |
49 | 49 | ), |
50 | 50 | 'minified' => array( |
51 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 28 ), |
| 51 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 29 ), |
52 | 52 | ), |
53 | 53 | ); |
54 | 54 | static $messages = array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1106,12 +1106,10 @@ |
1107 | 1107 | <div class="wikieditor-toolbar-field-wrapper">\ |
1108 | 1108 | <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target"></label>\ |
1109 | 1109 | <div id="wikieditor-toolbar-link-int-target-status" style="display: inline; float:right;"></div>\ |
1110 | | - <label rel="wikieditor-toolbar-tool-link-int-target-tooltip" class="wikieditor-toolbar-tool-tooltip"></label>\ |
1111 | 1110 | <input type="text" id="wikieditor-toolbar-link-int-target" style="width: 100%;" />\ |
1112 | 1111 | </div>\ |
1113 | 1112 | <div class="wikieditor-toolbar-field-wrapper">\ |
1114 | 1113 | <label for="wikieditor-toolbar-link-int-text" rel="wikieditor-toolbar-tool-link-int-text"></label>\ |
1115 | | - <label rel="wikieditor-toolbar-tool-link-int-text-tooltip" class="wikieditor-toolbar-tool-tooltip"></label>\ |
1116 | 1114 | <input type="text" id="wikieditor-toolbar-link-int-text" style="width: 100%;" />\ |
1117 | 1115 | </div>\ |
1118 | 1116 | <div class="wikieditor-toolbar-field-wrapper">\ |
— | — | @@ -1225,24 +1223,27 @@ |
1226 | 1224 | $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
1227 | 1225 | }); |
1228 | 1226 | // Setup the tooltips in the textboxes |
| 1227 | + $j( '#wikieditor-toolbar-link-int-target' ) |
| 1228 | + .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) ); |
| 1229 | + $j( '#wikieditor-toolbar-link-int-text' ) |
| 1230 | + .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) ); |
1229 | 1231 | $j( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' ) |
1230 | 1232 | .each( function() { |
| 1233 | + var tooltip = gM( $j( this ).attr( 'id' ) + '-tooltip' ); |
1231 | 1234 | if ( $j( this ).val() == '' ) |
1232 | 1235 | $j( this ) |
1233 | | - .val( $j( this ).prev( 'label' ).text() ) |
1234 | | - .addClass( 'wikieditor-toolbar-dialog-hint' ) |
1235 | | - .prev( 'label' ) |
1236 | | - .css( 'display', 'none' ); |
| 1236 | + .val( $j( this ).data( 'tooltip' ) ) |
| 1237 | + .addClass( 'wikieditor-toolbar-dialog-hint' ); |
1237 | 1238 | } ) |
1238 | 1239 | .focus( function() { |
1239 | 1240 | $j( this ).removeClass( 'wikieditor-toolbar-dialog-hint' ); |
1240 | | - if( $j( this ).val() == $j( this ).prev( 'label' ).text() ) |
| 1241 | + if( $j( this ).val() == $j( this ).data( 'tooltip' ) ) |
1241 | 1242 | $j( this ).val( '' ); |
1242 | 1243 | }) |
1243 | 1244 | .bind( 'blur change', function() { |
1244 | 1245 | if ( $j( this ).val() == '' ) |
1245 | 1246 | $j( this ) |
1246 | | - .val( $j( this ).prev( 'label' ).text() ) |
| 1247 | + .val( $j( this ).data( 'tooltip' ) ) |
1247 | 1248 | .addClass( 'wikieditor-toolbar-dialog-hint' ); |
1248 | 1249 | else |
1249 | 1250 | $j( this ).removeClass( 'wikieditor-toolbar-dialog-hint' ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -10,12 +10,10 @@ |
11 | 11 | <div class="wikieditor-toolbar-field-wrapper">\ |
12 | 12 | <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target"></label>\ |
13 | 13 | <div id="wikieditor-toolbar-link-int-target-status" style="display: inline; float:right;"></div>\ |
14 | | - <label rel="wikieditor-toolbar-tool-link-int-target-tooltip" class="wikieditor-toolbar-tool-tooltip"></label>\ |
15 | 14 | <input type="text" id="wikieditor-toolbar-link-int-target" style="width: 100%;" />\ |
16 | 15 | </div>\ |
17 | 16 | <div class="wikieditor-toolbar-field-wrapper">\ |
18 | 17 | <label for="wikieditor-toolbar-link-int-text" rel="wikieditor-toolbar-tool-link-int-text"></label>\ |
19 | | - <label rel="wikieditor-toolbar-tool-link-int-text-tooltip" class="wikieditor-toolbar-tool-tooltip"></label>\ |
20 | 18 | <input type="text" id="wikieditor-toolbar-link-int-text" style="width: 100%;" />\ |
21 | 19 | </div>\ |
22 | 20 | <div class="wikieditor-toolbar-field-wrapper">\ |
— | — | @@ -40,10 +38,10 @@ |
41 | 39 | status='notexists';else if(typeof page.invalid!='undefined') |
42 | 40 | status='invalid';} |
43 | 41 | cache[target]=status;updateWidget(status);}}));} |
44 | | -$j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').each(function(){if($j(this).val()=='') |
45 | | -$j(this).val($j(this).prev('label').text()).addClass('wikieditor-toolbar-dialog-hint').prev('label').css('display','none');}).focus(function(){$j(this).removeClass('wikieditor-toolbar-dialog-hint');if($j(this).val()==$j(this).prev('label').text()) |
| 42 | +$j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j('#wikieditor-toolbar-link-int-target').data('tooltip',gM('wikieditor-toolbar-tool-link-int-target-tooltip'));$j('#wikieditor-toolbar-link-int-text').data('tooltip',gM('wikieditor-toolbar-tool-link-int-text-tooltip'));$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').each(function(){var tooltip=gM($j(this).attr('id')+'-tooltip');if($j(this).val()=='') |
| 43 | +$j(this).val($j(this).data('tooltip')).addClass('wikieditor-toolbar-dialog-hint');}).focus(function(){$j(this).removeClass('wikieditor-toolbar-dialog-hint');if($j(this).val()==$j(this).data('tooltip')) |
46 | 44 | $j(this).val('');}).bind('blur change',function(){if($j(this).val()=='') |
47 | | -$j(this).val($j(this).prev('label').text()).addClass('wikieditor-toolbar-dialog-hint');else |
| 45 | +$j(this).val($j(this).data('tooltip')).addClass('wikieditor-toolbar-dialog-hint');else |
48 | 46 | $j(this).removeClass('wikieditor-toolbar-dialog-hint');});$j('#wikieditor-toolbar-link-int-target').bind('change keydown paste cut',function(){setTimeout(function(){if(isExternalLink($j('#wikieditor-toolbar-link-int-target').val())) |
49 | 47 | $j('#wikieditor-toolbar-link-type-ext').attr('checked','checked');else |
50 | 48 | $j('#wikieditor-toolbar-link-type-int').attr('checked','checked');if($j('#wikieditor-toolbar-link-int-text').data('untouched')) |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1025,12 +1025,10 @@ |
1026 | 1026 | <div class="wikieditor-toolbar-field-wrapper">\ |
1027 | 1027 | <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target"></label>\ |
1028 | 1028 | <div id="wikieditor-toolbar-link-int-target-status" style="display: inline; float:right;"></div>\ |
1029 | | - <label rel="wikieditor-toolbar-tool-link-int-target-tooltip" class="wikieditor-toolbar-tool-tooltip"></label>\ |
1030 | 1029 | <input type="text" id="wikieditor-toolbar-link-int-target" style="width: 100%;" />\ |
1031 | 1030 | </div>\ |
1032 | 1031 | <div class="wikieditor-toolbar-field-wrapper">\ |
1033 | 1032 | <label for="wikieditor-toolbar-link-int-text" rel="wikieditor-toolbar-tool-link-int-text"></label>\ |
1034 | | - <label rel="wikieditor-toolbar-tool-link-int-text-tooltip" class="wikieditor-toolbar-tool-tooltip"></label>\ |
1035 | 1033 | <input type="text" id="wikieditor-toolbar-link-int-text" style="width: 100%;" />\ |
1036 | 1034 | </div>\ |
1037 | 1035 | <div class="wikieditor-toolbar-field-wrapper">\ |
— | — | @@ -1144,24 +1142,27 @@ |
1145 | 1143 | $j(this).text( gM( $j(this).attr( 'rel' ) ) ); |
1146 | 1144 | }); |
1147 | 1145 | // Setup the tooltips in the textboxes |
| 1146 | + $j( '#wikieditor-toolbar-link-int-target' ) |
| 1147 | + .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) ); |
| 1148 | + $j( '#wikieditor-toolbar-link-int-text' ) |
| 1149 | + .data( 'tooltip', gM( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) ); |
1148 | 1150 | $j( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' ) |
1149 | 1151 | .each( function() { |
| 1152 | + var tooltip = gM( $j( this ).attr( 'id' ) + '-tooltip' ); |
1150 | 1153 | if ( $j( this ).val() == '' ) |
1151 | 1154 | $j( this ) |
1152 | | - .val( $j( this ).prev( 'label' ).text() ) |
1153 | | - .addClass( 'wikieditor-toolbar-dialog-hint' ) |
1154 | | - .prev( 'label' ) |
1155 | | - .css( 'display', 'none' ); |
| 1155 | + .val( $j( this ).data( 'tooltip' ) ) |
| 1156 | + .addClass( 'wikieditor-toolbar-dialog-hint' ); |
1156 | 1157 | } ) |
1157 | 1158 | .focus( function() { |
1158 | 1159 | $j( this ).removeClass( 'wikieditor-toolbar-dialog-hint' ); |
1159 | | - if( $j( this ).val() == $j( this ).prev( 'label' ).text() ) |
| 1160 | + if( $j( this ).val() == $j( this ).data( 'tooltip' ) ) |
1160 | 1161 | $j( this ).val( '' ); |
1161 | 1162 | }) |
1162 | 1163 | .bind( 'blur change', function() { |
1163 | 1164 | if ( $j( this ).val() == '' ) |
1164 | 1165 | $j( this ) |
1165 | | - .val( $j( this ).prev( 'label' ).text() ) |
| 1166 | + .val( $j( this ).data( 'tooltip' ) ) |
1166 | 1167 | .addClass( 'wikieditor-toolbar-dialog-hint' ); |
1167 | 1168 | else |
1168 | 1169 | $j( this ).removeClass( 'wikieditor-toolbar-dialog-hint' ); |