sourcebitsllc / chocolatechip-ui

Mobile Web App Framework
www.chocolatechip-ui.com
MIT License
617 stars 88 forks source link

Deletable List with navigable items #23

Closed nickGermi closed 10 years ago

nickGermi commented 10 years ago

Currently the list can not be navigable if you want it to be deletable, my work around this issue was (using jQuery):

  $(document).on('singletap', 'a.edit,a.done', function(e) {
    var edit = $(e.target).hasClass('edit');
    if(edit){
      $('article.current ul.deletable').find("li").map(function(){
        $(this).attr('data-tmp',$(this).data('goto')).removeAttr('data-goto').removeClass("nav");
      });
    } else {
      $('article.current ul.deletable').find("li").map(function(){
        $(this).attr('data-goto',$(this).data('tmp')).removeAttr('data-tmp').addClass("nav");
      });
    }
  });

This is really not an issue but a suggestion to make navigable lists deletable too