burp_cms 1.5.5 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c13ef9c316a9bca2ecfc2a1fbfa50708ecb86a0
4
- data.tar.gz: cc7daabdc05dbd01a448bccbae0dd740732a01f6
3
+ metadata.gz: 5056e14bbfa659de799cfc6b68446377eccfd0c0
4
+ data.tar.gz: d3911f893c4b6c20c82b1bf13ee8e7c552ac1429
5
5
  SHA512:
6
- metadata.gz: 6c9fb18edc49829ca6289270e20ac120dc264fa9936d573be52915722d931857ff621a56e44e260f55678371de6d8a845fced3fb27f89509706bf9612c597fd6
7
- data.tar.gz: 52d1196315a1215cafc2cf7226d25dc1eae48d029ca69c296901ae61e3572df260a40e7b7a379f904273a02b47ae602b4e76ccb7a3f6d827ab9e81a7f2cc76c2
6
+ metadata.gz: 850cd9d7c07654d0e43822b0002b6bba74619043b7457dbfc49a963d4907214a1a332b3769967e5c1bd0b2e563da7757874799563f20a1f537cb7d0f8f130689
7
+ data.tar.gz: 69bae840ea3a77d5740f272c88b85b964e5ae4c0ed888f02bd83a7ae2f1d2f5330481e6b665e5ac412572af0729653a4d9630d0e190fdf6891289a8b61c92f49
@@ -6,7 +6,7 @@ $(function() {
6
6
 
7
7
  var elements = $('<div style="display: none;"><div id="gallery" style="display: none;"><ul class="images"></ul><i class="prev icon-large enabled icon-caret-left"></i><i class="next icon-large enabled icon-caret-right"></i></div><div id="myContentEditor" style="display: none;"><textarea id="code" style="width: 100%; height: 300px;"></textarea></div></div>');
8
8
  var lastValue;
9
- var snippetName;
9
+ var current_snippetName;
10
10
  var originalHtml;
11
11
  var originalValue;
12
12
  var contentDecorator;
@@ -23,14 +23,12 @@ $(function() {
23
23
 
24
24
  var snippetCache = {};
25
25
 
26
- function getHTMLForSnippet(_snippetName, callback) {
26
+ function getHTMLForSnippet(snippetName, callback) {
27
27
  var path = getPathFor(snippetName);
28
28
 
29
- var cacheKey = path + _snippetName;
29
+ var cacheKey = path + snippetName;
30
30
  if(snippetCache[cacheKey]) {
31
- setTimeout(function() {
32
- callback(snippetCache[cacheKey]);
33
- }, 0);
31
+ callback(snippetCache[cacheKey]);
34
32
  } else {
35
33
  $.ajax("/burp/pages/"+path,{
36
34
  cache:false,
@@ -56,6 +54,7 @@ $(function() {
56
54
  if(snippetEditorState[snippetName]) {
57
55
  callback(snippetEditorState[snippetName]);
58
56
  } else {
57
+
59
58
  getHTMLForSnippet(snippetName, function(html) {
60
59
 
61
60
  var element = $("<div>" + html + "</div>");
@@ -108,13 +107,13 @@ $(function() {
108
107
 
109
108
  function selectSnippet(_snippetName) {
110
109
 
111
- snippetName = _snippetName;
112
- loadSnippet(snippetName, function(snippet) {
110
+ current_snippetName = _snippetName;
111
+ loadSnippet(current_snippetName, function(snippet) {
113
112
  editor.setValue(snippet);
114
113
  editor.refresh();
115
114
  });
116
115
 
117
- contentDecorator.setSnippetName(snippetName);
116
+ contentDecorator.setSnippetName(current_snippetName);
118
117
  }
119
118
 
120
119
  function removeIDs(elements) {
@@ -152,6 +151,7 @@ $(function() {
152
151
  var elements = burp.disableScriptElements($(html));
153
152
  elements = addIDs(snippetName, elements);
154
153
  domSnippetState[snippetName] = elements.clone();
154
+
155
155
  snippets().snippets[snippetName].update(elements);
156
156
 
157
157
  contentDecorator.makeDroppable(elements.filter("img"), false);
@@ -179,12 +179,12 @@ $(function() {
179
179
  if(timeToWait > 0) {
180
180
  timeoutID = setTimeout(function() {
181
181
  timeoutID = undefined;
182
- snippetEditorState[snippetName] = editor.getValue();
183
- updateSnippetWithMarkdown(snippetName, snippetEditorState[snippetName]);
182
+ snippetEditorState[current_snippetName] = editor.getValue();
183
+ updateSnippetWithMarkdown(current_snippetName, snippetEditorState[current_snippetName]);
184
184
  }, timeToWait);
185
185
  } else {
186
- snippetEditorState[snippetName] = editor.getValue();
187
- updateSnippetWithMarkdown(snippetName, snippetEditorState[snippetName]);
186
+ snippetEditorState[current_snippetName] = editor.getValue();
187
+ updateSnippetWithMarkdown(current_snippetName, snippetEditorState[current_snippetName]);
188
188
  }
189
189
  }
190
190
  }
@@ -238,7 +238,7 @@ $(function() {
238
238
  change: function(option) {
239
239
 
240
240
  selectSnippet(option);
241
- loadSnippet(snippetName, function(snippet) {
241
+ loadSnippet(current_snippetName, function(snippet) {
242
242
  editor.setValue(snippet);
243
243
  editor.refresh();
244
244
  });
@@ -284,7 +284,7 @@ $(function() {
284
284
  });
285
285
  });
286
286
 
287
- loadSnippet(snippetName, function(snippet) {
287
+ loadSnippet(current_snippetName, function(snippet) {
288
288
  editor.setValue(snippet);
289
289
  editor.refresh();
290
290
  });
@@ -433,7 +433,7 @@ $(function() {
433
433
 
434
434
  contentDecorator.addRemoveZone('#gallery');
435
435
 
436
- loadSnippet(snippetName, function(snippet) {
436
+ loadSnippet(current_snippetName, function(snippet) {
437
437
  editor.setValue(snippet);
438
438
  editor.refresh();
439
439
  });
data/lib/burp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Burp
2
- VERSION = "1.5.5"
2
+ VERSION = "1.5.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burp_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darwin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-13 00:00:00.000000000 Z
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails