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
| # Helpers | |
| def get_file(http_location, file) | |
| run "curl -sL #{http_location}/#{file} > #{file}" | |
| end | |
| def app_name | |
| @app_name ||= @root.split('/').last | |
| end | |
| # Remove Prototype defaults and grab jQuery + Rails adapter |
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
| (function ( $ ) { | |
| var rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; | |
| $.mobile.page.prototype.options.cache = true; | |
| $( "body" ) | |
| .delegate( ":mobile-page", "pagebeforecreate", function() { | |
| var page = $( this ).data( "page" ), | |
| cache = page.options.cache; | |
| if ( cache === true ) { | |
| return; |
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
| (function ( jQuery ) { | |
| $( 'body' ).delegate( ".ui-page", "pagebeforeshow", function( event, opts ) { | |
| var $page = $(event.target), | |
| reloadPage = false, | |
| cacheStrategy = $page.data('cache'), | |
| pageInstance = $page.data('page'), | |
| invalidateCache = pageInstance.dirtyCache; | |
| // Check if page never gets cached | |
| if ( cacheStrategy == 'never' ) { |
NewerOlder