├── README.md ├── _cdn.txt ├── _demoApp ├── index.html └── script │ └── appname │ ├── application.js │ ├── as3display │ ├── DisplayObject.js │ ├── MovieClip.js │ └── Sprite.js │ ├── core-application.js │ ├── debug.php │ └── sage.js └── com ├── bigspaceship ├── canvas │ ├── Circle.js │ ├── DisplayObject.js │ ├── Layers.js │ ├── Shapes.js │ └── bCanvas.js ├── facebook │ ├── fbml_redirect.php │ ├── iframe_popup.php │ ├── oauthbridge_connect.js │ └── oauthbridge_iframe.js ├── jquery │ ├── activeItem │ │ ├── demo.html │ │ └── jquery.activeItem.js │ ├── applyClasses │ │ └── jquery.applyClasses.js │ └── codeExplorer │ │ ├── index.html │ │ └── script │ │ ├── codeExplorer │ │ ├── CodeExplorer.php │ │ ├── Proxy.php │ │ ├── external │ │ │ └── prettify │ │ │ │ ├── lang-apollo.js │ │ │ │ ├── lang-css.js │ │ │ │ ├── lang-hs.js │ │ │ │ ├── lang-lisp.js │ │ │ │ ├── lang-lua.js │ │ │ │ ├── lang-ml.js │ │ │ │ ├── lang-proto.js │ │ │ │ ├── lang-scala.js │ │ │ │ ├── lang-sql.js │ │ │ │ ├── lang-vb.js │ │ │ │ ├── lang-vhdl.js │ │ │ │ ├── lang-wiki.js │ │ │ │ ├── lang-yaml.js │ │ │ │ ├── prettify.css │ │ │ │ └── prettify.js │ │ └── themes │ │ │ ├── bss │ │ │ ├── images │ │ │ │ ├── arrow-closed.png │ │ │ │ ├── arrow-open.png │ │ │ │ ├── dragz.png │ │ │ │ ├── file-unselected.png │ │ │ │ └── folder-closed.png │ │ │ └── theme.css │ │ │ ├── coda │ │ │ ├── images │ │ │ │ ├── arrow-closed.png │ │ │ │ ├── arrow-open.png │ │ │ │ ├── dragz.png │ │ │ │ ├── file-unselected.png │ │ │ │ ├── folder-closed.png │ │ │ │ └── loading-main.png │ │ │ └── theme.css │ │ │ └── d.php │ │ ├── jquery.codeExplorer.js │ │ ├── jquery.codeExplorer.min.js │ │ └── jquery.codeExplorer.pack.js ├── loading │ ├── Basil.js │ └── Basil.min.js ├── signals │ └── SignalDispatcher.js └── utils │ ├── Accelerometer.js │ ├── ArrayUtils.js │ ├── Browser.js │ ├── Class.js │ ├── DelayBinding.js │ ├── DeviceType.js │ ├── MathUtils.js │ ├── Out.js │ ├── Roman.js │ ├── Semaphore.js │ ├── SimpleSequencer.js │ ├── delegate.js │ └── delegate.min.js └── functions.js /README.md: -------------------------------------------------------------------------------- 1 | Javascript Classes. 2 | -------------------------------------------------------------------------------- /_cdn.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * CDN Javascript 3 | * 4 | */ 5 | 6 | // jQuery 7 | http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js 8 | http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.2.min.js 9 | 10 | // jQuery UI 11 | http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/jquery-ui.js 12 | 13 | // SWFObject 14 | http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js 15 | 16 | my name bob -------------------------------------------------------------------------------- /_demoApp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

Inheritance

