Iniit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.cache.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:30 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).MemoryCacheProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.MemoryCacheProxy=function(initial){this._cache=initial||{}};$.extend(Sammy.MemoryCacheProxy.prototype,{exists:function(name){return typeof this._cache[name]!="undefined"},set:function(name,value){return this._cache[name]=value},get:function(name){return this._cache[name]},clear:function(name){delete this._cache[name]}});Sammy.DataCacheProxy=function(initial,$element){initial=initial||{};this.$element=$element;$.each(initial,function(key,value){$element.data("cache."+key,value)})};$.extend(Sammy.DataCacheProxy.prototype,{exists:function(name){return typeof this.$element.data("cache."+name)!="undefined"},set:function(name,value){return this.$element.data("cache."+name,value)},get:function(name){return this.$element.data("cache."+name)},clear:function(name){this.$element.removeData("cache."+name)}});Sammy.Cache=function(app,proxy){app.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");if(proxy=="data"){this.cache_proxy=new Sammy.DataCacheProxy({},this.$element())}else{this.cache_proxy=new Sammy.MemoryCacheProxy({})}app.cache_partials=true;$.extend(app,{cache:function(name,value){if(typeof value=="undefined"){return this.cache_proxy.get(name)}else if($.isFunction(value)&&!this.cache_proxy.exists(name)){return this.cache_proxy.set(name,value.apply(this))}else{return this.cache_proxy.set(name,value)}},clearCache:function(name){return this.cache_proxy.clear(name)}});app.helpers({cache:function(name,value){return this.app.cache(name,value)}})};return Sammy.MemoryCacheProxy});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.cache.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:30 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).MemoryCacheProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.MemoryCacheProxy=function(initial){this._cache=initial||{}};$.extend(Sammy.MemoryCacheProxy.prototype,{exists:function(name){return typeof this._cache[name]!="undefined"},set:function(name,value){return this._cache[name]=value},get:function(name){return this._cache[name]},clear:function(name){delete this._cache[name]}});Sammy.DataCacheProxy=function(initial,$element){initial=initial||{};this.$element=$element;$.each(initial,function(key,value){$element.data("cache."+key,value)})};$.extend(Sammy.DataCacheProxy.prototype,{exists:function(name){return typeof this.$element.data("cache."+name)!="undefined"},set:function(name,value){return this.$element.data("cache."+name,value)},get:function(name){return this.$element.data("cache."+name)},clear:function(name){this.$element.removeData("cache."+name)}});Sammy.Cache=function(app,proxy){app.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");if(proxy=="data"){this.cache_proxy=new Sammy.DataCacheProxy({},this.$element())}else{this.cache_proxy=new Sammy.MemoryCacheProxy({})}app.cache_partials=true;$.extend(app,{cache:function(name,value){if(typeof value=="undefined"){return this.cache_proxy.get(name)}else if($.isFunction(value)&&!this.cache_proxy.exists(name)){return this.cache_proxy.set(name,value.apply(this))}else{return this.cache_proxy.set(name,value)}},clearCache:function(name){return this.cache_proxy.clear(name)}});app.helpers({cache:function(name,value){return this.app.cache(name,value)}})};return Sammy.MemoryCacheProxy});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.data_location_proxy.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:30 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).DataLocationProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.DataLocationProxy=function(app,data_name,href_attribute){this.app=app;this.data_name=data_name||"sammy-location";this.href_attribute=href_attribute};$.extend(Sammy.DataLocationProxy.prototype,{bind:function(){var proxy=this;this.app.$element().bind("setData",function(e,key,value){if(key==proxy.data_name){proxy.app.$element().each(function(){$.data(this,proxy.data_name,value)});proxy.app.trigger("location-changed")}});if(this.href_attribute){this.app.$element().delegate("["+this.href_attribute+"]","click",function(e){e.preventDefault();proxy.setLocation($(this).attr(proxy.href_attribute))})}},unbind:function(){if(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(new_location){return this.app.$element().data(this.data_name,new_location)}});return Sammy.DataLocationProxy});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.data_location_proxy.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:30 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).DataLocationProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.DataLocationProxy=function(app,data_name,href_attribute){this.app=app;this.data_name=data_name||"sammy-location";this.href_attribute=href_attribute};$.extend(Sammy.DataLocationProxy.prototype,{bind:function(){var proxy=this;this.app.$element().bind("setData",function(e,key,value){if(key==proxy.data_name){proxy.app.$element().each(function(){$.data(this,proxy.data_name,value)});proxy.app.trigger("location-changed")}});if(this.href_attribute){this.app.$element().delegate("["+this.href_attribute+"]","click",function(e){e.preventDefault();proxy.setLocation($(this).attr(proxy.href_attribute))})}},unbind:function(){if(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(new_location){return this.app.$element().data(this.data_name,new_location)}});return Sammy.DataLocationProxy});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.ejs.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:30 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","ejs"],factory)}else{(window.Sammy=window.Sammy||{}).EJS=factory(window.jQuery,window.Sammy,window.EJS)}})(function($,Sammy,EJS){Sammy.EJS=function(app,method_alias){var template=function(template,data,name){if(typeof name=="undefined"){name=template}return new EJS({text:template,name:name}).render(data)};if(!method_alias){method_alias="ejs"}app.helper(method_alias,template)};return Sammy.EJS});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.ejs.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:30 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","ejs"],factory)}else{(window.Sammy=window.Sammy||{}).EJS=factory(window.jQuery,window.Sammy,window.EJS)}})(function($,Sammy,EJS){Sammy.EJS=function(app,method_alias){var template=function(template,data,name){if(typeof name=="undefined"){name=template}return new EJS({text:template,name:name}).render(data)};if(!method_alias){method_alias="ejs"}app.helper(method_alias,template)};return Sammy.EJS});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.exceptional.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Exceptional=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Exceptional=function(app,errorReporter){errorReporter=errorReporter||window.Exceptional;app.bind("error",function(e,data){if(data&&data.error){errorReporter.handle(data.error.message,window.location.href,"0")}})};return Sammy.Exceptional});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.exceptional.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Exceptional=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Exceptional=function(app,errorReporter){errorReporter=errorReporter||window.Exceptional;app.bind("error",function(e,data){if(data&&data.error){errorReporter.handle(data.error.message,window.location.href,"0")}})};return Sammy.Exceptional});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.flash.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Flash=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.FlashHash=function(){this.now={}};$.extend(Sammy.FlashHash.prototype,{toHTML:function(){var result=this._renderUL();this.clear();return result},clear:function(){this._clearHash(this);this._clearHash(this.now)},_onRedirect:function(){this._clearHash(this.now)},_clearHash:function(hash){var key;for(key in hash){if(key!=="now"&&hash.hasOwnProperty(key)){delete hash[key]}}},_renderUL:function(){return'<ul class="flash">'+this._renderLIs(this)+this._renderLIs(this.now)+"</ul>"},_renderLIs:function(hash){var result="",key;for(key in hash){if(hash[key]&&key!=="now"&&hash.hasOwnProperty(key)){result=result+'<li class="'+key+'">'+hash[key]+"</li>"}}Sammy.log("rendered flash: "+result);return result}});Sammy.Flash=function(app){app.flash=new Sammy.FlashHash;app.helper("flash",function(key,value){if(arguments.length===0){return this.app.flash}else if(arguments.length===2){this.app.flash[key]=value}return this.app.flash[key]});app.helper("flashNow",function(key,value){if(arguments.length===0){return this.app.flash.now}else if(arguments.length===2){this.app.flash.now[key]=value}return this.app.flash.now[key]});app.bind("redirect",function(){this.app.flash._onRedirect()})};return Sammy.Flash});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.flash.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Flash=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.FlashHash=function(){this.now={}};$.extend(Sammy.FlashHash.prototype,{toHTML:function(){var result=this._renderUL();this.clear();return result},clear:function(){this._clearHash(this);this._clearHash(this.now)},_onRedirect:function(){this._clearHash(this.now)},_clearHash:function(hash){var key;for(key in hash){if(key!=="now"&&hash.hasOwnProperty(key)){delete hash[key]}}},_renderUL:function(){return'<ul class="flash">'+this._renderLIs(this)+this._renderLIs(this.now)+"</ul>"},_renderLIs:function(hash){var result="",key;for(key in hash){if(hash[key]&&key!=="now"&&hash.hasOwnProperty(key)){result=result+'<li class="'+key+'">'+hash[key]+"</li>"}}Sammy.log("rendered flash: "+result);return result}});Sammy.Flash=function(app){app.flash=new Sammy.FlashHash;app.helper("flash",function(key,value){if(arguments.length===0){return this.app.flash}else if(arguments.length===2){this.app.flash[key]=value}return this.app.flash[key]});app.helper("flashNow",function(key,value){if(arguments.length===0){return this.app.flash.now}else if(arguments.length===2){this.app.flash.now[key]=value}return this.app.flash.now[key]});app.bind("redirect",function(){this.app.flash._onRedirect()})};return Sammy.Flash});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.form.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Form=factory(window.jQuery,window.Sammy)}})(function($,Sammy){function getStringContent(object,content){if(typeof content==="undefined"){return""}else if($.isFunction(content)){content=content.apply(object)}return content.toString()}function simple_element(tag,attributes,content){var html="<";html+=tag;if(typeof attributes!="undefined"){$.each(attributes,function(key,value){if(value!==null){html+=" "+key+"='";html+=getStringContent(attributes,value).replace(/\'/g,"'");html+="'"}})}if(content===false){html+=">"}else if(typeof content!="undefined"){html+=">";html+=getStringContent(this,content);html+="</"+tag+">"}else{html+=" />"}return html}Sammy.FormBuilder=function(name,object){this.name=name;this.object=object};$.extend(Sammy.FormBuilder.prototype,{open:function(attributes){return simple_element("form",$.extend({method:"post",action:"#/"+this.name+"s"},attributes),false)},close:function(){return"</form>"},label:function(keypath,content,attributes){var attrs={"for":this._attributesForKeyPath(keypath).name};return simple_element("label",$.extend(attrs,attributes),content)},hidden:function(keypath,attributes){attributes=$.extend({type:"hidden"},this._attributesForKeyPath(keypath),attributes);return simple_element("input",attributes)},text:function(keypath,attributes){attributes=$.extend({type:"text"},this._attributesForKeyPath(keypath),attributes);return simple_element("input",attributes)},textarea:function(keypath,attributes){var current;attributes=$.extend(this._attributesForKeyPath(keypath),attributes);current=attributes.value;delete attributes["value"];return simple_element("textarea",attributes,current)},password:function(keypath,attributes){return this.text(keypath,$.extend({type:"password"},attributes))},select:function(keypath,options,attributes){var option_html="",selected;attributes=$.extend(this._attributesForKeyPath(keypath),attributes);selected=attributes.value;delete attributes["value"];$.each(options,function(i,option){var value,text,option_attrs;if($.isArray(option)){value=option[1];text=option[0]}else{value=option;text=option}option_attrs={value:getStringContent(this.object,value)};if(value===selected){option_attrs.selected="selected"}option_html+=simple_element("option",option_attrs,text)});return simple_element("select",attributes,option_html)},radio:function(keypath,value,attributes){var selected;attributes=$.extend(this._attributesForKeyPath(keypath),attributes);selected=attributes.value;attributes.value=getStringContent(this.object,value);if(selected==attributes.value){attributes.checked="checked"}return simple_element("input",$.extend({type:"radio"},attributes))},checkbox:function(keypath,value,attributes){var content="";if(!attributes){attributes={}}if(attributes.hidden_element!==false){content+=this.hidden(keypath,{value:!value})}delete attributes["hidden_element"];content+=this.radio(keypath,value,$.extend({type:"checkbox"},attributes));return content},submit:function(attributes){return simple_element("input",$.extend({type:"submit"},attributes))},_attributesForKeyPath:function(keypath){var builder=this,keys=$.isArray(keypath)?keypath:keypath.split(/\./),name=builder.name,value=builder.object,class_name=builder.name;$.each(keys,function(i,key){if(typeof value==="undefined"||value===""){value=""}else if(typeof key=="number"||key.match(/^\d+$/)){value=value[parseInt(key,10)]}else{value=value[key]}name+="["+key+"]";class_name+="-"+key});return{name:name,value:getStringContent(builder.object,value),"class":class_name}}});Sammy.Form=function(app){app.helpers({simple_element:simple_element,formFor:function(name,object,content_callback){var builder;if($.isFunction(object)){content_callback=object;object=this[name]}builder=new Sammy.FormBuilder(name,object);content_callback.apply(this,[builder]);return builder}})};return Sammy.Form});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.form.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Form=factory(window.jQuery,window.Sammy)}})(function($,Sammy){function getStringContent(object,content){if(typeof content==="undefined"){return""}else if($.isFunction(content)){content=content.apply(object)}return content.toString()}function simple_element(tag,attributes,content){var html="<";html+=tag;if(typeof attributes!="undefined"){$.each(attributes,function(key,value){if(value!==null){html+=" "+key+"='";html+=getStringContent(attributes,value).replace(/\'/g,"'");html+="'"}})}if(content===false){html+=">"}else if(typeof content!="undefined"){html+=">";html+=getStringContent(this,content);html+="</"+tag+">"}else{html+=" />"}return html}Sammy.FormBuilder=function(name,object){this.name=name;this.object=object};$.extend(Sammy.FormBuilder.prototype,{open:function(attributes){return simple_element("form",$.extend({method:"post",action:"#/"+this.name+"s"},attributes),false)},close:function(){return"</form>"},label:function(keypath,content,attributes){var attrs={"for":this._attributesForKeyPath(keypath).name};return simple_element("label",$.extend(attrs,attributes),content)},hidden:function(keypath,attributes){attributes=$.extend({type:"hidden"},this._attributesForKeyPath(keypath),attributes);return simple_element("input",attributes)},text:function(keypath,attributes){attributes=$.extend({type:"text"},this._attributesForKeyPath(keypath),attributes);return simple_element("input",attributes)},textarea:function(keypath,attributes){var current;attributes=$.extend(this._attributesForKeyPath(keypath),attributes);current=attributes.value;delete attributes["value"];return simple_element("textarea",attributes,current)},password:function(keypath,attributes){return this.text(keypath,$.extend({type:"password"},attributes))},select:function(keypath,options,attributes){var option_html="",selected;attributes=$.extend(this._attributesForKeyPath(keypath),attributes);selected=attributes.value;delete attributes["value"];$.each(options,function(i,option){var value,text,option_attrs;if($.isArray(option)){value=option[1];text=option[0]}else{value=option;text=option}option_attrs={value:getStringContent(this.object,value)};if(value===selected){option_attrs.selected="selected"}option_html+=simple_element("option",option_attrs,text)});return simple_element("select",attributes,option_html)},radio:function(keypath,value,attributes){var selected;attributes=$.extend(this._attributesForKeyPath(keypath),attributes);selected=attributes.value;attributes.value=getStringContent(this.object,value);if(selected==attributes.value){attributes.checked="checked"}return simple_element("input",$.extend({type:"radio"},attributes))},checkbox:function(keypath,value,attributes){var content="";if(!attributes){attributes={}}if(attributes.hidden_element!==false){content+=this.hidden(keypath,{value:!value})}delete attributes["hidden_element"];content+=this.radio(keypath,value,$.extend({type:"checkbox"},attributes));return content},submit:function(attributes){return simple_element("input",$.extend({type:"submit"},attributes))},_attributesForKeyPath:function(keypath){var builder=this,keys=$.isArray(keypath)?keypath:keypath.split(/\./),name=builder.name,value=builder.object,class_name=builder.name;$.each(keys,function(i,key){if(typeof value==="undefined"||value===""){value=""}else if(typeof key=="number"||key.match(/^\d+$/)){value=value[parseInt(key,10)]}else{value=value[key]}name+="["+key+"]";class_name+="-"+key});return{name:name,value:getStringContent(builder.object,value),"class":class_name}}});Sammy.Form=function(app){app.helpers({simple_element:simple_element,formFor:function(name,object,content_callback){var builder;if($.isFunction(object)){content_callback=object;object=this[name]}builder=new Sammy.FormBuilder(name,object);content_callback.apply(this,[builder]);return builder}})};return Sammy.Form});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.form_2_json.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Form2JSON=factory(window.jQuery,window.Sammy)}})(function($,Sammy){(function(){window.form2object=function(rootNode,delimiter,skipEmpty){if(typeof skipEmpty=="undefined"||skipEmpty==null)skipEmpty=true;if(typeof delimiter=="undefined"||delimiter==null)delimiter=".";rootNode=typeof rootNode=="string"?document.getElementById(rootNode):rootNode;var formValues=getFormValues(rootNode);var result={};var arrays={};for(var i=0;i<formValues.length;i++){var value=formValues[i].value;if(skipEmpty&&value==="")continue;var name=formValues[i].name;var nameParts=name.split(delimiter);var currResult=result;var arrayKey="";for(var j=0;j<nameParts.length;j++){var namePart=nameParts[j];var arrName="";if(namePart.indexOf("[]")>-1&&j==nameParts.length-1){arrayKey=arrName=namePart.substr(0,namePart.indexOf("["));if(!currResult[arrName])currResult[arrName]=[];currResult[arrName].push(value)}else{if(namePart.indexOf("[")>-1){arrName=namePart.substr(0,namePart.indexOf("["));var arrIdx=namePart.replace(/^[a-z]+\[|\]$/gi,"");arrayKey=arrayKey+arrName+arrIdx;if(!arrays[arrayKey])arrays[arrayKey]={};if(!currResult[arrName])currResult[arrName]=[];if(j==nameParts.length-1){currResult[arrName].push(value)}else{if(!arrays[arrayKey][arrIdx]){currResult[arrName].push({});arrays[arrayKey][arrIdx]=currResult[arrName][currResult[arrName].length-1]}}currResult=arrays[arrayKey][arrIdx]}else{if(j<nameParts.length-1){if(!currResult[namePart])currResult[namePart]={};currResult=currResult[namePart]}else{currResult[namePart]=value}}}}}return result};function getFormValues(rootNode){var result=[];var currentNode=rootNode.firstChild;while(currentNode){if(currentNode.nodeName.match(/INPUT|SELECT|TEXTAREA/i)){var fieldValue=getFieldValue(currentNode);if(fieldValue!==null)result.push({name:currentNode.name,value:fieldValue})}else{var subresult=getFormValues(currentNode);result=result.concat(subresult)}currentNode=currentNode.nextSibling}return result}function getFieldValue(fieldNode){switch(fieldNode.nodeName){case"INPUT":case"TEXTAREA":switch(fieldNode.type.toLowerCase()){case"radio":case"checkbox":if(fieldNode.checked)return fieldNode.value;break;case"button":case"reset":case"submit":case"image":return"";break;default:return fieldNode.value;break}break;case"SELECT":return getSelectedOptionValue(fieldNode);break;default:break}return null}function getSelectedOptionValue(selectNode){var multiple=selectNode.multiple;if(!multiple)return selectNode.value;var result=[];for(var options=selectNode.getElementsByTagName("option"),i=0,l=options.length;i<l;i++){if(options[i].selected)result.push(options[i].value)}return result}window.form2json=window.form2object})();Sammy.Form2JSON=function(app){app._parseFormParams=function(form){return form2object(form[0])}};return Sammy.Form2JSON});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.form_2_json.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Form2JSON=factory(window.jQuery,window.Sammy)}})(function($,Sammy){(function(){window.form2object=function(rootNode,delimiter,skipEmpty){if(typeof skipEmpty=="undefined"||skipEmpty==null)skipEmpty=true;if(typeof delimiter=="undefined"||delimiter==null)delimiter=".";rootNode=typeof rootNode=="string"?document.getElementById(rootNode):rootNode;var formValues=getFormValues(rootNode);var result={};var arrays={};for(var i=0;i<formValues.length;i++){var value=formValues[i].value;if(skipEmpty&&value==="")continue;var name=formValues[i].name;var nameParts=name.split(delimiter);var currResult=result;var arrayKey="";for(var j=0;j<nameParts.length;j++){var namePart=nameParts[j];var arrName="";if(namePart.indexOf("[]")>-1&&j==nameParts.length-1){arrayKey=arrName=namePart.substr(0,namePart.indexOf("["));if(!currResult[arrName])currResult[arrName]=[];currResult[arrName].push(value)}else{if(namePart.indexOf("[")>-1){arrName=namePart.substr(0,namePart.indexOf("["));var arrIdx=namePart.replace(/^[a-z]+\[|\]$/gi,"");arrayKey=arrayKey+arrName+arrIdx;if(!arrays[arrayKey])arrays[arrayKey]={};if(!currResult[arrName])currResult[arrName]=[];if(j==nameParts.length-1){currResult[arrName].push(value)}else{if(!arrays[arrayKey][arrIdx]){currResult[arrName].push({});arrays[arrayKey][arrIdx]=currResult[arrName][currResult[arrName].length-1]}}currResult=arrays[arrayKey][arrIdx]}else{if(j<nameParts.length-1){if(!currResult[namePart])currResult[namePart]={};currResult=currResult[namePart]}else{currResult[namePart]=value}}}}}return result};function getFormValues(rootNode){var result=[];var currentNode=rootNode.firstChild;while(currentNode){if(currentNode.nodeName.match(/INPUT|SELECT|TEXTAREA/i)){var fieldValue=getFieldValue(currentNode);if(fieldValue!==null)result.push({name:currentNode.name,value:fieldValue})}else{var subresult=getFormValues(currentNode);result=result.concat(subresult)}currentNode=currentNode.nextSibling}return result}function getFieldValue(fieldNode){switch(fieldNode.nodeName){case"INPUT":case"TEXTAREA":switch(fieldNode.type.toLowerCase()){case"radio":case"checkbox":if(fieldNode.checked)return fieldNode.value;break;case"button":case"reset":case"submit":case"image":return"";break;default:return fieldNode.value;break}break;case"SELECT":return getSelectedOptionValue(fieldNode);break;default:break}return null}function getSelectedOptionValue(selectNode){var multiple=selectNode.multiple;if(!multiple)return selectNode.value;var result=[];for(var options=selectNode.getElementsByTagName("option"),i=0,l=options.length;i<l;i++){if(options[i].selected)result.push(options[i].value)}return result}window.form2json=window.form2object})();Sammy.Form2JSON=function(app){app._parseFormParams=function(form){return form2object(form[0])}};return Sammy.Form2JSON});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.googleanalytics.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).GoogleAnalytics=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.GoogleAnalytics=function(app,tracker){var _tracker=tracker||window.pageTracker,trackerName="send",shouldTrack=true;if(typeof tracker=="string"||tracker instanceof String){trackerName=tracker+".send"}function disableTracking(){shouldTrack=false}function enableTracking(){shouldTrack=true}function trackPageview(path){if(typeof ga=="function"){ga(trackerName,"pageview",{page:path})}else if(typeof _gaq!="undefined"){_gaq.push(["_trackPageview",path])}else if(typeof _tracker!="undefined"){_tracker._trackPageview(path)}}this.helpers({noTrack:function(){disableTracking()},track:function(path){if((typeof _tracker!="undefined"||typeof _gaq!="undefined"||typeof ga=="function")&&shouldTrack){this.log("tracking google analytics",path);trackPageview(path)}}});this.bind("event-context-after",function(){var path=this.app.last_location[1];if(path){this.track(path);enableTracking()}})};return Sammy.GoogleAnalytics});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.googleanalytics.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).GoogleAnalytics=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.GoogleAnalytics=function(app,tracker){var _tracker=tracker||window.pageTracker,trackerName="send",shouldTrack=true;if(typeof tracker=="string"||tracker instanceof String){trackerName=tracker+".send"}function disableTracking(){shouldTrack=false}function enableTracking(){shouldTrack=true}function trackPageview(path){if(typeof ga=="function"){ga(trackerName,"pageview",{page:path})}else if(typeof _gaq!="undefined"){_gaq.push(["_trackPageview",path])}else if(typeof _tracker!="undefined"){_tracker._trackPageview(path)}}this.helpers({noTrack:function(){disableTracking()},track:function(path){if((typeof _tracker!="undefined"||typeof _gaq!="undefined"||typeof ga=="function")&&shouldTrack){this.log("tracking google analytics",path);trackPageview(path)}}});this.bind("event-context-after",function(){var path=this.app.last_location[1];if(path){this.track(path);enableTracking()}})};return Sammy.GoogleAnalytics});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.haml.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","haml"],factory)}else{(window.Sammy=window.Sammy||{}).Haml=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Haml=function(app,method_alias){var haml_cache={};var haml=function(template,data,name){if(typeof name=="undefined"){name=template}var fn=haml_cache[name];if(!fn){fn=haml_cache[name]=Haml(template)}return fn($.extend({},this,data))};if(!method_alias){method_alias="haml"}app.helper(method_alias,haml)};return Sammy.Haml});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.haml.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","haml"],factory)}else{(window.Sammy=window.Sammy||{}).Haml=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Haml=function(app,method_alias){var haml_cache={};var haml=function(template,data,name){if(typeof name=="undefined"){name=template}var fn=haml_cache[name];if(!fn){fn=haml_cache[name]=Haml(template)}return fn($.extend({},this,data))};if(!method_alias){method_alias="haml"}app.helper(method_alias,haml)};return Sammy.Haml});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.handlebars.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","handlebars"],factory)}else{(window.Sammy=window.Sammy||{}).Handlebars=factory(window.jQuery,window.Sammy)}})(function($,Sammy,Handlebars){Handlebars=Handlebars||window.Handlebars;Sammy.Handlebars=function(app,method_alias){var handlebars_cache={};var handlebars=function(template,data,partials,name){if(typeof name=="undefined"){name=template}var fn=handlebars_cache[name];if(!fn){fn=handlebars_cache[name]=Handlebars.compile(template)}data=$.extend({},this,data);partials=$.extend({},data.partials,partials);return fn(data,{partials:partials})};if(!method_alias){method_alias="handlebars"}app.helper(method_alias,handlebars)};return Sammy.Handlebars});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.handlebars.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:31 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","handlebars"],factory)}else{(window.Sammy=window.Sammy||{}).Handlebars=factory(window.jQuery,window.Sammy)}})(function($,Sammy,Handlebars){Handlebars=Handlebars||window.Handlebars;Sammy.Handlebars=function(app,method_alias){var handlebars_cache={};var handlebars=function(template,data,partials,name){if(typeof name=="undefined"){name=template}var fn=handlebars_cache[name];if(!fn){fn=handlebars_cache[name]=Handlebars.compile(template)}data=$.extend({},this,data);partials=$.extend({},data.partials,partials);return fn(data,{partials:partials})};if(!method_alias){method_alias="handlebars"}app.helper(method_alias,handlebars)};return Sammy.Handlebars});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.hogan.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","hogan"],factory)}else{(window.Sammy=window.Sammy||{}).Hogan=factory(window.jQuery,window.Sammy,window.Hogan)}})(function($,Sammy){Sammy.Hogan=function(app,method_alias){var cached_templates={};var hogan=function(template,data,partials){var compiled_template=cached_templates[compiled_template];if(!compiled_template){compiled_template=Hogan.compile(template)}data=$.extend({},this,data);partials=$.extend({},data.partials,partials);return compiled_template.render(data,partials)};if(!method_alias){method_alias="hogan"}app.helper(method_alias,hogan)};return Sammy.Hogan});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.hogan.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","hogan"],factory)}else{(window.Sammy=window.Sammy||{}).Hogan=factory(window.jQuery,window.Sammy,window.Hogan)}})(function($,Sammy){Sammy.Hogan=function(app,method_alias){var cached_templates={};var hogan=function(template,data,partials){var compiled_template=cached_templates[compiled_template];if(!compiled_template){compiled_template=Hogan.compile(template)}data=$.extend({},this,data);partials=$.extend({},data.partials,partials);return compiled_template.render(data,partials)};if(!method_alias){method_alias="hogan"}app.helper(method_alias,hogan)};return Sammy.Hogan});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.hoptoad.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Hoptoad=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Hoptoad=function(app,errorReporter){errorReporter=errorReporter||window.Hoptoad;app.bind("error",function(e,data){if(data&&data.error){errorReporter.notify(data.error)}})};return Sammy.Hoptoad});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.hoptoad.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Hoptoad=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Hoptoad=function(app,errorReporter){errorReporter=errorReporter||window.Hoptoad;app.bind("error",function(e,data){if(data&&data.error){errorReporter.notify(data.error)}})};return Sammy.Hoptoad});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.json.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).JSON=factory(window.jQuery,window.Sammy)}})(function($,Sammy){if(!window.JSON){window.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){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(key){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;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else if(typeof space==="string"){indent=space}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.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,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();Sammy.JSON=function(app){app.helpers({json:function(object){if(typeof object=="string"){return JSON.parse(object)}else{return JSON.stringify(object)}}})};return Sammy.JSON});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.json.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).JSON=factory(window.jQuery,window.Sammy)}})(function($,Sammy){if(!window.JSON){window.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){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(key){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;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else if(typeof space==="string"){indent=space}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.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,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();Sammy.JSON=function(app){app.helpers({json:function(object){if(typeof object=="string"){return JSON.parse(object)}else{return JSON.stringify(object)}}})};return Sammy.JSON});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.kissmetrics.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).JSON=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.KISSmetrics=function(app){var shouldTrack=true;function disableTracking(){shouldTrack=false}function enableTracking(){shouldTrack=true}this.helpers({doNotTrackKISSmetrics:function(){disableTracking()},trackKISSmetrics:function(path){if(typeof window._kmq!="undefined"&&shouldTrack){this.log("tracking KISSmetrics",path);window._kmq.push(["record",path])}}});this.bind("event-context-after",function(){var path=this.app.last_location[1];if(path){this.trackKISSmetrics(path);enableTracking()}})};return Sammy.KISSmetrics});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.kissmetrics.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).JSON=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.KISSmetrics=function(app){var shouldTrack=true;function disableTracking(){shouldTrack=false}function enableTracking(){shouldTrack=true}this.helpers({doNotTrackKISSmetrics:function(){disableTracking()},trackKISSmetrics:function(path){if(typeof window._kmq!="undefined"&&shouldTrack){this.log("tracking KISSmetrics",path);window._kmq.push(["record",path])}}});this.bind("event-context-after",function(){var path=this.app.last_location[1];if(path){this.trackKISSmetrics(path);enableTracking()}})};return Sammy.KISSmetrics});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.meld.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Meld=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Meld=function(app,method_alias){var default_options={selector:function(k){return"."+k},remove_false:true};var meld=function(template,data,options){var $template=$(template);options=$.extend(default_options,options||{});if(typeof data==="string"){$template.html(data)}else{$.each(data,function(key,value){var selector=options.selector(key),$sub=$template.filter(selector),$container,$item,is_list=false,subindex=$template.index($sub);if($sub.length===0){$sub=$template.find(selector)}if($sub.length>0){if($.isArray(value)){$container=$("<div/>");if($sub.is("ol, ul")){is_list=true;$item=$sub.children("li:first");if($item.length==0){$item=$("<li/>")}}else if($sub.children().length==1){is_list=true;$item=$sub.children(":first").clone()}else{$item=$sub.clone()}for(var i=0;i<value.length;i++){$container.append(meld($item.clone(),value[i],options))}if(is_list){$sub.html($container.html())}else if($sub[0]==$template[0]){$template=$($container.html())}else if(subindex>=0){var args=[subindex,1];args=args.concat($container.children().get());$template.splice.apply($template,args)}}else if(options.remove_false&&value===false){$template.splice(subindex,1)}else if(typeof value==="object"){if($sub.is(":empty")){$sub.attr(value,true)}else{$sub.html(meld($sub.html(),value,options))}}else{$sub.html(value.toString())}}else{$template.attr(key,value,true)}})}var dom=$template;return dom};if(!method_alias)method_alias="meld";app.helper(method_alias,meld)};return Sammy.Meld});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.meld.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Meld=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Meld=function(app,method_alias){var default_options={selector:function(k){return"."+k},remove_false:true};var meld=function(template,data,options){var $template=$(template);options=$.extend(default_options,options||{});if(typeof data==="string"){$template.html(data)}else{$.each(data,function(key,value){var selector=options.selector(key),$sub=$template.filter(selector),$container,$item,is_list=false,subindex=$template.index($sub);if($sub.length===0){$sub=$template.find(selector)}if($sub.length>0){if($.isArray(value)){$container=$("<div/>");if($sub.is("ol, ul")){is_list=true;$item=$sub.children("li:first");if($item.length==0){$item=$("<li/>")}}else if($sub.children().length==1){is_list=true;$item=$sub.children(":first").clone()}else{$item=$sub.clone()}for(var i=0;i<value.length;i++){$container.append(meld($item.clone(),value[i],options))}if(is_list){$sub.html($container.html())}else if($sub[0]==$template[0]){$template=$($container.html())}else if(subindex>=0){var args=[subindex,1];args=args.concat($container.children().get());$template.splice.apply($template,args)}}else if(options.remove_false&&value===false){$template.splice(subindex,1)}else if(typeof value==="object"){if($sub.is(":empty")){$sub.attr(value,true)}else{$sub.html(meld($sub.html(),value,options))}}else{$sub.html(value.toString())}}else{$template.attr(key,value,true)}})}var dom=$template;return dom};if(!method_alias)method_alias="meld";app.helper(method_alias,meld)};return Sammy.Meld});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.mixpanel.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Flash=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Mixpanel=function(app){var shouldTrack=true;function disableTracking(){shouldTrack=false}function enableTracking(){shouldTrack=true}this.helpers({doNotTrackMixpanel:function(){disableTracking()},trackMixpanel:function(path){if(typeof window.mixpanel!="undefined"&&shouldTrack){this.log("tracking mixpanel",path);window.mixpanel.track(path)}}});this.bind("event-context-after",function(){var path=this.app.last_location[1];if(path){this.trackMixpanel(path);enableTracking()}})};return Sammy.Mixpanel});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.mixpanel.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:32 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Flash=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Mixpanel=function(app){var shouldTrack=true;function disableTracking(){shouldTrack=false}function enableTracking(){shouldTrack=true}this.helpers({doNotTrackMixpanel:function(){disableTracking()},trackMixpanel:function(path){if(typeof window.mixpanel!="undefined"&&shouldTrack){this.log("tracking mixpanel",path);window.mixpanel.track(path)}}});this.bind("event-context-after",function(){var path=this.app.last_location[1];if(path){this.trackMixpanel(path);enableTracking()}})};return Sammy.Mixpanel});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.mustache.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","mustache"],factory)}else{(window.Sammy=window.Sammy||{}).Mustache=factory(window.jQuery,window.Sammy,window.Mustache)}})(function($,Sammy,Mustache){Sammy.Mustache=function(app,method_alias){var mustache=function(template,data,partials){data=$.extend({},this,data);partials=$.extend({},data.partials,partials);return Mustache.to_html(template,data,partials)};if(!method_alias){method_alias="mustache"}app.helper(method_alias,mustache)};return Sammy.Mustache});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.mustache.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","mustache"],factory)}else{(window.Sammy=window.Sammy||{}).Mustache=factory(window.jQuery,window.Sammy,window.Mustache)}})(function($,Sammy,Mustache){Sammy.Mustache=function(app,method_alias){var mustache=function(template,data,partials){data=$.extend({},this,data);partials=$.extend({},data.partials,partials);return Mustache.to_html(template,data,partials)};if(!method_alias){method_alias="mustache"}app.helper(method_alias,mustache)};return Sammy.Mustache});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.nested_params.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).NestedParams=factory(window.jQuery,window.Sammy)}})(function($,Sammy){function parseValue(value){value=unescape(value);if(value==="true"){return true}else if(value==="false"){return false}else{return value}}function parseNestedParam(params,field_name,field_value){var match,name,rest;if(field_name.match(/^[^\[]+$/)){params[field_name]=parseValue(field_value)}else if(match=field_name.match(/^([^\[]+)\[\](.*)$/)){name=match[1];rest=match[2];if(params[name]&&!$.isArray(params[name])){throw"400 Bad Request"}if(rest){match=rest.match(/^\[([^\]]+)\](.*)$/);if(!match){throw"400 Bad Request"}if(params[name]){if(params[name][params[name].length-1][match[1]]){params[name].push(parseNestedParam({},match[1]+match[2],field_value))}else{$.extend(true,params[name][params[name].length-1],parseNestedParam({},match[1]+match[2],field_value))}}else{params[name]=[parseNestedParam({},match[1]+match[2],field_value)]}}else{if(params[name]){params[name].push(parseValue(field_value))}else{params[name]=[parseValue(field_value)]}}}else if(match=field_name.match(/^([^\[]+)\[([^\[]+)\](.*)$/)){name=match[1];rest=match[2]+match[3];if(params[name]&&$.isArray(params[name])){throw"400 Bad Request"}if(params[name]){$.extend(true,params[name],parseNestedParam(params[name],rest,field_value))}else{params[name]=parseNestedParam({},rest,field_value)}}return params}Sammy.NestedParams=function(app){app._parseParamPair=parseNestedParam};return Sammy.NestedParams});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.nested_params.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).NestedParams=factory(window.jQuery,window.Sammy)}})(function($,Sammy){function parseValue(value){value=unescape(value);if(value==="true"){return true}else if(value==="false"){return false}else{return value}}function parseNestedParam(params,field_name,field_value){var match,name,rest;if(field_name.match(/^[^\[]+$/)){params[field_name]=parseValue(field_value)}else if(match=field_name.match(/^([^\[]+)\[\](.*)$/)){name=match[1];rest=match[2];if(params[name]&&!$.isArray(params[name])){throw"400 Bad Request"}if(rest){match=rest.match(/^\[([^\]]+)\](.*)$/);if(!match){throw"400 Bad Request"}if(params[name]){if(params[name][params[name].length-1][match[1]]){params[name].push(parseNestedParam({},match[1]+match[2],field_value))}else{$.extend(true,params[name][params[name].length-1],parseNestedParam({},match[1]+match[2],field_value))}}else{params[name]=[parseNestedParam({},match[1]+match[2],field_value)]}}else{if(params[name]){params[name].push(parseValue(field_value))}else{params[name]=[parseValue(field_value)]}}}else if(match=field_name.match(/^([^\[]+)\[([^\[]+)\](.*)$/)){name=match[1];rest=match[2]+match[3];if(params[name]&&$.isArray(params[name])){throw"400 Bad Request"}if(params[name]){$.extend(true,params[name],parseNestedParam(params[name],rest,field_value))}else{params[name]=parseNestedParam({},rest,field_value)}}return params}Sammy.NestedParams=function(app){app._parseParamPair=parseNestedParam};return Sammy.NestedParams});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.oauth2.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).OAuth2=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.OAuth2=function(app){app.use("JSON");this.authorize="/oauth/authorize";this.helper("requireOAuth",function(cb){if(this.app.getAccessToken()){if(cb){cb.apply(this)}}else{this.redirect(this.app.authorize+"?state="+escape(this.path));return false}});this.helper("loseAccessToken",function(){this.app.loseAccessToken()});this.requireOAuth=function(options){this.before(options||{},function(context){return context.requireOAuth()})};this.getAccessToken=function(){return this.session("oauth.token")};this.setAccessToken=function(token){this.session("oauth.token",token);this.trigger("oauth.connected")};this.loseAccessToken=function(){this.session("oauth.token",null);this.trigger("oauth.disconnected")};$(document).ajaxSend(function(evt,xhr){var token=app.getAccessToken();if(token){xhr.setRequestHeader("Authorization","OAuth "+token)}});function parseParams(path){var hash=path.match(/#(.*)$/)[1];var pairs=hash.split("&"),params={};var i,len=pairs.length;for(i=0;i<len;i+=1){var splat=pairs[i].split("=");params[splat[0]]=splat[1].replace(/\+/g," ")}return params}var start_url;this.bind("run",function(evt,params){start_url=params.start_url||"#";if(this.app.getAccessToken()){this.trigger("oauth.connected")}});this.before(/#(access_token=|[^\\].*\&access_token=)/,function(context){var params=parseParams(context.path);this.app.setAccessToken(params.access_token);context.redirect(params.state.length===0?this.app.start_url:unescape(params.state));return false}).get(/#(access_token=|[^\\].*\&access_token=)/,function(context){});this.before(/#(error=|[^\\].*\&error=)/,function(context){var params=parseParams(context.path);var message=params.error_description||"Access denined";context.trigger("oauth.denied",{code:params.error,message:message});return false}).get(/#(error=|[^\\].*\&error=)/,function(context){})};return Sammy.OAuth2});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.oauth2.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).OAuth2=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.OAuth2=function(app){app.use("JSON");this.authorize="/oauth/authorize";this.helper("requireOAuth",function(cb){if(this.app.getAccessToken()){if(cb){cb.apply(this)}}else{this.redirect(this.app.authorize+"?state="+escape(this.path));return false}});this.helper("loseAccessToken",function(){this.app.loseAccessToken()});this.requireOAuth=function(options){this.before(options||{},function(context){return context.requireOAuth()})};this.getAccessToken=function(){return this.session("oauth.token")};this.setAccessToken=function(token){this.session("oauth.token",token);this.trigger("oauth.connected")};this.loseAccessToken=function(){this.session("oauth.token",null);this.trigger("oauth.disconnected")};$(document).ajaxSend(function(evt,xhr){var token=app.getAccessToken();if(token){xhr.setRequestHeader("Authorization","OAuth "+token)}});function parseParams(path){var hash=path.match(/#(.*)$/)[1];var pairs=hash.split("&"),params={};var i,len=pairs.length;for(i=0;i<len;i+=1){var splat=pairs[i].split("=");params[splat[0]]=splat[1].replace(/\+/g," ")}return params}var start_url;this.bind("run",function(evt,params){start_url=params.start_url||"#";if(this.app.getAccessToken()){this.trigger("oauth.connected")}});this.before(/#(access_token=|[^\\].*\&access_token=)/,function(context){var params=parseParams(context.path);this.app.setAccessToken(params.access_token);context.redirect(params.state.length===0?this.app.start_url:unescape(params.state));return false}).get(/#(access_token=|[^\\].*\&access_token=)/,function(context){});this.before(/#(error=|[^\\].*\&error=)/,function(context){var params=parseParams(context.path);var message=params.error_description||"Access denined";context.trigger("oauth.denied",{code:params.error,message:message});return false}).get(/#(error=|[^\\].*\&error=)/,function(context){})};return Sammy.OAuth2});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.path_location_proxy.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).PathLocationProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.PathLocationProxy=function(app){this.app=app};$.extend(Sammy.PathLocationProxy.prototype,{bind:function(){},unbind:function(){},getLocation:function(){return[window.location.pathname,window.location.search].join("")},setLocation:function(new_location){return window.location=new_location}});return Sammy.PathLocationProxy});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.path_location_proxy.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).PathLocationProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.PathLocationProxy=function(app){this.app=app};$.extend(Sammy.PathLocationProxy.prototype,{bind:function(){},unbind:function(){},getLocation:function(){return[window.location.pathname,window.location.search].join("")},setLocation:function(new_location){return window.location=new_location}});return Sammy.PathLocationProxy});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.pure.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","pure"],factory)}else{(window.Sammy=window.Sammy||{}).Pure=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Pure=function(app,method_alias){var pure=function(template,data,directives){return $(template).autoRender(data,directives)};if(!method_alias){method_alias="pure"}app.helper(method_alias,pure)};return Sammy.Pure});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.pure.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","pure"],factory)}else{(window.Sammy=window.Sammy||{}).Pure=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Pure=function(app,method_alias){var pure=function(template,data,directives){return $(template).autoRender(data,directives)};if(!method_alias){method_alias="pure"}app.helper(method_alias,pure)};return Sammy.Pure});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.push_location_proxy.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).PushLocationProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.PushLocationProxy=function(app,selector){this.app=app;this.selector=selector||"a"};$.extend(Sammy.PushLocationProxy.prototype,{bind:function(){var proxy=this;$(window).bind("popstate",function(e){proxy.app.trigger("location-changed")});this.app.$element().on("click",this.selector,function(e){if(location.hostname==this.hostname){e.preventDefault();proxy.setLocation($(this).attr("href"));proxy.app.trigger("location-changed")}})},unbind:function(){this.app.$element().off("click",this.selector);$(window).unbind("popstate")},getLocation:function(){return window.location.pathname},setLocation:function(new_location){history.pushState({path:this.path},"",new_location)}});return Sammy.PushLocationProxy});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.push_location_proxy.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:33 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).PushLocationProxy=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.PushLocationProxy=function(app,selector){this.app=app;this.selector=selector||"a"};$.extend(Sammy.PushLocationProxy.prototype,{bind:function(){var proxy=this;$(window).bind("popstate",function(e){proxy.app.trigger("location-changed")});this.app.$element().on("click",this.selector,function(e){if(location.hostname==this.hostname){e.preventDefault();proxy.setLocation($(this).attr("href"));proxy.app.trigger("location-changed")}})},unbind:function(){this.app.$element().off("click",this.selector);$(window).unbind("popstate")},getLocation:function(){return window.location.pathname},setLocation:function(new_location){history.pushState({path:this.path},"",new_location)}});return Sammy.PushLocationProxy});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.template.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:34 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Template=factory(window.jQuery,window.Sammy)}})(function($,Sammy){var srender_cache={};var srender=function(name,template,data,options){var fn,escaped_string;if(srender_cache[name]){fn=srender_cache[name]}else{if(typeof template=="undefined"){return false}if(options&&options.escape_html===false){escaped_string='",$1,"'}else{escaped_string='",h($1),"'}fn=srender_cache[name]=new Function("obj","var ___$$$___=[],print=function(){___$$$___.push.apply(___$$$___,arguments);};"+'with(obj){___$$$___.push("'+String(template).replace(/[\r\t\n]/g," ").replace(/\"/g,'\\"').split("<%").join(" ").replace(/((^|%>)[^\t]*)/g,"$1\r").replace(/\t=(.*?)%>/g,escaped_string).replace(/\t!(.*?)%>/g,'",$1,"').split(" ").join('");').split("%>").join('___$$$___.push("').split("\r").join("")+"\");}return ___$$$___.join('');")}if(typeof data!="undefined"){return fn(data)}else{return fn}};Sammy.Template=function(app,method_alias){var template=function(template,data,name,options){if(typeof name=="undefined"){name=template}if(typeof options=="undefined"&&typeof name=="object"){options=name;name=template}return srender(name,template,$.extend({},this,data),options)};if(!method_alias){method_alias="template"}app.helper(method_alias,template)};return Sammy.Template});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.template.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:34 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Template=factory(window.jQuery,window.Sammy)}})(function($,Sammy){var srender_cache={};var srender=function(name,template,data,options){var fn,escaped_string;if(srender_cache[name]){fn=srender_cache[name]}else{if(typeof template=="undefined"){return false}if(options&&options.escape_html===false){escaped_string='",$1,"'}else{escaped_string='",h($1),"'}fn=srender_cache[name]=new Function("obj","var ___$$$___=[],print=function(){___$$$___.push.apply(___$$$___,arguments);};"+'with(obj){___$$$___.push("'+String(template).replace(/[\r\t\n]/g," ").replace(/\"/g,'\\"').split("<%").join(" ").replace(/((^|%>)[^\t]*)/g,"$1\r").replace(/\t=(.*?)%>/g,escaped_string).replace(/\t!(.*?)%>/g,'",$1,"').split(" ").join('");').split("%>").join('___$$$___.push("').split("\r").join("")+"\");}return ___$$$___.join('');")}if(typeof data!="undefined"){return fn(data)}else{return fn}};Sammy.Template=function(app,method_alias){var template=function(template,data,name,options){if(typeof name=="undefined"){name=template}if(typeof options=="undefined"&&typeof name=="object"){options=name;name=template}return srender(name,template,$.extend({},this,data),options)};if(!method_alias){method_alias="template"}app.helper(method_alias,template)};return Sammy.Template});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.title.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:34 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Title=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Title=function(){this.setTitle=function(title){if(!$.isFunction(title)){this.title_function=function(additional_title){return[title,additional_title].join(" ")}}else{this.title_function=title}};this.helper("title",function(){var new_title=$.makeArray(arguments).join(" ");if(this.app.title_function){new_title=this.app.title_function(new_title)}document.title=new_title})};return Sammy.Title});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.title.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:34 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy"],factory)}else{(window.Sammy=window.Sammy||{}).Title=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Title=function(){this.setTitle=function(title){if(!$.isFunction(title)){this.title_function=function(additional_title){return[title,additional_title].join(" ")}}else{this.title_function=title}};this.helper("title",function(){var new_title=$.makeArray(arguments).join(" ");if(this.app.title_function){new_title=this.app.title_function(new_title)}document.title=new_title})};return Sammy.Title});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.tmpl.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:34 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","jquery.tmpl"],factory)}else{(window.Sammy=window.Sammy||{}).Tmpl=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Tmpl=function(app,method_alias){var template=function(template,data,partials){var name=template;if(!$.template[name]){$.template(name,template)}data=$.extend({},this,data);partials=$.extend({},data.partials,partials);for(partial in partials){if(!$.template[partial]){$.template(partial,partials[partial])}}return $.tmpl(name,$.extend({},this,data))};if(!method_alias){method_alias="tmpl"}app.helper(method_alias,template)};return Sammy.Tmpl});
|
||||
@@ -0,0 +1,5 @@
|
||||
// -- Sammy.js -- /plugins/sammy.tmpl.js
|
||||
// http://sammyjs.org
|
||||
// Version: 0.7.6
|
||||
// Built: 2014-08-26 10:45:34 +0300
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","sammy","jquery.tmpl"],factory)}else{(window.Sammy=window.Sammy||{}).Tmpl=factory(window.jQuery,window.Sammy)}})(function($,Sammy){Sammy.Tmpl=function(app,method_alias){var template=function(template,data,partials){var name=template;if(!$.template[name]){$.template(name,template)}data=$.extend({},this,data);partials=$.extend({},data.partials,partials);for(partial in partials){if(!$.template[partial]){$.template(partial,partials[partial])}}return $.tmpl(name,$.extend({},this,data))};if(!method_alias){method_alias="tmpl"}app.helper(method_alias,template)};return Sammy.Tmpl});
|
||||
Reference in New Issue
Block a user