Changeset 739
- Timestamp:
- 04/24/06 21:06:24 (2 years ago)
- Files:
-
- presentations/2006/ajax_experience/Makefile (modified) (1 diff)
- presentations/2006/ajax_experience/mochikit_logo.gif (added)
- presentations/2006/ajax_experience/slides.txt (modified) (6 diffs)
- presentations/2006/ajax_experience/ui/mochikit/examples (added)
- presentations/2006/ajax_experience/ui/mochikit/examples/interpreter.css (added)
- presentations/2006/ajax_experience/ui/mochikit/examples/interpreter.js (added)
- presentations/2006/ajax_experience/ui/mochikit/mochikit.css (added)
- presentations/2006/ajax_experience/ui/mochikit/mochikit_logo.gif (added)
- presentations/2006/ajax_experience/ui/mochikit/slides.css (modified) (1 diff)
- presentations/2006/ajax_experience/ui/mochikit/slides.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
presentations/2006/ajax_experience/Makefile
r715 r739 6 6 rm -f $(OUTPUT) 7 7 8 slides.html: slides.txt 8 slides.html: slides.txt includes/*.html 9 9 rst2s5.py --theme-url ui/mochikit slides.txt $@ 10 10 presentations/2006/ajax_experience/slides.txt
r721 r739 1 1 .. include:: <s5defs.txt> 2 3 .. raw:: html 4 :file: includes/logo.html 2 5 3 6 =================== … … 99 102 100 103 104 MochiKit Interpreter 105 ==================== 106 107 .. raw:: html 108 :file: includes/interpreter.html 109 110 101 111 compare instead of operators 102 112 ============================ … … 218 228 new function(obj), equivalent to obj[name] 219 229 220 keyComparator(key, ...):221 new sort function that does compare(a[key], b[key])222 223 forwardCall(name):224 new function, forwards calls to this[name] (for delegation)225 226 230 227 231 Basic Array functions … … 265 269 map(func, lst): 266 270 new Array of [func(lst[0]), func(lst[1]), ...] 271 272 keyComparator(key, ...): 273 new sort function that does compare(a[key], b[key]) 267 274 268 275 … … 831 838 832 839 833 Not Really TheEvent Object834 =================== ========840 Custom Event Object 841 =================== 835 842 836 843 * MochiKit.Signal gives you a consistent event object, NOT the browser's. … … 843 850 844 851 852 Signal Anything 853 =============== 854 855 * You can use MochiKit.Signal to broadcast your own events 856 * connect() and disconnect() are the same 857 * signal(src, signal, args...) to fire the event 858 859 845 860 MochiKit on the Web 846 861 =================== presentations/2006/ajax_experience/ui/mochikit/slides.css
r715 r739 9 9 /* styles that make the slides look good */ 10 10 @import url(pretty.css); 11 12 /* MochiKit additions */ 13 @import url(mochikit.css); 14 @import url(examples/interpreter.css); presentations/2006/ajax_experience/ui/mochikit/slides.js
r731 r739 522 522 523 523 // Key trap fix, new function body for trap() 524 function trap(e) {524 function s5_trap(e) { 525 525 if (!e) { 526 526 e = event; … … 550 550 toggle(); 551 551 } 552 553 var is_using_s5 = true; 554 555 // XXX: mochi stuff 556 function e_wrap(fn) { 557 return function (e) { 558 if (e.type() == "keyup" && e.modifier().ctrl && 559 e.key().string == "KEY_I") { 560 is_using_s5 = !is_using_s5; 561 logDebug("Toggled interactive mode " + 562 (is_using_s5 ? "off" : "on")); 563 e.stop(); 564 return; 565 } 566 if (!is_using_s5) return; 567 568 var res; 569 if (window.event) { 570 res = fn(); 571 } else { 572 res = fn(e.event()); 573 } 574 if (!res) { 575 e.stop(); 576 } 577 } 578 }; 579 580 connect(document, 'onkeyup', e_wrap(s5_keys)); 581 connect(document, 'onkeypress', e_wrap(s5_trap)); 582 connect(document, 'onclick', e_wrap(clicker)); 583 /* 552 584 document.onkeyup = s5_keys; 553 document.onkeypress = trap;585 document.onkeypress = s5_trap; 554 586 document.onclick = clicker; 555 } 556 } 587 */ 588 } 589 } 590 591 // XXX: globals it wants 592 window.showHide = showHide; 593 window.go = go; 594 window.toggle = toggle; 595 window.fontScale = fontScale; 557 596 558 597 window.onload = startup; 559 598 window.onresize = function(){setTimeout('fontScale()', 50);} 599 560 600 })(); 561 601
