more 1page work
authorec2-user <ec2-user@fcdev4.finalsclub.org>
Mon, 14 Nov 2011 19:45:37 +0000 (19:45 +0000)
committerec2-user <ec2-user@fcdev4.finalsclub.org>
Mon, 14 Nov 2011 19:45:37 +0000 (19:45 +0000)
public/index.html
public/javascripts/main.js
public/javascripts/protodiv.js
public/stylesheets/fc2.css

index 374cfbfa67252670c7a2584999af8e9e599abb55..d99afa2c6bddf9aa1df888995fef3ae9a39a3708 100644 (file)
@@ -1,5 +1,17 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
+       <!-- 
+
+                Currently tested with:
+
+                                               Mac             Windows
+                                        ______________________
+                       Chrome  |       15              -
+                       Safari  |       5               -
+                       FF              |       8               8
+                       IE              |       N/A             9
+
+       -->
 
        <head>
                <title>FinalsClub.org</title>
@@ -51,6 +63,7 @@
 
 
                <div class="content">
+
                        <style>
                                /* The is here is because it's related less to "styling" and more to UI "behavior" */
                                .page { display: none; }
index d06a72d8024549de962e7ba500940de6df27d21a..eacaea17e9f75e11837f5900a934cd000b74fb3b 100644 (file)
@@ -313,25 +313,41 @@ function showPage(y) {
 */
 var topQueue = [0]
 function goPage(path) {
-       var y = 0 + window.pageYOffset
-       topQueue.push(y)
-       history.pushState({}, path, path);
-       showPage(0);
+       if(history.pushState !== undefined) {
+               topQueue.push(window.pageYOffset)
+               history.pushState({}, path, path);
+               showPage(0);
+       }
+       else {
+               document.location = path;
+       }
 }
 
 
 /* Simulates a "back" browser navigation.  */
+var popped = false;
 function goBack(event) {
-       var y = topQueue.pop()
-       showPage( y );
+       popped = true;
+       showPage( topQueue.pop() );
 }
 
 
+
 $(document).ready(function() {
 
        // This code executes after the page has been fully loaded
 
+       $(".proto").css("display", "none");             // make all the prototypes invisible
+
+       //$("body").get(0).onunload = function() { }    // fires when leaving the page proper
+
+       ProtoDiv.each = function(e) { $(e).show() }
+
        window.onpopstate = goBack
+       setTimeout(function() {
+               if(!popped)
+                       showPage(0)
+       }, 2000);
 
        // xxx older FF browsers don't fire a page load/reload - deal with it somehow.
        // showPage( 0 );               // needed for some older browsers, redundant for chrome
index e74f143e939cbfa175883ef473e8354805ce5665..bf07460a5e2c417ce5fa9fa51cf1f5e1672ecf27 100644 (file)
@@ -112,6 +112,8 @@ ProtoDiv.replicate = function(id, arr, keep) {
                delete e.id
                mom.insertBefore(e, sib)
                ProtoDiv.inject(e, obj, i)
+               if(ProtoDiv.each)
+                       ProtoDiv.each(e, i, obj, mom)
        }
 
        if(!keep)
index 2b7ab0c6eed5081df562f56b50445f554d1433ed..d6a1e22c5c4069043e1c49cc69b380c1fd25a9e9 100644 (file)
@@ -240,7 +240,7 @@ div#wrapper div#header div.buttons {
 }
 
 div#wrapper div#header {
-       background: #444;
+       background: #333;
 }
 
 div#wrapper div#header .rcol {
@@ -883,8 +883,4 @@ div.conduct p.vague {
        -webkit-border-radius: 0.20em;
 }
 
-.proto {
-       /*display: none;*/
-}
-