saimod text sai tags hidden on default, whole module translatable
This commit is contained in:
parent
6093852793
commit
fa8679196b
@ -1,10 +1,15 @@
|
|||||||
function init_saimod_sys_text() {
|
function init_saimod_sys_text() {
|
||||||
$('#tabs_text a').click(function (e) {
|
$('#tabs_text a').click(function (e) {
|
||||||
$('#tabs_text li').each(function(){
|
$('#tabs_text li').each(function(){
|
||||||
$(this).removeClass('active');});
|
$(this).removeClass('active');});
|
||||||
$(this).parent().addClass('active');
|
$(this).parent().addClass('active');
|
||||||
});
|
});
|
||||||
text_menu();
|
text_menu();
|
||||||
|
|
||||||
|
$('#btn_show_all').click(function(){
|
||||||
|
$('#tabs_text li').each(function(){
|
||||||
|
$(this).show();});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function text_menu(){
|
function text_menu(){
|
||||||
|
|||||||
@ -8,7 +8,11 @@ class saimod_sys_text extends \SYSTEM\SAI\SaiModule {
|
|||||||
$vars['new_id'] = \SYSTEM\PAGE\text::NEW_ENTRY;
|
$vars['new_id'] = \SYSTEM\PAGE\text::NEW_ENTRY;
|
||||||
$vars['new_lang'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG);
|
$vars['new_lang'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG);
|
||||||
while($r = $res->next()){
|
while($r = $res->next()){
|
||||||
$vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/tabopt.tpl'), $r);}
|
//hide sai entries
|
||||||
|
$r['style'] = '';
|
||||||
|
if(substr($r['tag'],0,3) == 'sai'){
|
||||||
|
$r['style'] = 'display:none;';}
|
||||||
|
$vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/tabopt.tpl'), $r);}
|
||||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text.tpl'), $vars);
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text.tpl'), $vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,11 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="tabbable">
|
<div class="tabbable">
|
||||||
<ul class="nav nav-tabs" id="tabs_text">
|
<ul class="nav nav-tabs" id="tabs_text">
|
||||||
<li><a href="#!text" id="menu_tag_all">All</a></li>
|
<li><a href="#!text" id="menu_tag_all">${basic_all}</a></li>
|
||||||
<li><a href="#!text(notag)" id="menu_tag_notag">No Tag</a></li>
|
<li><a href="#!text(notag)" id="menu_tag_notag">${basic_no_tag}</a></li>
|
||||||
${tabopts}
|
${tabopts}
|
||||||
<input type="submit" value="Add" class="btn-small btn-success content_add" onClick="system.load('text(edittext(editor));id.${new_id};lang.${new_lang}');" style="margin-left: 15px; float: right;">
|
<input type="submit" value="${basic_add}" class="btn-small btn-success content_add" onClick="system.load('text(edittext(editor));id.${new_id};lang.${new_lang}');" style="margin-left: 15px; float: right;">
|
||||||
|
<input type="submit" value="${basic_show_all}" id="btn_show_all" class="btn-small btn-primary" style="margin-left: 15px; float: right;">
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content" id="tab_content"></div>
|
<div class="tab-content" id="tab_content"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,6 +3,6 @@
|
|||||||
<br>
|
<br>
|
||||||
<input id="input_tags" type="text" placeholder="Tags..." value="${tags}" style="width: 98%;"/>
|
<input id="input_tags" type="text" placeholder="Tags..." value="${tags}" style="width: 98%;"/>
|
||||||
<br>
|
<br>
|
||||||
<button id="btn_back" class="btn" onClick="system.load('text');" style="margin-right: 15px; height: 32px; font-size: 13px; float: left;">Back</button>
|
<button id="btn_back" class="btn" onClick="system.load('text');" style="margin-right: 15px; height: 32px; font-size: 13px; float: left;">${basic_back}</button>
|
||||||
<button id="btn_save" text_id="${id}" text_lang="${lang}" class="btn-success" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;">Save</button>
|
<button id="btn_save" text_id="${id}" text_lang="${lang}" class="btn-success" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;">${basic_save}</button>
|
||||||
<button id="btn_delete" text_id="${id}" text_lang="${lang}" class="btn-danger" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;">Delete</button>
|
<button id="btn_delete" text_id="${id}" text_lang="${lang}" class="btn-danger" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;">${basic_delete}</button>
|
||||||
@ -1,12 +1,12 @@
|
|||||||
<table class="sai_table table table-hover table-condensed" style="overflow: auto;">
|
<table class="sai_table table table-hover table-condensed" style="overflow: auto;">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>${table_id}</th>
|
||||||
<th>Language</th>
|
<th>${table_lang}</th>
|
||||||
<th>Text</th>
|
<th>${table_text}</th>
|
||||||
<th>Author</th>
|
<th>${table_author}</th>
|
||||||
<th>Time_create</th>
|
<th>${table_time_create}</th>
|
||||||
<th>Author_edit</th>
|
<th>${table_author_edit}</th>
|
||||||
<th>Time_edit</th>
|
<th>${table_time_edit}</th>
|
||||||
</tr>
|
</tr>
|
||||||
${entries}
|
${entries}
|
||||||
</table>
|
</table>
|
||||||
@ -1 +1 @@
|
|||||||
<li><a href="#!text;tag.${tag}" id="menu_tag_${tag}">${tag}(${count})</a></li>
|
<li style="${style}"><a href="#!text;tag.${tag}" id="menu_tag_${tag}">${tag}(${count})</a></li>
|
||||||
@ -1 +1 @@
|
|||||||
<li><a href="#!text(edittext(editor));id.${id};lang.${lang}" class="${default}" id="menu_lang_${lang}">${lang}</a></li>
|
<li style="${style}"><a href="#!text(edittext(editor));id.${id};lang.${lang}" class="${default}" id="menu_lang_${lang}">${lang}</a></li>
|
||||||
Loading…
x
Reference in New Issue
Block a user