Sha256: cfd81f8f4444ff92d0b439e0c388603c4250edb3b5281247f14f305f6675212d
Contents?: true
Size: 972 Bytes
Versions: 22
Compression:
Stored size: 972 Bytes
Contents
(($) -> window.CMS or (window.CMS = {}) window.CMS.files = -> modal = $('.cms-files-modal') $('.cms-files-open-modal').on 'click', (e) -> modal.on 'show.bs.modal', -> iframe = modal.find('iframe') iframeSrc = modal.data('iframe-src') if iframe.attr('src') != iframeSrc iframe.attr('src', iframeSrc) modal.modal(show: true) e.preventDefault() # Make the files library modal window fill the browsers available height. modal.on 'show.bs.modal', (e) -> height = $(window).height() - 60 $(e.target).find('.modal-content').css('height', "#{height}px") $(window).on 'resize', -> height = $(window).height() - 60 modal.find('.modal-content').css('height', "#{height}px") # When clicking a file path in the file list select it to make # it easy to copy&paste. $(document).on 'click', '.cms-uploader-filelist input[type=text]', -> $(this).select() ) jQuery
Version data entries
22 entries across 22 versions & 1 rubygems