Dotclear

Changeset 1606:6e2d8e9dd7d7


Ignore:
Timestamp:
08/27/13 21:38:26 (10 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Fix issue #1513 : label can be clicked, like arrow
Update tests

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_post.js

    r1562 r1606  
    115115          // Confirm post deletion 
    116116          $('input[name="delete"]').click(function() { 
    117                     return window.confirm(dotclear.msg.confirm_delete_post); 
     117               return window.confirm(dotclear.msg.confirm_delete_post); 
    118118          }); 
    119119 
     
    121121          $('#notes-area label').toggleWithLegend($('#notes-area').children().not('label'),{ 
    122122               cookie: 'dcx_post_notes', 
     123               legend_click:true, 
    123124               hide: $('#post_notes').val() == '' 
    124125          }); 
    125           $('#create_cat').toggleWithLegend( 
    126                $('#create_cat').parent().children().not('#create_cat'), 
    127                {} // no cookie on new category as we don't use this every day 
    128           ); 
    129           $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 
    130                cookie: 'dcx_post_lang' 
    131           }); 
    132           $('#post_password').parent().toggleWithLegend($('#post_password'),{ 
     126          $('#create_cat').toggleWithLegend($('#create_cat').parent().children().not('#create_cat'),{ 
     127               // no cookie on new category as we don't use this every day 
     128               legend_click: true 
     129          }); 
     130          $('#post_lang').parent().children('label').toggleWithLegend($('#post_lang'),{ 
     131               cookie: 'dcx_post_lang', 
     132               legend_click: true 
     133          }); 
     134          $('#post_password').parent().children('label').toggleWithLegend($('#post_password'),{ 
    133135               cookie: 'dcx_post_password', 
     136               legend_click: true, 
    134137               hide: $('#post_password').val() == '' 
    135138          }); 
    136           $('#post_status').parent().toggleWithLegend($('#post_status'),{ 
    137                cookie: 'dcx_post_status' 
    138           }); 
    139           $('#post_dt').parent().toggleWithLegend($('#post_dt').parent().children().not('label'),{ 
    140                cookie: 'dcx_post_dt' 
    141           }); 
    142           $('#post_format').parent().toggleWithLegend($('#post_format').parent().children().not('label').add($('#post_format').parents('p').next()),{ 
    143                cookie: 'dcx_post_format' 
    144           }); 
    145           $('#cat_id').parent().toggleWithLegend($('#cat_id'),{ 
    146                cookie: 'cat_id' 
    147           }); 
    148           $('#post_url').parent().toggleWithLegend($('#post_url').parent().children().not('label'),{ 
    149                cookie: 'post_url' 
     139          $('#post_status').parent().children('label').toggleWithLegend($('#post_status'),{ 
     140               cookie: 'dcx_post_status', 
     141               legend_click: true 
     142          }); 
     143          $('#post_dt').parent().children('label').toggleWithLegend($('#post_dt').parent().children().not('label'),{ 
     144               cookie: 'dcx_post_dt', 
     145               legend_click: true 
     146          }); 
     147          $('#post_format').parent().children('label').toggleWithLegend($('#post_format'),{ 
     148               cookie: 'dcx_post_format', 
     149               legend_click: true 
     150          }); 
     151          $('#cat_id').parent().children('label').toggleWithLegend($('#cat_id'),{ 
     152               cookie: 'cat_id', 
     153               legend_click: true 
     154          }); 
     155          $('#post_url').parent().children('label').toggleWithLegend($('#post_url').parent().children().not('label'),{ 
     156               cookie: 'post_url', 
     157               legend_click: true 
    150158          }); 
    151159          // We load toolbar on excerpt only when it's ready 
  • plugins/attachments/js/post.js

    r1393 r1606  
    11$(function() { 
    22     $('h5.s-attachments').toggleWithLegend($('.s-attachments').not('h5'),{ 
    3           cookie: 'dcx_attachments' 
     3          cookie: 'dcx_attachments', 
     4          legend_click: true 
    45     }); 
    56}); 
  • plugins/pings/post.js

    r1365 r1606  
    1313          } 
    1414          $('h5.ping-services').toggleWithLegend($('p.ping-services'),{ 
    15                cookie: 'dcx_ping_services' 
     15               cookie: 'dcx_ping_services', 
     16               legend_click: true 
    1617          }); 
    1718     }); 
  • plugins/tags/js/post.js

    r1392 r1606  
    5353                    ')</em>'; 
    5454               }, 
    55                formatResult: function(tag) {  
    56                     return tag.result;  
     55               formatResult: function(tag) { 
     56                    return tag.result; 
    5757               } 
    5858          }); 
    5959     }); 
    60                 
     60 
    6161     $('h5 .s-tags').toggleWithLegend($('.s-tags').not('label'),{ 
    62                cookie: 'post_tags' 
     62          cookie: 'post_tags', 
     63          legend_clik: true 
    6364     }); 
    6465 
  • tests/functional/spec/toggle_with_legend.js

    r1602 r1606  
    3232    it("Chick target must not hide target, when legend_click is true", function() { 
    3333     loadFixtures('menu.html'); 
    34      $('#post_status').parent().toggleWithLegend($('#post_status'),{'legend_click':true}); 
     34     var $label = $('#post_status').parent().children('label'); 
     35     $label.toggleWithLegend($('#post_status'),{'legend_click':true, a_container:false}); 
    3536 
    36      $('#post_status').click(); 
     37     $label.click(); 
     38     expect($('#post_status')).toBeVisible(); 
     39 
     40     var $arrow = $('#post_status').parent().find('img'); 
     41     $arrow.click(); 
    3742     expect($('#post_status')).toBeVisible(); 
    3843 
Note: See TracChangeset for help on using the changeset viewer.

Sites map