1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 13:41:52 +02:00

Admin-UI: Issue #3058 - Made true/false icons consistent regardless of whether inline editing is enabled or disabled.

This commit is contained in:
Cameron 2020-04-09 17:22:10 -07:00
parent bd647b1514
commit 3730254b8a
4 changed files with 20 additions and 9 deletions

View File

@ -475,7 +475,7 @@ class news_admin_ui extends e_admin_ui
'news_render_type' => array('title' => LAN_LOCATION, 'type' => 'dropdown', 'data'=>'safestr', 'tab'=>2, 'inline'=>true, 'readParms'=>array('type'=>'checkboxes'), 'width' => 'auto', 'thclass' => 'left', 'class' => 'left', 'nosort' => false, 'batch'=>true, 'filter'=>true),
'news_sticky' => array('title' => LAN_NEWS_28, 'type' => 'boolean', 'data'=>'int', 'tab'=>2, 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false, 'batch'=>true, 'filter'=>true),
'news_sticky' => array('title' => LAN_NEWS_28, 'type' => 'boolean', 'data'=>'int', 'tab'=>2, 'width' => 'auto', 'thclass' => 'center', 'inline'=>true, 'class' => 'center', 'nosort' => false, 'batch'=>true, 'filter'=>true),
'news_allow_comments' => array('title' => LAN_COMMENTS, 'type' => 'boolean', 'data'=>'int', 'tab'=>2, 'writeParms'=>'inverse=1', 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false,'batch'=>true, 'filter'=>true,'readParms'=>'reverse=1'),
'news_comment_total' => array('title' => LAN_NEWS_60, 'type' => 'number', 'data'=>'int', 'tab'=>2, 'noedit'=>true, 'width' => '10%', 'thclass' => '', 'class' => null, 'nosort' => false),
// admin_news_notify

View File

@ -447,8 +447,8 @@ define("E_32_TRUE", "<i class='S32 e-true-32'></i>");
define("ADMIN_CHILD_ICON", '<img src="'.e_IMAGE_ABS.'generic/branchbottom.gif" class="treeprefix level-x icon" alt="" />'); // must use single quotes.
define("ADMIN_FILTER_ICON", "<i class='fa fa-filter'></i>");
define("ADMIN_TRUE_ICON", "<i class='fa fa-check text-success'></i>");
define("ADMIN_FALSE_ICON", "<i class='fa fa-times text-danger'></i>");
define("ADMIN_TRUE_ICON", "<span class='text-success admin-true-icon'>&#10004;</span>"/*"<i class='fa fa-check text-success'></i>"*/);
define("ADMIN_FALSE_ICON", "<span class='text-danger admin-false-icon'>&#10799;</span>" /*"<i class='fa fa-times text-danger'></i>"*/);
define("ADMIN_WARNING_ICON", "<i class='fa fa-warning text-warning'></i>");
define("ADMIN_GRID_ICON", "<i class='fa fa-th'></i>");
define("ADMIN_LIST_ICON", "<i class='fa fa-th-list'></i>");

View File

@ -5463,20 +5463,23 @@ var_dump($select_options);*/
{
// https://stackoverflow.com/questions/2965971/how-to-add-images-in-select-list
$false = ($value === '') ? "&square;" : "&cross;";
$false = ($value === '') ? "&square;" : "&#10799;"; // "&cross;";
}
$true = varset($parms['true'],'&check;'); // custom representation for 'true'. (supports font-awesome when set by css)
$true = varset($parms['true'], "&#10004;" /*'&check;'*/); // custom representation for 'true'. (supports font-awesome when set by css)
// $true = '\f00c';
// $false = '\f00d';
// $true = '&#xf00c';
// $false = '\f00d';
$value = intval($value);
$wparms = (vartrue($parms['reverse'])) ? array(0=>$true, 1=>$false) : array(0=>$false, 1=>$true);
$dispValue = $wparms[$value];
return $this->renderInline($field, $id, $attributes['title'], $value, $dispValue, 'select', $wparms, array('class'=>'e-editable-boolean'));
$styleClass = ($value === 1) ? 'admin-true-icon' : 'admin-false-icon';
return $this->renderInline($field, $id, $attributes['title'], $value, $dispValue, 'select', $wparms, array('class'=>'e-editable-boolean '.$styleClass));
}
if(vartrue($parms['reverse']))
@ -5553,7 +5556,7 @@ var_dump($select_options);*/
{
$className = get_class($cls);
e107::getDebug()->log("Missing Method: ".$className."::".$meth." ".print_a($attributes,true));
return "<span class='label label-important label-danger'>Missing Method</span>";
return "<span class='label label-important label-danger' title='".$className."::".$meth."'>Missing Method</span>";
}
// print_a($attributes);
// Inline Editing.

View File

@ -224,6 +224,8 @@ td .file.well { margin-bottom:0 }
#admin-ui-edit-db-language span.default,
#admin-ui-list-db-language span.default { color: white }
td.options .btn-group { display: flex; }
@ -566,6 +568,12 @@ img.S32:hover {}
table.adminlist { margin-bottom: 0 }
table.adminlist td .video-responsive { height: auto; padding:0 }
.admin-true-icon { color: #51a351; font-weight:bold; font-size:1.2em; }
.admin-false-icon { color: #ee5f5b; font-weight:bold; font-size:1.2em; }
select.e-editable-boolean option[value='1'] { color: #51a351; }
select.e-editable-boolean option[value='0'] { color: #ee5f5b; }
span.e-search input[type='text'] { padding-left:15px; font-style: italic }
/*