Commit | Line | Data |
---|---|---|
d87c3006 KJ |
1 | // http://civicrm.org/licensing |
2 | cj(function ($) { | |
3 | function openKCFinder(field) { | |
4 | window.KCFinder = { | |
5 | callBack: function(url) { | |
6 | field.val(url); | |
7 | window.KCFinder = null; | |
8 | } | |
9 | }; | |
10 | ||
11 | window.open(CRM.kcfinderPath + 'kcfinder/browse.php?cms=civicrm&type=images', 'kcfinder_textbox', | |
12 | 'status=0, toolbar=0, location=0, menubar=0, directories=0, ' + | |
13 | 'resizable=1, scrollbars=0, width=800, height=600' | |
14 | ); | |
15 | } | |
16 | ||
17 | $('input[id^="image_"]').click(function(){ | |
18 | openKCFinder($(this)); | |
19 | }); | |
0e7af214 KJ |
20 | |
21 | $('.clear-image').click(function(){ | |
8e7d86c6 | 22 | $('#' + $(this).attr('imgname')).val(''); |
0e7af214 KJ |
23 | return false; |
24 | }); | |
d87c3006 | 25 | }); |