- Timestamp:
- 13-03-2008 16:35:38 (10 months ago)
- Author:
- s0undt3ch
- Message:
-
Path files are now computed with the help of Pylons compute_public_path. Hopefully fixes #1.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r122
|
r125
|
|
| 28 | 28 | from webhelpers.rails.asset_tag import stylesheet_link_tag as \ |
| 29 | 29 | __stylesheet_link_tag |
| | 30 | from webhelpers.rails.asset_tag import compute_public_path |
| 30 | 31 | |
| 31 | 32 | log = logging.getLogger(__name__) |
| … |
… |
|
| 85 | 86 | |
| 86 | 87 | if config.get('debug', False): |
| 87 | | log.debug('Skipping minification/combination; ' |
| | 88 | log.warn('Skipping minification/combination; ' |
| 88 | 89 | 'Application in debug mode.') |
| 89 | 90 | return __javascript_include_tag(*sources, **options) |
| 90 | 91 | |
| 91 | 92 | if options.get('builtins', False): |
| 92 | | log.debug('Skipping minification/combination; ' |
| | 93 | log.warn('Skipping minification/combination; ' |
| 93 | 94 | 'Requesting builtin javascripts.') |
| 94 | 95 | return __javascript_include_tag(*sources, **options) |
| 95 | 96 | |
| 96 | 97 | fs_root = root = config.get('pylons.paths').get('static_files') |
| | 98 | sources = [ |
| | 99 | compute_public_path(source, 'javascripts', 'js') for source in sources |
| | 100 | ] |
| 97 | 101 | if combined: |
| 98 | | sources = combine_sources([source for source in sources], fs_root) |
| | 102 | sources = combine_sources(sources, fs_root) |
| 99 | 103 | |
| 100 | 104 | if minified: |
| 101 | | sources = get_sources([source for source in sources], fs_root) |
| | 105 | sources = get_sources(sources, fs_root) |
| 102 | 106 | return __javascript_include_tag(*sources, **options) |
| 103 | 107 | |
| … |
… |
|
| 156 | 160 | |
| 157 | 161 | if config.get('debug', False): |
| 158 | | log.debug('Skipping minification/combination; ' |
| | 162 | log.warn('Skipping minification/combination; ' |
| 159 | 163 | 'Application in debug mode.') |
| 160 | 164 | return __stylesheet_link_tag(*sources, **options) |
| 161 | 165 | |
| 162 | 166 | fs_root = root = config.get('pylons.paths').get('static_files') |
| | 167 | sources = [ |
| | 168 | compute_public_path(source, 'stylesheets', 'css') for source in sources |
| | 169 | ] |
| 163 | 170 | if combined: |
| 164 | | sources = combine_sources([source for source in sources], fs_root) |
| | 171 | sources = combine_sources(sources, fs_root) |
| 165 | 172 | |
| 166 | 173 | if minified: |
| 167 | | sources = get_sources([source for source in sources], fs_root) |
| | 174 | sources = get_sources(sources, fs_root) |
| 168 | 175 | return __stylesheet_link_tag(*sources, **options) |
| 169 | 176 | |
Download in other formats:
|
|