#48 save & close button for saimod_text, fixed langauge problem for unknown langauges in saimod_text
This commit is contained in:
parent
0182ecf502
commit
145abe460f
@ -71,6 +71,28 @@ function init_saimod_sys_text_editor(){
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn_save_close').click(function(){
|
||||
var new_id = $('#input_new_id').val();
|
||||
var lang = $(this).attr('text_lang');
|
||||
$.ajax({ type :'POST',
|
||||
url : './sai.php',
|
||||
data : { sai_mod: '.SYSTEM.SAI.saimod_sys_text',
|
||||
action: 'save',
|
||||
id: $(this).attr('text_id'),
|
||||
new_id: new_id,
|
||||
lang: lang,
|
||||
tags: JSON.stringify($('#input_tags').val().split(',').map(function(s) { return s.trim() })),
|
||||
text: encodeURIComponent(tinymce.activeEditor.getContent({format : 'raw'}))},
|
||||
success : function(data) {
|
||||
if(data.status){
|
||||
alert('success');
|
||||
system.back();
|
||||
}else{
|
||||
alert('Problem: '+data);}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn_delete').click(function(){
|
||||
//Ask if delete all langs of this tag - 3 button dialog required
|
||||
$.ajax({ type :'GET',
|
||||
|
||||
@ -3,4 +3,5 @@
|
||||
<div class="sai_margin_top_20 sai_margin_bottom_20"><input class="form-control" id="input_tags" type="text" placeholder="Tags..." value="${tags}" style="width: 98%;"/></div>
|
||||
<button id="btn_back" class="btn btn-sm btn-default" onClick="system.load('text');" style="margin-right: 15px; height: 32px; font-size: 13px; float: left;"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span> ${basic_back}</button>
|
||||
<button id="btn_save" text_id="${id}" text_lang="${lang}" class="btn-success btn btn-sm" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> ${basic_save}</button>
|
||||
<button id="btn_save_close" text_id="${id}" text_lang="${lang}" class="btn-success btn btn-sm" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> ${basic_save_close}</button>
|
||||
<button id="btn_delete" text_id="${id}" text_lang="${lang}" class="btn-danger btn btn-sm" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> ${basic_delete}</button>
|
||||
@ -132,7 +132,7 @@ REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `na
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (710, 42, 2, 700, 'loadByTag', 'lang', 'STRING');
|
||||
--
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (712, 42, 2, 700, 'edittext', 'id', 'STRING');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (713, 42, 2, 700, 'edittext', 'lang', 'LANG');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (713, 42, 2, 700, 'edittext', 'lang', 'STRING');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (715, 42, 2, 700, 'editor', 'id', 'STRING');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (716, 42, 2, 700, 'editor', 'lang', 'STRING');
|
||||
--
|
||||
|
||||
@ -337,6 +337,14 @@
|
||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_save', 'basic');
|
||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_save', 'sai_text');
|
||||
|
||||
DELETE FROM `system_text` WHERE id = 'basic_save_close';
|
||||
DELETE FROM `system_text_tag` WHERE id = 'basic_save_close';
|
||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_save_close', 'deDE', 'Speichern & Schließen', 2, 2, '2015-04-20 01:46:06', '2015-04-20 01:46:06');
|
||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_save_close', 'enUS', 'Save & Close', 2, 2, '2015-04-18 13:35:09', '2015-04-18 13:35:09');
|
||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_save_close', 'frFR', 'Mémoriser & Fermer', 3, 3, '2015-04-20 16:29:38', '2015-04-20 16:29:38');
|
||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_save_close', 'basic');
|
||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_save_close', 'sai_text');
|
||||
|
||||
DELETE FROM `system_text` WHERE id = 'basic_show_all';
|
||||
DELETE FROM `system_text_tag` WHERE id = 'basic_show_all';
|
||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_show_all', 'deDE', 'Alle anzeigen', 2, 2, '2015-04-20 01:44:40', '2015-04-20 01:44:40');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user