12 | 13 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /_demoApp/script/appname/application.js: -------------------------------------------------------------------------------- 1 | // include 2 | Sage.include(APP_JSURL + "as3display/MovieClip.js"); 3 | Sage.include(APP_JSURL + "as3display/Sprite.js"); 4 | Sage.include(APP_JSURL + "as3display/DisplayObject.js"); 5 | Sage.include(APP_JSURL + "core-application.js"); 6 | 7 | /** 8 | * Application 9 | * 10 | * This is the main application file for DemoApp 11 | * javascript. 12 | * 13 | * @version 1.0 14 | * @author Matt Kenefick 15 | * @project Demo App 16 | */ 17 | 18 | Application = new (function(){ 19 | 20 | // private vars 21 | var _self = this; 22 | var _defaultController = 'Main'; 23 | 24 | // public vars 25 | this.name = 'Application'; 26 | 27 | 28 | // =========================================== 29 | // ===== CALLABLE 30 | // =========================================== 31 | 32 | this.attach = function attach(){ 33 | Out.debug(_self, "Demo App Initiated."); 34 | Out.debug(_self, "Attaching from Application."); 35 | this.super(); 36 | 37 | _self.testMovieClip(); 38 | //_self.superTest(); 39 | }; 40 | 41 | this.testMovieClip = function testMovieClip(){ 42 | var mc = new MovieClip(); 43 | mc._init(); 44 | 45 | console.log("Calling MC init... Super chain will be invoked... X should be 50"); 46 | console.log( mc.x ); 47 | }; 48 | 49 | this.superTest = function superTest(){ 50 | this.super(); 51 | alert("Called from Application"); 52 | }; 53 | 54 | 55 | // =========================================== 56 | // ===== HANDLERS 57 | // =========================================== 58 | 59 | // =========================================== 60 | // ===== CONSTRUCTOR 61 | // =========================================== 62 | 63 | // constructor should immediately happen on doc load 64 | this.construct = function application_construct(){ 65 | 66 | }; 67 | 68 | // this is fired after all elements have been constructed 69 | this.init = function application_init(){ 70 | _self.attach(); 71 | }; 72 | 73 | Sage.register(this); 74 | return Sage.extend(this, 'CoreApplication', true); // make this class extend CoreApplication 75 | })(); 76 | -------------------------------------------------------------------------------- /_demoApp/script/appname/as3display/DisplayObject.js: -------------------------------------------------------------------------------- 1 | // root class 2 | 3 | function DisplayObject(){ 4 | var __self = this; 5 | 6 | this.name = "DisplayObject"; 7 | 8 | // public vars 9 | this.alpha = 0; 10 | this.height = 0; 11 | this.mouseX = 0; 12 | this.mouseY = 0; 13 | this.parent = null; 14 | this.root = null; 15 | this.rotation = 0; 16 | this.scaleX = 0; 17 | this.scaleY = 0; 18 | this.visible = true; 19 | this.width = 0; 20 | this.x = 0; 21 | this.y = 0; 22 | this.z = 0; 23 | 24 | 25 | // ========================================================== 26 | // ========= Public Methods 27 | // ========================================================== 28 | 29 | this.getBounds = function getBounds(){ 30 | console.log("getBounds"); 31 | }; 32 | 33 | this.getRect = function getRect(){ 34 | console.log("getRect"); 35 | }; 36 | 37 | this.globalToLocal = function globalToLocal(){ 38 | console.log("globalToLocal"); 39 | }; 40 | 41 | this.hitTestObject = function hitTestObject(){ 42 | console.log("hitTestObject"); 43 | }; 44 | 45 | 46 | // ========================================================== 47 | // ========= Private Methods 48 | // ========================================================== 49 | 50 | 51 | // ========================================================== 52 | // ========= Constructor Methods 53 | // ========================================================== 54 | 55 | // Constructor function 56 | this._init = function displayobject_init(){ 57 | console.log("Constructing DisplayObject" ); 58 | 59 | }; 60 | 61 | return Sage.create(this); 62 | }; 63 | 64 | Sage.register(DisplayObject); 65 | -------------------------------------------------------------------------------- /_demoApp/script/appname/as3display/MovieClip.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | function MovieClip(){ 4 | var __self = this; 5 | 6 | this.name = 'MovieClip'; 7 | 8 | this.currentFrame = 0; 9 | this.currentLabel = ''; 10 | this.currentLabels = []; 11 | this.enabled = true; 12 | this.framesLoaded = 0; 13 | this.totalFrames = 0; 14 | 15 | 16 | // ========================================================== 17 | // ========= Public Methods 18 | // ========================================================== 19 | 20 | this.gotoAndPlay = function gotoAndPlay(){ 21 | console.log("gotoAndPlay"); 22 | }; 23 | 24 | this.gotoAndStop = function gotoAndStop(){ 25 | console.log("gotoAndStop"); 26 | }; 27 | 28 | this.nextFrame = function nextFrame(){ 29 | console.log("nextFrame"); 30 | }; 31 | 32 | this.play = function play(){ 33 | console.log("play"); 34 | }; 35 | 36 | this.prevFrame = function prevFrame(){ 37 | console.log("prevFrame"); 38 | }; 39 | 40 | this.stop = function stop(){ 41 | console.log("stop"); 42 | }; 43 | 44 | 45 | // ========================================================== 46 | // ========= Private Methods 47 | // ========================================================== 48 | 49 | 50 | // ========================================================== 51 | // ========= Constructor Methods 52 | // ========================================================== 53 | 54 | // Constructor function 55 | this._init = function movieclip_init(){ 56 | this.super(); 57 | _self.x = 50; 58 | }; 59 | 60 | return Sage.extend(this, 'Sprite'); 61 | }; 62 | 63 | Sage.register(MovieClip); 64 | -------------------------------------------------------------------------------- /_demoApp/script/appname/as3display/Sprite.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | function Sprite($a){ 4 | var __self = this; 5 | 6 | this.name = "Sprite"; 7 | 8 | this.buttonMode = false; 9 | this.graphics = null; 10 | this.hitArea = null; 11 | this.useHandCursor = false; 12 | this.x = 100; 13 | 14 | 15 | // ========================================================== 16 | // ========= Public Methods 17 | // ========================================================== 18 | 19 | this.startDrag = function(){ 20 | console.log("startDrag"); 21 | }; 22 | 23 | this.stopDrag = function(){ 24 | console.log("stopDrag"); 25 | }; 26 | 27 | 28 | // ========================================================== 29 | // ========= Private Methods 30 | // ========================================================== 31 | 32 | 33 | // ========================================================== 34 | // ========= Constructor Methods 35 | // ========================================================== 36 | 37 | // Constructor function 38 | this._init = function sprite_init(){ 39 | console.log("Constructing Sprite"); 40 | this.super(); 41 | this.x = 40; 42 | }; 43 | 44 | return Sage.extend(this, 'DisplayObject'); 45 | }; 46 | 47 | Sage.register(Sprite); 48 | -------------------------------------------------------------------------------- /_demoApp/script/appname/core-application.js: -------------------------------------------------------------------------------- 1 | // include 2 | 3 | 4 | /** 5 | * CoreApplication 6 | * 7 | * This is the main application file for DemoApp 8 | * javascript. 9 | * 10 | * @version 1.0 11 | * @author Matt Kenefick 12 | * @project Demo App 13 | */ 14 | 15 | function CoreApplication() { 16 | 17 | // private vars 18 | var _self = this; 19 | 20 | // public vars 21 | this.name = 'CoreApplication'; 22 | 23 | 24 | // =========================================== 25 | // ===== CALLABLE 26 | // =========================================== 27 | 28 | this.attach = function attach(){ 29 | Out.debug(_self, "Attaching from CoreApplication."); 30 | }; 31 | 32 | this.superTest = function superTest(){ 33 | alert("Called from CoreApplication"); 34 | }; 35 | 36 | 37 | // =========================================== 38 | // ===== HANDLERS 39 | // =========================================== 40 | 41 | // =========================================== 42 | // ===== CONSTRUCTOR 43 | // =========================================== 44 | 45 | // constructor should immediately happen on doc load 46 | this.construct = function coreapplication_construct(){ 47 | 48 | }; 49 | 50 | // this is fired after all elements have been constructed 51 | this.init = function coreapplication_init(){ 52 | 53 | }; 54 | 55 | return Sage.create(_self); 56 | }; 57 | 58 | Sage.register(CoreApplication); 59 | -------------------------------------------------------------------------------- /_demoApp/script/appname/debug.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Just In Time Debugger 8 | 46 | 47 | 48 |

Debugger

49 |

@ line

50 | 77 |

Suggestions

78 |

