diff options
Diffstat (limited to 'app/Resources/static/themes/baggy/js/uiTools.js')
-rw-r--r-- | app/Resources/static/themes/baggy/js/uiTools.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/app/Resources/static/themes/baggy/js/uiTools.js b/app/Resources/static/themes/baggy/js/uiTools.js deleted file mode 100644 index 713c53f7..00000000 --- a/app/Resources/static/themes/baggy/js/uiTools.js +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | import $ from 'jquery'; | ||
2 | |||
3 | function toggleSaveLinkForm(url, event) { | ||
4 | $('#add-link-result').empty(); | ||
5 | |||
6 | const $bagit = $('#bagit'); | ||
7 | const $bagitForm = $('#bagit-form'); | ||
8 | |||
9 | $bagit.toggleClass('active-current'); | ||
10 | |||
11 | // only if bag-it link is not presented on page | ||
12 | if ($bagit.length === 0) { | ||
13 | if (event !== 'undefined' && event) { | ||
14 | $bagitForm.css({ position: 'absolute', top: event.pageY, left: event.pageX - 200 }); | ||
15 | } else { | ||
16 | $bagitForm.css({ position: 'relative', top: 'auto', left: 'auto' }); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | const searchForm = $('#search-form'); | ||
21 | const plainUrl = $('#plainurl'); | ||
22 | if (searchForm.length !== 0) { | ||
23 | $('#search').removeClass('current'); | ||
24 | $('#search-arrow').removeClass('arrow-down'); | ||
25 | searchForm.hide(); | ||
26 | } | ||
27 | $bagitForm.toggle(); | ||
28 | $('#content').toggleClass('opacity03'); | ||
29 | if (url !== 'undefined' && url) { | ||
30 | plainUrl.val(url); | ||
31 | } | ||
32 | plainUrl.focus(); | ||
33 | } | ||
34 | |||
35 | export default toggleSaveLinkForm; | ||