SHOW:
|
|
- or go back to the newest paste.
| 1 | /** | |
| 2 | * Attach the Image Browser icon to all listed fields. | |
| 3 | */ | |
| 4 | $(document).ready(function() {
| |
| 5 | // The JQuery selector will be loaded from the module side, ensure it's set. | |
| 6 | if(ib_any_fields) {
| |
| 7 | var ibbutton = "<div class='ib-any-button'></div>" | |
| 8 | $(ib_any_fields).each(function(){
| |
| 9 | $(this).addClass('ib-any-field');
| |
| 10 | $(this).attr("readonly", "readonly");
| |
| 11 | $(this).click(function() {
| |
| 12 | var parentThis = this; | |
| 13 | ib_any_dialog_open(parentThis); | |
| 14 | }); | |
| 15 | }); | |
| 16 | $(document).ajaxComplete(function() {
| |
| 17 | if($("#browse .browse .view-content ul li a")) {
| |
| 18 | $("#browse .browse .view-content ul li a .insert").click();
| |
| 19 | } | |
| 20 | }); | |
| 21 | } | |
| 22 | }); |