blob: 127d85c968c05498a011753ac714b37e546b54bb [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001<script type="text/javascript" nonce="[nonce]">
2runOnLoad(function() {
3 var removeMFVElements = document.getElementsByClassName("removeMultiFieldValueWidget");
4 for (var i = 0; i < removeMFVElements.length; ++i) {
5 var el = removeMFVElements[[]i];
6 el.addEventListener("click", function(event) {
7 _removeMultiFieldValueWidget(event.target);
8 });
9 }
10
11 var addMFVElements = document.getElementsByClassName("addMultiFieldValueWidget");
12 for (var i = 0; i < addMFVElements.length; ++i) {
13 var el = addMFVElements[[]i];
14 el.addEventListener("click", function(event) {
15 var target = event.target;
16 var fieldID = target.getAttribute("data-field-id");
17 var fieldType = target.getAttribute("data-field-type");
18 var fieldValidate1 = target.getAttribute("data-validate-1");
19 var fieldValidate2 = target.getAttribute("data-validate-2");
20 var fieldPhaseName = target.getAttribute("data-phase-name");
21 _addMultiFieldValueWidget(
22 event.target, fieldID, fieldType, fieldValidate1, fieldValidate2, fieldPhaseName);
23 });
24 }
25
26 var customFieldElements = document.getElementsByClassName("customfield");
27 for (var i = 0; i < customFieldElements.length; ++i) {
28 var el = customFieldElements[[]i];
29 el.addEventListener("focus", function(event) {
30 _acrob(null);
31 _acof(event);
32 });
33 }
34});
35</script>