Przeglądaj źródła

display lack of filter plugin actions properly

Andrew Dolgov 8 lat temu
rodzic
commit
b028da0a2d
2 zmienionych plików z 17 dodań i 1 usunięć
  1. 9 1
      classes/pref/filters.php
  2. 8 0
      css/dijit.css

+ 9 - 1
classes/pref/filters.php

@@ -1033,11 +1033,19 @@ class Pref_Filters extends Handler_Protected {
 				$filter_action_hash[$fclass . ":" . $faction["action"]] =
 					$fclass . ": " . $faction["description"];
 			}
+		}
+
+		if (count($filter_action_hash) == 0) {
+			$filter_plugin_disabled = "disabled";
 
+			$filter_action_hash["no-data"] = __("No actions available");
+
+		} else {
+			$filter_plugin_disabled = "";
 		}
 
 		print_select_hash("filterDlg_actionParamPlugin", $action_param, $filter_action_hash,
-			"style=\"$plugin_param_hidden\" dojoType=\"dijit.form.Select\"",
+			"style=\"$plugin_param_hidden\" dojoType=\"dijit.form.Select\" $filter_plugin_disabled",
 			"action_param_plugin");
 
 		print "</span>";

+ 8 - 0
css/dijit.css

@@ -518,6 +518,14 @@ button[disabled],
 	display : none;
 }
 
+.claro .dijitSelect.dijitSelectDisabled  {
+	background-color: #eeeeee;
+}
+
+.claro .dijitSelect.dijitSelectDisabled .dijitSelectLabel {
+	cursor: not-allowed;
+}
+
 .claro .dijitTextBox.dijitReadOnly,
 .claro .dijitTextBox.dijitReadOnly .dijitInputField .dijitInputInner {
 	cursor: not-allowed;