burp_cms 1.3.7 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@
11
11
  // GO AFTER THE REQUIRES BELOW.
12
12
  //
13
13
  //= require jquery
14
- //= require jquery-ui
14
+ //= require jquery.ui.all
15
15
  //= require jquery_ujs
16
16
  //= require ./burp
17
17
  //= require_tree .
@@ -0,0 +1,110 @@
1
+ /*global
2
+
3
+ */
4
+
5
+
6
+ $(function() {
7
+
8
+ $(function() {
9
+
10
+ $(document).on('click',".dnd-editable-menu.not-editable a",function(event) {
11
+ event.preventDefault();
12
+ });
13
+
14
+ $(document).on('click',".dnd-editable-menu.editable a, .dnd-editable-menu.editable .group-name",function(event) {
15
+ event.preventDefault();
16
+
17
+ var target = $(event.target);
18
+
19
+ if(target.is(".group-name")) {
20
+ target = target.closest("section.group");
21
+ }
22
+
23
+ // We dont do editing of links in the "Pages not in the above menu"
24
+ if($(target).closest('section[id]').length === 0) {
25
+ return;
26
+ }
27
+
28
+ var id = $(target).attr('id');
29
+
30
+ var path = $(target).is("a") ? "./links/"+id : "./groups/"+id;
31
+
32
+ $.get(path+"/edit",function(data) {
33
+
34
+ var the_form = $(data).find("form");
35
+ the_form.attr("action",path);
36
+
37
+ $("#my-pop-over").remove();
38
+ $('.modal').clone().attr("id",'my-pop-over').appendTo("body");
39
+ $("#my-pop-over .modal-body").append(the_form);
40
+
41
+ $("#my-pop-over .modal-header h3").text(the_form.find(" > fieldset > legend").text());
42
+ the_form.find(" > fieldset > legend").remove();
43
+
44
+ the_form.find(".form-actions").hide();
45
+ the_form.find(".form-actions button").each(function() {
46
+ var _this = this;
47
+ var new_button = $(this).clone().attr("onclick",'');
48
+ new_button.appendTo("#my-pop-over .modal-footer");
49
+ new_button.click(function() {
50
+ if($(this).text() === "Cancel") {
51
+ $("#my-pop-over").modal("hide");
52
+ } else {
53
+ $(_this).click();
54
+ }
55
+ });
56
+ });
57
+
58
+ $("#my-pop-over").modal('show').one('shown',function() {
59
+ $(this).find('input').not("input[type=button],input[type=hidden],input[type=submit]").first().focus();
60
+ });
61
+ });
62
+ });
63
+ });
64
+
65
+
66
+ $(function() {
67
+
68
+ // Popup for edit and new page
69
+ $(document).on('click',"a.new-link-link, a.new-group-link",function(event) {
70
+ event.preventDefault();
71
+
72
+ var target = $(event.target);
73
+
74
+ var path = target.attr('href');
75
+
76
+ $.get(path,function(data) {
77
+
78
+ var the_form = $(data).find("form");
79
+ the_form.attr("action",path.replace(/\/(edit|new)$/,''));
80
+
81
+ $("#my-pop-over").remove();
82
+ $('.modal').clone().attr("id",'my-pop-over').appendTo("body");
83
+ $("#my-pop-over .modal-body").append(the_form);
84
+
85
+ $("#my-pop-over .modal-header h3").text(the_form.find(" > fieldset > legend").text());
86
+ the_form.find(" > fieldset > legend").remove();
87
+
88
+ the_form.find(".form-actions").hide();
89
+ the_form.find(".form-actions button").each(function() {
90
+ var _this = this;
91
+ var new_button = $(this).clone().attr("onclick",'');
92
+ new_button.appendTo("#my-pop-over .modal-footer");
93
+ new_button.click(function() {
94
+ if($(this).text() === "Cancel") {
95
+ $("#my-pop-over").modal("hide");
96
+ } else {
97
+ $(_this).click();
98
+ }
99
+ });
100
+ });
101
+
102
+ $("#my-pop-over").modal('show').one('shown',function() {
103
+ $(this).find('input').not("input[type=button],input[type=hidden],input[type=submit]").first().focus();
104
+ });
105
+ });
106
+ });
107
+ });
108
+
109
+
110
+ });
@@ -1,13 +1,24 @@
1
1
  /*global
2
- burp
2
+
3
3
  */
