Skip to content
Snippets Groups Projects

when form data is changed clicking on navigation link require confirmation

Merged Piotr Gawron requested to merge 136-exiting-edit-page-without-saving into master
2 files
+ 21
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -146,17 +146,19 @@ function appointment_date_change_behaviour(datetime_picker, worker_select, minut
$(worker_select).addClass(previousClass);
$(worker_select).on('focus', function () {
// Store the current value on focus and on change
previousClass = getSelectedClass();
}).change(function () {
function workerChanged() {
// Do something with the previous value after the change
$(worker_select).removeClass(previousClass);
// Make sure the previous value is updated
previousClass = getSelectedClass();
$(worker_select).addClass(previousClass);
});
}
$(worker_select).on('focus', function () {
// Store the current value on focus and on change
previousClass = getSelectedClass();
}).change(workerChanged);
function timeChange() {
if ($(datetime_picker).val() != "") {
@@ -190,7 +192,7 @@ function appointment_date_change_behaviour(datetime_picker, worker_select, minut
option.className = "worker-option-no-match";
}
}
$(worker_select).trigger("change");
workerChanged();
});
}
}
Loading