Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Unified Diff: appengine/monorail/templates/tracker/issue-bulk-operator-part.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/monorail/templates/tracker/issue-bulk-operator-part.ezt
diff --git a/appengine/monorail/templates/tracker/issue-bulk-operator-part.ezt b/appengine/monorail/templates/tracker/issue-bulk-operator-part.ezt
new file mode 100644
index 0000000000000000000000000000000000000000..3af2c0bbdb11b0f6676c359124aa9e7d42983c69
--- /dev/null
+++ b/appengine/monorail/templates/tracker/issue-bulk-operator-part.ezt
@@ -0,0 +1,28 @@
+[# Display a <select> widget with options to set/append/remove/clear the field.
+ Args:
+ arg0: element ID of widget to disable if Clear is selected. The form name and ID
+ of the <select> will be "op_" + arg0.
+ arg1: "multi" for multi-valued fields so that "Append" and "Remove" are offered.
+ ]
+<select name="op_[arg0]" id="op_[arg0]" style="width:9em" tabindex="-1">
+ [is arg1 "multi"]
+ <option value="append" selected="selected">Append +=</option>
+ <option value="remove">Remove -=</option>
+ [# TODO(jrobbins): <option value="setexact">Set exactly :=</option>]
+ [else]
+ <option value="set" selected="selected">Set =</option>
+ <option value="clear">Clear</option>
+ [end]
+</select>
+
+[is arg1 "multi"][else]
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+ if ($("op_[arg0]")) {
+ $("op_[arg0]").addEventListener("change", function(event) {
+ _ignoreWidgetIfOpIsClear(event.target, '[arg0]');
+ });
+ }
+});
+</script>
+[end]

Powered by Google App Engine
This is Rietveld 408576698