├── Source
├── 01. Core
│ └── 00. Core.md
├── 02. Class
│ └── 00. Class.md
├── 03. Types
│ ├── 00. Types.md
│ ├── 03. Number.md
│ └── 06. Event.md
├── 16. Slick
│ └── 00. Slick.md
├── 04. Browser
│ └── 00. Browser.md
├── 18. Request
│ └── 00. Request.md
├── 19. Utilities
│ └── 00. Utilities.md
├── 05. Elements
│ ├── 00. Elements.md
│ ├── 81. Element Helpers.md
│ ├── 45. Element CSS Classes.md
│ ├── 41. Styling Elements.md
│ ├── 71. Creating Elements.md
│ ├── 91. Element Storage.md
│ ├── 25. Traversing the DOM.md
│ └── 61. Measuring Elements.md
├── 17. MooTools FX
│ ├── 01. FX.Tween.md
│ └── 00. MooTools FX
└── 00. Introduction
│ ├── 04. Write your code!.md
│ ├── 02. Downloading MooTools.md
│ ├── 03. Adding MooTools to your pages.md
│ ├── 01. Learning JavaScript.md
│ └── 00. Introduction.md
├── assets
├── codemirror
│ ├── css
│ │ ├── baboon.png
│ │ └── docs.css
│ ├── mode
│ │ ├── diff
│ │ │ ├── diff.css
│ │ │ └── diff.js
│ │ ├── python
│ │ │ ├── LICENSE.txt
│ │ │ └── index.html
│ │ ├── coffeescript
│ │ │ └── LICENSE
│ │ ├── css
│ │ │ └── index.html
│ │ ├── sparql
│ │ │ └── index.html
│ │ ├── rst
│ │ │ └── rst.css
│ │ ├── r
│ │ │ ├── LICENSE
│ │ │ └── index.html
│ │ ├── ruby
│ │ │ └── LICENSE
│ │ ├── php
│ │ │ └── index.html
│ │ ├── smalltalk
│ │ │ └── index.html
│ │ ├── xml
│ │ │ └── index.html
│ │ ├── htmlmixed
│ │ │ ├── index.html
│ │ │ └── htmlmixed.js
│ │ ├── plsql
│ │ │ └── index.html
│ │ ├── lua
│ │ │ └── index.html
│ │ ├── haskell
│ │ │ └── index.html
│ │ ├── yaml
│ │ │ ├── index.html
│ │ │ └── yaml.js
│ │ ├── scheme
│ │ │ └── index.html
│ │ ├── xmlpure
│ │ │ └── index.html
│ │ ├── javascript
│ │ │ └── index.html
│ │ ├── velocity
│ │ │ └── index.html
│ │ └── clike
│ │ │ └── index.html
│ ├── README.md
│ ├── theme
│ │ ├── neat.css
│ │ ├── elegant.css
│ │ ├── default.css
│ │ └── night.css
│ ├── test
│ │ └── index.html
│ ├── lib
│ │ ├── runmode.js
│ │ ├── codemirror.css
│ │ └── overlay.js
│ ├── LICENSE
│ └── demo
│ │ ├── resize.html
│ │ ├── marker.html
│ │ ├── theme.html
│ │ ├── changemode.html
│ │ ├── mustache.html
│ │ ├── runmode.html
│ │ ├── preview.html
│ │ ├── complete.html
│ │ └── activeline.html
├── script
│ ├── mootorial.tabs.js
│ ├── mootorial.codemirror.js
│ ├── mootorial.element.js
│ └── mootorial.formatting.js
└── css
│ └── main.css
├── README.md
├── .htaccess
├── old
├── save
│ ├── 04.1-utilities.txt
│ ├── 04-element.txt
│ ├── 06-request.txt
│ ├── 02-browser.txt
│ ├── 01.1-class.extras.txt
│ ├── 03-native.txt
│ ├── 05.2-fupdate.append.txt
│ ├── 05.1-fupdate.txt
│ ├── 04-element
│ │ ├── 03-element.pin.txt
│ │ ├── 05-element.shortcuts.txt
│ │ └── 00-element.forms.txt
│ ├── 03-native
│ │ ├── 03-string.extras.txt
│ │ ├── 02-hash.extras.txt
│ │ └── 01-date.extras.txt
│ ├── 01-chain.wait.txt
│ ├── 02-request.queue.txt
│ ├── 05-overtext.txt
│ ├── 05.3-fupdate.prompt.txt
│ ├── 03-occlude.txt
│ └── 02-fx.reveal.txt
└── pages
│ ├── mootorial
│ ├── 07-request.txt
│ ├── 08-plugins
│ │ ├── 03-interface.txt
│ │ ├── 01-drag.txt
│ │ ├── 00-fxplugins.txt
│ │ ├── 02-utilityplugins.txt
│ │ ├── 03-interface
│ │ │ ├── 02-smoothscroll.txt
│ │ │ ├── 01-tips.txt
│ │ │ ├── 00-sortables.txt
│ │ │ ├── 03-slider.txt
│ │ │ └── 04-accordion.txt
│ │ ├── 02-utilityplugins
│ │ │ ├── 02-group.txt
│ │ │ ├── 00-hash.cookie.txt
│ │ │ └── 03-assets.txt
│ │ ├── 00-fxplugins
│ │ │ ├── 02-fx.elements.txt
│ │ │ ├── 01-fx.scroll.txt
│ │ │ └── 00-fx.slide.txt
│ │ └── 01-drag
│ │ │ ├── 01-drag.move.txt
│ │ │ └── 00-drag.txt
│ ├── 05-utilities.txt
│ ├── 05-utilities
│ │ ├── 04-swiff.txt
│ │ ├── 02-json.txt
│ │ ├── 03-cookie.txt
│ │ └── 01-domready.txt
│ ├── 06-fx.txt
│ ├── 04-element.txt
│ ├── 08-plugins.txt
│ ├── 03-native.txt
│ ├── 01-core
│ │ └── 01-browser.txt
│ ├── 04-element
│ │ ├── 02-element.style.txt
│ │ └── 03-element.dimensions.txt
│ ├── 07-request
│ │ ├── 02-request.json.txt
│ │ ├── 01-request.html.txt
│ │ └── 00-request.txt
│ ├── 03-native
│ │ ├── 02-number.txt
│ │ └── 05-event.txt
│ └── 06-fx
│ │ └── 02-fx.morph.txt
│ ├── suggested-reading.txt
│ └── mootorial.txt
├── Runner
├── url.class.php
├── menuitem.class.php
├── content.class.php
└── mootorial.class.php
└── index.php
/Source/01. Core/00. Core.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/02. Class/00. Class.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/03. Types/00. Types.md:
--------------------------------------------------------------------------------
1 | Types
2 | =====
--------------------------------------------------------------------------------
/Source/16. Slick/00. Slick.md:
--------------------------------------------------------------------------------
1 | Slick
2 | =====
--------------------------------------------------------------------------------
/Source/04. Browser/00. Browser.md:
--------------------------------------------------------------------------------
1 | Browser
2 | =======
--------------------------------------------------------------------------------
/Source/18. Request/00. Request.md:
--------------------------------------------------------------------------------
1 | Request
2 | =======
--------------------------------------------------------------------------------
/Source/19. Utilities/00. Utilities.md:
--------------------------------------------------------------------------------
1 | Utilities
2 | =========
--------------------------------------------------------------------------------
/Source/05. Elements/00. Elements.md:
--------------------------------------------------------------------------------
1 | Elements
2 | ========
3 |
4 |
--------------------------------------------------------------------------------
/Source/17. MooTools FX/01. FX.Tween.md:
--------------------------------------------------------------------------------
1 | Another One
2 | -----------
3 |
4 | Hello
5 |
6 | Is it me you're looking for
--------------------------------------------------------------------------------
/assets/codemirror/css/baboon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/subtleGradient/mootools-mootorial/master/assets/codemirror/css/baboon.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | The 'Mootorial' 2
2 | =================
3 |
4 | A currently unofficial, pre-alpha reboot of Aaron Newton's excellent original Mootorial.
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteRule ^(.*)$ index.php/$1 [L]
5 |
--------------------------------------------------------------------------------
/old/save/04.1-utilities.txt:
--------------------------------------------------------------------------------
1 | ====== Utilities ======
2 | Shortcuts and helpers that make managing tasks a little easier.
3 |
4 | {{indexmenu>clientcide-libraries:04.1-utilities}}
--------------------------------------------------------------------------------
/assets/codemirror/mode/diff/diff.css:
--------------------------------------------------------------------------------
1 | .cm-s-default span.cm-rangeinfo {color: #a0b;}
2 | .cm-s-default span.cm-minus {color: #a22;}
3 | .cm-s-default span.cm-plus {color: #2b2;}
4 |
--------------------------------------------------------------------------------
/old/pages/mootorial/07-request.txt:
--------------------------------------------------------------------------------
1 | ====== Request ======
2 |
3 | The Request scripts in MooTools help you manage sending and receiving data to and from servers without refreshing the document (commonly known as Ajax).
4 |
5 | {{indexmenu>mootorial:07-request}}
--------------------------------------------------------------------------------
/assets/script/mootorial.tabs.js:
--------------------------------------------------------------------------------
1 | $$('h4').addEvent('click', function(){
2 | this.getAllAdjacentSiblings('h4, textarea, DIV').removeClass('current');
3 | this.addClass('current');
4 | this.getNext('DIV').addClass('current');
5 | });
6 | $$('h4.current').fireEvent('click');
--------------------------------------------------------------------------------
/assets/codemirror/README.md:
--------------------------------------------------------------------------------
1 | # CodeMirror 2
2 |
3 | CodeMirror 2 is a rewrite of [CodeMirror
4 | 1](http://github.com/marijnh/CodeMirror). The docs live
5 | [here](http://codemirror.net/manual.html), and the project page is
6 | [http://codemirror.net/](http://codemirror.net/).
7 |
--------------------------------------------------------------------------------
/old/save/04-element.txt:
--------------------------------------------------------------------------------
1 | ====== Element Extensions ======
2 | MooTools gives a lot of love to the native Element object, but we've found a few things to add to it. Mostly it's enhancements for positioning elements, dealing with forms and form inputs, as well as a few simple shortcuts.
3 |
4 | {{indexmenu>clientcide-libraries:04-element}}
--------------------------------------------------------------------------------
/old/pages/mootorial/08-plugins/03-interface.txt:
--------------------------------------------------------------------------------
1 | ====== Interface Plugins ======
2 | MooTools includes several classes that automate various UI components. Tips and sortable lists, that sort of thing. Not every web application needs all these things so they're located in the plugins collection.
3 |
4 | {{indexmenu>mootorial:08-plugins:03-interface}}
--------------------------------------------------------------------------------
/old/pages/mootorial/08-plugins/01-drag.txt:
--------------------------------------------------------------------------------
1 | ====== Drag ======
2 | MooTools includes complex and full-featured drag functionality. It's not something that every site needs, so it's in the plugins portion of the library, but it's still very handy if you need to allow your users to drag items around on the page.
3 |
4 |
5 | {{indexmenu>mootorial:08-plugins:01-drag}}
--------------------------------------------------------------------------------
/Source/05. Elements/81. Element Helpers.md:
--------------------------------------------------------------------------------
1 | Element Helpers
2 | ---------------
3 |
4 | ===== Element.toQueryString =====
5 | Returns a query string of all the key/values for the form elements inside the element (doesn't have to be a form but typically is):
6 |
7 |
8 | $(myForm).toQueryString(); //foo=bar&something=else...
9 |
10 |
--------------------------------------------------------------------------------
/old/pages/mootorial/05-utilities.txt:
--------------------------------------------------------------------------------
1 | ====== Utilities ======
2 | MooTools has a group of classes and helpers that are hard to do without that fit somewhere between the classes that do things (like the effects) and the native extentions covered previously. It's hard to get by without these utilities though, so they're included in the core build of MooTools.
3 |
4 | {{indexmenu>mootorial:05-utilities}}
--------------------------------------------------------------------------------
/old/pages/mootorial/05-utilities/04-swiff.txt:
--------------------------------------------------------------------------------
1 | ====== Swiff ======
2 | The //Swiff// class helps you manage flash objects. You can instatiate a flash object and embed it in the page as well as broker instructions to the object. I'm not much of a flash user so I don't have an examples here. [[http://docs.mootools.net/Utilities/Swiff|See the documentation on Swiff for details on how to use it]].
3 |
--------------------------------------------------------------------------------
/assets/codemirror/mode/diff/diff.js:
--------------------------------------------------------------------------------
1 | CodeMirror.defineMode("diff", function() {
2 | return {
3 | token: function(stream) {
4 | var ch = stream.next();
5 | stream.skipToEnd();
6 | if (ch == "+") return "plus";
7 | if (ch == "-") return "minus";
8 | if (ch == "@") return "rangeinfo";
9 | }
10 | };
11 | });
12 |
13 | CodeMirror.defineMIME("text/x-diff", "diff");
14 |
--------------------------------------------------------------------------------
/old/pages/mootorial/06-fx.txt:
--------------------------------------------------------------------------------
1 | ====== Effects ======
2 | The //Fx// object contains a family of classes all related to managing transitions. At its heart, //Fx.*// lets you transition the properties of an element or several elements from one state to another across a duration you specify using a transition of your choice. Examples are always better to figure this stuff out, so let's just dive right in.
3 |
4 | {{indexmenu>mootorial:06-fx}}
--------------------------------------------------------------------------------
/old/save/06-request.txt:
--------------------------------------------------------------------------------
1 | ====== Request Extensions ======
2 | The MooTools //Request// classes handle all the Ajax-style requests you could ask for. This is great when you need to send or receive data to/from the same domain as your page, but in certain instances you may need to be able to send cross-domain requests. The only method that really allows for this is script injection, better known as JsonP.
3 |
4 | {{indexmenu>clientcide-libraries:06-request}}
--------------------------------------------------------------------------------
/old/pages/mootorial/08-plugins/00-fxplugins.txt:
--------------------------------------------------------------------------------
1 | ====== Fx Plugins ======
2 |
3 | The MooTools Core has the foundation classes for effects ([[00-fx|Fx and Fx.CSS]], [[01-fx.tween|Fx.Tween]], and [[02-fx.morph|Fx.Morph]]) and using just these you can do a lot of different animations on your site. But the classes in MooTools are designed to be extended and MooTools includes a few extra effects in the plugins.
4 |
5 |
6 | {{indexmenu>mootorial:08-plugins:00-fxplugins}}
--------------------------------------------------------------------------------
/old/pages/mootorial/08-plugins/02-utilityplugins.txt:
--------------------------------------------------------------------------------
1 | ====== Utility Plugins ======
2 | Much like the [[05-utilities:Core Utilities]], the plugin libraries include numerous scripts that help you simplify some tasks. These aren't interface utilities or anything, they're just classes that make it easier to accomplish some tasks that you aren't likely to do often, but, when you do, you'll be glad to have these helpers.
3 |
4 | {{indexmenu>mootorial:08-plugins:02-utilityplugins}}
5 |
--------------------------------------------------------------------------------
/assets/codemirror/theme/neat.css:
--------------------------------------------------------------------------------
1 | .cm-s-neat span.cm-comment { color: #a86; }
2 | .cm-s-neat span.cm-keyword { font-weight: bold; color: blue; }
3 | .cm-s-neat span.cm-string { color: #a22; }
4 | .cm-s-neat span.cm-builtin { font-weight: bold; color: #077; }
5 | .cm-s-neat span.cm-special { font-weight: bold; color: #0aa; }
6 | .cm-s-neat span.cm-variable { color: black; }
7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
8 | .cm-s-neat span.cm-meta {color: #555;}
9 |
--------------------------------------------------------------------------------
/assets/script/mootorial.codemirror.js:
--------------------------------------------------------------------------------
1 | $$('textarea').each(function(textarea){
2 | var mode = "";
3 | switch (true){
4 | case textarea.get('class').contains('js'):
5 | mode = "javascript";
6 | break;
7 | case textarea.get('class').contains('html'):
8 | mode = "htmlmixed";
9 | break;
10 | case textarea.get('class').contains('css'):
11 | mode = "css";
12 | break;
13 | }
14 | CodeMirror.fromTextArea(textarea, {
15 | mode: mode,
16 | lineNumbers: true
17 | });
18 | });
--------------------------------------------------------------------------------
/old/pages/mootorial/04-element.txt:
--------------------------------------------------------------------------------
1 | ======= Element Extensions =======
2 | Here is [[http://docs.mootools.net/Native/Element|the documentation for Element.js]].
3 |
4 | The Element object gets a LOT of love in MooTools. Most of the functions in the Element object are pretty self explanatory. //Element.getTag// does what you'd think it would.
5 |
6 | Because Element receives so much attention, it's got its own section in the code and it's broken up into four files:
7 |
8 | {{indexmenu>mootorial:04-element}}
--------------------------------------------------------------------------------
/old/save/02-browser.txt:
--------------------------------------------------------------------------------
1 | ====== Browser Extensions ======
2 | MooTools includes a [[http://www.mootorial.com/wiki/mootorial/01-core/01-browser|Browser Hash]] object that includes information about the client. MooTools also, throughout the library, has code to eliminate browser inconsistencies for you.
3 |
4 | Unfortunately, there are a few still out there, and when we run into one and come up with a solution (or, more likely, fine one on the net somewhere) we add it to our library.
5 |
6 | {{indexmenu>clientcide-libraries:02-browser}}
--------------------------------------------------------------------------------
/assets/codemirror/theme/elegant.css:
--------------------------------------------------------------------------------
1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;}
2 | .cm-s-elegant span.cm-comment {color: #262;font-style: italic;}
3 | .cm-s-elegant span.cm-meta {color: #555;font-style: italic;}
4 | .cm-s-elegant span.cm-variable {color: black;}
5 | .cm-s-elegant span.cm-variable-2 {color: #b11;}
6 | .cm-s-elegant span.cm-qualifier {color: #555;}
7 | .cm-s-elegant span.cm-keyword {color: #730;}
8 | .cm-s-elegant span.cm-builtin {color: #30a;}
9 | .cm-s-elegant span.cm-error {background-color: #fdd;}
10 |
--------------------------------------------------------------------------------
/assets/script/mootorial.element.js:
--------------------------------------------------------------------------------
1 | Element.implement({
2 | getAllAdjacentSiblings: function(selector){
3 |
4 | var matches = [];
5 | var trappingPrevious = true;
6 | var trappingNext = true;
7 |
8 | this.getAllPrevious().each(function(el){
9 | if (trappingPrevious && el.match(selector)){
10 | matches.push(el);
11 | } else {
12 | trappingPrevious = false;
13 | }
14 | });
15 |
16 | this.getAllNext().each(function(el){
17 | if (trappingNext && el.match(selector)){
18 | matches.push(el);
19 | } else {
20 | trappingNext = false;
21 | }
22 | });
23 |
24 | return $$(matches);
25 | }
26 | });
--------------------------------------------------------------------------------
/Source/00. Introduction/04. Write your code!.md:
--------------------------------------------------------------------------------
1 | Write your code!
2 | ----------------
3 |
4 | That's where this Mootorial can help you. If you read these pages (I recommend reading them in order) you should learn how each function and class in MooTools works. Refer to [[http://docs.mootools.net|the docs]] for reference and don't be afraid to look at the source code of MooTools to see how it works.
5 |
6 | You need to use things like the [[mootorial:05-utilities:01-domready|domready.js]] event to run your code after the html is loaded and use [[02-class]] to create reusable code. You can also read [this tutorial on how to write a MooTools Class](http://foo).
7 |
--------------------------------------------------------------------------------
/old/pages/mootorial/08-plugins.txt:
--------------------------------------------------------------------------------
1 | ====== Plugins ======
2 | MooTools 1.2 comes in two basic components: the MooTools Core and the MooTools Plugins (also sometimes referred to as "MooTools More").
3 |
4 | The "Core" distribution includes everything covered up to this point in the MooTorial ([[01-core|Core]], [[02-class|Class]], [[03-native|Native]], [[04-element|Element]], [[05-utilities|Utilities]], [[06-fx|Fx]], and [[07-request|Request]]).
5 |
6 | The official plugins are things that the development team view as being useful but not necessarily stuff that you'll need in almost every application like you would the Core scripts.
7 |
8 | {{indexmenu>mootorial:08-plugins}}
--------------------------------------------------------------------------------
/old/pages/mootorial/08-plugins/03-interface/02-smoothscroll.txt:
--------------------------------------------------------------------------------
1 | ====== SmoothScroll ======
2 | Here is the [[http://docs.mootools.net/Plugins/SmoothScroll|documentation for SmoothScroll.js]].
3 |
4 | Smooth scrolling auto targets all the anchors in a page (href="#section", etc.) to display a smooth scrolling effect upon clicking them. To enable for a page, all you have to do is include the script and call:
5 |
6 |
7 | new SmoothScroll();
8 |
9 |
10 | You can pass in options (see //[[00-fx|Fx]]//) if you want. This tutorial uses SmoothScroll when you click on the anchor links in the top-right page nav or the "top" links next to headers.
--------------------------------------------------------------------------------
/Source/17. MooTools FX/00. MooTools FX:
--------------------------------------------------------------------------------
1 | MooTools FX
2 | ===========
3 |
4 | This is a test
5 |
6 | * foo 1
7 | * foo 2
8 | * foo 3
9 |
10 | 1. foo 1
11 | 2. foo 2
12 | 3. foo 3
13 |
14 | #### Example
15 |
16 |
7 | ...
8 | if (Browser.Engine.trident4) //...do something for IE6
9 | else if (Browser.Engine.trident) //...do something for all other version of IE
10 | else //...everyone else gets some standard behavior
11 | ...
12 |
13 |
14 | You can find all the //Browser// properties [[http://docs.mootools.net/Core/Browser|in the docs]].
--------------------------------------------------------------------------------
/assets/codemirror/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A limited set of programmatic sanity tests for CodeMirror.
20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /assets/codemirror/theme/default.css: -------------------------------------------------------------------------------- 1 | .cm-s-default span.cm-keyword {color: #708;} 2 | .cm-s-default span.cm-atom {color: #219;} 3 | .cm-s-default span.cm-number {color: #164;} 4 | .cm-s-default span.cm-def {color: #00f;} 5 | .cm-s-default span.cm-variable {color: black;} 6 | .cm-s-default span.cm-variable-2 {color: #05a;} 7 | .cm-s-default span.cm-variable-3 {color: #0a5;} 8 | .cm-s-default span.cm-property {color: black;} 9 | .cm-s-default span.cm-operator {color: black;} 10 | .cm-s-default span.cm-comment {color: #a50;} 11 | .cm-s-default span.cm-string {color: #a11;} 12 | .cm-s-default span.cm-string-2 {color: #f50;} 13 | .cm-s-default span.cm-meta {color: #555;} 14 | .cm-s-default span.cm-error {color: #f00;} 15 | .cm-s-default span.cm-qualifier {color: #555;} 16 | .cm-s-default span.cm-builtin {color: #30a;} 17 | .cm-s-default span.cm-bracket {color: #cc7;} 18 | .cm-s-default span.cm-tag {color: #170;} 19 | .cm-s-default span.cm-attribute {color: #00c;} 20 | -------------------------------------------------------------------------------- /old/pages/mootorial/08-plugins/02-utilityplugins/02-group.txt: -------------------------------------------------------------------------------- 1 | ====== Group ====== 2 | The //Group// class is for grouping Class or Element Events. The //Event// added to the //Group// will fire when all of the events of the items of the group are fired. Here are [[http://docs.mootools.net/Plugins/Group|the docs for Group.js]]. 3 | 4 |
5 | xhr1 = new Request.HTML({url: 'data.js', evalScript: true});
6 | xhr2 = new Request.HTML({url: 'abstraction.js', evalScript: true});
7 | xhr3 = new Request.HTML({url: 'template.js', evalScript: true});
8 |
9 | var group = new Group(xhr1, xhr2, xhr3);
10 | group.addEvent('onComplete', function(){
11 | alert('All Scripts loaded');
12 | });
13 |
14 | xhr1.send();
15 | xhr2.send();
16 | xhr3.send();
17 | //when all 3 requests complete, the alert will occur
18 |
19 |
20 | Using //Group// you can define custom events for your applications. When the user interacts with the page in a specific order, you can fire an event to signify this occurence.
--------------------------------------------------------------------------------
/old/save/05.2-fupdate.append.txt:
--------------------------------------------------------------------------------
1 | ====== Fupdate.Append ======
2 |
3 | [[http://www.clientcide.com/docs/Forms/Fupdate.Append|docs]]
4 |
5 | This class picks up where [[05.1-fupdate|Fupdate]] leaves off and does pretty much the same thing. The only difference is that the result, instead of overwriting it, is injected into (or before, after, top, etc) it.
6 |
7 |
8 |
12 |
23 | new Fupdate.Append(document.id('fupdateForm'), document.id('fupdateReply'), {
24 | inject: 'top'
25 | });
26 |
27 |
28 | ...and that's pretty much all you gotta do.
29 |
30 |
--------------------------------------------------------------------------------
/old/pages/suggested-reading.txt:
--------------------------------------------------------------------------------
1 | ====== Suggested Reading ======
2 | * Obviously, I recommend reading my book - **__MooTools Essentials__** ([[http://www.amazon.com/gp/product/1430209836?ie=UTF8&tag=clientside-20&link_code=as3&camp=211189&creative=373489&creativeASIN=1430209836|paperback]] or [[http://www.apress.com/book/view/1430209836|PDF]]). This is similar to the [[http://www.mootorial.com|MooTorial]] but much, much more complete.
3 | * I highly, highly, highly recommend reading **__[[http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742?tag=clientside-20|JavaScript: The Good Parts]]__** by **Douglas Crockford** (it came out about a month ago). There are some really awesome aspects to the language that make up for its deficiencies. Crockford’s book basically outlines the part of the language that are worth keeping.
4 | * I also recommend **[[http://www.snook.ca|Jonathan Snook]]**'s **__[[http://www.amazon.com/Accelerated-Scripting-Ajax-APIs-Libraries/dp/1590597648?tag=clientside-20|Accelerated DOM Scripting with Ajax, APIs, and Libraries]]__**.
--------------------------------------------------------------------------------
/assets/script/mootorial.formatting.js:
--------------------------------------------------------------------------------
1 | /*
2 | $$('h2').each(function(heading){
3 | var content = new Element('div.content');
4 | var trapping = true;
5 | heading.getAllNext().each(function(sibling){
6 | if (sibling.get('tag').test(/h2|script/)){
7 | trapping = false;
8 | } else {
9 | sibling.inject(content);
10 | }
11 | });
12 | content.inject(heading, 'after');
13 | });
14 | */
15 | $$('h4').each(function(heading){
16 | var next = heading.getNext();
17 | if (heading.get('text') == 'Example'){
18 | var example = new Element('div.example');
19 | example.set('html', next.get('text'));
20 | example.replaces(next);
21 | heading.addClass('example');
22 | } else if (next.get('tag') == 'pre'){
23 | var classname = heading.get('text').toLowerCase();
24 | var textarea = new Element('textarea.' + classname);
25 | textarea.set('value', next.get('text'));
26 | textarea.replaces(next);
27 | heading.addClass(classname);
28 | if (classname == 'js'){
29 | heading.addClass('current');
30 | textarea.addClass('current');
31 | }
32 | }
33 | });
--------------------------------------------------------------------------------
/assets/codemirror/lib/runmode.js:
--------------------------------------------------------------------------------
1 | CodeMirror.runMode = function(string, modespec, callback) {
2 | var mode = CodeMirror.getMode({indentUnit: 2}, modespec);
3 | var isNode = callback.nodeType == 1;
4 | if (isNode) {
5 | var node = callback, accum = [];
6 | callback = function(string, style) {
7 | if (string == "\n")
8 | accum.push("