diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 18:19:50 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 18:19:50 +0200 |
commit | ce00a61057535d49aa0e83181a1d317d7842571b (patch) | |
tree | 280243de9ff791449fb2c82f3f0f2b9bd931d5b2 /extensions/FlagTypeComment/template | |
parent | 6367a26da4093a8379e370ef328e9507c98b2e7e (diff) | |
parent | 6657fa9f5210d5b5a9b14c0cba6882bd56232054 (diff) | |
download | bugzilla-ce00a61057535d49aa0e83181a1d317d7842571b.tar.gz bugzilla-ce00a61057535d49aa0e83181a1d317d7842571b.tar.xz |
Merge remote-tracking branch 'bmo/master'
Diffstat (limited to 'extensions/FlagTypeComment/template')
-rw-r--r-- | extensions/FlagTypeComment/template/en/default/flag/type_comment.html.tmpl | 40 |
1 files changed, 11 insertions, 29 deletions
diff --git a/extensions/FlagTypeComment/template/en/default/flag/type_comment.html.tmpl b/extensions/FlagTypeComment/template/en/default/flag/type_comment.html.tmpl index 88d9d4dd7..56e03040a 100644 --- a/extensions/FlagTypeComment/template/en/default/flag/type_comment.html.tmpl +++ b/extensions/FlagTypeComment/template/en/default/flag/type_comment.html.tmpl @@ -20,35 +20,17 @@ # byron jones <glob@mozilla.com> #%] -[% IF ftc_flags.keys.size %] - <script [% script_nonce FILTER none %]> - YAHOO.util.Event.onDOMReady(function() { - var selects = YAHOO.util.Dom.getElementsByClassName('flag_select'); - for (var i = 0; i < selects.length; i++) { - YAHOO.util.Event.on(selects[i], 'change', ftc_on_change); - } - }); +<link rel="stylesheet" href="extensions/FlagTypeComment/web/styles/ftc.css"> +<script [% script_nonce FILTER none %] src="extensions/FlagTypeComment/web/js/ftc.js"></script> - function ftc_on_change(ev) { - var id = ev.target.id.split('-')[1]; - var state = ev.target.value; - var commentEl = document.getElementById('comment'); - if (!commentEl) return; - [% FOREACH type_id = ftc_flags.keys %] - [% FOREACH state = ftc_states %] - if ([% type_id FILTER none %] == id && '[% state FILTER js %]' == state) { - var text = '[% ftc_flags.$type_id.$state FILTER js %]'; - var value = commentEl.value; - if (value == text) { - return; - } else if (value == '') { - commentEl.value = text; - } else { - commentEl.value = text + "\n\n" + value; - } - } - [% END %] +[% IF ftc_flags.keys.size %] + [%# plaintext templates from database %] + [% FOREACH type_id = ftc_flags.keys %] + [% FOREACH state = ftc_states %] + <meta name="ftc:[% type_id FILTER none %]:[% state FILTER html %]" + content="[% ftc_flags.$type_id.$state FILTER html_linebreak %]"> [% END %] - } - </script> + [% END %] + [%# HTML form templates from extensions %] + [% Hook.process("form") %] [% END %] |