Browse files

Added 'full' build

  • Loading branch information...
1 parent ee74955 commit 29176e7b730f4dbc3f4d5e3da78161b6e21c77b4 @rgr-myrg committed May 8, 2011
Showing with 20 additions and 0 deletions.
  1. +10 −0 build/devshop-full.js
  2. +10 −0 examples/devshop-full.js
View
10 build/devshop-full.js
@@ -0,0 +1,10 @@
+/**
+ * Copyright (c) 2011 Roger Myrg http://devshop.me/
+ * Released under the MIT license:
+ * https://github.com/rgr-myrg/DevShop-JS/raw/master/MIT-LICENSE
+ */
+(function(){window.DevShop=typeof window.DevShop==="object"?window.DevShop:{};window.DevShop.Me=function(d){for(var b in d)d.hasOwnProperty(b)&&(window.DevShop[b]=d[b]);DevShop=devshop=window.DevShop}})();(function(){DevShop.Me({SingletonFactory:function(d){var b=function(a){if(typeof a==="function")try{return new a}catch(c){}else if(typeof a==="object")return a},e=b(d.implement),a=b(d.extend),b=b(d.instance),c;for(c in a)a.hasOwnProperty(c)&&(b[c]||(b[c]=a[c]));for(c in e)if(e.hasOwnProperty(c)&&!b[c])throw d.instance+" must implement '"+c+"' "+typeof e[c];if(typeof b.initialize==="function")try{b.initialize()}catch(h){}return b}})})();(function(){DevShop.Me({Observable:function(d){return DevShop.SingletonFactory({extend:function(){this.observers=[];this.addObserver=function(b){if((typeof b==="function"||typeof b==="object")&&typeof b.notify==="function")if(this.observers.push(b),typeof b.onRegister==="function")try{b.onRegister()}catch(d){}};this.notifyObservers=function(b){for(var d=this.observers.length,a=0;a<d;a++)try{this.observers[a].notify(b,this)}catch(c){}}},instance:d})}})})();(function(){DevShop.Me({Observer:function(d){return DevShop.SingletonFactory({extend:function(){this.onRegister=function(){};this.notify=function(b,d){this.observable=d;if(typeof this[b]==="function")try{this[b]()}catch(a){}}},instance:d})}})})();(function(){DevShop.Me({EventSignal:function(){var d=[];this.addListener=function(b){typeof b==="function"&&d.push(b)};this.removeListener=function(b){for(var e=d.length,a=0;a<e;a++)d[a]===b&&d.splice(a)};this.dispatch=function(){for(var b=d.length,e=0;e<b;e++)try{d[e].apply(this,arguments)}catch(a){}}}})})();(function(){DevShop.Me({ProxyInterface:{NAME:""},MediatorInterface:{NAME:"",listNotificationInterests:function(){},handleNotification:function(){}},CommandInterface:{execute:function(){}},Proxy:function(){var d={};this.facade=null;this.setData=function(b){d=b};this.getData=function(){return d};this.onRegister=function(){};this.onRemove=function(){}},Mediator:new DevShop.Observer(function(){this.facade=null;this.onRegister=function(){};this.onRemove=function(){}}),Facade:function(){var d=new function(){var a=
+{};this.facade={};this.registerProxy=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c);if(typeof c.onRegister==="function")c.onRegister()};this.retrieveProxy=function(c){return a[c]?a[c]:null};this.removeProxy=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null}},b=new DevShop.Observable(function(){var a={};this.facade={};this.notification={};this.registerMediator=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c,this.addObserver(c))};this.retrieveMediator=
+function(c){return a[c]?a[c]:null};this.removeMediator=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null};this.notifyObservers=function(a){for(var b=this.observers.length,d=0;d<b;d++)try{for(var e=this.observers[d].listNotificationInterests(),g=!1,f=0;l=e.length,f<l;f++)if(e[f]==this.notification.name){g=!0;break}if(g)this.observers[d].notification=this.notification,this.observers[d].notify(a,this)}catch(i){}};this.sendNotification=function(a){this.notification=
+a;this.notifyObservers("handleNotification")}}),e=new DevShop.Observer(function(){var a={},c=[];this.facade={};this.NAME="DevShop.Controller";this.registerCommand=function(b,d){d.facade=this.facade;a[b]||(a[b]=d,c.push(b))};this.listNotificationInterests=function(){return c};this.handleNotification=function(){var b=this.notification;if(typeof a[b.name]==="object"&&typeof a[b.name].execute==="function")try{a[b.name].execute(b)}catch(c){}}});this.CMD_STARTUP="CMD_STARTUP";this.registerProxy=function(a){d.registerProxy(a)};
+this.registerMediator=function(a){b.registerMediator(a)};this.registerCommand=function(a,b){e.registerCommand(a,b)};this.retrieveProxy=function(a){return d.retrieveProxy(a)};this.retrieveMediator=function(a){return b.retrieveMediator(a)};this.removeProxy=function(a){d.removeProxy(a)};this.removeMediator=function(a){b.removeMediator(a)};this.sendNotification=function(a,c,d){b.sendNotification({name:a,body:c,type:d})};this.initializeFacade=function(a){d.facade=a;b.facade=a;e.facade=a;a.registerMediator(e)}}})})();
View
10 examples/devshop-full.js
@@ -0,0 +1,10 @@
+/**
+ * Copyright (c) 2011 Roger Myrg http://devshop.me/
+ * Released under the MIT license:
+ * https://github.com/rgr-myrg/DevShop-JS/raw/master/MIT-LICENSE
+ */
+(function(){window.DevShop=typeof window.DevShop==="object"?window.DevShop:{};window.DevShop.Me=function(d){for(var b in d)d.hasOwnProperty(b)&&(window.DevShop[b]=d[b]);DevShop=devshop=window.DevShop}})();(function(){DevShop.Me({SingletonFactory:function(d){var b=function(a){if(typeof a==="function")try{return new a}catch(c){}else if(typeof a==="object")return a},e=b(d.implement),a=b(d.extend),b=b(d.instance),c;for(c in a)a.hasOwnProperty(c)&&(b[c]||(b[c]=a[c]));for(c in e)if(e.hasOwnProperty(c)&&!b[c])throw d.instance+" must implement '"+c+"' "+typeof e[c];if(typeof b.initialize==="function")try{b.initialize()}catch(h){}return b}})})();(function(){DevShop.Me({Observable:function(d){return DevShop.SingletonFactory({extend:function(){this.observers=[];this.addObserver=function(b){if((typeof b==="function"||typeof b==="object")&&typeof b.notify==="function")if(this.observers.push(b),typeof b.onRegister==="function")try{b.onRegister()}catch(d){}};this.notifyObservers=function(b){for(var d=this.observers.length,a=0;a<d;a++)try{this.observers[a].notify(b,this)}catch(c){}}},instance:d})}})})();(function(){DevShop.Me({Observer:function(d){return DevShop.SingletonFactory({extend:function(){this.onRegister=function(){};this.notify=function(b,d){this.observable=d;if(typeof this[b]==="function")try{this[b]()}catch(a){}}},instance:d})}})})();(function(){DevShop.Me({EventSignal:function(){var d=[];this.addListener=function(b){typeof b==="function"&&d.push(b)};this.removeListener=function(b){for(var e=d.length,a=0;a<e;a++)d[a]===b&&d.splice(a)};this.dispatch=function(){for(var b=d.length,e=0;e<b;e++)try{d[e].apply(this,arguments)}catch(a){}}}})})();(function(){DevShop.Me({ProxyInterface:{NAME:""},MediatorInterface:{NAME:"",listNotificationInterests:function(){},handleNotification:function(){}},CommandInterface:{execute:function(){}},Proxy:function(){var d={};this.facade=null;this.setData=function(b){d=b};this.getData=function(){return d};this.onRegister=function(){};this.onRemove=function(){}},Mediator:new DevShop.Observer(function(){this.facade=null;this.onRegister=function(){};this.onRemove=function(){}}),Facade:function(){var d=new function(){var a=
+{};this.facade={};this.registerProxy=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c);if(typeof c.onRegister==="function")c.onRegister()};this.retrieveProxy=function(c){return a[c]?a[c]:null};this.removeProxy=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null}},b=new DevShop.Observable(function(){var a={};this.facade={};this.notification={};this.registerMediator=function(c){c.facade=this.facade;a[c.NAME]||(a[c.NAME]=c,this.addObserver(c))};this.retrieveMediator=
+function(c){return a[c]?a[c]:null};this.removeMediator=function(c){if(typeof a[c].onRemove==="function")try{a[c].onRemove()}catch(b){}a[c]=null};this.notifyObservers=function(a){for(var b=this.observers.length,d=0;d<b;d++)try{for(var e=this.observers[d].listNotificationInterests(),g=!1,f=0;l=e.length,f<l;f++)if(e[f]==this.notification.name){g=!0;break}if(g)this.observers[d].notification=this.notification,this.observers[d].notify(a,this)}catch(i){}};this.sendNotification=function(a){this.notification=
+a;this.notifyObservers("handleNotification")}}),e=new DevShop.Observer(function(){var a={},c=[];this.facade={};this.NAME="DevShop.Controller";this.registerCommand=function(b,d){d.facade=this.facade;a[b]||(a[b]=d,c.push(b))};this.listNotificationInterests=function(){return c};this.handleNotification=function(){var b=this.notification;if(typeof a[b.name]==="object"&&typeof a[b.name].execute==="function")try{a[b.name].execute(b)}catch(c){}}});this.CMD_STARTUP="CMD_STARTUP";this.registerProxy=function(a){d.registerProxy(a)};
+this.registerMediator=function(a){b.registerMediator(a)};this.registerCommand=function(a,b){e.registerCommand(a,b)};this.retrieveProxy=function(a){return d.retrieveProxy(a)};this.retrieveMediator=function(a){return b.retrieveMediator(a)};this.removeProxy=function(a){d.removeProxy(a)};this.removeMediator=function(a){b.removeMediator(a)};this.sendNotification=function(a,c,d){b.sendNotification({name:a,body:c,type:d})};this.initializeFacade=function(a){d.facade=a;b.facade=a;e.facade=a;a.registerMediator(e)}}})})();

0 comments on commit 29176e7

Please sign in to comment.