| Index: appengine/monorail/templates/tracker/label-fields.ezt
|
| diff --git a/appengine/monorail/templates/tracker/label-fields.ezt b/appengine/monorail/templates/tracker/label-fields.ezt
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c48adf01adf22137156dd8d824c36e0e64be7126
|
| --- /dev/null
|
| +++ b/appengine/monorail/templates/tracker/label-fields.ezt
|
| @@ -0,0 +1,126 @@
|
| +[# Make a 3x8 grid of label entry form fields with autocomplete on each one.
|
| +
|
| + Args:
|
| + arg0: if "just-two" is passed, only show the first two rows
|
| + and give the user links to click to expose more rows.
|
| +]
|
| +
|
| +<div id="LF_row1" class="nowrap">
|
| + <input type="text" class="labelinput" id="label0" size="20" autocomplete="off"
|
| + name="label" value="[label0]">
|
| + <input type="text" class="labelinput" id="label1" size="20" autocomplete="off"
|
| + name="label" value="[label1]">
|
| + <input type="text" class="labelinput" id="label2" size="20" autocomplete="off"
|
| + name="label" value="[label2]">
|
| +</div>
|
| +
|
| +<div id="LF_row2" class="nowrap">
|
| + <input type="text" class="labelinput" id="label3" size="20" autocomplete="off"
|
| + name="label" value="[label3]">
|
| + <input type="text" class="labelinput" id="label4" size="20" autocomplete="off"
|
| + name="label" value="[label4]">
|
| + <input type="text" class="labelinput" id="label5" size="20" autocomplete="off"
|
| + [is arg0 "just-two"]data-show-id="LF_row3" data-hide-id="addrow2"[end]
|
| + name="label" value="[label5]">
|
| + [is arg0 "just-two"]<span id="addrow2" class="fakelink" data-instead="LF_row3">Add a row</span>[end]
|
| +</div>
|
| +
|
| +<div id="LF_row3" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
|
| + <input type="text" class="labelinput" id="label6" size="20" autocomplete="off"
|
| + name="label" value="[label6]">
|
| + <input type="text" class="labelinput" id="label7" size="20" autocomplete="off"
|
| + name="label" value="[label7]">
|
| + <input type="text" class="labelinput" id="label8" size="20" autocomplete="off"
|
| + [is arg0 "just-two"]data-show-id="LF_row4" data-hide-id="addrow3"[end]
|
| + name="label" value="[label8]">
|
| + [is arg0 "just-two"]<span id="addrow3" class="fakelink" data-instead="LF_row4">Add a row</span>[end]
|
| +</div>
|
| +
|
| +<div id="LF_row4" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
|
| + <input type="text" class="labelinput" id="label9" size="20" autocomplete="off"
|
| + name="label" value="[label9]">
|
| + <input type="text" class="labelinput" id="label10" size="20" autocomplete="off"
|
| + name="label" value="[label10]">
|
| + <input type="text" class="labelinput" id="label11" size="20" autocomplete="off"
|
| + [is arg0 "just-two"]data-show-id="LF_row5" data-hide-id="addrow4"[end]
|
| + name="label" value="[label11]">
|
| + [is arg0 "just-two"]<span id="addrow4" class="fakelink" data-instead="LF_row5">Add a row</span>[end]
|
| +</div>
|
| +
|
| +<div id="LF_row5" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
|
| + <input type="text" class="labelinput" id="label12" size="20" autocomplete="off"
|
| + name="label" value="[label12]">
|
| + <input type="text" class="labelinput" id="label13" size="20" autocomplete="off"
|
| + name="label" value="[label13]">
|
| + <input type="text" class="labelinput" id="label14" size="20" autocomplete="off"
|
| + [is arg0 "just-two"]data-show-id="LF_row6" data-hide-id="addrow5"[end]
|
| + name="label" value="[label14]">
|
| + [is arg0 "just-two"]<span id="addrow5" class="fakelink" data-instead="LF_row6">Add a row</span>[end]
|
| +</div>
|
| +
|
| +<div id="LF_row6" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
|
| + <input type="text" class="labelinput" id="label15" size="20" autocomplete="off"
|
| + name="label" value="[label15]">
|
| + <input type="text" class="labelinput" id="label16" size="20" autocomplete="off"
|
| + name="label" value="[label16]">
|
| + <input type="text" class="labelinput" id="label17" size="20" autocomplete="off"
|
| + [is arg0 "just-two"]data-show-id="LF_row7" data-hide-id="addrow6"[end]
|
| + name="label" value="[label17]">
|
| + [is arg0 "just-two"]<span id="addrow6" class="fakelink" data-instead="LF_row7">Add a row</span>[end]
|
| +</div>
|
| +
|
| +<div id="LF_row7" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
|
| + <input type="text" class="labelinput" id="label18" size="20" autocomplete="off"
|
| + name="label" value="[label18]">
|
| + <input type="text" class="labelinput" id="label19" size="20" autocomplete="off"
|
| + name="label" value="[label19]">
|
| + <input type="text" class="labelinput" id="label20" size="20" autocomplete="off"
|
| + [is arg0 "just-two"]data-show-id="LF_row8" data-hide-id="addrow7"[end]
|
| + name="label" value="[label20]">
|
| + [is arg0 "just-two"]<span id="addrow7" class="fakelink" data-instead="LF_row8">Add a row</span>[end]
|
| +</div>
|
| +
|
| +<div id="LF_row8" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
|
| + <input type="text" class="labelinput" id="label21" size="20" autocomplete="off"
|
| + name="label" value="[label21]">
|
| + <input type="text" class="labelinput" id="label22" size="20" autocomplete="off"
|
| + name="label" value="[label22]">
|
| + <input type="text" class="labelinput" id="label23" size="20" autocomplete="off"
|
| + name="label" value="[label23]">
|
| +</div>
|
| +
|
| +<script type="text/javascript" nonce="[nonce]">
|
| +runOnLoad(function() {
|
| + var labelInputs = document.getElementsByClassName("labelinput");
|
| + for (var i = 0; i < labelInputs.length; ++i) {
|
| + var labelInput = labelInputs[[]i];
|
| + labelInput.addEventListener("keyup", function (event) {
|
| + _dirty();
|
| + if (event.target.getAttribute("data-show-id") &&
|
| + event.target.getAttribute("data-hide-id") &&
|
| + event.target.value) {
|
| + _showID(event.target.getAttribute("data-show-id"));
|
| + _hideID(event.target.getAttribute("data-hide-id"));
|
| + }
|
| + return _vallab(event.target);
|
| + });
|
| + labelInput.addEventListener("blur", function (event) {
|
| + return _vallab(event.target);
|
| + });
|
| + labelInput.addEventListener("focus", function (event) {
|
| + return _acof(event);
|
| + });
|
| + }
|
| +
|
| + var addRowLinks = document.getElementsByClassName("fakelink");
|
| + for (var i = 0; i < addRowLinks.length; ++i) {
|
| + var rowLink = addRowLinks[[]i];
|
| + rowLink.addEventListener("click", function (event) {
|
| + _acrob(null);
|
| + var insteadID = event.target.getAttribute("data-instead");
|
| + if (insteadID)
|
| + _showInstead(insteadID, this);
|
| + });
|
| + }
|
| +});
|
| +</script>
|
|
|