Explorar el Código

Typing in the contents box will update the preview.

Colin Kierans hace 8 años
padre
commit
7072934af2
Se han modificado 1 ficheros con 11 adiciones y 0 borrados
  1. 11
    0
      generator/js/ui.js

+ 11
- 0
generator/js/ui.js Ver fichero

@@ -346,6 +346,14 @@ function ui_change_card_contents() {
346 346
     }
347 347
 }
348 348
 
349
+function ui_change_card_contents_keyup () {
350
+    clearTimeout(ui_change_card_contents_keyup.timeout)
351
+    ui_change_card_contents_keyup.timeout = setTimeout(function () {
352
+        $('#card-contents').trigger('change')
353
+    }, 200)
354
+}
355
+ui_change_card_contents_keyup.timeout = null
356
+
349 357
 function ui_change_card_tags() {
350 358
     var value = $(this).val();
351 359
 
@@ -486,6 +494,9 @@ $(document).ready(function () {
486 494
     $("#card-contents").change(ui_change_card_contents);
487 495
     $("#card-tags").change(ui_change_card_tags);
488 496
 
497
+    $("#card-contents").keyup(ui_change_card_contents_keyup);
498
+
499
+
489 500
     $("#page-size").change(ui_change_option);
490 501
     $("#page-rows").change(ui_change_option);
491 502
     $("#page-columns").change(ui_change_option);

Loading…
Cancelar
Guardar