sai ui fixes

This commit is contained in:
Messerbill 2015-06-03 02:17:08 +02:00
parent 0f968bebee
commit d479ee6c02
10 changed files with 88 additions and 31 deletions

View File

@ -1,24 +1,24 @@
<h4>${sai_config_title}</h4>
<hr>
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
<tr>
<th>Config ID</th>
<th>Config Name</th>
<th>Value</th>
<tr class="sai_not_sortable">
<th onclick="sai_sort_tables(0)">Config ID</th>
<th onclick="sai_sort_tables(1)">Config Name</th>
<th onclick="sai_sort_tables(2)">Value</th>
</tr>
<tr>
<tr class="sai_not_sortable">
<th>Basics</th>
<th></th>
<th></th>
</tr>
${basics}
<tr>
<tr class="sai_not_sortable">
<th>Database</th>
<th></th>
<th></th>
</tr>
${database}
<tr>
<tr class="sai_not_sortable">
<th>System Admin Interface</th>
<th></th>
<th></th>

View File

@ -14,10 +14,14 @@
<option ${selected_2} value="2">FAIL</option>
<option ${selected_3} value="3">FAIL_CLASS</option>
</select>
<button type="button" class="btn-sm btn btn-warning btn_cron_status" _class="${class}" _i="${i}"><span class="glyphicon glyphicon-repeat" aria-hidden="true"></span> ${basic_change}</button>
</td>
<td>
<button type="button" class="btn-sm btn btn-success btn_cron_edit" _class="${class}" _min="${min}" _hour="${hour}" _day="${day}" _day_week="${day_week}" _month="${month}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> ${basic_edit}</button>
<button type="button" class="btn-sm btn btn-danger btn_cron_del" _class="${class}"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> ${basic_delete}</button>
<button type="button" class="btn-sm btn btn-warning btn_cron_status" _class="${class}" _i="${i}"><span class="glyphicon glyphicon-repeat" aria-hidden="true"></span></button>
</td>
<td>
<button type="button" class="btn-sm btn btn-success btn_cron_edit" _class="${class}" _min="${min}" _hour="${hour}" _day="${day}" _day_week="${day_week}" _month="${month}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></button>
</td>
<td>
<button type="button" class="btn-sm btn btn-danger btn_cron_del" _class="${class}"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
</td>
</tr>

View File

@ -14,7 +14,9 @@ Last Visit: ${last_visit}<br/>
<th>last_run</th>
<th>next_run</th>
<th>status</th>
<th></th>
<th>action</th>
<th></th>
</tr>
${content}
<tr>
@ -27,6 +29,8 @@ Last Visit: ${last_visit}<br/>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><button type="button" class="btn-sm btn btn-success" id="btn_cron_add"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> ${basic_add}</button></td>
</tr>
</table>

View File

@ -4,6 +4,8 @@
<th>Extension</th>
<th>URL</th>
<th>Action</th>
<th></th>
<th></th>
</tr>
${content}
<tr>
@ -11,6 +13,8 @@
<th><form enctype="multipart/form-data" id="form_${cat}"><input class="form-control" type="file" name="datei_${cat}"></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th><button type="submit" class="btn btn-sm btn_upload btn-success" cat="${cat}"><span class="glyphicon glyphicon-upload" aria-hidden="true"></span> ${basic_upload}</button></form></th>
</tr>
</table>

View File

@ -6,7 +6,11 @@
</td>
<td>
<button class="btn-danger btn btn-sm imgdelbtn" style="margin: 1px; margin-right: 3px" cat="${cat}" id="${name}"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> ${basic_delete}</button>
</td>
<td>
<input type="text" id="renametext_${cat}_${i}" class="form-control" style="width: 100px; margin:0;" placeholder="new name...">
</td>
<td>
<button type="submit" class="btn-warning btn btn-sm imgrnbtn" style="margin: 1px;;" cat="${cat}" id="${name}" textfield="#renametext_${cat}_${i}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> ${basic_rename}</button>
</td>
</tr>

View File

