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 +4 -4
- data/app/assets/packages/burp/editing/js/main.js +16 -16
- data/lib/burp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5056e14bbfa659de799cfc6b68446377eccfd0c0
|
4
|
+
data.tar.gz: d3911f893c4b6c20c82b1bf13ee8e7c552ac1429
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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(
|
26
|
+
function getHTMLForSnippet(snippetName, callback) {
|
27
27
|
var path = getPathFor(snippetName);
|
28
28
|
|
29
|
-
var cacheKey = path +
|
29
|
+
var cacheKey = path + snippetName;
|
30
30
|
if(snippetCache[cacheKey]) {
|
31
|
-
|
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
|
-
|
112
|
-
loadSnippet(
|
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(
|
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[
|
183
|
-
updateSnippetWithMarkdown(
|
182
|
+
snippetEditorState[current_snippetName] = editor.getValue();
|
183
|
+
updateSnippetWithMarkdown(current_snippetName, snippetEditorState[current_snippetName]);
|
184
184
|
}, timeToWait);
|
185
185
|
} else {
|
186
|
-
snippetEditorState[
|
187
|
-
updateSnippetWithMarkdown(
|
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(
|
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(
|
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(
|
436
|
+
loadSnippet(current_snippetName, function(snippet) {
|
437
437
|
editor.setValue(snippet);
|
438
438
|
editor.refresh();
|
439
439
|
});
|
data/lib/burp/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jquery-rails
|