|
2 | 2 | $(document).ready ->
|
3 | 3 | $('td.localization_row[data-editing=0]').on 'click', ->
|
4 | 4 | $this = $(this)
|
5 |
| - if parseInt($this.data('editing'))==0 |
| 5 | + if parseInt($this.data('editing')) == 0 |
6 | 6 | edited_rows[$this.data('id')] = $this.html()
|
7 | 7 | unless parseInt($this.data('editing'))
|
8 | 8 | $this.data('editing', '1')
|
9 | 9 | $.get $this.data('edit')
|
10 |
| - $('td.localization_row').on 'click', 'form button.cancel', (e)-> |
| 10 | + $('td.localization_row').on 'click', 'form button.cancel', (e) -> |
11 | 11 | $this = $(this)
|
12 |
| - if $this[0].localName=='button' |
| 12 | + if $this[0].localName == 'button' |
13 | 13 | $this = $this.parents('td.localization_row')
|
14 | 14 | $this.data('editing', 0)
|
15 | 15 | $this.html edited_rows[$this.data('id')]
|
16 | 16 | e.preventDefault()
|
17 | 17 | false
|
18 |
| - $('tr.localization_versions_row').on 'click', '.close_versions', (e)-> |
| 18 | + $('tr.localization_versions_row').on 'click', '.close_versions', (e) -> |
19 | 19 | $this = $(this)
|
20 | 20 | $parent = $this.parents('tr.localization_versions_row')
|
21 | 21 | $parent.addClass('hidden')
|
22 | 22 | $parent.children('td').html('')
|
23 |
| - $('tr.localization_key_row').on 'click', 'input.wysiwyg_switch', (e)-> |
| 23 | + $('tr.localization_key_row').on 'click', 'input.wysiwyg_switch', (e) -> |
24 | 24 | $(this).parents('form').find("textarea").jqte()
|
25 |
| - $('tr.localization_key_row').on 'click', '.request_info_link', (e)-> |
| 25 | + $('tr.localization_key_row').on 'click', '.request_info_link', (e) -> |
26 | 26 | $(this).parents('tr.localization_key_row').find(".request_info_row").toggleClass('hidden')
|
| 27 | + $('tr.localization_key_row').on 'click', '.js-copy_to_clipboard', (e) -> |
| 28 | + if(!navigator.clipboard) |
| 29 | + alert('No browser support for clipboard') |
| 30 | + else |
| 31 | + navigator.clipboard.writeText($(this).data('key')) |
| 32 | + e.preventDefault() |
| 33 | + false |
0 commit comments