From 5e63e108539ff04be2fc1bf20c332fabed1fb3ea Mon Sep 17 00:00:00 2001 From: Greg Pagendam-Turner Date: Mon, 9 Dec 2013 14:33:37 +1000 Subject: [PATCH] Added chaplin v0.11.3 --- ajax/libs/chaplin/0.11.3/chaplin.min.js | 2 ++ ajax/libs/chaplin/package.json | 36 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ajax/libs/chaplin/0.11.3/chaplin.min.js create mode 100644 ajax/libs/chaplin/package.json diff --git a/ajax/libs/chaplin/0.11.3/chaplin.min.js b/ajax/libs/chaplin/0.11.3/chaplin.min.js new file mode 100644 index 000000000..0771bc7d0 --- /dev/null +++ b/ajax/libs/chaplin/0.11.3/chaplin.min.js @@ -0,0 +1,2 @@ +!function(){var t=function(){var t={};var e={};var i=function(){return function(){}};var r=function(t,r){var n={id:t,exports:{}};r(n.exports,i(),n);var o=e[t]=n.exports;return o};var n=function(i){if(e.hasOwnProperty(i))return e[i];if(t.hasOwnProperty(i))return r(i,t[i]);throw new Error('Cannot find module "'+i+'"')};n.register=function(e,i){t[e]=i};return n}();t.register("chaplin/application",function(e,i,r){"use strict";var n,o,s,l,u,a,c,p,h;h=t("underscore");o=t("backbone");p=t("chaplin/mediator");l=t("chaplin/dispatcher");a=t("chaplin/views/layout");s=t("chaplin/composer");c=t("chaplin/lib/router");u=t("chaplin/lib/event_broker");r.exports=n=function(){t.extend=o.Model.extend;h.extend(t.prototype,u);t.prototype.title="";t.prototype.dispatcher=null;t.prototype.layout=null;t.prototype.router=null;t.prototype.composer=null;t.prototype.started=false;function t(t){if(t==null){t={}}this.initialize(t)}t.prototype.initialize=function(t){if(t==null){t={}}if(this.started){throw new Error("Application#initialize: App was already started")}this.initRouter(t.routes,t);this.initDispatcher(t);this.initLayout(t);this.initComposer(t);this.initMediator();return this.start()};t.prototype.initDispatcher=function(t){return this.dispatcher=new l(t)};t.prototype.initLayout=function(t){var e;if(t==null){t={}}if((e=t.title)==null){t.title=this.title}return this.layout=new a(t)};t.prototype.initComposer=function(t){if(t==null){t={}}return this.composer=new s(t)};t.prototype.initMediator=function(){return p.seal()};t.prototype.initRouter=function(t,e){this.router=new c(e);return typeof t==="function"?t(this.router.match):void 0};t.prototype.start=function(){this.router.startHistory();this.started=true;return typeof Object.freeze==="function"?Object.freeze(this):void 0};t.prototype.disposed=false;t.prototype.dispose=function(){var t,e,i,r,n;if(this.disposed){return}t=typeof Object.isFrozen==="function"?Object.isFrozen(this):void 0;i=["dispatcher","layout","router","composer"];for(r=0,n=i.length;r=0){this[i]=r}}}s=this.render;this.render=function(){if(l.disposed){return false}s.apply(l,arguments);if(l.autoAttach){l.attach.apply(l,arguments)}return l};this.subviews=[];this.subviewsByName={};if(this.noWrap){if(this.region){o=c.execute("region:find",this.region);if(o!=null){this.el=o.instance.container!=null?o.instance.region!=null?n(o.instance.container).find(o.selector):o.instance.container:o.instance.$(o.selector)}}if(this.container){this.el=this.container}}e.__super__.constructor.apply(this,arguments);this.delegateListeners();if(this.model){this.listenTo(this.model,"dispose",this.dispose)}if(this.collection){this.listenTo(this.collection,"dispose",function(t){if(!t||t===l.collection){return l.dispose()}})}if(this.regions!=null){c.execute("region:register",this)}if(this.autoRender){this.render()}}e.prototype.delegate=function(t,i,r){var n,s,l,u,c,p;if(o.View.prototype.delegate){return e.__super__.delegate.apply(this,arguments)}if(typeof t!=="string"){throw new TypeError("View#delegate: first argument must be a string")}if(arguments.length===2){u=i}else if(arguments.length===3){p=i;if(typeof p!=="string"){throw new TypeError("View#delegate: "+"second argument must be a string")}u=r}else{throw new TypeError("View#delegate: "+"only two or three arguments are allowed")}if(typeof u!=="function"){throw new TypeError("View#delegate: "+"handler argument must be function")}c=function(){var e,i,r,n;r=t.split(" ");n=[];for(e=0,i=r.length;e1){throw new Error("There must be a single top-level element when "+"using `noWrap`.")}this.undelegateEvents();this.setElement(t.firstChild,true)}else{p(n?this.$el:this.el,e)}}return this};e.prototype.attach=function(){if(this.region!=null){c.execute("region:show",this.region,this)}if(this.container&&!document.body.contains(this.el)){u(this);return this.trigger("addedToDOM")}};e.prototype.disposed=false;e.prototype.dispose=function(){var t,e,i,r,n,o,s,l;if(this.disposed){return}this.unregisterAllRegions();l=this.subviews;for(r=0,o=l.length;r0){r=this.subviewsByName;for(e in r){i=r[e];if(e.slice(0,9)==="itemView:"){t[e.slice(9)]=i}}}return t};e.prototype.filter=function(t,e){var i,r,n,o,s,l,u,a,c=this;this.filterer=t;if(e){this.filterCallback=e}if(e==null){e=this.filterCallback}i=function(){var t;if(c.subviews.length>0){for(t in c.subviewsByName){if(t.slice(0,9)==="itemView:"){return true}}}return false}();if(i){a=this.collection.models;for(n=l=0,u=a.length;l