79 | 80 | 81 | An Unexpected Token usually occurs when you have unmatched 82 | brackets or something similar. Look for extra ( [ or {. 83 | 84 | 85 | 86 | 87 | "X is not defined," means you are referencing a variable that does 88 | not exist. Check for something that may not have yet been defined 89 | or if your function is possibly executing before it had the chance 90 | to be defined. 91 | 92 | 93 |

94 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /_demoApp/script/appname/sage.js: -------------------------------------------------------------------------------- 1 | if( Application ){ 2 | Out.error("Application already exists... clearing contents."); 3 | Out.error("This may cause errors."); 4 | 5 | delete Application; 6 | Application = {}; 7 | }else{ 8 | var Application; 9 | } 10 | 11 | 12 | 13 | /** 14 | * Error Handler 15 | * 16 | * This is the global error handler that helps debug 17 | * where problems may be. 18 | * 19 | * @version 1.0 20 | * @author Matt Kenefick 21 | * @project Demo App 22 | */ 23 | $(window).bind('error', function onError($msg, $2, $line){ 24 | $line = $msg.originalEvent; 25 | $msg = $line.message; 26 | $line = $line.lineno; 27 | console.log("Error found: Showing debugger."); 28 | window.open(APP_JSURL + 'debug.php?line=' + $line + "&error=" + escape($msg), "Debugger", "width=500,height=500,top=0,left=0"); 29 | return true; 30 | }); 31 | 32 | 33 | /** 34 | * Sage 35 | * 36 | * This is the global loader for all javascript files. 37 | * 38 | * @version 1.0 39 | * @author Matt Kenefick 40 | * @project Demo App 41 | */ 42 | 43 | if( !window['Sage'] ){ 44 | 45 | // CHECK FOR DEPENDENCIES. 46 | if(!window['Out']){ 47 | if(console) 48 | console.log("Cannot find `Out`. This will cause errors."); 49 | }; 50 | if(!window['Basil']){ 51 | Out.error({name:'Sage'}, "Cannot find `Basil`. This is a fatal error."); 52 | }; 53 | 54 | var Library = {}; 55 | var Logic = {}; 56 | var Input = { 57 | keyboard: {}, 58 | mouse: {}, 59 | microphone: {}, 60 | webcam: {} 61 | }; 62 | var Controllers = { 63 | core: {}, 64 | screens: {} 65 | }; 66 | var Models = {}; 67 | var Views = { 68 | animation: {}, 69 | core: {}, 70 | screens: {}, 71 | ui: {} 72 | }; 73 | 74 | var Sage = new Basil('Sage'); 75 | }; 76 | -------------------------------------------------------------------------------- /com/bigspaceship/canvas/Circle.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | CanvasBasil.include('DisplayObject.js'); 4 | 5 | bCanvas.Circle = function CanvasCircle($params){ 6 | 7 | // private vars 8 | var _self = this; 9 | var _params = $params; 10 | 11 | // public vars 12 | this.name = "Canvas.Circle"; 13 | this.changed = true; 14 | 15 | // properties 16 | this.strokeStyle = ''; 17 | this.fillStyle = ''; 18 | this.radius = 0; 19 | this.image = ''; 20 | this.height = $params.radius * 2; 21 | this.width = $params.radius * 2; 22 | 23 | /** 24 | * setValue 25 | * 26 | * Sets a value in this object. 27 | * Is useful so we can set the _hasChanged 28 | * property. This eventually lets us skip over 29 | * this object entirely when it's not in use 30 | * 31 | * @param $key String of the property to change 32 | * @param $value Value to set 33 | * @return Class 34 | */ 35 | this.set = function setValue($key, $value){ 36 | this[$key] = $value; 37 | this.changed = true; 38 | 39 | // chain 40 | return this; 41 | }; 42 | 43 | /** 44 | * drawCircle 45 | * 46 | * Drawing a circle. 47 | * 48 | */ 49 | this.draw = function draw(){ 50 | // ignore drawing if it hasn't changed 51 | if(!this.changed) 52 | return false; 53 | 54 | // set styles 55 | if(this.strokeStyle) bCanvas.context.strokeStyle = this.strokeStyle; 56 | if(this.fillStyle) bCanvas.context.fillStyle = this.fillStyle; 57 | 58 | // draw 59 | bCanvas.context.beginPath(); 60 | bCanvas.context.arc(this.x, this.y, this.radius, 0, Math.PI * 2, true); 61 | bCanvas.context.closePath(); 62 | if(this.strokeStyle) bCanvas.context.stroke(); 63 | if(this.fillStyle) bCanvas.context.fill(); 64 | 65 | // unset has changed 66 | this.changed = false; 67 | 68 | // chaining 69 | return this; 70 | }; 71 | 72 | /** 73 | * getBounds 74 | * 75 | * Gets bounds of this object 76 | * 77 | * @return Object 78 | */ 79 | this.getBounds = function getBounds(){ 80 | return { 81 | x: this.x - this.radius, 82 | y: this.y - this.radius, 83 | xw: this.x + this.height, 84 | yh: this.y + this.width, 85 | h: this.height, 86 | w: this.width 87 | }; 88 | }; 89 | 90 | // extend this object with what was set 91 | $.extend(this, _params); 92 | }; 93 | -------------------------------------------------------------------------------- /com/bigspaceship/canvas/DisplayObject.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | bCanvas.DisplayObject = function CanvasDisplayObject(){ 4 | 5 | // private vars 6 | var _self = this; 7 | 8 | // public vars 9 | this.name = "Canvas.DisplayObject"; 10 | 11 | // properties 12 | this.height = 0; 13 | this.opacity = 0; 14 | this.rotation = 0; 15 | this.scaleX = 1; 16 | this.scaleY = 1; 17 | this.visible = true; 18 | this.width = 0; 19 | this.x = 0; 20 | this.y = 0; 21 | this.z = 0; 22 | 23 | }; 24 | -------------------------------------------------------------------------------- /com/bigspaceship/canvas/Layers.js: -------------------------------------------------------------------------------- 1 | 2 | bCanvas.Layers = function CanvasLayers(){ 3 | 4 | // private vars 5 | var _self = this; 6 | 7 | // public vars 8 | this.name = "Canvas.Layers"; 9 | 10 | // properties 11 | this.stack = []; 12 | 13 | 14 | this.add = function add($ref){ 15 | // add reference to top of stack 16 | this.stack.unshift($ref); 17 | 18 | // chain 19 | return this; 20 | }; 21 | 22 | this.remove = function remove($index){ 23 | $index = $index || 0; 24 | if($index < this.stack.length) 25 | return; 26 | this.stack.splice($index,1); 27 | 28 | // chain 29 | return this; 30 | }; 31 | 32 | }; 33 | -------------------------------------------------------------------------------- /com/bigspaceship/canvas/Shapes.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | CanvasBasil.include('DisplayObject.js'); 4 | 5 | bCanvas.Shapes = function CanvasShapes(){ 6 | 7 | // private vars 8 | var _self = this; 9 | 10 | // public vars 11 | this.name = "Canvas.Shapes"; 12 | 13 | // properties 14 | this.strokeStyle = ''; 15 | this.fillStyle = ''; 16 | this.radius = 0; 17 | this.image = ''; 18 | 19 | 20 | /** 21 | * drawCircle 22 | * 23 | * Drawing a circle. 24 | * 25 | */ 26 | this.drawCircle = function drawCircle($p){ 27 | $.extend(this, $p); 28 | 29 | // set styles 30 | if(this.strokeStyle) bCanvas.context.strokeStyle = this.strokeStyle; 31 | if(this.fillStyle) bCanvas.context.fillStyle = this.fillStyle; 32 | 33 | // draw 34 | bCanvas.context.beginPath(); 35 | bCanvas.context.arc(this.x, this.y, this.radius, 0, Math.PI * 2, true); 36 | bCanvas.context.closePath(); 37 | if(this.strokeStyle) bCanvas.context.stroke(); 38 | if(this.fillStyle) bCanvas.context.fill(); 39 | 40 | // chaining 41 | return this; 42 | }; 43 | 44 | /** 45 | * drawRect 46 | * 47 | * Drawing a rectangle. 48 | * 49 | */ 50 | this.drawRect = function drawRect($p){ 51 | $.extend(this, $p); 52 | 53 | // set styles 54 | if(this.fillStyle) bCanvas.context.fillStyle = this.fillStyle; 55 | 56 | // draw 57 | if(this.fillStyle) bCanvas.context.fillRect(this.x, this.y, this.width, this.height); 58 | 59 | // chaining 60 | return this; 61 | }; 62 | 63 | /** 64 | * drawImage 65 | * 66 | * Draw image. 67 | * 68 | */ 69 | this.drawImage = function drawImage($p){ 70 | var _s = this; 71 | $.extend(this, $p); 72 | 73 | if(typeof(this.image) == 'string'){ 74 | // load from URL 75 | var myImage = new Image(); 76 | myImage.onload = function() { 77 | if(_s.rotation) bCanvas.context.rotate(_s.rotation); 78 | bCanvas.context.drawImage(myImage, this.x, this.y, this.width, this.height); 79 | if(_s.rotation) bCanvas.context.rotate(-_s.rotation); 80 | } 81 | myImage.src = this.image; 82 | }else{ 83 | // load from reference 84 | bCanvas.context.drawImage(this.image, this.x, this.y, this.width, this.height); 85 | }; 86 | 87 | // chaining 88 | return this; 89 | }; 90 | 91 | 92 | }; 93 | -------------------------------------------------------------------------------- /com/bigspaceship/canvas/bCanvas.js: -------------------------------------------------------------------------------- 1 | 2 | bCanvas = new(function bCanvasCore(){ 3 | 4 | // private vars 5 | var _self = this; 6 | var _intervalDraw = null; 7 | var _runBefore = []; 8 | var _runAfter = []; 9 | var _executions = 0; 10 | var _elementsDrawn = 0; 11 | 12 | // public vars 13 | this.name = "bCanvas"; 14 | this.context = null; 15 | this.canvasReference = null; 16 | this.layers = null; 17 | 18 | /** 19 | * layerInBounds 20 | * 21 | * Checks to see if a layer is within the bounds 22 | * of Canvas and if we should bother drawing it 23 | * 24 | * @param $layer Object that would be drawn 25 | * @return boolean 26 | */ 27 | this.layerInBounds = function layerInBounds($layer){ 28 | var _bounds = $layer.getBounds(); 29 | var _cr = _self.canvasReference; 30 | 31 | if( (_bounds.xw > 0 && _bounds.x < _cr.width) && 32 | (_bounds.yh > 0 && _bounds.y < _cr.height) ){ 33 | return true; 34 | }; 35 | 36 | return false; 37 | }; 38 | 39 | /** 40 | * setCanvas 41 | * 42 | * Set reference to the canvas on the DOM via 43 | * an ID. Must be an ID reference. 44 | * 45 | * @param $canvas String reference of target ID attr 46 | * @return Context 47 | */ 48 | this.setCanvas = function setCanvas($canvas){ 49 | this.canvasReference = document.getElementById($canvas); 50 | this.context = this.canvasReference.getContext('2d'); 51 | return this.context; 52 | }; 53 | 54 | /** 55 | * clear 56 | * 57 | * Clear canvas 58 | * 59 | * @return void 60 | */ 61 | this.clear = function(){ 62 | _self.canvasReference.width = _self.canvasReference.width; 63 | }; 64 | 65 | /** 66 | * drawAll 67 | * 68 | * Loops through layer stack from bottom to top 69 | * and draws layers to canvas. 70 | * 71 | * @return void 72 | */ 73 | this.drawAll = function(){ 74 | // clear 75 | _self.clear(); 76 | _elementsDrawn = 0; 77 | 78 | // execute run before 79 | if(_runBefore.length) 80 | _runBefore.forEach(function($a, $i){ 81 | $a(_executions); 82 | }); 83 | 84 | // draw 85 | layer = _self.layers.current( _self.layers.count() - 100 ); 86 | do{ 87 | // draw 88 | if(layer['draw'] && _self.layerInBounds(layer)){ 89 | _elementsDrawn ++; 90 | layer['draw'](); 91 | }else{ 92 | // did not draw element 93 | } 94 | 95 | }while(layer = _self.layers.next()); 96 | 97 | // execute run after 98 | if(_runAfter.length) 99 | _runAfter.forEach(function($a, $i){ 100 | $a(_executions); 101 | }); 102 | 103 | // save execution count 104 | _executions ++; 105 | }; 106 | 107 | /** 108 | * run 109 | * 110 | * Starts the drawing interval 111 | * 112 | * @return void 113 | */ 114 | this.run = function run($speed){ 115 | $speed = $speed || 20; 116 | _intervalDraw = setInterval(_self.drawAll, $speed); 117 | }; 118 | 119 | /** 120 | * runBefore 121 | * 122 | * Adds function that gets fired before the draw statement 123 | * 124 | * @return void 125 | */ 126 | this.runBefore = function runBefore($function){ 127 | _runBefore.unshift($function); 128 | }; 129 | 130 | /** 131 | * runAfter 132 | * 133 | * Adds function that gets fired after the draw statement 134 | * 135 | * @return void 136 | */ 137 | this.runAfter = function runAfter($function){ 138 | _runAfter.unshift($function); 139 | }; 140 | 141 | /** 142 | * stop 143 | * 144 | * Stops the drawing interval 145 | * 146 | * @return void 147 | */ 148 | this.stop = function stop(){ 149 | clearInterval(_intervalDraw); 150 | _intervalDraw = null; 151 | }; 152 | 153 | /** 154 | * debug 155 | * 156 | * Returns debug objects 157 | * 158 | * @return Object 159 | */ 160 | this.debug = function debug(){ 161 | return { 162 | executions: _executions, 163 | layers: _self.layers.count(), 164 | runBeforeCount: _runBefore.length, 165 | runAfterCount: _runAfter.length, 166 | layersDrawn: _elementsDrawn, 167 | layersNotDrawn: _self.layers.count() - _elementsDrawn 168 | }; 169 | }; 170 | 171 | 172 | // ================================================ 173 | // ========= Construct 174 | // ================================================ 175 | 176 | this.construct = function construct(){}; 177 | this.init = function init(){ 178 | this.layers = new bCanvas.Layers(); 179 | }; 180 | 181 | // return. 182 | return CanvasBasil.create(_self, {register: true}); 183 | })(); 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | /** 194 | * Layers [bCanvas.layers] 195 | * 196 | * Allows for adding, removing, traversing, and manipulating 197 | * layers in the draw sequence 198 | * 199 | */ 200 | bCanvas.Layers = function CanvasLayers(){ 201 | 202 | // private vars 203 | var _self = this; 204 | var _lastLayerAccessed = 0; // used for traversing. saves index of last used layer. 205 | 206 | // public vars 207 | this.name = "Canvas.Layers"; 208 | 209 | // properties 210 | this.stack = []; 211 | 212 | 213 | // ================================================ 214 | // ========= Traversing Layers 215 | // ================================================ 216 | 217 | this.setPointer = function setPointer($index){ 218 | switch($index){ 219 | case 'top': 220 | case 'first': $index = this.stack.length-1; 221 | break; 222 | case 'bottom': 223 | case 'last': $index = 0; 224 | break; 225 | }; 226 | 227 | _setLastAccessed($index); 228 | }; 229 | 230 | this.current = function current($index){ 231 | $index = $index != null ? $index : _lastLayerAccessed; 232 | 233 | return this.get($index); 234 | }; 235 | 236 | this.first = function first(){ 237 | return this.get(this.stack.length-1); 238 | }; 239 | 240 | this.next = function next(){ 241 | return this.get(_lastLayerAccessed + 1); 242 | }; 243 | 244 | this.previous = function previous(){ 245 | return this.get(_lastLayerAccessed - 1); 246 | }; 247 | 248 | this.last = function last(){ 249 | return this.get(0); 250 | }; 251 | 252 | this.get = function get($index){ 253 | $index = $index || 0; 254 | 255 | return this.stack[_setLastAccessed($index)]; 256 | }; 257 | 258 | 259 | // ================================================ 260 | // ========= Manipulating Layers 261 | // ================================================ 262 | 263 | this.add = function add($ref, $at){ 264 | if(!isNaN($at)){ 265 | this.stack.splice($at, 0, $ref); 266 | }else{ 267 | $at = this.stack.length; 268 | 269 | // add reference to top of stack 270 | this.stack.push($ref); 271 | } 272 | 273 | // chain 274 | return this; 275 | }; 276 | 277 | this.remove = function remove($index){ 278 | $index = $index || 0; 279 | if($index >= this.stack.length) 280 | return this; 281 | 282 | // remove object 283 | this.stack.splice($index,1); 284 | 285 | // chain 286 | return this; 287 | }; 288 | 289 | 290 | // ================================================ 291 | // ========= Stats / Properties 292 | // ================================================ 293 | 294 | this.count = function count(){ 295 | return this.stack.length; 296 | }; 297 | 298 | 299 | // ================================================ 300 | // ========= Workers 301 | // ================================================ 302 | 303 | function _setLastAccessed($index){ 304 | _lastLayerAccessed = $index; 305 | return $index; 306 | }; 307 | 308 | 309 | // ================================================ 310 | // ========= Native Getters / Setters 311 | // ================================================ 312 | 313 | this.__defineGetter__('length', function(){ 314 | return this.stack.length; 315 | }); 316 | }; 317 | -------------------------------------------------------------------------------- /com/bigspaceship/facebook/fbml_redirect.php: -------------------------------------------------------------------------------- 1 | '; 5 | 6 | ?> -------------------------------------------------------------------------------- /com/bigspaceship/facebook/iframe_popup.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |

You can close the window

46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /com/bigspaceship/facebook/oauthbridge_connect.js: -------------------------------------------------------------------------------- 1 | // jk: this script assumes you are using the Facebook OAuth API and have already called FB.init on your site. 2 | if(!com) var com = {}; 3 | if(!com.bigspaceship) com.bigspaceship = {}; 4 | if(!com.bigspaceship.api) com.bigspaceship.api = {}; 5 | if(!com.bigspaceship.api.facebook) com.bigspaceship.api.facebook = {}; 6 | 7 | if(!com.bigspaceship.api.facebook.OAuthBridge) { 8 | com.bigspaceship.api.facebook.OAuthBridge = {}; 9 | com.bigspaceship.api.facebook.OAuthBridge._swfId = 'site'; 10 | 11 | com.bigspaceship.api.facebook.OAuthBridge.setSwfId = function($id) { 12 | com.bigspaceship.api.facebook.OAuthBridge._swfId = $id; 13 | } 14 | 15 | com.bigspaceship.api.facebook.OAuthBridge.initialize = function() { 16 | // jk: set a timeout of a second in case getLoginStatus fails. 17 | com.bigspaceship.api.facebook.OAuthBridge._timer = setTimeout(function() { 18 | $("#" + com.bigspaceship.api.facebook.OAuthBridge._swfId)[0].handleFacebookLogout(); 19 | },1000); 20 | 21 | FB.getLoginStatus(function(response) { 22 | 23 | clearTimeout(com.bigspaceship.api.facebook.OAuthBridge._timer); 24 | com.bigspaceship.api.facebook.OAuthBridge._timer = null; 25 | if (response.session) { 26 | // jk: there is a bug in the current getLoginStatus method Facebook JavaScript SDK -- it doesn't return permissions as expected. the best we can do is manually ask. 27 | FB.api({ 28 | method : 'fql.query', 29 | query : 'SELECT status_update,photo_upload,sms,offline_access,email,create_event,rsvp_event,publish_stream,read_stream,share_item,create_note,bookmarked,tab_added FROM permissions WHERE uid=' + FB.getSession().uid 30 | }, 31 | function(response) { 32 | var perms = []; 33 | for(perm in response[0]) { 34 | if(response[0][perm] == '1') perms.push(perm); 35 | } 36 | 37 | $("#" + com.bigspaceship.api.facebook.OAuthBridge._swfId)[0].handleFacebookLogin(FB.getSession(),perms.join(',')); 38 | }); 39 | } 40 | else { 41 | $("#" + com.bigspaceship.api.facebook.OAuthBridge._swfId)[0].handleFacebookLogout(); 42 | } 43 | }); 44 | } 45 | 46 | com.bigspaceship.api.facebook.OAuthBridge.login = function($opts) { 47 | if(!$opts) $opts = {}; 48 | 49 | FB.login(function(response) { 50 | if(response.session) { 51 | $("#" + com.bigspaceship.api.facebook.OAuthBridge._swfId)[0].handleFacebookLogin(FB.getSession(),response.perms); 52 | } else { 53 | $("#" + com.bigspaceship.api.facebook.OAuthBridge._swfId)[0].handleFacebookLoginCancel(); 54 | } 55 | },$opts); 56 | } 57 | 58 | com.bigspaceship.api.facebook.OAuthBridge.logout = function() { 59 | FB.logout(function(response) {}); 60 | $("#" + com.bigspaceship.api.facebook.OAuthBridge._swfId)[0].handleFacebookLogout(); 61 | } 62 | } -------------------------------------------------------------------------------- /com/bigspaceship/facebook/oauthbridge_iframe.js: -------------------------------------------------------------------------------- 1 | // sk: this script assumes you are using an iframe to embed your app on facebook 2 | if(!com) var com = {}; 3 | if(!com.bigspaceship) com.bigspaceship = {}; 4 | if(!com.bigspaceship.api) com.bigspaceship.api = {}; 5 | if(!com.bigspaceship.api.facebook) com.bigspaceship.api.facebook = {}; 6 | 7 | if(!com.bigspaceship.api.facebook.OAuthBridge) 8 | { 9 | com.bigspaceship.api.facebook.OAuthBridge = {}; 10 | com.bigspaceship.api.facebook.OAuthBridge._swfId = 'swfContainer'; 11 | com.bigspaceship.api.facebook.OAuthBridge._swfDiv = 'swfContainer'; 12 | 13 | com.bigspaceship.api.facebook.OAuthBridge.setSwfId = function( $id ) 14 | { 15 | com.bigspaceship.api.facebook.OAuthBridge._swfId = $id; 16 | } 17 | 18 | com.bigspaceship.api.facebook.OAuthBridge.setSwfDiv = function( $id ) 19 | { 20 | com.bigspaceship.api.facebook.OAuthBridge._swfDiv = $id; 21 | } 22 | 23 | com.bigspaceship.api.facebook.OAuthBridge.login = function( $url ) 24 | { 25 | props = "width=670,height=425"; 26 | signinWin = window.open( $url, "facebookOAuth", props ); 27 | signinWin.focus(); 28 | return false; 29 | } 30 | 31 | com.bigspaceship.api.facebook.OAuthBridge.confirmFacebookConnection = function( $session ) 32 | { 33 | if( $session != '' ) 34 | { 35 | var flash = document.getElementById( com.bigspaceship.api.facebook.OAuthBridge._swfDiv ); 36 | var json = eval('(' + $session + ')'); 37 | flash.handleFacebookLogin( json ); 38 | } 39 | } 40 | 41 | com.bigspaceship.api.facebook.OAuthBridge.logout = function() 42 | { 43 | } 44 | } -------------------------------------------------------------------------------- /com/bigspaceship/jquery/activeItem/demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ActiveItem jQuery Plugin 5 | 6 | 7 | 41 | 51 | 52 | 53 | 54 |

Demo: jQuery ActiveItem v0.0.1

55 | 56 |
57 |

Item Header

58 |

59 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 60 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 61 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 62 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 63 | takimata sanctus est Lorem ipsum dolor sit amet. 64 |

65 |
66 | 67 |
68 |

Item Header

69 |

70 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 71 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 72 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 73 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 74 | takimata sanctus est Lorem ipsum dolor sit amet. 75 |

76 |

77 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 78 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 79 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 80 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 81 | takimata sanctus est Lorem ipsum dolor sit amet. 82 |

83 |
84 | 85 |
86 |

Item Header

87 |

88 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 89 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 90 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 91 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 92 | takimata sanctus est Lorem ipsum dolor sit amet. 93 |

94 |

95 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 96 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 97 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 98 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 99 | takimata sanctus est Lorem ipsum dolor sit amet. 100 |

101 |

102 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 103 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 104 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 105 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 106 | takimata sanctus est Lorem ipsum dolor sit amet. 107 |

108 |
109 | 110 |
111 |

Item Header

112 |

113 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 114 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 115 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 116 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 117 | takimata sanctus est Lorem ipsum dolor sit amet. 118 |

119 |
120 | 121 |
122 |

Item Header

123 |

124 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 125 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 126 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 127 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 128 | takimata sanctus est Lorem ipsum dolor sit amet. 129 |

130 |
131 | 132 |
133 |

Item Header

134 |

135 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 136 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 137 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 138 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 139 | takimata sanctus est Lorem ipsum dolor sit amet. 140 |

141 |
142 | 143 |
144 |

Item Header

145 |

146 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 147 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 148 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 149 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 150 | takimata sanctus est Lorem ipsum dolor sit amet. 151 |

152 |

153 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 154 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 155 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 156 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 157 | takimata sanctus est Lorem ipsum dolor sit amet. 158 |

159 |

160 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 161 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 162 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 163 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 164 | takimata sanctus est Lorem ipsum dolor sit amet. 165 |

166 |

167 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 168 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 169 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 170 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 171 | takimata sanctus est Lorem ipsum dolor sit amet. 172 |

173 |

174 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 175 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 176 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 177 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 178 | takimata sanctus est Lorem ipsum dolor sit amet. 179 |

180 |

181 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 182 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 183 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 184 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 185 | takimata sanctus est Lorem ipsum dolor sit amet. 186 |

187 |

188 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 189 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 190 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 191 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 192 | takimata sanctus est Lorem ipsum dolor sit amet. 193 |

194 |
195 | 196 |
197 |

Item Header

198 |

199 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 200 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 201 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 202 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 203 | takimata sanctus est Lorem ipsum dolor sit amet. 204 |

205 |
206 | 207 |
208 |

Item Header

209 |

210 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 211 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 212 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 213 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 214 | takimata sanctus est Lorem ipsum dolor sit amet. 215 |

216 |
217 | 218 |
219 |

Item Header

220 |

221 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 222 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 223 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 224 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 225 | takimata sanctus est Lorem ipsum dolor sit amet. 226 |

227 |
228 | 229 |
230 |

Item Header

231 |

232 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 233 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 234 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 235 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 236 | takimata sanctus est Lorem ipsum dolor sit amet. 237 |

238 |
239 | 240 |
241 |

Item Header

242 |

243 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 244 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 245 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 246 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 247 | takimata sanctus est Lorem ipsum dolor sit amet. 248 |

249 |
250 | 251 |
252 |

Item Header

253 |

254 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 255 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 256 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 257 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 258 | takimata sanctus est Lorem ipsum dolor sit amet. 259 |

260 |
261 | 262 |
263 |

Item Header

264 |

265 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 266 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 267 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 268 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 269 | takimata sanctus est Lorem ipsum dolor sit amet. 270 |

271 |
272 | 273 |
274 |

Item Header

275 |

276 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 277 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 278 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 279 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 280 | takimata sanctus est Lorem ipsum dolor sit amet. 281 |

282 |
283 | 284 |
285 |

Item Header

286 |

287 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 288 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 289 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 290 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 291 | takimata sanctus est Lorem ipsum dolor sit amet. 292 |

293 |
294 | 295 |
296 |

Item Header

297 |

298 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 299 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 300 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 301 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 302 | takimata sanctus est Lorem ipsum dolor sit amet. 303 |

304 |
305 | 306 |
307 |

Item Header

308 |

309 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 310 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 311 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 312 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 313 | takimata sanctus est Lorem ipsum dolor sit amet. 314 |

315 |
316 | 317 |
318 |

Item Header

319 |

320 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 321 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 322 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 323 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 324 | takimata sanctus est Lorem ipsum dolor sit amet. 325 |

326 |
327 | 328 |
329 |

Item Header

330 |

331 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 332 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 333 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 334 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 335 | takimata sanctus est Lorem ipsum dolor sit amet. 336 |

337 |
338 | 339 |
340 |

Item Header

341 |

342 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 343 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 344 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 345 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 346 | takimata sanctus est Lorem ipsum dolor sit amet. 347 |

348 |
349 | 350 |
351 |

Item Header

352 |

353 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 354 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 355 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 356 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 357 | takimata sanctus est Lorem ipsum dolor sit amet. 358 |

359 |
360 | 361 |
362 |

Item Header

363 |

364 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 365 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 366 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 367 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 368 | takimata sanctus est Lorem ipsum dolor sit amet. 369 |

370 |
371 | 372 |
373 |

Item Header

374 |

375 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 376 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 377 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 378 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 379 | takimata sanctus est Lorem ipsum dolor sit amet. 380 |

381 |
382 | 383 |
384 |

Item Header

385 |

386 | Lorem iLorem ipsum dolor sit amet, consetetur sadipscing elitr, 387 | sed diam nonumyeirmod tempor invidunt ut labore et dolore magna 388 | aliquyam erat, sed diamvoluptua. At vero eos et accusam et justo 389 | duo dolores et ea rebum. Stet clita kasd gubergren, no sea 390 | takimata sanctus est Lorem ipsum dolor sit amet. 391 |

392 |
393 | 394 | 395 | 396 | -------------------------------------------------------------------------------- /com/bigspaceship/jquery/activeItem/jquery.activeItem.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery.activeItem.js by Big Spaceship. 2008-2011 3 | * 4 | * To contact Big Spaceship, email info@bigspaceship.com or write to us at 45 Main Street #716, Brooklyn, NY, 11201. 5 | * Visit http://labs.bigspaceship.com for documentation, updates and more free code. 6 | * 7 | * 8 | * Copyright (c) 2008-2010 Big Spaceship, LLC 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in 18 | * all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | * THE SOFTWARE. 27 | * 28 | **/ 29 | 30 | 31 | /** 32 | * jQuery.activeItem 33 | * 34 | * @copyright 2011 Big Spaceship, LLC 35 | * @author Matt Kenefick 36 | * @version 0.0.1 37 | * @langversion Javascript 38 | * 39 | * 40 | * Usage: 41 | * 42 | * Tie the activeItem class to whatever elements on the screen you want to 43 | * monitor and it will attach/remove "active" to their class 44 | 45 | 46 | $(document).ready(function(){ 47 | $('.item').activeItem({ 48 | paddingTop: 50, 49 | paddingBottom: 200, 50 | maxActive: 1 51 | }); 52 | }); 53 | * 54 | * 55 | */ 56 | 57 | (function($){ 58 | $.fn.activeItem = function($options){ 59 | // to monitor 60 | var _objects = []; 61 | var _tmp = null; 62 | var _tmpOffset = null; 63 | var _tmpHeight = null; 64 | var _winHeight = 0; 65 | var _winScrollTop = 0; 66 | 67 | // vars 68 | var _currentActive = 0; 69 | 70 | // options 71 | var _paddingTop = $options.paddingTop || 0; 72 | var _paddingBottom = $options.paddingBottom || 0; 73 | var _maxActive = $options.maxActive || 1000; 74 | 75 | // monitor scroller 76 | $(document).scroll(function(){ 77 | // window 78 | _winHeight = $(window).height(); 79 | _winScrollTop = $(window).scrollTop(); 80 | _currentActive = 0; 81 | 82 | // each object 83 | for(var i = 0; i < _objects.length; i++){ 84 | _tmp = $(_objects[i]); 85 | _tmpOffset = _tmp.offset(); 86 | _tmpHeight = _tmp.height(); 87 | 88 | // add it 89 | if( 90 | ( 91 | _tmpOffset.top - _winScrollTop - _paddingTop > 0 || 92 | _tmpOffset.top + _tmpHeight - _winScrollTop - _paddingTop > 0 93 | ) 94 | && 95 | _tmpOffset.top - _winScrollTop + _paddingBottom < _winHeight 96 | 97 | ){ 98 | // only add if we're allowed to 99 | if(_currentActive < _maxActive){ 100 | _tmp.addClass('active'); 101 | _currentActive++; 102 | }; 103 | }else{ 104 | _tmp.removeClass('active'); 105 | }; 106 | 107 | // remove the class if we're over budget 108 | if(_currentActive > _maxActive){ 109 | _tmp.removeClass('active'); 110 | }; 111 | }; 112 | 113 | console.log(_currentActive); 114 | }); 115 | 116 | // get each object 117 | return this.each(function(){ 118 | _objects.push(this); 119 | }); 120 | }; 121 | })(jQuery); 122 | -------------------------------------------------------------------------------- /com/bigspaceship/jquery/applyClasses/jquery.applyClasses.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery.applyClasses.js by Big Spaceship. 2008-2011 3 | * 4 | * To contact Big Spaceship, email info@bigspaceship.com or write to us at 45 Main Street #716, Brooklyn, NY, 11201. 5 | * Visit http://labs.bigspaceship.com for documentation, updates and more free code. 6 | * 7 | * 8 | * Copyright (c) 2008-2010 Big Spaceship, LLC 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in 18 | * all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | * THE SOFTWARE. 27 | * 28 | **/ 29 | 30 | 31 | /** 32 | * jQuery.applyClasses 33 | * 34 | * @copyright 2011 Big Spaceship, LLC 35 | * @author Matt Kenefick 36 | * @version 0.0.1 37 | * @langversion Javascript 38 | * 39 | * 40 | * Usage: 41 | * 42 | * Tie the activeItem class to whatever elements on the screen you want to 43 | * monitor and it will attach/remove "active" to their class 44 | 45 | 46 | $(document).ready(function(){ 47 | $('.item').activeItem({ 48 | paddingTop: 50, 49 | paddingBottom: 200, 50 | maxActive: 1 51 | }); 52 | }); 53 | * 54 | * 55 | */ 56 | 57 | if(!window['__jsClasses']){ 58 | var __jsClasses = {__unnamed: []}; 59 | }; 60 | 61 | (function($){ 62 | 63 | 64 | $.fn.applyClasses = function($options){ 65 | 66 | // get each object 67 | return this.each(function(){ 68 | var self = $(this); 69 | var id = $(this).attr('id'); 70 | var classType = $(this).attr('data-jsclass'); 71 | var tmpClass; 72 | classType = classType.split(','); 73 | 74 | for(var i = 0; i < classType.length; i++){ 75 | if(window[classType[i]]){ 76 | tmpClass = new window[classType[i]](self, this); 77 | if(id != ''){ 78 | if(!__jsClasses[id]){ 79 | __jsClasses[id] = {}; 80 | }; 81 | __jsClasses[id][classType[i]] = tmpClass; 82 | }else 83 | __jsClasses.__unnamed.push(tmpClass); 84 | }else{ 85 | if(window['console']) 86 | console.log("Class `" + classType + "` doesn't exist."); 87 | } 88 | }; 89 | }); 90 | }; 91 | })(jQuery); 92 | -------------------------------------------------------------------------------- /com/bigspaceship/jquery/codeExplorer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CodeExplorer jQuery Plugin 5 | 6 | 7 | 8 | 24 | 49 | 50 | 51 | 52 |

Demo: jQuery CodeExplorer v0.0.1

53 | 54 |
55 |
56 | 57 |

58 | How to setup: 59 |

60 |
61 |         /**
62 |          *    Must be attached to a container via ID. Can only be attached
63 |          *    to one each.
64 |          *
65 |          *    ceDir         // where your CodeExplorer package lives
66 |          *    theme         // the name of the style you want to use
67 |          *    directory     // PHP file that proxies to the directory your files
68 |          */
69 |         $('#MyCodeArea').codeExplorer({
70 |             ceDir:          './script/codeExplorer/',
71 |             theme:          'coda',
72 |             directory:      'Projects.php'
73 |         });
74 |         
75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /com/bigspaceship/jquery/codeExplorer/script/codeExplorer/CodeExplorer.php: -------------------------------------------------------------------------------- 1 | true, // return web page 23 | CURLOPT_HEADER => false, // don't return headers 24 | CURLOPT_FOLLOWLOCATION => true, // follow redirects 25 | CURLOPT_ENCODING => "", // handle all encodings 26 | CURLOPT_USERAGENT => "spider", // who am i 27 | CURLOPT_AUTOREFERER => true, // set referer on redirect 28 | CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect 29 | CURLOPT_TIMEOUT => 120, // timeout on response 30 | CURLOPT_MAXREDIRS => 10, // stop after 10 redirects 31 | ); 32 | 33 | $ch = curl_init( $_GET['file'] ); 34 | curl_setopt_array( $ch, $options ); 35 | $content = curl_exec( $ch ); 36 | $err = curl_errno( $ch ); 37 | $errmsg = curl_error( $ch ); 38 | $header = curl_getinfo( $ch ); 39 | curl_close( $ch ); 40 | 41 | $header['errno'] = $err; 42 | $header['errmsg'] = $errmsg; 43 | echo $content; 44 | exit; 45 | }; 46 | 47 | $replace = str_replace($_GET['root'], '', BASEURL); 48 | $dir = substr_count($replace, '/'); 49 | $goBack = str_repeat('../', 2); 50 | 51 | /** 52 | * Get a directory structure, 53 | * formatted with UL/LI 54 | */ 55 | if(isset($codeDirectory)){ 56 | function fillStrWithFileNodes( DirectoryIterator $dir ){ 57 | $data = ''; 58 | foreach ( $dir as $node ){ 59 | if ( $node->isDir() && !$node->isDot() ){ 60 | $data .= '
  • '; 61 | $data .= '' . $node->getFilename() . ''; 62 | $data .= '
      '; 63 | $data .= fillStrWithFileNodes( new DirectoryIterator( $node->getPathname() ) ); 64 | $data .= '
    '; 65 | $data .= '
  • '; 66 | } else if ( $node->isFile() ) { 67 | $data .= '
  • '; 68 | $data .= '' . $node->getFilename() . ''; 69 | $data .= '
  • '; 70 | } 71 | } 72 | return $data; 73 | } 74 | 75 | // this removes all the attempts to go backwards in a directory 76 | $fileData = fillStrWithFileNodes( new DirectoryIterator( $goBack . str_replace('../', '', $codeDirectory) ) ); 77 | 78 | echo '
      ' . $fileData . '
    '; 79 | exit; 80 | } 81 | -------------------------------------------------------------------------------- /com/bigspaceship/jquery/codeExplorer/script/codeExplorer/external/prettify/lang-apollo.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 2 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]) -------------------------------------------------------------------------------- /com/bigspaceship/jquery/codeExplorer/script/codeExplorer/external/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\u000c"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], 2 | ["com",/^(?: