diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-11 12:35:47 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-11 12:35:47 +0100 |
commit | 19985dbb8c0aa66dc4bf7905abc1148de909097d (patch) | |
tree | 2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /frontend/install/script/script.js | |
download | 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip |
Diffstat (limited to '')
-rw-r--r-- | frontend/install/script/script.js | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/frontend/install/script/script.js b/frontend/install/script/script.js new file mode 100644 index 0000000..f7bba2b --- /dev/null +++ b/frontend/install/script/script.js @@ -0,0 +1,67 @@ +// Ajax za submit nastavitev za zapis v settings_optional
+function settingsSubmit(){
+
+ var form = $('form#settings_form').serializeArray();
+
+ $.post('ajax.php?a=submit_settings', form, function () {
+
+ // Redirectamo na naslednji korak
+ window.location = "index.php?step=database";
+ });
+}
+
+function settingsToggle(){
+
+ if($('input[name="footer_survey_custom"]:checked').val() == '0'){
+ $('.footer_survey_text').hide('medium');
+ }
+ else{
+ $('.footer_survey_text').show('medium');
+ }
+
+ if($('input[name="footer_custom"]:checked').val() == '0'){
+ $('.footer_text').hide('medium');
+ }
+ else{
+ $('.footer_text').show('medium');
+ }
+
+ if($('input[name="head_title_custom"]:checked').val() == '0'){
+ $('.head_title_text').hide('medium');
+ }
+ else{
+ $('.head_title_text').show('medium');
+ }
+
+ if($('input[name="email_signature_custom"]:checked').val() == '0'){
+ $('.email_signature_text').hide('medium');
+ }
+ else{
+ $('.email_signature_text').show('medium');
+ }
+}
+
+
+// Ajax za uvoz celotne baze
+function databaseImport(){
+
+ $('#fade').fadeIn();
+ $('#popup').fadeIn();
+
+ $('#db_response').load('ajax.php?a=import_database', function () {
+ $('#fade').fadeOut();
+ $('#popup').fadeOut();
+ });
+}
+
+// Ajax za posodobitev baze
+function databaseUpdate(){
+
+ $('#fade').fadeIn();
+ $('#popup').fadeIn();
+
+ $('#db_response').load('ajax.php?a=update_database', function () {
+ $('#fade').fadeOut();
+ $('#popup').fadeOut();
+ });
+}
\ No newline at end of file |