Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pushing version 0.7.3

  • Loading branch information...
commit dbb243910007d41ebb26299c3d10c9d830ffff3e 1 parent 45d63cf
Aaron Quint authored
Showing with 229 additions and 277 deletions.
  1. +1 −0  HISTORY.md
  2. +2 −71 Rakefile
  3. +0 −6 lib/min/plugins/sammy.cache-0.7.2.min.js
  4. +6 −0 lib/min/plugins/sammy.cache-0.7.3.min.js
  5. +3 −3 lib/min/plugins/sammy.cache-latest.min.js
  6. +0 −5 lib/min/plugins/sammy.data_location_proxy-0.7.2.min.js
  7. +5 −0 lib/min/plugins/sammy.data_location_proxy-0.7.3.min.js
  8. +3 −3 lib/min/plugins/sammy.data_location_proxy-latest.min.js
  9. +0 −5 lib/min/plugins/sammy.ejs-0.7.2.min.js
  10. +5 −0 lib/min/plugins/sammy.ejs-0.7.3.min.js
  11. +3 −3 lib/min/plugins/sammy.ejs-latest.min.js
  12. +0 −5 lib/min/plugins/sammy.exceptional-0.7.2.min.js
  13. +5 −0 lib/min/plugins/sammy.exceptional-0.7.3.min.js
  14. +3 −3 lib/min/plugins/sammy.exceptional-latest.min.js
  15. +0 −5 lib/min/plugins/sammy.flash-0.7.2.min.js
  16. +5 −0 lib/min/plugins/sammy.flash-0.7.3.min.js
  17. +3 −3 lib/min/plugins/sammy.flash-latest.min.js
  18. +0 −5 lib/min/plugins/sammy.form-0.7.2.min.js
  19. +5 −0 lib/min/plugins/sammy.form-0.7.3.min.js
  20. +3 −3 lib/min/plugins/sammy.form-latest.min.js
  21. +0 −5 lib/min/plugins/sammy.form_2_json-0.7.2.min.js
  22. +5 −0 lib/min/plugins/sammy.form_2_json-0.7.3.min.js
  23. +3 −3 lib/min/plugins/sammy.form_2_json-latest.min.js
  24. +0 −5 lib/min/plugins/sammy.googleanalytics-0.7.2.min.js
  25. +5 −0 lib/min/plugins/sammy.googleanalytics-0.7.3.min.js
  26. +3 −3 lib/min/plugins/sammy.googleanalytics-latest.min.js
  27. +0 −5 lib/min/plugins/sammy.haml-0.7.2.min.js
  28. +5 −0 lib/min/plugins/sammy.haml-0.7.3.min.js
  29. +3 −3 lib/min/plugins/sammy.haml-latest.min.js
  30. +0 −5 lib/min/plugins/sammy.handlebars-0.7.2.min.js
  31. +5 −0 lib/min/plugins/sammy.handlebars-0.7.3.min.js
  32. +3 −3 lib/min/plugins/sammy.handlebars-latest.min.js
  33. +0 −5 lib/min/plugins/sammy.hogan-0.7.2.min.js
  34. +5 −0 lib/min/plugins/sammy.hogan-0.7.3.min.js
  35. +3 −3 lib/min/plugins/sammy.hogan-latest.min.js
  36. +0 −5 lib/min/plugins/sammy.hoptoad-0.7.2.min.js
  37. +5 −0 lib/min/plugins/sammy.hoptoad-0.7.3.min.js
  38. +3 −3 lib/min/plugins/sammy.hoptoad-latest.min.js
  39. +0 −5 lib/min/plugins/sammy.json-0.7.2.min.js
  40. +5 −0 lib/min/plugins/sammy.json-0.7.3.min.js
  41. +3 −3 lib/min/plugins/sammy.json-latest.min.js
  42. +5 −0 lib/min/plugins/sammy.kissmetrics-0.7.3.min.js
  43. +5 −0 lib/min/plugins/sammy.kissmetrics-latest.min.js
  44. +0 −5 lib/min/plugins/sammy.meld-0.7.2.min.js
  45. +5 −0 lib/min/plugins/sammy.meld-0.7.3.min.js
  46. +3 −3 lib/min/plugins/sammy.meld-latest.min.js
  47. +5 −0 lib/min/plugins/sammy.mixpanel-0.7.3.min.js
  48. +5 −0 lib/min/plugins/sammy.mixpanel-latest.min.js
  49. +0 −5 lib/min/plugins/sammy.mustache-0.7.2.min.js
  50. +5 −0 lib/min/plugins/sammy.mustache-0.7.3.min.js
  51. +3 −3 lib/min/plugins/sammy.mustache-latest.min.js
  52. +0 −5 lib/min/plugins/sammy.nested_params-0.7.2.min.js
  53. +5 −0 lib/min/plugins/sammy.nested_params-0.7.3.min.js
  54. +3 −3 lib/min/plugins/sammy.nested_params-latest.min.js
  55. +0 −5 lib/min/plugins/sammy.oauth2-0.7.2.min.js
  56. +5 −0 lib/min/plugins/sammy.oauth2-0.7.3.min.js
  57. +3 −3 lib/min/plugins/sammy.oauth2-latest.min.js
  58. +0 −5 lib/min/plugins/sammy.path_location_proxy-0.7.2.min.js
  59. +5 −0 lib/min/plugins/sammy.path_location_proxy-0.7.3.min.js
  60. +3 −3 lib/min/plugins/sammy.path_location_proxy-latest.min.js
  61. +0 −5 lib/min/plugins/sammy.pure-0.7.2.min.js
  62. +5 −0 lib/min/plugins/sammy.pure-0.7.3.min.js
  63. +3 −3 lib/min/plugins/sammy.pure-latest.min.js
  64. +0 −5 lib/min/plugins/sammy.push_location_proxy-0.7.2.min.js
  65. +5 −0 lib/min/plugins/sammy.push_location_proxy-0.7.3.min.js
  66. +3 −3 lib/min/plugins/sammy.push_location_proxy-latest.min.js
  67. +0 −5 lib/min/plugins/sammy.storage-0.7.2.min.js
  68. +5 −0 lib/min/plugins/sammy.storage-0.7.3.min.js
  69. +3 −3 lib/min/plugins/sammy.storage-latest.min.js
  70. +0 −5 lib/min/plugins/sammy.template-0.7.2.min.js
  71. +5 −0 lib/min/plugins/sammy.template-0.7.3.min.js
  72. +3 −3 lib/min/plugins/sammy.template-latest.min.js
  73. +0 −5 lib/min/plugins/sammy.title-0.7.2.min.js
  74. +5 −0 lib/min/plugins/sammy.title-0.7.3.min.js
  75. +3 −3 lib/min/plugins/sammy.title-latest.min.js
  76. +0 −5 lib/min/plugins/sammy.tmpl-0.7.2.min.js
  77. +5 −0 lib/min/plugins/sammy.tmpl-0.7.3.min.js
  78. +3 −3 lib/min/plugins/sammy.tmpl-latest.min.js
  79. +0 −8 lib/min/sammy-0.7.2.min.js
  80. +8 −0 lib/min/sammy-0.7.3.min.js
  81. +4 −4 lib/min/sammy-latest.min.js
  82. +1 −1  package.json
