diff options
| author | Alon Levy <alon@pobox.com> | 2015-02-15 20:22:50 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-02-15 20:22:50 +0200 |
| commit | 60abd2f5cd08d3ee43d86e073b62e6f187a0b0cd (patch) | |
| tree | 95d56627a138224577c1a03d7fb53f06623b4456 | |
| parent | 849199bc42cab50972fd489b5f2446159fe1e3c0 (diff) | |
client/node_info: remove save button, listen to keyup as well, debounce for half a second. Fixes #43
| -rw-r--r-- | res/templates/index.html | 3 | ||||
| -rw-r--r-- | src/client/view/node_info.js | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/res/templates/index.html b/res/templates/index.html index 4c03d1ed..72415881 100644 --- a/res/templates/index.html +++ b/res/templates/index.html @@ -92,9 +92,6 @@ var rz_config = { // set as a global variable <div id="url"><p class="info-card-attr">URL</p><p class="info-card-attr-val info-card-url"><input id="editurl"></p></div> <div id="description"><label>Description</label><textarea id="editdescription"></textarea></div> <hr> - <p>press 'save' to save</p> - <p>click outside to cancel</p> - <button id="edit-node-dialog__save" class="btn-regular btn-regular-outline">Save</button> <button id="edit-node-dialog__delete" class="btn-regular btn-regular-outline">Delete</button> </form> </div> diff --git a/src/client/view/node_info.js b/src/client/view/node_info.js index 45015a90..da5dbd70 100644 --- a/src/client/view/node_info.js +++ b/src/client/view/node_info.js @@ -58,10 +58,10 @@ function setup_change_handlers() disable_change_handlers(); // auto save style handlers var streams = _.map(_.values(form), function (field) { - return field.asEventStream('change'); + return field.asEventStream('change keyup'); }); var single = _.reduce(streams, function (stream_a, stream_b) { return stream_a.merge(stream_b); }); - change_handlers = [single.debounce(100).onValue(function () { + change_handlers = [single.debounce(500).onValue(function () { commit(); })]; } |
