text module update
This commit is contained in:
parent
3fb3906f0e
commit
c2f295374b
@ -1,7 +1,8 @@
|
|||||||
//saving content data
|
//saving content data
|
||||||
var cData = {group: '',
|
var cData = {group: '',
|
||||||
lang: '',
|
lang: '',
|
||||||
id: ''};
|
id: '',
|
||||||
|
editmode: false};
|
||||||
|
|
||||||
function init__SYSTEM_SAI_saimod_sys_locale() {
|
function init__SYSTEM_SAI_saimod_sys_locale() {
|
||||||
if(!cData.lang && !cData.group) {
|
if(!cData.lang && !cData.group) {
|
||||||
@ -16,8 +17,12 @@ function init__SYSTEM_SAI_saimod_sys_locale() {
|
|||||||
$('.content_add').click(function(){
|
$('.content_add').click(function(){
|
||||||
saimod_sys_locale_newtext();});
|
saimod_sys_locale_newtext();});
|
||||||
|
|
||||||
|
$('#edit_close').click(function(){
|
||||||
|
cData.editmode = false;});
|
||||||
|
|
||||||
$('#newtext').click(function(){
|
$('#newtext').click(function(){
|
||||||
saimod_sys_locale_savenewcontent();});
|
saimod_sys_locale_savenewcontent();
|
||||||
|
cData.editmode = false;});
|
||||||
|
|
||||||
$('.groups').click(function(){
|
$('.groups').click(function(){
|
||||||
if (cData.group){
|
if (cData.group){
|
||||||
@ -26,16 +31,21 @@ function init__SYSTEM_SAI_saimod_sys_locale() {
|
|||||||
cData.group = $(this).attr('id');
|
cData.group = $(this).attr('id');
|
||||||
saimod_sys_locale_loadcontent(cData.lang, cData.group);}
|
saimod_sys_locale_loadcontent(cData.lang, cData.group);}
|
||||||
cData.group = $(this).attr('id');
|
cData.group = $(this).attr('id');
|
||||||
$(this).addClass('active');});
|
$(this).addClass('active');
|
||||||
|
});
|
||||||
|
|
||||||
$('.langli').click(function(){
|
$('.langli').click(function(){
|
||||||
|
cData.editmode = true;
|
||||||
if (cData.group && cData.lang){
|
if (cData.group && cData.lang){
|
||||||
$('#langtabs_ li#'+cData.lang).removeClass('active');
|
$('#langtabs_ li#'+cData.lang).removeClass('active');
|
||||||
$('#'+cData.lang).removeClass('active');}
|
$('#'+cData.lang).removeClass('active');}
|
||||||
cData.lang = $(this).attr('id');
|
cData.lang = $(this).attr('id');
|
||||||
$('#langtabs_ li#'+cData.lang).addClass('active');
|
$('#langtabs_ li#'+cData.lang).addClass('active');
|
||||||
$('#'+cData.lang).addClass('active');
|
$('#'+cData.lang).addClass('active');
|
||||||
saimod_sys_locale_loadcontent(cData.lang, cData.group);});
|
saimod_sys_locale_loadcontent(cData.lang, cData.group);
|
||||||
|
if (cData.editmode === true){
|
||||||
|
saimod_sys_locale_loadsinglecontent(cData.id, cData.lang);
|
||||||
|
}});
|
||||||
|
|
||||||
$('#changetext').click(function(){
|
$('#changetext').click(function(){
|
||||||
saimod_sys_locale_savecontent(cData.id, cData.lang);});
|
saimod_sys_locale_savecontent(cData.id, cData.lang);});
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
<div id="modal_success" style="display: none;"><font color="green">Changes have been saved!</font></div>
|
<div id="modal_success" style="display: none;"><font color="green">Changes have been saved!</font></div>
|
||||||
<div id="modal_fail" style="display: none;"><font color="red">Changes could not be saved!</font></div>
|
<div id="modal_fail" style="display: none;"><font color="red">Changes could not be saved!</font></div>
|
||||||
<Button type="button" id="del_text" class="btn-small btn-danger" style="float: left;">Delete</button>
|
<Button type="button" id="del_text" class="btn-small btn-danger" style="float: left;">Delete</button>
|
||||||
<button type="button" class="btn" data-dismiss="modal">Close</button>
|
<button type="button" class="btn" data-dismiss="modal" id="edit_close">Close</button>
|
||||||
<button type="button" class="btn btn-primary" id="changetext">Save changes</button>
|
<button type="button" class="btn btn-primary" id="changetext">Save changes</button>
|
||||||
<button type="button" class="btn btn-primary" id="newtext" style="display: none;">Save new text</button>
|
<button type="button" class="btn btn-primary" id="newtext" style="display: none;">Save new text</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user