You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB
JavaScript

/*
* Copyright 2021 Netsyms Technologies.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
$("body").on("input change paste", "#notaryProfileSettings input,#notaryProfileSettings select", function () {
getStampSvgWithValues({
name: $("#settingsModal #notary_name").val(),
location: $("#settingsModal #notary_location").val(),
expires: $("#settingsModal #notary_expires").val(),
idnumber: $("#settingsModal #notary_idnumber").val(),
state: $("#settingsModal #notary_state option:selected").val()
}, function (svg) {
$("#settingsModal #stamp-preview").attr("src", "data:image/svg+xml;base64," + btoa(svg));
});
});
$("body").on("input change paste", "#appOptionsSettings select", function () {
setAppTheme($("#appOptionsSettings #color_theme option:selected").val());
setButtonSize($("#appOptionsSettings #button_size option:selected").val());
});
$("#passwordModal").on("shown.bs.modal", function () {
$("#passwordModalInput").focus();
});
$(".modal").on("keydown", function (e) {
if (e.keyCode == 13) {
// Prevent overlapping modals from all getting clicked
e.stopPropagation();
$(this).find(".btn-default").first().click();
}
});