Sha256: 08c6d657f5149a849defdc687a7c7f7c0ecca1c1e7292548847c1d3dd0e3d484

Contents?: true

Size: 734 Bytes

Versions: 8

Compression:

Stored size: 734 Bytes

Contents

/*global
  burp
*/

(function() {
  
  burp.saveMenu = function saveMenu(menu) {
    $.put("./",{menu:JSON.stringify(menu)},function() {
      $.debug("Menu changes saved!");
    });
  };
  
  $.fn.serializeGroup = function() {
    if($(this).is("section.group")) {
      return {
        name:($(this).find("> .group-name").text()),
        children:$(this).find("> ul.children > li").map(function() {
          if($(this).is(".link")) {
            var a = $(this).find('a');
            return {name:a.text(), url:(a.attr("orginial-url") || a.attr("href"))};
          } else if($(this).is(".group")) {
            return $(this).find('> section.group').serializeGroup();
          }
        }).toArray()
      };
    }
  };
}());

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
burp_cms-1.3.7 app/assets/javascripts/burp/menu-functions.js
burp_cms-1.3.6 app/assets/javascripts/burp/menu-functions.js
burp_cms-1.3.5 app/assets/javascripts/burp/menu-functions.js
burp_cms-1.3.4 app/assets/javascripts/burp/menu-functions.js
burp_cms-1.3.3 app/assets/javascripts/burp/menu-functions.js
burp_cms-1.3.2 app/assets/javascripts/burp/menu-functions.js
burp_cms-1.3.1 app/assets/javascripts/burp/menu-functions.js
burp_cms-1.3.0 app/assets/javascripts/burp/menu-functions.js