mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 07:39:55 +09:00
Initial implementation of Notification Settings screen
This commit is contained in:
parent
ddc0da173a
commit
87b9f7bae6
12 changed files with 415 additions and 0 deletions
96
modules/admin/tpl/js/notification_config.js
Normal file
96
modules/admin/tpl/js/notification_config.js
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
(function($) {
|
||||
|
||||
$(function() {
|
||||
|
||||
$("#mail_driver").on("change", function() {
|
||||
var selected_driver = $(this).val();
|
||||
$(this).parents("section").find("div.x_control-group.hidden-by-default, p.x_help-block").not(".show-always").each(function() {
|
||||
if ($(this).hasClass("show-for-" + selected_driver)) {
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
var reply_to = $("#mail_reply_to").parents("div.x_control-group");
|
||||
if (selected_driver === "woorimail") {
|
||||
reply_to.hide();
|
||||
} else {
|
||||
reply_to.show();
|
||||
}
|
||||
}).triggerHandler("change");
|
||||
|
||||
$("#sms_driver").on("change", function() {
|
||||
var selected_driver = $(this).val();
|
||||
$(this).parents("section").find("div.x_control-group.hidden-by-default, p.x_help-block").not(".show-always").each(function() {
|
||||
if ($(this).hasClass("show-for-" + selected_driver)) {
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
}).triggerHandler("change");
|
||||
|
||||
$("#mail_smtp_manual_entry").on("change", function() {
|
||||
var auto_fill = $(this).val();
|
||||
if (auto_fill === 'gmail') {
|
||||
$("#mail_smtp_smtp_host").val('smtp.gmail.com');
|
||||
$("#mail_smtp_smtp_port").val('465');
|
||||
$("#mail_smtp_security_ssl").prop("checked", true).parent().addClass("checked");
|
||||
$("#mail_smtp_security_tls").parent().removeClass("checked");
|
||||
$("#mail_smtp_security_none").parent().removeClass("checked");
|
||||
$("#mail_force_sender").prop("checked", true).parent().addClass("checked");
|
||||
}
|
||||
if (auto_fill === 'hanmail') {
|
||||
$("#mail_smtp_smtp_host").val('smtp.daum.net');
|
||||
$("#mail_smtp_smtp_port").val('465');
|
||||
$("#mail_smtp_security_ssl").prop("checked", true).parent().addClass("checked");
|
||||
$("#mail_smtp_security_tls").parent().removeClass("checked");
|
||||
$("#mail_smtp_security_none").parent().removeClass("checked");
|
||||
$("#mail_force_sender").prop("checked", true).parent().addClass("checked");
|
||||
}
|
||||
if (auto_fill === 'naver') {
|
||||
$("#mail_smtp_smtp_host").val('smtp.naver.com');
|
||||
$("#mail_smtp_smtp_port").val('587');
|
||||
$("#mail_smtp_security_tls").prop("checked", true).parent().addClass("checked");
|
||||
$("#mail_smtp_security_ssl").parent().removeClass("checked");
|
||||
$("#mail_smtp_security_none").parent().removeClass("checked");
|
||||
$("#mail_force_sender").prop("checked", true).parent().addClass("checked");
|
||||
}
|
||||
if (auto_fill === 'worksmobile') {
|
||||
$("#mail_smtp_smtp_host").val('smtp.worksmobile.com');
|
||||
$("#mail_smtp_smtp_port").val('587');
|
||||
$("#mail_smtp_security_tls").prop("checked", true).parent().addClass("checked");
|
||||
$("#mail_smtp_security_ssl").parent().removeClass("checked");
|
||||
$("#mail_smtp_security_none").parent().removeClass("checked");
|
||||
$("#mail_force_sender").prop("checked", true).parent().addClass("checked");
|
||||
}
|
||||
if (auto_fill === 'outlook') {
|
||||
$("#mail_smtp_smtp_host").val('smtp-mail.outlook.com');
|
||||
$("#mail_smtp_smtp_port").val('587');
|
||||
$("#mail_smtp_security_tls").prop("checked", true).parent().addClass("checked");
|
||||
$("#mail_smtp_security_ssl").parent().removeClass("checked");
|
||||
$("#mail_smtp_security_none").parent().removeClass("checked");
|
||||
$("#mail_force_sender").prop("checked", true).parent().addClass("checked");
|
||||
}
|
||||
if (auto_fill === 'yahoo') {
|
||||
$("#mail_smtp_smtp_host").val('smtp.mail.yahoo.com');
|
||||
$("#mail_smtp_smtp_port").val('465');
|
||||
$("#mail_smtp_security_ssl").prop("checked", true).parent().addClass("checked");
|
||||
$("#mail_smtp_security_tls").parent().removeClass("checked");
|
||||
$("#mail_smtp_security_none").parent().removeClass("checked");
|
||||
$("#mail_force_sender").prop("checked", true).parent().addClass("checked");
|
||||
}
|
||||
});
|
||||
|
||||
$("#mail_woorimail_account_type_free,#mail_woorimail_account_type_paid").on("change", function() {
|
||||
if ($("#mail_woorimail_account_type_paid").is(":checked")) {
|
||||
$("#mail_reply_to").attr("disabled", "disabled");
|
||||
} else {
|
||||
$("#mail_reply_to").removeAttr("disabled");
|
||||
}
|
||||
}).triggerHandler("change");
|
||||
|
||||
});
|
||||
|
||||
} (jQuery));
|
||||
Loading…
Add table
Add a link
Reference in a new issue