aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 17f94dd16..48277f5cc 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -41,6 +41,8 @@ $.ajaxSetup({cache: false});
$(document).ready(function() {
$(document).on('click focus', '.comment-edit-form', handle_comment_form);
+ $(document).on('click', '.conversation-settings-link', getConversationSettings);
+ $(document).on('click', '#settings_module_ajax_submit', postConversationSettings);
jQuery.timeago.settings.strings = {
prefixAgo : aStr['t01'],
@@ -122,6 +124,33 @@ $(document).ready(function() {
});
+function getConversationSettings() {
+ $.get('settings/conversation/?f=&aj=1',function(data) {
+ $('#conversation_settings_body').html(data);
+ });
+
+
+
+}
+
+function postConversationSettings() {
+ $.post(
+ 'settings/conversation',
+ $('#settings_module_ajax_form').serialize() + "&auto_update=" + next_page
+ );
+
+ if(next_page === 1) {
+ page_load = true;
+ }
+
+ $('#conversation_settings').modal('hide');
+
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(updateInit,100);
+
+ return false;
+}
+
function datasrc2src(selector) {
$(selector).each(function(i, el) {
$(el).attr("src", $(el).data("src"));