From d90868d719a4a620ff5c1f74457626c429196590 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 20 Nov 2010 14:10:26 +0300 Subject: rework filter dialogs to use dijit.Form --- modules/popup-dialog.php | 64 +++++++++++++++++++++--------------------------- modules/pref-filters.php | 54 ++++++++++++++++++++-------------------- 2 files changed, 54 insertions(+), 64 deletions(-) (limited to 'modules') diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index ad434bd9b..2f339e669 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -451,14 +451,9 @@ $active_feed_id = db_escape_string($_REQUEST["param"]); - print "".__('Create Filter').""; - print ""; - - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; $result = db_query($link, "SELECT id,description FROM ttrss_filter_types ORDER BY description"); @@ -474,33 +469,36 @@ print "
"; - print ""; - print __("Date") . " "; + print ""; $filter_params = array( "before" => __("before"), "after" => __("after")); - print_select_hash("filter_date_modifier", "before", $filter_params); + print_select_hash("filter_date_modifier", "before", + $filter_params, 'dojoType="dijit.form.Select"'); print " "; - print ""; + print ""; - print ""; + print ""; print " "; print ""; - print "
" . __("on field") . " "; + print "
" . __("on field") . " "; print_select_hash("filter_type", 1, $filter_types, - 'onchange="filterDlgCheckType(this)"'); + 'onchange="filterDlgCheckType(this)" dojoType="dijit.form.Select"'); print "
"; print __("in") . " "; - print_feed_select($link, "feed_id", $active_feed_id); + print_feed_select($link, "feed_id", $active_feed_id, + 'dojoType="dijit.form.FilteringSelect"'); print "
"; @@ -508,7 +506,7 @@ print "
"; - print ""; - print ""; + print ""; print " " . __("with parameters:") . " "; - print ""; + print ""; - print_label_select($link, "action_param_label", $action_param); + print_label_select($link, "action_param_label", $action_param, + 'id="filterDlg_actionParamLabel" dojoType="dijit.form.Select"'); print ""; @@ -537,30 +536,23 @@ print "
".__("Options")."
"; print "
"; - print "
"; - - print " + print "
"; - print " + print " "; print "
"; - print "
"; - - print ""; print "
"; - print " "; - print ""; + print ""; - print "]]>"; - -// print ""; + print "
"; //return; } diff --git a/modules/pref-filters.php b/modules/pref-filters.php index 12bfd4397..28f30fa69 100644 --- a/modules/pref-filters.php +++ b/modules/pref-filters.php @@ -103,11 +103,6 @@ $filter_id = db_escape_string($_REQUEST["id"]); - header("Content-Type: text/xml"); - print ""; - print "".__('Filter Editor').""; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; $result = db_query($link, "SELECT id,description FROM ttrss_filter_types ORDER BY description"); @@ -145,7 +140,7 @@ $date_ops_invisible = 'style="display : none"'; } - print ""; + print ""; print __("Date") . " "; $filter_params = array( @@ -153,26 +148,28 @@ "after" => __("after")); print_select_hash("filter_date_modifier", $filter_param, - $filter_params); + $filter_params, 'dojoType="dijit.form.Select"'); print " "; - print ""; + print ""; - print ""; + print ""; print " "; print ""; print "
" . __("on field") . " "; print_select_hash("filter_type", $filter_type, $filter_types, - 'onchange="filterDlgCheckType(this)"'); + 'onchange="filterDlgCheckType(this)" dojoType="dijit.form.Select"'); print "
"; print __("in") . " "; - print_feed_select($link, "feed_id", $feed_id); + print_feed_select($link, "feed_id", $feed_id, + 'dojoType="dijit.form.FilteringSelect"'); print "
"; @@ -180,14 +177,14 @@ print "
"; - print ""; $param_int_hidden = ($action_id == 7) ? "" : "display : none"; print_label_select($link, "action_param_label", $action_param, - $param_int_hidden); + "style=\"$param_int_hidden\"" . + 'id="filterDlg_actionParamLabel" dojoType="dijit.form.Select"'); print ""; @@ -221,21 +219,21 @@ print "
"; if ($enabled) { - $checked = "checked"; + $checked = "checked=\"1\""; } else { $checked = ""; } - print " + print "
"; if ($inverse) { - $checked = "checked"; + $checked = "checked=\"1\""; } else { $checked = ""; } - print " + print " "; print "
"; @@ -250,13 +248,13 @@ __('Remove').""; print "
"; - print " "; - print ""; - print "]]>
"; + print ""; return; } -- cgit v1.2.3