burp_cms 1.5.2 → 1.5.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47b6f91432f8c34fcf2ac27e740fee561e8e33b9
|
4
|
+
data.tar.gz: d0fbf177bc6dc9b205bb1f9949d29798a72beb65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a3d0a97199f1721d461de2c172d000b032e432b61fe4a23ac371f6a136875ac45b494bf5b9a8f4fa48bce8f646522da31a6a4fa81d9325108692b5b210c8dc4
|
7
|
+
data.tar.gz: b60992cbab905fce560c2d9395b3d56ec4f62d81514029582e2a27bed96c1df5b45e05a2eecd883fdfcb156f1f74ba700abfa2a0779bc43ac4ba5faad689e959
|
@@ -208,42 +208,6 @@
|
|
208
208
|
this.callbacks = callbacks;
|
209
209
|
},
|
210
210
|
|
211
|
-
// updateContent: function() {
|
212
|
-
// var html = window.markdown2Html(this.markdown);
|
213
|
-
//
|
214
|
-
// if(this.lastHtml === html) {
|
215
|
-
// return;
|
216
|
-
// }
|
217
|
-
// this.lastHtml = html;
|
218
|
-
//
|
219
|
-
// var children = $(html);
|
220
|
-
//
|
221
|
-
// // Fix script escaping of text in script elements
|
222
|
-
// children.each(function() {
|
223
|
-
// if($(this).is("script")) {
|
224
|
-
// $(this).text(unescapeJavascript($(this).text()));
|
225
|
-
// $(this).attr('type','text/dont-run-javascript');
|
226
|
-
// } else {
|
227
|
-
// $(this).find('script').each(function() {
|
228
|
-
// $(this).text(unescapeJavascript($(this).text()));
|
229
|
-
// $(this).attr('type','text/dont-run-javascript');
|
230
|
-
// });
|
231
|
-
// }
|
232
|
-
// });
|
233
|
-
//
|
234
|
-
// var tempElement = $('<div></div>');
|
235
|
-
// tempElement.append(children);
|
236
|
-
//
|
237
|
-
// if(tempElement.find("script").length > 0 && !javascript_warning_has_been_shown) {
|
238
|
-
// $.gritter.add({
|
239
|
-
// title: 'WARNING!',
|
240
|
-
// text: ' Javascript found! The javascript will not be previewed but it will be saved.<br><br>Save and reload to test the javascript.',
|
241
|
-
// time: 20000
|
242
|
-
// });
|
243
|
-
//
|
244
|
-
// javascript_warning_has_been_shown = true;
|
245
|
-
// }
|
246
|
-
//
|
247
211
|
// // Fixes so that we don't reload images on each update
|
248
212
|
// var _this = this;
|
249
213
|
// tempElement.find('img').each(function() {
|
@@ -254,17 +218,6 @@
|
|
254
218
|
// }
|
255
219
|
// }
|
256
220
|
// });
|
257
|
-
//
|
258
|
-
// this.element.html("");
|
259
|
-
// this.element.append(tempElement.children());
|
260
|
-
//
|
261
|
-
// setTimeout(function() {
|
262
|
-
// initializeMovable(_this, _this.element.find('> img'), function(element, positionClass) {
|
263
|
-
// $(element).removeClass('left center right');
|
264
|
-
// $(element).addClass(positionClass);
|
265
|
-
// return element;
|
266
|
-
// });
|
267
|
-
// },10);
|
268
221
|
// },
|
269
222
|
|
270
223
|
makeDroppable: function(elements, cloneImage) {
|
@@ -156,6 +156,9 @@ $(function() {
|
|
156
156
|
|
157
157
|
contentDecorator.makeDroppable(elements.filter("img"), false);
|
158
158
|
}
|
159
|
+
|
160
|
+
var lastChange = 0;
|
161
|
+
var maxUpdatesPerSec = 2;
|
159
162
|
|
160
163
|
function addEditor() {
|
161
164
|
|
@@ -170,7 +173,16 @@ $(function() {
|
|
170
173
|
theme: "default",
|
171
174
|
onChange:function(editor, changes) {
|
172
175
|
snippetEditorState[snippetName] = editor.getValue();
|
173
|
-
|
176
|
+
var timeToWait = lastChange + (1000 / maxUpdatesPerSec) - new Date().getTime();
|
177
|
+
lastChange = new Date().getTime();
|
178
|
+
if(timeToWait > 0) {
|
179
|
+
setTimeout(function() {
|
180
|
+
console.debug("waiting for: " + timeToWait);
|
181
|
+
updateSnippetWithMarkdown(snippetName, snippetEditorState[snippetName]);
|
182
|
+
}, timeToWait);
|
183
|
+
} else {
|
184
|
+
updateSnippetWithMarkdown(snippetName, snippetEditorState[snippetName]);
|
185
|
+
}
|
174
186
|
}
|
175
187
|
});
|
176
188
|
|
data/lib/burp/version.rb
CHANGED