implement conversation tools (settings/conversation), remove additional features from the settings menu and get rid of skill levels

This commit is contained in:
Mario Vavti
2018-09-27 14:56:47 +02:00
parent bdf6289b32
commit 6b23c3e179
13 changed files with 194 additions and 145 deletions

View File

@@ -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"));