@ -9,8 +9,8 @@ class saimod_sys_mod extends \SYSTEM\SAI\SaiModule {
foreach($sys_mods as $mod){
$v = array();
$v['mod'] = $mod;
$v['public'] = \call_user_func(array($mod, 'right_public')) ? '<span class="badge badge-success">true</span>' : '<span class="badge badge-important">false</span>';
$v['you'] = \call_user_func(array($mod, 'right_right')) ? '<span class="badge badge-success">true</span>' : '<span class="badge badge-important">false</span>';
$v['public'] = \call_user_func(array($mod, 'right_public')) ? '<span class="glyphicon glyphicon-ok"></span>' : '<span class="glyphicon glyphicon-remove"></span>';
$v['you'] = \call_user_func(array($mod, 'right_right')) ? '<span class="glyphicon glyphicon-ok"></span>' : '<span class="glyphicon glyphicon-remove"></span>';
$vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_tr.tpl'),$v);
}
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_table.tpl'),$vars);
@ -23,8 +23,8 @@ class saimod_sys_mod extends \SYSTEM\SAI\SaiModule {
foreach($mods as $mod){
$v = array();
$v['mod'] = $mod;
$v['public'] = \call_user_func(array($mod, 'right_public')) ? '<span class="badge badge-success">true</span>' : '<span class="badge badge-important">false</span>';
$v['you'] = \call_user_func(array($mod, 'right_right')) ? '<span class="badge badge-success">true</span>' : '<span class="badge badge-important">false</span>';
$v['public'] = \call_user_func(array($mod, 'right_public')) ? '<span class="glyphicon glyphicon-ok"></span>' : '<span class="glyphicon glyphicon-remove"></span>';
$v['you'] = \call_user_func(array($mod, 'right_right')) ? '<span class="glyphicon glyphicon-ok"></span>' : '<span class="glyphicon glyphicon-remove"></span>';
$vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_tr.tpl'),$v);
}
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_table.tpl'),$vars);

View File

@ -8,5 +8,5 @@
<button class="btn-sm btn btn-success content_add" onClick="system.load('text(edittext(editor));id.${new_id};lang.${new_lang}');" style="margin-left: 15px; float: right;"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> ${basic_add}</button>
<button type="submit" value="${basic_show_all}" id="btn_show_all" class="btn-sm btn btn-primary" style="margin-left: 15px; float: right;"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> ${basic_show_all}</button>
</ul>
<div class="tab-content" id="tab_content"></div>
<div class="tab-content sai_margin_top_10" id="tab_content"></div>
</div>

View File

@ -1,8 +1,6 @@
<b>Text ID:</b> <input id="input_new_id" type="text" value="${id}"/>
<div class="sai_margin_top_20 sai_margin_bottom_20"><label>Text ID:</label> <input class="action-control" id="input_new_id" type="text" value="${id}"/></div>
<textarea id="texteditor" name="texteditor">${content}</textarea>
<br>
<input id="input_tags" type="text" placeholder="Tags..." value="${tags}" style="width: 98%;"/>
<br>
<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_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>

View File

@ -23,29 +23,50 @@
.sai_padding_off {
padding: 0;}
/* margins and paddings 10px */
/* margins and paddings 10px and 20px */
.sys_padding_top_10 {
.sai_padding_top_10 {
padding-top: 10px;}
.sys_padding_left_10 {
.sai_padding_left_10 {
padding-left: 10px;}
.sys_padding_right_10 {
.sai_padding_right_10 {
padding-right: 10px;}
.sys_padding_bottom_10 {
.sai_padding_bottom_10 {
padding-bottom: 10px;}
.sys_padding_10 {
.sai_padding_10 {
padding: 10px;}
.sys_margin_top_10 {
.sai_margin_top_10 {
margin-top: 10px;}
.sys_margin_left_10 {
.sai_margin_left_10 {
margin-left: 10px;}
.sys_margin_right_10 {
.sai_margin_right_10 {
margin-right: 10px;}
.sys_margin_bottom_10 {
.sai_margin_bottom_10 {
margin-bottom: 10px;}
.sys_margin_10 {
.sai_margin_10 {
margin: 10px;}
.sai_padding_top_20 {
padding-top: 20px;}
.sai_padding_left_20 {
padding-left: 20px;}
.sai_padding_right_20 {
padding-right: 20px;}
.sai_padding_bottom_20 {
padding-bottom: 20px;}
.sai_padding_20 {
padding: 20px;}
.sai_margin_top_20 {
margin-top: 20px;}
.sai_margin_left_20 {
margin-left: 20px;}
.sai_margin_right_20 {
margin-right: 20px;}
.sai_margin_bottom_20 {
margin-bottom: 20px;}
.sai_margin_20 {
margin: 20px;}
/* floatings */
.sai_float_left {
@ -73,4 +94,6 @@
border-left: 0;}
.sai_p_modules:active {
border-right: 3px solid #1C569C;
border-left: 0;}
border-left: 0;}
/* widthes and heights */

View File

@ -5,6 +5,7 @@ $(document).ready(function() {
});
//autocollapse();
$(window).on('resize', autocollapse);
sai_sort_tables();
});
function sys_hashchange(state){
@ -22,4 +23,23 @@ function autocollapse() {
navbar.removeClass('collapsed'); // set standart view
if(navbar.innerHeight() > 50) // check if we've got 2 lines
navbar.addClass('collapsed'); // force collapse mode
}
function sai_sort_tables(col) {
//console.log($('tr'));
//console.log($('tr.sai_not_sortable'));
var tableRows = $('tr');
var sortArray = [];
for (var i = 0; i < tableRows.length; i++){
sortArray.push(tableRows[i]);
if (tableRows[i].className === 'sai_not_sortable') {
array_sort(sortArray, col);
}
}
}
function array_sort(sortArray, col){
for (var i = 0; i < sortArray.length; i++){
//console.log(sortArray[i].children[col]);
}
}