burp_cms 1.5.2 → 1.5.3

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: d7fe78513999f4435e53eefb00c19e23d2156a64
4
- data.tar.gz: 0d1930b9dea565a2602e659fca9e1fc6aa07f96d
3
+ metadata.gz: 47b6f91432f8c34fcf2ac27e740fee561e8e33b9
4
+ data.tar.gz: d0fbf177bc6dc9b205bb1f9949d29798a72beb65
5
5
  SHA512:
6
- metadata.gz: b1899e5cad35d99e2029859319da9b369210c5933692a76a57e6d8dd8a80d01db77fd1bed80001cbb8a7821d313823a82d23214c85ac55af1a2eef661abae092
7
- data.tar.gz: ffcbcda09ac8805adb70b65b58182acb290e46543533363d6729ef3d731d2b292d271bd2efb461d51ef59bb9f96b4245cffe026a95f15686f1f371184b8acb16
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
- updateSnippetWithMarkdown(snippetName, snippetEditorState[snippetName]);
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
@@ -1,3 +1,3 @@
1
1
  module Burp
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
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.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darwin