From 1c009430af80260d67c47652783931414989c75d Mon Sep 17 00:00:00 2001 From: gsmselftest Date: Wed, 9 Nov 2011 16:41:00 +0100 Subject: Final folder team project --- .../examples/delayedLoader/delayedLoading.js | 228 --------------------- .../pChart2.1.2/examples/delayedLoader/draw.php | 34 --- .../pChart2.1.2/examples/delayedLoader/index.php | 91 -------- .../pChart2.1.2/examples/delayedLoader/wait.gif | Bin 2545 -> 0 bytes 4 files changed, 353 deletions(-) delete mode 100644 notFinishedCode/pChart2.1.2/examples/delayedLoader/delayedLoading.js delete mode 100644 notFinishedCode/pChart2.1.2/examples/delayedLoader/draw.php delete mode 100644 notFinishedCode/pChart2.1.2/examples/delayedLoader/index.php delete mode 100644 notFinishedCode/pChart2.1.2/examples/delayedLoader/wait.gif (limited to 'notFinishedCode/pChart2.1.2/examples/delayedLoader') diff --git a/notFinishedCode/pChart2.1.2/examples/delayedLoader/delayedLoading.js b/notFinishedCode/pChart2.1.2/examples/delayedLoader/delayedLoading.js deleted file mode 100644 index b76bbe3..0000000 --- a/notFinishedCode/pChart2.1.2/examples/delayedLoader/delayedLoading.js +++ /dev/null @@ -1,228 +0,0 @@ - /* - delayedLoader - JS to delay out of sight pictures rendering - - Version : 2.0.2 - Made by : Jean-Damien POGOLOTTI - Last Update : 10/12/10 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - var PictureCache = new Array(); - var PictureCount = 0; - var WaitPicture = "wait.gif"; - var DivClassName = "pChart"; - var DefaultWidth = 70; - var DefaultHeight = 230; - var DefaultAlt = "pChart rendered picture"; - - - /* Do the DOM document processing */ - function loaderInit() - { - WindowSize = getWindowSize(); - WindowHeight = WindowSize[1]; - Offset = getScrollXY(); - HeightOffset = Offset[1]; - - /* Enumerate the tags */ - Links = document.getElementsByTagName("a"); - for (i = 0; i < Links.length; i++) - { - className = Links[i].className; - - if ( className == DivClassName ) - { - ObjectWidth = Links[i].getAttribute("data-pchart-width"); - ObjectHeight = Links[i].getAttribute("data-pchart-height"); - ObjectID = Links[i].id; - ObjectTop = Links[i].offsetTop; - ObjectURL = Links[i].href; - ObjectAlt = Links[i].getAttribute("data-pchart-alt"); - - if ( ObjectWidth == null ) { ObjectWidth = DefaultWidth; } - if ( ObjectHeight == null ) { ObjectHeight = DefaultHeight; } - if ( ObjectAlt == null ) { ObjectAlt = DefaultAlt; } - - if (ObjectID == "") { ObjectID = "pChart-"+i; Links[i].id = ObjectID; } - - PictureCache[PictureCount] = new Array(); - PictureCache[PictureCount][0] = ObjectID; - PictureCache[PictureCount][1] = ObjectTop; - PictureCache[PictureCount][2] = ObjectURL; - PictureCache[PictureCount][3] = ObjectAlt; - PictureCache[PictureCount][4] = ObjectWidth; - PictureCache[PictureCount][5] = ObjectHeight; - - PictureCount++; - } - } - - /* Replace the tags by
ones and attach the loader */ - for(i=0;i",i); - - if ( HeightOffset + WindowHeight > PictureCache[i][1] ) { triggerVisible(i); } - } - } - - /* Replace the contents of the delayed loading DIV */ - function changeContent(html, id) - { DivID = PictureCache[id][0]; document.getElementById(DivID).innerHTML = html; } - - /* Trigger the picture rendering when the pChart DIV became visible */ - function triggerVisible(PictureID) - { - if ( !PictureCache[PictureID][6] == true ) - { - PictureCache[PictureID][6] = true; - ajaxRender(PictureCache[PictureID][2],PictureID); - } - } - - /* Catch the navigator window scrolling event */ - function scrollEvent() - { - WindowSize = getWindowSize(); - WindowHeight = WindowSize[1]; - Offset = getScrollXY(); - HeightOffset = Offset[1]; - - for(i=0;i<=PictureCount-1;i++) { if ( HeightOffset + WindowHeight > PictureCache[i][1] ) { triggerVisible(i); } } - } - - /* Cross browser X/Y window offset gatherer */ - function getScrollXY() - { - var scrOfX = 0, scrOfY = 0; - - if( typeof( window.pageYOffset ) == 'number' ) - { scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } - else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) - { scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } - else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) - { scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } - - return [ scrOfX, scrOfY ]; - } - - /* Cross browser X/Y window size gatherer */ - function getWindowSize() - { - var myWidth = 0, myHeight = 0; - - if( typeof( window.innerWidth ) == 'number' ) - { myWidth = window.innerWidth; myHeight = window.innerHeight; } - else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) - { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } - else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) - { myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } - - return [ myWidth, myHeight ]; - } - - /* Cross browser alpha transparency changer */ - function changeOpac(opacity, id) - { - DivID = PictureCache[id][0]; - - var object = document.getElementById(DivID).style; - object.opacity = (opacity / 100); - object.MozOpacity = (opacity / 100); - object.KhtmlOpacity = (opacity / 100); - object.filter = "alpha(opacity=" + opacity + ")"; - } - - /* Shade in-out function */ - function opacity(id, opacStart, opacEnd, millisec) - { - var speed = Math.round(millisec / 100); - var timer = 0; - - if(opacStart > opacEnd) - { - for(i = opacStart; i >= opacEnd; i--) - { - setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); - timer++; - } - } - else if(opacStart < opacEnd) - { - for(i = opacStart; i <= opacEnd; i++) - { - setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); - timer++; - } - } - } - - /* Start the loader */ - function StartFade(PictureID) - { - Loader = new Image(); - URL = PictureCache[PictureID][2]; - Loader.src = URL; - setTimeout("CheckLoadingStatus("+PictureID+")", 200); - } - - /* check the picture loading status */ - function CheckLoadingStatus(PictureID) - { - DivID = PictureCache[PictureID][0]; - URL = PictureCache[PictureID][2]; - Alt = PictureCache[PictureID][3]; - - if ( Loader.complete == true ) - { - changeOpac(0, PictureID); - HTMLResult = "
"+Alt+"
"; - document.getElementById(DivID).innerHTML = HTMLResult; - - opacity(PictureID,0,100,100); - } - else - setTimeout("CheckLoadingStatus("+PictureID+")", 200); - } - - /* Compute the pChart picture in background */ - function ajaxRender(URL,PictureID) - { - var xmlhttp=false; - /*@cc_on @*/ - /*@if (@_jscript_version >= 5) - try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } - @end @*/ - - if (!xmlhttp && typeof XMLHttpRequest!='undefined') - { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } - - if (!xmlhttp && window.createRequest) - { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } - - xmlhttp.open("GET", URL,true); - - xmlhttp.onreadystatechange=function() - { if (xmlhttp.readyState==4) { StartFade(PictureID); } } - xmlhttp.send(null) - } diff --git a/notFinishedCode/pChart2.1.2/examples/delayedLoader/draw.php b/notFinishedCode/pChart2.1.2/examples/delayedLoader/draw.php deleted file mode 100644 index c5b3c2f..0000000 --- a/notFinishedCode/pChart2.1.2/examples/delayedLoader/draw.php +++ /dev/null @@ -1,34 +0,0 @@ -drawGradientArea(0,0,700,230,DIRECTION_HORIZONTAL,array("StartR"=>220,"StartG"=>220,"StartB"=>220,"EndR"=>180,"EndG"=>180,"EndB"=>180,"Alpha"=>100)); - $myPicture->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,array("StartR"=>220,"StartG"=>220,"StartB"=>220,"EndR"=>180,"EndG"=>180,"EndB"=>180,"Alpha"=>50)); - $RectangleSettings = array("R"=>180,"G"=>180,"B"=>180,"Alpha"=>100); - - /* Add a border to the picture */ - $myPicture->drawRectangle(0,0,699,229,array("R"=>150,"G"=>150,"B"=>150)); - - /* Write the title */ - $myPicture->setFontProperties(array("FontName"=>"../../fonts/advent_light.ttf","FontSize"=>40)); - $myPicture->drawText(130,130,"Delayed loading script",array("R"=>255,"G"=>255,"B"=>255)); - - /* Write the seed # */ - $myPicture->setFontProperties(array("FontName"=>"../../fonts/advent_light.ttf","FontSize"=>10)); - $myPicture->drawText(130,140,"Seed # : ".$Seed,array("R"=>255,"G"=>255,"B"=>255)); - - /* Draw a bezier curve */ - $BezierSettings = array("R"=>255,"G"=>255,"B"=>255,"Ticks"=>4,"DrawArrow"=>TRUE,"ArrowTwoHeads"=>TRUE); - $myPicture->drawBezier(360,170,670,120,430,100,560,190,$BezierSettings); - - /* Render the picture (choose the best way) */ - $myPicture->autoOutput("draw.png"); -?> \ No newline at end of file diff --git a/notFinishedCode/pChart2.1.2/examples/delayedLoader/index.php b/notFinishedCode/pChart2.1.2/examples/delayedLoader/index.php deleted file mode 100644 index 10e3db0..0000000 --- a/notFinishedCode/pChart2.1.2/examples/delayedLoader/index.php +++ /dev/null @@ -1,91 +0,0 @@ - - - - pChart 2.x - Delayed loading - - - - - -
-
 Navigation
- - - - - - - - - -
 Examples Sandbox Delayed loader Image Map
-
- -
- -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
-
Picture 1 -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- Picture 2 -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- Picture 3 -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- Picture 4 -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- Picture 5 -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- Picture 6 -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- Picture 7 -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- - \ No newline at end of file diff --git a/notFinishedCode/pChart2.1.2/examples/delayedLoader/wait.gif b/notFinishedCode/pChart2.1.2/examples/delayedLoader/wait.gif deleted file mode 100644 index 1c72ebb..0000000 Binary files a/notFinishedCode/pChart2.1.2/examples/delayedLoader/wait.gif and /dev/null differ -- cgit v1.2.3-55-g7522