plugin list: update layout

This commit is contained in:
Andrew Dolgov 2019-02-25 17:15:05 +03:00
parent 32db1cb872
commit 52d77dee62
9 changed files with 106 additions and 139 deletions

View File

@ -564,7 +564,7 @@ class Pref_Prefs extends Handler_Protected {
print "<fieldset class='prefs-set'>";
print "<label for='CB_$pref_name' style='width : 300px'>";
print "<label for='CB_$pref_name'>";
print $item['short_desc'] . ":";
print "</label>";
@ -763,18 +763,8 @@ class Pref_Prefs extends Handler_Protected {
print_warning("Your PHP configuration has open_basedir restrictions enabled. Some plugins relying on CURL for functionality may not work correctly.");
}
print "<table width='100%' class='prefPluginsList'>";
print "<tr><td colspan='5'><h2>".__("System plugins")."</h2>".
format_notice(__("System plugins are enabled in <strong>config.php</strong> for all users.")).
"</td></tr>";
print "<tr>
<th width=\"5%\">&nbsp;</th>
<th width='10%'>".__('Plugin')."</th>
<th width=''>".__('Description')."</th>
<th width='5%'>".__('Version')."</th>
<th width='10%'>".__('Author')."</th></tr>";
print "<h2>".__("System plugins")."</h2>";
print_notice("System plugins are enabled in <strong>config.php</strong> for all users.");
$system_enabled = array_map("trim", explode(",", PLUGINS));
$user_enabled = array_map("trim", explode(",", get_pref("_ENABLED_PLUGINS")));
@ -793,102 +783,73 @@ class Pref_Prefs extends Handler_Protected {
$checked = "";
}
print "<tr>";
print "<fieldset class='prefs-set'>
<label>$name:</label>
<label class='checkbox plugin-desc' id='PLABEL-$name'>
<input disabled='1'
dojoType='dijit.form.CheckBox' $checked type='checkbox'>
".htmlspecialchars($about[1]);
print "<td align='center'><input disabled='1'
dojoType=\"dijit.form.CheckBox\" $checked
type=\"checkbox\"></td>";
$icon_class = $checked ? "plugin-enabled" : "plugin-disabled";
print "<td><label><i class='material-icons $icon_class'>extension</i> $name</label></td>";
print "<td>" . htmlspecialchars($about[1]);
if (@$about[4]) {
print " &mdash; <a target=\"_blank\" rel=\"noopener noreferrer\" class=\"visibleLink\"
href=\"".htmlspecialchars($about[4])."\">".__("more info")."</a>";
}
print "</td>";
print "<td>" . htmlspecialchars(sprintf("%.2f", $about[0])) . "</td>";
print "<td>" . htmlspecialchars($about[2]) . "</td>";
if (count($tmppluginhost->get_all($plugin)) > 0) {
if (in_array($name, $system_enabled)) {
print "<td><a href='#' onclick=\"Helpers.clearPluginData('$name')\"
class='visibleLink'>".__("Clear data")."</a></td>";
if (@$about[4]) {
print "<button dojoType='dijit.form.Button' style='float : left' class='alt-info'
onclick='window.open(\"".htmlspecialchars($about[4])."\")'>
<i class='material-icons'>open_in_new</i> ".__("More info...")."</button>";
}
}
print "</tr>";
print "<div dojoType='dijit.Tooltip' connectId='PLABEL-$name' position='after'>".
htmlspecialchars(T_sprintf("v%.2f, by %s", $about[0], $about[2])).
"</div>";
print "</fieldset>";
}
}
print "<tr><td colspan='4'><br/><h2>".__("User plugins")."</h2></td></tr>";
print "<tr>
<th width=\"5%\">&nbsp;</th>
<th width='10%'>".__('Plugin')."</th>
<th width=''>".__('Description')."</th>
<th width='5%'>".__('Version')."</th>
<th width='10%'>".__('Author')."</th></tr>";
print "<h2>".__("User plugins")."</h2>";
foreach ($tmppluginhost->get_plugins() as $name => $plugin) {
$about = $plugin->about();
if (!$about[3]) {
$checked = "";
$disabled = "";
if (in_array($name, $system_enabled)) {
$checked = "checked='1'";
$disabled = "disabled='1'";
$rowclass = '';
} else if (in_array($name, $user_enabled)) {
$checked = "checked='1'";
$disabled = "";
$rowclass = "Selected";
} else {
$checked = "";
$disabled = "";
$rowclass = '';
}
print "<tr class='$rowclass'>";
$icon_class = $checked ? "plugin-enabled" : "plugin-disabled";
print "<td align='center'><input id='FPCHK-$name' name='plugins[]' value='$name' onclick='Tables.onRowChecked(this);'
dojoType=\"dijit.form.CheckBox\" $checked $disabled
type=\"checkbox\"></td>";
print "<td><label for='FPCHK-$name'><i class='material-icons $icon_class'>extension</i> $name</label></td>";
print "<td><label for='FPCHK-$name'>" . htmlspecialchars($about[1]) . "</label>";
if (@$about[4]) {
print " &mdash; <a target=\"_blank\" rel=\"noopener noreferrer\" class=\"visibleLink\"
href=\"".htmlspecialchars($about[4])."\">".__("more info")."</a>";
}
print "</td>";
print "<td>" . htmlspecialchars(sprintf("%.2f", $about[0])) . "</td>";
print "<td>" . htmlspecialchars($about[2]) . "</td>";
print "<fieldset class='prefs-set'>
<label>$name:</label>
<label class='checkbox plugin-desc' id='PLABEL-$name'>
<input name='plugins[]' value='$name' dojoType='dijit.form.CheckBox' $checked $disabled type='checkbox'>
".htmlspecialchars($about[1])."</label>";
if (count($tmppluginhost->get_all($plugin)) > 0) {
if (in_array($name, $system_enabled) || in_array($name, $user_enabled)) {
print "<td><a href='#' onclick=\"Helpers.clearPluginData('$name')\" class='visibleLink'>".__("Clear data")."</a></td>";
print " <button dojoType='dijit.form.Button'
onclick=\"Helpers.clearPluginData('$name')\">
<i class='material-icons'>clear</i> ".__("Clear data")."</button>";
}
}
print "</tr>";
if (@$about[4]) {
print " <button dojoType='dijit.form.Button' class='alt-info'
onclick='window.open(\"".htmlspecialchars($about[4])."\")'>
<i class='material-icons'>open_in_new</i> ".__("More info...")."</button>";
}
print "<div dojoType='dijit.Tooltip' connectId='PLABEL-$name' position='after'>".
htmlspecialchars(T_sprintf("v%.2f, by %s", $about[0], $about[2])).
"</div>";
print "</fieldset>";
}
}
print "</table>";
//print "<p>" . __("You will need to reload Tiny Tiny RSS for plugin changes to take effect.") . "</p>";
print "</div>"; #content-pane
print '<div dojoType="dijit.layout.ContentPane" region="bottom">';
@ -904,7 +865,6 @@ class Pref_Prefs extends Handler_Protected {
print "</form>";
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB,
"hook_prefs_tab", "prefPrefs");