4
4
 
5
5
  $(function() {
6
6
 
7
-
8
-
9
- $('section.group li.link, section.group section.group').prepend('<span class="drag-handel">Drag</span>');
10
-
7
+ function serializeGroup(element) {
8
+ if($(element).is("section.group")) {
9
+ return {
10
+ name:($(element).find("> .group-name").text()),
11
+ children:$(element).find("> ul.children > li").map(function() {
12
+ if($(this).is(".link")) {
13
+ var a = $(this).find('a');
14
+ return {name:a.text(), url:(a.attr("orginial-url") || a.attr("href"))};
15
+ } else if($(this).is(".group")) {
16
+ return serializeGroup($(this).find('> section.group'));
17
+ }
18
+ }).toArray()
19
+ };
20
+ }
21
+ }
11
22
 
12
23
  var rects = [];
13
24
 
@@ -72,57 +83,79 @@ $(function() {
72
83
  return rect;
73
84
  }
74
85
 
75
- $('.dnd-editable-menu > section.group li.link, .dnd-editable-menu > section.group li.group').draggable({
76
- handle: '.drag-handel',
77
- opacity: 0.5,
78
- helper: 'clone',
79
- distance: 10,
80
- start: function(event, ui) {
81
- $(event.target).addClass("draging");
82
- rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
83
- },
84
- stop: function(event, ui) {
85
- rects = [];
86
- $(event.target).removeClass("draging");
86
+ function initDND(elements) {
87
+
88
+ elements
89
+ .prepend('<span class="drag-handel">Drag</span>')
90
+ .draggable({
91
+ handle: '.drag-handel',
92
+ opacity: 0.5,
93
+ helper: 'clone',
94
+ distance: 10,
95
+ start: function(event, ui) {
96
+ $(event.target).addClass("draging");
97
+ rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
98
+ },
99
+ stop: function(event, ui) {
100
+ rects = [];
101
+ $(event.target).removeClass("draging");
87
102
 
88
- // Need to wait a bit as the ui-helper is still in the dom
89
- setTimeout(function() {
90
- burp.saveMenu($(".dnd-editable-menu > section.group").first().serializeGroup());
91
- },10);
92
- },
93
- drag: function(event, ui) {
94
- var rect = currentRect(event);
103
+ // Need to wait a bit as the ui-helper is still in the dom
104
+ setTimeout(function() {
105
+ var menu = serializeGroup($(".dnd-editable-menu > section.group").first());
106
+
107
+ $.put("./",{menu:JSON.stringify(menu)},function() {
108
+ $.get("./edit?no_layout=true",function(data) {
109
+ var menuHtml = $("<div></div>").append(data).find('.dnd-editable-menu').first().html()
110
+ $('.dnd-editable-menu').first().html(menuHtml);
111
+ initDND($('.dnd-editable-menu').first().find('> section.group li.link, > section.group li.group'));
112
+ });
113
+ });
114
+ },10);
115
+ },
116
+ drag: function(event, ui) {
117
+ var rect = currentRect(event);
95
118
 
96
- if(rect) {
119
+ if(rect) {
97
120
 
98
- var x = event.pageX;
121
+ var x = event.pageX;
99
122
 
100
- if(rect.element === event.target) {
123
+ if(rect.element === event.target) {
101
124
 
102
- // Add to above group if enough to the right
103
- if($(rect.element).is('.link') && $(rect.element).prev('.group') && rect.left + 50 < x) {
104
- $(event.target).closest("li.child").prependTo($(rect.element).prev().find('> section.group > ul.children'));
105
- rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
106
- } else {
125
+ // Add to above group if enough to the right
126
+ if($(rect.element).is('.link') && $(rect.element).prev('.group') && rect.left + 50 < x) {
127
+ $(event.target).closest("li.child").prependTo($(rect.element).prev().find('> section.group > ul.children'));
128
+ rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
129
+ } else {
130
+ return;
131
+ // Cant drop on self
132
+ }
133
+ } else if(rect.element === ui.helper[0]) {
134
+ // Cant drop ui helper
135
+ return;
136
+ } else if($(event.target).has(rect.element).length > 0) {
137
+ // Cant drop on a child of self
107
138
  return;
108
- // Cant drop on self
109
- }
110
- } else if(rect.element === ui.helper[0]) {
111
- // Cant drop ui helper
112
- return;
113
- } else if($(event.target).has(rect.element).length > 0) {
114
- // Cant drop on a child of self
115
- return;
116
- } else if($(rect.element).is("ul.children")) {
117
- // Can drop on an empty list
118
- $(event.target).closest("li.child").appendTo(rect.element);
119
- rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
120
- } else if($(rect.element).is("li.group")) {
121
- // Can drop on an empty list of a group
122
- if(rect.left + 50 < x) {
123
- // Add as child
124
- $(event.target).closest("li.child").prependTo($(rect.element).find('> section.group > ul.children'));
139
+ } else if($(rect.element).is("ul.children")) {
140
+ // Can drop on an empty list
141
+ $(event.target).closest("li.child").appendTo(rect.element);
125
142
  rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
143
+ } else if($(rect.element).is("li.group")) {
144
+ // Can drop on an empty list of a group
145
+ if(rect.left + 50 < x) {
146
+ // Add as child
147
+ $(event.target).closest("li.child").prependTo($(rect.element).find('> section.group > ul.children'));
148
+ rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
149
+ } else {
150
+ if(rect.withinTopHalf(event)) {
151
+ $(event.target).closest("li.child").insertBefore($(rect.element).closest("li.child"));
152
+ rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
153
+ } else if(rect.withinBottomHalf(event)) {
154
+ $(event.target).closest("li.child").insertAfter($(rect.element).closest("li.child"));
155
+ rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
156
+ }
157
+ }
158
+
126
159
  } else {
127
160
  if(rect.withinTopHalf(event)) {
128
161
  $(event.target).closest("li.child").insertBefore($(rect.element).closest("li.child"));
@@ -132,20 +165,13 @@ $(function() {
132
165
  rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
133
166
  }
134
167
  }
135
-
136
- } else {
137
- if(rect.withinTopHalf(event)) {
138
- $(event.target).closest("li.child").insertBefore($(rect.element).closest("li.child"));
139
- rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
140
- } else if(rect.withinBottomHalf(event)) {
141
- $(event.target).closest("li.child").insertAfter($(rect.element).closest("li.child"));
142
- rects = getRects($(".dnd-editable-menu > section.group"),"li.child, ul.children");
143
- }
144
168
  }
145
- }
146
169
 
147
170
 
148
- }
149
- });
171
+ }
172
+ });
173
+ }
174
+
175
+ initDND($('.dnd-editable-menu > section.group li.link, .dnd-editable-menu > section.group li.group'));
150
176
 
151
177
  });
@@ -286,8 +286,9 @@ $(function() {
286
286
  initDone = true;
287
287
 
288
288
  wrapContent();
289
- selectSnippet(snippets().names[0]);
289
+ selectSnippet(snippets().names.sort(function(a, b) { return a.toLowerCase() > b.toLowerCase(); })[0]);
290
290
  addEditor();
291
+
291
292
  loadSnippet();
292
293
 
293
294
  $('#gallery').trigger('refresh');
@@ -3,7 +3,8 @@
3
3
  .dnd-editable-menu {
4
4
 
5
5
  .group {
6
- padding: 0px;
6
+ padding: 0px;
7
+ display: inline;
7
8
  }
8
9
 
9
10
  > .group {
@@ -83,5 +84,30 @@
83
84
  background: #F89406;
84
85
  }
85
86
  }
87
+ }
88
+
89
+ .dnd-editable-menu.not-editable {
90
+ a {
91
+ text-decoration: none;
92
+ cursor: default;
93
+ color: inherit;
94
+ }
86
95
 
96
+ .group .group-name {
97
+ color: inherit;
98
+ cursor: default;
99
+ font-size: inherit;
100
+ line-height: inherit;
101
+ font-weight: inherit;
102
+ display: inline;
103
+ margin: 0px;
104
+
105
+ &:hover {
106
+ color: inherit;
107
+ }
108
+ }
109
+
110
+ > .group > .group-name {
111
+ display:none;
112
+ }
87
113
  }
@@ -20,6 +20,8 @@ module Burp
20
20
  @pages_not_in_menu.children << Link.new(page.title => page.path)
21
21
  end
22
22
  end
23
+
24
+ render :layout => false if params[:no_layout]
23
25
  end
24
26
 
25
27
  def update
@@ -24,7 +24,7 @@
24
24
 
25
25
  <h1><%= @menu.name.capitalize %></h1>
26
26
  <hr>
27
- <span class="dnd-editable-menu">
27
+ <span class="dnd-editable-menu editable">
28
28
  <%= @menu.to_html %>
29
29
  </span>
30
30
 
@@ -33,7 +33,7 @@
33
33
 
34
34
  <hr>
35
35
  <h3>Pages not in the above menu</h3>
36
- <span class="dnd-editable-menu">
36
+ <span class="dnd-editable-menu not-editable">
37
37
  <%= @pages_not_in_menu.to_html %>
38
38
  </span>
39
39
 
@@ -50,108 +50,3 @@
50
50
  <div class="modal-footer">
51
51
  </div>
52
52
  </div>
53
-
54
- <script type="text/javascript" charset="utf-8">
55
-
56
- <% content_for :inline_javascript do %>
57
-
58
- $(function() {
59
- $('.dnd-editable-menu').on('click',"a, .group-name",function(event) {
60
- event.preventDefault();
61
-
62
- var target = $(event.target);
63
-
64
- if(target.is(".group-name")) {
65
- target = target.closest("section.group");
66
- }
67
-
68
- // We dont do editing of links in the "Pages not in the above menu"
69
- if($(target).closest('section[id]').length == 0) {
70
- return;
71
- }
72
-
73
- var id = $(target).attr('id');
74
-
75
- var path = $(target).is("a") ? "./links/"+id : "./groups/"+id;
76
-
77
- $.get(path+"/edit",function(data) {
78
-
79
- var the_form = $(data).find("form");
80
- the_form.attr("action",path);
81
-
82
- $("#my-pop-over").remove();
83
- $('.modal').clone().attr("id",'my-pop-over').appendTo("body");
84
- $("#my-pop-over .modal-body").append(the_form);
85
-
86
- $("#my-pop-over .modal-header h3").text(the_form.find(" > fieldset > legend").text());
87
- the_form.find(" > fieldset > legend").remove();
88
-
89
- the_form.find(".form-actions").hide();
90
- the_form.find(".form-actions button").each(function() {
91
- var _this = this;
92
- var new_button = $(this).clone().attr("onclick",'');
93
- new_button.appendTo("#my-pop-over .modal-footer");
94
- new_button.click(function() {
95
- if($(this).text() === "Cancel") {
96
- $("#my-pop-over").modal("hide");
97
- } else {
98
- $(_this).click();
99
- }
100
- });
101
- });
102
-
103
- $("#my-pop-over").modal('show').one('shown',function() {
104
- $(this).find('input').not("input[type=button],input[type=hidden],input[type=submit]").first().focus();
105
- });
106
- });
107
- });
108
- });
109
-
110
-
111
- $(function() {
112
-
113
- // Popup for edit and new page
114
- $('.container').on('click',"a.new-link-link, a.new-group-link",function(event) {
115
- event.preventDefault();
116
-
117
- var target = $(event.target);
118
-
119
- var path = target.attr('href');
120
-
121
- $.get(path,function(data) {
122
-
123
- var the_form = $(data).find("form");
124
- the_form.attr("action",path.replace(/\/(edit|new)$/,''));
125
-
126
- $("#my-pop-over").remove();
127
- $('.modal').clone().attr("id",'my-pop-over').appendTo("body");
128
- $("#my-pop-over .modal-body").append(the_form);
129
-
130
- $("#my-pop-over .modal-header h3").text(the_form.find(" > fieldset > legend").text());
131
- the_form.find(" > fieldset > legend").remove();
132
-
133
- the_form.find(".form-actions").hide();
134
- the_form.find(".form-actions button").each(function() {
135
- var _this = this;
136
- var new_button = $(this).clone().attr("onclick",'');
137
- new_button.appendTo("#my-pop-over .modal-footer");
138
- new_button.click(function() {
139
- if($(this).text() === "Cancel") {
140
- $("#my-pop-over").modal("hide");
141
- } else {
142
- $(_this).click();
143
- }
144
- });
145
- });
146
-
147
- $("#my-pop-over").modal('show').one('shown',function() {
148
- $(this).find('input').not("input[type=button],input[type=hidden],input[type=submit]").first().focus();
149
- });
150
- });
151
- });
152
- });
153
-
154
-
155
- <% end %>
156
-
157
- </script>
data/lib/burp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Burp
2
- VERSION = "1.3.7"
2
+ VERSION = "1.3.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burp_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.7
4
+ version: 1.3.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-20 00:00:00.000000000 Z
12
+ date: 2013-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: burp_cms
@@ -763,6 +763,150 @@ dependencies:
763
763
  - - ~>
764
764
  - !ruby/object:Gem::Version
765
765
  version: 1.8.4
766
+ - !ruby/object:Gem::Dependency
767
+ name: rdoc
768
+ requirement: !ruby/object:Gem::Requirement
769
+ none: false
770
+ requirements:
771
+ - - ~>
772
+ - !ruby/object:Gem::Version
773
+ version: '3.12'
774
+ type: :development
775
+ prerelease: false
776
+ version_requirements: !ruby/object:Gem::Requirement
777
+ none: false
778
+ requirements:
779
+ - - ~>
780
+ - !ruby/object:Gem::Version
781
+ version: '3.12'
782
+ - !ruby/object:Gem::Dependency
783
+ name: bundler
784
+ requirement: !ruby/object:Gem::Requirement
785
+ none: false
786
+ requirements:
787
+ - - ! '>='
788
+ - !ruby/object:Gem::Version
789
+ version: '0'
790
+ type: :development
791
+ prerelease: false
792
+ version_requirements: !ruby/object:Gem::Requirement
793
+ none: false
794
+ requirements:
795
+ - - ! '>='
796
+ - !ruby/object:Gem::Version
797
+ version: '0'
798
+ - !ruby/object:Gem::Dependency
799
+ name: jeweler
800
+ requirement: !ruby/object:Gem::Requirement
801
+ none: false
802
+ requirements:
803
+ - - ~>
804
+ - !ruby/object:Gem::Version
805
+ version: 1.8.4
806
+ type: :development
807
+ prerelease: false
808
+ version_requirements: !ruby/object:Gem::Requirement
809
+ none: false
810
+ requirements:
811
+ - - ~>
812
+ - !ruby/object:Gem::Version
813
+ version: 1.8.4
814
+ - !ruby/object:Gem::Dependency
815
+ name: rdoc
816
+ requirement: !ruby/object:Gem::Requirement
817
+ none: false
818
+ requirements:
819
+ - - ~>
820
+ - !ruby/object:Gem::Version
821
+ version: '3.12'
822
+ type: :development
823
+ prerelease: false
824
+ version_requirements: !ruby/object:Gem::Requirement
825
+ none: false
826
+ requirements:
827
+ - - ~>
828
+ - !ruby/object:Gem::Version
829
+ version: '3.12'
830
+ - !ruby/object:Gem::Dependency
831
+ name: bundler
832
+ requirement: !ruby/object:Gem::Requirement
833
+ none: false
834
+ requirements:
835
+ - - ! '>='
836
+ - !ruby/object:Gem::Version
837
+ version: '0'
838
+ type: :development
839
+ prerelease: false
840
+ version_requirements: !ruby/object:Gem::Requirement
841
+ none: false
842
+ requirements:
843
+ - - ! '>='
844
+ - !ruby/object:Gem::Version
845
+ version: '0'
846
+ - !ruby/object:Gem::Dependency
847
+ name: jeweler
848
+ requirement: !ruby/object:Gem::Requirement
849
+ none: false
850
+ requirements:
851
+ - - ~>
852
+ - !ruby/object:Gem::Version
853
+ version: 1.8.4
854
+ type: :development
855
+ prerelease: false
856
+ version_requirements: !ruby/object:Gem::Requirement
857
+ none: false
858
+ requirements:
859
+ - - ~>
860
+ - !ruby/object:Gem::Version
861
+ version: 1.8.4
862
+ - !ruby/object:Gem::Dependency
863
+ name: rdoc
864
+ requirement: !ruby/object:Gem::Requirement
865
+ none: false
866
+ requirements:
867
+ - - ~>
868
+ - !ruby/object:Gem::Version
869
+ version: '3.12'
870
+ type: :development
871
+ prerelease: false
872
+ version_requirements: !ruby/object:Gem::Requirement
873
+ none: false
874
+ requirements:
875
+ - - ~>
876
+ - !ruby/object:Gem::Version
877
+ version: '3.12'
878
+ - !ruby/object:Gem::Dependency
879
+ name: bundler
880
+ requirement: !ruby/object:Gem::Requirement
881
+ none: false
882
+ requirements:
883
+ - - ! '>='
884
+ - !ruby/object:Gem::Version
885
+ version: '0'
886
+ type: :development
887
+ prerelease: false
888
+ version_requirements: !ruby/object:Gem::Requirement
889
+ none: false
890
+ requirements:
891
+ - - ! '>='
892
+ - !ruby/object:Gem::Version
893
+ version: '0'
894
+ - !ruby/object:Gem::Dependency
895
+ name: jeweler
896
+ requirement: !ruby/object:Gem::Requirement
897
+ none: false
898
+ requirements:
899
+ - - ~>
900
+ - !ruby/object:Gem::Version
901
+ version: 1.8.4
902
+ type: :development
903
+ prerelease: false
904
+ version_requirements: !ruby/object:Gem::Requirement
905
+ none: false
906
+ requirements:
907
+ - - ~>
908
+ - !ruby/object:Gem::Version
909
+ version: 1.8.4
766
910
  - !ruby/object:Gem::Dependency
767
911
  name: rspec
768
912
  requirement: !ruby/object:Gem::Requirement
@@ -894,12 +1038,12 @@ files:
894
1038
  - app/assets/javascripts/burp/application.js
895
1039
  - app/assets/javascripts/burp/burp.js
896
1040
  - app/assets/javascripts/burp/cms_helper.js
1041
+ - app/assets/javascripts/burp/edit-links.js
897
1042
  - app/assets/javascripts/burp/edit-page.js
898
1043
  - app/assets/javascripts/burp/lib/bootstrap.min.js
899
1044
  - app/assets/javascripts/burp/lib/debug.js
900
1045
  - app/assets/javascripts/burp/lib/fileupload.js
901
1046
  - app/assets/javascripts/burp/lib/missing-restful-verbs.js
902
- - app/assets/javascripts/burp/menu-functions.js
903
1047
  - app/assets/javascripts/burp/pages-drag-and-drop.js
904
1048
  - app/assets/packages/burp/editing.js
905
1049
  - app/assets/packages/burp/editing.less
@@ -1261,7 +1405,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1261
1405
  version: '0'
1262
1406
  segments:
1263
1407
  - 0
1264
- hash: 2151270024029932791
1408
+ hash: -195351834911769489
1265
1409
  required_rubygems_version: !ruby/object:Gem::Requirement
1266
1410
  none: false
1267
1411
  requirements:
@@ -1,28 +0,0 @@
1
- /*global
2
- burp
3
- */
4
-
5
- (function() {
6
-
7
- burp.saveMenu = function saveMenu(menu) {
8
- $.put("./",{menu:JSON.stringify(menu)},function() {
9
- $.debug("Menu changes saved!");
10
- });
11
- };
12
-
13
- $.fn.serializeGroup = function() {
14
- if($(this).is("section.group")) {
15
- return {
16
- name:($(this).find("> .group-name").text()),
17
- children:$(this).find("> ul.children > li").map(function() {
18
- if($(this).is(".link")) {
19
- var a = $(this).find('a');
20
- return {name:a.text(), url:(a.attr("orginial-url") || a.attr("href"))};
21
- } else if($(this).is(".group")) {
22
- return $(this).find('> section.group').serializeGroup();
23
- }
24
- }).toArray()
25
- };
26
- }
27
- };
28
- }());