1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-25 11:57:42 +02:00

use dijit.form.Buttons in refactored filter/label dialogs

This commit is contained in:
Andrew Dolgov 2010-11-20 14:53:52 +03:00
parent d90868d719
commit 59216e083c
4 changed files with 11 additions and 9 deletions

View File

@ -1189,6 +1189,7 @@ function quickAddFilter() {
parameters: dojo.objectToQuery(this.attr('value')), parameters: dojo.objectToQuery(this.attr('value')),
onComplete: function(transport) { onComplete: function(transport) {
this.hide(); this.hide();
notify_progress("Savind data...", true);
notify_info(transport.responseText); notify_info(transport.responseText);
if (inPreferences()) { if (inPreferences()) {
updateFilterList(); updateFilterList();

View File

@ -157,7 +157,7 @@
name=\"reg_exp\" style=\"font-size : 16px;\" value=\"$reg_exp\">"; name=\"reg_exp\" style=\"font-size : 16px;\" value=\"$reg_exp\">";
print "<span id=\"filterDlg_dateChkBox\" $date_ops_invisible>"; print "<span id=\"filterDlg_dateChkBox\" $date_ops_invisible>";
print "&nbsp;<button onclick=\"return filterDlgCheckDate()\">". print "&nbsp;<button dojoType=\"dijit.form.Button\" onclick=\"return filterDlgCheckDate()\">".
__('Check it')."</button>"; __('Check it')."</button>";
print "</span>"; print "</span>";
@ -244,14 +244,14 @@
$reg_exp = htmlspecialchars($reg_exp, ENT_QUOTES); // second escaping seems to be needed for javascript $reg_exp = htmlspecialchars($reg_exp, ENT_QUOTES); // second escaping seems to be needed for javascript
print "<div style=\"float : left\">"; print "<div style=\"float : left\">";
print "<button onclick='return removeFilter($filter_id, \"$reg_exp\")'>". print "<button dojoType=\"dijit.form.Button\" onclick='return removeFilter($filter_id, \"$reg_exp\")'>".
__('Remove')."</button>"; __('Remove')."</button>";
print "</div>"; print "</div>";
print "<button onclick=\"return dijit.byId('filterEditDlg').execute()\">". print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').execute()\">".
__('Save')."</button> "; __('Save')."</button> ";
print "<button onclick=\"return dijit.byId('filterEditDlg').hide()\">". print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').hide()\">".
__('Cancel')."</button>"; __('Cancel')."</button>";
print "</div>"; print "</div>";

View File

@ -25,7 +25,7 @@
$fg_color = $line['fg_color']; $fg_color = $line['fg_color'];
$bg_color = $line['bg_color']; $bg_color = $line['bg_color'];
print "<span class=\"labelColorIndicator\" id=\"label-editor-indicator\" style='color : $fg_color; background-color : $bg_color'>&alpha;</span>"; print "<span class=\"labelColorIndicator\" id=\"label-editor-indicator\" style='color : $fg_color; background-color : $bg_color; margin-bottom : 4px; margin-right : 4px'>&alpha;</span>";
print "<input style=\"font-size : 16px\" name=\"caption\" print "<input style=\"font-size : 16px\" name=\"caption\"
dojoType=\"dijit.form.ValidationTextBox\" dojoType=\"dijit.form.ValidationTextBox\"
@ -74,9 +74,9 @@
# print "</form>"; # print "</form>";
print "<div class=\"dlgButtons\">"; print "<div class=\"dlgButtons\">";
print "<button onclick=\"dijit.byId('labelEditDlg').execute()\">". print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('labelEditDlg').execute()\">".
__('Save')."</button>"; __('Save')."</button>";
print "<button onclick=\"dijit.byId('labelEditDlg').hide()\">". print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('labelEditDlg').hide()\">".
__('Cancel')."</button>"; __('Cancel')."</button>";
print "</div>"; print "</div>";

View File

@ -302,6 +302,7 @@ function editFilter(id, event) {
execute: function() { execute: function() {
if (this.validate()) { if (this.validate()) {
this.hide(); this.hide();
notify_progress("Savind data...", true);
new Ajax.Request("backend.php", { new Ajax.Request("backend.php", {
parameters: dojo.objectToQuery(this.attr('value')), parameters: dojo.objectToQuery(this.attr('value')),
onComplete: function(transport) { onComplete: function(transport) {
@ -1652,8 +1653,8 @@ function removeFilter(id, title) {
var ok = confirm(msg); var ok = confirm(msg);
if (ok) { if (ok) {
closeInfoBox(); dijit.byId("filterEditDlg").hide();
notify_progress("Removing filter..."); notify_progress("Removing filter...");
var query = "?op=pref-filters&subop=remove&ids="+ var query = "?op=pref-filters&subop=remove&ids="+