Guest User

Untitled

a guest
Jul 23rd, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  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. });
Add Comment
Please, Sign In to add comment