1  HISTORY.md
View
@@ -1,3 +1,4 @@
+== 0.7.3 [1/27/2013]
New:
- Support for asynchronous chained callbacks [deitch]
73 Rakefile
View
@@ -5,7 +5,7 @@ task :version do
puts "VERSION: " + @version
end
-desc 'Uses the yui-compressor to minify lib/sammy.js'
+desc 'Uses the uglify to minify lib/sammy.js'
task :minify => :version do
puts "Minify-ing"
@@ -36,63 +36,6 @@ task :minify => :version do
end
end
-# Modified from peterc: http://gist.github.com/113226
-desc "Automatically run something when code is changed"
-task :autotest do
- require 'find'
- files = {}
- test_path = ENV['TEST'] || File.join(File.dirname(__FILE__), 'test', 'index.html')
- loop do
- changed = false
- Find.find(File.dirname(__FILE__)) do |file|
- next unless file =~ /\.js$/
- ctime = File.ctime(file).to_i
-
- if ctime != files[file]
- files[file] = ctime
- changed = true
- end
- end
-
- if changed
- puts "Running #{test_path} at #{Time.now}"
- system "open #{test_path}"
- puts "\nWaiting for a *.js change"
- end
-
- sleep 1
- end
-end
-
-desc 'launch the test file in the browser'
-task :test do
- system "open #{File.join(File.dirname(__FILE__), 'test', 'index.html')}"
-end
-
-
-desc 'copy files into the site branch'
-task :copy_test_and_examples do
- sh "mkdir -p site/examples site/test site/lib site/vendor"
- sh "cp -r examples/* site/examples/"
- sh "cp -r test/* site/test/"
- sh "cp -r lib/* site/lib/"
- sh "cp -r vendor/* site/vendor/"
-end
-
-
-desc 'update the current version # in the pages'
-task :update_version => :version do
- Dir['site/**/*.*'].each do |file|
- File.open(file, 'r+') do |f|
- contents = f.read
- contents.gsub!(/current_version\: ([\w\d\.]+)/, "current_version: #{@version}")
- f.truncate(0)
- f.rewind
- f << contents
- end
- end
-end
-
desc 'Tag with the current version'
task :tag => :version do
sh "git add ."
@@ -101,19 +44,7 @@ task :tag => :version do
sh "git push --tags"
end
-task :release => [:minify, :tag, :site]
-
-task :push_site do
- sh "cd site && git add ."
- sh "cd site && git commit -am 'Updated Site via Rake'"
- sh "cd site && git push upstream gh-pages"
-end
-
-desc 'Build the site'
-task :build_site => [:copy_test_and_examples, :update_version]
-
-desc 'Build the site, then push it to github'
-task :site => [:build_site, :push_site]
+task :release => [:minify, :tag]
desc 'Generate the docs for the current version to DIR'
task :docs => :version do
6 lib/min/plugins/sammy.cache-0.7.2.min.js
View
@@ -1,6 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.cache.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-// deprecated
-(function(e){Sammy=Sammy||{},Sammy.MemoryCacheProxy=function(e){this._cache=e||{}},e.extend(Sammy.MemoryCacheProxy.prototype,{exists:function(e){return typeof this._cache[e]!="undefined"},set:function(e,t){return this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(e){delete this._cache[e]}}),Sammy.DataCacheProxy=function(t,n){t=t||{},this.$element=n,e.each(t,function(e,t){n.data("cache."+e,t)})},e.extend(Sammy.DataCacheProxy.prototype,{exists:function(e){return typeof this.$element.data("cache."+e)!="undefined"},set:function(e,t){return this.$element.data("cache."+e,t)},get:function(e){return this.$element.data("cache."+e)},clear:function(e){this.$element.removeData("cache."+e)}}),Sammy.Cache=function(t,n){t.log("**WARNING:** This version of Sammy.Cache has been deprecated in favor of using the version in Sammy.Storage and will be removed in 1.0"),n=="data"?this.cache_proxy=new Sammy.DataCacheProxy({},this.$element()):this.cache_proxy=new Sammy.MemoryCacheProxy({}),t.cache_partials=!0,e.extend(t,{cache:function(t,n){return typeof n=="undefined"?this.cache_proxy.get(t):e.isFunction(n)&&!this.cache_proxy.exists(t)?this.cache_proxy.set(t,n.apply(this)):this.cache_proxy.set(t,n)},clearCache:function(e){return this.cache_proxy.clear(e)}}),t.helpers({cache:function(e,t){return this.app.cache(e,t)}})}})(jQuery);
6 lib/min/plugins/sammy.cache-0.7.3.min.js
View
@@ -0,0 +1,6 @@
+// -- Sammy.js -- /plugins/sammy.cache.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+// deprecated
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).MemoryCacheProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.MemoryCacheProxy=function(e){this._cache=e||{}},e.extend(t.MemoryCacheProxy.prototype,{exists:function(e){return typeof this._cache[e]!="undefined"},set:function(e,t){return this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(e){delete this._cache[e]}}),t.DataCacheProxy=function(t,n){t=t||{},this.$element=n,e.each(t,function(e,t){n.data("cache."+e,t)})},e.extend(t.DataCacheProxy.prototype,{exists:function(e){return typeof this.$element.data("cache."+e)!="undefined"},set:function(e,t){return this.$element.data("cache."+e,t)},get:function(e){return this.$element.data("cache."+e)},clear:function(e){this.$element.removeData("cache."+e)}}),t.Cache=function(n,r){n.log("**WARNING:** This version of Sammy.Cache has been deprecated in favor of using the version in Sammy.Storage and will be removed in 1.0"),r=="data"?this.cache_proxy=new t.DataCacheProxy({},this.$element()):this.cache_proxy=new t.MemoryCacheProxy({}),n.cache_partials=!0,e.extend(n,{cache:function(t,n){return typeof n=="undefined"?this.cache_proxy.get(t):e.isFunction(n)&&!this.cache_proxy.exists(t)?this.cache_proxy.set(t,n.apply(this)):this.cache_proxy.set(t,n)},clearCache:function(e){return this.cache_proxy.clear(e)}}),n.helpers({cache:function(e,t){return this.app.cache(e,t)}})},t.MemoryCacheProxy});
6 lib/min/plugins/sammy.cache-latest.min.js
View
@@ -1,6 +1,6 @@
// -- Sammy.js -- /plugins/sammy.cache.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
// deprecated
-(function(e){Sammy=Sammy||{},Sammy.MemoryCacheProxy=function(e){this._cache=e||{}},e.extend(Sammy.MemoryCacheProxy.prototype,{exists:function(e){return typeof this._cache[e]!="undefined"},set:function(e,t){return this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(e){delete this._cache[e]}}),Sammy.DataCacheProxy=function(t,n){t=t||{},this.$element=n,e.each(t,function(e,t){n.data("cache."+e,t)})},e.extend(Sammy.DataCacheProxy.prototype,{exists:function(e){return typeof this.$element.data("cache."+e)!="undefined"},set:function(e,t){return this.$element.data("cache."+e,t)},get:function(e){return this.$element.data("cache."+e)},clear:function(e){this.$element.removeData("cache."+e)}}),Sammy.Cache=function(t,n){t.log("**WARNING:** This version of Sammy.Cache has been deprecated in favor of using the version in Sammy.Storage and will be removed in 1.0"),n=="data"?this.cache_proxy=new Sammy.DataCacheProxy({},this.$element()):this.cache_proxy=new Sammy.MemoryCacheProxy({}),t.cache_partials=!0,e.extend(t,{cache:function(t,n){return typeof n=="undefined"?this.cache_proxy.get(t):e.isFunction(n)&&!this.cache_proxy.exists(t)?this.cache_proxy.set(t,n.apply(this)):this.cache_proxy.set(t,n)},clearCache:function(e){return this.cache_proxy.clear(e)}}),t.helpers({cache:function(e,t){return this.app.cache(e,t)}})}})(jQuery);
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).MemoryCacheProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.MemoryCacheProxy=function(e){this._cache=e||{}},e.extend(t.MemoryCacheProxy.prototype,{exists:function(e){return typeof this._cache[e]!="undefined"},set:function(e,t){return this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(e){delete this._cache[e]}}),t.DataCacheProxy=function(t,n){t=t||{},this.$element=n,e.each(t,function(e,t){n.data("cache."+e,t)})},e.extend(t.DataCacheProxy.prototype,{exists:function(e){return typeof this.$element.data("cache."+e)!="undefined"},set:function(e,t){return this.$element.data("cache."+e,t)},get:function(e){return this.$element.data("cache."+e)},clear:function(e){this.$element.removeData("cache."+e)}}),t.Cache=function(n,r){n.log("**WARNING:** This version of Sammy.Cache has been deprecated in favor of using the version in Sammy.Storage and will be removed in 1.0"),r=="data"?this.cache_proxy=new t.DataCacheProxy({},this.$element()):this.cache_proxy=new t.MemoryCacheProxy({}),n.cache_partials=!0,e.extend(n,{cache:function(t,n){return typeof n=="undefined"?this.cache_proxy.get(t):e.isFunction(n)&&!this.cache_proxy.exists(t)?this.cache_proxy.set(t,n.apply(this)):this.cache_proxy.set(t,n)},clearCache:function(e){return this.cache_proxy.clear(e)}}),n.helpers({cache:function(e,t){return this.app.cache(e,t)}})},t.MemoryCacheProxy});
5 lib/min/plugins/sammy.data_location_proxy-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.data_location_proxy.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.DataLocationProxy=function(e,t,n){this.app=e,this.data_name=t||"sammy-location",this.href_attribute=n},e.extend(Sammy.DataLocationProxy.prototype,{bind:function(){var t=this;this.app.$element().bind("setData",function(n,r,i){r==t.data_name&&(t.app.$element().each(function(){e.data(this,t.data_name,i)}),t.app.trigger("location-changed"))}),this.href_attribute&&this.app.$element().delegate("["+this.href_attribute+"]","click",function(n){n.preventDefault(),t.setLocation(e(this).attr(t.href_attribute))})},unbind:function(){this.href_attribute&&this.app.$element().undelegate("["+this.href_attribute+"]","click"),this.app.$element().unbind("setData")},getLocation:function(){return this.app.$element().data(this.data_name)||""},setLocation:function(e){return this.app.$element().data(this.data_name,e)}})})(jQuery);
5 lib/min/plugins/sammy.data_location_proxy-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.data_location_proxy.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).DataLocationProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.DataLocationProxy=function(e,t,n){this.app=e,this.data_name=t||"sammy-location",this.href_attribute=n},e.extend(t.DataLocationProxy.prototype,{bind:function(){var t=this;this.app.$element().bind("setData",function(n,r,i){r==t.data_name&&(t.app.$element().each(function(){e.data(this,t.data_name,i)}),t.app.trigger("location-changed"))}),this.href_attribute&&this.app.$element().delegate("["+this.href_attribute+"]","click",function(n){n.preventDefault(),t.setLocation(e(this).attr(t.href_attribute))})},unbind:function(){this.href_attribute&&this.app.$element().undelegate("["+this.href_attribute+"]","click"),this.app.$element().unbind("setData")},getLocation:function(){return this.app.$element().data(this.data_name)||""},setLocation:function(e){return this.app.$element().data(this.data_name,e)}}),t.DataLocationProxy});
6 lib/min/plugins/sammy.data_location_proxy-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.data_location_proxy.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.DataLocationProxy=function(e,t,n){this.app=e,this.data_name=t||"sammy-location",this.href_attribute=n},e.extend(Sammy.DataLocationProxy.prototype,{bind:function(){var t=this;this.app.$element().bind("setData",function(n,r,i){r==t.data_name&&(t.app.$element().each(function(){e.data(this,t.data_name,i)}),t.app.trigger("location-changed"))}),this.href_attribute&&this.app.$element().delegate("["+this.href_attribute+"]","click",function(n){n.preventDefault(),t.setLocation(e(this).attr(t.href_attribute))})},unbind:function(){this.href_attribute&&this.app.$element().undelegate("["+this.href_attribute+"]","click"),this.app.$element().unbind("setData")},getLocation:function(){return this.app.$element().data(this.data_name)||""},setLocation:function(e){return this.app.$element().data(this.data_name,e)}})})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).DataLocationProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.DataLocationProxy=function(e,t,n){this.app=e,this.data_name=t||"sammy-location",this.href_attribute=n},e.extend(t.DataLocationProxy.prototype,{bind:function(){var t=this;this.app.$element().bind("setData",function(n,r,i){r==t.data_name&&(t.app.$element().each(function(){e.data(this,t.data_name,i)}),t.app.trigger("location-changed"))}),this.href_attribute&&this.app.$element().delegate("["+this.href_attribute+"]","click",function(n){n.preventDefault(),t.setLocation(e(this).attr(t.href_attribute))})},unbind:function(){this.href_attribute&&this.app.$element().undelegate("["+this.href_attribute+"]","click"),this.app.$element().unbind("setData")},getLocation:function(){return this.app.$element().data(this.data_name)||""},setLocation:function(e){return this.app.$element().data(this.data_name,e)}}),t.DataLocationProxy});
5 lib/min/plugins/sammy.ejs-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.ejs.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.EJS=function(e,t){var n=function(e,t,n){return typeof n=="undefined"&&(n=e),(new EJS({text:e,name:n})).render(t)};t||(t="ejs"),e.helper(t,n)}})(jQuery);
5 lib/min/plugins/sammy.ejs-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.ejs.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","ejs"],e):(window.Sammy=window.Sammy||{}).EJS=e(window.jQuery,window.Sammy,window.EJS)})(function(e,t,n){return t.EJS=function(e,t){var r=function(e,t,r){return typeof r=="undefined"&&(r=e),(new n({text:e,name:r})).render(t)};t||(t="ejs"),e.helper(t,r)},t.EJS});
6 lib/min/plugins/sammy.ejs-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.ejs.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.EJS=function(e,t){var n=function(e,t,n){return typeof n=="undefined"&&(n=e),(new EJS({text:e,name:n})).render(t)};t||(t="ejs"),e.helper(t,n)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","ejs"],e):(window.Sammy=window.Sammy||{}).EJS=e(window.jQuery,window.Sammy,window.EJS)})(function(e,t,n){return t.EJS=function(e,t){var r=function(e,t,r){return typeof r=="undefined"&&(r=e),(new n({text:e,name:r})).render(t)};t||(t="ejs"),e.helper(t,r)},t.EJS});
5 lib/min/plugins/sammy.exceptional-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.exceptional.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.Exceptional=function(e,t){t=t||window.Exceptional,e.bind("error",function(e,n){n&&n.error&&t.handle(n.error.message,window.location.href,"0")})}})(jQuery);
5 lib/min/plugins/sammy.exceptional-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.exceptional.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Exceptional=e(window.jQuery,window.Sammy)})(function(e,t){return t.Exceptional=function(e,t){t=t||window.Exceptional,e.bind("error",function(e,n){n&&n.error&&t.handle(n.error.message,window.location.href,"0")})},t.Exceptional});
6 lib/min/plugins/sammy.exceptional-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.exceptional.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.Exceptional=function(e,t){t=t||window.Exceptional,e.bind("error",function(e,n){n&&n.error&&t.handle(n.error.message,window.location.href,"0")})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Exceptional=e(window.jQuery,window.Sammy)})(function(e,t){return t.Exceptional=function(e,t){t=t||window.Exceptional,e.bind("error",function(e,n){n&&n.error&&t.handle(n.error.message,window.location.href,"0")})},t.Exceptional});
5 lib/min/plugins/sammy.flash-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.flash.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.FlashHash=function(){this.now={}},e.extend(Sammy.FlashHash.prototype,{toHTML:function(){var e=this._renderUL();return this.clear(),e},clear:function(){this._clearHash(this),this._clearHash(this.now)},_onRedirect:function(){this._clearHash(this.now)},_clearHash:function(e){var t;for(t in e)t!=="now"&&e.hasOwnProperty(t)&&delete e[t]},_renderUL:function(){return'<ul class="flash">'+this._renderLIs(this)+this._renderLIs(this.now)+"</ul>"},_renderLIs:function(e){var t="",n;for(n in e)e[n]&&n!=="now"&&e.hasOwnProperty(n)&&(t=t+'<li class="'+n+'">'+e[n]+"</li>");return Sammy.log("rendered flash: "+t),t}}),Sammy.Flash=function(e){e.flash=new Sammy.FlashHash,e.helper("flash",function(e,t){return arguments.length===0?this.app.flash:(arguments.length===2&&(this.app.flash[e]=t),this.app.flash[e])}),e.helper("flashNow",function(e,t){return arguments.length===0?this.app.flash.now:(arguments.length===2&&(this.app.flash.now[e]=t),this.app.flash.now[e])}),e.bind("redirect",function(){this.app.flash._onRedirect()})}})(jQuery);
5 lib/min/plugins/sammy.flash-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.flash.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Flash=e(window.jQuery,window.Sammy)})(function(e,t){return t.FlashHash=function(){this.now={}},e.extend(t.FlashHash.prototype,{toHTML:function(){var e=this._renderUL();return this.clear(),e},clear:function(){this._clearHash(this),this._clearHash(this.now)},_onRedirect:function(){this._clearHash(this.now)},_clearHash:function(e){var t;for(t in e)t!=="now"&&e.hasOwnProperty(t)&&delete e[t]},_renderUL:function(){return'<ul class="flash">'+this._renderLIs(this)+this._renderLIs(this.now)+"</ul>"},_renderLIs:function(e){var n="",r;for(r in e)e[r]&&r!=="now"&&e.hasOwnProperty(r)&&(n=n+'<li class="'+r+'">'+e[r]+"</li>");return t.log("rendered flash: "+n),n}}),t.Flash=function(e){e.flash=new t.FlashHash,e.helper("flash",function(e,t){return arguments.length===0?this.app.flash:(arguments.length===2&&(this.app.flash[e]=t),this.app.flash[e])}),e.helper("flashNow",function(e,t){return arguments.length===0?this.app.flash.now:(arguments.length===2&&(this.app.flash.now[e]=t),this.app.flash.now[e])}),e.bind("redirect",function(){this.app.flash._onRedirect()})},t.Flash});
6 lib/min/plugins/sammy.flash-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.flash.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:26 -0400
-(function(e){Sammy=Sammy||{},Sammy.FlashHash=function(){this.now={}},e.extend(Sammy.FlashHash.prototype,{toHTML:function(){var e=this._renderUL();return this.clear(),e},clear:function(){this._clearHash(this),this._clearHash(this.now)},_onRedirect:function(){this._clearHash(this.now)},_clearHash:function(e){var t;for(t in e)t!=="now"&&e.hasOwnProperty(t)&&delete e[t]},_renderUL:function(){return'<ul class="flash">'+this._renderLIs(this)+this._renderLIs(this.now)+"</ul>"},_renderLIs:function(e){var t="",n;for(n in e)e[n]&&n!=="now"&&e.hasOwnProperty(n)&&(t=t+'<li class="'+n+'">'+e[n]+"</li>");return Sammy.log("rendered flash: "+t),t}}),Sammy.Flash=function(e){e.flash=new Sammy.FlashHash,e.helper("flash",function(e,t){return arguments.length===0?this.app.flash:(arguments.length===2&&(this.app.flash[e]=t),this.app.flash[e])}),e.helper("flashNow",function(e,t){return arguments.length===0?this.app.flash.now:(arguments.length===2&&(this.app.flash.now[e]=t),this.app.flash.now[e])}),e.bind("redirect",function(){this.app.flash._onRedirect()})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Flash=e(window.jQuery,window.Sammy)})(function(e,t){return t.FlashHash=function(){this.now={}},e.extend(t.FlashHash.prototype,{toHTML:function(){var e=this._renderUL();return this.clear(),e},clear:function(){this._clearHash(this),this._clearHash(this.now)},_onRedirect:function(){this._clearHash(this.now)},_clearHash:function(e){var t;for(t in e)t!=="now"&&e.hasOwnProperty(t)&&delete e[t]},_renderUL:function(){return'<ul class="flash">'+this._renderLIs(this)+this._renderLIs(this.now)+"</ul>"},_renderLIs:function(e){var n="",r;for(r in e)e[r]&&r!=="now"&&e.hasOwnProperty(r)&&(n=n+'<li class="'+r+'">'+e[r]+"</li>");return t.log("rendered flash: "+n),n}}),t.Flash=function(e){e.flash=new t.FlashHash,e.helper("flash",function(e,t){return arguments.length===0?this.app.flash:(arguments.length===2&&(this.app.flash[e]=t),this.app.flash[e])}),e.helper("flashNow",function(e,t){return arguments.length===0?this.app.flash.now:(arguments.length===2&&(this.app.flash.now[e]=t),this.app.flash.now[e])}),e.bind("redirect",function(){this.app.flash._onRedirect()})},t.Flash});
5 lib/min/plugins/sammy.form-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.form.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){function t(t,n){return typeof n=="undefined"?"":(e.isFunction(n)&&(n=n.apply(t)),n.toString())}function n(n,r,i){var s="<";return s+=n,typeof r!="undefined"&&e.each(r,function(e,n){n!==null&&(s+=" "+e+"='",s+=t(r,n).replace(/\'/g,"'"),s+="'")}),i===!1?s+=">":typeof i!="undefined"?(s+=">",s+=t(this,i),s+="</"+n+">"):s+=" />",s}Sammy=Sammy||{},Sammy.FormBuilder=function(e,t){this.name=e,this.object=t},e.extend(Sammy.FormBuilder.prototype,{open:function(t){return n("form",e.extend({method:"post",action:"#/"+this.name+"s"},t),!1)},close:function(){return"</form>"},label:function(t,r,i){var s={"for":this._attributesForKeyPath(t).name};return n("label",e.extend(s,i),r)},hidden:function(t,r){return r=e.extend({type:"hidden"},this._attributesForKeyPath(t),r),n("input",r)},text:function(t,r){return r=e.extend({type:"text"},this._attributesForKeyPath(t),r),n("input",r)},textarea:function(t,r){var i;return r=e.extend(this._attributesForKeyPath(t),r),i=r.value,delete r.value,n("textarea",r,i)},password:function(t,n){return this.text(t,e.extend({type:"password"},n))},select:function(r,i,s){var o="",u;return s=e.extend(this._attributesForKeyPath(r),s),u=s.value,delete s.value,e.each(i,function(r,i){var s,a,f;e.isArray(i)?(s=i[1],a=i[0]):(s=i,a=i),f={value:t(this.object,s)},s===u&&(f.selected="selected"),o+=n("option",f,a)}),n("select",s,o)},radio:function(r,i,s){var o;return s=e.extend(this._attributesForKeyPath(r),s),o=s.value,s.value=t(this.object,i),o==s.value&&(s.checked="checked"),n("input",e.extend({type:"radio"},s))},checkbox:function(t,n,r){var i="";return r||(r={}),r.hidden_element!==!1&&(i+=this.hidden(t,{value:!n})),delete r.hidden_element,i+=this.radio(t,n,e.extend({type:"checkbox"},r)),i},submit:function(t){return n("input",e.extend({type:"submit"},t))},_attributesForKeyPath:function(n){var r=this,i=e.isArray(n)?n:n.split(/\./),s=r.name,o=r.object,u=r.name;return e.each(i,function(e,t){typeof o=="undefined"||o===""?o="":typeof t=="number"||t.match(/^\d+$/)?o=o[parseInt(t,10)]:o=o[t],s+="["+t+"]",u+="-"+t}),{name:s,value:t(r.object,o),"class":u}}}),Sammy.Form=function(t){t.helpers({simple_element:n,formFor:function(t,n,r){var i;return e.isFunction(n)&&(r=n,n=this[t]),i=new Sammy.FormBuilder(t,n),r.apply(this,[i]),i}})}})(jQuery);
5 lib/min/plugins/sammy.form-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.form.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Form=e(window.jQuery,window.Sammy)})(function(e,t){function n(t,n){return typeof n=="undefined"?"":(e.isFunction(n)&&(n=n.apply(t)),n.toString())}function r(t,r,i){var s="<";return s+=t,typeof r!="undefined"&&e.each(r,function(e,t){t!==null&&(s+=" "+e+"='",s+=n(r,t).replace(/\'/g,"'"),s+="'")}),i===!1?s+=">":typeof i!="undefined"?(s+=">",s+=n(this,i),s+="</"+t+">"):s+=" />",s}return t.FormBuilder=function(e,t){this.name=e,this.object=t},e.extend(t.FormBuilder.prototype,{open:function(t){return r("form",e.extend({method:"post",action:"#/"+this.name+"s"},t),!1)},close:function(){return"</form>"},label:function(t,n,i){var s={"for":this._attributesForKeyPath(t).name};return r("label",e.extend(s,i),n)},hidden:function(t,n){return n=e.extend({type:"hidden"},this._attributesForKeyPath(t),n),r("input",n)},text:function(t,n){return n=e.extend({type:"text"},this._attributesForKeyPath(t),n),r("input",n)},textarea:function(t,n){var i;return n=e.extend(this._attributesForKeyPath(t),n),i=n.value,delete n.value,r("textarea",n,i)},password:function(t,n){return this.text(t,e.extend({type:"password"},n))},select:function(t,i,s){var o="",u;return s=e.extend(this._attributesForKeyPath(t),s),u=s.value,delete s.value,e.each(i,function(t,i){var s,a,f;e.isArray(i)?(s=i[1],a=i[0]):(s=i,a=i),f={value:n(this.object,s)},s===u&&(f.selected="selected"),o+=r("option",f,a)}),r("select",s,o)},radio:function(t,i,s){var o;return s=e.extend(this._attributesForKeyPath(t),s),o=s.value,s.value=n(this.object,i),o==s.value&&(s.checked="checked"),r("input",e.extend({type:"radio"},s))},checkbox:function(t,n,r){var i="";return r||(r={}),r.hidden_element!==!1&&(i+=this.hidden(t,{value:!n})),delete r.hidden_element,i+=this.radio(t,n,e.extend({type:"checkbox"},r)),i},submit:function(t){return r("input",e.extend({type:"submit"},t))},_attributesForKeyPath:function(t){var r=this,i=e.isArray(t)?t:t.split(/\./),s=r.name,o=r.object,u=r.name;return e.each(i,function(e,t){typeof o=="undefined"||o===""?o="":typeof t=="number"||t.match(/^\d+$/)?o=o[parseInt(t,10)]:o=o[t],s+="["+t+"]",u+="-"+t}),{name:s,value:n(r.object,o),"class":u}}}),t.Form=function(n){n.helpers({simple_element:r,formFor:function(n,r,i){var s;return e.isFunction(r)&&(i=r,r=this[n]),s=new t.FormBuilder(n,r),i.apply(this,[s]),s}})},t.Form});
6 lib/min/plugins/sammy.form-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.form.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){function t(t,n){return typeof n=="undefined"?"":(e.isFunction(n)&&(n=n.apply(t)),n.toString())}function n(n,r,i){var s="<";return s+=n,typeof r!="undefined"&&e.each(r,function(e,n){n!==null&&(s+=" "+e+"='",s+=t(r,n).replace(/\'/g,"'"),s+="'")}),i===!1?s+=">":typeof i!="undefined"?(s+=">",s+=t(this,i),s+="</"+n+">"):s+=" />",s}Sammy=Sammy||{},Sammy.FormBuilder=function(e,t){this.name=e,this.object=t},e.extend(Sammy.FormBuilder.prototype,{open:function(t){return n("form",e.extend({method:"post",action:"#/"+this.name+"s"},t),!1)},close:function(){return"</form>"},label:function(t,r,i){var s={"for":this._attributesForKeyPath(t).name};return n("label",e.extend(s,i),r)},hidden:function(t,r){return r=e.extend({type:"hidden"},this._attributesForKeyPath(t),r),n("input",r)},text:function(t,r){return r=e.extend({type:"text"},this._attributesForKeyPath(t),r),n("input",r)},textarea:function(t,r){var i;return r=e.extend(this._attributesForKeyPath(t),r),i=r.value,delete r.value,n("textarea",r,i)},password:function(t,n){return this.text(t,e.extend({type:"password"},n))},select:function(r,i,s){var o="",u;return s=e.extend(this._attributesForKeyPath(r),s),u=s.value,delete s.value,e.each(i,function(r,i){var s,a,f;e.isArray(i)?(s=i[1],a=i[0]):(s=i,a=i),f={value:t(this.object,s)},s===u&&(f.selected="selected"),o+=n("option",f,a)}),n("select",s,o)},radio:function(r,i,s){var o;return s=e.extend(this._attributesForKeyPath(r),s),o=s.value,s.value=t(this.object,i),o==s.value&&(s.checked="checked"),n("input",e.extend({type:"radio"},s))},checkbox:function(t,n,r){var i="";return r||(r={}),r.hidden_element!==!1&&(i+=this.hidden(t,{value:!n})),delete r.hidden_element,i+=this.radio(t,n,e.extend({type:"checkbox"},r)),i},submit:function(t){return n("input",e.extend({type:"submit"},t))},_attributesForKeyPath:function(n){var r=this,i=e.isArray(n)?n:n.split(/\./),s=r.name,o=r.object,u=r.name;return e.each(i,function(e,t){typeof o=="undefined"||o===""?o="":typeof t=="number"||t.match(/^\d+$/)?o=o[parseInt(t,10)]:o=o[t],s+="["+t+"]",u+="-"+t}),{name:s,value:t(r.object,o),"class":u}}}),Sammy.Form=function(t){t.helpers({simple_element:n,formFor:function(t,n,r){var i;return e.isFunction(n)&&(r=n,n=this[t]),i=new Sammy.FormBuilder(t,n),r.apply(this,[i]),i}})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Form=e(window.jQuery,window.Sammy)})(function(e,t){function n(t,n){return typeof n=="undefined"?"":(e.isFunction(n)&&(n=n.apply(t)),n.toString())}function r(t,r,i){var s="<";return s+=t,typeof r!="undefined"&&e.each(r,function(e,t){t!==null&&(s+=" "+e+"='",s+=n(r,t).replace(/\'/g,"'"),s+="'")}),i===!1?s+=">":typeof i!="undefined"?(s+=">",s+=n(this,i),s+="</"+t+">"):s+=" />",s}return t.FormBuilder=function(e,t){this.name=e,this.object=t},e.extend(t.FormBuilder.prototype,{open:function(t){return r("form",e.extend({method:"post",action:"#/"+this.name+"s"},t),!1)},close:function(){return"</form>"},label:function(t,n,i){var s={"for":this._attributesForKeyPath(t).name};return r("label",e.extend(s,i),n)},hidden:function(t,n){return n=e.extend({type:"hidden"},this._attributesForKeyPath(t),n),r("input",n)},text:function(t,n){return n=e.extend({type:"text"},this._attributesForKeyPath(t),n),r("input",n)},textarea:function(t,n){var i;return n=e.extend(this._attributesForKeyPath(t),n),i=n.value,delete n.value,r("textarea",n,i)},password:function(t,n){return this.text(t,e.extend({type:"password"},n))},select:function(t,i,s){var o="",u;return s=e.extend(this._attributesForKeyPath(t),s),u=s.value,delete s.value,e.each(i,function(t,i){var s,a,f;e.isArray(i)?(s=i[1],a=i[0]):(s=i,a=i),f={value:n(this.object,s)},s===u&&(f.selected="selected"),o+=r("option",f,a)}),r("select",s,o)},radio:function(t,i,s){var o;return s=e.extend(this._attributesForKeyPath(t),s),o=s.value,s.value=n(this.object,i),o==s.value&&(s.checked="checked"),r("input",e.extend({type:"radio"},s))},checkbox:function(t,n,r){var i="";return r||(r={}),r.hidden_element!==!1&&(i+=this.hidden(t,{value:!n})),delete r.hidden_element,i+=this.radio(t,n,e.extend({type:"checkbox"},r)),i},submit:function(t){return r("input",e.extend({type:"submit"},t))},_attributesForKeyPath:function(t){var r=this,i=e.isArray(t)?t:t.split(/\./),s=r.name,o=r.object,u=r.name;return e.each(i,function(e,t){typeof o=="undefined"||o===""?o="":typeof t=="number"||t.match(/^\d+$/)?o=o[parseInt(t,10)]:o=o[t],s+="["+t+"]",u+="-"+t}),{name:s,value:n(r.object,o),"class":u}}}),t.Form=function(n){n.helpers({simple_element:r,formFor:function(n,r,i){var s;return e.isFunction(r)&&(i=r,r=this[n]),s=new t.FormBuilder(n,r),i.apply(this,[s]),s}})},t.Form});
5 lib/min/plugins/sammy.form_2_json-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.form_2_json.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},function(){function e(n){var r=[],i=n.firstChild;while(i){if(i.nodeName.match(/INPUT|SELECT|TEXTAREA/i)){var s=t(i);s!==null&&r.push({name:i.name,value:s})}else{var o=e(i);r=r.concat(o)}i=i.nextSibling}return r}function t(e){switch(e.nodeName){case"INPUT":case"TEXTAREA":switch(e.type.toLowerCase()){case"radio":case"checkbox":if(e.checked)return e.value;break;case"button":case"reset":case"submit":case"image":return"";default:return e.value}break;case"SELECT":return n(e);default:}return null}function n(e){var t=e.multiple;if(!t)return e.value;var n=[];for(var r=e.getElementsByTagName("option"),i=0,s=r.length;i<s;i++)r[i].selected&&n.push(r[i].value);return n}window.form2object=function(t,n,r){if(typeof r=="undefined"||r==null)r=!0;if(typeof n=="undefined"||n==null)n=".";t=typeof t=="string"?document.getElementById(t):t;var i=e(t),s={},o={};for(var u=0;u<i.length;u++){var a=i[u].value;if(r&&a==="")continue;var f=i[u].name,l=f.split(n),c=s,h="";for(var p=0;p<l.length;p++){var d=l[p],v="";if(d.indexOf("[]")>-1&&p==l.length-1)h=v=d.substr(0,d.indexOf("[")),c[v]||(c[v]=[]),c[v].push(a);else if(d.indexOf("[")>-1){v=d.substr(0,d.indexOf("["));var m=d.replace(/^[a-z]+\[|\]$/gi,"");h=h+v+m,o[h]||(o[h]={}),c[v]||(c[v]=[]),p==l.length-1?c[v].push(a):o[h][m]||(c[v].push({}),o[h][m]=c[v][c[v].length-1]),c=o[h][m]}else p<l.length-1?(c[d]||(c[d]={}),c=c[d]):c[d]=a}}return s},window.form2json=window.form2object}(),Sammy.Form2JSON=function(e){e._parseFormParams=function(e){return form2object(e[0])}}})(jQuery);
5 lib/min/plugins/sammy.form_2_json-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.form_2_json.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Form2JSON=e(window.jQuery,window.Sammy)})(function(e,t){return function(){function e(n){var r=[],i=n.firstChild;while(i){if(i.nodeName.match(/INPUT|SELECT|TEXTAREA/i)){var s=t(i);s!==null&&r.push({name:i.name,value:s})}else{var o=e(i);r=r.concat(o)}i=i.nextSibling}return r}function t(e){switch(e.nodeName){case"INPUT":case"TEXTAREA":switch(e.type.toLowerCase()){case"radio":case"checkbox":if(e.checked)return e.value;break;case"button":case"reset":case"submit":case"image":return"";default:return e.value}break;case"SELECT":return n(e);default:}return null}function n(e){var t=e.multiple;if(!t)return e.value;var n=[];for(var r=e.getElementsByTagName("option"),i=0,s=r.length;i<s;i++)r[i].selected&&n.push(r[i].value);return n}window.form2object=function(t,n,r){if(typeof r=="undefined"||r==null)r=!0;if(typeof n=="undefined"||n==null)n=".";t=typeof t=="string"?document.getElementById(t):t;var i=e(t),s={},o={};for(var u=0;u<i.length;u++){var a=i[u].value;if(r&&a==="")continue;var f=i[u].name,l=f.split(n),c=s,h="";for(var p=0;p<l.length;p++){var d=l[p],v="";if(d.indexOf("[]")>-1&&p==l.length-1)h=v=d.substr(0,d.indexOf("[")),c[v]||(c[v]=[]),c[v].push(a);else if(d.indexOf("[")>-1){v=d.substr(0,d.indexOf("["));var m=d.replace(/^[a-z]+\[|\]$/gi,"");h=h+v+m,o[h]||(o[h]={}),c[v]||(c[v]=[]),p==l.length-1?c[v].push(a):o[h][m]||(c[v].push({}),o[h][m]=c[v][c[v].length-1]),c=o[h][m]}else p<l.length-1?(c[d]||(c[d]={}),c=c[d]):c[d]=a}}return s},window.form2json=window.form2object}(),t.Form2JSON=function(e){e._parseFormParams=function(e){return form2object(e[0])}},t.Form2JSON});
6 lib/min/plugins/sammy.form_2_json-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.form_2_json.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},function(){function e(n){var r=[],i=n.firstChild;while(i){if(i.nodeName.match(/INPUT|SELECT|TEXTAREA/i)){var s=t(i);s!==null&&r.push({name:i.name,value:s})}else{var o=e(i);r=r.concat(o)}i=i.nextSibling}return r}function t(e){switch(e.nodeName){case"INPUT":case"TEXTAREA":switch(e.type.toLowerCase()){case"radio":case"checkbox":if(e.checked)return e.value;break;case"button":case"reset":case"submit":case"image":return"";default:return e.value}break;case"SELECT":return n(e);default:}return null}function n(e){var t=e.multiple;if(!t)return e.value;var n=[];for(var r=e.getElementsByTagName("option"),i=0,s=r.length;i<s;i++)r[i].selected&&n.push(r[i].value);return n}window.form2object=function(t,n,r){if(typeof r=="undefined"||r==null)r=!0;if(typeof n=="undefined"||n==null)n=".";t=typeof t=="string"?document.getElementById(t):t;var i=e(t),s={},o={};for(var u=0;u<i.length;u++){var a=i[u].value;if(r&&a==="")continue;var f=i[u].name,l=f.split(n),c=s,h="";for(var p=0;p<l.length;p++){var d=l[p],v="";if(d.indexOf("[]")>-1&&p==l.length-1)h=v=d.substr(0,d.indexOf("[")),c[v]||(c[v]=[]),c[v].push(a);else if(d.indexOf("[")>-1){v=d.substr(0,d.indexOf("["));var m=d.replace(/^[a-z]+\[|\]$/gi,"");h=h+v+m,o[h]||(o[h]={}),c[v]||(c[v]=[]),p==l.length-1?c[v].push(a):o[h][m]||(c[v].push({}),o[h][m]=c[v][c[v].length-1]),c=o[h][m]}else p<l.length-1?(c[d]||(c[d]={}),c=c[d]):c[d]=a}}return s},window.form2json=window.form2object}(),Sammy.Form2JSON=function(e){e._parseFormParams=function(e){return form2object(e[0])}}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Form2JSON=e(window.jQuery,window.Sammy)})(function(e,t){return function(){function e(n){var r=[],i=n.firstChild;while(i){if(i.nodeName.match(/INPUT|SELECT|TEXTAREA/i)){var s=t(i);s!==null&&r.push({name:i.name,value:s})}else{var o=e(i);r=r.concat(o)}i=i.nextSibling}return r}function t(e){switch(e.nodeName){case"INPUT":case"TEXTAREA":switch(e.type.toLowerCase()){case"radio":case"checkbox":if(e.checked)return e.value;break;case"button":case"reset":case"submit":case"image":return"";default:return e.value}break;case"SELECT":return n(e);default:}return null}function n(e){var t=e.multiple;if(!t)return e.value;var n=[];for(var r=e.getElementsByTagName("option"),i=0,s=r.length;i<s;i++)r[i].selected&&n.push(r[i].value);return n}window.form2object=function(t,n,r){if(typeof r=="undefined"||r==null)r=!0;if(typeof n=="undefined"||n==null)n=".";t=typeof t=="string"?document.getElementById(t):t;var i=e(t),s={},o={};for(var u=0;u<i.length;u++){var a=i[u].value;if(r&&a==="")continue;var f=i[u].name,l=f.split(n),c=s,h="";for(var p=0;p<l.length;p++){var d=l[p],v="";if(d.indexOf("[]")>-1&&p==l.length-1)h=v=d.substr(0,d.indexOf("[")),c[v]||(c[v]=[]),c[v].push(a);else if(d.indexOf("[")>-1){v=d.substr(0,d.indexOf("["));var m=d.replace(/^[a-z]+\[|\]$/gi,"");h=h+v+m,o[h]||(o[h]={}),c[v]||(c[v]=[]),p==l.length-1?c[v].push(a):o[h][m]||(c[v].push({}),o[h][m]=c[v][c[v].length-1]),c=o[h][m]}else p<l.length-1?(c[d]||(c[d]={}),c=c[d]):c[d]=a}}return s},window.form2json=window.form2object}(),t.Form2JSON=function(e){e._parseFormParams=function(e){return form2object(e[0])}},t.Form2JSON});
5 lib/min/plugins/sammy.googleanalytics-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.googleanalytics.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.GoogleAnalytics=function(e,t){function i(){r=!1}function s(){r=!0}function o(e){typeof n!="undefined"?n._trackPageview(e):typeof _gaq!="undefined"&&_gaq.push(["_trackPageview",e])}var n=t||window.pageTracker,r=!0;this.helpers({noTrack:function(){i()},track:function(e){(typeof n!="undefined"||typeof _gaq!="undefined")&&r&&(this.log("tracking",e),o(e))}}),this.bind("event-context-after",function(){this.track(this.path),s()})}})(jQuery);
5 lib/min/plugins/sammy.googleanalytics-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.googleanalytics.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).GoogleAnalytics=e(window.jQuery,window.Sammy)})(function(e,t){return t.GoogleAnalytics=function(e,t){function i(){r=!1}function s(){r=!0}function o(e){typeof n!="undefined"?n._trackPageview(e):typeof _gaq!="undefined"&&_gaq.push(["_trackPageview",e])}var n=t||window.pageTracker,r=!0;this.helpers({noTrack:function(){i()},track:function(e){(typeof n!="undefined"||typeof _gaq!="undefined")&&r&&(this.log("tracking google analytics",e),o(e))}}),this.bind("event-context-after",function(){var e=this.app.last_location[1];e&&(this.track(e),s())})},t.GoogleAnalytics});
6 lib/min/plugins/sammy.googleanalytics-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.googleanalytics.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.GoogleAnalytics=function(e,t){function i(){r=!1}function s(){r=!0}function o(e){typeof n!="undefined"?n._trackPageview(e):typeof _gaq!="undefined"&&_gaq.push(["_trackPageview",e])}var n=t||window.pageTracker,r=!0;this.helpers({noTrack:function(){i()},track:function(e){(typeof n!="undefined"||typeof _gaq!="undefined")&&r&&(this.log("tracking",e),o(e))}}),this.bind("event-context-after",function(){this.track(this.path),s()})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:05 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).GoogleAnalytics=e(window.jQuery,window.Sammy)})(function(e,t){return t.GoogleAnalytics=function(e,t){function i(){r=!1}function s(){r=!0}function o(e){typeof n!="undefined"?n._trackPageview(e):typeof _gaq!="undefined"&&_gaq.push(["_trackPageview",e])}var n=t||window.pageTracker,r=!0;this.helpers({noTrack:function(){i()},track:function(e){(typeof n!="undefined"||typeof _gaq!="undefined")&&r&&(this.log("tracking google analytics",e),o(e))}}),this.bind("event-context-after",function(){var e=this.app.last_location[1];e&&(this.track(e),s())})},t.GoogleAnalytics});
5 lib/min/plugins/sammy.haml-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.haml.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Haml=function(t,n){var r={},i=function(t,n,i){typeof i=="undefined"&&(i=t);var s=r[i];return s||(s=r[i]=Haml(t)),s(e.extend({},this,n))};n||(n="haml"),t.helper(n,i)}})(jQuery);
5 lib/min/plugins/sammy.haml-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.haml.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","haml"],e):(window.Sammy=window.Sammy||{}).Haml=e(window.jQuery,window.Sammy,window.Haml)})(function(e,t,n){return t.Haml=function(t,r){var i={},s=function(t,r,s){typeof s=="undefined"&&(s=t);var o=i[s];return o||(o=i[s]=n(t)),o(e.extend({},this,r))};r||(r="haml"),t.helper(r,s)},t.Haml});
6 lib/min/plugins/sammy.haml-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.haml.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Haml=function(t,n){var r={},i=function(t,n,i){typeof i=="undefined"&&(i=t);var s=r[i];return s||(s=r[i]=Haml(t)),s(e.extend({},this,n))};n||(n="haml"),t.helper(n,i)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","haml"],e):(window.Sammy=window.Sammy||{}).Haml=e(window.jQuery,window.Sammy,window.Haml)})(function(e,t,n){return t.Haml=function(t,r){var i={},s=function(t,r,s){typeof s=="undefined"&&(s=t);var o=i[s];return o||(o=i[s]=n(t)),o(e.extend({},this,r))};r||(r="haml"),t.helper(r,s)},t.Haml});
5 lib/min/plugins/sammy.handlebars-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.handlebars.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Handlebars=function(t,n){var r={},i=function(t,n,i,s){typeof s=="undefined"&&(s=t);var o=r[s];return o||(o=r[s]=Handlebars.compile(t)),n=e.extend({},this,n),i=e.extend({},n.partials,i),o(n,{partials:i})};n||(n="handlebars"),t.helper(n,i)}})(jQuery);
5 lib/min/plugins/sammy.handlebars-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.handlebars.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","handlebars"],e):(window.Sammy=window.Sammy||{}).Handlebars=e(window.jQuery,window.Sammy,window.Handlebars)})(function(e,t,n){return t.Handlebars=function(t,r){var i={},s=function(t,r,s,o){typeof o=="undefined"&&(o=t);var u=i[o];return u||(u=i[o]=n.compile(t)),r=e.extend({},this,r),s=e.extend({},r.partials,s),u(r,{partials:s})};r||(r="handlebars"),t.helper(r,s)},t.Handlebars});
6 lib/min/plugins/sammy.handlebars-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.handlebars.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Handlebars=function(t,n){var r={},i=function(t,n,i,s){typeof s=="undefined"&&(s=t);var o=r[s];return o||(o=r[s]=Handlebars.compile(t)),n=e.extend({},this,n),i=e.extend({},n.partials,i),o(n,{partials:i})};n||(n="handlebars"),t.helper(n,i)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","handlebars"],e):(window.Sammy=window.Sammy||{}).Handlebars=e(window.jQuery,window.Sammy,window.Handlebars)})(function(e,t,n){return t.Handlebars=function(t,r){var i={},s=function(t,r,s,o){typeof o=="undefined"&&(o=t);var u=i[o];return u||(u=i[o]=n.compile(t)),r=e.extend({},this,r),s=e.extend({},r.partials,s),u(r,{partials:s})};r||(r="handlebars"),t.helper(r,s)},t.Handlebars});
5 lib/min/plugins/sammy.hogan-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.hogan.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Hogan=function(t,n){var r={},i=function(t,n,i){var s=r[s];return s||(s=Hogan.compile(t)),n=e.extend({},this,n),i=e.extend({},n.partials,i),s.render(n,i)};n||(n="hogan"),t.helper(n,i)}})(jQuery);
5 lib/min/plugins/sammy.hogan-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.hogan.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","hogan"],e):(window.Sammy=window.Sammy||{}).Hogan=e(window.jQuery,window.Sammy,window.Hogan)})(function(e,t){return t.Hogan=function(t,n){var r={},i=function(t,n,i){var s=r[s];return s||(s=Hogan.compile(t)),n=e.extend({},this,n),i=e.extend({},n.partials,i),s.render(n,i)};n||(n="hogan"),t.helper(n,i)},t.Hogan});
6 lib/min/plugins/sammy.hogan-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.hogan.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Hogan=function(t,n){var r={},i=function(t,n,i){var s=r[s];return s||(s=Hogan.compile(t)),n=e.extend({},this,n),i=e.extend({},n.partials,i),s.render(n,i)};n||(n="hogan"),t.helper(n,i)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","hogan"],e):(window.Sammy=window.Sammy||{}).Hogan=e(window.jQuery,window.Sammy,window.Hogan)})(function(e,t){return t.Hogan=function(t,n){var r={},i=function(t,n,i){var s=r[s];return s||(s=Hogan.compile(t)),n=e.extend({},this,n),i=e.extend({},n.partials,i),s.render(n,i)};n||(n="hogan"),t.helper(n,i)},t.Hogan});
5 lib/min/plugins/sammy.hoptoad-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.hoptoad.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Hoptoad=function(e,t){t=t||window.Hoptoad,e.bind("error",function(e,n){n&&n.error&&t.notify(n.error)})}})(jQuery);
5 lib/min/plugins/sammy.hoptoad-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.hoptoad.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Hoptoad=e(window.jQuery,window.Sammy)})(function(e,t){return t.Hoptoad=function(e,t){t=t||window.Hoptoad,e.bind("error",function(e,n){n&&n.error&&t.notify(n.error)})},t.Hoptoad});
6 lib/min/plugins/sammy.hoptoad-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.hoptoad.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:27 -0400
-(function(e){Sammy=Sammy||{},Sammy.Hoptoad=function(e,t){t=t||window.Hoptoad,e.bind("error",function(e,n){n&&n.error&&t.notify(n.error)})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Hoptoad=e(window.jQuery,window.Sammy)})(function(e,t){return t.Hoptoad=function(e,t){t=t||window.Hoptoad,e.bind("error",function(e,n){n&&n.error&&t.notify(n.error)})},t.Hoptoad});
5 lib/min/plugins/sammy.json-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.json.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function($){window.JSON||(window.JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)r=rep[n],typeof r=="string"&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),Sammy=Sammy||{},Sammy.JSON=function(e){e.helpers({json:function(e){return typeof e=="string"?JSON.parse(e):JSON.stringify(e)}})}})(jQuery);
5 lib/min/plugins/sammy.json-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.json.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).JSON=e(window.jQuery,window.Sammy)})(function($,Sammy){return window.JSON||(window.JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)r=rep[n],typeof r=="string"&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),Sammy.JSON=function(e){e.helpers({json:function(e){return typeof e=="string"?JSON.parse(e):JSON.stringify(e)}})},Sammy.JSON});
6 lib/min/plugins/sammy.json-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.json.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function($){window.JSON||(window.JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)r=rep[n],typeof r=="string"&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),Sammy=Sammy||{},Sammy.JSON=function(e){e.helpers({json:function(e){return typeof e=="string"?JSON.parse(e):JSON.stringify(e)}})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).JSON=e(window.jQuery,window.Sammy)})(function($,Sammy){return window.JSON||(window.JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)r=rep[n],typeof r=="string"&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),Sammy.JSON=function(e){e.helpers({json:function(e){return typeof e=="string"?JSON.parse(e):JSON.stringify(e)}})},Sammy.JSON});
5 lib/min/plugins/sammy.kissmetrics-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.kissmetrics.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).JSON=e(window.jQuery,window.Sammy)})(function(e,t){return t.KISSmetrics=function(e){function n(){t=!1}function r(){t=!0}var t=!0;this.helpers({doNotTrackKISSmetrics:function(){n()},trackKISSmetrics:function(e){typeof window._kmq!="undefined"&&t&&(this.log("tracking KISSmetrics",e),window._kmq.push(["record",e]))}}),this.bind("event-context-after",function(){var e=this.app.last_location[1];e&&(this.trackKISSmetrics(e),r())})},t.KISSmetrics});
5 lib/min/plugins/sammy.kissmetrics-latest.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.kissmetrics.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:06 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).JSON=e(window.jQuery,window.Sammy)})(function(e,t){return t.KISSmetrics=function(e){function n(){t=!1}function r(){t=!0}var t=!0;this.helpers({doNotTrackKISSmetrics:function(){n()},trackKISSmetrics:function(e){typeof window._kmq!="undefined"&&t&&(this.log("tracking KISSmetrics",e),window._kmq.push(["record",e]))}}),this.bind("event-context-after",function(){var e=this.app.last_location[1];e&&(this.trackKISSmetrics(e),r())})},t.KISSmetrics});
5 lib/min/plugins/sammy.meld-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.meld.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.Meld=function(t,n){var r={selector:function(e){return"."+e},remove_false:!0},i=function(t,n,s){var o=e(t);s=e.extend(r,s||{}),typeof n=="string"?o.html(n):e.each(n,function(t,n){var r=s.selector(t),u=o.filter(r),a,f,l=!1,c=o.index(u);u.length===0&&(u=o.find(r));if(u.length>0)if(e.isArray(n)){a=e("<div/>"),u.is("ol, ul")?(l=!0,f=u.children("li:first"),f.length==0&&(f=e("<li/>"))):u.children().length==1?(l=!0,f=u.children(":first").clone()):f=u.clone();for(var h=0;h<n.length;h++)a.append(i(f.clone(),n[h],s));if(l)u.html(a.html());else if(u[0]==o[0])o=e(a.html());else if(c>=0){var p=[c,1];p=p.concat(a.children().get()),o.splice.apply(o,p)}}else s.remove_false&&n===!1?o.splice(c,1):typeof n=="object"?u.is(":empty")?u.attr(n,!0):u.html(i(u.html(),n,s)):u.html(n.toString());else o.attr(t,n,!0)});var u=o;return u};n||(n="meld"),t.helper(n,i)}})(jQuery);
5 lib/min/plugins/sammy.meld-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.meld.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Meld=e(window.jQuery,window.Sammy)})(function(e,t){return t.Meld=function(t,n){var r={selector:function(e){return"."+e},remove_false:!0},i=function(t,n,s){var o=e(t);s=e.extend(r,s||{}),typeof n=="string"?o.html(n):e.each(n,function(t,n){var r=s.selector(t),u=o.filter(r),a,f,l=!1,c=o.index(u);u.length===0&&(u=o.find(r));if(u.length>0)if(e.isArray(n)){a=e("<div/>"),u.is("ol, ul")?(l=!0,f=u.children("li:first"),f.length==0&&(f=e("<li/>"))):u.children().length==1?(l=!0,f=u.children(":first").clone()):f=u.clone();for(var h=0;h<n.length;h++)a.append(i(f.clone(),n[h],s));if(l)u.html(a.html());else if(u[0]==o[0])o=e(a.html());else if(c>=0){var p=[c,1];p=p.concat(a.children().get()),o.splice.apply(o,p)}}else s.remove_false&&n===!1?o.splice(c,1):typeof n=="object"?u.is(":empty")?u.attr(n,!0):u.html(i(u.html(),n,s)):u.html(n.toString());else o.attr(t,n,!0)});var u=o;return u};n||(n="meld"),t.helper(n,i)},t.Meld});
6 lib/min/plugins/sammy.meld-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.meld.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.Meld=function(t,n){var r={selector:function(e){return"."+e},remove_false:!0},i=function(t,n,s){var o=e(t);s=e.extend(r,s||{}),typeof n=="string"?o.html(n):e.each(n,function(t,n){var r=s.selector(t),u=o.filter(r),a,f,l=!1,c=o.index(u);u.length===0&&(u=o.find(r));if(u.length>0)if(e.isArray(n)){a=e("<div/>"),u.is("ol, ul")?(l=!0,f=u.children("li:first"),f.length==0&&(f=e("<li/>"))):u.children().length==1?(l=!0,f=u.children(":first").clone()):f=u.clone();for(var h=0;h<n.length;h++)a.append(i(f.clone(),n[h],s));if(l)u.html(a.html());else if(u[0]==o[0])o=e(a.html());else if(c>=0){var p=[c,1];p=p.concat(a.children().get()),o.splice.apply(o,p)}}else s.remove_false&&n===!1?o.splice(c,1):typeof n=="object"?u.is(":empty")?u.attr(n,!0):u.html(i(u.html(),n,s)):u.html(n.toString());else o.attr(t,n,!0)});var u=o;return u};n||(n="meld"),t.helper(n,i)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Meld=e(window.jQuery,window.Sammy)})(function(e,t){return t.Meld=function(t,n){var r={selector:function(e){return"."+e},remove_false:!0},i=function(t,n,s){var o=e(t);s=e.extend(r,s||{}),typeof n=="string"?o.html(n):e.each(n,function(t,n){var r=s.selector(t),u=o.filter(r),a,f,l=!1,c=o.index(u);u.length===0&&(u=o.find(r));if(u.length>0)if(e.isArray(n)){a=e("<div/>"),u.is("ol, ul")?(l=!0,f=u.children("li:first"),f.length==0&&(f=e("<li/>"))):u.children().length==1?(l=!0,f=u.children(":first").clone()):f=u.clone();for(var h=0;h<n.length;h++)a.append(i(f.clone(),n[h],s));if(l)u.html(a.html());else if(u[0]==o[0])o=e(a.html());else if(c>=0){var p=[c,1];p=p.concat(a.children().get()),o.splice.apply(o,p)}}else s.remove_false&&n===!1?o.splice(c,1):typeof n=="object"?u.is(":empty")?u.attr(n,!0):u.html(i(u.html(),n,s)):u.html(n.toString());else o.attr(t,n,!0)});var u=o;return u};n||(n="meld"),t.helper(n,i)},t.Meld});
5 lib/min/plugins/sammy.mixpanel-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.mixpanel.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Flash=e(window.jQuery,window.Sammy)})(function(e,t){return t.Mixpanel=function(e){function n(){t=!1}function r(){t=!0}var t=!0;this.helpers({doNotTrackMixpanel:function(){n()},trackMixpanel:function(e){typeof window.mixpanel!="undefined"&&t&&(this.log("tracking mixpanel",e),window.mixpanel.track(e))}}),this.bind("event-context-after",function(){var e=this.app.last_location[1];e&&(this.trackMixpanel(e),r())})},t.Mixpanel});
5 lib/min/plugins/sammy.mixpanel-latest.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.mixpanel.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Flash=e(window.jQuery,window.Sammy)})(function(e,t){return t.Mixpanel=function(e){function n(){t=!1}function r(){t=!0}var t=!0;this.helpers({doNotTrackMixpanel:function(){n()},trackMixpanel:function(e){typeof window.mixpanel!="undefined"&&t&&(this.log("tracking mixpanel",e),window.mixpanel.track(e))}}),this.bind("event-context-after",function(){var e=this.app.last_location[1];e&&(this.trackMixpanel(e),r())})},t.Mixpanel});
5 lib/min/plugins/sammy.mustache-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.mustache.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.Mustache=function(t,n){var r=function(t,n,r){return n=e.extend({},this,n),r=e.extend({},n.partials,r),Mustache.to_html(t,n,r)};n||(n="mustache"),t.helper(n,r)}})(jQuery);
5 lib/min/plugins/sammy.mustache-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.mustache.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","mustache"],e):(window.Sammy=window.Sammy||{}).Mustache=e(window.jQuery,window.Sammy,window.Mustache)})(function(e,t,n){return t.Mustache=function(t,r){var i=function(t,r,i){return r=e.extend({},this,r),i=e.extend({},r.partials,i),n.to_html(t,r,i)};r||(r="mustache"),t.helper(r,i)},t.Mustache});
6 lib/min/plugins/sammy.mustache-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.mustache.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.Mustache=function(t,n){var r=function(t,n,r){return n=e.extend({},this,n),r=e.extend({},n.partials,r),Mustache.to_html(t,n,r)};n||(n="mustache"),t.helper(n,r)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","mustache"],e):(window.Sammy=window.Sammy||{}).Mustache=e(window.jQuery,window.Sammy,window.Mustache)})(function(e,t,n){return t.Mustache=function(t,r){var i=function(t,r,i){return r=e.extend({},this,r),i=e.extend({},r.partials,i),n.to_html(t,r,i)};r||(r="mustache"),t.helper(r,i)},t.Mustache});
5 lib/min/plugins/sammy.nested_params-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.nested_params.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){function t(e){return e=unescape(e),e==="true"?!0:e==="false"?!1:e}function n(r,i,s){var o,u,a;if(i.match(/^[^\[]+$/))r[i]=t(s);else if(o=i.match(/^([^\[]+)\[\](.*)$/)){u=o[1],a=o[2];if(r[u]&&!e.isArray(r[u]))throw"400 Bad Request";if(a){o=a.match(/^\[([^\]]+)\](.*)$/);if(!o)throw"400 Bad Request";r[u]?r[u][r[u].length-1][o[1]]?r[u].push(n({},o[1]+o[2],s)):e.extend(!0,r[u][r[u].length-1],n({},o[1]+o[2],s)):r[u]=[n({},o[1]+o[2],s)]}else r[u]?r[u].push(t(s)):r[u]=[t(s)]}else if(o=i.match(/^([^\[]+)\[([^\[]+)\](.*)$/)){u=o[1],a=o[2]+o[3];if(r[u]&&e.isArray(r[u]))throw"400 Bad Request";r[u]?e.extend(!0,r[u],n(r[u],a,s)):r[u]=n({},a,s)}return r}Sammy=Sammy||{},Sammy.NestedParams=function(e){e._parseParamPair=n}})(jQuery);
5 lib/min/plugins/sammy.nested_params-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.nested_params.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).NestedParams=e(window.jQuery,window.Sammy)})(function(e,t){function n(e){return e=unescape(e),e==="true"?!0:e==="false"?!1:e}function r(t,i,s){var o,u,a;if(i.match(/^[^\[]+$/))t[i]=n(s);else if(o=i.match(/^([^\[]+)\[\](.*)$/)){u=o[1],a=o[2];if(t[u]&&!e.isArray(t[u]))throw"400 Bad Request";if(a){o=a.match(/^\[([^\]]+)\](.*)$/);if(!o)throw"400 Bad Request";t[u]?t[u][t[u].length-1][o[1]]?t[u].push(r({},o[1]+o[2],s)):e.extend(!0,t[u][t[u].length-1],r({},o[1]+o[2],s)):t[u]=[r({},o[1]+o[2],s)]}else t[u]?t[u].push(n(s)):t[u]=[n(s)]}else if(o=i.match(/^([^\[]+)\[([^\[]+)\](.*)$/)){u=o[1],a=o[2]+o[3];if(t[u]&&e.isArray(t[u]))throw"400 Bad Request";t[u]?e.extend(!0,t[u],r(t[u],a,s)):t[u]=r({},a,s)}return t}return t.NestedParams=function(e){e._parseParamPair=r},t.NestedParams});
6 lib/min/plugins/sammy.nested_params-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.nested_params.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){function t(e){return e=unescape(e),e==="true"?!0:e==="false"?!1:e}function n(r,i,s){var o,u,a;if(i.match(/^[^\[]+$/))r[i]=t(s);else if(o=i.match(/^([^\[]+)\[\](.*)$/)){u=o[1],a=o[2];if(r[u]&&!e.isArray(r[u]))throw"400 Bad Request";if(a){o=a.match(/^\[([^\]]+)\](.*)$/);if(!o)throw"400 Bad Request";r[u]?r[u][r[u].length-1][o[1]]?r[u].push(n({},o[1]+o[2],s)):e.extend(!0,r[u][r[u].length-1],n({},o[1]+o[2],s)):r[u]=[n({},o[1]+o[2],s)]}else r[u]?r[u].push(t(s)):r[u]=[t(s)]}else if(o=i.match(/^([^\[]+)\[([^\[]+)\](.*)$/)){u=o[1],a=o[2]+o[3];if(r[u]&&e.isArray(r[u]))throw"400 Bad Request";r[u]?e.extend(!0,r[u],n(r[u],a,s)):r[u]=n({},a,s)}return r}Sammy=Sammy||{},Sammy.NestedParams=function(e){e._parseParamPair=n}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).NestedParams=e(window.jQuery,window.Sammy)})(function(e,t){function n(e){return e=unescape(e),e==="true"?!0:e==="false"?!1:e}function r(t,i,s){var o,u,a;if(i.match(/^[^\[]+$/))t[i]=n(s);else if(o=i.match(/^([^\[]+)\[\](.*)$/)){u=o[1],a=o[2];if(t[u]&&!e.isArray(t[u]))throw"400 Bad Request";if(a){o=a.match(/^\[([^\]]+)\](.*)$/);if(!o)throw"400 Bad Request";t[u]?t[u][t[u].length-1][o[1]]?t[u].push(r({},o[1]+o[2],s)):e.extend(!0,t[u][t[u].length-1],r({},o[1]+o[2],s)):t[u]=[r({},o[1]+o[2],s)]}else t[u]?t[u].push(n(s)):t[u]=[n(s)]}else if(o=i.match(/^([^\[]+)\[([^\[]+)\](.*)$/)){u=o[1],a=o[2]+o[3];if(t[u]&&e.isArray(t[u]))throw"400 Bad Request";t[u]?e.extend(!0,t[u],r(t[u],a,s)):t[u]=r({},a,s)}return t}return t.NestedParams=function(e){e._parseParamPair=r},t.NestedParams});
5 lib/min/plugins/sammy.oauth2-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.oauth2.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.OAuth2=function(t){function n(e){var t=e.match(/#(.*)$/)[1],n=t.split("&"),r={},i,s=n.length;for(i=0;i<s;i+=1){var o=n[i].split("=");r[o[0]]=o[1].replace(/\+/g," ")}return r}t.use("JSON"),this.authorize="/oauth/authorize",this.helper("requireOAuth",function(e){if(!this.app.getAccessToken())return this.redirect(this.app.authorize+"?state="+escape(this.path)),!1;e&&e.apply(this)}),this.helper("loseAccessToken",function(){this.app.loseAccessToken()}),this.requireOAuth=function(e){this.before(e||{},function(e){return e.requireOAuth()})},this.getAccessToken=function(){return this.session("oauth.token")},this.setAccessToken=function(e){this.session("oauth.token",e),this.trigger("oauth.connected")},this.loseAccessToken=function(){this.session("oauth.token",null),this.trigger("oauth.disconnected")},e(document).ajaxSend(function(e,n){var r=t.getAccessToken();r&&n.setRequestHeader("Authorization","OAuth "+r)});var r;this.bind("run",function(e,t){r=t.start_url||"#",this.app.getAccessToken()&&this.trigger("oauth.connected")}),this.before(/#(access_token=|[^\\].*\&access_token=)/,function(e){var t=n(e.path);return this.app.setAccessToken(t.access_token),e.redirect(t.state.length===0?this.app.start_url:unescape(t.state)),!1}).get(/#(access_token=|[^\\].*\&access_token=)/,function(e){}),this.before(/#(error=|[^\\].*\&error=)/,function(e){var t=n(e.path),r=t.error_description||"Access denined";return e.trigger("oauth.denied",{code:t.error,message:r}),!1}).get(/#(error=|[^\\].*\&error=)/,function(e){})}})(jQuery);
5 lib/min/plugins/sammy.oauth2-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.oauth2.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).OAuth2=e(window.jQuery,window.Sammy)})(function(e,t){return t.OAuth2=function(t){function n(e){var t=e.match(/#(.*)$/)[1],n=t.split("&"),r={},i,s=n.length;for(i=0;i<s;i+=1){var o=n[i].split("=");r[o[0]]=o[1].replace(/\+/g," ")}return r}t.use("JSON"),this.authorize="/oauth/authorize",this.helper("requireOAuth",function(e){if(!this.app.getAccessToken())return this.redirect(this.app.authorize+"?state="+escape(this.path)),!1;e&&e.apply(this)}),this.helper("loseAccessToken",function(){this.app.loseAccessToken()}),this.requireOAuth=function(e){this.before(e||{},function(e){return e.requireOAuth()})},this.getAccessToken=function(){return this.session("oauth.token")},this.setAccessToken=function(e){this.session("oauth.token",e),this.trigger("oauth.connected")},this.loseAccessToken=function(){this.session("oauth.token",null),this.trigger("oauth.disconnected")},e(document).ajaxSend(function(e,n){var r=t.getAccessToken();r&&n.setRequestHeader("Authorization","OAuth "+r)});var r;this.bind("run",function(e,t){r=t.start_url||"#",this.app.getAccessToken()&&this.trigger("oauth.connected")}),this.before(/#(access_token=|[^\\].*\&access_token=)/,function(e){var t=n(e.path);return this.app.setAccessToken(t.access_token),e.redirect(t.state.length===0?this.app.start_url:unescape(t.state)),!1}).get(/#(access_token=|[^\\].*\&access_token=)/,function(e){}),this.before(/#(error=|[^\\].*\&error=)/,function(e){var t=n(e.path),r=t.error_description||"Access denined";return e.trigger("oauth.denied",{code:t.error,message:r}),!1}).get(/#(error=|[^\\].*\&error=)/,function(e){})},t.OAuth2});
6 lib/min/plugins/sammy.oauth2-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.oauth2.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.OAuth2=function(t){function n(e){var t=e.match(/#(.*)$/)[1],n=t.split("&"),r={},i,s=n.length;for(i=0;i<s;i+=1){var o=n[i].split("=");r[o[0]]=o[1].replace(/\+/g," ")}return r}t.use("JSON"),this.authorize="/oauth/authorize",this.helper("requireOAuth",function(e){if(!this.app.getAccessToken())return this.redirect(this.app.authorize+"?state="+escape(this.path)),!1;e&&e.apply(this)}),this.helper("loseAccessToken",function(){this.app.loseAccessToken()}),this.requireOAuth=function(e){this.before(e||{},function(e){return e.requireOAuth()})},this.getAccessToken=function(){return this.session("oauth.token")},this.setAccessToken=function(e){this.session("oauth.token",e),this.trigger("oauth.connected")},this.loseAccessToken=function(){this.session("oauth.token",null),this.trigger("oauth.disconnected")},e(document).ajaxSend(function(e,n){var r=t.getAccessToken();r&&n.setRequestHeader("Authorization","OAuth "+r)});var r;this.bind("run",function(e,t){r=t.start_url||"#",this.app.getAccessToken()&&this.trigger("oauth.connected")}),this.before(/#(access_token=|[^\\].*\&access_token=)/,function(e){var t=n(e.path);return this.app.setAccessToken(t.access_token),e.redirect(t.state.length===0?this.app.start_url:unescape(t.state)),!1}).get(/#(access_token=|[^\\].*\&access_token=)/,function(e){}),this.before(/#(error=|[^\\].*\&error=)/,function(e){var t=n(e.path),r=t.error_description||"Access denined";return e.trigger("oauth.denied",{code:t.error,message:r}),!1}).get(/#(error=|[^\\].*\&error=)/,function(e){})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).OAuth2=e(window.jQuery,window.Sammy)})(function(e,t){return t.OAuth2=function(t){function n(e){var t=e.match(/#(.*)$/)[1],n=t.split("&"),r={},i,s=n.length;for(i=0;i<s;i+=1){var o=n[i].split("=");r[o[0]]=o[1].replace(/\+/g," ")}return r}t.use("JSON"),this.authorize="/oauth/authorize",this.helper("requireOAuth",function(e){if(!this.app.getAccessToken())return this.redirect(this.app.authorize+"?state="+escape(this.path)),!1;e&&e.apply(this)}),this.helper("loseAccessToken",function(){this.app.loseAccessToken()}),this.requireOAuth=function(e){this.before(e||{},function(e){return e.requireOAuth()})},this.getAccessToken=function(){return this.session("oauth.token")},this.setAccessToken=function(e){this.session("oauth.token",e),this.trigger("oauth.connected")},this.loseAccessToken=function(){this.session("oauth.token",null),this.trigger("oauth.disconnected")},e(document).ajaxSend(function(e,n){var r=t.getAccessToken();r&&n.setRequestHeader("Authorization","OAuth "+r)});var r;this.bind("run",function(e,t){r=t.start_url||"#",this.app.getAccessToken()&&this.trigger("oauth.connected")}),this.before(/#(access_token=|[^\\].*\&access_token=)/,function(e){var t=n(e.path);return this.app.setAccessToken(t.access_token),e.redirect(t.state.length===0?this.app.start_url:unescape(t.state)),!1}).get(/#(access_token=|[^\\].*\&access_token=)/,function(e){}),this.before(/#(error=|[^\\].*\&error=)/,function(e){var t=n(e.path),r=t.error_description||"Access denined";return e.trigger("oauth.denied",{code:t.error,message:r}),!1}).get(/#(error=|[^\\].*\&error=)/,function(e){})},t.OAuth2});
5 lib/min/plugins/sammy.path_location_proxy-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.path_location_proxy.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.PathLocationProxy=function(e){this.app=e},e.extend(Sammy.PathLocationProxy.prototype,{bind:function(){},unbind:function(){},getLocation:function(){return[window.location.pathname,window.location.search].join("")},setLocation:function(e){return window.location=e}})})(jQuery);
5 lib/min/plugins/sammy.path_location_proxy-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.path_location_proxy.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).PathLocationProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.PathLocationProxy=function(e){this.app=e},e.extend(t.PathLocationProxy.prototype,{bind:function(){},unbind:function(){},getLocation:function(){return[window.location.pathname,window.location.search].join("")},setLocation:function(e){return window.location=e}}),t.PathLocationProxy});
6 lib/min/plugins/sammy.path_location_proxy-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.path_location_proxy.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.PathLocationProxy=function(e){this.app=e},e.extend(Sammy.PathLocationProxy.prototype,{bind:function(){},unbind:function(){},getLocation:function(){return[window.location.pathname,window.location.search].join("")},setLocation:function(e){return window.location=e}})})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:07 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).PathLocationProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.PathLocationProxy=function(e){this.app=e},e.extend(t.PathLocationProxy.prototype,{bind:function(){},unbind:function(){},getLocation:function(){return[window.location.pathname,window.location.search].join("")},setLocation:function(e){return window.location=e}}),t.PathLocationProxy});
5 lib/min/plugins/sammy.pure-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.pure.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.Pure=function(t,n){var r=function(t,n,r){return e(t).autoRender(n,r)};n||(n="pure"),t.helper(n,r)}})(jQuery);
5 lib/min/plugins/sammy.pure-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.pure.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","pure"],e):(window.Sammy=window.Sammy||{}).Pure=e(window.jQuery,window.Sammy)})(function(e,t){return t.Pure=function(t,n){var r=function(t,n,r){return e(t).autoRender(n,r)};n||(n="pure"),t.helper(n,r)},t.Pure});
6 lib/min/plugins/sammy.pure-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.pure.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.Pure=function(t,n){var r=function(t,n,r){return e(t).autoRender(n,r)};n||(n="pure"),t.helper(n,r)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","pure"],e):(window.Sammy=window.Sammy||{}).Pure=e(window.jQuery,window.Sammy)})(function(e,t){return t.Pure=function(t,n){var r=function(t,n,r){return e(t).autoRender(n,r)};n||(n="pure"),t.helper(n,r)},t.Pure});
5 lib/min/plugins/sammy.push_location_proxy-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.push_location_proxy.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.PushLocationProxy=function(e){this.app=e},e.extend(Sammy.PushLocationProxy.prototype,{bind:function(){var t=this;e(window).bind("popstate",function(e){t.app.trigger("location-changed")}),e("a").live("click",function(n){location.hostname==this.hostname&&(n.preventDefault(),t.setLocation(e(this).attr("href")),t.app.trigger("location-changed"))})},unbind:function(){e("a").unbind("click"),e(window).unbind("popstate")},getLocation:function(){return window.location.pathname},setLocation:function(e){history.pushState({path:this.path},"",e)}})})(jQuery);
5 lib/min/plugins/sammy.push_location_proxy-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.push_location_proxy.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).PushLocationProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.PushLocationProxy=function(e){this.app=e},e.extend(t.PushLocationProxy.prototype,{bind:function(){var t=this;e(window).bind("popstate",function(e){t.app.trigger("location-changed")}),e("a").live("click",function(n){location.hostname==this.hostname&&(n.preventDefault(),t.setLocation(e(this).attr("href")),t.app.trigger("location-changed"))})},unbind:function(){e("a").unbind("click"),e(window).unbind("popstate")},getLocation:function(){return window.location.pathname},setLocation:function(e){history.pushState({path:this.path},"",e)}}),t.PushLocationProxy});
6 lib/min/plugins/sammy.push_location_proxy-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.push_location_proxy.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:28 -0400
-(function(e){Sammy=Sammy||{},Sammy.PushLocationProxy=function(e){this.app=e},e.extend(Sammy.PushLocationProxy.prototype,{bind:function(){var t=this;e(window).bind("popstate",function(e){t.app.trigger("location-changed")}),e("a").live("click",function(n){location.hostname==this.hostname&&(n.preventDefault(),t.setLocation(e(this).attr("href")),t.app.trigger("location-changed"))})},unbind:function(){e("a").unbind("click"),e(window).unbind("popstate")},getLocation:function(){return window.location.pathname},setLocation:function(e){history.pushState({path:this.path},"",e)}})})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).PushLocationProxy=e(window.jQuery,window.Sammy)})(function(e,t){return t.PushLocationProxy=function(e){this.app=e},e.extend(t.PushLocationProxy.prototype,{bind:function(){var t=this;e(window).bind("popstate",function(e){t.app.trigger("location-changed")}),e("a").live("click",function(n){location.hostname==this.hostname&&(n.preventDefault(),t.setLocation(e(this).attr("href")),t.app.trigger("location-changed"))})},unbind:function(){e("a").unbind("click"),e(window).unbind("popstate")},getLocation:function(){return window.location.pathname},setLocation:function(e){history.pushState({path:this.path},"",e)}}),t.PushLocationProxy});
5 lib/min/plugins/sammy.storage-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.storage.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){Sammy=Sammy||{},Sammy.Store=function(t){var n=this;this.options=t||{},this.name=this.options.name||"store",this.element=this.options.element||"body",this.$element=e(this.element),e.isArray(this.options.type)?e.each(this.options.type,function(e,t){if(Sammy.Store.isAvailable(t))return n.type=t,!1}):this.type=this.options.type||"memory",this.meta_key=this.options.meta_key||"__keys__",this.storage=new Sammy.Store[Sammy.Store.stores[this.type]](this.name,this.element,this.options)},Sammy.Store.stores={memory:"Memory",data:"Data",local:"LocalStorage",session:"SessionStorage",cookie:"Cookie"},e.extend(Sammy.Store.prototype,{isAvailable:function(){return e.isFunction(this.storage.isAvailable)?this.storage.isAvailable():!0},exists:function(e){return this.storage.exists(e)},set:function(e,t){var n=typeof t=="string"?t:JSON.stringify(t);return e=e.toString(),this.storage.set(e,n),e!=this.meta_key&&(this._addKey(e),this.$element.trigger("set-"+this.name,{key:e,value:t}),this.$element.trigger("set-"+this.name+"-"+e,{key:e,value:t})),t},get:function(e){var t=this.storage.get(e);if(typeof t=="undefined"||t==null||t=="")return t;try{return JSON.parse(t)}catch(n){return t}},clear:function(e){return this._removeKey(e),this.storage.clear(e)},clearAll:function(){var e=this;this.each(function(t,n){e.clear(t)})},keys:function(){return this.get(this.meta_key)||[]},each:function(e){var t=0,n=this.keys(),r;for(t;t<n.length;t++){r=e(n[t],this.get(n[t]));if(r===!1)return!1}},filter:function(e){var t=[];return this.each(function(n,r){return e(n,r)&&t.push([n,r]),!0}),t},first:function(e){var t=!1;return this.each(function(n,r){if(e(n,r))return t=[n,r],!1}),t},fetch:function(e,t){return this.exists(e)?this.get(e):this.set(e,t.apply(this))},load:function(t,n,r){var i=this;e.get(n,function(e){i.set(t,e),r&&r.apply(this,[e])})},_addKey:function(t){var n=this.keys();e.inArray(t,n)==-1&&n.push(t),this.set(this.meta_key,n)},_removeKey:function(t){var n=this.keys(),r=e.inArray(t,n);r!=-1&&n.splice(r,1),this.set(this.meta_key,n)}}),Sammy.Store.isAvailable=function(e){try{return Sammy.Store[Sammy.Store.stores[e]].prototype.isAvailable()}catch(t){return!1}},Sammy.Store.Memory=function(e,t){this.name=e,this.element=t,this.namespace=[this.element,this.name].join("."),Sammy.Store.Memory.store=Sammy.Store.Memory.store||{},Sammy.Store.Memory.store[this.namespace]=Sammy.Store.Memory.store[this.namespace]||{},this.store=Sammy.Store.Memory.store[this.namespace]},e.extend(Sammy.Store.Memory.prototype,{isAvailable:function(){return!0},exists:function(e){return typeof this.store[e]!="undefined"},set:function(e,t){return this.store[e]=t},get:function(e){return this.store[e]},clear:function(e){delete this.store[e]}}),Sammy.Store.Data=function(t,n){this.name=t,this.element=n,this.$element=e(n)},e.extend(Sammy.Store.Data.prototype,{isAvailable:function(){return!0},exists:function(e){return!!this.$element.data(this._key(e))},set:function(e,t){return this.$element.data(this._key(e),t)},get:function(e){return this.$element.data(this._key(e))},clear:function(e){this.$element.removeData(this._key(e))},_key:function(e){return["store",this.name,e].join(".")}}),Sammy.Store.LocalStorage=function(e,t){this.name=e,this.element=t},e.extend(Sammy.Store.LocalStorage.prototype,{isAvailable:function(){return"localStorage"in window&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.localStorage.setItem(this._key(e),t)},get:function(e){return window.localStorage.getItem(this._key(e))},clear:function(e){window.localStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),Sammy.Store.SessionStorage=function(e,t){this.name=e,this.element=t},e.extend(Sammy.Store.SessionStorage.prototype,{isAvailable:function(){return"sessionStorage"in window&&window.location.protocol!="file:"&&e.isFunction(window.sessionStorage.setItem)},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.sessionStorage.setItem(this._key(e),t)},get:function(e){var t=window.sessionStorage.getItem(this._key(e));return t&&typeof t.value!="undefined"&&(t=t.value),t},clear:function(e){window.sessionStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),Sammy.Store.Cookie=function(e,t,n){this.name=e,this.element=t,this.options=n||{},this.path=this.options.path||"/",this.expires_in=this.options.expires_in||1209600},e.extend(Sammy.Store.Cookie.prototype,{isAvailable:function(){return"cookie"in document&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return this._setCookie(e,t)},get:function(e){return this._getCookie(e)},clear:function(e){this._setCookie(e,"",-1)},_key:function(e){return["store",this.element,this.name,e].join(".")},_getCookie:function(e){var t=this._key(e).replace(/(\.|\*|\(|\)|\[|\])/g,"\\$1"),n=document.cookie.match("(^|;\\s)"+t+"=([^;]*)(;|$)");return n?n[2]:null},_setCookie:function(e,t,n){n||(n=this.expires_in*1e3);var r=new Date;r.setTime(r.getTime()+n);var i=[this._key(e),"=",t,"; expires=",r.toGMTString(),"; path=",this.path].join("");document.cookie=i}}),Sammy.Storage=function(t){this.use(Sammy.JSON),this.stores=this.stores||{},this.store=function(t,n){if(typeof this.stores[t]=="undefined"){var r="clear"+t.substr(0,1).toUpperCase()+t.substr(1);this.stores[t]=new Sammy.Store(e.extend({name:t,element:this.element_selector},n||{})),this[t]=function(n,r){return typeof r=="undefined"?this.stores[t].get(n):e.isFunction(r)?this.stores[t].fetch(n,r):this.stores[t].set(n,r)},this[r]=function(){return this.stores[t].clearAll()},this.helper(t,function(){return this.app[t].apply(this.app,arguments)}),this.helper(r,function(){return this.app[r]()})}return this.stores[t]},this.helpers({store:function(){return this.app.store.apply(this.app,arguments)}})},Sammy.Session=function(t,n){this.use(Sammy.Storage),this.store("session",e.extend({type:["local","cookie","memory"]},n))},Sammy.Cache=function(t,n){this.use(Sammy.Storage),this.cache_partials=!0,this.store("cache",e.extend({type:["local","session","memory"]},n))}})(jQuery);
5 lib/min/plugins/sammy.storage-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.storage.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Storage=e(window.jQuery,window.Sammy)})(function(e,t){return t.Store=function(n){var r=this;this.options=n||{},this.name=this.options.name||"store",this.element=this.options.element||"body",this.$element=e(this.element),e.isArray(this.options.type)?e.each(this.options.type,function(e,n){if(t.Store.isAvailable(n))return r.type=n,!1}):this.type=this.options.type||"memory",this.meta_key=this.options.meta_key||"__keys__",this.storage=new t.Store[t.Store.stores[this.type]](this.name,this.element,this.options)},t.Store.stores={memory:"Memory",data:"Data",local:"LocalStorage",session:"SessionStorage",cookie:"Cookie"},e.extend(t.Store.prototype,{isAvailable:function(){return e.isFunction(this.storage.isAvailable)?this.storage.isAvailable():!0},exists:function(e){return this.storage.exists(e)},set:function(e,t){var n=typeof t=="string"?t:JSON.stringify(t);return e=e.toString(),this.storage.set(e,n),e!=this.meta_key&&(this._addKey(e),this.$element.trigger("set-"+this.name,{key:e,value:t}),this.$element.trigger("set-"+this.name+"-"+e,{key:e,value:t})),t},get:function(e){var t=this.storage.get(e);if(typeof t=="undefined"||t==null||t=="")return t;try{return JSON.parse(t)}catch(n){return t}},clear:function(e){return this._removeKey(e),this.storage.clear(e)},clearAll:function(){var e=this;this.each(function(t,n){e.clear(t)})},keys:function(){return this.get(this.meta_key)||[]},each:function(e){var t=0,n=this.keys(),r;for(t;t<n.length;t++){r=e(n[t],this.get(n[t]));if(r===!1)return!1}},filter:function(e){var t=[];return this.each(function(n,r){return e(n,r)&&t.push([n,r]),!0}),t},first:function(e){var t=!1;return this.each(function(n,r){if(e(n,r))return t=[n,r],!1}),t},fetch:function(e,t){return this.exists(e)?this.get(e):this.set(e,t.apply(this))},load:function(t,n,r){var i=this;e.get(n,function(e){i.set(t,e),r&&r.apply(this,[e])})},_addKey:function(t){var n=this.keys();e.inArray(t,n)==-1&&n.push(t),this.set(this.meta_key,n)},_removeKey:function(t){var n=this.keys(),r=e.inArray(t,n);r!=-1&&n.splice(r,1),this.set(this.meta_key,n)}}),t.Store.isAvailable=function(e){try{return t.Store[t.Store.stores[e]].prototype.isAvailable()}catch(n){return!1}},t.Store.Memory=function(e,n){this.name=e,this.element=n,this.namespace=[this.element,this.name].join("."),t.Store.Memory.store=t.Store.Memory.store||{},t.Store.Memory.store[this.namespace]=t.Store.Memory.store[this.namespace]||{},this.store=t.Store.Memory.store[this.namespace]},e.extend(t.Store.Memory.prototype,{isAvailable:function(){return!0},exists:function(e){return typeof this.store[e]!="undefined"},set:function(e,t){return this.store[e]=t},get:function(e){return this.store[e]},clear:function(e){delete this.store[e]}}),t.Store.Data=function(t,n){this.name=t,this.element=n,this.$element=e(n)},e.extend(t.Store.Data.prototype,{isAvailable:function(){return!0},exists:function(e){return!!this.$element.data(this._key(e))},set:function(e,t){return this.$element.data(this._key(e),t)},get:function(e){return this.$element.data(this._key(e))},clear:function(e){this.$element.removeData(this._key(e))},_key:function(e){return["store",this.name,e].join(".")}}),t.Store.LocalStorage=function(e,t){this.name=e,this.element=t},e.extend(t.Store.LocalStorage.prototype,{isAvailable:function(){return"localStorage"in window&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.localStorage.setItem(this._key(e),t)},get:function(e){return window.localStorage.getItem(this._key(e))},clear:function(e){window.localStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),t.Store.SessionStorage=function(e,t){this.name=e,this.element=t},e.extend(t.Store.SessionStorage.prototype,{isAvailable:function(){return"sessionStorage"in window&&window.location.protocol!="file:"&&e.isFunction(window.sessionStorage.setItem)},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.sessionStorage.setItem(this._key(e),t)},get:function(e){var t=window.sessionStorage.getItem(this._key(e));return t&&typeof t.value!="undefined"&&(t=t.value),t},clear:function(e){window.sessionStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),t.Store.Cookie=function(e,t,n){this.name=e,this.element=t,this.options=n||{},this.path=this.options.path||"/",this.expires_in=this.options.expires_in||1209600},e.extend(t.Store.Cookie.prototype,{isAvailable:function(){return"cookie"in document&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return this._setCookie(e,t)},get:function(e){return this._getCookie(e)},clear:function(e){this._setCookie(e,"",-1)},_key:function(e){return["store",this.element,this.name,e].join(".")},_getCookie:function(e){var t=this._key(e).replace(/(\.|\*|\(|\)|\[|\])/g,"\\$1"),n=document.cookie.match("(^|;\\s)"+t+"=([^;]*)(;|$)");return n?n[2]:null},_setCookie:function(e,t,n){n||(n=this.expires_in*1e3);var r=new Date;r.setTime(r.getTime()+n);var i=[this._key(e),"=",t,"; expires=",r.toGMTString(),"; path=",this.path].join("");document.cookie=i}}),t.Storage=function(n){this.use(t.JSON),this.stores=this.stores||{},this.store=function(n,r){if(typeof this.stores[n]=="undefined"){var i="clear"+n.substr(0,1).toUpperCase()+n.substr(1);this.stores[n]=new t.Store(e.extend({name:n,element:this.element_selector},r||{})),this[n]=function(t,r){return typeof r=="undefined"?this.stores[n].get(t):e.isFunction(r)?this.stores[n].fetch(t,r):this.stores[n].set(t,r)},this[i]=function(){return this.stores[n].clearAll()},this.helper(n,function(){return this.app[n].apply(this.app,arguments)}),this.helper(i,function(){return this.app[i]()})}return this.stores[n]},this.helpers({store:function(){return this.app.store.apply(this.app,arguments)}})},t.Session=function(n,r){this.use(t.Storage),this.store("session",e.extend({type:["local","cookie","memory"]},r))},t.Cache=function(n,r){this.use(t.Storage),this.cache_partials=!0,this.store("cache",e.extend({type:["local","session","memory"]},r))},t.Storage});
6 lib/min/plugins/sammy.storage-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.storage.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){Sammy=Sammy||{},Sammy.Store=function(t){var n=this;this.options=t||{},this.name=this.options.name||"store",this.element=this.options.element||"body",this.$element=e(this.element),e.isArray(this.options.type)?e.each(this.options.type,function(e,t){if(Sammy.Store.isAvailable(t))return n.type=t,!1}):this.type=this.options.type||"memory",this.meta_key=this.options.meta_key||"__keys__",this.storage=new Sammy.Store[Sammy.Store.stores[this.type]](this.name,this.element,this.options)},Sammy.Store.stores={memory:"Memory",data:"Data",local:"LocalStorage",session:"SessionStorage",cookie:"Cookie"},e.extend(Sammy.Store.prototype,{isAvailable:function(){return e.isFunction(this.storage.isAvailable)?this.storage.isAvailable():!0},exists:function(e){return this.storage.exists(e)},set:function(e,t){var n=typeof t=="string"?t:JSON.stringify(t);return e=e.toString(),this.storage.set(e,n),e!=this.meta_key&&(this._addKey(e),this.$element.trigger("set-"+this.name,{key:e,value:t}),this.$element.trigger("set-"+this.name+"-"+e,{key:e,value:t})),t},get:function(e){var t=this.storage.get(e);if(typeof t=="undefined"||t==null||t=="")return t;try{return JSON.parse(t)}catch(n){return t}},clear:function(e){return this._removeKey(e),this.storage.clear(e)},clearAll:function(){var e=this;this.each(function(t,n){e.clear(t)})},keys:function(){return this.get(this.meta_key)||[]},each:function(e){var t=0,n=this.keys(),r;for(t;t<n.length;t++){r=e(n[t],this.get(n[t]));if(r===!1)return!1}},filter:function(e){var t=[];return this.each(function(n,r){return e(n,r)&&t.push([n,r]),!0}),t},first:function(e){var t=!1;return this.each(function(n,r){if(e(n,r))return t=[n,r],!1}),t},fetch:function(e,t){return this.exists(e)?this.get(e):this.set(e,t.apply(this))},load:function(t,n,r){var i=this;e.get(n,function(e){i.set(t,e),r&&r.apply(this,[e])})},_addKey:function(t){var n=this.keys();e.inArray(t,n)==-1&&n.push(t),this.set(this.meta_key,n)},_removeKey:function(t){var n=this.keys(),r=e.inArray(t,n);r!=-1&&n.splice(r,1),this.set(this.meta_key,n)}}),Sammy.Store.isAvailable=function(e){try{return Sammy.Store[Sammy.Store.stores[e]].prototype.isAvailable()}catch(t){return!1}},Sammy.Store.Memory=function(e,t){this.name=e,this.element=t,this.namespace=[this.element,this.name].join("."),Sammy.Store.Memory.store=Sammy.Store.Memory.store||{},Sammy.Store.Memory.store[this.namespace]=Sammy.Store.Memory.store[this.namespace]||{},this.store=Sammy.Store.Memory.store[this.namespace]},e.extend(Sammy.Store.Memory.prototype,{isAvailable:function(){return!0},exists:function(e){return typeof this.store[e]!="undefined"},set:function(e,t){return this.store[e]=t},get:function(e){return this.store[e]},clear:function(e){delete this.store[e]}}),Sammy.Store.Data=function(t,n){this.name=t,this.element=n,this.$element=e(n)},e.extend(Sammy.Store.Data.prototype,{isAvailable:function(){return!0},exists:function(e){return!!this.$element.data(this._key(e))},set:function(e,t){return this.$element.data(this._key(e),t)},get:function(e){return this.$element.data(this._key(e))},clear:function(e){this.$element.removeData(this._key(e))},_key:function(e){return["store",this.name,e].join(".")}}),Sammy.Store.LocalStorage=function(e,t){this.name=e,this.element=t},e.extend(Sammy.Store.LocalStorage.prototype,{isAvailable:function(){return"localStorage"in window&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.localStorage.setItem(this._key(e),t)},get:function(e){return window.localStorage.getItem(this._key(e))},clear:function(e){window.localStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),Sammy.Store.SessionStorage=function(e,t){this.name=e,this.element=t},e.extend(Sammy.Store.SessionStorage.prototype,{isAvailable:function(){return"sessionStorage"in window&&window.location.protocol!="file:"&&e.isFunction(window.sessionStorage.setItem)},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.sessionStorage.setItem(this._key(e),t)},get:function(e){var t=window.sessionStorage.getItem(this._key(e));return t&&typeof t.value!="undefined"&&(t=t.value),t},clear:function(e){window.sessionStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),Sammy.Store.Cookie=function(e,t,n){this.name=e,this.element=t,this.options=n||{},this.path=this.options.path||"/",this.expires_in=this.options.expires_in||1209600},e.extend(Sammy.Store.Cookie.prototype,{isAvailable:function(){return"cookie"in document&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return this._setCookie(e,t)},get:function(e){return this._getCookie(e)},clear:function(e){this._setCookie(e,"",-1)},_key:function(e){return["store",this.element,this.name,e].join(".")},_getCookie:function(e){var t=this._key(e).replace(/(\.|\*|\(|\)|\[|\])/g,"\\$1"),n=document.cookie.match("(^|;\\s)"+t+"=([^;]*)(;|$)");return n?n[2]:null},_setCookie:function(e,t,n){n||(n=this.expires_in*1e3);var r=new Date;r.setTime(r.getTime()+n);var i=[this._key(e),"=",t,"; expires=",r.toGMTString(),"; path=",this.path].join("");document.cookie=i}}),Sammy.Storage=function(t){this.use(Sammy.JSON),this.stores=this.stores||{},this.store=function(t,n){if(typeof this.stores[t]=="undefined"){var r="clear"+t.substr(0,1).toUpperCase()+t.substr(1);this.stores[t]=new Sammy.Store(e.extend({name:t,element:this.element_selector},n||{})),this[t]=function(n,r){return typeof r=="undefined"?this.stores[t].get(n):e.isFunction(r)?this.stores[t].fetch(n,r):this.stores[t].set(n,r)},this[r]=function(){return this.stores[t].clearAll()},this.helper(t,function(){return this.app[t].apply(this.app,arguments)}),this.helper(r,function(){return this.app[r]()})}return this.stores[t]},this.helpers({store:function(){return this.app.store.apply(this.app,arguments)}})},Sammy.Session=function(t,n){this.use(Sammy.Storage),this.store("session",e.extend({type:["local","cookie","memory"]},n))},Sammy.Cache=function(t,n){this.use(Sammy.Storage),this.cache_partials=!0,this.store("cache",e.extend({type:["local","session","memory"]},n))}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Storage=e(window.jQuery,window.Sammy)})(function(e,t){return t.Store=function(n){var r=this;this.options=n||{},this.name=this.options.name||"store",this.element=this.options.element||"body",this.$element=e(this.element),e.isArray(this.options.type)?e.each(this.options.type,function(e,n){if(t.Store.isAvailable(n))return r.type=n,!1}):this.type=this.options.type||"memory",this.meta_key=this.options.meta_key||"__keys__",this.storage=new t.Store[t.Store.stores[this.type]](this.name,this.element,this.options)},t.Store.stores={memory:"Memory",data:"Data",local:"LocalStorage",session:"SessionStorage",cookie:"Cookie"},e.extend(t.Store.prototype,{isAvailable:function(){return e.isFunction(this.storage.isAvailable)?this.storage.isAvailable():!0},exists:function(e){return this.storage.exists(e)},set:function(e,t){var n=typeof t=="string"?t:JSON.stringify(t);return e=e.toString(),this.storage.set(e,n),e!=this.meta_key&&(this._addKey(e),this.$element.trigger("set-"+this.name,{key:e,value:t}),this.$element.trigger("set-"+this.name+"-"+e,{key:e,value:t})),t},get:function(e){var t=this.storage.get(e);if(typeof t=="undefined"||t==null||t=="")return t;try{return JSON.parse(t)}catch(n){return t}},clear:function(e){return this._removeKey(e),this.storage.clear(e)},clearAll:function(){var e=this;this.each(function(t,n){e.clear(t)})},keys:function(){return this.get(this.meta_key)||[]},each:function(e){var t=0,n=this.keys(),r;for(t;t<n.length;t++){r=e(n[t],this.get(n[t]));if(r===!1)return!1}},filter:function(e){var t=[];return this.each(function(n,r){return e(n,r)&&t.push([n,r]),!0}),t},first:function(e){var t=!1;return this.each(function(n,r){if(e(n,r))return t=[n,r],!1}),t},fetch:function(e,t){return this.exists(e)?this.get(e):this.set(e,t.apply(this))},load:function(t,n,r){var i=this;e.get(n,function(e){i.set(t,e),r&&r.apply(this,[e])})},_addKey:function(t){var n=this.keys();e.inArray(t,n)==-1&&n.push(t),this.set(this.meta_key,n)},_removeKey:function(t){var n=this.keys(),r=e.inArray(t,n);r!=-1&&n.splice(r,1),this.set(this.meta_key,n)}}),t.Store.isAvailable=function(e){try{return t.Store[t.Store.stores[e]].prototype.isAvailable()}catch(n){return!1}},t.Store.Memory=function(e,n){this.name=e,this.element=n,this.namespace=[this.element,this.name].join("."),t.Store.Memory.store=t.Store.Memory.store||{},t.Store.Memory.store[this.namespace]=t.Store.Memory.store[this.namespace]||{},this.store=t.Store.Memory.store[this.namespace]},e.extend(t.Store.Memory.prototype,{isAvailable:function(){return!0},exists:function(e){return typeof this.store[e]!="undefined"},set:function(e,t){return this.store[e]=t},get:function(e){return this.store[e]},clear:function(e){delete this.store[e]}}),t.Store.Data=function(t,n){this.name=t,this.element=n,this.$element=e(n)},e.extend(t.Store.Data.prototype,{isAvailable:function(){return!0},exists:function(e){return!!this.$element.data(this._key(e))},set:function(e,t){return this.$element.data(this._key(e),t)},get:function(e){return this.$element.data(this._key(e))},clear:function(e){this.$element.removeData(this._key(e))},_key:function(e){return["store",this.name,e].join(".")}}),t.Store.LocalStorage=function(e,t){this.name=e,this.element=t},e.extend(t.Store.LocalStorage.prototype,{isAvailable:function(){return"localStorage"in window&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.localStorage.setItem(this._key(e),t)},get:function(e){return window.localStorage.getItem(this._key(e))},clear:function(e){window.localStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),t.Store.SessionStorage=function(e,t){this.name=e,this.element=t},e.extend(t.Store.SessionStorage.prototype,{isAvailable:function(){return"sessionStorage"in window&&window.location.protocol!="file:"&&e.isFunction(window.sessionStorage.setItem)},exists:function(e){return this.get(e)!=null},set:function(e,t){return window.sessionStorage.setItem(this._key(e),t)},get:function(e){var t=window.sessionStorage.getItem(this._key(e));return t&&typeof t.value!="undefined"&&(t=t.value),t},clear:function(e){window.sessionStorage.removeItem(this._key(e))},_key:function(e){return["store",this.element,this.name,e].join(".")}}),t.Store.Cookie=function(e,t,n){this.name=e,this.element=t,this.options=n||{},this.path=this.options.path||"/",this.expires_in=this.options.expires_in||1209600},e.extend(t.Store.Cookie.prototype,{isAvailable:function(){return"cookie"in document&&window.location.protocol!="file:"},exists:function(e){return this.get(e)!=null},set:function(e,t){return this._setCookie(e,t)},get:function(e){return this._getCookie(e)},clear:function(e){this._setCookie(e,"",-1)},_key:function(e){return["store",this.element,this.name,e].join(".")},_getCookie:function(e){var t=this._key(e).replace(/(\.|\*|\(|\)|\[|\])/g,"\\$1"),n=document.cookie.match("(^|;\\s)"+t+"=([^;]*)(;|$)");return n?n[2]:null},_setCookie:function(e,t,n){n||(n=this.expires_in*1e3);var r=new Date;r.setTime(r.getTime()+n);var i=[this._key(e),"=",t,"; expires=",r.toGMTString(),"; path=",this.path].join("");document.cookie=i}}),t.Storage=function(n){this.use(t.JSON),this.stores=this.stores||{},this.store=function(n,r){if(typeof this.stores[n]=="undefined"){var i="clear"+n.substr(0,1).toUpperCase()+n.substr(1);this.stores[n]=new t.Store(e.extend({name:n,element:this.element_selector},r||{})),this[n]=function(t,r){return typeof r=="undefined"?this.stores[n].get(t):e.isFunction(r)?this.stores[n].fetch(t,r):this.stores[n].set(t,r)},this[i]=function(){return this.stores[n].clearAll()},this.helper(n,function(){return this.app[n].apply(this.app,arguments)}),this.helper(i,function(){return this.app[i]()})}return this.stores[n]},this.helpers({store:function(){return this.app.store.apply(this.app,arguments)}})},t.Session=function(n,r){this.use(t.Storage),this.store("session",e.extend({type:["local","cookie","memory"]},r))},t.Cache=function(n,r){this.use(t.Storage),this.cache_partials=!0,this.store("cache",e.extend({type:["local","session","memory"]},r))},t.Storage});
5 lib/min/plugins/sammy.template-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.template.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){var t={},n=function(e,n,r,i){var s,o;if(t[e])s=t[e];else{if(typeof n=="undefined")return!1;i&&i.escape_html===!1?o='",$1,"':o='",h($1),"',s=t[e]=new Function("obj",'var ___$$$___=[],print=function(){___$$$___.push.apply(___$$$___,arguments);};with(obj){___$$$___.push("'+String(n).replace(/[\r\t\n]/g," ").replace(/\"/g,'\\"').split("<%").join(" ").replace(/((^|%>)[^\t]*)/g,"$1\r").replace(/\t=(.*?)%>/g,o).replace(/\t!(.*?)%>/g,'",$1,"').split(" ").join('");').split("%>").join('___$$$___.push("').split("\r").join("")+"\");}return ___$$$___.join('');")}return typeof r!="undefined"?s(r):s};Sammy=Sammy||{},Sammy.Template=function(t,r){var i=function(t,r,i,s){return typeof i=="undefined"&&(i=t),typeof s=="undefined"&&typeof i=="object"&&(s=i,i=t),n(i,t,e.extend({},this,r),s)};r||(r="template"),t.helper(r,i)}})(jQuery);
5 lib/min/plugins/sammy.template-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.template.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Template=e(window.jQuery,window.Sammy)})(function(e,t){var n={},r=function(e,t,r,i){var s,o;if(n[e])s=n[e];else{if(typeof t=="undefined")return!1;i&&i.escape_html===!1?o='",$1,"':o='",h($1),"',s=n[e]=new Function("obj",'var ___$$$___=[],print=function(){___$$$___.push.apply(___$$$___,arguments);};with(obj){___$$$___.push("'+String(t).replace(/[\r\t\n]/g," ").replace(/\"/g,'\\"').split("<%").join(" ").replace(/((^|%>)[^\t]*)/g,"$1\r").replace(/\t=(.*?)%>/g,o).replace(/\t!(.*?)%>/g,'",$1,"').split(" ").join('");').split("%>").join('___$$$___.push("').split("\r").join("")+"\");}return ___$$$___.join('');")}return typeof r!="undefined"?s(r):s};return t.Template=function(t,n){var i=function(t,n,i,s){return typeof i=="undefined"&&(i=t),typeof s=="undefined"&&typeof i=="object"&&(s=i,i=t),r(i,t,e.extend({},this,n),s)};n||(n="template"),t.helper(n,i)},t.Template});
6 lib/min/plugins/sammy.template-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.template.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){var t={},n=function(e,n,r,i){var s,o;if(t[e])s=t[e];else{if(typeof n=="undefined")return!1;i&&i.escape_html===!1?o='",$1,"':o='",h($1),"',s=t[e]=new Function("obj",'var ___$$$___=[],print=function(){___$$$___.push.apply(___$$$___,arguments);};with(obj){___$$$___.push("'+String(n).replace(/[\r\t\n]/g," ").replace(/\"/g,'\\"').split("<%").join(" ").replace(/((^|%>)[^\t]*)/g,"$1\r").replace(/\t=(.*?)%>/g,o).replace(/\t!(.*?)%>/g,'",$1,"').split(" ").join('");').split("%>").join('___$$$___.push("').split("\r").join("")+"\");}return ___$$$___.join('');")}return typeof r!="undefined"?s(r):s};Sammy=Sammy||{},Sammy.Template=function(t,r){var i=function(t,r,i,s){return typeof i=="undefined"&&(i=t),typeof s=="undefined"&&typeof i=="object"&&(s=i,i=t),n(i,t,e.extend({},this,r),s)};r||(r="template"),t.helper(r,i)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Template=e(window.jQuery,window.Sammy)})(function(e,t){var n={},r=function(e,t,r,i){var s,o;if(n[e])s=n[e];else{if(typeof t=="undefined")return!1;i&&i.escape_html===!1?o='",$1,"':o='",h($1),"',s=n[e]=new Function("obj",'var ___$$$___=[],print=function(){___$$$___.push.apply(___$$$___,arguments);};with(obj){___$$$___.push("'+String(t).replace(/[\r\t\n]/g," ").replace(/\"/g,'\\"').split("<%").join(" ").replace(/((^|%>)[^\t]*)/g,"$1\r").replace(/\t=(.*?)%>/g,o).replace(/\t!(.*?)%>/g,'",$1,"').split(" ").join('");').split("%>").join('___$$$___.push("').split("\r").join("")+"\");}return ___$$$___.join('');")}return typeof r!="undefined"?s(r):s};return t.Template=function(t,n){var i=function(t,n,i,s){return typeof i=="undefined"&&(i=t),typeof s=="undefined"&&typeof i=="object"&&(s=i,i=t),r(i,t,e.extend({},this,n),s)};n||(n="template"),t.helper(n,i)},t.Template});
5 lib/min/plugins/sammy.title-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.title.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){Sammy=Sammy||{},Sammy.Title=function(){this.setTitle=function(t){e.isFunction(t)?this.title_function=t:this.title_function=function(e){return[t,e].join(" ")}},this.helper("title",function(){var t=e.makeArray(arguments).join(" ");this.app.title_function&&(t=this.app.title_function(t)),document.title=t})}})(jQuery);
5 lib/min/plugins/sammy.title-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.title.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Title=e(window.jQuery,window.Sammy)})(function(e,t){return t.Title=function(){this.setTitle=function(t){e.isFunction(t)?this.title_function=t:this.title_function=function(e){return[t,e].join(" ")}},this.helper("title",function(){var t=e.makeArray(arguments).join(" ");this.app.title_function&&(t=this.app.title_function(t)),document.title=t})},t.Title});
6 lib/min/plugins/sammy.title-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.title.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){Sammy=Sammy||{},Sammy.Title=function(){this.setTitle=function(t){e.isFunction(t)?this.title_function=t:this.title_function=function(e){return[t,e].join(" ")}},this.helper("title",function(){var t=e.makeArray(arguments).join(" ");this.app.title_function&&(t=this.app.title_function(t)),document.title=t})}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy"],e):(window.Sammy=window.Sammy||{}).Title=e(window.jQuery,window.Sammy)})(function(e,t){return t.Title=function(){this.setTitle=function(t){e.isFunction(t)?this.title_function=t:this.title_function=function(e){return[t,e].join(" ")}},this.helper("title",function(){var t=e.makeArray(arguments).join(" ");this.app.title_function&&(t=this.app.title_function(t)),document.title=t})},t.Title});
5 lib/min/plugins/sammy.tmpl-0.7.2.min.js
View
@@ -1,5 +0,0 @@
-// -- Sammy.js -- /plugins/sammy.tmpl.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){Sammy=Sammy||{},Sammy.Tmpl=function(t,n){var r=function(t,n,r){var i=t;jQuery.template[i]||jQuery.template(i,t),n=e.extend({},this,n),r=e.extend({},n.partials,r);for(partial in r)jQuery.template[partial]||jQuery.template(partial,r[partial]);return jQuery.tmpl(i,jQuery.extend({},this,n))};n||(n="tmpl"),t.helper(n,r)}})(jQuery);
5 lib/min/plugins/sammy.tmpl-0.7.3.min.js
View
@@ -0,0 +1,5 @@
+// -- Sammy.js -- /plugins/sammy.tmpl.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","jquery.tmpl"],e):(window.Sammy=window.Sammy||{}).Tmpl=e(window.jQuery,window.Sammy)})(function(e,t){return t.Tmpl=function(t,n){var r=function(t,n,r){var i=t;e.template[i]||e.template(i,t),n=e.extend({},this,n),r=e.extend({},n.partials,r);for(partial in r)e.template[partial]||e.template(partial,r[partial]);return e.tmpl(i,e.extend({},this,n))};n||(n="tmpl"),t.helper(n,r)},t.Tmpl});
6 lib/min/plugins/sammy.tmpl-latest.min.js
View
@@ -1,5 +1,5 @@
// -- Sammy.js -- /plugins/sammy.tmpl.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:29 -0400
-(function(e){Sammy=Sammy||{},Sammy.Tmpl=function(t,n){var r=function(t,n,r){var i=t;jQuery.template[i]||jQuery.template(i,t),n=e.extend({},this,n),r=e.extend({},n.partials,r);for(partial in r)jQuery.template[partial]||jQuery.template(partial,r[partial]);return jQuery.tmpl(i,jQuery.extend({},this,n))};n||(n="tmpl"),t.helper(n,r)}})(jQuery);
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:08 -0500
+(function(e){typeof define=="function"&&define.amd?define(["jquery","sammy","jquery.tmpl"],e):(window.Sammy=window.Sammy||{}).Tmpl=e(window.jQuery,window.Sammy)})(function(e,t){return t.Tmpl=function(t,n){var r=function(t,n,r){var i=t;e.template[i]||e.template(i,t),n=e.extend({},this,n),r=e.extend({},n.partials,r);for(partial in r)e.template[partial]||e.template(partial,r[partial]);return e.tmpl(i,e.extend({},this,n))};n||(n="tmpl"),t.helper(n,r)},t.Tmpl});
8 lib/min/sammy-0.7.2.min.js
View
@@ -1,8 +0,0 @@
-// -- Sammy.js -- /sammy.js
-// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:30 -0400
-// name: sammy
-// version: 0.7.2
-// Sammy.js / http://sammyjs.org
-(function(e,t){(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):e.sammy=t.Sammy=n(e)})(function(e){var n,r="([^/]+)",i=/:([\w\d]+)/g,s=/\?([^#]*)?$/,o=function(e){return Array.prototype.slice.call(e)},u=function(e){return Object.prototype.toString.call(e)==="[object Function]"},a=function(e){return Object.prototype.toString.call(e)==="[object Array]"},f=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},l=function(e){return decodeURIComponent((e||"").replace(/\+/g," "))},c=encodeURIComponent,h=function(e){return String(e).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},p=function(e){return function(t,n){return this.route.apply(this,[e,t,n])}},d={},v=!!t.history&&!!history.pushState,m=[];return n=function(){var t=o(arguments),r,i;n.apps=n.apps||{};if(t.length===0||t[0]&&u(t[0]))return n.apply(n,["body"].concat(t));if(typeof (i=t.shift())=="string")return r=n.apps[i]||new n.Application,r.element_selector=i,t.length>0&&e.each(t,function(e,t){r.use(t)}),r.element_selector!=i&&delete n.apps[i],n.apps[r.element_selector]=r,r},n.VERSION="0.7.2",n.addLogger=function(e){m.push(e)},n.log=function(){var t=o(arguments);t.unshift("["+Date()+"]"),e.each(m,function(e,r){r.apply(n,t)})},typeof t.console!="undefined"?u(t.console.log.apply)?n.addLogger(function(){t.console.log.apply(t.console,arguments)}):n.addLogger(function(){t.console.log(arguments)}):typeof console!="undefined"&&n.addLogger(function(){console.log.apply(console,arguments)}),e.extend(n,{makeArray:o,isFunction:u,isArray:a}),n.Object=function(t){return e.extend(this,t||{})},e.extend(n.Object.prototype,{escapeHTML:h,h:h,toHash:function(){var t={};return e.each(this,function(e,n){u(n)||(t[e]=n)}),t},toHTML:function(){var t="";return e.each(this,function(e,n){u(n)||(t+="<strong>"+e+"</strong> "+n+"<br />")}),t},keys:function(e){var t=[];for(var n in this)(!u(this[n])||!e)&&t.push(n);return t},has:function(t){return this[t]&&e.trim(this[t].toString())!==""},join:function(){var e=o(arguments),t=e.shift();return e.join(t)},log:function(){n.log.apply(n,arguments)},toString:function(t){var n=[];return e.each(this,function(e,r){(!u(r)||t)&&n.push('"'+e+'": '+r.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),n.DefaultLocationProxy=function(e,t){this.app=e,this.is_native=!1,this.has_history=v,this._startPolling(t)},n.DefaultLocationProxy.fullPath=function(e){var t=e.toString().match(/^[^#]*(#.+)$/),n=t?t[1]:"";return[e.pathname,e.search,n].join("")},e.extend(n.DefaultLocationProxy.prototype,{bind:function(){var r=this,i=this.app,s=n.DefaultLocationProxy;e(t).bind("hashchange."+this.app.eventNamespace(),function(e,n){r.is_native===!1&&!n&&(r.is_native=!0,t.clearInterval(s._interval)),i.trigger("location-changed")}),v&&!i.disable_push_state&&(e(t).bind("popstate."+this.app.eventNamespace(),function(e){i.trigger("location-changed")}),e("a").live("click.history-"+this.app.eventNamespace(),function(e){if(e.isDefaultPrevented()||e.metaKey||e.ctrlKey)return;var n=s.fullPath(this);if(this.hostname==t.location.hostname&&i.lookupRoute("get",n)&&this.target!=="_blank")return e.preventDefault(),r.setLocation(n),!1})),s._bindings||(s._bindings=0),s._bindings++},unbind:function(){e(t).unbind("hashchange."+this.app.eventNamespace()),e(t).unbind("popstate."+this.app.eventNamespace()),e("a").die("click.history-"+this.app.eventNamespace()),n.DefaultLocationProxy._bindings--,n.DefaultLocationProxy._bindings<=0&&t.clearInterval(n.DefaultLocationProxy._interval)},getLocation:function(){return n.DefaultLocationProxy.fullPath(t.location)},setLocation:function(e){/^([^#\/]|$)/.test(e)&&(v&&!this.app.disable_push_state?e="/"+e:e="#!/"+e);if(e!=this.getLocation()){if(!(v&&!this.app.disable_push_state&&/^\//.test(e)))return t.location=e;history.pushState({path:e},t.title,e),this.app.trigger("location-changed")}},_startPolling:function(r){var i=this;if(!n.DefaultLocationProxy._interval){r||(r=10);var s=function(){var r=i.getLocation();(typeof n.DefaultLocationProxy._last_location=="undefined"||r!=n.DefaultLocationProxy._last_location)&&t.setTimeout(function(){e(t).trigger("hashchange",[!0])},0),n.DefaultLocationProxy._last_location=r};s(),n.DefaultLocationProxy._interval=t.setInterval(s,r)}}}),n.Application=function(e){var t=this;this.routes={},this.listeners=new n.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(Math.random()*1e3,10),this.context_prototype=function(){n.EventContext.apply(this,arguments)},this.context_prototype.prototype=new n.EventContext,u(e)&&e.apply(this,[this]),this._location_proxy||this.setLocationProxy(new n.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(e,n){t.log(t.toString(),e.cleaned_type,n||{})})},n.Application.prototype=e.extend({},n.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(t){return t?e(this.element_selector).find(t):e(this.element_selector)},use:function(){var e=o(arguments),t=e.shift(),r=t||"";try{e.unshift(this),typeof t=="string"&&(r="Sammy."+t,t=n[t]),t.apply(this,e)}catch(i){typeof t=="undefined"?this.error("Plugin Error: called use() but plugin ("+r.toString()+") is not defined",i):u(t)?this.error("Plugin Error",i):this.error("Plugin Error: called use() but '"+r.toString()+"' is not a function",i)}return this},setLocationProxy:function(e){var t=this._location_proxy;this._location_proxy=e,this.isRunning()&&(t&&t.unbind(),this._location_proxy.bind())},log:function(){n.log.apply(n,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(t,n,s){var o=this,a=[],f,l;!s&&u(n)&&(n=t,s=n,t="any"),t=t.toLowerCase();if(n.constructor==String){i.lastIndex=0;while((l=i.exec(n))!==null)a.push(l[1]);n=new RegExp(n.replace(i,r)+"$")}return typeof s=="string"&&(s=o[s]),f=function(e){var t={verb:e,path:n,callback:s,param_names:a};o.routes[e]=o.routes[e]||[],o.routes[e].push(t)},t==="any"?e.each(this.ROUTE_VERBS,function(e,t){f(t)}):f(t),this},get:p("get"),post:p("post"),put:p("put"),del:p("delete"),any:p("any"),mapRoutes:function(t){var n=this;return e.each(t,function(e,t){n.route.apply(n,t)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(e,t,n){var r=this;typeof n=="undefined"&&(n=t);var i=function(){var e,t,i;e=arguments[0],i=arguments[1],i&&i.context?(t=i.context,delete i.context):t=new r.context_prototype(r,"bind",e.type,i,e.target),e.cleaned_type=e.type.replace(r.eventNamespace(),""),n.apply(t,[e,i])};return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(i),this.isRunning()&&this._listen(e,i),this},trigger:function(e,t){return this.$element().trigger([e,this.eventNamespace()].join("."),[t]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(e,t){return u(e)&&(t=e,e={}),this.befores.push([e,t]),this},after:function(e){return this.bind("event-context-after",e)},around:function(e){return this.arounds.push(e),this},isRunning:function(){return this._running},helpers:function(t){return e.extend(this.context_prototype.prototype,t),this},helper:function(e,t){return this.context_prototype.prototype[e]=t,this},run:function(n){if(this.isRunning())return!1;var r=this;return e.each(this.listeners.toHash(),function(t,n){e.each(n,function(e,n){r._listen(t,n)})}),this.trigger("run",{start_url:n}),this._running=!0,this.last_location=null,!/\#(.+)/.test(this.getLocation())&&typeof n!="undefined"&&this.setLocation(n),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){r._checkLocation()}),this.bind("submit",function(t){var n=r._checkFormSubmission(e(t.target).closest("form"));return n===!1?t.preventDefault():!1}),e(t).bind("unload",function(){r.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var t=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(t.eventNamespace()),e.each(this.listeners.toHash(),function(n,r){e.each(r,function(e,r){t._unlisten(n,r)})}),this._running=!1,this},destroy:function(){return this.unload(),delete n.apps[this.element_selector],this},bindToAllEvents:function(t){var n=this;return e.each(this.APP_EVENTS,function(e,r){n.bind(r,t)}),e.each(this.listeners.keys(!0),function(r,i){e.inArray(i,n.APP_EVENTS)==-1&&n.bind(i,t)}),this},routablePath:function(e){return e.replace(s,"")},lookupRoute:function(e,t){var n=this,r=!1,i=0,s,o;if(typeof this.routes[e]!="undefined"){s=this.routes[e].length;for(;i<s;i++){o=this.routes[e][i];if(n.routablePath(t).match(o.path)){r=o;break}}}return r},runRoute:function(t,n,r,i){var s=this,o=this.lookupRoute(t,n),u,a,f,c,h,p,d,v,m;this.log("runRoute",[t,n].join(" ")),this.trigger("run-route",{verb:t,path:n,params:r}),typeof r=="undefined"&&(r={}),e.extend(r,this._parseQueryString(n));if(o){this.trigger("route-found",{route:o}),(v=o.path.exec(this.routablePath(n)))!==null&&(v.shift(),e.each(v,function(e,t){o.param_names[e]?r[o.param_names[e]]=l(t):(r.splat||(r.splat=[]),r.splat.push(l(t)))})),u=new this.context_prototype(this,t,n,r,i),f=this.arounds.slice(0),h=this.befores.slice(0),d=[u].concat(r.splat),a=function(){var e;while(h.length>0){p=h.shift();if(s.contextMatchesOptions(u,p[0])){e=p[1].apply(u,[u]);if(e===!1)return!1}}return s.last_route=o,u.trigger("event-context-before",{context:u}),e=o.callback.apply(u,d),u.trigger("event-context-after",{context:u}),e},e.each(f.reverse(),function(e,t){var n=a;a=function(){return t.apply(u,[n])}});try{m=a()}catch(g){this.error(["500 Error",t,n].join(" "),g)}return m}return this.notFound(t,n)},contextMatchesOptions:function(t,n,r){var i=n;if(typeof i=="string"||f(i))i={path:i};typeof r=="undefined"&&(r=!0);if(e.isEmptyObject(i))return!0;if(a(i.path)){var s,o,u,l;s=[];for(o=0,l=i.path.length;o<l;o+=1)u=e.extend({},i,{path:i.path[o]}),s.push(this.contextMatchesOptions(t,u));var c=e.inArray(!0,s)>-1?!0:!1;return r?c:!c}if(i.only)return this.contextMatchesOptions(t,i.only,!0);if(i.except)return this.contextMatchesOptions(t,i.except,!1);var h=!0,p=!0;return i.path&&(f(i.path)||(i.path=new RegExp(i.path.toString()+"$")),h=i.path.test(t.path)),i.verb&&(typeof i.verb=="string"?p=i.verb===t.verb:p=i.verb.indexOf(t.verb)>-1),r?p&&h:!p||!h},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(e){return this._location_proxy.setLocation(e)},swap:function(e,t){var n=this.$element().html(e);return u(t)&&t(e),n},templateCache:function(e,t){return typeof t!="undefined"?d[e]=t:d[e]},clearTemplateCache:function(){return d={}},notFound:function(e,t){var n=this.error(["404 Not Found",e,t].join(" "));return e==="get"?n:!0},error:function(e,t){t||(t=new Error),t.message=[e,t.message].join(" "),this.trigger("error",{message:t.message,error:t});if(this.raise_errors)throw t;this.log(t.message,t)},_checkLocation:function(){var e,t;e=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=e)this.last_location=["get",e],t=this.runRoute("get",e);return t},_getFormVerb:function(t){var n=e(t),r,i;i=n.find('input[name="_method"]'),i.length>0&&(r=i.val()),r||(r=n[0].getAttribute("method"));if(!r||r==="")r="get";return e.trim(r.toString().toLowerCase())},_checkFormSubmission:function(t){var n,r,i,s,o;return this.trigger("check-form-submission",{form:t}),n=e(t),r=n.attr("action")||"",i=this._getFormVerb(n),this.log("_checkFormSubmission",n,r,i),i==="get"?(s=this._serializeFormParams(n),s!==""&&(r+="?"+s),this.setLocation(r),o=!1):(s=e.extend({},this._parseFormParams(n)),o=this.runRoute(i,r,s,t.get(0))),typeof o=="undefined"?!1:o},_serializeFormParams:function(e){var t="",n=e.serializeArray(),r;if(n.length>0){t=this._encodeFormPair(n[0].name,n[0].value);for(r=1;r<n.length;r++)t=t+"&"+this._encodeFormPair(n[r].name,n[r].value)}return t},_encodeFormPair:function(e,t){return c(e)+"="+c(t)},_parseFormParams:function(e){var t={},n=e.serializeArray(),r;for(r=0;r<n.length;r++)t=this._parseParamPair(t,n[r].name,n[r].value);return t},_parseQueryString:function(e){var t={},n,r,i,o;n=e.match(s);if(n&&n[1]){r=n[1].split("&");for(o=0;o<r.length;o++)i=r[o].split("="),t=this._parseParamPair(t,l(i[0]),l(i[1]||""))}return t},_parseParamPair:function(e,t,n){return typeof e[t]!="undefined"?a(e[t])?e[t].push(n):e[t]=[e[t],n]:e[t]=n,e},_listen:function(e,t){return this.$element().bind([e,this.eventNamespace()].join("."),t)},_unlisten:function(e,t){return this.$element().unbind([e,this.eventNamespace()].join("."),t)}}),n.RenderContext=function(e){this.event_context=e,this.callbacks=[],this.previous_content=null,this.content=null,this.next_engine=!1,this.waiting=!1},n.RenderContext.prototype=e.extend({},n.Object.prototype,{then:function(e){if(!u(e)){if(!(typeof e=="string"&&e in this.event_context))return this;var n=this.event_context[e];e=function(e){return n.apply(this.event_context,[e])}}var r=this;return this.waiting?this.callbacks.push(e):(this.wait(),t.setTimeout(function(){var t=e.apply(r,[r.content,r.previous_content]);t!==!1&&r.next(t)},0)),this},wait:function(){this.waiting=!0},next:function(e){this.waiting=!1,typeof e!="undefined"&&(this.previous_content=this.content,this.content=e),this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(t,n,r){var i=this;return this.then(function(){var s,o,a,f;u(n)?(r=n,n={}):n=e.extend({},n),r&&this.then(r);if(typeof t=="string")return a=t.match(/\.json$/)||n.json,s=a?n.cache===!0:n.cache!==!1,i.next_engine=i.event_context.engineFor(t),delete n.cache,delete n.json,n.engine&&(i.next_engine=n.engine,delete n.engine),s&&(o=this.event_context.app.templateCache(t))?o:(this.wait(),e.ajax(e.extend({url:t,data:{},dataType:a?"json":"text",type:"get",success:function(e){s&&i.event_context.app.templateCache(t,e),i.next(e)}},n)),!1);if(t.nodeType)return t.innerHTML;if(t.selector)return i.next_engine=t.attr("data-engine"),n.clone===!1?t.remove()[0].innerHTML.toString():t[0].innerHTML.toString()})},loadPartials:function(e){var t;if(e){this.partials=this.partials||{};for(t in e)(function(t,n){t.load(e[n]).then(function(e){this.partials[n]=e})})(this,t)}return this},render:function(e,t,n,r){return u(e)&&!t?this.then(e):(u(t)?(r=n,n=t,t=null):n&&!u(n)&&(r=n,n=null),this.loadPartials(r).load(e).interpolate(t,e).then(n))},partial:function(e,t,n,r){return u(n)?this.render(e,t,r).swap(n):u(t)?this.render(e,{},n).swap(t):this.render(e,t,n).swap()},send:function(){var e=this,t=o(arguments),n=t.shift();return a(t[0])&&(t=t[0]),this.then(function(r){return t.push(function(t){e.next(t)}),e.wait(),n.apply(n,t),!1})},collect:function(t,n,r){var i=this,s=function(){u(t)&&(n=t,t=this.content);var r=[],s=!1;return e.each(t,function(e,t){var o=n.apply(i,[e,t]);return o.jquery&&o.length==1&&(o=o[0],s=!0),r.push(o),o}),s?r:r.join("")};return r?s():this.then(s)},renderEach:function(t,n,r,i){return a(n)&&(i=r,r=n,n=null),this.load(t).then(function(s){var o=this;r||(r=a(this.previous_content)?this.previous_content:[]);if(!i)return this.collect(r,function(e,r){var i={},o=this.next_engine||t;return n?i[n]=r:i=r,this.event_context.interpolate(s,i,o)},!0);e.each(r,function(e,r){var u={},a=this.next_engine||t;n?u[n]=r:u=r,i(r,o.event_context.interpolate(s,u,a))})})},interpolate:function(e,t,n){var r=this;return this.then(function(i,s){!e&&s&&(e=s),this.next_engine&&(t=this.next_engine,this.next_engine=!1);var o=r.event_context.interpolate(i,e,t,this.partials);return n?s+o:o})},swap:function(e){return this.then(function(t){return this.event_context.swap(t,e),t}).trigger("changed",{})},appendTo:function(t){return this.then(function(n){e(t).append(n)}).trigger("changed",{})},prependTo:function(t){return this.then(function(n){e(t).prepend(n)}).trigger("changed",{})},replace:function(t){return this.then(function(n){e(t).html(n)}).trigger("changed",{})},trigger:function(e,t){return this.then(function(n){return typeof t=="undefined"&&(t={content:n}),this.event_context.trigger(e,t),n})}}),n.EventContext=function(e,t,r,i,s){this.app=e,this.verb=t,this.path=r,this.params=new n.Object(i),this.target=s},n.EventContext.prototype=e.extend({},n.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(e){var t=this,n;if(u(e))return e;e=(e||t.app.template_engine).toString();if(n=e.match(/\.([^\.\?\#]+)$/))e=n[1];return e&&u(t[e])?t[e]:t.app.template_engine?this.engineFor(t.app.template_engine):function(e,t){return e}},interpolate:function(e,t,n,r){return this.engineFor(n).apply(this,[e,t,r])},render:function(e,t,r,i){return(new n.RenderContext(this)).render(e,t,r,i)},renderEach:function(e,t,r,i){return(new n.RenderContext(this)).renderEach(e,t,r,i)},load:function(e,t,r){return(new n.RenderContext(this)).load(e,t,r)},loadPartials:function(e){return(new n.RenderContext(this)).loadPartials(e)},partial:function(e,t,r,i){return(new n.RenderContext(this)).partial(e,t,r,i)},send:function(){var e=new n.RenderContext(this);return e.send.apply(e,arguments)},redirect:function(){var t,n=o(arguments),r=this.app.getLocation(),i=n.length;if(i>1){var s=0,u=[],a=[],f={},l=!1;for(;s<i;s++)typeof n[s]=="string"?u.push(n[s]):(e.extend(f,n[s]),l=!0);t=u.join("/");if(l){for(var c in f)a.push(this.app._encodeFormPair(c,f[c]));t+="?"+a.join("&")}}else t=n[0];this.trigger("redirect",{to:t}),this.app.last_location=[this.verb,this.path],this.app.setLocation(t),(new RegExp(t)).test(r)&&this.app.trigger("location-changed")},trigger:function(e,t){return typeof t=="undefined"&&(t={}),t.context||(t.context=this),this.app.trigger(e,t)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(e,t){return this.app.swap(e,t)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(t){return e.parseJSON(t)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),n})})(jQuery,window);
8 lib/min/sammy-0.7.3.min.js
View
@@ -0,0 +1,8 @@
+// -- Sammy.js -- /sammy.js
+// http://sammyjs.org
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:09 -0500
+// name: sammy
+// version: 0.7.3
+// Sammy.js / http://sammyjs.org
+(function(e,t){(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):e.sammy=t.Sammy=n(e)})(function(e){var n,r="([^/]+)",i=/:([\w\d]+)/g,s=/\?([^#]*)?$/,o=function(e){return Array.prototype.slice.call(e)},u=function(e){return Object.prototype.toString.call(e)==="[object Function]"},a=function(e){return Object.prototype.toString.call(e)==="[object Array]"},f=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},l=function(e){return decodeURIComponent((e||"").replace(/\+/g," "))},c=encodeURIComponent,h=function(e){return String(e).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},p=function(e){return function(){return this.route.apply(this,[e].concat(Array.prototype.slice.call(arguments)))}},d={},v=!!t.history&&!!history.pushState,m=[];return n=function(){var t=o(arguments),r,i;n.apps=n.apps||{};if(t.length===0||t[0]&&u(t[0]))return n.apply(n,["body"].concat(t));if(typeof (i=t.shift())=="string")return r=n.apps[i]||new n.Application,r.element_selector=i,t.length>0&&e.each(t,function(e,t){r.use(t)}),r.element_selector!=i&&delete n.apps[i],n.apps[r.element_selector]=r,r},n.VERSION="0.7.3",n.addLogger=function(e){m.push(e)},n.log=function(){var t=o(arguments);t.unshift("["+Date()+"]"),e.each(m,function(e,r){r.apply(n,t)})},typeof t.console!="undefined"?u(t.console.log.apply)?n.addLogger(function(){t.console.log.apply(t.console,arguments)}):n.addLogger(function(){t.console.log(arguments)}):typeof console!="undefined"&&n.addLogger(function(){console.log.apply(console,arguments)}),e.extend(n,{makeArray:o,isFunction:u,isArray:a}),n.Object=function(t){return e.extend(this,t||{})},e.extend(n.Object.prototype,{escapeHTML:h,h:h,toHash:function(){var t={};return e.each(this,function(e,n){u(n)||(t[e]=n)}),t},toHTML:function(){var t="";return e.each(this,function(e,n){u(n)||(t+="<strong>"+e+"</strong> "+n+"<br />")}),t},keys:function(e){var t=[];for(var n in this)(!u(this[n])||!e)&&t.push(n);return t},has:function(t){return this[t]&&e.trim(this[t].toString())!==""},join:function(){var e=o(arguments),t=e.shift();return e.join(t)},log:function(){n.log.apply(n,arguments)},toString:function(t){var n=[];return e.each(this,function(e,r){(!u(r)||t)&&n.push('"'+e+'": '+r.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),n.targetIsThisWindow=function(r){var i=e(r.target).attr("target");return i==="_blank"?!1:i===null||i===t.name||i==="_self"?!0:i==="top"&&t===t.top?!0:!1},n.DefaultLocationProxy=function(e,t){this.app=e,this.is_native=!1,this.has_history=v,this._startPolling(t)},n.DefaultLocationProxy.fullPath=function(e){var t=e.toString().match(/^[^#]*(#.+)$/),n=t?t[1]:"";return[e.pathname,e.search,n].join("")},e.extend(n.DefaultLocationProxy.prototype,{bind:function(){var r=this,i=this.app,s=n.DefaultLocationProxy;e(t).bind("hashchange."+this.app.eventNamespace(),function(e,n){r.is_native===!1&&!n&&(r.is_native=!0,t.clearInterval(s._interval),s._interval=null),i.trigger("location-changed")}),v&&!i.disable_push_state&&(e(t).bind("popstate."+this.app.eventNamespace(),function(e){i.trigger("location-changed")}),e(document).delegate("a","click.history-"+this.app.eventNamespace(),function(e){if(e.isDefaultPrevented()||e.metaKey||e.ctrlKey)return;var o=s.fullPath(this);if(this.hostname==t.location.hostname&&i.lookupRoute("get",o)&&n.targetIsThisWindow(e))return e.preventDefault(),r.setLocation(o),!1})),s._bindings||(s._bindings=0),s._bindings++},unbind:function(){e(t).unbind("hashchange."+this.app.eventNamespace()),e(t).unbind("popstate."+this.app.eventNamespace()),e(document).undelegate("a","click.history-"+this.app.eventNamespace()),n.DefaultLocationProxy._bindings--,n.DefaultLocationProxy._bindings<=0&&(t.clearInterval(n.DefaultLocationProxy._interval),n.DefaultLocationProxy._interval=null)},getLocation:function(){return n.DefaultLocationProxy.fullPath(t.location)},setLocation:function(e){/^([^#\/]|$)/.test(e)&&(v&&!this.app.disable_push_state?e="/"+e:e="#!/"+e);if(e!=this.getLocation()){if(!(v&&!this.app.disable_push_state&&/^\//.test(e)))return t.location=e;history.pushState({path:e},t.title,e),this.app.trigger("location-changed")}},_startPolling:function(r){var i=this;if(!n.DefaultLocationProxy._interval){r||(r=10);var s=function(){var r=i.getLocation();(typeof n.DefaultLocationProxy._last_location=="undefined"||r!=n.DefaultLocationProxy._last_location)&&t.setTimeout(function(){e(t).trigger("hashchange",[!0])},0),n.DefaultLocationProxy._last_location=r};s(),n.DefaultLocationProxy._interval=t.setInterval(s,r)}}}),n.Application=function(e){var t=this;this.routes={},this.listeners=new n.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(Math.random()*1e3,10),this.context_prototype=function(){n.EventContext.apply(this,arguments)},this.context_prototype.prototype=new n.EventContext,u(e)&&e.apply(this,[this]),this._location_proxy||this.setLocationProxy(new n.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(e,n){t.log(t.toString(),e.cleaned_type,n||{})})},n.Application.prototype=e.extend({},n.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(t){return t?e(this.element_selector).find(t):e(this.element_selector)},use:function(){var e=o(arguments),t=e.shift(),r=t||"";try{e.unshift(this),typeof t=="string"&&(r="Sammy."+t,t=n[t]),t.apply(this,e)}catch(i){typeof t=="undefined"?this.error("Plugin Error: called use() but plugin ("+r.toString()+") is not defined",i):u(t)?this.error("Plugin Error",i):this.error("Plugin Error: called use() but '"+r.toString()+"' is not a function",i)}return this},setLocationProxy:function(e){var t=this._location_proxy;this._location_proxy=e,this.isRunning()&&(t&&t.unbind(),this._location_proxy.bind())},log:function(){n.log.apply(n,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(t,n){var s=this,o=[],a,f,l=Array.prototype.slice.call(arguments,2);l.length===0&&u(n)&&(n=t,l=[n],t="any"),t=t.toLowerCase();if(n.constructor==String){i.lastIndex=0;while((f=i.exec(n))!==null)o.push(f[1]);n=new RegExp(n.replace(i,r)+"$")}return e.each(l,function(e,t){typeof t=="string"&&(l[e]=s[t])}),a=function(e){var t={verb:e,path:n,callback:l,param_names:o};s.routes[e]=s.routes[e]||[],s.routes[e].push(t)},t==="any"?e.each(this.ROUTE_VERBS,function(e,t){a(t)}):a(t),this},get:p("get"),post:p("post"),put:p("put"),del:p("delete"),any:p("any"),mapRoutes:function(t){var n=this;return e.each(t,function(e,t){n.route.apply(n,t)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(e,t,n){var r=this;typeof n=="undefined"&&(n=t);var i=function(){var e,t,i;e=arguments[0],i=arguments[1],i&&i.context?(t=i.context,delete i.context):t=new r.context_prototype(r,"bind",e.type,i,e.target),e.cleaned_type=e.type.replace(r.eventNamespace(),""),n.apply(t,[e,i])};return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(i),this.isRunning()&&this._listen(e,i),this},trigger:function(e,t){return this.$element().trigger([e,this.eventNamespace()].join("."),[t]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(e,t){return u(e)&&(t=e,e={}),this.befores.push([e,t]),this},after:function(e){return this.bind("event-context-after",e)},around:function(e){return this.arounds.push(e),this},onComplete:function(e){return this._onComplete=e,this},isRunning:function(){return this._running},helpers:function(t){return e.extend(this.context_prototype.prototype,t),this},helper:function(e,t){return this.context_prototype.prototype[e]=t,this},run:function(r){if(this.isRunning())return!1;var i=this;return e.each(this.listeners.toHash(),function(t,n){e.each(n,function(e,n){i._listen(t,n)})}),this.trigger("run",{start_url:r}),this._running=!0,this.last_location=null,!/\#(.+)/.test(this.getLocation())&&typeof r!="undefined"&&this.setLocation(r),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){i._checkLocation()}),this.bind("submit",function(t){if(!n.targetIsThisWindow(t))return!0;var r=i._checkFormSubmission(e(t.target).closest("form"));return r===!1?t.preventDefault():!1}),e(t).bind("unload",function(){i.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var t=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(t.eventNamespace()),e.each(this.listeners.toHash(),function(n,r){e.each(r,function(e,r){t._unlisten(n,r)})}),this._running=!1,this},destroy:function(){return this.unload(),delete n.apps[this.element_selector],this},bindToAllEvents:function(t){var n=this;return e.each(this.APP_EVENTS,function(e,r){n.bind(r,t)}),e.each(this.listeners.keys(!0),function(r,i){e.inArray(i,n.APP_EVENTS)==-1&&n.bind(i,t)}),this},routablePath:function(e){return e.replace(s,"")},lookupRoute:function(e,t){var n=this,r=!1,i=0,s,o;if(typeof this.routes[e]!="undefined"){s=this.routes[e].length;for(;i<s;i++){o=this.routes[e][i];if(n.routablePath(t).match(o.path)){r=o;break}}}return r},runRoute:function(t,n,r,i){var s=this,o=this.lookupRoute(t,n),u,a,f,c,h,p,d,v,m;this.debug&&this.log("runRoute",[t,n].join(" ")),this.trigger("run-route",{verb:t,path:n,params:r}),typeof r=="undefined"&&(r={}),e.extend(r,this._parseQueryString(n));if(o){this.trigger("route-found",{route:o}),(v=o.path.exec(this.routablePath(n)))!==null&&(v.shift(),e.each(v,function(e,t){o.param_names[e]?r[o.param_names[e]]=l(t):(r.splat||(r.splat=[]),r.splat.push(l(t)))})),u=new this.context_prototype(this,t,n,r,i),f=this.arounds.slice(0),h=this.befores.slice(0),d=[u],r.splat&&(d=d.concat(r.splat)),a=function(){var e,t,n;while(h.length>0){p=h.shift();if(s.contextMatchesOptions(u,p[0])){e=p[1].apply(u,[u]);if(e===!1)return!1}}return s.last_route=o,u.trigger("event-context-before",{context:u}),typeof o.callback=="function"&&(o.callback=[o.callback]),o.callback&&o.callback.length&&(t=-1,n=function(){t++,o.callback[t]?e=o.callback[t].apply(u,d):s._onComplete&&typeof (s._onComplete==="function")&&s._onComplete(u)},d.push(n),n()),u.trigger("event-context-after",{context:u}),e},e.each(f.reverse(),function(e,t){var n=a;a=function(){return t.apply(u,[n])}});try{m=a()}catch(g){this.error(["500 Error",t,n].join(" "),g)}return m}return this.notFound(t,n)},contextMatchesOptions:function(t,n,r){var i=n;if(typeof i=="string"||f(i))i={path:i};typeof r=="undefined"&&(r=!0);if(e.isEmptyObject(i))return!0;if(a(i.path)){var s,o,u,l;s=[];for(o=0,l=i.path.length;o<l;o+=1)u=e.extend({},i,{path:i.path[o]}),s.push(this.contextMatchesOptions(t,u));var c=e.inArray(!0,s)>-1?!0:!1;return r?c:!c}if(i.only)return this.contextMatchesOptions(t,i.only,!0);if(i.except)return this.contextMatchesOptions(t,i.except,!1);var h=!0,p=!0;return i.path&&(f(i.path)||(i.path=new RegExp(i.path.toString()+"$")),h=i.path.test(t.path)),i.verb&&(typeof i.verb=="string"?p=i.verb===t.verb:p=i.verb.indexOf(t.verb)>-1),r?p&&h:!p||!h},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(e){return this._location_proxy.setLocation(e)},swap:function(e,t){var n=this.$element().html(e);return u(t)&&t(e),n},templateCache:function(e,t){return typeof t!="undefined"?d[e]=t:d[e]},clearTemplateCache:function(){return d={}},notFound:function(e,t){var n=this.error(["404 Not Found",e,t].join(" "));return e==="get"?n:!0},error:function(e,t){t||(t=new Error),t.message=[e,t.message].join(" "),this.trigger("error",{message:t.message,error:t});if(this.raise_errors)throw t;this.log(t.message,t)},_checkLocation:function(){var e,t;e=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=e)this.last_location=["get",e],t=this.runRoute("get",e);return t},_getFormVerb:function(t){var n=e(t),r,i;i=n.find('input[name="_method"]'),i.length>0&&(r=i.val()),r||(r=n[0].getAttribute("method"));if(!r||r==="")r="get";return e.trim(r.toString().toLowerCase())},_checkFormSubmission:function(t){var n,r,i,s,o;return this.trigger("check-form-submission",{form:t}),n=e(t),r=n.attr("action")||"",i=this._getFormVerb(n),this.debug&&this.log("_checkFormSubmission",n,r,i),i==="get"?(s=this._serializeFormParams(n),s!==""&&(r+="?"+s),this.setLocation(r),o=!1):(s=e.extend({},this._parseFormParams(n)),o=this.runRoute(i,r,s,t.get(0))),typeof o=="undefined"?!1:o},_serializeFormParams:function(e){var t="",n=e.serializeArray(),r;if(n.length>0){t=this._encodeFormPair(n[0].name,n[0].value);for(r=1;r<n.length;r++)t=t+"&"+this._encodeFormPair(n[r].name,n[r].value)}return t},_encodeFormPair:function(e,t){return c(e)+"="+c(t)},_parseFormParams:function(e){var t={},n=e.serializeArray(),r;for(r=0;r<n.length;r++)t=this._parseParamPair(t,n[r].name,n[r].value);return t},_parseQueryString:function(e){var t={},n,r,i,o;n=e.match(s);if(n&&n[1]){r=n[1].split("&");for(o=0;o<r.length;o++)i=r[o].split("="),t=this._parseParamPair(t,l(i[0]),l(i[1]||""))}return t},_parseParamPair:function(e,t,n){return typeof e[t]!="undefined"?a(e[t])?e[t].push(n):e[t]=[e[t],n]:e[t]=n,e},_listen:function(e,t){return this.$element().bind([e,this.eventNamespace()].join("."),t)},_unlisten:function(e,t){return this.$element().unbind([e,this.eventNamespace()].join("."),t)}}),n.RenderContext=function(e){this.event_context=e,this.callbacks=[],this.previous_content=null,this.content=null,this.next_engine=!1,this.waiting=!1},n.RenderContext.prototype=e.extend({},n.Object.prototype,{then:function(e){if(!u(e)){if(!(typeof e=="string"&&e in this.event_context))return this;var n=this.event_context[e];e=function(e){return n.apply(this.event_context,[e])}}var r=this;return this.waiting?this.callbacks.push(e):(this.wait(),t.setTimeout(function(){var t=e.apply(r,[r.content,r.previous_content]);t!==!1&&r.next(t)},0)),this},wait:function(){this.waiting=!0},next:function(e){this.waiting=!1,typeof e!="undefined"&&(this.previous_content=this.content,this.content=e),this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(t,n,r){var i=this;return this.then(function(){var s,o,a,f;u(n)?(r=n,n={}):n=e.extend({},n),r&&this.then(r);if(typeof t=="string")return a=t.match(/\.json$/)||n.json,s=a?n.cache===!0:n.cache!==!1,i.next_engine=i.event_context.engineFor(t),delete n.cache,delete n.json,n.engine&&(i.next_engine=n.engine,delete n.engine),s&&(o=this.event_context.app.templateCache(t))?o:(this.wait(),e.ajax(e.extend({url:t,data:{},dataType:a?"json":"text",type:"get",success:function(e){s&&i.event_context.app.templateCache(t,e),i.next(e)}},n)),!1);if(t.nodeType)return t.innerHTML;if(t.selector)return i.next_engine=t.attr("data-engine"),n.clone===!1?t.remove()[0].innerHTML.toString():t[0].innerHTML.toString()})},loadPartials:function(e){var t;if(e){this.partials=this.partials||{};for(t in e)(function(t,n){t.load(e[n]).then(function(e){this.partials[n]=e})})(this,t)}return this},render:function(e,t,n,r){return u(e)&&!t?this.then(e):(u(t)?(r=n,n=t,t=null):n&&!u(n)&&(r=n,n=null),this.loadPartials(r).load(e).interpolate(t,e).then(n))},partial:function(e,t,n,r){return u(n)?this.render(e,t,r).swap(n):u(t)?this.render(e,{},n).swap(t):this.render(e,t,n).swap()},send:function(){var e=this,t=o(arguments),n=t.shift();return a(t[0])&&(t=t[0]),this.then(function(r){return t.push(function(t){e.next(t)}),e.wait(),n.apply(n,t),!1})},collect:function(t,n,r){var i=this,s=function(){u(t)&&(n=t,t=this.content);var r=[],s=!1;return e.each(t,function(e,t){var o=n.apply(i,[e,t]);return o.jquery&&o.length==1&&(o=o[0],s=!0),r.push(o),o}),s?r:r.join("")};return r?s():this.then(s)},renderEach:function(t,n,r,i){return a(n)&&(i=r,r=n,n=null),this.load(t).then(function(s){var o=this;r||(r=a(this.previous_content)?this.previous_content:[]);if(!i)return this.collect(r,function(e,r){var i={},o=this.next_engine||t;return n?i[n]=r:i=r,this.event_context.interpolate(s,i,o)},!0);e.each(r,function(e,r){var u={},a=this.next_engine||t;n?u[n]=r:u=r,i(r,o.event_context.interpolate(s,u,a))})})},interpolate:function(e,t,n){var r=this;return this.then(function(i,s){!e&&s&&(e=s),this.next_engine&&(t=this.next_engine,this.next_engine=!1);var o=r.event_context.interpolate(i,e,t,this.partials);return n?s+o:o})},swap:function(e){return this.then(function(t){return this.event_context.swap(t,e),t}).trigger("changed",{})},appendTo:function(t){return this.then(function(n){e(t).append(n)}).trigger("changed",{})},prependTo:function(t){return this.then(function(n){e(t).prepend(n)}).trigger("changed",{})},replace:function(t){return this.then(function(n){e(t).html(n)}).trigger("changed",{})},trigger:function(e,t){return this.then(function(n){return typeof t=="undefined"&&(t={content:n}),this.event_context.trigger(e,t),n})}}),n.EventContext=function(e,t,r,i,s){this.app=e,this.verb=t,this.path=r,this.params=new n.Object(i),this.target=s},n.EventContext.prototype=e.extend({},n.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(e){var t=this,n;if(u(e))return e;e=(e||t.app.template_engine).toString();if(n=e.match(/\.([^\.\?\#]+)$/))e=n[1];return e&&u(t[e])?t[e]:t.app.template_engine?this.engineFor(t.app.template_engine):function(e,t){return e}},interpolate:function(e,t,n,r){return this.engineFor(n).apply(this,[e,t,r])},render:function(e,t,r,i){return(new n.RenderContext(this)).render(e,t,r,i)},renderEach:function(e,t,r,i){return(new n.RenderContext(this)).renderEach(e,t,r,i)},load:function(e,t,r){return(new n.RenderContext(this)).load(e,t,r)},loadPartials:function(e){return(new n.RenderContext(this)).loadPartials(e)},partial:function(e,t,r,i){return(new n.RenderContext(this)).partial(e,t,r,i)},send:function(){var e=new n.RenderContext(this);return e.send.apply(e,arguments)},redirect:function(){var t,n=o(arguments),r=this.app.getLocation(),i=n.length;if(i>1){var s=0,u=[],a=[],f={},l=!1;for(;s<i;s++)typeof n[s]=="string"?u.push(n[s]):(e.extend(f,n[s]),l=!0);t=u.join("/");if(l){for(var c in f)a.push(this.app._encodeFormPair(c,f[c]));t+="?"+a.join("&")}}else t=n[0];this.trigger("redirect",{to:t}),this.app.last_location=[this.verb,this.path],this.app.setLocation(t),(new RegExp(t)).test(r)&&this.app.trigger("location-changed")},trigger:function(e,t){return typeof t=="undefined"&&(t={}),t.context||(t.context=this),this.app.trigger(e,t)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(e,t){return this.app.swap(e,t)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(t){return e.parseJSON(t)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),n})})(jQuery,window);
8 lib/min/sammy-latest.min.js
View
@@ -1,8 +1,8 @@
// -- Sammy.js -- /sammy.js
// http://sammyjs.org
-// Version: 0.7.2
-// Built: 2012-10-19 23:50:30 -0400
+// Version: 0.7.3
+// Built: 2013-01-27 13:00:09 -0500
// name: sammy
-// version: 0.7.2
+// version: 0.7.3
// Sammy.js / http://sammyjs.org
-(function(e,t){(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):e.sammy=t.Sammy=n(e)})(function(e){var n,r="([^/]+)",i=/:([\w\d]+)/g,s=/\?([^#]*)?$/,o=function(e){return Array.prototype.slice.call(e)},u=function(e){return Object.prototype.toString.call(e)==="[object Function]"},a=function(e){return Object.prototype.toString.call(e)==="[object Array]"},f=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},l=function(e){return decodeURIComponent((e||"").replace(/\+/g," "))},c=encodeURIComponent,h=function(e){return String(e).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},p=function(e){return function(t,n){return this.route.apply(this,[e,t,n])}},d={},v=!!t.history&&!!history.pushState,m=[];return n=function(){var t=o(arguments),r,i;n.apps=n.apps||{};if(t.length===0||t[0]&&u(t[0]))return n.apply(n,["body"].concat(t));if(typeof (i=t.shift())=="string")return r=n.apps[i]||new n.Application,r.element_selector=i,t.length>0&&e.each(t,function(e,t){r.use(t)}),r.element_selector!=i&&delete n.apps[i],n.apps[r.element_selector]=r,r},n.VERSION="0.7.2",n.addLogger=function(e){m.push(e)},n.log=function(){var t=o(arguments);t.unshift("["+Date()+"]"),e.each(m,function(e,r){r.apply(n,t)})},typeof t.console!="undefined"?u(t.console.log.apply)?n.addLogger(function(){t.console.log.apply(t.console,arguments)}):n.addLogger(function(){t.console.log(arguments)}):typeof console!="undefined"&&n.addLogger(function(){console.log.apply(console,arguments)}),e.extend(n,{makeArray:o,isFunction:u,isArray:a}),n.Object=function(t){return e.extend(this,t||{})},e.extend(n.Object.prototype,{escapeHTML:h,h:h,toHash:function(){var t={};return e.each(this,function(e,n){u(n)||(t[e]=n)}),t},toHTML:function(){var t="";return e.each(this,function(e,n){u(n)||(t+="<strong>"+e+"</strong> "+n+"<br />")}),t},keys:function(e){var t=[];for(var n in this)(!u(this[n])||!e)&&t.push(n);return t},has:function(t){return this[t]&&e.trim(this[t].toString())!==""},join:function(){var e=o(arguments),t=e.shift();return e.join(t)},log:function(){n.log.apply(n,arguments)},toString:function(t){var n=[];return e.each(this,function(e,r){(!u(r)||t)&&n.push('"'+e+'": '+r.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),n.DefaultLocationProxy=function(e,t){this.app=e,this.is_native=!1,this.has_history=v,this._startPolling(t)},n.DefaultLocationProxy.fullPath=function(e){var t=e.toString().match(/^[^#]*(#.+)$/),n=t?t[1]:"";return[e.pathname,e.search,n].join("")},e.extend(n.DefaultLocationProxy.prototype,{bind:function(){var r=this,i=this.app,s=n.DefaultLocationProxy;e(t).bind("hashchange."+this.app.eventNamespace(),function(e,n){r.is_native===!1&&!n&&(r.is_native=!0,t.clearInterval(s._interval)),i.trigger("location-changed")}),v&&!i.disable_push_state&&(e(t).bind("popstate."+this.app.eventNamespace(),function(e){i.trigger("location-changed")}),e("a").live("click.history-"+this.app.eventNamespace(),function(e){if(e.isDefaultPrevented()||e.metaKey||e.ctrlKey)return;var n=s.fullPath(this);if(this.hostname==t.location.hostname&&i.lookupRoute("get",n)&&this.target!=="_blank")return e.preventDefault(),r.setLocation(n),!1})),s._bindings||(s._bindings=0),s._bindings++},unbind:function(){e(t).unbind("hashchange."+this.app.eventNamespace()),e(t).unbind("popstate."+this.app.eventNamespace()),e("a").die("click.history-"+this.app.eventNamespace()),n.DefaultLocationProxy._bindings--,n.DefaultLocationProxy._bindings<=0&&t.clearInterval(n.DefaultLocationProxy._interval)},getLocation:function(){return n.DefaultLocationProxy.fullPath(t.location)},setLocation:function(e){/^([^#\/]|$)/.test(e)&&(v&&!this.app.disable_push_state?e="/"+e:e="#!/"+e);if(e!=this.getLocation()){if(!(v&&!this.app.disable_push_state&&/^\//.test(e)))return t.location=e;history.pushState({path:e},t.title,e),this.app.trigger("location-changed")}},_startPolling:function(r){var i=this;if(!n.DefaultLocationProxy._interval){r||(r=10);var s=function(){var r=i.getLocation();(typeof n.DefaultLocationProxy._last_location=="undefined"||r!=n.DefaultLocationProxy._last_location)&&t.setTimeout(function(){e(t).trigger("hashchange",[!0])},0),n.DefaultLocationProxy._last_location=r};s(),n.DefaultLocationProxy._interval=t.setInterval(s,r)}}}),n.Application=function(e){var t=this;this.routes={},this.listeners=new n.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(Math.random()*1e3,10),this.context_prototype=function(){n.EventContext.apply(this,arguments)},this.context_prototype.prototype=new n.EventContext,u(e)&&e.apply(this,[this]),this._location_proxy||this.setLocationProxy(new n.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(e,n){t.log(t.toString(),e.cleaned_type,n||{})})},n.Application.prototype=e.extend({},n.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(t){return t?e(this.element_selector).find(t):e(this.element_selector)},use:function(){var e=o(arguments),t=e.shift(),r=t||"";try{e.unshift(this),typeof t=="string"&&(r="Sammy."+t,t=n[t]),t.apply(this,e)}catch(i){typeof t=="undefined"?this.error("Plugin Error: called use() but plugin ("+r.toString()+") is not defined",i):u(t)?this.error("Plugin Error",i):this.error("Plugin Error: called use() but '"+r.toString()+"' is not a function",i)}return this},setLocationProxy:function(e){var t=this._location_proxy;this._location_proxy=e,this.isRunning()&&(t&&t.unbind(),this._location_proxy.bind())},log:function(){n.log.apply(n,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(t,n,s){var o=this,a=[],f,l;!s&&u(n)&&(n=t,s=n,t="any"),t=t.toLowerCase();if(n.constructor==String){i.lastIndex=0;while((l=i.exec(n))!==null)a.push(l[1]);n=new RegExp(n.replace(i,r)+"$")}return typeof s=="string"&&(s=o[s]),f=function(e){var t={verb:e,path:n,callback:s,param_names:a};o.routes[e]=o.routes[e]||[],o.routes[e].push(t)},t==="any"?e.each(this.ROUTE_VERBS,function(e,t){f(t)}):f(t),this},get:p("get"),post:p("post"),put:p("put"),del:p("delete"),any:p("any"),mapRoutes:function(t){var n=this;return e.each(t,function(e,t){n.route.apply(n,t)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(e,t,n){var r=this;typeof n=="undefined"&&(n=t);var i=function(){var e,t,i;e=arguments[0],i=arguments[1],i&&i.context?(t=i.context,delete i.context):t=new r.context_prototype(r,"bind",e.type,i,e.target),e.cleaned_type=e.type.replace(r.eventNamespace(),""),n.apply(t,[e,i])};return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(i),this.isRunning()&&this._listen(e,i),this},trigger:function(e,t){return this.$element().trigger([e,this.eventNamespace()].join("."),[t]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(e,t){return u(e)&&(t=e,e={}),this.befores.push([e,t]),this},after:function(e){return this.bind("event-context-after",e)},around:function(e){return this.arounds.push(e),this},isRunning:function(){return this._running},helpers:function(t){return e.extend(this.context_prototype.prototype,t),this},helper:function(e,t){return this.context_prototype.prototype[e]=t,this},run:function(n){if(this.isRunning())return!1;var r=this;return e.each(this.listeners.toHash(),function(t,n){e.each(n,function(e,n){r._listen(t,n)})}),this.trigger("run",{start_url:n}),this._running=!0,this.last_location=null,!/\#(.+)/.test(this.getLocation())&&typeof n!="undefined"&&this.setLocation(n),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){r._checkLocation()}),this.bind("submit",function(t){var n=r._checkFormSubmission(e(t.target).closest("form"));return n===!1?t.preventDefault():!1}),e(t).bind("unload",function(){r.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var t=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(t.eventNamespace()),e.each(this.listeners.toHash(),function(n,r){e.each(r,function(e,r){t._unlisten(n,r)})}),this._running=!1,this},destroy:function(){return this.unload(),delete n.apps[this.element_selector],this},bindToAllEvents:function(t){var n=this;return e.each(this.APP_EVENTS,function(e,r){n.bind(r,t)}),e.each(this.listeners.keys(!0),function(r,i){e.inArray(i,n.APP_EVENTS)==-1&&n.bind(i,t)}),this},routablePath:function(e){return e.replace(s,"")},lookupRoute:function(e,t){var n=this,r=!1,i=0,s,o;if(typeof this.routes[e]!="undefined"){s=this.routes[e].length;for(;i<s;i++){o=this.routes[e][i];if(n.routablePath(t).match(o.path)){r=o;break}}}return r},runRoute:function(t,n,r,i){var s=this,o=this.lookupRoute(t,n),u,a,f,c,h,p,d,v,m;this.log("runRoute",[t,n].join(" ")),this.trigger("run-route",{verb:t,path:n,params:r}),typeof r=="undefined"&&(r={}),e.extend(r,this._parseQueryString(n));if(o){this.trigger("route-found",{route:o}),(v=o.path.exec(this.routablePath(n)))!==null&&(v.shift(),e.each(v,function(e,t){o.param_names[e]?r[o.param_names[e]]=l(t):(r.splat||(r.splat=[]),r.splat.push(l(t)))})),u=new this.context_prototype(this,t,n,r,i),f=this.arounds.slice(0),h=this.befores.slice(0),d=[u].concat(r.splat),a=function(){var e;while(h.length>0){p=h.shift();if(s.contextMatchesOptions(u,p[0])){e=p[1].apply(u,[u]);if(e===!1)return!1}}return s.last_route=o,u.trigger("event-context-before",{context:u}),e=o.callback.apply(u,d),u.trigger("event-context-after",{context:u}),e},e.each(f.reverse(),function(e,t){var n=a;a=function(){return t.apply(u,[n])}});try{m=a()}catch(g){this.error(["500 Error",t,n].join(" "),g)}return m}return this.notFound(t,n)},contextMatchesOptions:function(t,n,r){var i=n;if(typeof i=="string"||f(i))i={path:i};typeof r=="undefined"&&(r=!0);if(e.isEmptyObject(i))return!0;if(a(i.path)){var s,o,u,l;s=[];for(o=0,l=i.path.length;o<l;o+=1)u=e.extend({},i,{path:i.path[o]}),s.push(this.contextMatchesOptions(t,u));var c=e.inArray(!0,s)>-1?!0:!1;return r?c:!c}if(i.only)return this.contextMatchesOptions(t,i.only,!0);if(i.except)return this.contextMatchesOptions(t,i.except,!1);var h=!0,p=!0;return i.path&&(f(i.path)||(i.path=new RegExp(i.path.toString()+"$")),h=i.path.test(t.path)),i.verb&&(typeof i.verb=="string"?p=i.verb===t.verb:p=i.verb.indexOf(t.verb)>-1),r?p&&h:!p||!h},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(e){return this._location_proxy.setLocation(e)},swap:function(e,t){var n=this.$element().html(e);return u(t)&&t(e),n},templateCache:function(e,t){return typeof t!="undefined"?d[e]=t:d[e]},clearTemplateCache:function(){return d={}},notFound:function(e,t){var n=this.error(["404 Not Found",e,t].join(" "));return e==="get"?n:!0},error:function(e,t){t||(t=new Error),t.message=[e,t.message].join(" "),this.trigger("error",{message:t.message,error:t});if(this.raise_errors)throw t;this.log(t.message,t)},_checkLocation:function(){var e,t;e=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=e)this.last_location=["get",e],t=this.runRoute("get",e);return t},_getFormVerb:function(t){var n=e(t),r,i;i=n.find('input[name="_method"]'),i.length>0&&(r=i.val()),r||(r=n[0].getAttribute("method"));if(!r||r==="")r="get";return e.trim(r.toString().toLowerCase())},_checkFormSubmission:function(t){var n,r,i,s,o;return this.trigger("check-form-submission",{form:t}),n=e(t),r=n.attr("action")||"",i=this._getFormVerb(n),this.log("_checkFormSubmission",n,r,i),i==="get"?(s=this._serializeFormParams(n),s!==""&&(r+="?"+s),this.setLocation(r),o=!1):(s=e.extend({},this._parseFormParams(n)),o=this.runRoute(i,r,s,t.get(0))),typeof o=="undefined"?!1:o},_serializeFormParams:function(e){var t="",n=e.serializeArray(),r;if(n.length>0){t=this._encodeFormPair(n[0].name,n[0].value);for(r=1;r<n.length;r++)t=t+"&"+this._encodeFormPair(n[r].name,n[r].value)}return t},_encodeFormPair:function(e,t){return c(e)+"="+c(t)},_parseFormParams:function(e){var t={},n=e.serializeArray(),r;for(r=0;r<n.length;r++)t=this._parseParamPair(t,n[r].name,n[r].value);return t},_parseQueryString:function(e){var t={},n,r,i,o;n=e.match(s);if(n&&n[1]){r=n[1].split("&");for(o=0;o<r.length;o++)i=r[o].split("="),t=this._parseParamPair(t,l(i[0]),l(i[1]||""))}return t},_parseParamPair:function(e,t,n){return typeof e[t]!="undefined"?a(e[t])?e[t].push(n):e[t]=[e[t],n]:e[t]=n,e},_listen:function(e,t){return this.$element().bind([e,this.eventNamespace()].join("."),t)},_unlisten:function(e,t){return this.$element().unbind([e,this.eventNamespace()].join("."),t)}}),n.RenderContext=function(e){this.event_context=e,this.callbacks=[],this.previous_content=null,this.content=null,this.next_engine=!1,this.waiting=!1},n.RenderContext.prototype=e.extend({},n.Object.prototype,{then:function(e){if(!u(e)){if(!(typeof e=="string"&&e in this.event_context))return this;var n=this.event_context[e];e=function(e){return n.apply(this.event_context,[e])}}var r=this;return this.waiting?this.callbacks.push(e):(this.wait(),t.setTimeout(function(){var t=e.apply(r,[r.content,r.previous_content]);t!==!1&&r.next(t)},0)),this},wait:function(){this.waiting=!0},next:function(e){this.waiting=!1,typeof e!="undefined"&&(this.previous_content=this.content,this.content=e),this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(t,n,r){var i=this;return this.then(function(){var s,o,a,f;u(n)?(r=n,n={}):n=e.extend({},n),r&&this.then(r);if(typeof t=="string")return a=t.match(/\.json$/)||n.json,s=a?n.cache===!0:n.cache!==!1,i.next_engine=i.event_context.engineFor(t),delete n.cache,delete n.json,n.engine&&(i.next_engine=n.engine,delete n.engine),s&&(o=this.event_context.app.templateCache(t))?o:(this.wait(),e.ajax(e.extend({url:t,data:{},dataType:a?"json":"text",type:"get",success:function(e){s&&i.event_context.app.templateCache(t,e),i.next(e)}},n)),!1);if(t.nodeType)return t.innerHTML;if(t.selector)return i.next_engine=t.attr("data-engine"),n.clone===!1?t.remove()[0].innerHTML.toString():t[0].innerHTML.toString()})},loadPartials:function(e){var t;if(e){this.partials=this.partials||{};for(t in e)(function(t,n){t.load(e[n]).then(function(e){this.partials[n]=e})})(this,t)}return this},render:function(e,t,n,r){return u(e)&&!t?this.then(e):(u(t)?(r=n,n=t,t=null):n&&!u(n)&&(r=n,n=null),this.loadPartials(r).load(e).interpolate(t,e).then(n))},partial:function(e,t,n,r){return u(n)?this.render(e,t,r).swap(n):u(t)?this.render(e,{},n).swap(t):this.render(e,t,n).swap()},send:function(){var e=this,t=o(arguments),n=t.shift();return a(t[0])&&(t=t[0]),this.then(function(r){return t.push(function(t){e.next(t)}),e.wait(),n.apply(n,t),!1})},collect:function(t,n,r){var i=this,s=function(){u(t)&&(n=t,t=this.content);var r=[],s=!1;return e.each(t,function(e,t){var o=n.apply(i,[e,t]);return o.jquery&&o.length==1&&(o=o[0],s=!0),r.push(o),o}),s?r:r.join("")};return r?s():this.then(s)},renderEach:function(t,n,r,i){return a(n)&&(i=r,r=n,n=null),this.load(t).then(function(s){var o=this;r||(r=a(this.previous_content)?this.previous_content:[]);if(!i)return this.collect(r,function(e,r){var i={},o=this.next_engine||t;return n?i[n]=r:i=r,this.event_context.interpolate(s,i,o)},!0);e.each(r,function(e,r){var u={},a=this.next_engine||t;n?u[n]=r:u=r,i(r,o.event_context.interpolate(s,u,a))})})},interpolate:function(e,t,n){var r=this;return this.then(function(i,s){!e&&s&&(e=s),this.next_engine&&(t=this.next_engine,this.next_engine=!1);var o=r.event_context.interpolate(i,e,t,this.partials);return n?s+o:o})},swap:function(e){return this.then(function(t){return this.event_context.swap(t,e),t}).trigger("changed",{})},appendTo:function(t){return this.then(function(n){e(t).append(n)}).trigger("changed",{})},prependTo:function(t){return this.then(function(n){e(t).prepend(n)}).trigger("changed",{})},replace:function(t){return this.then(function(n){e(t).html(n)}).trigger("changed",{})},trigger:function(e,t){return this.then(function(n){return typeof t=="undefined"&&(t={content:n}),this.event_context.trigger(e,t),n})}}),n.EventContext=function(e,t,r,i,s){this.app=e,this.verb=t,this.path=r,this.params=new n.Object(i),this.target=s},n.EventContext.prototype=e.extend({},n.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(e){var t=this,n;if(u(e))return e;e=(e||t.app.template_engine).toString();if(n=e.match(/\.([^\.\?\#]+)$/))e=n[1];return e&&u(t[e])?t[e]:t.app.template_engine?this.engineFor(t.app.template_engine):function(e,t){return e}},interpolate:function(e,t,n,r){return this.engineFor(n).apply(this,[e,t,r])},render:function(e,t,r,i){return(new n.RenderContext(this)).render(e,t,r,i)},renderEach:function(e,t,r,i){return(new n.RenderContext(this)).renderEach(e,t,r,i)},load:function(e,t,r){return(new n.RenderContext(this)).load(e,t,r)},loadPartials:function(e){return(new n.RenderContext(this)).loadPartials(e)},partial:function(e,t,r,i){return(new n.RenderContext(this)).partial(e,t,r,i)},send:function(){var e=new n.RenderContext(this);return e.send.apply(e,arguments)},redirect:function(){var t,n=o(arguments),r=this.app.getLocation(),i=n.length;if(i>1){var s=0,u=[],a=[],f={},l=!1;for(;s<i;s++)typeof n[s]=="string"?u.push(n[s]):(e.extend(f,n[s]),l=!0);t=u.join("/");if(l){for(var c in f)a.push(this.app._encodeFormPair(c,f[c]));t+="?"+a.join("&")}}else t=n[0];this.trigger("redirect",{to:t}),this.app.last_location=[this.verb,this.path],this.app.setLocation(t),(new RegExp(t)).test(r)&&this.app.trigger("location-changed")},trigger:function(e,t){return typeof t=="undefined"&&(t={}),t.context||(t.context=this),this.app.trigger(e,t)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(e,t){return this.app.swap(e,t)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(t){return e.parseJSON(t)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),n})})(jQuery,window);
+(function(e,t){(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):e.sammy=t.Sammy=n(e)})(function(e){var n,r="([^/]+)",i=/:([\w\d]+)/g,s=/\?([^#]*)?$/,o=function(e){return Array.prototype.slice.call(e)},u=function(e){return Object.prototype.toString.call(e)==="[object Function]"},a=function(e){return Object.prototype.toString.call(e)==="[object Array]"},f=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},l=function(e){return decodeURIComponent((e||"").replace(/\+/g," "))},c=encodeURIComponent,h=function(e){return String(e).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},p=function(e){return function(){return this.route.apply(this,[e].concat(Array.prototype.slice.call(arguments)))}},d={},v=!!t.history&&!!history.pushState,m=[];return n=function(){var t=o(arguments),r,i;n.apps=n.apps||{};if(t.length===0||t[0]&&u(t[0]))return n.apply(n,["body"].concat(t));if(typeof (i=t.shift())=="string")return r=n.apps[i]||new n.Application,r.element_selector=i,t.length>0&&e.each(t,function(e,t){r.use(t)}),r.element_selector!=i&&delete n.apps[i],n.apps[r.element_selector]=r,r},n.VERSION="0.7.3",n.addLogger=function(e){m.push(e)},n.log=function(){var t=o(arguments);t.unshift("["+Date()+"]"),e.each(m,function(e,r){r.apply(n,t)})},typeof t.console!="undefined"?u(t.console.log.apply)?n.addLogger(function(){t.console.log.apply(t.console,arguments)}):n.addLogger(function(){t.console.log(arguments)}):typeof console!="undefined"&&n.addLogger(function(){console.log.apply(console,arguments)}),e.extend(n,{makeArray:o,isFunction:u,isArray:a}),n.Object=function(t){return e.extend(this,t||{})},e.extend(n.Object.prototype,{escapeHTML:h,h:h,toHash:function(){var t={};return e.each(this,function(e,n){u(n)||(t[e]=n)}),t},toHTML:function(){var t="";return e.each(this,function(e,n){u(n)||(t+="<strong>"+e+"</strong> "+n+"<br />")}),t},keys:function(e){var t=[];for(var n in this)(!u(this[n])||!e)&&t.push(n);return t},has:function(t){return this[t]&&e.trim(this[t].toString())!==""},join:function(){var e=o(arguments),t=e.shift();return e.join(t)},log:function(){n.log.apply(n,arguments)},toString:function(t){var n=[];return e.each(this,function(e,r){(!u(r)||t)&&n.push('"'+e+'": '+r.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),n.targetIsThisWindow=function(r){var i=e(r.target).attr("target");return i==="_blank"?!1:i===null||i===t.name||i==="_self"?!0:i==="top"&&t===t.top?!0:!1},n.DefaultLocationProxy=function(e,t){this.app=e,this.is_native=!1,this.has_history=v,this._startPolling(t)},n.DefaultLocationProxy.fullPath=function(e){var t=e.toString().match(/^[^#]*(#.+)$/),n=t?t[1]:"";return[e.pathname,e.search,n].join("")},e.extend(n.DefaultLocationProxy.prototype,{bind:function(){var r=this,i=this.app,s=n.DefaultLocationProxy;e(t).bind("hashchange."+this.app.eventNamespace(),function(e,n){r.is_native===!1&&!n&&(r.is_native=!0,t.clearInterval(s._interval),s._interval=null),i.trigger("location-changed")}),v&&!i.disable_push_state&&(e(t).bind("popstate."+this.app.eventNamespace(),function(e){i.trigger("location-changed")}),e(document).delegate("a","click.history-"+this.app.eventNamespace(),function(e){if(e.isDefaultPrevented()||e.metaKey||e.ctrlKey)return;var o=s.fullPath(this);if(this.hostname==t.location.hostname&&i.lookupRoute("get",o)&&n.targetIsThisWindow(e))return e.preventDefault(),r.setLocation(o),!1})),s._bindings||(s._bindings=0),s._bindings++},unbind:function(){e(t).unbind("hashchange."+this.app.eventNamespace()),e(t).unbind("popstate."+this.app.eventNamespace()),e(document).undelegate("a","click.history-"+this.app.eventNamespace()),n.DefaultLocationProxy._bindings--,n.DefaultLocationProxy._bindings<=0&&(t.clearInterval(n.DefaultLocationProxy._interval),n.DefaultLocationProxy._interval=null)},getLocation:function(){return n.DefaultLocationProxy.fullPath(t.location)},setLocation:function(e){/^([^#\/]|$)/.test(e)&&(v&&!this.app.disable_push_state?e="/"+e:e="#!/"+e);if(e!=this.getLocation()){if(!(v&&!this.app.disable_push_state&&/^\//.test(e)))return t.location=e;history.pushState({path:e},t.title,e),this.app.trigger("location-changed")}},_startPolling:function(r){var i=this;if(!n.DefaultLocationProxy._interval){r||(r=10);var s=function(){var r=i.getLocation();(typeof n.DefaultLocationProxy._last_location=="undefined"||r!=n.DefaultLocationProxy._last_location)&&t.setTimeout(function(){e(t).trigger("hashchange",[!0])},0),n.DefaultLocationProxy._last_location=r};s(),n.DefaultLocationProxy._interval=t.setInterval(s,r)}}}),n.Application=function(e){var t=this;this.routes={},this.listeners=new n.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(Math.random()*1e3,10),this.context_prototype=function(){n.EventContext.apply(this,arguments)},this.context_prototype.prototype=new n.EventContext,u(e)&&e.apply(this,[this]),this._location_proxy||this.setLocationProxy(new n.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(e,n){t.log(t.toString(),e.cleaned_type,n||{})})},n.Application.prototype=e.extend({},n.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(t){return t?e(this.element_selector).find(t):e(this.element_selector)},use:function(){var e=o(arguments),t=e.shift(),r=t||"";try{e.unshift(this),typeof t=="string"&&(r="Sammy."+t,t=n[t]),t.apply(this,e)}catch(i){typeof t=="undefined"?this.error("Plugin Error: called use() but plugin ("+r.toString()+") is not defined",i):u(t)?this.error("Plugin Error",i):this.error("Plugin Error: called use() but '"+r.toString()+"' is not a function",i)}return this},setLocationProxy:function(e){var t=this._location_proxy;this._location_proxy=e,this.isRunning()&&(t&&t.unbind(),this._location_proxy.bind())},log:function(){n.log.apply(n,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(t,n){var s=this,o=[],a,f,l=Array.prototype.slice.call(arguments,2);l.length===0&&u(n)&&(n=t,l=[n],t="any"),t=t.toLowerCase();if(n.constructor==String){i.lastIndex=0;while((f=i.exec(n))!==null)o.push(f[1]);n=new RegExp(n.replace(i,r)+"$")}return e.each(l,function(e,t){typeof t=="string"&&(l[e]=s[t])}),a=function(e){var t={verb:e,path:n,callback:l,param_names:o};s.routes[e]=s.routes[e]||[],s.routes[e].push(t)},t==="any"?e.each(this.ROUTE_VERBS,function(e,t){a(t)}):a(t),this},get:p("get"),post:p("post"),put:p("put"),del:p("delete"),any:p("any"),mapRoutes:function(t){var n=this;return e.each(t,function(e,t){n.route.apply(n,t)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(e,t,n){var r=this;typeof n=="undefined"&&(n=t);var i=function(){var e,t,i;e=arguments[0],i=arguments[1],i&&i.context?(t=i.context,delete i.context):t=new r.context_prototype(r,"bind",e.type,i,e.target),e.cleaned_type=e.type.replace(r.eventNamespace(),""),n.apply(t,[e,i])};return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(i),this.isRunning()&&this._listen(e,i),this},trigger:function(e,t){return this.$element().trigger([e,this.eventNamespace()].join("."),[t]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(e,t){return u(e)&&(t=e,e={}),this.befores.push([e,t]),this},after:function(e){return this.bind("event-context-after",e)},around:function(e){return this.arounds.push(e),this},onComplete:function(e){return this._onComplete=e,this},isRunning:function(){return this._running},helpers:function(t){return e.extend(this.context_prototype.prototype,t),this},helper:function(e,t){return this.context_prototype.prototype[e]=t,this},run:function(r){if(this.isRunning())return!1;var i=this;return e.each(this.listeners.toHash(),function(t,n){e.each(n,function(e,n){i._listen(t,n)})}),this.trigger("run",{start_url:r}),this._running=!0,this.last_location=null,!/\#(.+)/.test(this.getLocation())&&typeof r!="undefined"&&this.setLocation(r),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){i._checkLocation()}),this.bind("submit",function(t){if(!n.targetIsThisWindow(t))return!0;var r=i._checkFormSubmission(e(t.target).closest("form"));return r===!1?t.preventDefault():!1}),e(t).bind("unload",function(){i.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var t=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(t.eventNamespace()),e.each(this.listeners.toHash(),function(n,r){e.each(r,function(e,r){t._unlisten(n,r)})}),this._running=!1,this},destroy:function(){return this.unload(),delete n.apps[this.element_selector],this},bindToAllEvents:function(t){var n=this;return e.each(this.APP_EVENTS,function(e,r){n.bind(r,t)}),e.each(this.listeners.keys(!0),function(r,i){e.inArray(i,n.APP_EVENTS)==-1&&n.bind(i,t)}),this},routablePath:function(e){return e.replace(s,"")},lookupRoute:function(e,t){var n=this,r=!1,i=0,s,o;if(typeof this.routes[e]!="undefined"){s=this.routes[e].length;for(;i<s;i++){o=this.routes[e][i];if(n.routablePath(t).match(o.path)){r=o;break}}}return r},runRoute:function(t,n,r,i){var s=this,o=this.lookupRoute(t,n),u,a,f,c,h,p,d,v,m;this.debug&&this.log("runRoute",[t,n].join(" ")),this.trigger("run-route",{verb:t,path:n,params:r}),typeof r=="undefined"&&(r={}),e.extend(r,this._parseQueryString(n));if(o){this.trigger("route-found",{route:o}),(v=o.path.exec(this.routablePath(n)))!==null&&(v.shift(),e.each(v,function(e,t){o.param_names[e]?r[o.param_names[e]]=l(t):(r.splat||(r.splat=[]),r.splat.push(l(t)))})),u=new this.context_prototype(this,t,n,r,i),f=this.arounds.slice(0),h=this.befores.slice(0),d=[u],r.splat&&(d=d.concat(r.splat)),a=function(){var e,t,n;while(h.length>0){p=h.shift();if(s.contextMatchesOptions(u,p[0])){e=p[1].apply(u,[u]);if(e===!1)return!1}}return s.last_route=o,u.trigger("event-context-before",{context:u}),typeof o.callback=="function"&&(o.callback=[o.callback]),o.callback&&o.callback.length&&(t=-1,n=function(){t++,o.callback[t]?e=o.callback[t].apply(u,d):s._onComplete&&typeof (s._onComplete==="function")&&s._onComplete(u)},d.push(n),n()),u.trigger("event-context-after",{context:u}),e},e.each(f.reverse(),function(e,t){var n=a;a=function(){return t.apply(u,[n])}});try{m=a()}catch(g){this.error(["500 Error",t,n].join(" "),g)}return m}return this.notFound(t,n)},contextMatchesOptions:function(t,n,r){var i=n;if(typeof i=="string"||f(i))i={path:i};typeof r=="undefined"&&(r=!0);if(e.isEmptyObject(i))return!0;if(a(i.path)){var s,o,u,l;s=[];for(o=0,l=i.path.length;o<l;o+=1)u=e.extend({},i,{path:i.path[o]}),s.push(this.contextMatchesOptions(t,u));var c=e.inArray(!0,s)>-1?!0:!1;return r?c:!c}if(i.only)return this.contextMatchesOptions(t,i.only,!0);if(i.except)return this.contextMatchesOptions(t,i.except,!1);var h=!0,p=!0;return i.path&&(f(i.path)||(i.path=new RegExp(i.path.toString()+"$")),h=i.path.test(t.path)),i.verb&&(typeof i.verb=="string"?p=i.verb===t.verb:p=i.verb.indexOf(t.verb)>-1),r?p&&h:!p||!h},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(e){return this._location_proxy.setLocation(e)},swap:function(e,t){var n=this.$element().html(e);return u(t)&&t(e),n},templateCache:function(e,t){return typeof t!="undefined"?d[e]=t:d[e]},clearTemplateCache:function(){return d={}},notFound:function(e,t){var n=this.error(["404 Not Found",e,t].join(" "));return e==="get"?n:!0},error:function(e,t){t||(t=new Error),t.message=[e,t.message].join(" "),this.trigger("error",{message:t.message,error:t});if(this.raise_errors)throw t;this.log(t.message,t)},_checkLocation:function(){var e,t;e=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=e)this.last_location=["get",e],t=this.runRoute("get",e);return t},_getFormVerb:function(t){var n=e(t),r,i;i=n.find('input[name="_method"]'),i.length>0&&(r=i.val()),r||(r=n[0].getAttribute("method"));if(!r||r==="")r="get";return e.trim(r.toString().toLowerCase())},_checkFormSubmission:function(t){var n,r,i,s,o;return this.trigger("check-form-submission",{form:t}),n=e(t),r=n.attr("action")||"",i=this._getFormVerb(n),this.debug&&this.log("_checkFormSubmission",n,r,i),i==="get"?(s=this._serializeFormParams(n),s!==""&&(r+="?"+s),this.setLocation(r),o=!1):(s=e.extend({},this._parseFormParams(n)),o=this.runRoute(i,r,s,t.get(0))),typeof o=="undefined"?!1:o},_serializeFormParams:function(e){var t="",n=e.serializeArray(),r;if(n.length>0){t=this._encodeFormPair(n[0].name,n[0].value);for(r=1;r<n.length;r++)t=t+"&"+this._encodeFormPair(n[r].name,n[r].value)}return t},_encodeFormPair:function(e,t){return c(e)+"="+c(t)},_parseFormParams:function(e){var t={},n=e.serializeArray(),r;for(r=0;r<n.length;r++)t=this._parseParamPair(t,n[r].name,n[r].value);return t},_parseQueryString:function(e){var t={},n,r,i,o;n=e.match(s);if(n&&n[1]){r=n[1].split("&");for(o=0;o<r.length;o++)i=r[o].split("="),t=this._parseParamPair(t,l(i[0]),l(i[1]||""))}return t},_parseParamPair:function(e,t,n){return typeof e[t]!="undefined"?a(e[t])?e[t].push(n):e[t]=[e[t],n]:e[t]=n,e},_listen:function(e,t){return this.$element().bind([e,this.eventNamespace()].join("."),t)},_unlisten:function(e,t){return this.$element().unbind([e,this.eventNamespace()].join("."),t)}}),n.RenderContext=function(e){this.event_context=e,this.callbacks=[],this.previous_content=null,this.content=null,this.next_engine=!1,this.waiting=!1},n.RenderContext.prototype=e.extend({},n.Object.prototype,{then:function(e){if(!u(e)){if(!(typeof e=="string"&&e in this.event_context))return this;var n=this.event_context[e];e=function(e){return n.apply(this.event_context,[e])}}var r=this;return this.waiting?this.callbacks.push(e):(this.wait(),t.setTimeout(function(){var t=e.apply(r,[r.content,r.previous_content]);t!==!1&&r.next(t)},0)),this},wait:function(){this.waiting=!0},next:function(e){this.waiting=!1,typeof e!="undefined"&&(this.previous_content=this.content,this.content=e),this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(t,n,r){var i=this;return this.then(function(){var s,o,a,f;u(n)?(r=n,n={}):n=e.extend({},n),r&&this.then(r);if(typeof t=="string")return a=t.match(/\.json$/)||n.json,s=a?n.cache===!0:n.cache!==!1,i.next_engine=i.event_context.engineFor(t),delete n.cache,delete n.json,n.engine&&(i.next_engine=n.engine,delete n.engine),s&&(o=this.event_context.app.templateCache(t))?o:(this.wait(),e.ajax(e.extend({url:t,data:{},dataType:a?"json":"text",type:"get",success:function(e){s&&i.event_context.app.templateCache(t,e),i.next(e)}},n)),!1);if(t.nodeType)return t.innerHTML;if(t.selector)return i.next_engine=t.attr("data-engine"),n.clone===!1?t.remove()[0].innerHTML.toString():t[0].innerHTML.toString()})},loadPartials:function(e){var t;if(e){this.partials=this.partials||{};for(t in e)(function(t,n){t.load(e[n]).then(function(e){this.partials[n]=e})})(this,t)}return this},render:function(e,t,n,r){return u(e)&&!t?this.then(e):(u(t)?(r=n,n=t,t=null):n&&!u(n)&&(r=n,n=null),this.loadPartials(r).load(e).interpolate(t,e).then(n))},partial:function(e,t,n,r){return u(n)?this.render(e,t,r).swap(n):u(t)?this.render(e,{},n).swap(t):this.render(e,t,n).swap()},send:function(){var e=this,t=o(arguments),n=t.shift();return a(t[0])&&(t=t[0]),this.then(function(r){return t.push(function(t){e.next(t)}),e.wait(),n.apply(n,t),!1})},collect:function(t,n,r){var i=this,s=function(){u(t)&&(n=t,t=this.content);var r=[],s=!1;return e.each(t,function(e,t){var o=n.apply(i,[e,t]);return o.jquery&&o.length==1&&(o=o[0],s=!0),r.push(o),o}),s?r:r.join("")};return r?s():this.then(s)},renderEach:function(t,n,r,i){return a(n)&&(i=r,r=n,n=null),this.load(t).then(function(s){var o=this;r||(r=a(this.previous_content)?this.previous_content:[]);if(!i)return this.collect(r,function(e,r){var i={},o=this.next_engine||t;return n?i[n]=r:i=r,this.event_context.interpolate(s,i,o)},!0);e.each(r,function(e,r){var u={},a=this.next_engine||t;n?u[n]=r:u=r,i(r,o.event_context.interpolate(s,u,a))})})},interpolate:function(e,t,n){var r=this;return this.then(function(i,s){!e&&s&&(e=s),this.next_engine&&(t=this.next_engine,this.next_engine=!1);var o=r.event_context.interpolate(i,e,t,this.partials);return n?s+o:o})},swap:function(e){return this.then(function(t){return this.event_context.swap(t,e),t}).trigger("changed",{})},appendTo:function(t){return this.then(function(n){e(t).append(n)}).trigger("changed",{})},prependTo:function(t){return this.then(function(n){e(t).prepend(n)}).trigger("changed",{})},replace:function(t){return this.then(function(n){e(t).html(n)}).trigger("changed",{})},trigger:function(e,t){return this.then(function(n){return typeof t=="undefined"&&(t={content:n}),this.event_context.trigger(e,t),n})}}),n.EventContext=function(e,t,r,i,s){this.app=e,this.verb=t,this.path=r,this.params=new n.Object(i),this.target=s},n.EventContext.prototype=e.extend({},n.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(e){var t=this,n;if(u(e))return e;e=(e||t.app.template_engine).toString();if(n=e.match(/\.([^\.\?\#]+)$/))e=n[1];return e&&u(t[e])?t[e]:t.app.template_engine?this.engineFor(t.app.template_engine):function(e,t){return e}},interpolate:function(e,t,n,r){return this.engineFor(n).apply(this,[e,t,r])},render:function(e,t,r,i){return(new n.RenderContext(this)).render(e,t,r,i)},renderEach:function(e,t,r,i){return(new n.RenderContext(this)).renderEach(e,t,r,i)},load:function(e,t,r){return(new n.RenderContext(this)).load(e,t,r)},loadPartials:function(e){return(new n.RenderContext(this)).loadPartials(e)},partial:function(e,t,r,i){return(new n.RenderContext(this)).partial(e,t,r,i)},send:function(){var e=new n.RenderContext(this);return e.send.apply(e,arguments)},redirect:function(){var t,n=o(arguments),r=this.app.getLocation(),i=n.length;if(i>1){var s=0,u=[],a=[],f={},l=!1;for(;s<i;s++)typeof n[s]=="string"?u.push(n[s]):(e.extend(f,n[s]),l=!0);t=u.join("/");if(l){for(var c in f)a.push(this.app._encodeFormPair(c,f[c]));t+="?"+a.join("&")}}else t=n[0];this.trigger("redirect",{to:t}),this.app.last_location=[this.verb,this.path],this.app.setLocation(t),(new RegExp(t)).test(r)&&this.app.trigger("location-changed")},trigger:function(e,t){return typeof t=="undefined"&&(t={}),t.context||(t.context=this),this.app.trigger(e,t)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(e,t){return this.app.swap(e,t)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(t){return e.parseJSON(t)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),n})})(jQuery,window);
2  package.json
View
@@ -1,6 +1,6 @@
{
"name": "sammy",
- "version": "0.7.2",
+ "version": "0.7.3",
"maintainers": [{"name":"Aaron Quint", "web": "http://www.quirkey.com"}],
"description": "Sammy is a RESTful Evented JavaScript framework built on top of jQuery",
"keywords": ["framework", "jquery", "sammy"],
Please sign in to comment.
Something went wrong with that request. Please try again.