Changeset 3843:f6a2d62807c6
- Timestamp:
- 09/01/18 09:28:56 (7 years ago)
- Branch:
- 2.14
- source:
- d2616cbea4808bdd0cbc686d6548ea61810e05dd
- Location:
- admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/common.js
r3805 r3843 95 95 var toggle = function(i, speed) { 96 96 speed = speed || 0; 97 var b = $(i).get(0); 97 98 if (p.hide) { 98 $(i).get(0).value = p.img_on_txt; 99 $(i).get(0).setAttribute('aria-label', p.img_on_alt); 99 b.firstChild.data = p.img_on_txt; 100 b.setAttribute('value', p.img_on_txt); 101 b.setAttribute('aria-label', p.img_on_alt); 100 102 target.addClass('hide'); 101 103 } else { 102 $(i).get(0).value = p.img_off_txt; 103 $(i).get(0).setAttribute('aria-label', p.img_off_alt); 104 b.firstChild.data = p.img_off_txt; 105 b.setAttribute('value', p.img_off_txt); 106 b.setAttribute('aria-label', p.img_off_alt); 104 107 target.removeClass('hide'); 105 108 if (p.fn) { … … 122 125 }; 123 126 return this.each(function() { 124 var b = document.createElement(' input');125 b.setAttribute('type', ' submit');127 var b = document.createElement('button'); 128 b.setAttribute('type', 'button'); 126 129 b.className = 'details-cmd'; 127 130 b.value = p.img_on_txt; 128 b.setAttribute('aria-label', p.img_off_alt); 131 b.setAttribute('aria-label', p.img_on_alt); 132 var t = document.createTextNode(p.img_on_txt); 133 b.appendChild(t); 129 134 130 135 var ctarget = p.legend_click ? this : b; … … 177 182 }; 178 183 var singleExpander = function singleExpander(line) { 179 $('< input class="details-cmd" type="submit" value="' + dotclear.img_plus_txt + '" aria-label="' + dotclear.img_plus_alt + '"/>').click(function(e) {184 $('<button type="button" class="details-cmd" aria-label="' + dotclear.img_plus_alt + '">' + dotclear.img_plus_txt + '</button>').click(function (e) { 180 185 toggleArrow(this); 181 186 $.expandContent.options.callback.call(this, line); … … 184 189 }; 185 190 var multipleExpander = function multipleExpander(line, lines) { 186 $('< input class="details-cmd" type="submit" value="' + dotclear.img_plus_txt + '" aria-label="' + dotclear.img_plus_alt + '"/>').click(function(e) {191 $('<button type="button" class="details-cmd" aria-label="' + dotclear.img_plus_alt + '">' + dotclear.img_plus_txt + '</button>').click(function (e) { 187 192 var that = this; 188 193 var action = toggleArrow(this); … … 204 209 } 205 210 if (action == 'open') { 206 button.value = dotclear.img_minus_txt; 211 button.firstChild.data = dotclear.img_minus_txt; 212 button.setAttribute('value', dotclear.img_minus_txt); 207 213 button.setAttribute('aria-label', dotclear.img_minus_alt); 208 214 } else { 209 button.value = dotclear.img_plus_txt; 215 button.firstChild.data = dotclear.img_plus_txt; 216 button.setAttribute('value', dotclear.img_plus_txt); 210 217 button.setAttribute('aria-label', dotclear.img_plus_alt); 211 218 } … … 244 251 }; 245 252 var textToggler = function(o) { 246 var b = $('< input class="details-cmd" type="submit" value="' + p.img_on_txt + '" aria-label="' + p.img_on_alt + '"/>');253 var b = $('<button type="button" class="details-cmd" aria-label="' + p.img_on_alt + '">' + p.img_on_txt + '</button>'); 247 254 o.css('cursor', 'pointer'); 248 255 var hide = true; … … 258 265 }); 259 266 hide = !hide; 260 var img = $(this).find(' input.details-cmd');267 var img = $(this).find('button.details-cmd'); 261 268 if (!hide) { 269 img.html(p.img_off_txt); 262 270 img.attr('value', p.img_off_txt); 263 271 img.attr('aria-label', p.img_off_alt); 264 272 } else { 273 img.html(p.img_on_txt); 265 274 img.attr('value', p.img_on_txt); 266 275 img.attr('aria-label', p.img_on_alt); … … 278 287 var select = $(); 279 288 img.click(function(e) { 289 e.preventDefault(); 280 290 return toggle(); 281 e.preventDefault();282 291 }); 283 292 $('#content').append(img); -
admin/style/default-dark.css
r3787 r3843 1335 1335 padding: 0; } 1336 1336 1337 input.details-cmd {1337 button.details-cmd { 1338 1338 font-size: 0.9em; 1339 1339 border: none; … … 1343 1343 color: currentColor; 1344 1344 background: transparent; } 1345 input.details-cmd:hover, input.details-cmd:focus {1345 button.details-cmd:hover, button.details-cmd:focus { 1346 1346 background: transparent; 1347 1347 color: #bee74b; } … … 2101 2101 padding-bottom: 6px; 2102 2102 font-size: 1em; } 2103 #login-screen input.details-cmd {2104 width: auto;2105 margin: 0 5px 0 0;2106 padding: 0; }2107 2103 #login-screen #issue { 2108 2104 margin-left: 1.33em; -
admin/style/default.css
r3787 r3843 1335 1335 padding: 0; } 1336 1336 1337 input.details-cmd {1337 button.details-cmd { 1338 1338 font-size: 0.9em; 1339 1339 border: none; … … 1343 1343 color: currentColor; 1344 1344 background: transparent; } 1345 input.details-cmd:hover, input.details-cmd:focus {1345 button.details-cmd:hover, button.details-cmd:focus { 1346 1346 background: transparent; 1347 1347 color: #bee74b; } … … 2101 2101 padding-bottom: 6px; 2102 2102 font-size: 1em; } 2103 #login-screen input.details-cmd {2104 width: auto;2105 margin: 0 5px 0 0;2106 padding: 0; }2107 2103 #login-screen #issue { 2108 2104 margin-left: 1.33em; -
admin/style/scss/partials/_auth.scss
r3770 r3842 51 51 font-size: 1em; 52 52 } 53 input.details-cmd {54 width: auto;55 margin: 0 5px 0 0;56 padding: 0;57 }58 53 #issue { 59 54 margin-left: 1.33em; -
admin/style/scss/partials/_buttons.scss
r3768 r3842 208 208 } 209 209 210 input.details-cmd {210 button.details-cmd { 211 211 font-size: 0.9em; 212 212 border: none;
Note: See TracChangeset
for help on using the changeset viewer.