Click here to Skip to main content
15,893,904 members
Articles / Web Development / ASP.NET

Monorail Hands-On

Rate me:
Please Sign up or sign in to vote.
4.78/5 (15 votes)
19 Feb 2008CPOL9 min read 71.3K   1.1K   40  
In this article, I will present a sample application using the Monorail framework and provide the basic concepts of the design pattern known as MVC.
/*
 * Ext JS Library 1.0.1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://www.extjs.com/license
 */

YAHOO.ext=Ext;YAHOO.extendX=Ext.extend;YAHOO.namespaceX=Ext.namespace;Ext.Strict=Ext.isStrict;Ext.util.Config={};Ext.util.Config.apply=Ext.apply;Ext.util.Browser=Ext;YAHOO.override=Ext.override;YAHOO.util.CustomEvent.prototype.fireDirect=function(){var _1=this.subscribers.length;for(var i=0;i<_1;++i){var s=this.subscribers[i];if(s){var _4=(s.override)?s.obj:this.scope;if(s.fn.apply(_4,arguments)===false){return false;}}}return true;};Ext.apply(Ext.util.Observable.prototype,{delayedListener:function(_5,fn,_7,_8){return this.addListener(_5,fn,{scope:_7,delay:_8||10});},bufferedListener:function(_9,fn,_b,_c){return this.addListener(_9,fn,{scope:_b,buffer:_c||250});}});Ext.apply(Ext.Element.prototype,{getChildrenByTagName:function(_d){var _e=this.dom.getElementsByTagName(_d);var _f=_e.length;var ce=new Array(_f);for(var i=0;i<_f;++i){ce[i]=El.get(_e[i],true);}return ce;},getChildrenByClassName:function(_12,_13){var _14=D.getElementsByClassName(_12,_13,this.dom);var len=_14.length;var ce=new Array(len);for(var i=0;i<len;++i){ce[i]=El.get(_14[i],true);}return ce;},setAbsolutePositioned:function(_18){this.setStyle("position","absolute");if(_18){this.setStyle("z-index",_18);}return this;},setRelativePositioned:function(_19){this.setStyle("position","relative");if(_19){this.setStyle("z-index",_19);}return this;},bufferedListener:function(_1a,fn,_1c,_1d){return this.on(_1a,fn,_1c||this,{buffer:_1d||250});},addHandler:function(_1e,_1f,_20,_21,_22){return this.on(_1e,fn,_21||this,{stopPropagation:_1f,preventDefault:true});},addManagedListener:function(_23,fn,_25,_26){return Ext.EventManager.on(this.dom,_23,fn,_25||this);}});Ext.EventObject.findTarget=function(_27,_28){if(_28){_28=_28.toLowerCase();}if(this.browserEvent){function isMatch(el){if(!el){return false;}if(_27&&!D.hasClass(el,_27)){return false;}return !(_28&&el.tagName.toLowerCase()!=_28);}var t=this.getTarget();if(!t||isMatch(t)){return t;}var p=t.parentNode;var b=document.body;while(p&&p!=b){if(isMatch(p)){return p;}p=p.parentNode;}}return null;};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Instructor / Trainer Alura Cursos Online
Brazil Brazil

Comments and Discussions