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 | |
| /** | |
| * Custom Route class that restricts a route to a single extension. | |
| * Enables you to build controller actions that are only applied to specific | |
| * extensions, e.g., '/posts.json' goes to PostsController::index_json while | |
| * '/posts' goes to PostsController::index. | |
| * | |
| * To use, drop this into app/libs/routes/extension_specific_route.php and add | |
| * the following to the top of app/config/routes.php: | |
| * |
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
| // loop through the 'paper' variable from Raphael JS and build up the JSON object describing all images and paths within it. | |
| loadJSON = function(paper, json) { | |
| var set = paper.set(); | |
| $.each(json, function(index, node) { | |
| try { | |
| var el = paper[node.type]().attr(node); | |
| set.push(el); | |
| } catch(e) {} | |
| }); | |
| return set; |
NewerOlder