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
/* | |
--------- | |
Copyright 2011, ZangZing LLC. All rights reserved. | |
*/ | |
function ZZA(c, a, b) { | |
this.id = c; | |
this.zzv_id = null; | |
this.usertype = (this.useridentifier = a) ? 1 : 2; | |
if (b == undefined) b = false; |
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
// PathJS supports both the Hashtag and HTML5 History API now. Some users would like it to automatically fall back to the Hashtag if | |
// the history API is not supported. Obviously, this can't be the default, as some users want the site to work in browsers with JavaScript | |
// turned off, and will only use the History API to add transitions and effects to their site. | |
// | |
// When using the Hashtag implementation, users must define their routes, and then make sure that they tell PathJS to listen for state changes | |
// by calling the appropriate method: | |
Path.listen(); | |
// The `Path.listen()` method is not required when doing HTML5 History API calls, as we have a wrapper method that wraps the native |
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
/* | |
The following is a concise outline of the test environment that I've set up to test the outcome described in | |
Issue #13 on the PathJS master branch. This setup is running on a Rails server. | |
https://github.com/mtrpcic/pathjs/issues/13 | |
*/ | |
// Step 1 - Server, Routes, and Data | |
// I set up a Rails 3.1.0 server with a 'Widget' model, and the following test route: |
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
// extensions.js | |
$.fn.uploader = function(element){ | |
Uploader.show(element); | |
} | |
// functions.js | |
var Uploader = { | |
"show": function(element){ | |
// code here to show the uploader | |
}, |
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
<<<<<<< HEAD | |
======= | |
>>>>>>> 39d7104023dd06ff8515885ce9ece055c601952d |
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
Sales Zen Javascript | |
-------------------- | |
Client-Side Routing | |
Client-Side Models | |
Client-Side Views (EJS) | |
Widget System | |
Standardized Resource Pulling (No more $.ajax!) | |
jQuery, Twitter Bootstrap, jQuery UI |
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 handler(animate){ | |
return function(path){ | |
get_page(path, animate); | |
} | |
} |
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
1. Use a ruby version | |
rvm use 1.9.2-p248 | |
2. Create a gemset | |
rvm gemset create myapp | |
3. In the root of your app, add a file named ".rvmrc" with the following contents: |
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
var routes = { | |
"/users": function(){}, | |
"/users/:id": function(){}, | |
"/pages": function(){} | |
} | |
for(key in routes){ | |
Path.map(key).to(routes[key]); | |
} |
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
var UsersController = { | |
"index": function(){ | |
}, | |
"show": function(){ | |
} | |
"new": function(){ | |
} |
OlderNewer