|
|
@ -26,8 +26,8 @@ function openSettingsModal() {
|
|
|
|
$("#settingsModal #notary_idnumber").val(getStorage("notary_idnumber"));
|
|
|
|
$("#settingsModal #notary_idnumber").val(getStorage("notary_idnumber"));
|
|
|
|
$("#settingsModal #notary_state").val(getStorage("notary_state"));
|
|
|
|
$("#settingsModal #notary_state").val(getStorage("notary_state"));
|
|
|
|
|
|
|
|
|
|
|
|
$("#settingsModal #color_theme").val(getStorage("color_theme"));
|
|
|
|
$("#settingsModal #color_theme").val(inStorage("color_theme") ? getStorage("color_theme") : "purple");
|
|
|
|
$("#settingsModal #button_size").val(getStorage("button_size"));
|
|
|
|
$("#settingsModal #button_size").val(getStorage("button_size") ? getStorage("button_size") : "sm");
|
|
|
|
// show preview of stamp
|
|
|
|
// show preview of stamp
|
|
|
|
if (inStorage("notary_state")) {
|
|
|
|
if (inStorage("notary_state")) {
|
|
|
|
getStampSvg(function (svg) {
|
|
|
|
getStampSvg(function (svg) {
|
|
|
@ -207,16 +207,29 @@ $("body").on("input change paste", "#appOptionsSettings select", function () {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function setAppTheme(theme) {
|
|
|
|
function setAppTheme(theme) {
|
|
|
|
$("body").removeClass().addClass("theme-" + theme);
|
|
|
|
if (typeof theme != "string") {
|
|
|
|
|
|
|
|
theme = "purple";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var classobj = $("body").attr("class");
|
|
|
|
|
|
|
|
if (classobj != undefined) {
|
|
|
|
|
|
|
|
var classlist = classobj.split(" ");
|
|
|
|
|
|
|
|
var classes = [];
|
|
|
|
|
|
|
|
for (var i = 0; i < classlist.length; i++) {
|
|
|
|
|
|
|
|
if (!classlist[i].startsWith("theme-")) {
|
|
|
|
|
|
|
|
classes.push(classlist[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$("body").removeClass().addClass(classes).addClass("theme-" + theme);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function setButtonSize(size) {
|
|
|
|
function setButtonSize(size) {
|
|
|
|
|
|
|
|
if (typeof size != 'string') {
|
|
|
|
|
|
|
|
size = "sm";
|
|
|
|
|
|
|
|
}
|
|
|
|
$(".btn").removeClass(["btn-sm", "btn-lg", "btn-"]).addClass("btn-" + size);
|
|
|
|
$(".btn").removeClass(["btn-sm", "btn-lg", "btn-"]).addClass("btn-" + size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setAppTheme(getStorage("color_theme"));
|
|
|
|
|
|
|
|
setButtonSize(getStorage("button_size"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function showToast(message) {
|
|
|
|
function showToast(message) {
|
|
|
|
$("#toastBox .toast-body").html(message);
|
|
|
|
$("#toastBox .toast-body").html(message);
|
|
|
|
toastEl.show();
|
|
|
|
toastEl.show();
|
|
|
@ -227,4 +240,10 @@ var toastEl = new bootstrap.Toast(document.getElementById("toastBox"));
|
|
|
|
function showAlert(message) {
|
|
|
|
function showAlert(message) {
|
|
|
|
$("#alertModal .modal-body").html(message);
|
|
|
|
$("#alertModal .modal-body").html(message);
|
|
|
|
new bootstrap.Modal(document.getElementById('alertModal')).show();
|
|
|
|
new bootstrap.Modal(document.getElementById('alertModal')).show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
|
|
|
setButtonSize(getStorage("button_size"));
|
|
|
|
|
|
|
|
setAppTheme(getStorage("color_theme"));
|
|
|
|
|
|
|
|
$("body").addClass("load");
|
|
|
|
|
|
|
|
});
|