fixed js problems in saimod locale, escape text for saimod todo
This commit is contained in:
parent
001190934d
commit
8a800ab114
@ -5,6 +5,7 @@ var cData = {group: '',
|
||||
editmode: false};
|
||||
|
||||
function init__SYSTEM_SAI_saimod_sys_locale() {
|
||||
init_tinymce();
|
||||
$('#addtext').show();
|
||||
if(!cData.lang && !cData.group) {
|
||||
cData.group = $('.groups').first().attr('id');
|
||||
@ -63,7 +64,7 @@ function init__SYSTEM_SAI_saimod_sys_locale() {
|
||||
cData.editmode = false;});
|
||||
$(document).keyup(function(e) {
|
||||
if (e.keyCode === 27) { $('#addtext').show(); } // esc
|
||||
});
|
||||
});
|
||||
//tiny mce modal fix
|
||||
$(document).on('focusin', function(e) {
|
||||
if ($(e.target).closest(".mce-window").length) {
|
||||
@ -78,7 +79,8 @@ function saimod_sys_locale_newtext(){
|
||||
$('#modaltextarea').hide();
|
||||
$('#del_text').hide();
|
||||
$('#addtext').hide();
|
||||
$.ajax({
|
||||
//call not available - check
|
||||
/*$.ajax({
|
||||
url: SAI_ENDPOINT,
|
||||
data: { sai_mod: '.SYSTEM.SAI.saimod_sys_locale',
|
||||
action: 'newtext'},
|
||||
@ -93,7 +95,7 @@ function saimod_sys_locale_newtext(){
|
||||
$('#newcontenttextarea').hide();
|
||||
$('#modal_main').modal('show');
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
function saimod_sys_locale_savecontent(id, lang){
|
||||
@ -161,6 +163,7 @@ function saimod_sys_locale_loadsinglecontent(id, lang){
|
||||
lang: lang},
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
init_tinymce();
|
||||
tinyMCE.activeEditor.setContent(data);
|
||||
$('#modal_success').hide();
|
||||
$('#modal_fail').hide();
|
||||
|
||||
@ -24,7 +24,7 @@ function register_new(){
|
||||
function register_edit(){
|
||||
$('#btn_edit').click(function(){
|
||||
$.ajax({ type : 'GET',
|
||||
url : SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=edit&todo='+$(this).attr('todo')+'&message='+$('#ta_message').val(),
|
||||
url : SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=edit&todo='+$(this).attr('todo')+'&message='+encodeURIComponent($('#ta_message').val()),
|
||||
success : function(data) {
|
||||
if(data.status){
|
||||
load_todo_tab('todolist');
|
||||
@ -37,7 +37,7 @@ function register_edit(){
|
||||
function register_newform(){
|
||||
$('#btn_add').click(function(){
|
||||
$.ajax({ type : 'GET',
|
||||
url : SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=add&todo='+$('#input_message').val(),
|
||||
url : SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=add&todo='+encodeURIComponent($('#input_message').val()),
|
||||
success : function(data) {
|
||||
if(data.status){
|
||||
load_todo_tab('todolist');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user