]> git.wh0rd.org Git - tt-rss.git/commitdiff
further pref-pane updates
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 17 Nov 2010 18:39:51 +0000 (21:39 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 17 Nov 2010 18:39:51 +0000 (21:39 +0300)
functions.php
modules/pref-feeds.php
modules/pref-filters.php
modules/pref-labels.php
modules/pref-prefs.php
modules/pref-users.php
prefs.js
prefs.php

index 2282cb744eaf1cd5a8a879d908303ebdd0f8a3c7..6fa9e9f271b8fc58eb87f815d5c88c3fba02b2ae 100644 (file)
                                $sel .= " value=\"0\"";
                        }
                        
-                       print "<input class=\"noborder\" 
+                       print "<input class=\"noborder\" dojoType=\"dijit.form.RadioButton\" 
                                type=\"radio\" $sel $attributes name=\"$id\">&nbsp;$v&nbsp;";
 
                }
index 783dd34a1445bb64e7c84d0e2828bf73d8a2f6f1..c071ad38fd7a62c7d3c0bacc3abe1a08979a7137 100644 (file)
                                </div>"; */
 
                print "<div dojoType=\"dijit.form.DropDownButton\">".
-                       "<span>" . __('Select')."</span>";
-
+                               "<span>" . __('Select')."</span>";
                print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
                print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(true)\" 
                        dojoType=\"dijit.MenuItem\">".__('All')."</div>";
                print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(false)\" 
                        dojoType=\"dijit.MenuItem\">".__('None')."</div>";
-               print "</div>";
-
-               /* print "<div onclick=\"selectTableRows('prefFeedList', 'all')\">".__('All')."</div>,
-                       <div href=\"#\" onclick=\"selectTableRows('prefFeedList', 'none')\">".__('None')."</div>"; */
-
-               print "</div>";
+               print "</div></div>";
 
                print "<button dojoType=\"dijit.form.Button\" onclick=\"quickAddFeed()\">"
                        .__('Subscribe to feed')."</button dojoType=\"dijit.form.Button\"> ";
index d21f353350eea126c9f510c06a78c1b85fdca5af..153707f6fcd02b24a1174ed3649a6597796277ef 100644 (file)
                        <button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateFilterList()\">".__('Search')."</button>
                </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()\">".
                        __('Create filter')."</button dojoType=\"dijit.form.Button\"> "; 
 
index c794e023ecd7d3ce635e9d4316169dd950e9a7e2..cc92985a9e9ba0a62a71ef7ce3074cdc69a1bfe2 100644 (file)
 
                                if (label_create($link, $caption)) {
                                        if (!$output) {
-                                               //print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption));
+                                               print T_sprintf("Created label <b>%s</b>", htmlspecialchars($caption));
                                        }
                                }
 
                        <button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateLabelList()\">".__('Search')."</button>
                        </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()\">".
                        __('Create label')."</button dojoType=\"dijit.form.Button\"> ";
 
                        print "<p><table width=\"100%\" cellspacing=\"0\" 
                                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;
                        
                        while ($line = db_fetch_assoc($result)) {
index 18a3363961f171ea429ecfd1aed484355697352e..d8a1cb139da974b52f988e972a2a75546d57bad2 100644 (file)
                                                $themes = get_all_themes();
 
                                                print "<td><select name=\"_THEME_ID\">";
-                                               print "<option value=''>".__('Default')."</option>";
+                                               print "<option value='Default'>".__('Default')."</option>";
                                                print "<option disabled>--------</option>";                             
 
                                                foreach ($themes as $t) {
index a97bd3108caa33544e98ce1be9e6251e1cfab64c..9c903907f9fee3255cec49597f46058fdcc06e44 100644 (file)
                                if ($password) {
                                        $pwd_hash = encrypt_password($password, $login);
                                        $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 {
                                        $pass_query_part = "";
                                }
        
                                                $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));
        
                                                initialize_user($link, $new_uid);
        
                                        } 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 {
-                                       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") {
                                db_query($link, "UPDATE ttrss_users SET pwd_hash = '$pwd_hash'
                                        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));
 
                                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";
 
 
                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-toolbar\" dojoType=\"dijit.Toolbar\">";
 
                set_pref($link, "_PREFS_ACTIVE_TAB", "userConfig");
                }
 
                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();\" 
                                onblur=\"javascript:enableHotkeys();\"
                                onchange=\"javascript:updateUsersList()\" value=\"$user_search\">
-                       <button onclick=\"javascript:updateUsersList()\">".
+                       <button dojoType=\"dijit.form.Button\" onclick=\"javascript:updateUsersList()\">".
                                __('Search')."</button>
                        </div>";
 
                        $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 "
-                       <button onclick=\"javascript:selectedUserDetails()\">".
-                       __('Details')."</button>
-                       <button onclick=\"javascript:editSelectedUser()\">".
-                       __('Edit')."</button>
-                       <button onclick=\"javascript:removeSelectedUsers()\">".
-                       __('Remove')."</button>
-                       <button onclick=\"javascript:resetSelectedUserPass()\">".
-                       __('Reset password')."</button>";
+                       <button dojoType=\"dijit.form.Button\" onclick=\"javascript:selectedUserDetails()\">".
+                       __('Details')."</button dojoType=\"dijit.form.Button\">
+                       <button dojoType=\"dijit.form.Button\" onclick=\"javascript:editSelectedUser()\">".
+                       __('Edit')."</button dojoType=\"dijit.form.Button\">
+                       <button dojoType=\"dijit.form.Button\" onclick=\"javascript:removeSelectedUsers()\">".
+                       __('Remove')."</button dojoType=\"dijit.form.Button\">
+                       <button dojoType=\"dijit.form.Button\" onclick=\"javascript:resetSelectedUserPass()\">".
+                       __('Reset password')."</button dojoType=\"dijit.form.Button\">";
 
                print "</div>"; #toolbar
                print "</div>"; #pane
                print "<div id=\"pref-user-content\" dojoType=\"dijit.layout.ContentPane\" region=\"center\">";
+               print "<p>$status_msg";
 
                if ($user_search) {
 
                print "<p><table width=\"100%\" cellspacing=\"0\" 
                        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\">
                                        <td align='center' width=\"5%\">&nbsp;</td>
                                        <td width=''><a href=\"#\" onclick=\"updateUsersList('login')\">".__('Login')."</a></td>
index 3bdf36bc6b9889521cab5866e8a71b5d4a4dc8cf..e4e002c13483a4f46237e8f23fcfd0beccab2721 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -1165,6 +1165,8 @@ function init() {
                dojo.require("dijit.Dialog");
                dojo.require("dijit.form.Button");
                dojo.require("dijit.form.TextBox");
+               dojo.require("dijit.form.RadioButton");
+               dojo.require("dijit.form.Select");
                dojo.require("dijit.Toolbar");
                dojo.require("dojo.data.ItemFileWriteStore");
                dojo.require("dijit.Tree");
index eda3cd0f9c1aae098c135f3bc80007fe71103c18..0e48665b31bc66ba9cc4bb0da75f6ea91edd07fb 100644 (file)
--- a/prefs.php
+++ b/prefs.php
        href="backend.php?op=pref-labels"
        title="<?php echo __('Labels') ?>"></div>
 <?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"
                title="<?php echo __('Users') ?>"></div>
 <?php } ?>