View File

@ -1458,23 +1458,21 @@ body.ttrss_prefs .user-css-editor {
height: 300px;
width: 575px;
}
body.ttrss_prefs fieldset.prefs-set label:first-of-type {
min-width: 300px;
}
body.ttrss_prefs fieldset.prefs-set label.plugin-desc {
width: 600px;
margin-right: 100px;
display: inline-block;
}
body.ttrss_prefs fieldset.prefs-set label.plugin-desc .dijitCheckBox {
margin-right: 10px;
}
body.ttrss_prefs fieldset.prefs-set .help-text {
display: inline-block;
margin-left: 10px;
}
body.ttrss_prefs table.prefPluginsList td label,
body.ttrss_prefs table.prefUserList td {
cursor: pointer;
}
body.ttrss_prefs table.prefPluginsList label {
white-space: nowrap;
}
body.ttrss_prefs table.prefPluginsList i.plugin-enabled {
color: #69C671;
}
body.ttrss_prefs table.prefPluginsList label img {
vertical-align: middle;
}
body.ttrss_prefs table.prefErrorLog tr.errrow td {
font-size: 10px;
}
@ -1632,6 +1630,10 @@ body.ttrss_utility.share_popup .content {
.flat #feedTree .dijitTreeContent .dijitInline {
vertical-align: baseline;
}
.flat .dijitButton i.material-icons {
position: relative;
top: -1px;
}
.flat .tabLabel > i.material-icons {
position: relative;
top: -1px;

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,11 @@
}
}
.dijitButton i.material-icons {
position: relative;
top : -1px;
}
.tabLabel > i.material-icons {
position : relative;
top : -1px;

View File

@ -81,30 +81,26 @@ body.ttrss_prefs {
}
fieldset.prefs-set {
label:first-of-type {
min-width : 300px;
}
label.plugin-desc {
width : 600px;
margin-right : 100px;
display : inline-block;
.dijitCheckBox {
margin-right : 10px;
}
}
.help-text {
display : inline-block;
margin-left : 10px;
}
}
table.prefPluginsList td label, table.prefUserList td {
cursor : pointer;
}
table.prefPluginsList{
label {
white-space : nowrap;
}
i.plugin-enabled {
color : @color-checked;
}
}
table.prefPluginsList label img {
vertical-align : middle;
}
table.prefErrorLog tr.errrow td {
font-size : 10px;
}

View File

@ -1459,23 +1459,21 @@ body.ttrss_prefs .user-css-editor {
height: 300px;
width: 575px;
}
body.ttrss_prefs fieldset.prefs-set label:first-of-type {
min-width: 300px;
}
body.ttrss_prefs fieldset.prefs-set label.plugin-desc {
width: 600px;
margin-right: 100px;
display: inline-block;
}
body.ttrss_prefs fieldset.prefs-set label.plugin-desc .dijitCheckBox {
margin-right: 10px;
}
body.ttrss_prefs fieldset.prefs-set .help-text {
display: inline-block;
margin-left: 10px;
}
body.ttrss_prefs table.prefPluginsList td label,
body.ttrss_prefs table.prefUserList td {
cursor: pointer;
}
body.ttrss_prefs table.prefPluginsList label {
white-space: nowrap;
}
body.ttrss_prefs table.prefPluginsList i.plugin-enabled {
color: #69C671;
}
body.ttrss_prefs table.prefPluginsList label img {
vertical-align: middle;
}
body.ttrss_prefs table.prefErrorLog tr.errrow td {
font-size: 10px;
}
@ -1633,6 +1631,10 @@ body.ttrss_utility.share_popup .content {
.flat #feedTree .dijitTreeContent .dijitInline {
vertical-align: baseline;
}
.flat .dijitButton i.material-icons {
position: relative;
top: -1px;
}
.flat .tabLabel > i.material-icons {
position: relative;
top: -1px;

File diff suppressed because one or more lines are too long

View File

@ -1459,23 +1459,21 @@ body.ttrss_prefs .user-css-editor {
height: 300px;
width: 575px;
}
body.ttrss_prefs fieldset.prefs-set label:first-of-type {
min-width: 300px;
}
body.ttrss_prefs fieldset.prefs-set label.plugin-desc {
width: 600px;
margin-right: 100px;
display: inline-block;
}
body.ttrss_prefs fieldset.prefs-set label.plugin-desc .dijitCheckBox {
margin-right: 10px;
}
body.ttrss_prefs fieldset.prefs-set .help-text {
display: inline-block;
margin-left: 10px;
}
body.ttrss_prefs table.prefPluginsList td label,
body.ttrss_prefs table.prefUserList td {
cursor: pointer;
}
body.ttrss_prefs table.prefPluginsList label {
white-space: nowrap;
}
body.ttrss_prefs table.prefPluginsList i.plugin-enabled {
color: #69C671;
}
body.ttrss_prefs table.prefPluginsList label img {
vertical-align: middle;
}
body.ttrss_prefs table.prefErrorLog tr.errrow td {
font-size: 10px;
}
@ -1633,6 +1631,10 @@ body.ttrss_utility.share_popup .content {
.flat #feedTree .dijitTreeContent .dijitInline {
vertical-align: baseline;
}
.flat .dijitButton i.material-icons {
position: relative;
top: -1px;
}
.flat .tabLabel > i.material-icons {
position: relative;
top: -1px;

File diff suppressed because one or more lines are too long