fix global ko references

This commit is contained in:
zadam
2019-08-25 22:31:02 +02:00
parent bbe0e9e425
commit 8e4e0bd543
4 changed files with 33 additions and 32 deletions

View File

@@ -132,18 +132,6 @@ function init() {
.toggleClass("disabled", !path.trim())
.attr(SELECTED_PATH_KEY, path); // we also set attr here so tooltip can be displayed
};
ko.bindingHandlers.noteAutocomplete = {
init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
initNoteAutocomplete($(element));
$(element).setSelectedPath(bindingContext.$data.selectedPath);
$(element).on('autocomplete:selected', function (event, suggestion, dataset) {
bindingContext.$data.selectedPath = $(element).val().trim() ? suggestion.path : '';
});
}
};
}
export default {