Changeset 3768:42e99b4be675 for plugins
- Timestamp:
- 07/06/18 16:37:54 (7 years ago)
- Branch:
- default
- Location:
- plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/blowupConfig/js/config.js
r3709 r3768 69 69 // Code import 70 70 var e = $('#bu_export_content'); 71 e.toggle();72 71 73 var img = document.createElement('img'); 74 img.src = dotclear.img_plus_src; 75 img.alt = dotclear.img_plus_alt; 76 img.className = 'expand'; 77 $(img).css('cursor', 'pointer'); 78 $(document.createTextNode(' ')).prependTo('#bu_export'); 79 $(img).prependTo('#bu_export'); 80 81 $(img).click(function() { 82 if (e.css('display') == 'none') { 83 this.src = dotclear.img_minus_src; 84 this.alt = dotclear.img_minus_alt; 85 } else { 86 this.src = dotclear.img_plus_src; 87 this.alt = dotclear.img_plus_alt; 88 } 89 e.toggle(); 90 }); 72 $('#bu_export').toggleWithLegend($(e),{ 73 legend_click: true 74 }) 91 75 92 76 var a = document.createElement('a'); -
plugins/widgets/js/widgets.js
r3709 r3768 13 13 title.empty().append(order).append(link).append(tools).append(br); 14 14 15 var img = document.createElement('img'); 16 img.src = dotclear.img_plus_src; 17 img.alt = dotclear.img_plus_alt; 18 img.className = 'expand'; 19 $(img).css('cursor', 'pointer'); 20 img.onclick = function() { 15 var b = document.createElement('input'); 16 b.setAttribute('type', 'submit'); 17 b.className = 'details-cmd'; 18 b.value = dotclear.img_plus_txt; 19 b.setAttribute('aria-label', dotclear.img_plus_alt); 20 b.onclick = function(e) { 21 e.preventDefault(); 21 22 dotclear.viewPostContent($(this).parents('li')); 22 23 }; … … 25 26 dotclear.viewPostContent($(this).parents('li')); 26 27 }); 27 title.prepend( img);28 title.prepend(b); 28 29 }; 29 30 30 31 dotclear.viewPostContent = function(line, action) { 31 32 action = action || 'toogle'; 32 var img = line.find('. expand');33 var isopen = img.attr('a lt') == dotclear.img_plus_alt;33 var img = line.find('.details-cmd'); 34 var isopen = img.attr('aria-label') == dotclear.img_plus_alt; 34 35 35 36 if (action == 'close' || (action == 'toogle' && !isopen)) { 36 37 line.find('.widgetSettings').hide(); 37 img.attr(' src', dotclear.img_plus_src);38 img.attr('a lt', dotclear.img_plus_alt);38 img.attr('value', dotclear.img_plus_txt); 39 img.attr('aria-label', dotclear.img_plus_alt); 39 40 } else if (action == 'open' || (action == 'toogle' && isopen)) { 40 41 line.find('.widgetSettings').show(); 41 img.attr(' src', dotclear.img_minus_src);42 img.attr('a lt', dotclear.img_minus_alt);42 img.attr('value', dotclear.img_minus_txt); 43 img.attr('aria-label', dotclear.img_minus_alt); 43 44 } 44 45
Note: See TracChangeset
for help on using the changeset viewer.