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')),
onComplete: function(transport) {
this.hide();
notify_progress("Savind data...", true);
notify_info(transport.responseText);
if (inPreferences()) {
updateFilterList();

View File

@ -157,7 +157,7 @@
name=\"reg_exp\" style=\"font-size : 16px;\" value=\"$reg_exp\">";
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>";
print "</span>";
@ -244,14 +244,14 @@
$reg_exp = htmlspecialchars($reg_exp, ENT_QUOTES); // second escaping seems to be needed for javascript
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>";
print "</div>";
print "<button onclick=\"return dijit.byId('filterEditDlg').execute()\">".
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').execute()\">".
__('Save')."</button> ";
print "<button onclick=\"return dijit.byId('filterEditDlg').hide()\">".
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').hide()\">".
__('Cancel')."</button>";
print "</div>";

View File

@ -25,7 +25,7 @@
$fg_color = $line['fg_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\"
dojoType=\"dijit.form.ValidationTextBox\"
@ -74,9 +74,9 @@
# print "</form>";
print "<div class=\"dlgButtons\">";
print "<button onclick=\"dijit.byId('labelEditDlg').execute()\">".
print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('labelEditDlg').execute()\">".
__('Save')."</button>";
print "<button onclick=\"dijit.byId('labelEditDlg').hide()\">".
print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('labelEditDlg').hide()\">".
__('Cancel')."</button>";
print "</div>";

View File

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