further pref-pane updates
This commit is contained in:
parent
1985a5e0d7
commit
d69fa6d66a
|
@ -1695,7 +1695,7 @@
|
||||||
$sel .= " value=\"0\"";
|
$sel .= " value=\"0\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<input class=\"noborder\"
|
print "<input class=\"noborder\" dojoType=\"dijit.form.RadioButton\"
|
||||||
type=\"radio\" $sel $attributes name=\"$id\"> $v ";
|
type=\"radio\" $sel $attributes name=\"$id\"> $v ";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -992,19 +992,13 @@
|
||||||
</div>"; */
|
</div>"; */
|
||||||
|
|
||||||
print "<div dojoType=\"dijit.form.DropDownButton\">".
|
print "<div dojoType=\"dijit.form.DropDownButton\">".
|
||||||
"<span>" . __('Select')."</span>";
|
"<span>" . __('Select')."</span>";
|
||||||
|
|
||||||
print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
|
print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
|
||||||
print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(true)\"
|
print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(true)\"
|
||||||
dojoType=\"dijit.MenuItem\">".__('All')."</div>";
|
dojoType=\"dijit.MenuItem\">".__('All')."</div>";
|
||||||
print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(false)\"
|
print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(false)\"
|
||||||
dojoType=\"dijit.MenuItem\">".__('None')."</div>";
|
dojoType=\"dijit.MenuItem\">".__('None')."</div>";
|
||||||
print "</div>";
|
print "</div></div>";
|
||||||
|
|
||||||
/* print "<div onclick=\"selectTableRows('prefFeedList', 'all')\">".__('All')."</div>,
|
|
||||||
<div href=\"#\" onclick=\"selectTableRows('prefFeedList', 'none')\">".__('None')."</div>"; */
|
|
||||||
|
|
||||||
print "</div>";
|
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"quickAddFeed()\">"
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"quickAddFeed()\">"
|
||||||
.__('Subscribe to feed')."</button dojoType=\"dijit.form.Button\"> ";
|
.__('Subscribe to feed')."</button dojoType=\"dijit.form.Button\"> ";
|
||||||
|
|
|
@ -306,6 +306,15 @@
|
||||||
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateFilterList()\">".__('Search')."</button>
|
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateFilterList()\">".__('Search')."</button>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
|
print "<div dojoType=\"dijit.form.DropDownButton\">".
|
||||||
|
"<span>" . __('Select')."</span>";
|
||||||
|
print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
|
||||||
|
print "<div onclick=\"selectTableRows('prefFilterList', 'all')\"
|
||||||
|
dojoType=\"dijit.MenuItem\">".__('All')."</div>";
|
||||||
|
print "<div onclick=\"selectTableRows('prefFilterList', 'none')\"
|
||||||
|
dojoType=\"dijit.MenuItem\">".__('None')."</div>";
|
||||||
|
print "</div></div>";
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return quickAddFilter()\">".
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"return quickAddFilter()\">".
|
||||||
__('Create filter')."</button dojoType=\"dijit.form.Button\"> ";
|
__('Create filter')."</button dojoType=\"dijit.form.Button\"> ";
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
if (label_create($link, $caption)) {
|
if (label_create($link, $caption)) {
|
||||||
if (!$output) {
|
if (!$output) {
|
||||||
//print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption));
|
print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,6 +163,15 @@
|
||||||
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateLabelList()\">".__('Search')."</button>
|
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateLabelList()\">".__('Search')."</button>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
|
print "<div dojoType=\"dijit.form.DropDownButton\">".
|
||||||
|
"<span>" . __('Select')."</span>";
|
||||||
|
print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
|
||||||
|
print "<div onclick=\"selectTableRows('prefLabelList', 'all')\"
|
||||||
|
dojoType=\"dijit.MenuItem\">".__('All')."</div>";
|
||||||
|
print "<div onclick=\"selectTableRows('prefLabelList', 'none')\"
|
||||||
|
dojoType=\"dijit.MenuItem\">".__('None')."</div>";
|
||||||
|
print "</div></div>";
|
||||||
|
|
||||||
print"<button dojoType=\"dijit.form.Button\" onclick=\"return addLabel()\">".
|
print"<button dojoType=\"dijit.form.Button\" onclick=\"return addLabel()\">".
|
||||||
__('Create label')."</button dojoType=\"dijit.form.Button\"> ";
|
__('Create label')."</button dojoType=\"dijit.form.Button\"> ";
|
||||||
|
|
||||||
|
@ -209,12 +218,6 @@
|
||||||
print "<p><table width=\"100%\" cellspacing=\"0\"
|
print "<p><table width=\"100%\" cellspacing=\"0\"
|
||||||
class=\"prefLabelList\" id=\"prefLabelList\">";
|
class=\"prefLabelList\" id=\"prefLabelList\">";
|
||||||
|
|
||||||
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
|
||||||
".__('Select:')."
|
|
||||||
<a href=\"#\" onclick=\"selectTableRows('prefLabelList', 'all')\">".__('All')."</a>,
|
|
||||||
<a href=\"#\" onclick=\"selectTableRows('prefLabelList', 'none')\">".__('None')."</a>
|
|
||||||
</td</tr>";
|
|
||||||
|
|
||||||
$lnum = 0;
|
$lnum = 0;
|
||||||
|
|
||||||
while ($line = db_fetch_assoc($result)) {
|
while ($line = db_fetch_assoc($result)) {
|
||||||
|
|
|
@ -346,7 +346,7 @@
|
||||||
$themes = get_all_themes();
|
$themes = get_all_themes();
|
||||||
|
|
||||||
print "<td><select name=\"_THEME_ID\">";
|
print "<td><select name=\"_THEME_ID\">";
|
||||||
print "<option value=''>".__('Default')."</option>";
|
print "<option value='Default'>".__('Default')."</option>";
|
||||||
print "<option disabled>--------</option>";
|
print "<option disabled>--------</option>";
|
||||||
|
|
||||||
foreach ($themes as $t) {
|
foreach ($themes as $t) {
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
if ($password) {
|
if ($password) {
|
||||||
$pwd_hash = encrypt_password($password, $login);
|
$pwd_hash = encrypt_password($password, $login);
|
||||||
$pass_query_part = "pwd_hash = '$pwd_hash', ";
|
$pass_query_part = "pwd_hash = '$pwd_hash', ";
|
||||||
print_notice(T_sprintf('Changed password of user <b>%s</b>.', $login));
|
$status_msg = format_notice(T_sprintf('Changed password of user <b>%s</b>.', $login));
|
||||||
} else {
|
} else {
|
||||||
$pass_query_part = "";
|
$pass_query_part = "";
|
||||||
}
|
}
|
||||||
|
@ -251,18 +251,18 @@
|
||||||
|
|
||||||
$new_uid = db_fetch_result($result, 0, "id");
|
$new_uid = db_fetch_result($result, 0, "id");
|
||||||
|
|
||||||
print_notice(T_sprintf("Added user <b>%s</b> with password <b>%s</b>",
|
$status_msg = format_notice(T_sprintf("Added user <b>%s</b> with password <b>%s</b>",
|
||||||
$login, $tmp_user_pwd));
|
$login, $tmp_user_pwd));
|
||||||
|
|
||||||
initialize_user($link, $new_uid);
|
initialize_user($link, $new_uid);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print_warning(T_sprintf("Could not create user <b>%s</b>", $login));
|
$status_msg = format_warning(T_sprintf("Could not create user <b>%s</b>", $login));
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print_warning(T_sprintf("User <b>%s</b> already exists.", $login));
|
$status_msg = format_warning(T_sprintf("User <b>%s</b> already exists.", $login));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ($subop == "resetPass") {
|
} else if ($subop == "resetPass") {
|
||||||
|
@ -282,11 +282,11 @@
|
||||||
db_query($link, "UPDATE ttrss_users SET pwd_hash = '$pwd_hash'
|
db_query($link, "UPDATE ttrss_users SET pwd_hash = '$pwd_hash'
|
||||||
WHERE id = '$uid'");
|
WHERE id = '$uid'");
|
||||||
|
|
||||||
print_notice(T_sprintf("Changed password of user <b>%s</b>
|
$status_msg = format_notice(T_sprintf("Changed password of user <b>%s</b>
|
||||||
to <b>%s</b>", $login, $tmp_user_pwd));
|
to <b>%s</b>", $login, $tmp_user_pwd));
|
||||||
|
|
||||||
if ($email) {
|
if ($email) {
|
||||||
print_notice(T_sprintf("Notifying <b>%s</b>.", $email));
|
$status_msg += format_notice(T_sprintf("Notifying <b>%s</b>.", $email));
|
||||||
|
|
||||||
require_once "lib/MiniTemplator.class.php";
|
require_once "lib/MiniTemplator.class.php";
|
||||||
|
|
||||||
|
@ -349,6 +349,7 @@
|
||||||
|
|
||||||
print "<div id=\"pref-user-wrap\" dojoType=\"dijit.layout.BorderContainer\" gutters=\"false\">";
|
print "<div id=\"pref-user-wrap\" dojoType=\"dijit.layout.BorderContainer\" gutters=\"false\">";
|
||||||
print "<div id=\"pref-user-header\" dojoType=\"dijit.layout.ContentPane\" region=\"top\">";
|
print "<div id=\"pref-user-header\" dojoType=\"dijit.layout.ContentPane\" region=\"top\">";
|
||||||
|
|
||||||
print "<div id=\"pref-user-toolbar\" dojoType=\"dijit.Toolbar\">";
|
print "<div id=\"pref-user-toolbar\" dojoType=\"dijit.Toolbar\">";
|
||||||
|
|
||||||
set_pref($link, "_PREFS_ACTIVE_TAB", "userConfig");
|
set_pref($link, "_PREFS_ACTIVE_TAB", "userConfig");
|
||||||
|
@ -362,11 +363,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<div style='float : right; padding-right : 4px;'>
|
print "<div style='float : right; padding-right : 4px;'>
|
||||||
<input id=\"user_search\" size=\"20\" type=\"search\"
|
<input dojoType=\"dijit.form.TextBox\" id=\"user_search\" size=\"20\" type=\"search\"
|
||||||
onfocus=\"javascript:disableHotkeys();\"
|
onfocus=\"javascript:disableHotkeys();\"
|
||||||
onblur=\"javascript:enableHotkeys();\"
|
onblur=\"javascript:enableHotkeys();\"
|
||||||
onchange=\"javascript:updateUsersList()\" value=\"$user_search\">
|
onchange=\"javascript:updateUsersList()\" value=\"$user_search\">
|
||||||
<button onclick=\"javascript:updateUsersList()\">".
|
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateUsersList()\">".
|
||||||
__('Search')."</button>
|
__('Search')."</button>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
|
@ -376,21 +377,31 @@
|
||||||
$sort = "login";
|
$sort = "login";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<button onclick=\"javascript:addUser()\">".__('Create user')."</button>";
|
print "<div dojoType=\"dijit.form.DropDownButton\">".
|
||||||
|
"<span>" . __('Select')."</span>";
|
||||||
|
print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
|
||||||
|
print "<div onclick=\"selectTableRows('prefUserList', 'all')\"
|
||||||
|
dojoType=\"dijit.MenuItem\">".__('All')."</div>";
|
||||||
|
print "<div onclick=\"selectTableRows('prefUserList', 'none')\"
|
||||||
|
dojoType=\"dijit.MenuItem\">".__('None')."</div>";
|
||||||
|
print "</div></div>";
|
||||||
|
|
||||||
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"javascript:addUser()\">".__('Create user')."</button>";
|
||||||
|
|
||||||
print "
|
print "
|
||||||
<button onclick=\"javascript:selectedUserDetails()\">".
|
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:selectedUserDetails()\">".
|
||||||
__('Details')."</button>
|
__('Details')."</button dojoType=\"dijit.form.Button\">
|
||||||
<button onclick=\"javascript:editSelectedUser()\">".
|
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:editSelectedUser()\">".
|
||||||
__('Edit')."</button>
|
__('Edit')."</button dojoType=\"dijit.form.Button\">
|
||||||
<button onclick=\"javascript:removeSelectedUsers()\">".
|
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:removeSelectedUsers()\">".
|
||||||
__('Remove')."</button>
|
__('Remove')."</button dojoType=\"dijit.form.Button\">
|
||||||
<button onclick=\"javascript:resetSelectedUserPass()\">".
|
<button dojoType=\"dijit.form.Button\" onclick=\"javascript:resetSelectedUserPass()\">".
|
||||||
__('Reset password')."</button>";
|
__('Reset password')."</button dojoType=\"dijit.form.Button\">";
|
||||||
|
|
||||||
print "</div>"; #toolbar
|
print "</div>"; #toolbar
|
||||||
print "</div>"; #pane
|
print "</div>"; #pane
|
||||||
print "<div id=\"pref-user-content\" dojoType=\"dijit.layout.ContentPane\" region=\"center\">";
|
print "<div id=\"pref-user-content\" dojoType=\"dijit.layout.ContentPane\" region=\"center\">";
|
||||||
|
print "<p>$status_msg";
|
||||||
|
|
||||||
if ($user_search) {
|
if ($user_search) {
|
||||||
|
|
||||||
|
@ -424,12 +435,6 @@
|
||||||
print "<p><table width=\"100%\" cellspacing=\"0\"
|
print "<p><table width=\"100%\" cellspacing=\"0\"
|
||||||
class=\"prefUserList\" id=\"prefUserList\">";
|
class=\"prefUserList\" id=\"prefUserList\">";
|
||||||
|
|
||||||
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
|
||||||
".__('Select:')."
|
|
||||||
<a href=\"#\" onclick=\"selectTableRows('prefUserList', 'all')\">".__('All')."</a>,
|
|
||||||
<a href=\"#\" onclick=\"selectTableRows('prefUserList', 'none')\">".__('None')."</a>
|
|
||||||
</td</tr>";
|
|
||||||
|
|
||||||
print "<tr class=\"title\">
|
print "<tr class=\"title\">
|
||||||
<td align='center' width=\"5%\"> </td>
|
<td align='center' width=\"5%\"> </td>
|
||||||
<td width=''><a href=\"#\" onclick=\"updateUsersList('login')\">".__('Login')."</a></td>
|
<td width=''><a href=\"#\" onclick=\"updateUsersList('login')\">".__('Login')."</a></td>
|
||||||
|
|
2
prefs.js
2
prefs.js
|
@ -1165,6 +1165,8 @@ function init() {
|
||||||
dojo.require("dijit.Dialog");
|
dojo.require("dijit.Dialog");
|
||||||
dojo.require("dijit.form.Button");
|
dojo.require("dijit.form.Button");
|
||||||
dojo.require("dijit.form.TextBox");
|
dojo.require("dijit.form.TextBox");
|
||||||
|
dojo.require("dijit.form.RadioButton");
|
||||||
|
dojo.require("dijit.form.Select");
|
||||||
dojo.require("dijit.Toolbar");
|
dojo.require("dijit.Toolbar");
|
||||||
dojo.require("dojo.data.ItemFileWriteStore");
|
dojo.require("dojo.data.ItemFileWriteStore");
|
||||||
dojo.require("dijit.Tree");
|
dojo.require("dijit.Tree");
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
href="backend.php?op=pref-labels"
|
href="backend.php?op=pref-labels"
|
||||||
title="<?php echo __('Labels') ?>"></div>
|
title="<?php echo __('Labels') ?>"></div>
|
||||||
<?php if ($_SESSION["access_level"] >= 10) { ?>
|
<?php if ($_SESSION["access_level"] >= 10) { ?>
|
||||||
<div id=userConfigTab" dojoType="dijit.layout.ContentPane"
|
<div id="userConfigTab" dojoType="dijit.layout.ContentPane"
|
||||||
href="backend.php?op=pref-users"
|
href="backend.php?op=pref-users"
|
||||||
title="<?php echo __('Users') ?>"></div>
|
title="<?php echo __('Users') ?>"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
Loading…
Reference in New Issue