This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function(){ | |
| // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered | |
| // the "data-source" attribute of .modal-trigger must specify the url that will be ajaxed | |
| $('.modal-trigger').click(function(){ | |
| var url = $('.modal-trigger').attr("data-source"); | |
| // use other ajax submission type for post, put ... | |
| $.get( url, function( data ) { | |
| // use this method you need to handle the response from the view | |
| // with rails Server-Generated JavaScript Responses this is portion will be in a .js.erb file | |
| $( ".modal-content" ).html(data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * | |
| * Gmail attachment extractor. | |
| * | |
| * Downloads attachments from Gmail and saves it to a file. | |
| * Uses PHP IMAP extension, so make sure it is enabled in your php.ini, | |
| * extension=php_imap.dll |