Sha256: f911c118a231dd920a4784cea0bfa46ed8b4b9022564b321e45bc59bee90ccc6

Contents?: true

Size: 1.26 KB

Versions: 38

Compression:

Stored size: 1.26 KB

Contents

/*global
  showFormInPopover
*/


$(function() {
  
  $(function() {
    
    $(document).on('click',".dnd-editable-menu.not-editable a",function(event) {
      event.preventDefault();
    });
    
    $(document).on('click',".dnd-editable-menu.editable a, .dnd-editable-menu.editable .group-name",function(event) {
      event.preventDefault();
      
      var target = $(event.target);
      
      if(target.is(".group-name")) {
        target = target.closest("section.group");
      }
      
      // We dont do editing of links in the "Pages not in the above menu"
      if($(target).closest('section[id]').length === 0) {
        return;
      }
      
      var id = $(target).attr('id');
      
      var path = $(target).is("a") ? "./links/"+id : "./groups/"+id;
      
      $.get(path+"/edit",function(data) {
        showFormInPopover($(data).find("form"), path);
      });
    });
  });
  
  
  $(function() {
    
    // Popup for edit and new page
    $(document).on('click',"a.new-link-link, a.new-group-link",function(event) {
      event.preventDefault();
      
      var target = $(event.target);
      
      var path = target.attr('href');
      
      $.get(path,function(data) {
        showFormInPopover($(data).find("form"), path);
      });
    });
  });
  
  
});

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
burp_cms-1.7.1 app/assets/javascripts/burp/edit-links.js
burp_cms-1.7.0 app/assets/javascripts/burp/edit-links.js
burp_cms-1.6.0 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.13 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.12 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.11 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.10 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.9 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.8 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.7 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.6 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.5 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.4 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.3 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.2 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.1 app/assets/javascripts/burp/edit-links.js
burp_cms-1.5.0 app/assets/javascripts/burp/edit-links.js
burp_cms-1.4.1 app/assets/javascripts/burp/edit-links.js
burp_cms-1.4.0 app/assets/javascripts/burp/edit-links.js
burp_cms-1.3.33 app/assets/javascripts/burp/edit-links.js