From 0aa48d0503c69c9ebc1d2bb209bfbec10e8bed64 Mon Sep 17 00:00:00 2001 From: Bryan Berry Date: Wed, 17 Feb 2010 09:39:34 +0000 Subject: initial commit. Lesson English_Animal_Identification is current template --- diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..9c37d42 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +.tmp* +*# \ No newline at end of file diff --git a/COPYING b/COPYING new file mode 100755 index 0000000..53e9b54 --- /dev/null +++ b/COPYING @@ -0,0 +1,25 @@ +Copyright (c) 2009 Open Learning Exchange Nepal + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +This is the MIT license +From http://www.opensource.org/licenses/mit-license.php \ No newline at end of file diff --git a/assets/audio/correct.ogg b/assets/audio/correct.ogg new file mode 100755 index 0000000..a0d9e3a --- /dev/null +++ b/assets/audio/correct.ogg Binary files differ diff --git a/assets/audio/incorrect.ogg b/assets/audio/incorrect.ogg new file mode 100755 index 0000000..4805e55 --- /dev/null +++ b/assets/audio/incorrect.ogg Binary files differ diff --git a/assets/image/1.png b/assets/image/1.png new file mode 100755 index 0000000..fe825da --- /dev/null +++ b/assets/image/1.png Binary files differ diff --git a/assets/image/2.png b/assets/image/2.png new file mode 100755 index 0000000..758d6f5 --- /dev/null +++ b/assets/image/2.png Binary files differ diff --git a/assets/image/3.png b/assets/image/3.png new file mode 100755 index 0000000..2c86afb --- /dev/null +++ b/assets/image/3.png Binary files differ diff --git a/assets/image/4.png b/assets/image/4.png new file mode 100755 index 0000000..8253cc5 --- /dev/null +++ b/assets/image/4.png Binary files differ diff --git a/assets/image/5.png b/assets/image/5.png new file mode 100755 index 0000000..609ab6e --- /dev/null +++ b/assets/image/5.png Binary files differ diff --git a/assets/image/6.png b/assets/image/6.png new file mode 100755 index 0000000..ccc9cf1 --- /dev/null +++ b/assets/image/6.png Binary files differ diff --git a/assets/image/background.png b/assets/image/background.png new file mode 100755 index 0000000..146c777 --- /dev/null +++ b/assets/image/background.png Binary files differ diff --git a/assets/image/correct.png b/assets/image/correct.png new file mode 100755 index 0000000..d6e54a8 --- /dev/null +++ b/assets/image/correct.png Binary files differ diff --git a/assets/image/image_name/1.png b/assets/image/image_name/1.png new file mode 100755 index 0000000..6f01040 --- /dev/null +++ b/assets/image/image_name/1.png Binary files differ diff --git a/assets/image/image_name/10.png b/assets/image/image_name/10.png new file mode 100755 index 0000000..788fda4 --- /dev/null +++ b/assets/image/image_name/10.png Binary files differ diff --git a/assets/image/image_name/2.png b/assets/image/image_name/2.png new file mode 100755 index 0000000..143ae9d --- /dev/null +++ b/assets/image/image_name/2.png Binary files differ diff --git a/assets/image/image_name/3.png b/assets/image/image_name/3.png new file mode 100755 index 0000000..eb0bfdf --- /dev/null +++ b/assets/image/image_name/3.png Binary files differ diff --git a/assets/image/image_name/4.png b/assets/image/image_name/4.png new file mode 100755 index 0000000..c602d76 --- /dev/null +++ b/assets/image/image_name/4.png Binary files differ diff --git a/assets/image/image_name/5.png b/assets/image/image_name/5.png new file mode 100755 index 0000000..6211dd2 --- /dev/null +++ b/assets/image/image_name/5.png Binary files differ diff --git a/assets/image/image_name/6.png b/assets/image/image_name/6.png new file mode 100755 index 0000000..8e63238 --- /dev/null +++ b/assets/image/image_name/6.png Binary files differ diff --git a/assets/image/image_name/7.png b/assets/image/image_name/7.png new file mode 100755 index 0000000..9be09b3 --- /dev/null +++ b/assets/image/image_name/7.png Binary files differ diff --git a/assets/image/image_name/8.png b/assets/image/image_name/8.png new file mode 100755 index 0000000..efc190e --- /dev/null +++ b/assets/image/image_name/8.png Binary files differ diff --git a/assets/image/image_name/9.png b/assets/image/image_name/9.png new file mode 100755 index 0000000..3e22423 --- /dev/null +++ b/assets/image/image_name/9.png Binary files differ diff --git a/assets/image/incorrect.png b/assets/image/incorrect.png new file mode 100755 index 0000000..789db87 --- /dev/null +++ b/assets/image/incorrect.png Binary files differ diff --git a/css/chakra.css b/css/chakra.css new file mode 100755 index 0000000..7e2362f --- /dev/null +++ b/css/chakra.css @@ -0,0 +1,229 @@ +/* ====================================== */ +/* ====== CHAKRA CSS TEMPLATE FILE ====== */ +/* ====================================== */ + +/* ====================================== */ +/* ========= MAIN PROPERTIES ============ */ +body +{ + background: #D8D8D8; + margin: 0 auto; + width: 640px; + min-width: 640px; + padding: 0; + font-family: "Georgia", serif; +} + +img +{ + border: none; +} + +.selected { + background: #FFFFFF; +} + +/* ====================================== */ +/* ========== HTML ELEMENTS ============= */ +h1 { } +h2 { } +h3 { } +h4 { } +h5 { } +h6 { } +p { } +span { } + +/* ====================================== */ +/* ========== HTML 5 ELEMENTS =========== */ +header, footer, aside, nav, article, section { + display: block; +} + +/* ====================================== */ +/* =========== NAVIGATION BAR =========== */ +#navigation +{ + display: block; + width: 100%; + background: #6E6E6E; + padding-top: 0.2em; + padding-bottom: 0.2em; +} + #knavbar { + display: table; + width: 640px; + margin: 0 auto; + } + +#curriculum +{ + padding: 5px; + background: #ccc; + margin: 10px; + display: block; + width: auto; + text-align: right; + display: none; + /* How about putting 'Link to subject curriculum' in the help section ? */ +} + +.topNav { + width: 30px; + height: 30px; + padding: 5px; +} + +.floatLeft { + float: left; +} +.floatRight { + float: right; +} +.inline { + display: inline; +} + +/* ====================================== */ +/* =========== MIDDLE SECTION =========== */ +#middle +{ + display: block; + padding: .5em 0 .5em 0; + background: #BDBDBD; +} + +#middle header { + text-align: center; + font-size: 1.0em; + margin: 5px 0 5px 0; + padding-bottom: 2px; + font-weight: bold; +} + + .middleRow ul { + display: table; + margin: 0 auto; + padding: 0; + background: #BDBDBD; + } + .middleRow ul li { + display: table-cell; + text-align: center; + margin: 0; + border: 3px solid #BDBDBD; + } + .middleRow ul li a { + display: block; + text-decoration: none; + font-weight: bold; + color: #000; + padding: 0.4em; + } + .middleRow ul li a img { + width: 120px; + } + .middleRow ul li:hover { + text-decoration: underline; + border: 3px solid #424242; + } + +/* ====================================== */ +/* ============ ADMIN SECTION =========== */ +#admin { + display: block; + background: #4080c0; + width: 100%; + margin: 0 auto; +} + +#admin ul { + display: table; + list-style: none; + margin: 0 auto; + padding: .5em 0 .5em 0; +} + +#admin ul li { + display: table-cell; + text-align: center; + padding: 0.2em 2em 0.2em 2em; +} + +#admin ul li a +{ + display: block; + text-decoration: none; + font-weight: bold; + color: #000000; +} +#admin ul li a:hover { + text-decoration: underline; +} +#admin p { + line-height: 0; +} + +#admin img +{ + height: 50px; + width: auto; +} + +/* ====================================== */ +/* ====== INDIVIDUAL GRADE SECTION ====== */ +#monthSelect { + text-align: center; + font-size: 1.0em; + font-weight: bold; + padding: 5px 0 5px 0; +} + +.monthList { + /* */ + border-top: 1px solid #666; + text-align: center; + padding: 5px 0 5px 0; +} + +.lessonList { + padding: 1em; + margin: 5px 0 5px 0; + height: 500px; + border-top: 1px dashed #666; +} + + .lessonName { + text-decoration: none; + text-align: center; + font-weight: bold; + font-size: 1.1em; + margin-bottom: 1em; + } + .lessonList img { + display: block; + margin: 0 auto; + padding: 5px; + border: 1px solid #aaa; + background: #ddd; + } + +.lesson { + width: 300px; + height: 250px; + float: left; +} + +.preview{ + width: 250px; +} + +.menuSelectType { + margin: 0; + padding: 0; + text-align: center; +} +.menuSelectType li { + list-style: none; + display: inline; +} diff --git a/css/images/arrow_down_white.png b/css/images/arrow_down_white.png new file mode 100644 index 0000000..e2b247a --- /dev/null +++ b/css/images/arrow_down_white.png Binary files differ diff --git a/css/images/arrow_down_white.svg b/css/images/arrow_down_white.svg new file mode 100644 index 0000000..fb2cb26 --- /dev/null +++ b/css/images/arrow_down_white.svg @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/css/images/back_button_hover.png b/css/images/back_button_hover.png new file mode 100755 index 0000000..084f4ea --- /dev/null +++ b/css/images/back_button_hover.png Binary files differ diff --git a/css/images/back_button_start.png b/css/images/back_button_start.png new file mode 100755 index 0000000..31ab319 --- /dev/null +++ b/css/images/back_button_start.png Binary files differ diff --git a/css/images/bg.png b/css/images/bg.png new file mode 100755 index 0000000..7483a94 --- /dev/null +++ b/css/images/bg.png Binary files differ diff --git a/css/images/bg_footer.png b/css/images/bg_footer.png new file mode 100755 index 0000000..4bd44fa --- /dev/null +++ b/css/images/bg_footer.png Binary files differ diff --git a/css/images/bg_header.png b/css/images/bg_header.png new file mode 100755 index 0000000..f421817 --- /dev/null +++ b/css/images/bg_header.png Binary files differ diff --git a/css/images/bg_title_block.png b/css/images/bg_title_block.png new file mode 100755 index 0000000..7311891 --- /dev/null +++ b/css/images/bg_title_block.png Binary files differ diff --git a/css/images/btn_back.png b/css/images/btn_back.png new file mode 100755 index 0000000..d9fbf14 --- /dev/null +++ b/css/images/btn_back.png Binary files differ diff --git a/css/images/btn_back_hover.png b/css/images/btn_back_hover.png new file mode 100755 index 0000000..0911fcc --- /dev/null +++ b/css/images/btn_back_hover.png Binary files differ diff --git a/css/images/btn_help.png b/css/images/btn_help.png new file mode 100755 index 0000000..6753e9c --- /dev/null +++ b/css/images/btn_help.png Binary files differ diff --git a/css/images/btn_help_hover.png b/css/images/btn_help_hover.png new file mode 100755 index 0000000..d3ccd92 --- /dev/null +++ b/css/images/btn_help_hover.png Binary files differ diff --git a/css/images/btn_minus.png b/css/images/btn_minus.png new file mode 100755 index 0000000..9a7320d --- /dev/null +++ b/css/images/btn_minus.png Binary files differ diff --git a/css/images/btn_minus25x25.png b/css/images/btn_minus25x25.png new file mode 100644 index 0000000..7ffcc91 --- /dev/null +++ b/css/images/btn_minus25x25.png Binary files differ diff --git a/css/images/btn_minus_hover.png b/css/images/btn_minus_hover.png new file mode 100755 index 0000000..f8203b4 --- /dev/null +++ b/css/images/btn_minus_hover.png Binary files differ diff --git a/css/images/btn_ole.png b/css/images/btn_ole.png new file mode 100755 index 0000000..0e775e9 --- /dev/null +++ b/css/images/btn_ole.png Binary files differ diff --git a/css/images/btn_ole_hover.png b/css/images/btn_ole_hover.png new file mode 100755 index 0000000..c43c5f7 --- /dev/null +++ b/css/images/btn_ole_hover.png Binary files differ diff --git a/css/images/btn_plus.png b/css/images/btn_plus.png new file mode 100755 index 0000000..4600d5d --- /dev/null +++ b/css/images/btn_plus.png Binary files differ diff --git a/css/images/btn_plus25x25.png b/css/images/btn_plus25x25.png new file mode 100644 index 0000000..7e4d381 --- /dev/null +++ b/css/images/btn_plus25x25.png Binary files differ diff --git a/css/images/btn_plus_hover.png b/css/images/btn_plus_hover.png new file mode 100755 index 0000000..e08e45a --- /dev/null +++ b/css/images/btn_plus_hover.png Binary files differ diff --git a/css/images/correct.png b/css/images/correct.png new file mode 100755 index 0000000..f2dbc5a --- /dev/null +++ b/css/images/correct.png Binary files differ diff --git a/css/images/correct200x178.png b/css/images/correct200x178.png new file mode 100755 index 0000000..a203da6 --- /dev/null +++ b/css/images/correct200x178.png Binary files differ diff --git a/css/images/correct200x190.png b/css/images/correct200x190.png new file mode 100755 index 0000000..907cf79 --- /dev/null +++ b/css/images/correct200x190.png Binary files differ diff --git a/css/images/epaath_bg_footer.png b/css/images/epaath_bg_footer.png new file mode 100755 index 0000000..4bd44fa --- /dev/null +++ b/css/images/epaath_bg_footer.png Binary files differ diff --git a/css/images/epaath_bg_header.png b/css/images/epaath_bg_header.png new file mode 100755 index 0000000..f421817 --- /dev/null +++ b/css/images/epaath_bg_header.png Binary files differ diff --git a/css/images/happy-face.png b/css/images/happy-face.png new file mode 100755 index 0000000..0bd21e7 --- /dev/null +++ b/css/images/happy-face.png Binary files differ diff --git a/css/images/incorrect.png b/css/images/incorrect.png new file mode 100755 index 0000000..edfe9c5 --- /dev/null +++ b/css/images/incorrect.png Binary files differ diff --git a/css/images/incorrect200x178.png b/css/images/incorrect200x178.png new file mode 100755 index 0000000..f988c6a --- /dev/null +++ b/css/images/incorrect200x178.png Binary files differ diff --git a/css/images/incorrect200x190.png b/css/images/incorrect200x190.png new file mode 100755 index 0000000..9eb58e8 --- /dev/null +++ b/css/images/incorrect200x190.png Binary files differ diff --git a/css/images/ole_logo.png b/css/images/ole_logo.png new file mode 100755 index 0000000..0b409ac --- /dev/null +++ b/css/images/ole_logo.png Binary files differ diff --git a/css/images/sad-face.png b/css/images/sad-face.png new file mode 100644 index 0000000..1523519 --- /dev/null +++ b/css/images/sad-face.png Binary files differ diff --git a/css/images/start_page.png b/css/images/start_page.png new file mode 100755 index 0000000..08c0e2f --- /dev/null +++ b/css/images/start_page.png Binary files differ diff --git a/css/images/title_block_lt.png b/css/images/title_block_lt.png new file mode 100755 index 0000000..b1c0e90 --- /dev/null +++ b/css/images/title_block_lt.png Binary files differ diff --git a/css/images/title_block_rt.png b/css/images/title_block_rt.png new file mode 100755 index 0000000..275daaf --- /dev/null +++ b/css/images/title_block_rt.png Binary files differ diff --git a/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/css/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100755 index 0000000..5b5dab2 --- /dev/null +++ b/css/images/ui-bg_flat_0_aaaaaa_40x100.png Binary files differ diff --git a/css/images/ui-bg_flat_75_ffffff_40x100.png b/css/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100755 index 0000000..ac8b229 --- /dev/null +++ b/css/images/ui-bg_flat_75_ffffff_40x100.png Binary files differ diff --git a/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/css/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100755 index 0000000..b39a6fb --- /dev/null +++ b/css/images/ui-bg_glass_55_fbf9ee_1x400.png Binary files differ diff --git a/css/images/ui-bg_glass_65_ffffff_1x400.png b/css/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100755 index 0000000..42ccba2 --- /dev/null +++ b/css/images/ui-bg_glass_65_ffffff_1x400.png Binary files differ diff --git a/css/images/ui-bg_glass_75_dadada_1x400.png b/css/images/ui-bg_glass_75_dadada_1x400.png new file mode 100755 index 0000000..5a46b47 --- /dev/null +++ b/css/images/ui-bg_glass_75_dadada_1x400.png Binary files differ diff --git a/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/css/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100755 index 0000000..38df73a --- /dev/null +++ b/css/images/ui-bg_glass_75_e6e6e6_1x400.png Binary files differ diff --git a/css/images/ui-bg_glass_95_fef1ec_1x400.png b/css/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100755 index 0000000..4443fdc --- /dev/null +++ b/css/images/ui-bg_glass_95_fef1ec_1x400.png Binary files differ diff --git a/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100755 index 0000000..7c9fa6c --- /dev/null +++ b/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png Binary files differ diff --git a/css/images/ui-icons_222222_256x240.png b/css/images/ui-icons_222222_256x240.png new file mode 100755 index 0000000..ee039dc --- /dev/null +++ b/css/images/ui-icons_222222_256x240.png Binary files differ diff --git a/css/images/ui-icons_2e83ff_256x240.png b/css/images/ui-icons_2e83ff_256x240.png new file mode 100755 index 0000000..45e8928 --- /dev/null +++ b/css/images/ui-icons_2e83ff_256x240.png Binary files differ diff --git a/css/images/ui-icons_454545_256x240.png b/css/images/ui-icons_454545_256x240.png new file mode 100755 index 0000000..fe1085b --- /dev/null +++ b/css/images/ui-icons_454545_256x240.png Binary files differ diff --git a/css/images/ui-icons_888888_256x240.png b/css/images/ui-icons_888888_256x240.png new file mode 100755 index 0000000..5ba708c --- /dev/null +++ b/css/images/ui-icons_888888_256x240.png Binary files differ diff --git a/css/images/ui-icons_cd0a0a_256x240.png b/css/images/ui-icons_cd0a0a_256x240.png new file mode 100755 index 0000000..7930a55 --- /dev/null +++ b/css/images/ui-icons_cd0a0a_256x240.png Binary files differ diff --git a/css/intro.css b/css/intro.css new file mode 100755 index 0000000..6b8be70 --- /dev/null +++ b/css/intro.css @@ -0,0 +1,97 @@ +body { +padding-left:15%; +width:70%; +} +#header { +background-color:transparent; +height:140px; +position:relative; +width:100%; +} +#headerBg1 { +display:inline; +float:left; +margin-left: 3%; +} +/*#headerBg2{ +display:inline; +float:left; +margin-left: 10%; +}*/ +#header ul { +-moz-border-radius-bottomleft:5px; +-moz-border-radius-bottomright:5px; +-moz-border-radius-topleft:5px; +-moz-border-radius-topright:5px; +-webkit-border-bottom-left-radius:5px; +-webkit-border-bottom-right-radius:5px; +-webkit-border-top-left-radius:5px; +-webkit-border-top-right-radius:5px; +background-color:#EEF7FB; +border:1px solid black; +/*bottom:0; +position:absolute;*/ +width:95%; +float:left; +} +#header ul li { +display:inline; +list-style-type:none; +padding:10px; +} +#header ul li a { +text-decoration:none; +} +#intro { +float:left; +padding-top:10px; +width:100%; +} +#introText { +display:inline; +float:left; +width:70%; +margin-right: 2%; +} +#introText a { +text-decoration:none; +} +#blurb{ + font-size:larger; + font-weight:bolder; +} +#imgHolder { +display:inline; +float:left; +width:20%; +margin-top: 1%; +} +#demos { +float:left; +width:100%; +} +#demos .imgs { +margin-left:5%; +margin-right:5%; +width:100%; +} +#demos img { +-moz-border-radius-bottomleft:5px; +-moz-border-radius-bottomright:5px; +-moz-border-radius-topleft:5px; +-moz-border-radius-topright:5px; +-webkit-border-bottom-left-radius:5px; +-webkit-border-bottom-right-radius:5px; +-webkit-border-top-left-radius:5px; +-webkit-border-top-right-radius:5px; +border:1px solid black; +margin:5px; +padding-left:5px; +padding-right:5px; +} +#footer { +float:left; +font-size:smaller; +padding-top:50px; +width:100%; +} \ No newline at end of file diff --git a/css/jquery.svg.css b/css/jquery.svg.css new file mode 100755 index 0000000..c181ec1 --- /dev/null +++ b/css/jquery.svg.css @@ -0,0 +1,15 @@ +/* http://keith-wood.name/svg.html + SVG for jQuery v1.4.2. + Written by Keith Wood (kbwood{at}iinet.com.au) August 2007. + Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and + MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. + Please attribute the author if you use it. */ + +svg\:svg { + display: none; +} + +.svg_error { + color: red; + font-weight: bold; +} diff --git a/css/kDoc.css b/css/kDoc.css new file mode 100755 index 0000000..c285574 --- /dev/null +++ b/css/kDoc.css @@ -0,0 +1,26 @@ +#kDoc{ + background-color: white; + width: 100%; + height: 100%; +} + +.zoom{ + display: inline-block; + width: 25px; + height: 25px; + background-repeat: no-repeat; +} + +.zoom.zoom-in { + background-image: url(images/btn_plus25x25.png); +} + +.zoom.zoom-out { + background-image: url(images/btn_minus25x25.png); +} + + +#iframeLessonPlan{ + width:100%; + height: 90%; +} \ No newline at end of file diff --git a/css/kStart.css b/css/kStart.css new file mode 100755 index 0000000..d79eac2 --- /dev/null +++ b/css/kStart.css @@ -0,0 +1,175 @@ +#kStart { + width: 1200px; + height: 884px; + background-image: url(./images/bg.png); + -moz-background-size: 100% 100%; + -webkit-background-size: 100% 100%; + margin: 0px; +} + +#kStart .center{ + /* width: 100%; + float: left;*/ + width: 800px + margin-left: auto; + margin-right: auto; + text-align: center; +} + +#kStart #top{ + height: 13%; + width: 100%; + color: #8a72c4; +} + + #backBtn{ + background-image: url(images/back_button_start.png); + position: absolute; + width: 60px; + height: 60px; + margin-top: 10px; + margin-left: 10px; + opacity: 1.0; + } + + #backBtn:hover{ + background-image: url(images/back_button_hover.png); + } + + #topMiddle{ + margin-top: 1%; + color: white; + } + + #topDesc{ + + } + + #topE-Paath{ + font-size: 2em; + margin-top: 1%; + } + + + +#kStart #middle{ + border: 2px solid white; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + color: white; + height: 70%; + width: 90%; + margin-left: auto; + margin-right: auto; + position:relative; + background-color: rgba(0,0,200,0.3); +} + + #grade{ + margin-top: 0.5em; + } + + #gradeText{ + font-size: 2.5em; + } + + #gradeNum{ + font-size: 2.5em; + } + + #subject{ + font-size: 3em; + } + + #lessonTitle{ + margin-top: 1em; + } + + #lessonTitle>a{ + font-size: 2.5em; + color: yellow; + text-decoration: none; + } + + #lessonTitle>a:hover{ + font-size: 2.9em; + color: #FFFFE0; + } + + + #lessonDesc{ + font-size: 2em; + margin-top: 0.2em; + } + + #kStart #middle .button{ + position: absolute; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + background-color: purple; + margin-left: 0.5em; + margin-right: 0.5em; + margin-bottom: 0.5em; + padding-top:0.2em; + padding-bottom: 0.2em; + padding-left: 0.5em; + padding-right: 0.5em; + font-size: 1.5em; + border: 1px black solid; + } + + #kStart #middle .button:hover{ + /*opacity: 0.8;*/ + border: 2px white solid; + } + + #kStart #middle .button a{ + text-decoration: none; + } + + #kStart #middle .button div{ + text-align: center; + color: white; + } + + #teachersNoteBtn{ + left: 0em; + bottom: 0em; + } + + #lessonPlanBtn{ + right: 0em; + bottom: 0em; + } + +#kStart #bottom{ +height: 15%; +width: 100%; +color: white; +} + + #logo{ + display: block; + width: 320px; + height: 60px; + float: none; + background-image: url(images/ole_logo.png); + background-repeat: no-repeat; + margin-left:auto; + margin-right:auto; + margin-top: 0.8em; + } + + +#kStart #copyright{ + position: fixed; + left: 5px; + bottom: 0px; + color: white; + font-size: smaller; +} + + #kStart #copyright a{ + color: white; + opacity:0.8; + } \ No newline at end of file diff --git a/css/karma.css b/css/karma.css new file mode 100755 index 0000000..607bcbb --- /dev/null +++ b/css/karma.css @@ -0,0 +1,43 @@ +/* import nepal's Themeroller theme */ +@import url(./ui.base.css); +@import url(./theme/jquery-ui-1.7.2.custom.css); +@import url(./ui.dialog.css); +@import url(./ui.resizable.css); +@import url(./ui.feedback.css); + +/* special hack for the current karma-loader notification */ +@media screen { + #karma-loader{ + position:absolute; + top:0; + left:0; + padding: 2px 2px 1px 5px; + font-size: 12px; + background: #0066cc; + color: #ffffff; + + } + #karma-loader.status{ + left:110px; + } +} + +body{ + padding: 0px; + margin: 0 auto 0 auto; + width: 1200px; + height: 900px; + overflow: hidden; + position: relative; + background-color: purple; +} + +#kMain { + width: 1200px; + height: 760px; + float: left; + clear: both; + background-color: white; +} + + diff --git a/css/lesson.css b/css/lesson.css new file mode 100755 index 0000000..883b4c3 --- /dev/null +++ b/css/lesson.css @@ -0,0 +1,67 @@ +@CHARSET "UTF-8"; +#kMain { + background: url(../assets/image/background.png) no-repeat; + width: 1200px; + height: 900px; + -moz-background-size: 100% 100%; + -webkit-background-size: 100% 100%; + float: left; + clear: both; +} + +#questionBox{ + color: blue; + /*width: 300px; */ + width: 30%; + font: "Helvetica", Verdana, Geneva, Arial, sans-serif; + font-weight: bold; + font-size: 2em; + margin-top: 10%; + margin-left: 15%; + + +} +.imageBox{ + margin-top: 2%; + margin-left: 20%; + width: 220px; + height: 220px; +} + +#options{ + margin-left:5%; + margin-top:2%; + width:600px; + height:80px; +} + +.optImg{ + width:120px; + height: 40px; + background-color: yellow; + padding:5px; + border: 2px solid green; +} + +.playAgain{ + position:absolute; + top: 10px; + margin-left:220px; + width:115px; + height: 30px; + padding: 2px 2px 2px 2px; + } +input{ + color:green; + +} +#gameOver{ + margin-left:300px; + width: 180px; + height: 20px; + display: none; + font: 25px "Rockwell Extra Bold", Geneva, Arial, Helvetica, sans-serif,Times New Roman; + font-weight: bold; + background-color: #ccc; + padding: 10px; +} diff --git a/css/theme/images/epaath_bg_footer.png b/css/theme/images/epaath_bg_footer.png new file mode 100755 index 0000000..4bd44fa --- /dev/null +++ b/css/theme/images/epaath_bg_footer.png Binary files differ diff --git a/css/theme/images/epaath_bg_header.png b/css/theme/images/epaath_bg_header.png new file mode 100755 index 0000000..f421817 --- /dev/null +++ b/css/theme/images/epaath_bg_header.png Binary files differ diff --git a/css/theme/images/ui-bg_flat_0_aaaaaa_40x100.png b/css/theme/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100755 index 0000000..5b5dab2 --- /dev/null +++ b/css/theme/images/ui-bg_flat_0_aaaaaa_40x100.png Binary files differ diff --git a/css/theme/images/ui-bg_flat_0_fbd0f3_40x100.png b/css/theme/images/ui-bg_flat_0_fbd0f3_40x100.png new file mode 100755 index 0000000..0852ec3 --- /dev/null +++ b/css/theme/images/ui-bg_flat_0_fbd0f3_40x100.png Binary files differ diff --git a/css/theme/images/ui-bg_flat_75_ffffff_40x100.png b/css/theme/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100755 index 0000000..ac8b229 --- /dev/null +++ b/css/theme/images/ui-bg_flat_75_ffffff_40x100.png Binary files differ diff --git a/css/theme/images/ui-bg_glass_55_fbf9ee_1x400.png b/css/theme/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100755 index 0000000..ad3d634 --- /dev/null +++ b/css/theme/images/ui-bg_glass_55_fbf9ee_1x400.png Binary files differ diff --git a/css/theme/images/ui-bg_glass_65_e774ec_1x400.png b/css/theme/images/ui-bg_glass_65_e774ec_1x400.png new file mode 100755 index 0000000..a47d762 --- /dev/null +++ b/css/theme/images/ui-bg_glass_65_e774ec_1x400.png Binary files differ diff --git a/css/theme/images/ui-bg_glass_75_f49aec_1x400.png b/css/theme/images/ui-bg_glass_75_f49aec_1x400.png new file mode 100755 index 0000000..1f8d100 --- /dev/null +++ b/css/theme/images/ui-bg_glass_75_f49aec_1x400.png Binary files differ diff --git a/css/theme/images/ui-bg_glass_75_f8a5f0_1x400.png b/css/theme/images/ui-bg_glass_75_f8a5f0_1x400.png new file mode 100755 index 0000000..d3ffeef --- /dev/null +++ b/css/theme/images/ui-bg_glass_75_f8a5f0_1x400.png Binary files differ diff --git a/css/theme/images/ui-bg_glass_75_fdd9f9_1x400.png b/css/theme/images/ui-bg_glass_75_fdd9f9_1x400.png new file mode 100755 index 0000000..708667b --- /dev/null +++ b/css/theme/images/ui-bg_glass_75_fdd9f9_1x400.png Binary files differ diff --git a/css/theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/css/theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png new file mode 100755 index 0000000..0e05810 --- /dev/null +++ b/css/theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png Binary files differ diff --git a/css/theme/images/ui-icons_222222_256x240.png b/css/theme/images/ui-icons_222222_256x240.png new file mode 100755 index 0000000..ee039dc --- /dev/null +++ b/css/theme/images/ui-icons_222222_256x240.png Binary files differ diff --git a/css/theme/images/ui-icons_222222_768x720.png b/css/theme/images/ui-icons_222222_768x720.png new file mode 100755 index 0000000..2437773 --- /dev/null +++ b/css/theme/images/ui-icons_222222_768x720.png Binary files differ diff --git a/css/theme/images/ui-icons_2e83ff_256x240.png b/css/theme/images/ui-icons_2e83ff_256x240.png new file mode 100755 index 0000000..45e8928 --- /dev/null +++ b/css/theme/images/ui-icons_2e83ff_256x240.png Binary files differ diff --git a/css/theme/images/ui-icons_2e83ff_768x720.png b/css/theme/images/ui-icons_2e83ff_768x720.png new file mode 100755 index 0000000..9727a25 --- /dev/null +++ b/css/theme/images/ui-icons_2e83ff_768x720.png Binary files differ diff --git a/css/theme/images/ui-icons_454545_256x240.png b/css/theme/images/ui-icons_454545_256x240.png new file mode 100755 index 0000000..7ec70d1 --- /dev/null +++ b/css/theme/images/ui-icons_454545_256x240.png Binary files differ diff --git a/css/theme/images/ui-icons_454545_768x720.png b/css/theme/images/ui-icons_454545_768x720.png new file mode 100755 index 0000000..761d947 --- /dev/null +++ b/css/theme/images/ui-icons_454545_768x720.png Binary files differ diff --git a/css/theme/images/ui-icons_7811a2_256x240.png b/css/theme/images/ui-icons_7811a2_256x240.png new file mode 100755 index 0000000..d51567c --- /dev/null +++ b/css/theme/images/ui-icons_7811a2_256x240.png Binary files differ diff --git a/css/theme/images/ui-icons_7811a2_768x720.png b/css/theme/images/ui-icons_7811a2_768x720.png new file mode 100755 index 0000000..cb1d7a2 --- /dev/null +++ b/css/theme/images/ui-icons_7811a2_768x720.png Binary files differ diff --git a/css/theme/images/ui-icons_cd0a0a_256x240.png b/css/theme/images/ui-icons_cd0a0a_256x240.png new file mode 100755 index 0000000..7930a55 --- /dev/null +++ b/css/theme/images/ui-icons_cd0a0a_256x240.png Binary files differ diff --git a/css/theme/images/ui-icons_cd0a0a_768x720.png b/css/theme/images/ui-icons_cd0a0a_768x720.png new file mode 100755 index 0000000..788be14 --- /dev/null +++ b/css/theme/images/ui-icons_cd0a0a_768x720.png Binary files differ diff --git a/css/theme/jquery-ui-1.7.2.custom.css b/css/theme/jquery-ui-1.7.2.custom.css new file mode 100755 index 0000000..2a9e5c7 --- /dev/null +++ b/css/theme/jquery-ui-1.7.2.custom.css @@ -0,0 +1,406 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.5em&cornerRadius=4px&bgColorHeader=f49aec&bgTextureHeader=02_glass.png&bgImgOpacityHeader=75&borderColorHeader=e774ec&fcHeader=222222&iconColorHeader=7811a2&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=e774ec&fcContent=222222&iconColorContent=222222&bgColorDefault=f8a5f0&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=e774ec&fcDefault=555555&iconColorDefault=7811a2&bgColorHover=fdd9f9&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=e774ec&fcHover=212121&iconColorHover=7811a2&bgColorActive=e774ec&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=e774ec&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=d13db4&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=05_inset_soft.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=fbd0f3&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=2px&offsetTopShadow=4px&offsetLeftShadow=4px&cornerRadiusShadow=4px +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.5em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #e774ec; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } +.ui-widget-content a { color: #222222; } +.ui-widget-header { border: 1px solid #e774ec; background: #f49aec url(images/ui-bg_glass_75_f49aec_1x400.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #e774ec; background: #f8a5f0 url(images/ui-bg_glass_75_f8a5f0_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; outline: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #e774ec; background: #fdd9f9 url(images/ui-bg_glass_75_fdd9f9_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #e774ec; background: #e774ec url(images/ui-bg_glass_65_e774ec_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #d13db4; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x; color: #cd0a0a; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 48px; height: 48px; background-image: url(images/ui-icons_222222_768x720.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_768x720.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_7811a2_768x720.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_7811a2_768x720.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_7811a2_768x720.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_768x720.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_768x720.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_768x720.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -48px 0; } +.ui-icon-carat-1-e { background-position: -96px 0; } +.ui-icon-carat-1-se { background-position: -144px 0; } +.ui-icon-carat-1-s { background-position: -192px 0; } +.ui-icon-carat-1-sw { background-position: -240px 0; } +.ui-icon-carat-1-w { background-position: -288px 0; } +.ui-icon-carat-1-nw { background-position: -336px 0; } +.ui-icon-carat-2-n-s { background-position: -384px 0; } +.ui-icon-carat-2-e-w { background-position: -432px 0; } +.ui-icon-triangle-1-n { background-position: 0 -48px; } +.ui-icon-triangle-1-ne { background-position: -48px -48px; } +.ui-icon-triangle-1-e { background-position: -96px -48px; } +.ui-icon-triangle-1-se { background-position: -144px -48px; } +.ui-icon-triangle-1-s { background-position: -192px -48px; } +.ui-icon-triangle-1-sw { background-position: -240px -48px; } +.ui-icon-triangle-1-w { background-position: -288px -48px; } +.ui-icon-triangle-1-nw { background-position: -336px -48px; } +.ui-icon-triangle-2-n-s { background-position: -384px -48px; } +.ui-icon-triangle-2-e-w { background-position: -432px -48px; } +.ui-icon-arrow-1-n { background-position: 0 -96px; } +.ui-icon-arrow-1-ne { background-position: -48px -96px; } +.ui-icon-arrow-1-e { background-position: -96px -96px; } +.ui-icon-arrow-1-se { background-position: -144px -96px; } +.ui-icon-arrow-1-s { background-position: -192px -96px; } +.ui-icon-arrow-1-sw { background-position: -240px -96px; } +.ui-icon-arrow-1-w { background-position: -288px -96px; } +.ui-icon-arrow-1-nw { background-position: -336px -96px; } +.ui-icon-arrow-2-n-s { background-position: -384px -96px; } +.ui-icon-arrow-2-ne-sw { background-position: -432px -96px; } +.ui-icon-arrow-2-e-w { background-position: -480px -96px; } +.ui-icon-arrow-2-se-nw { background-position: -528px -96px; } +.ui-icon-arrowstop-1-n { background-position: -576px -96px; } +.ui-icon-arrowstop-1-e { background-position: -624px -96px; } +.ui-icon-arrowstop-1-s { background-position: -672px -96px; } +.ui-icon-arrowstop-1-w { background-position: -720px -96px; } +.ui-icon-arrowthick-1-n { background-position: 0 -144px; } +.ui-icon-arrowthick-1-ne { background-position: -48px -144px; } +.ui-icon-arrowthick-1-e { background-position: -96px -144px; } +.ui-icon-arrowthick-1-se { background-position: -144px -144px; } +.ui-icon-arrowthick-1-s { background-position: -192px -144px; } +.ui-icon-arrowthick-1-sw { background-position: -240px -144px; } +.ui-icon-arrowthick-1-w { background-position: -288px -144px; } +.ui-icon-arrowthick-1-nw { background-position: -336px -144px; } +.ui-icon-arrowthick-2-n-s { background-position: -384px -144px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -432px -144px; } +.ui-icon-arrowthick-2-e-w { background-position: -480px -144px; } +.ui-icon-arrowthick-2-se-nw { background-position: -528px -144px; } +.ui-icon-arrowthickstop-1-n { background-position: -576px -144px; } +.ui-icon-arrowthickstop-1-e { background-position: -624px -144px; } +.ui-icon-arrowthickstop-1-s { background-position: -672px -144px; } +.ui-icon-arrowthickstop-1-w { background-position: -720px -144px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -192px; } +.ui-icon-arrowreturnthick-1-n { background-position: -48px -192px; } +.ui-icon-arrowreturnthick-1-e { background-position: -96px -192px; } +.ui-icon-arrowreturnthick-1-s { background-position: -144px -192px; } +.ui-icon-arrowreturn-1-w { background-position: -192px -192px; } +.ui-icon-arrowreturn-1-n { background-position: -240px -192px; } +.ui-icon-arrowreturn-1-e { background-position: -288px -192px; } +.ui-icon-arrowreturn-1-s { background-position: -336px -192px; } +.ui-icon-arrowrefresh-1-w { background-position: -384px -192px; } +.ui-icon-arrowrefresh-1-n { background-position: -432px -192px; } +.ui-icon-arrowrefresh-1-e { background-position: -480px -192px; } +.ui-icon-arrowrefresh-1-s { background-position: -528px -192px; } +.ui-icon-arrow-4 { background-position: 0 -240px; } +.ui-icon-arrow-4-diag { background-position: -48px -240px; } +.ui-icon-extlink { background-position: -96px -240px; } +.ui-icon-newwin { background-position: -144px -240px; } +.ui-icon-refresh { background-position: -192px -240px; } +.ui-icon-shuffle { background-position: -240px -240px; } +.ui-icon-transfer-e-w { background-position: -288px -240px; } +.ui-icon-transferthick-e-w { background-position: -336px -240px; } +.ui-icon-folder-collapsed { background-position: 0 -288px; } +.ui-icon-folder-open { background-position: -48px -288px; } +.ui-icon-document { background-position: -96px -288px; } +.ui-icon-document-b { background-position: -144px -288px; } +.ui-icon-note { background-position: -192px -288px; } +.ui-icon-mail-closed { background-position: -240px -288px; } +.ui-icon-mail-open { background-position: -288px -288px; } +.ui-icon-suitcase { background-position: -336px -288px; } +.ui-icon-comment { background-position: -384px -288px; } +.ui-icon-person { background-position: -432px -288px; } +.ui-icon-print { background-position: -480px -288px; } +.ui-icon-trash { background-position: -528px -288px; } +.ui-icon-locked { background-position: -576px -288px; } +.ui-icon-unlocked { background-position: -624px -288px; } +.ui-icon-bookmark { background-position: -672px -288px; } +.ui-icon-tag { background-position: -720px -288px; } +.ui-icon-home { background-position: 0 -336px; } +.ui-icon-flag { background-position: -48px -336px; } +.ui-icon-calendar { background-position: -96px -336px; } +.ui-icon-cart { background-position: -144px -336px; } +.ui-icon-pencil { background-position: -192px -336px; } +.ui-icon-clock { background-position: -240px -336px; } +.ui-icon-disk { background-position: -288px -336px; } +.ui-icon-calculator { background-position: -336px -336px; } +.ui-icon-zoomin { background-position: -384px -336px; } +.ui-icon-zoomout { background-position: -432px -336px; } +.ui-icon-search { background-position: -480px -336px; } +.ui-icon-wrench { background-position: -528px -336px; } +.ui-icon-gear { background-position: -576px -336px; } +.ui-icon-heart { background-position: -624px -336px; } +.ui-icon-star { background-position: -672px -336px; } +.ui-icon-link { background-position: -720px -336px; } +.ui-icon-cancel { background-position: 0 -384px; } +.ui-icon-plus { background-position: -48px -384px; } +.ui-icon-plusthick { background-position: -96px -384px; } +.ui-icon-minus { background-position: -144px -384px; } +.ui-icon-minusthick { background-position: -192px -384px; } +.ui-icon-close { background-position: -240px -384px; } +.ui-icon-closethick { background-position: -288px -384px; } +.ui-icon-key { background-position: -336px -384px; } +.ui-icon-lightbulb { background-position: -384px -384px; } +.ui-icon-scissors { background-position: -432px -384px; } +.ui-icon-clipboard { background-position: -480px -384px; } +.ui-icon-copy { background-position: -528px -384px; } +.ui-icon-contact { background-position: -576px -384px; } +.ui-icon-image { background-position: -624px -384px; } +.ui-icon-video { background-position: -672px -384px; } +.ui-icon-script { background-position: -720px -384px; } +.ui-icon-alert { background-position: 0 -432px; } +.ui-icon-info { background-position: -48px -432px; } +.ui-icon-notice { background-position: -96px -432px; } +.ui-icon-help { background-position: -144px -432px; } +.ui-icon-check { background-position: -192px -432px; } +.ui-icon-bullet { background-position: -240px -432px; } +.ui-icon-radio-off { background-position: -288px -432px; } +.ui-icon-radio-on { background-position: -336px -432px; } +.ui-icon-pin-w { background-position: -384px -432px; } +.ui-icon-pin-s { background-position: -432px -432px; } +.ui-icon-play { background-position: 0 -480px; } +.ui-icon-pause { background-position: -48px -480px; } +.ui-icon-seek-next { background-position: -96px -480px; } +.ui-icon-seek-prev { background-position: -144px -480px; } +.ui-icon-seek-end { background-position: -192px -480px; } +.ui-icon-seek-first { background-position: -240px -480px; } +.ui-icon-stop { background-position: -288px -480px; } +.ui-icon-eject { background-position: -336px -480px; } +.ui-icon-volume-off { background-position: -384px -480px; } +.ui-icon-volume-on { background-position: -432px -480px; } +.ui-icon-power { background-position: 0 -528px; } +.ui-icon-signal-diag { background-position: -48px -528px; } +.ui-icon-signal { background-position: -96px -528px; } +.ui-icon-battery-0 { background-position: -144px -528px; } +.ui-icon-battery-1 { background-position: -192px -528px; } +.ui-icon-battery-2 { background-position: -240px -528px; } +.ui-icon-battery-3 { background-position: -288px -528px; } +.ui-icon-circle-plus { background-position: 0 -576px; } +.ui-icon-circle-minus { background-position: -48px -576px; } +.ui-icon-circle-close { background-position: -96px -576px; } +.ui-icon-circle-triangle-e { background-position: -144px -576px; } +.ui-icon-circle-triangle-s { background-position: -192px -576px; } +.ui-icon-circle-triangle-w { background-position: -240px -576px; } +.ui-icon-circle-triangle-n { background-position: -288px -576px; } +.ui-icon-circle-arrow-e { background-position: -336px -576px; } +.ui-icon-circle-arrow-s { background-position: -384px -576px; } +.ui-icon-circle-arrow-w { background-position: -432px -576px; } +.ui-icon-circle-arrow-n { background-position: -480px -576px; } +.ui-icon-circle-zoomin { background-position: -528px -576px; } +.ui-icon-circle-zoomout { background-position: -576px -576px; } +.ui-icon-circle-check { background-position: -624px -576px; } +.ui-icon-circlesmall-plus { background-position: 0 -624px; } +.ui-icon-circlesmall-minus { background-position: -48px -624px; } +.ui-icon-circlesmall-close { background-position: -96px -624px; } +.ui-icon-squaresmall-plus { background-position: -144px -624px; } +.ui-icon-squaresmall-minus { background-position: -192px -624px; } +.ui-icon-squaresmall-close { background-position: -240px -624px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -672px; } +.ui-icon-grip-dotted-horizontal { background-position: -48px -672px; } +.ui-icon-grip-solid-vertical { background-position: -96px -672px; } +.ui-icon-grip-solid-horizontal { background-position: -144px -672px; } +.ui-icon-gripsmall-diagonal-se { background-position: -192px -672px; } +.ui-icon-grip-diagonal-se { background-position: -240px -672px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; } +.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #fbd0f3 url(images/ui-bg_flat_0_fbd0f3_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: 4px 0 0 4px; padding: 2px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 4px; -webkit-border-radius: 4px; }/* Accordion +----------------------------------*/ +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } +.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider +----------------------------------*/ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs +----------------------------------*/ +.ui-tabs { padding: .2em; zoom: 1; } +.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } +.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/css/ui.all.css b/css/ui.all.css new file mode 100755 index 0000000..543e4c3 --- /dev/null +++ b/css/ui.all.css @@ -0,0 +1,2 @@ +@import "ui.base.css"; +@import "ui.theme.css"; diff --git a/css/ui.base.css b/css/ui.base.css new file mode 100755 index 0000000..ba53841 --- /dev/null +++ b/css/ui.base.css @@ -0,0 +1,2 @@ +@import url("ui.core.css"); +@import url("ui.tabs.css"); \ No newline at end of file diff --git a/css/ui.core.css b/css/ui.core.css new file mode 100755 index 0000000..c2f18f2 --- /dev/null +++ b/css/ui.core.css @@ -0,0 +1,37 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } \ No newline at end of file diff --git a/css/ui.dialog.css b/css/ui.dialog.css new file mode 100755 index 0000000..2997595 --- /dev/null +++ b/css/ui.dialog.css @@ -0,0 +1,13 @@ +/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/css/ui.feedback.css b/css/ui.feedback.css new file mode 100755 index 0000000..7eed05f --- /dev/null +++ b/css/ui.feedback.css @@ -0,0 +1,56 @@ +.ui-feedback div{ + width: 200px; + height: 178px; + position: absolute; + background-repeat: no-repeat; +} + +.ui-feedback .ui-feedback-correct{ + display:none; + background-image: url(./images/correct200x190.png); +} + +.ui-feedback .ui-feedback-incorrect{ + display:none; + background-image: url(./images/incorrect200x190.png); +} + + +.ui-feedback .ui-feedback-over{ + display: none; + width: 184px; + height: 240px; + overflow: visible; + cursor: pointer; + z-index: 10; +} + +.ui-feedback .ui-feedback-over .ui-feedback-win{ + width: 184px; + height: 222px; + background-image: url(./images/happy-face.png); + overflow: visible; +} + + +.ui-feedback .ui-feedback-over .ui-feedback-lose{ + width: 184px; + height: 222px; + background-image: url(./images/sad-face.png); + overflow: visible; +} + +.ui-feedback .ui-feedback-txt{ + color:purple; + font-size:3em; + margin-top:-50px; + width:300px; +} + +.ui-feedback-overlay { + position: absolute; + display: none; + width: 100%; + height: 100%; + background-color: rgba(255,255,255, 0.6); +} \ No newline at end of file diff --git a/css/ui.kFooter.css b/css/ui.kFooter.css new file mode 100755 index 0000000..5a0944b --- /dev/null +++ b/css/ui.kFooter.css @@ -0,0 +1,56 @@ +.ui-kFooter{ + background-image: url('./images/bg_footer.png'); + background-repeat: repeat; + height: 70px; + width: 100%; + margin:0; + padding: 0; + float: left; + clear: both; + border-style: none; + color: #FFFF00; +} + + +.ui-kFooter>ul{ + margin-left: 0px; + padding-left: 5px; + list-style: none; +} +.ui-kFooter>ul>li{ + display:inline; + margin-right: 10px; + margin-left: 0px; +} + + +.ui-kFooter .left{ + float: left; +} + +.ui-kFooter .right{ + float: right; +} + +.ui-kFooter .number{ + background-color:white; + color: black; + padding-left:0.4em; + padding-right:0.4em; +} + + +.ui-kFooter button{ + cursor:pointer; + margin-top: -10px; +} + +.ui-kFooter button span{ + float: left; +} + +.ui-kFooter button .text{ + color: #7811a2; +padding-top: 10px; +font-weight: bold; +} diff --git a/css/ui.kHeader.css b/css/ui.kHeader.css new file mode 100755 index 0000000..4b4bb99 --- /dev/null +++ b/css/ui.kHeader.css @@ -0,0 +1,160 @@ +#kHeader{ + background-image: url('./images/bg_header.png'); + background-repeat: repeat-x; + height: 70px; + width: 100%; + margin: 0; + float: left; + clear: both; + border: none; +} + + #kHeader .left{ + float: left; + } + + #kHeader .right{ + float: right; + } + + #kHeader>ul{ + margin: 0; + margin-left: 5px; + padding: 0; + } + + #kHeader>ul>li{ + display:inline; + margin: 0; + padding: 0; + margin-top: 5px; + margin-right:15px; + } + + #kHeader .kHeader-btn{ + width: 60px; + height: 60px; + display: block; + cursor:pointer; + } + + #kHeader .kHeader-back{ + background-image:url(./images/btn_back.png); + } + + #kHeader .kHeader-back:hover{ + background:url('./images/btn_back_hover.png'); + } + + #kHeader .kHeader-title { + font-weight: bold; + color: #FFFFFF; + margin-top: 10px; + border:4px solid #e774ec; + padding: 5px 20px 5px 20px; + -moz-border-radius:25px; + -webkit-border-radius: 25px; + } + + #kHeader .kHeader-title span{ + float:left; + } + + #kHeader .kHeader-title .kHeader-kDoc{ + background-image: url(images/arrow_down_white.png); + background-repeat: no-repeat; + width: 22px; + height: 22px; + cursor: pointer; + margin-left: 10px; + margin-top: 3px; + position: relative; + } + + #kHeader .kHeader-title .kHeader-kDoc .drop-down{ + display: none; + position: absolute; + top: 22px; + left: -20px; + width: 90px; + background-color: rgba(0, 0, 0, 0.8); + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border: 1px solid white; + padding-left: 5px; + } + #kHeader .kHeader-title .kHeader-kDoc .drop-down a{ + color: white; + text-decoration: none; + font-size: 0.6em; + + } + + #kHeader .kHeader-title .kHeader-kDoc .drop-down a:hover{ + text-decoration: underline; + } + + #kHeader .kHeader-zoomIn{ + background-image: url(images/btn_plus.png); + } + + #kHeader .kHeader-zoomOut{ + background-image: url(images/btn_minus.png); + } + + #kHeader .kHeader-zoomIn:hover{ + -moz-border-radius: 90px; + -webkit-border-radius: 90px; + border: 3px solid rgba(0,0,230, 0.8); + margin-top:2px; + margin-left:-6px; + } + + #kHeader .kHeader-zoomOut:hover{ + -moz-border-radius: 90px; + -webkit-border-radius: 90px; + border: 3px solid rgba(0,0,230, 0.8); + margin-top:2px; + margin-left:-6px; + } + + #kHeader .kHeader-brand{ + background-image:url(./images/btn_ole.png); + } + + #kHeader .kHeader-brand:hover{ + background-image:url(./images/btn_ole_hover.png); + } + + #kHeader .kHeader-help{ + background-image:url(./images/btn_help.png); + } + + #kHeader .kHeader-help:hover{ + background-image:url(./images/btn_help_hover.png); + } + + /* Styles for Help Text */ + .kHeader-help{ + top: 20px !important; + } + + .kHeader-help>div:first>span:first{ + font-size:larger; + } + + .kHeader-help .ui-dialog-titlebar-close { + top: 10px; + margin-right: 20px; + } + + .kHeader-help .ui-dialog-content{ + font-size: 0.8em; + } + + #kHeader .kHeader-preload-img{ + height:0; + width:0; + display:inline; + } + diff --git a/css/ui.resizable.css b/css/ui.resizable.css new file mode 100755 index 0000000..44efeb2 --- /dev/null +++ b/css/ui.resizable.css @@ -0,0 +1,13 @@ +/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/css/ui.scoreboard.css b/css/ui.scoreboard.css new file mode 100755 index 0000000..b1dca40 --- /dev/null +++ b/css/ui.scoreboard.css @@ -0,0 +1,67 @@ +.ui-scoreboard-container-h{ +max-width: 500em; +max-height: 200px; +float:left; +/*border: 2px solid red; +background-color : black;*/ +padding-top:0.4em; +padding-bottom:0.4em; +} + +.ui-scoreboard-spacing-h{ +max-width: 200em; +max-height: 300em; +display:inline; +margin-left:0.4em; +margin-right:0.4em; +} + +.ui-scoreboard-text{ +/*color:white; */ +font-size:larger; +text-align: center; +} + +.ui-scoreboard-number-h { +background-color:black; +color: white; +padding-left:0.4em; +padding-right:0.4em; +font-size:larger; +} + +.ui-scoreboard-button{ +color:red; +float:right; +cursor:pointer; +} + +button .ui-scoreboard-icon{ +float: left; +margin-right:0.3em; +} +.ui-scoreboard-container-v{ +max-width: 200px; +max-height: 400px; +float:left; +border: 2px solid red; +background-color: black; +padding-top:0.4em; +padding-bottom:0.4em; +} +.ui-scoreboard-spacing-v{ +display:block; +margin: 0.4em; +} + +.ui-scoreboard-number-v{ +background-color:white; +width: 1em; +text-align:center; +margin-left:auto; +margin-right: auto; +padding:0.4em; +font-size:larger; +} + + diff --git a/css/ui.tabs.css b/css/ui.tabs.css new file mode 100755 index 0000000..3ca6b9a --- /dev/null +++ b/css/ui.tabs.css @@ -0,0 +1,11 @@ +/* Tabs +----------------------------------*/ +.ui-tabs { padding: .2em; zoom: 1; } +.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } +.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/css/ui.theme.css b/css/ui.theme.css new file mode 100755 index 0000000..6e40c73 --- /dev/null +++ b/css/ui.theme.css @@ -0,0 +1,245 @@ + + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/ +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(../assets/default/images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(../assets/default/images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(../assets/default/images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; outline: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(../assets/default/images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; outline: none; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(../assets/default/images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; outline: none; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(../assets/default/images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(../assets/default/images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(../assets/default/images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(../assets/default/images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(../assets/default/images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(../assets/default/images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../assets/default/images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(../assets/default/images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(../assets/default/images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../assets/default/images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(../assets/default/images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(../assets/default/images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/docs/files.html b/docs/files.html new file mode 100755 index 0000000..1cedab8 --- /dev/null +++ b/docs/files.html @@ -0,0 +1,295 @@ + + + + + + JsDoc Reference - File Index + + + + + + + + +
+
Class Index +| File Index
+
+

Classes

+ +
+
+ +
+

File Index

+ + +
+

karma.js

+ +Contains karma library +
+ +
Author:
+
Bryan Berry , Felipe Lopez Toledo
+ + + + +
+
+
+ +
+

ui.kFooter.js

+ +a footer widget +
+ +
Author:
+
Bryan Berry + uses MIT License
+ + + + +
+
+
+ +
+

ui.feedback.js

+ +a scoreboard widget +
+ +
Author:
+
Bryan Berry + uses MIT License
+ + + + +
+
+
+ +
+

ui.kHeader.js

+ +a Header widget +
+ +
Author:
+
Bryan Berry + uses MIT License
+ + + + +
+
+
+ + +
+
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:46 GMT+0545 (NPT) +
+ + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100755 index 0000000..667032a --- /dev/null +++ b/docs/index.html @@ -0,0 +1,311 @@ + + + + + + JsDoc Reference - Index + + + + + + + + +
+
Class Index +| File Index
+
+

Classes

+ +
+
+ +
+

Class Index

+ + +
+

$.ui.feedback

+ Feedback widget +
+
+ +
+

$.ui.feedback.defaults

+ Default settings for the feedback widget +
+
+ +
+

$.ui.kFooter

+ kFooter widget +
+
+ +
+

$.ui.kFooter.defaults

+ Default settings for the kFooter widget +
+
+ +
+

$.ui.kHeader

+ kHeader widget +
+
+ +
+

$.ui.kHeader.defaults

+ Default settings for the kHeader widget +
+
+ +
+

_global_

+ +
+
+ +
+

Karma

+ Global namespace for Karma library +
+
+ +
+

Karma.kAudio

+ This object is the prototype for audio files submitted to Karma in the +Karma() method +
+
+ +
+

Karma.kCanvas

+ This object is the prototype for each canvas element submitted to Karma in the +Karma() method +
+
+ +
+

Karma.kImage

+ This object is the prototype for images submitted to Karma in the + Karma() method +
+
+ +
+

Karma.kSvg

+ This object is the prototype for each svg element submitted to Karma in the +Karma() method +
+
+ +
+

Karma.kVideo

+ Not Yet Implemented:This object is the prototype for video files submitted +to Karma in the Karma() method +
+
+ + +
+
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:46 GMT+0545 (NPT) +
+ + \ No newline at end of file diff --git a/docs/lesson_plan_template/LessonPlan.html b/docs/lesson_plan_template/LessonPlan.html new file mode 100755 index 0000000..4a928e4 --- /dev/null +++ b/docs/lesson_plan_template/LessonPlan.html @@ -0,0 +1,65 @@ + + + + + Lesson Plan + + + + + + +
+Subject: Maths +Recommended week: 1 +Class 3 +
+
+
Lesson Plan (Quadrilateral)
+
Lesson Objective: Naming, learning and writing Quadrilaterls' line and angle.
+
Corresponding textbook chapter: Quadrilateral
+
EPaath's Activity Quadrilateral
+
Teaching Materials:
+
Lesson/Exercise order and timing
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.No.Lesson/ExerciseTime(Minutes)
1First day
Draw different quadrilaterls in black-board and make students copy them in their copy.
10
2Make students write about similarities in all geometric figures.5
3Make student to read and write EPaath's Quadrilateral activity.30
1Second day
Make student repeat the day before's lesson.
+
15
2Repeat the process of drawing quadrilaters different line and angle and studying them.15
3Make student do EPaath's activity. (For more deatis see Lesson Plan)15
+Recommended homework assignment: Do EPaaths related exercise. + + + diff --git a/docs/lesson_plan_template/TeachersNote.html b/docs/lesson_plan_template/TeachersNote.html new file mode 100755 index 0000000..2f811d8 --- /dev/null +++ b/docs/lesson_plan_template/TeachersNote.html @@ -0,0 +1,56 @@ + + + + + Teacher's Note + + + + + +
Teacher's Note
+
+
Subject: Maths
+
Class: 3
+
+
+
Activity Title: Quadrilateral
+
Activity Code: III M 1
+
+
+
Recommended Week: 1
+
Correspondig textbook chapter: Quadrilateral
+
+
+
Learning area: Geometry
+
Learning achivevement: Naming, learning and writing Quadrilateral's line and angle
+
Elaboration matrix: Differentiate Quadrilateral's line and angle
+
+
+
Objective of activity: Naming, learning and writing Quadrilateral's line and angle
+
How to play: Make quadrilateral of different activities in Geo-board. In lesson you can play the game "Searching geometric term in bee hives." Press the 'Game' button in between 'Exercise' and 'Help'. In this game you have to search for Geometric term and click them. If you press wrong button press 'Esc' key on keyboard and start searching for correct terms. You can find English and Nepali geometric term in bee hives.
+
Self-assessment: You can see the scoreboard for correct and incorrect answers.
+
+
+
Recommended pre-activity:
+
+ +
Make some geometric figures (as shown above) in black-board. Students make them in their copy. Make students write the figure's features.
+
+
+ Recommended post-activity: Ask the students to name each angle and side of the quardilateral drawn in the previous step. +
+
Recommended e-library activity:
+
Recommended group activity:
+
+
+
Recommended homework assignment:
+
Similar/related activities:
+
Teaching tips:
+
+
+
Useful websites:
+
+ + + diff --git a/docs/lesson_plan_template/css/Printstyle.css b/docs/lesson_plan_template/css/Printstyle.css new file mode 100755 index 0000000..5ff2aa3 --- /dev/null +++ b/docs/lesson_plan_template/css/Printstyle.css @@ -0,0 +1,50 @@ +blockquote +{ + border: 2px solid #000; + padding: 10px; +} + +div.heading +{ + font-size: 150%; + font-weight: bold; + text-align: center; +} + +.bold +{ + font-weight: bold; + line-height: 150%; + font-size: 100%; +} + +.table +{ + background:#333; +} + +.table ul +{ + float:left; + margin:0; + padding:0; + border:1px solid #C9C9C9; +} + +.table ul li +{ + list-style:none; + padding:5px 10px; +} + +.table ul li.title +{ + font-weight:bold; + background:#333; + color:#fff; +} + +.table ul li.even +{ + background:#FFFFFF +} diff --git a/docs/lesson_plan_template/css/style.css b/docs/lesson_plan_template/css/style.css new file mode 100755 index 0000000..1c7c2f6 --- /dev/null +++ b/docs/lesson_plan_template/css/style.css @@ -0,0 +1,29 @@ +blockquote {border: 2px solid #000; padding: 10px;} +div.heading {font-size: 200%; font-weight: bold; text-align: center;} +.bold {font-weight: bold; line-height: 150%} + .table + { + background:#333; + } + .table ul + { + float:left; + margin:0; + padding:0; + border:1px solid #C9C9C9; + } + .table ul li + { + list-style:none; + padding:5px 10px; + } + .table ul li.title + { + font-weight:bold; + background:#333; + color:#fff; + } + .table ul li.even + { + background:#FFFFFF + } diff --git a/docs/lesson_plan_template/images/img1.png b/docs/lesson_plan_template/images/img1.png new file mode 100755 index 0000000..0eccc06 --- /dev/null +++ b/docs/lesson_plan_template/images/img1.png Binary files differ diff --git a/docs/symbols/$.html b/docs/symbols/$.html new file mode 100755 index 0000000..fa154c5 --- /dev/null +++ b/docs/symbols/$.html @@ -0,0 +1,322 @@ + + + + + + + JsDoc Reference - $ + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $ +

+ + +

+ + + + + + +
Defined in: ui.scoreboard.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  +
+ $ +
+
+
+ + + + + + + + + + + + + + + + + +
+
+ Namespace Detail +
+ +
+ $ +
+ +
+ + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Jan 20 2010 16:31:15 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.feedback.defaults.html b/docs/symbols/$.ui.feedback.defaults.html new file mode 100755 index 0000000..7b16106 --- /dev/null +++ b/docs/symbols/$.ui.feedback.defaults.html @@ -0,0 +1,334 @@ + + + + + + + JsDoc Reference - $.ui.feedback.defaults + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.feedback.defaults +

+ + +

+ +
Extends + $.ui.feedback.
+ + + Default settings for the feedback widget + + +
Defined in: ui.feedback.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
Default settings for the feedback widget
+
+ + + + + + + + + + + +
+
Methods borrowed from class $.ui.feedback:
correct, destroy, incorrect, lose, win
+
+ + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.feedback.defaults +
+ +
+ Default settings for the feedback widget + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:41 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.feedback.html b/docs/symbols/$.ui.feedback.html new file mode 100755 index 0000000..9a9222d --- /dev/null +++ b/docs/symbols/$.ui.feedback.html @@ -0,0 +1,525 @@ + + + + + + + JsDoc Reference - $.ui.feedback + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.feedback +

+ + +

+ + + + Feedback widget + + +
Defined in: ui.feedback.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
  +
correct() +
+
Displays the correct icon in the center of the screen + and plays the sound "correct" if loaded
+
  +
destroy() +
+
Removes the feedback widget and all related data from the DOM
+
  + +
Displays the incorrect icon in the center of the screen + and plays the sound "incorrect" if loaded
+
  +
lose() +
+
Display an unhappy face and text that says "You lose!"
+
  +
win() +
+
Display a happy face and text that says "You win!"
+
+ + + + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.feedback +
+ +
+ + +
+ + + + + + + + + + + + +
+ + + + + + + +
+ Method Detail +
+ + +
+ + + correct() + +
+
+ Displays the correct icon in the center of the screen + and plays the sound "correct" if loaded + + +
+ + + + + + + + + + + +
+ + +
+ + + destroy() + +
+
+ Removes the feedback widget and all related data from the DOM + + +
+ + + + + + + + + + + +
+ + +
+ + + incorrect() + +
+
+ Displays the incorrect icon in the center of the screen + and plays the sound "incorrect" if loaded + + +
+ + + + + + + + + + + +
+ + +
+ + + lose() + +
+
+ Display an unhappy face and text that says "You lose!" + + +
+ + + + + + + + + + + +
+ + +
+ + + win() + +
+
+ Display a happy face and text that says "You win!" + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:41 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.html b/docs/symbols/$.ui.html new file mode 100755 index 0000000..f7cfe10 --- /dev/null +++ b/docs/symbols/$.ui.html @@ -0,0 +1,322 @@ + + + + + + + JsDoc Reference - $.ui + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui +

+ + +

+ + + + + + +
Defined in: ui.scoreboard.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  +
+ $.ui +
+
+
+ + + + + + + + + + + + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui +
+ +
+ + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Jan 20 2010 16:31:15 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.kFooter.defaults.html b/docs/symbols/$.ui.kFooter.defaults.html new file mode 100755 index 0000000..21e50bc --- /dev/null +++ b/docs/symbols/$.ui.kFooter.defaults.html @@ -0,0 +1,712 @@ + + + + + + + JsDoc Reference - $.ui.kFooter.defaults + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.kFooter.defaults +

+ + +

+ +
Extends + $.ui.kFooter.
+ + + Default settings for the kFooter widget + + +
Defined in: ui.kFooter.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
Default settings for the kFooter widget
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ $.ui.kFooter.defaults.locale +
+
Default locale, valid options are "en" and "ne"
+
<static>   +
+ $.ui.kFooter.defaults.pauseButton +
+
Display the Pause Button
+
<static>   +
+ $.ui.kFooter.defaults.restartButton +
+
Display the Retart Button
+
<static>   +
+ $.ui.kFooter.defaults.score +
+
Initial score
+
<static>   +
+ $.ui.kFooter.defaults.scoreboard +
+
Display the scoreboard
+
<static>   +
+ $.ui.kFooter.defaults.startButton +
+
Display the Start Button
+
<static>   +
+ $.ui.kFooter.defaults.timer +
+
Display the timer
+
<static>   +
+ $.ui.kFooter.defaults.total +
+
Initial total
+
<static>   +
+ $.ui.kFooter.defaults.winningScore +
+
The score that will win the game
+
+ + + +
+ +
+ + + + + + + + + +
+
Methods borrowed from class $.ui.kFooter:
dec, decTotal, destroy, getScore, getTotal, inc, incTotal, restart, setScore, setTotal, startTimer, stopTimer
+
+ + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.kFooter.defaults +
+ +
+ Default settings for the kFooter widget + +
+ + + + + + + + + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {String} + $.ui.kFooter.defaults.locale + +
+
+ Default locale, valid options are "en" and "ne" + + +
+ + + + + + + +
+
Default Value:
+
+ "en" +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.kFooter.defaults.pauseButton + +
+
+ Display the Pause Button + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.kFooter.defaults.restartButton + +
+
+ Display the Retart Button + + +
+ + + + + + + +
+
Default Value:
+
+ true +
+
+ + +
+ + +
<static> + + {Number} + $.ui.kFooter.defaults.score + +
+
+ Initial score + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.kFooter.defaults.scoreboard + +
+
+ Display the scoreboard + + +
+ + + + + + + +
+
Default Value:
+
+ true +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.kFooter.defaults.startButton + +
+
+ Display the Start Button + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.kFooter.defaults.timer + +
+
+ Display the timer + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + +
+ + +
<static> + + {Number} + $.ui.kFooter.defaults.total + +
+
+ Initial total + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + +
+ + +
<static> + + {Number} + $.ui.kFooter.defaults.winningScore + +
+
+ The score that will win the game + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:42 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.kFooter.html b/docs/symbols/$.ui.kFooter.html new file mode 100755 index 0000000..a419e20 --- /dev/null +++ b/docs/symbols/$.ui.kFooter.html @@ -0,0 +1,866 @@ + + + + + + + JsDoc Reference - $.ui.kFooter + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.kFooter +

+ + +

+ + + + kFooter widget + + +
Defined in: ui.kFooter.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
  +
dec(val) +
+
Decrements the score by 1 or by the supplied numeric argument
+
  +
decTotal(val) +
+
Decrements the total by 1 or by the supplied numeric argument
+
  +
destroy() +
+
Removes the kFooter widget and all related data from the DOM
+
  + +
Gets the current score
+
  + +
Gets the current total
+
  +
inc(val) +
+
Increments the score by 1 or by the supplied numeric argument
+
  +
incTotal(val) +
+
Increments the total by 1 or by the supplied numeric argument
+
  +
restart() +
+
Resets the score and total to initial values and triggers +the "kFooterRestart" event
+
  +
setScore(newScore) +
+
Sets the current score
+
  +
setTotal(newTotal) +
+
Sets the current total
+
  +
startTimer(minutes, seconds) +
+
Start the timer, defaults to 0:00 if no arguments supplied
+
  + +
Stop the timer
+
+ + + + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.kFooter +
+ +
+ + +
+ + + +
Emits the event kFooterWinGame when the maxScore is reached 
+Emits the event kFooterRestart when game restarted
+Start button emits kFooterStart event when clicked
+Restart button emits kFooterRestart event when clicked
+Pause button emits the kFooterPause event when clicked
+ + + + + + + + + + + + +
+ + + + + + + +
+ Method Detail +
+ + +
+ + + dec(val) + +
+
+ Decrements the score by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
decrement value
+ +
+ + + + + + + + +
+ + +
+ + + decTotal(val) + +
+
+ Decrements the total by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
decrement value
+ +
+ + + + + + + + +
+ + +
+ + + destroy() + +
+
+ Removes the kFooter widget and all related data from the DOM + + +
+ + + + + + + + + + + +
+ + +
+ + {Number} + getScore() + +
+
+ Gets the current score + + +
+ + + + + + + + +
+
Returns:
+ +
{Number} current score
+ +
+ + + + +
+ + +
+ + {Number} + getTotal() + +
+
+ Gets the current total + + +
+ + + + + + + + +
+
Returns:
+ +
{Number} current total
+ +
+ + + + +
+ + +
+ + + inc(val) + +
+
+ Increments the score by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
increment value
+ +
+ + + + + + + + +
+ + +
+ + + incTotal(val) + +
+
+ Increments the total by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
increment value
+ +
+ + + + + + + + +
+ + +
+ + + restart() + +
+
+ Resets the score and total to initial values and triggers +the "kFooterRestart" event + + +
+ + + + + + + + + + + +
+ + +
+ + + setScore(newScore) + +
+
+ Sets the current score + + +
+ + + + +
+
Parameters:
+ +
+ {Number} newScore + +
+
new score
+ +
+ + + + + + + + +
+ + +
+ + + setTotal(newTotal) + +
+
+ Sets the current total + + +
+ + + + +
+
Parameters:
+ +
+ {Number} newTotal + +
+
new total
+ +
+ + + + + + + + +
+ + +
+ + + startTimer(minutes, seconds) + +
+
+ Start the timer, defaults to 0:00 if no arguments supplied + + +
+ + + + +
+
Parameters:
+ +
+ {Number} minutes + Optional +
+
value for minutes, default to 0
+ +
+ {Number} seconds + Optional +
+
value for seconds, default to 0
+ +
+ + + + + + + + +
+ + +
+ + + stopTimer() + +
+
+ Stop the timer + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:42 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.kHeader.defaults.html b/docs/symbols/$.ui.kHeader.defaults.html new file mode 100644 index 0000000..3b1c6f3 --- /dev/null +++ b/docs/symbols/$.ui.kHeader.defaults.html @@ -0,0 +1,556 @@ + + + + + + + JsDoc Reference - $.ui.kHeader.defaults + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.kHeader.defaults +

+ + +

+ +
Extends + $.ui.kHeader.
+ + + Default settings for the kHeader widget + + +
Defined in: ui.kHeader.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
Default settings for the kHeader widget
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ $.ui.kHeader.defaults.help +
+
Id of element containing help text
+
<static>   +
+ $.ui.kHeader.defaults.lessonPlan +
+
Creates drop-down with link to lesson plan
+
<static>   +
+ $.ui.kHeader.defaults.teachersNote +
+
Creates drop-down with link to teachersNote
+
<static>   +
+ $.ui.kHeader.defaults.title +
+
title
+
<static>   +
+ $.ui.kHeader.defaults.zoom +
+
Turns on zoom buttons
+
+ + + +
+ +
+ + + + + + + + + +
+
Methods borrowed from class $.ui.kHeader:
destroy
+
+ + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.kHeader.defaults +
+ +
+ Default settings for the kHeader widget + +
+ + + + + + + + + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {String} + $.ui.kHeader.defaults.help + +
+
+ Id of element containing help text + + +
+ + + + + + + +
+
Default Value:
+
+ "kHelp" +
+
+ + +
+ + +
<static> + + {boolean or string file path to lesson plan} + $.ui.kHeader.defaults.lessonPlan + +
+
+ Creates drop-down with link to lesson plan + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + +
+ + +
<static> + + {boolean or string file path to teachersNote} + $.ui.kHeader.defaults.teachersNote + +
+
+ Creates drop-down with link to teachersNote + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + +
+ + +
<static> + + {String} + $.ui.kHeader.defaults.title + +
+
+ title + + +
+ + + + + + + +
+
Default Value:
+
+ "" +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.kHeader.defaults.zoom + +
+
+ Turns on zoom buttons + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:42 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.kHeader.html b/docs/symbols/$.ui.kHeader.html new file mode 100644 index 0000000..ab1cebe --- /dev/null +++ b/docs/symbols/$.ui.kHeader.html @@ -0,0 +1,389 @@ + + + + + + + JsDoc Reference - $.ui.kHeader + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.kHeader +

+ + +

+ + + + kHeader widget + + +
Defined in: ui.kHeader.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
  +
destroy() +
+
Removes the kHeader widget and all related data from the DOM
+
+ + + + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.kHeader +
+ +
+ + +
+ + + +

+				
+				
+				
+				
+					
+					
+					
+					
+					
+					
+					
+
+			
+ + + + + + + +
+ Method Detail +
+ + +
+ + + destroy() + +
+
+ Removes the kHeader widget and all related data from the DOM + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:42 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.scoreboard.defaults.html b/docs/symbols/$.ui.scoreboard.defaults.html new file mode 100755 index 0000000..9727ae8 --- /dev/null +++ b/docs/symbols/$.ui.scoreboard.defaults.html @@ -0,0 +1,665 @@ + + + + + + + JsDoc Reference - $.ui.scoreboard.defaults + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.scoreboard.defaults +

+ + +

+ +
Extends + $.ui.scoreboard.
+ + + Default settings for the scoreboard widget + + +
Defined in: ui.scoreboard.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
Default settings for the scoreboard widget
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ $.ui.scoreboard.defaults.layout +
+
Initial layout, valid options are "horizontal" and "vertical"
+
<static>   +
+ $.ui.scoreboard.defaults.locale +
+
Default locale, valid options are "en" and "ne"
+
<static>   +
+ $.ui.scoreboard.defaults.pauseButton +
+
Display the Pause Button
+
<static>   +
+ $.ui.scoreboard.defaults.restartButton +
+
Display the Retart Button
+
<static>   +
+ $.ui.scoreboard.defaults.score +
+
Initial score
+
<static>   +
+ $.ui.scoreboard.defaults.startButton +
+
Display the Start Button
+
<static>   +
+ $.ui.scoreboard.defaults.total +
+
Initial total
+
<static>   +
+ $.ui.scoreboard.defaults.winningScore +
+
The score that will win the game
+
+ + + +
+ +
+ + + + + + + + + +
+
Methods borrowed from class $.ui.scoreboard:
dec, decTotal, destroy, getScore, getTotal, inc, incTotal, restart, setScore, setTotal
+
+ + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.scoreboard.defaults +
+ +
+ Default settings for the scoreboard widget + +
+ + + + + + + + + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {String} + $.ui.scoreboard.defaults.layout + +
+
+ Initial layout, valid options are "horizontal" and "vertical" + + +
+ + + + + + + +
+
Default Value:
+
+ "horizontal" +
+
+ + +
+ + +
<static> + + {String} + $.ui.scoreboard.defaults.locale + +
+
+ Default locale, valid options are "en" and "ne" + + +
+ + + + + + + +
+
Default Value:
+
+ "en" +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.scoreboard.defaults.pauseButton + +
+
+ Display the Pause Button + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.scoreboard.defaults.restartButton + +
+
+ Display the Retart Button + + +
+ + + + + + + +
+
Default Value:
+
+ true +
+
+ + +
+ + +
<static> + + {Number} + $.ui.scoreboard.defaults.score + +
+
+ Initial score + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + +
+ + +
<static> + + {boolean} + $.ui.scoreboard.defaults.startButton + +
+
+ Display the Start Button + + +
+ + + + + + + +
+
Default Value:
+
+ false +
+
+ + +
+ + +
<static> + + {Number} + $.ui.scoreboard.defaults.total + +
+
+ Initial total + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + +
+ + +
<static> + + {Number} + $.ui.scoreboard.defaults.winningScore + +
+
+ The score that will win the game + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Jan 20 2010 17:12:11 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/$.ui.scoreboard.html b/docs/symbols/$.ui.scoreboard.html new file mode 100755 index 0000000..d76893c --- /dev/null +++ b/docs/symbols/$.ui.scoreboard.html @@ -0,0 +1,763 @@ + + + + + + + JsDoc Reference - $.ui.scoreboard + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace $.ui.scoreboard +

+ + +

+ + + + Scoreboard widget + + +
Defined in: ui.scoreboard.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
  +
dec(val) +
+
Decrements the score by 1 or by the supplied numeric argument
+
  +
decTotal(val) +
+
Decrements the total by 1 or by the supplied numeric argument
+
  +
destroy() +
+
Removes the scoreboard widget and all related data from the DOM
+
  + +
Gets the current score
+
  + +
Gets the current total
+
  +
inc(val) +
+
Increments the score by 1 or by the supplied numeric argument
+
  +
incTotal(val) +
+
Increments the total by 1 or by the supplied numeric argument
+
  +
restart() +
+
Restarts the scoreboard and triggers the "scoreboardRestart" event
+
  +
setScore(newScore) +
+
Sets the current score
+
  +
setTotal(newTotal) +
+
Sets the current total
+
+ + + + + + + + + +
+
+ Namespace Detail +
+ +
+ $.ui.scoreboard +
+ +
+ + +
+ + + + + + + + + + + + +
+ + + + + + + +
+ Method Detail +
+ + +
+ + + dec(val) + +
+
+ Decrements the score by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
decrement value
+ +
+ + + + + + + + +
+ + +
+ + + decTotal(val) + +
+
+ Decrements the total by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
decrement value
+ +
+ + + + + + + + +
+ + +
+ + + destroy() + +
+
+ Removes the scoreboard widget and all related data from the DOM + + +
+ + + + + + + + + + + +
+ + +
+ + {Number} + getScore() + +
+
+ Gets the current score + + +
+ + + + + + + + +
+
Returns:
+ +
{Number} current score
+ +
+ + + + +
+ + +
+ + {Number} + getTotal() + +
+
+ Gets the current total + + +
+ + + + + + + + +
+
Returns:
+ +
{Number} current total
+ +
+ + + + +
+ + +
+ + + inc(val) + +
+
+ Increments the score by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
increment value
+ +
+ + + + + + + + +
+ + +
+ + + incTotal(val) + +
+
+ Increments the total by 1 or by the supplied numeric argument + + +
+ + + + +
+
Parameters:
+ +
+ {Number} val + Optional +
+
increment value
+ +
+ + + + + + + + +
+ + +
+ + + restart() + +
+
+ Restarts the scoreboard and triggers the "scoreboardRestart" event + + +
+ + + + + + + + + + + +
+ + +
+ + + setScore(newScore) + +
+
+ Sets the current score + + +
+ + + + +
+
Parameters:
+ +
+ {Number} newScore + +
+
new score
+ +
+ + + + + + + + +
+ + +
+ + + setTotal(newTotal) + +
+
+ Sets the current total + + +
+ + + + +
+
Parameters:
+ +
+ {Number} newTotal + +
+
new score
+ +
+ + + + + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Jan 20 2010 17:12:11 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/Karma.html b/docs/symbols/Karma.html new file mode 100755 index 0000000..5db7dd2 --- /dev/null +++ b/docs/symbols/Karma.html @@ -0,0 +1,1505 @@ + + + + + + + JsDoc Reference - Karma + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace Karma +

+ + +

+ + + + Global namespace for Karma library + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  +
+ Karma +
+
Karma is the namespace for the Karma library and Karma() is the constructor +function for the Karma library object Karma.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ Karma.audio +
+
Collection of audio files with special helper +methods added to each reference
+
<static>   +
+ Karma.canvas +
+
Collection of html 5 canvases with special helper +methods added to each reference
+
<static>   +
+ Karma.image +
+
Collection of images with special helper +methods added to each reference
+
<static>   +
+ Karma.locale +
+
This is the global locale as passed to Karma(), +such as "en", "es_SP"
+
<static>   +
+ Karma.svg +
+
Collection of svgs with special helper +methods added to each reference
+
<static>   +
+ Karma.video +
+
Collection of videos with special helper +methods added to each reference
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<static>   +
Karma._n(Number, locale) +
+
+
<static>   +
Karma.clone(target) +
+
Returns a shallow copy of the passed in object
+
<static>   +
Karma.convertNumToLocale(Number, locale) +
+
Converts a number to numerals in the specified locale.
+
<static>   +
Karma.copyObjectPlus(parent1, parent2) +
+
Creates a new object that is a prototype of the first argument +then extends it with the properties of the second argument
+
<static>   +
Karma.create(parent) +
+
This emulates the Object.create method in ecmascript 5 spec +This isn't a full implementation as it doesn't support an all of Object.create's features +This has the same functionality as Crockford's beget method +and this primary building block for prototypal inheritance in +this library
+
<static>   +
Karma.distance(Point, Point) +
+
Gets the Euclidian (ordinary) distance between 2 points.
+
<static>   +
Karma.distance2(Point, Point) +
+
Gets the square of the Euclidian (ordinary) distance between 2 points.
+
<static>   +
Karma.objectPlus(target, source) +
+
Extends properties of the target object with those of +the source object
+
<static>   +
Karma.radians(angle) +
+
Converts a value from degrees to radians.
+
<static>   +
Karma.rand(lower, upper) +
+
Returns a random number within the range provided
+
<static>   +
Karma.ready(cb) +
+
Waits until all assets loaded(ready), then calls callback cb
+
<static>   +
Karma.shuffle(oldList) +
+
Shuffles an array of items randomly
+
+ + + + + + + + + +
+
+ Namespace Detail +
+ +
+ Karma +
+ +
+ Karma is the namespace for the Karma library and Karma() is the constructor +function for the Karma library object Karma. +Karma() checks if the current document type is set to HTML 5, throws +an error if not. Otherwise, initializes the karma object and returns +a reference to that object. + +
+ + + +
+var k = Karma({ 
+                image: [ 
+                   {name: "ninja", file: "ninja.png"}, 
+                   {name: "cowboy", file: "cowboy.png"}
+                        ],
+                audio: [
+                   {name: "woosh", file: "woosh.ogg"},
+                   {name: "yeehaw", file: "yeehaw.ogg"}
+                        ],
+                video: [  //Not Yet Implemented
+                   {name: "attack", file: "attack.ogv"},
+                   {name: "ride", file: "ride.ogv"}
+                        ]
+                canvas: [
+                   {name: "ninja", domId: "ninjaCanvas"},
+                   {name: "cowboy", domId: "cowboyCanvas"}
+                        ],
+                svg: [ 
+                   {name: "ninja", domId: "ninjaSvg"},
+                   {name: "cowboy", domId: "cowboySvg"}
+                        ],
+                });
+Next, call the ready function with a callback to your program code
+
+k.ready(function () { ... your application code . . . }                       
+
+after that you can access each asset like so
+k.image.ninja;
+k.svg.cowboy;
+k.audio.yeehaw.play();
+k.canvas.ninja.drawImage(k.image.ninja, 0, 0);
+ + + + + +
+
Parameters:
+ +
+ {Object} options + Optional, Default: {} +
+
options for intializing Karma library
+ +
+ {String} options.locale + Optional, Default: '' +
+
sets current locale Not Yet Implemented
+ +
+ {Array} options.image + Optional, Default: [] +
+
array of images to be converted into a collection
+ +
+ {Array} options.audio + Optional, Default: [] +
+
array of audio to be converted into a collection
+ +
+ {Array} options.video + Optional, Default: [] +
+
NYI array of videos to be converted into a collection
+ +
+ {Array} options.svg + Optional, Default: [] +
+
array of SVG elements to be +converted into a collection. Each SVG element must already exist in the html document
+ +
+ {Array} options.canvas + Optional, Default: [] +
+
array of canvas elements +to be converted into a collection. Each canvas element must already exist in the +html document and width and height of each element must be set as attributes
+ +
+ + + + +
+
Throws:
+ +
+ {Error} +
+
if the document type declaration is not set to HTML 5, e.g. +
+ +
+ {Error} +
+
If any of the initialization parameters are invalid values
+ +
+ + +
+
Returns:
+ +
{Object} Karma -- reference to the initialized Karma library
+ +
+ + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {object} + Karma.audio + +
+
+ Collection of audio files with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + {object} + Karma.canvas + +
+
+ Collection of html 5 canvases with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + {object} + Karma.image + +
+
+ Collection of images with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + + Karma.locale + +
+
+ This is the global locale as passed to Karma(), +such as "en", "es_SP" + + +
+ + + + + + + +
+
Default Value:
+
+ 'en' +
+
+ + +
+ + +
<static> + + {object} + Karma.svg + +
+
+ Collection of svgs with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + {object} + Karma.video + +
+
+ Collection of videos with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + + + + + + + +
+ Method Detail +
+ + +
<static> + + {String} + Karma._n(Number, locale) + +
+
+ + + +
+ + + + +
+
Parameters:
+ +
+ {Number} Number + +
+
to be converted
+ +
+ {locale} locale + +
+
that number should be converted to
+ +
+ + + + + +
+
Returns:
+ +
{String} Unicode string for localized numeral
+ +
+ + + + +
+ + +
<static> + + {Object} + Karma.clone(target) + +
+
+ Returns a shallow copy of the passed in object + + +
+ + + + +
+
Parameters:
+ +
+ {Object} target + +
+
to be copied
+ +
+ + + + + +
+
Returns:
+ +
{Object} a shallow copy of target
+ +
+ + + + +
+ + +
<static> + + {String} + Karma.convertNumToLocale(Number, locale) + +
+
+ Converts a number to numerals in the specified locale. Currently only +supports Nepali + + +
+ + + + +
+
Parameters:
+ +
+ {Number} Number + +
+
to be converted
+ +
+ {locale} locale + +
+
that number should be converted to
+ +
+ + + + + +
+
Returns:
+ +
{String} Unicode string for localized numeral
+ +
+ + + + +
+ + +
<static> + + {Object} + Karma.copyObjectPlus(parent1, parent2) + +
+
+ Creates a new object that is a prototype of the first argument +then extends it with the properties of the second argument + + +
+ + + + +
+
Parameters:
+ +
+ {Object} parent1 + +
+
will be prototype of returned object
+ +
+ {Object} parent2 + +
+
will extend properties of returned object
+ +
+ + + + + +
+
Returns:
+ +
{Object} object that whose prototype is parent1 and has +been extended with properties of parent2
+ +
+ + + + +
+ + +
<static> + + {Object} + Karma.create(parent) + +
+
+ This emulates the Object.create method in ecmascript 5 spec +This isn't a full implementation as it doesn't support an all of Object.create's features +This has the same functionality as Crockford's beget method +and this primary building block for prototypal inheritance in +this library + + +
+ + + +
+var ninja = { weapon : "sword" };
+var ninja1 = Karma.create(ninja);
+ninja1.weapon === "sword"
+ + + + +
+
Parameters:
+ +
+ {Object} parent + +
+
that the new object's prototype should point to
+ +
+ + + + + +
+
Returns:
+ +
{Object} a new object whose prototype is parent
+ +
+ + + + +
+ + +
<static> + + {Number} + Karma.distance(Point, Point) + +
+
+ Gets the Euclidian (ordinary) distance between 2 points.
+Warning: It's slower than distance2 function + + +
+ + + +
+p0 = {x:0, y:1};
+p1 = {x:50, y:70};
+var d = distance2(p0, p1);
+ + + + +
+
Parameters:
+ +
+ {Object} Point + +
+
No. 0
+ +
+ {Number} Point0.x + +
+
+ +
+ {Number} Point0.y + +
+
+ +
+ {Object} Point + +
+
No. 1
+ +
+ {Number} Point1.x + +
+
+ +
+ {Number} Point1.y + +
+
+ +
+ + + + + +
+
Returns:
+ +
{Number} The Euclidian distance
+ +
+ + + + +
+ + +
<static> + + {Number} + Karma.distance2(Point, Point) + +
+
+ Gets the square of the Euclidian (ordinary) distance between 2 points. + + +
+ + + +
+p0 = {x:0, y:1};
+p1 = {x:50, y:70};
+var d = distance2(p0, p1);
+ + + + +
+
Parameters:
+ +
+ {Object} Point + +
+
No. 0
+ +
+ {Number} Point0.x + +
+
+ +
+ {Number} Point0.y + +
+
+ +
+ {Object} Point + +
+
No. 1
+ +
+ {Number} Point1.x + +
+
+ +
+ {Number} Point1.y + +
+
+ +
+ + + + + +
+
Returns:
+ +
{Number} The square of the Euclidian distance
+ +
+ + + + +
+ + +
<static> + + {Object} + Karma.objectPlus(target, source) + +
+
+ Extends properties of the target object with those of +the source object + + +
+ + + + +
+
Parameters:
+ +
+ {Object} target + +
+
object to be extended
+ +
+ {Object} source + +
+
whose properties will extend target
+ +
+ + + + + +
+
Returns:
+ +
{Object} target extended by source
+ +
+ + + + +
+ + +
<static> + + {Number} + Karma.radians(angle) + +
+
+ Converts a value from degrees to radians. + + +
+ + + + +
+
Parameters:
+ +
+ {Number} angle + +
+
The angle in degrees
+ +
+ + + + + +
+
Returns:
+ +
{Number} The angle in radians
+ +
+ + + + +
+ + +
<static> + + {Number} + Karma.rand(lower, upper) + +
+
+ Returns a random number within the range provided + + +
+ + + +
+var num = rand(0, 10);
+
+//num could be 0, 1, 2, 3 ... or 10
+ + + + +
+
Parameters:
+ +
+ {Number} lower + +
+
limit of the range, lowest number that can be returned
+ +
+ {Number} upper + +
+
limit of the range, highest number that can be returned
+ +
+ + + + + +
+
Returns:
+ +
{Number} number that is >= lower and <= upper
+ +
+ + + + +
+ + +
<static> + + + Karma.ready(cb) + +
+
+ Waits until all assets loaded(ready), then calls callback cb + + +
+ + + +
+var k = Karma({ . . . your assets here . . . });
+k.ready(function(){ .. your code here . . .});
+
+your code will not be called until all assets have been loaded
+into collections
+ + + + +
+
Parameters:
+ +
+ {Function} cb + Optional +
+
callback function
+ +
+ + + + +
+
Throws:
+ +
+ {Error} +
+
if Karma is not initialized with the +Karma({ options }) function
+ +
+ + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + {Array} + Karma.shuffle(oldList) + +
+
+ Shuffles an array of items randomly + + +
+ + + + +
+
Parameters:
+ +
+ {Array} oldList + +
+
of choices to be shuffled
+ +
+ + + + + +
+
Returns:
+ +
{Array} newlist of choices randomly reordered
+ +
+ + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:42 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/Karma.kAudio.html b/docs/symbols/Karma.kAudio.html new file mode 100755 index 0000000..3d1c339 --- /dev/null +++ b/docs/symbols/Karma.kAudio.html @@ -0,0 +1,509 @@ + + + + + + + JsDoc Reference - Karma.kAudio + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Class Karma.kAudio +

+ + +

+ + + + This object is the prototype for audio files submitted to Karma in the +Karma() method + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ Karma.kAudio() +
+
Prototype object for audio files
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ Karma.kAudio.file +
+
file location of asset
+
<static>   +
+ Karma.kAudio.media +
+
Media object.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<static>   +
Karma.kAudio.play() +
+
Plays the audio file
+
+ + + + + + + + + +
+
+ Class Detail +
+ +
+ Karma.kAudio() +
+ +
+ Prototype object for audio files + +
+ + + +
 kAudio is the prototype object for audio
+ The audio assets are loaded in a distinctly different way
+ from the canvas or svg assets. They also have distinctly different
+ helper methods 
+ 
+ You initialize the kAudio assets by passing an array of objects
+ + + + + + + + +
+
Throws:
+ +
+ {Error} +
+
if the individual audio asset is set to be localized but + the globale locale is not set on the Karma object
+ +
+ {Error} +
+
if the name and file properties are not supplied
+ +
+ + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {String} + Karma.kAudio.file + +
+
+ file location of asset + + +
+ + + + + + + +
+
Default Value:
+
+ "" +
+
+ + +
+ + +
<static> + + {Audio} + Karma.kAudio.media + +
+
+ Media object. You can access the src, autobuffer, autoplay, loop, and +controls attributes +via the media property of kAudio. Read more about the properties of the HTML 5 media element + + +
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + + + + + + + +
+ Method Detail +
+ + +
<static> + + + Karma.kAudio.play() + +
+
+ Plays the audio file + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:42 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/Karma.kCanvas.html b/docs/symbols/Karma.kCanvas.html new file mode 100755 index 0000000..cfc4492 --- /dev/null +++ b/docs/symbols/Karma.kCanvas.html @@ -0,0 +1,3409 @@ + + + + + + + JsDoc Reference - Karma.kCanvas + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Class Karma.kCanvas +

+ + +

+ + + + This object is the prototype for each canvas element submitted to Karma in the +Karma() method + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  + +
Prototype object for each canvas element submitted to Karma in the +Karma() method
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ Karma.kCanvas.ctx +
+
The 2 Dimensional Rendering context property for this canvas
+
<static>   +
+ Karma.kCanvas.domId +
+
Element ID for canvas element in html document.
+
<static>   +
+ Karma.kCanvas.height +
+
Height of canvas element
+
<static>   +
+ Karma.kCanvas.name +
+
Name of the canvas, used internally by karma.js
+
<static>   +
+ Karma.kCanvas.node +
+
Reference to the DOM element
+
<static>   +
+ Karma.kCanvas.visible +
+
Whether canvas is visible
+
<static>   +
+ Karma.kCanvas.width +
+
Width of canvas element
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<static>   +
Karma.kCanvas.arc() +
+
Create an arc + For full details see W3C docs
+
<static>   +
Karma.kCanvas.arcTo() +
+
Draw an arc to the given points + For full details see W3C docs
+
<static>   +
Karma.kCanvas.beginPath() +
+
Begin a path + For full details see W3C docs
+
<static>   +
Karma.kCanvas.bezierCurveTo() +
+
Draw a bezier curve to given coordinates + For full details see W3C docs
+
<static>   +
Karma.kCanvas.clear(x, y, width, height) +
+
Clear area of canvas element specified by parameters, if no +parameters supplied, clears entire canvas
+
<static>   +
Karma.kCanvas.clearRect() +
+
Clear a rectangular area + For full details see W3C docs
+
<static>   +
Karma.kCanvas.clip() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.closePath() +
+
End a path + For full details see W3C docs
+
<static>   +
Karma.kCanvas.createImageData() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.createLinearGradient() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.createPattern() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.createRadialGradient() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.drawImage() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.drawWindow() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.fill() +
+
fill in the current subpaths with the current fillstyle + For full details see W3C docs
+
<static>   +
Karma.kCanvas.fillRect() +
+
Fill a rectangular area + For full details see W3C docs
+
<static>   +
Karma.kCanvas.fillStyle() +
+
Sets the fill style + For full details see W3C docs
+
<static>   +
Karma.kCanvas.fillText() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.font() +
+
Sets the font property and takes the same syntax as setting the font property + in CSS + For full details see W3C docs
+
<static>   +
Karma.kCanvas.getImageData() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.globalAlpha(number) +
+
The globalAlpha attribute gives an alpha value that is applied to shapes +and images before they are composited onto the canvas
+
<static>   +
Karma.kCanvas.globalCompositeOperation(globalCompositeOperation) +
+
Sets the globalCompositeOperation attribute, which sets how shapes and images +are drawn onto the existing bitmap, once they have had globalAlpha and the +current transformation matrix applied.
+
<static>   +
Karma.kCanvas.isPointInPath() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.lineCap(type) +
+
The lineCap attribute defines the type of endings that UAs will place on +the end of lines.
+
<static>   +
Karma.kCanvas.lineJoin(type) +
+
The lineJoin attribute defines the type of corners that UAs will place +where two lines meet.
+
<static>   +
Karma.kCanvas.lineTo() +
+
Draw a line to the given coordinates + For full details see W3C docs
+
<static>   +
Karma.kCanvas.lineWidth(lineWidth) +
+
Sets the lineWidth attribute which gives the width of lines, in coordinate space +units.
+
<static>   +
Karma.kCanvas.measureText() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.miterLimit(number) +
+
Sets the miter limit + For full details see W3C docs
+
<static>   +
Karma.kCanvas.moveTo() +
+
Move to specified coordinates + For full details see W3C docs
+
<static>   +
Karma.kCanvas.putImageData() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.quadraticCurveTo() +
+
Draw a quadratic curve to given coordinates + For full details see W3C docs
+
<static>   +
Karma.kCanvas.rect() +
+
Create a rectangle + For full details see W3C docs
+
<static>   +
Karma.kCanvas.restore() +
+
Restore the saved context + For full details see W3C docs
+
<static>   +
Karma.kCanvas.rotate() +
+
Perform a rotation transformation + For full details see W3C docs
+
<static>   +
Karma.kCanvas.save() +
+
Save the current state of the context + For full details see W3C docs
+
<static>   +
Karma.kCanvas.scale() +
+
Perform a scale transformation + For full details see W3C docs
+
<static>   +
Karma.kCanvas.setTransform() +
+
Set the transform + For full details see W3C docs
+
<static>   +
Karma.kCanvas.shadowBlur() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.shadowColor() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.shadowOffsetX() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.shadowOffsetY() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.stroke() +
+
Stroke the subpaths + For full details see W3C docs
+
<static>   +
Karma.kCanvas.strokeRect() +
+
Draw the outline of the rectangle + For full details see W3C docs
+
<static>   +
Karma.kCanvas.strokeStyle() +
+
Sets the stroke style + For full details see W3C docs
+
<static>   +
Karma.kCanvas.strokeText() +
+
description + For full details see W3C docs
+
<static>   +
Karma.kCanvas.textAlign(alignment) +
+
Changes the text alignment.
+
<static>   +
Karma.kCanvas.textBaseline(alignment) +
+
Changes the baseline alignment.
+
<static>   +
Karma.kCanvas.transform() +
+
Transform the identity matrix + For full details see W3C docs
+
<static>   +
Karma.kCanvas.translate() +
+
Performa a translation transformation + For full details see W3C docs
+
+ + + + + + + + + +
+
+ Class Detail +
+ +
+ Karma.kCanvas() +
+ +
+ Prototype object for each canvas element submitted to Karma in the +Karma() method + +
+ + + + + + + + +
+
Throws:
+ +
+ {Error} +
+
if the name and domId for the canvas element are not specified
+ +
+ + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {2DRenderingContext} + Karma.kCanvas.ctx + +
+
+ The 2 Dimensional Rendering context property for this canvas + + +
+ + + +
//Almost all of the context attributes and methods are wrapped in helper functions
+//but you can also access them directly using the ctx property
+Karma.canvas.someCanvas.ctx.drawImage(someImage, x, y);
+Karma.canvas.someCanvas.ctx.fillStyle = "#ffffff";
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {String} + Karma.kCanvas.domId + +
+
+ Element ID for canvas element in html document. This value is read-only + + +
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {Number} + Karma.kCanvas.height + +
+
+ Height of canvas element + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + +
+ + +
<static> + + {String} + Karma.kCanvas.name + +
+
+ Name of the canvas, used internally by karma.js + + +
+ + + + + + + +
+
Default Value:
+
+ '' +
+
+ + +
+ + +
<static> + + {DOMElement} + Karma.kCanvas.node + +
+
+ Reference to the DOM element + + +
+ + + +
//You can access all properties and methods of the underlying DOM element
+//using the 'node' property
+Karma.canvas.someCanvas.node.dispatchEvent( ... some event ...);
+var stuff = Karma.canvas.someCanvas.node.innerHTML;
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {boolean} + Karma.kCanvas.visible + +
+
+ Whether canvas is visible + + +
+ + + + + + + +
+
Default Value:
+
+ true +
+
+ + +
+ + +
<static> + + {Number} + Karma.kCanvas.width + +
+
+ Width of canvas element + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + + + + + + + +
+ Method Detail +
+ + +
<static> + + + Karma.kCanvas.arc() + +
+
+ Create an arc + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.arcTo() + +
+
+ Draw an arc to the given points + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.beginPath() + +
+
+ Begin a path + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.bezierCurveTo() + +
+
+ Draw a bezier curve to given coordinates + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.clear(x, y, width, height) + +
+
+ Clear area of canvas element specified by parameters, if no +parameters supplied, clears entire canvas + + +
+ + + +
+k.canvas.ninja.clear();
+// clears the entire ninja canvas
+
+k.canvas.ninja.clear(0, 10, 20, 30);
+//clears a specific portion of the ninja canvas
+ + + + +
+
Parameters:
+ +
+ {Number} x + Optional, Default: 0 +
+
x coordinate, defaults to zero if left blank
+ +
+ {Number} y + Optional, Default: 0 +
+
y coordinate, defaults to zero if left blank
+ +
+ {Number} width + Optional, Default: 0 +
+
width of area to be cleared, defaults +entire width of canvas
+ +
+ {Number} height + Optional, Default: 0 +
+
height of area to be cleared, defaults +entire height of canvas
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.clearRect() + +
+
+ Clear a rectangular area + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.clip() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.closePath() + +
+
+ End a path + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.createImageData() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.createLinearGradient() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.createPattern() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.createRadialGradient() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.drawImage() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.drawWindow() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.fill() + +
+
+ fill in the current subpaths with the current fillstyle + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.fillRect() + +
+
+ Fill a rectangular area + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.fillStyle() + +
+
+ Sets the fill style + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.fillText() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.font() + +
+
+ Sets the font property and takes the same syntax as setting the font property + in CSS + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {String} + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.getImageData() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.globalAlpha(number) + +
+
+ The globalAlpha attribute gives an alpha value that is applied to shapes +and images before they are composited onto the canvas + + +
+ + + + +
+
Parameters:
+ +
+ {Number} number + +
+
in the range from 0.0 to 1.0
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.globalCompositeOperation(globalCompositeOperation) + +
+
+ Sets the globalCompositeOperation attribute, which sets how shapes and images +are drawn onto the existing bitmap, once they have had globalAlpha and the +current transformation matrix applied. +For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {String} globalCompositeOperation + +
+
source-atop, +source-in, source-out, +source-over, destination-atop, destination-in, destination-out, destination-over, +lighter
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.isPointInPath() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.lineCap(type) + +
+
+ The lineCap attribute defines the type of endings that UAs will place on +the end of lines. + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {String} type + +
+
butt, round, square
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.lineJoin(type) + +
+
+ The lineJoin attribute defines the type of corners that UAs will place +where two lines meet. The three valid values are bevel, round, and miter. + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {String} type + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.lineTo() + +
+
+ Draw a line to the given coordinates + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.lineWidth(lineWidth) + +
+
+ Sets the lineWidth attribute which gives the width of lines, in coordinate space +units. + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {Number} lineWidth + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.measureText() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.miterLimit(number) + +
+
+ Sets the miter limit + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {Number} number + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.moveTo() + +
+
+ Move to specified coordinates + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.putImageData() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.quadraticCurveTo() + +
+
+ Draw a quadratic curve to given coordinates + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.rect() + +
+
+ Create a rectangle + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.restore() + +
+
+ Restore the saved context + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.rotate() + +
+
+ Perform a rotation transformation + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.save() + +
+
+ Save the current state of the context + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.scale() + +
+
+ Perform a scale transformation + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.setTransform() + +
+
+ Set the transform + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.shadowBlur() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.shadowColor() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.shadowOffsetX() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.shadowOffsetY() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.stroke() + +
+
+ Stroke the subpaths + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.strokeRect() + +
+
+ Draw the outline of the rectangle + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.strokeStyle() + +
+
+ Sets the stroke style + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.strokeText() + +
+
+ description + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.textAlign(alignment) + +
+
+ Changes the text alignment. The possible values are start, end, left, right, +and center. The default is start. Other values are ignored. + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {string} alignment + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.textBaseline(alignment) + +
+
+ Changes the baseline alignment. If the value is one of top, hanging, middle, +alphabetic, ideographic, or bottom, then the value must be changed to the new value. + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ {String} alignment + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.transform() + +
+
+ Transform the identity matrix + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + +
+ + +
<static> + + + Karma.kCanvas.translate() + +
+
+ Performa a translation transformation + For full details see W3C docs + + +
+ + + + +
+
Parameters:
+ +
+ + +
+
+ +
+ + + + + +
+
Returns:
+ +
this
+ +
+ + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:45 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/Karma.kImage.html b/docs/symbols/Karma.kImage.html new file mode 100755 index 0000000..42139c3 --- /dev/null +++ b/docs/symbols/Karma.kImage.html @@ -0,0 +1,446 @@ + + + + + + + JsDoc Reference - Karma.kImage + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Class Karma.kImage +

+ + +

+ + + + This object is the prototype for images submitted to Karma in the + Karma() method + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ Karma.kImage() +
+
Prototype object for images
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ Karma.kImage.file +
+
file location of image
+
<static>   +
+ Karma.kImage.media +
+
media object
+
+ + + + + + + + + + + + +
+
+ Class Detail +
+ +
+ Karma.kImage() +
+ +
+ Prototype object for images + +
+ + + +
 kImage is the prototype object for images. This 'media' asset is loaded 
+ in a distinctly different way from the canvas or svg assets.
+ + + + + + + + +
+
Throws:
+ +
+ {Error} +
+
if the image asset is set to be localized but + the global locale is not set on the Karma object
+ +
+ {Error} +
+
if the name and file properties are not supplied
+ +
+ + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {String} + Karma.kImage.file + +
+
+ file location of image + + +
+ + + + + + + +
+
Default Value:
+
+ "" +
+
+ + +
+ + +
<static> + + {Image} + Karma.kImage.media + +
+
+ media object + + +
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:45 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/Karma.kSvg.html b/docs/symbols/Karma.kSvg.html new file mode 100755 index 0000000..05ab90c --- /dev/null +++ b/docs/symbols/Karma.kSvg.html @@ -0,0 +1,731 @@ + + + + + + + JsDoc Reference - Karma.kSvg + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Class Karma.kSvg +

+ + +

+ + + + This object is the prototype for each svg element submitted to Karma in the +Karma() method + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ Karma.kSvg() +
+
Prototype object for each svg element submitted to Karma in the +Karma() method
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ Karma.kSvg.doc +
+
Reference to the SVGDocument.
+
<static>   +
+ Karma.kSvg.domId +
+
Element ID for canvas element in html document.
+
<static>   +
+ Karma.kSvg.height +
+
height of element
+
<static>   +
+ Karma.kSvg.name +
+
name of instance, used internally
+
<static>   +
+ Karma.kSvg.node +
+
Reference to the DOM element.
+
<static>   +
+ Karma.kSvg.root +
+
Reference to the root element of the SVG Document
+
<static>   +
+ Karma.kSvg.status +
+
Status of element, either "loaded" or "error"
+
<static>   +
+ Karma.kSvg.visible +
+
Whether canvas is visible.
+
<static>   +
+ Karma.kSvg.width +
+
width of element
+
+ + + + + + + + + + + + +
+
+ Class Detail +
+ +
+ Karma.kSvg() +
+ +
+ Prototype object for each svg element submitted to Karma in the +Karma() method + +
+ + + + + + + + +
+
Throws:
+ +
+ {Error} +
+
if the name and domId for the svg element are not specified
+ +
+ + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {SVGDocument} + Karma.kSvg.doc + +
+
+ Reference to the SVGDocument. You can use the this.doc to manipulate +the SVG document + + +
+ + + +
var myElem = Karma.svg.someSvg.doc.getElementById('foobar');
+Karma.svg.someSvg.doc.createElement(...);
+Karma.svg.someSvg.doc.removeChild(someNode);
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {String} + Karma.kSvg.domId + +
+
+ Element ID for canvas element in html document. + + +
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {number} + Karma.kSvg.height + +
+
+ height of element + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + +
+ + +
<static> + + + Karma.kSvg.name + +
+
+ name of instance, used internally + + +
+ + + + + + + +
+
Default Value:
+
+ "" +
+
+ + +
+ + +
<static> + + {DOMElement} + Karma.kSvg.node + +
+
+ Reference to the DOM element. + + +
+ + + +
+//You can access all properties and methods of the underlying DOM element
+//using the 'node' property
+Karma.svg.someSvg.node.dispatchEvent;
+Karma.svg.someSvg.node.addEvenListener(...);
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {DocumentElement} + Karma.kSvg.root + +
+
+ Reference to the root element of the SVG Document + + +
+ + + +
// The root element is equivalent to "document" in a regular html document
+// The root attribute is used frequently with the jQuery SVG plugin for CSS selectors
+$('#someId', Karma.svg.someSvg.root).css(.. manipulate css attributes ...);
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {string} + Karma.kSvg.status + +
+
+ Status of element, either "loaded" or "error" + + +
+ + + + + + + +
+
Default Value:
+
+ "" +
+
+ + +
+ + +
<static> + + {boolean} + Karma.kSvg.visible + +
+
+ Whether canvas is visible. This value is read-only + + +
+ + + + + + + +
+
Default Value:
+
+ true +
+
+ + +
+ + +
<static> + + {number} + Karma.kSvg.width + +
+
+ width of element + + +
+ + + + + + + +
+
Default Value:
+
+ 0 +
+
+ + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:45 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/Karma.kVideo.html b/docs/symbols/Karma.kVideo.html new file mode 100755 index 0000000..75816f5 --- /dev/null +++ b/docs/symbols/Karma.kVideo.html @@ -0,0 +1,441 @@ + + + + + + + JsDoc Reference - Karma.kVideo + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Class Karma.kVideo +

+ + +

+ + + + Not Yet Implemented:This object is the prototype for video files submitted +to Karma in the Karma() method + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ Karma.kVideo() +
+
NYI:Prototype object for Video files
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ Karma.kVideo.file +
+
file location of asset
+
<static>   +
+ Karma.kVideo.media +
+
media object
+
+ + + + + + + + + + + + +
+
+ Class Detail +
+ +
+ Karma.kVideo() +
+ +
+ NYI:Prototype object for Video files + +
+ + + + + + + + +
+
Throws:
+ +
+ {Error} +
+
if the individual video asset is set to be localized but + the globale locale is not set on the Karma object
+ +
+ {Error} +
+
if the name and file properties are not supplied
+ +
+ + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {String} + Karma.kVideo.file + +
+
+ file location of asset + + +
+ + + + + + + +
+
Default Value:
+
+ "" +
+
+ + +
+ + +
<static> + + {Video} + Karma.kVideo.media + +
+
+ media object + + +
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:46 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/Karma.karma.html b/docs/symbols/Karma.karma.html new file mode 100755 index 0000000..ed1b642 --- /dev/null +++ b/docs/symbols/Karma.karma.html @@ -0,0 +1,677 @@ + + + + + + + JsDoc Reference - Karma.karma + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Class Karma.karma +

+ + +

+ + + + This object stores the global settings for the Karma library + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ Karma.karma() +
+
Stores global settings for the Karma library
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ Karma.karma.audio +
+
Collection of audio files with special helper +methods added to each reference
+
<static>   +
+ Karma.karma.canvas +
+
Collection of html 5 canvases with special helper +methods added to each reference
+
<static>   +
+ Karma.karma.image +
+
Collection of images with special helper +methods added to each reference
+
<static>   +
+ Karma.karma.locale +
+
This is the global locale as passed to Karma(), +such as "en", "es_SP"
+
<static>   +
+ Karma.karma.svg +
+
Collection of svgs with special helper +methods added to each reference
+
<static>   +
+ Karma.karma.video +
+
Collection of videos with special helper +methods added to each reference
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<static>   +
Karma.karma.ready(cb) +
+
Waits until all assets loaded(ready), then calls callback cb
+
+ + + + + + + + + +
+
+ Class Detail +
+ +
+ Karma.karma() +
+ +
+ Stores global settings for the Karma library + +
+ + + + + + + + + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {object} + Karma.karma.audio + +
+
+ Collection of audio files with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + {object} + Karma.karma.canvas + +
+
+ Collection of html 5 canvases with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + {object} + Karma.karma.image + +
+
+ Collection of images with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + + Karma.karma.locale + +
+
+ This is the global locale as passed to Karma(), +such as "en", "es_SP" + + +
+ + + + + + + +
+
Default Value:
+
+ undefined +
+
+ + +
+ + +
<static> + + {object} + Karma.karma.svg + +
+
+ Collection of svgs with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + +
+ + +
<static> + + {object} + Karma.karma.video + +
+
+ Collection of videos with special helper +methods added to each reference + + +
+ + + + + + + +
+
Default Value:
+
+ empty object +
+
+ + + + + + + + +
+ Method Detail +
+ + +
<static> + + + Karma.karma.ready(cb) + +
+
+ Waits until all assets loaded(ready), then calls callback cb + + +
+ + + +
+var k = Karma({ . . . your assets here . . . });
+k.ready(function(){ .. your code here . . .});
+
+your code will not be called until all assets have been loaded
+into collections
+ + + + +
+
Parameters:
+ +
+ {Function} cb + Optional +
+
callback function
+ +
+ + + + +
+
Throws:
+ +
+ {Error} +
+
if Karma.karma is not initialized with the +Karma({ options }) function
+ +
+ + +
+
Returns:
+ +
this
+ +
+ + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Tue Jan 05 2010 09:40:17 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/_global_.html b/docs/symbols/_global_.html new file mode 100755 index 0000000..dbff599 --- /dev/null +++ b/docs/symbols/_global_.html @@ -0,0 +1,273 @@ + + + + + + + JsDoc Reference - _global_ + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Built-In Namespace _global_ +

+ + +

+ + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Wed Feb 17 2010 14:55:42 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/locale.html b/docs/symbols/locale.html new file mode 100755 index 0000000..2771357 --- /dev/null +++ b/docs/symbols/locale.html @@ -0,0 +1,370 @@ + + + + + + + JsDoc Reference - locale + + + + + + + + + + + +
+ +
Class Index +| File Index
+
+

Classes

+ +
+ +
+ +
+ +

+ + Namespace locale +

+ + +

+ + + + Karma + + +
Defined in: karma.js. + +

+ + + + + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  +
+ locale +
+
This is the global locale as passed to Karma(), +such as "en", "es_SP"
+
+ + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ locale.locale +
+
This is the global locale as passed to Karma()
+
+ + + + + + + + + + + + +
+
+ Namespace Detail +
+ +
+ locale +
+ +
+ This is the global locale as passed to Karma(), +such as "en", "es_SP" + +
+ + + + + + + + + + + + +
+ + + + +
+ Field Detail +
+ + +
<static> + + {string} + locale.locale + +
+
+ This is the global locale as passed to Karma() + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + Documentation generated by JsDoc Toolkit 2.3.2 on Mon Jan 18 2010 11:15:17 GMT+0545 (NPT) +
+ + diff --git a/docs/symbols/src/js_karma.js.html b/docs/symbols/src/js_karma.js.html new file mode 100755 index 0000000..44a432b --- /dev/null +++ b/docs/symbols/src/js_karma.js.html @@ -0,0 +1,1766 @@ +
  1 /* Documentation Note:
+  2  *   Public methods and properties are commented with /** some text *\/
+  3  *   and private methods and properties are commented with //
+  4  *   
+  5  *   Please leave it that way to keep this documentation sane
+  6  */
+  7 
+  8 
+  9 /*
+ 10 *	Karma Framework
+ 11 *	http://karmaeducation.org
+ 12 *	
+ 13 *	Copyright (c)  2009
+ 14 *	Bryan W Berry		bryan@olenepal.org
+ 15 * 	Felipe López Toledo	zer.subzero@gmail.com
+ 16 *      
+ 17 *	Under MIT License:
+ 18 *	Permission is hereby granted, free of charge, to any person
+ 19 *	obtaining a copy of this software and associated documentation
+ 20 *	files (the "Software"), to deal in the Software without
+ 21 *	restriction, including without limitation the rights to use,
+ 22 *	copy, modify, merge, publish, distribute, sublicense, and/or sell
+ 23 *	copies of the Software, and to permit persons to whom the
+ 24 *	Software is furnished to do so, subject to the following
+ 25 *	conditions:
+ 26 *	
+ 27 *	The above copyright notice and this permission notice shall be
+ 28 *	included in all copies or substantial portions of the Software.	
+ 29 * 
+ 30 *	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ 31 *	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ 32 *	OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ 33 *	NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ 34 *	HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ 35 *	WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ 36 *	FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ 37 *	OTHER DEALINGS IN THE SOFTWARE.
+ 38 */
+ 39 
+ 40 /**
+ 41 * @fileOverview Contains karma library
+ 42 * @author Bryan Berry <bryan@olenepal.org> 
+ 43 * @author Felipe Lopez Toledo <zer.subzero@gmail.com>
+ 44 */
+ 45 
+ 46 
+ 47 //common.js modules use exports object
+ 48 if(!this.exports) {
+ 49     exports = {};
+ 50 }
+ 51 
+ 52 
+ 53 
+ 54 /** Karma is the namespace for the Karma library and Karma() is the constructor 
+ 55  * function for the Karma library object Karma. 
+ 56  * Karma() checks if the current document type is set to HTML 5, throws
+ 57  * an error if not. Otherwise, initializes the karma object and returns
+ 58  * a reference to that object.
+ 59  * @namespace Global namespace for Karma library
+ 60  * @constructor
+ 61  * @param {Object} [options={}] options for intializing Karma library
+ 62  * @param {String} [options.locale=''] sets current locale Not Yet Implemented
+ 63  * @param {Array} [options.image=[]] array of images to be converted into a collection
+ 64  * @param {Array} [options.audio=[]] array of audio to be converted into a collection
+ 65  * @param {Array} [options.video=[]] NYI array of videos to be converted into a collection
+ 66  * @param {Array} [options.svg=[]] array of SVG elements to be 
+ 67  * converted into a collection. Each SVG element must already exist in the html document
+ 68  * @param {Array} [options.canvas=[]] array of canvas elements 
+ 69  * to be converted into a collection. Each canvas element must already exist in the 
+ 70  * html document and width and height of each element must be set as attributes
+ 71  * @throws {Error} if the document type declaration is not set to HTML 5, e.g. 
+ 72  * <!DOCTYPE html>
+ 73  * @throws {Error} If any of the initialization parameters are invalid values
+ 74  * @returns {Object} Karma -- reference to the initialized Karma library
+ 75  * @example
+ 76  * 
+ 77  * var k = Karma({ 
+ 78  *                 image: [ 
+ 79  *                    {name: "ninja", file: "ninja.png"}, 
+ 80  *                    {name: "cowboy", file: "cowboy.png"}
+ 81  *                         ],
+ 82  *                 audio: [
+ 83  *                    {name: "woosh", file: "woosh.ogg"},
+ 84  *                    {name: "yeehaw", file: "yeehaw.ogg"}
+ 85  *                         ],
+ 86  *                 video: [  //Not Yet Implemented
+ 87  *                    {name: "attack", file: "attack.ogv"},
+ 88  *                    {name: "ride", file: "ride.ogv"}
+ 89  *                         ]
+ 90  *                 canvas: [
+ 91  *                    {name: "ninja", domId: "ninjaCanvas"},
+ 92  *                    {name: "cowboy", domId: "cowboyCanvas"}
+ 93  *                         ],
+ 94  *                 svg: [ 
+ 95  *                    {name: "ninja", domId: "ninjaSvg"},
+ 96  *                    {name: "cowboy", domId: "cowboySvg"}
+ 97  *                         ],
+ 98  *                 });
+ 99  * Next, call the ready function with a callback to your program code
+100  * 
+101  * k.ready(function () { ... your application code . . . }                       
+102  * 
+103  * after that you can access each asset like so
+104  * k.image.ninja;
+105  * k.svg.cowboy;
+106  * k.audio.yeehaw.play();
+107  * k.canvas.ninja.drawImage(k.image.ninja, 0, 0);
+108  * 
+109  */	
+110 var Karma = exports.Karma  = function (options) {
+111     Karma._isHtml5(document.doctype.nodeName);
+112 
+113     if ( Karma._initialized === true ) {
+114 	return Karma;
+115     } else {
+116 	return Karma._init(options);
+117     }
+118 };
+119 
+120 
+121 //helper functions
+122 
+123 /**This emulates the Object.create method in ecmascript 5 spec
+124  * This isn't a full implementation as it doesn't support an all of Object.create's features
+125  * This has the same functionality as Crockford's beget method
+126  * and this primary building block for prototypal inheritance in
+127  * this library
+128  * @param {Object} parent that the new object's prototype should point to
+129  * @returns {Object} a new object whose prototype is parent
+130  * @example
+131  * 
+132  * var ninja = { weapon : "sword" };
+133  * var ninja1 = Karma.create(ninja);
+134  * ninja1.weapon === "sword"
+135  */
+136 Karma.create = function (parent){
+137     function F () {};
+138     F.prototype = parent;
+139     return new F();
+140 };
+141 
+142 /** Returns a shallow copy of the passed in object
+143  * @param {Object} target to be copied
+144  * @returns {Object} a shallow copy of target
+145  */
+146 Karma.clone = function (target){
+147     var copy = {};
+148     for ( var i in target ) {
+149 	if(target.hasOwnProperty(i)){
+150 	    copy[i] = target[i];
+151 	}
+152     }
+153     return copy;
+154 };
+155 
+156 /** Extends properties of the target object with those of 
+157  * the source object
+158  * @param {Object} target object to be extended 
+159  * @param {Object} source whose properties will extend target
+160  * @returns {Object} target extended by source
+161  */
+162 Karma.objectPlus = function (target, source){
+163     for ( var i in source){
+164 	if (source.hasOwnProperty(i)){
+165 	    target[i] = source[i];
+166 	}
+167     }
+168     return target;
+169 };
+170 
+171 Karma.extend = Karma.objectPlus;
+172 
+173 /** Creates a new object that is a prototype of the first argument
+174  * then extends it with the properties of the second argument
+175  * @param {Object} parent1 will be prototype of returned object
+176  * @param {Object} parent2 will extend properties of returned object
+177  * @returns {Object} object that whose prototype is parent1 and has 
+178  * been extended with properties of parent2
+179  */ 
+180 Karma.copyObjectPlus = function (parent1, parent2){
+181     function F () {};
+182     F.prototype = parent1;
+183     var G = new F();
+184     return Karma.objectPlus(G, parent2);
+185 };
+186 
+187 
+188 //Throws big ugly error if doctype isn't html5
+189 Karma._isHtml5 = function (doctype){
+190     var regex = new RegExp('^html$', 'i');
+191     if(!regex.test(doctype)){
+192 	var errorMsg =  "ERROR: The doctype must be set to <!DOCTYPE html> " +
+193 	    "in order to use Karma. Karma require you use html5";
+194 	var errorElem = document.createElement('div');
+195 	errorElem.setAttribute('id', 'errorDoctype');
+196 	errorElem.innerText = errorMsg;
+197 	document.body.appendChild(errorElem);
+198 	   throw new Error(errorMsg);
+199 	}
+200 };
+201 
+202 /**
+203  * Shuffles an array of items randomly
+204  * @param {Array} oldList of choices to be shuffled
+205  * @returns {Array} newlist of choices randomly reordered 
+206  */
+207 Karma.shuffle = function (oldList) {
+208     var newList = oldList.slice(0);
+209     for (var i = newList.length - 1; i > 0; i -= 1) {
+210         var j = Karma.rand(0, i);
+211         var t = newList[i];
+212         newList[i] = newList[j];
+213         newList[j] = t;
+214     }
+215     return newList;
+216 };
+217 
+218 
+219 /**
+220  * Converts a number to numerals in the specified locale. Currently only
+221  * supports Nepali
+222  * @param {Number} Number to be converted
+223  * @param {locale} locale that number should be converted to
+224  * @returns {String} Unicode string for localized numeral 
+225  */
+226 Karma.convertNumToLocale = function(num, locale){
+227     locale = locale || Karma.locale;
+228     //48 is the base for western numerals
+229     var convertDigit = function(digit){
+230 	
+231 	var numBase = 48;
+232 	var prefix = "u00";
+233 	
+234 	if (locale === "ne"){
+235 	    prefix = "u0";
+236 	    numBase = 2406;
+237 	}
+238 	
+239 	return '\\' + prefix + 
+240 	    (numBase + parseInt(digit)).toString(16);
+241     };
+242     
+243     var charArray = num.toString().split("").map(convertDigit);
+244     return eval('"' + charArray.join('') + '"');
+245 };
+246 
+247 /**
+248  * @name Karma._n
+249  * @function
+250  * @public
+251  * Alias for Karma.convertNumToLocale. Converts a number to numerals to 
+252  * Karma.locale or to specified locale. Currently only supports Nepali
+253  * @param {Number} Number to be converted
+254  * @param {locale} locale that number should be converted to
+255  * @returns {String} Unicode string for localized numeral 
+256  */
+257 Karma._n = Karma.convertNumToLocale;
+258 
+259 /* Scales the dimensions of document.body to the innerHeight and innerWidth
+260  * of the viewport, i.e. browser window, with a minor offset to the height to 
+261  * make sure the scrollbars do not appear
+262  */
+263 Karma.scaleToViewport = function(){
+264     var width = window.innerWidth;
+265     var height = window.innerHeight;
+266     
+267     //hack to ensure scrollbars don't appear
+268     if (height === 900){
+269 	height = "" + 900 + "px";
+270     } else {
+271 	height = "" + (height - 13) + "px";
+272     }
+273     
+274     document.body.style.width = "" + width + "px";
+275     document.body.style.height = height;
+276 };
+277 
+278 Karma.scaleWindow = function(){
+279     var width = "1200px";
+280     var height = "900px";
+281     var viewportHeight = "760px";
+282     var $body = $('body');
+283     var $kMain = $('#kMain');
+284 
+285     if (window.innerWidth < 1150){
+286 	width = "950px";
+287 	height = "600px";
+288 	viewportHeight = "460px";
+289 	$body.css('border', '2px solid black');
+290 
+291 	//  460/760 * 16 = 9.6
+292 	$kMain.css('font-size', '9.6px');
+293     } 
+294 
+295     $body.css({border: '2px solid black', width: width, height: height});
+296     $kMain.css({width: width, height: viewportHeight});
+297 
+298 
+299 };
+300 
+301     // Below are geometry and math helper methods
+302     
+303 /**
+304  * Converts a value from degrees to radians.
+305  * @param {Number} angle The angle in degrees
+306  * @returns {Number} The angle in radians 
+307  */
+308 Karma.radians = function( angle ){
+309 	return ( angle / 180 ) * Math.PI;
+310 };
+311 
+312 /**
+313  *  Gets the square of the Euclidian (ordinary) distance between 2 points.
+314  * @param {Object} Point No. 0
+315  * @param {Number} Point0.x
+316  * @param {Number} Point0.y
+317  * @param {Object} Point No. 1
+318  * @param {Number} Point1.x
+319  * @param {Number} Point1.y
+320  * @returns {Number} The square of the Euclidian distance 
+321  * @example
+322  * 
+323  * p0 = {x:0, y:1};
+324  * p1 = {x:50, y:70};
+325  * var d = distance2(p0, p1);
+326  * 
+327  */
+328 Karma.distance2 = function ( p0, p1 ) {
+329     return   (p1.x - p0.x) * (p1.x - p0.x) + (p1.y - p1.y) * (p1.y - p1.y); 
+330 };
+331 
+332 /**
+333  * Gets the Euclidian (ordinary) distance between 2 points.<br>
+334  * <b>Warning:</b> It's slower than distance2 function
+335  * @param {Object} Point No. 0
+336  * @param {Number} Point0.x
+337  * @param {Number} Point0.y
+338  * @param {Object} Point No. 1
+339  * @param {Number} Point1.x
+340  * @param {Number} Point1.y
+341  * @returns {Number} The Euclidian distance 
+342  * @example
+343  * 
+344  * p0 = {x:0, y:1};
+345  * p1 = {x:50, y:70};
+346  * var d = distance2(p0, p1);
+347  * 
+348  */
+349 Karma.distance = function ( p0, p1 ) {
+350 	return   Math.sqrt( this.distance2( p0, p1 ) ); 
+351 };
+352 
+353 /** Returns a random number within the range provided
+354  * @param {Number} lower limit of the range, lowest number that can be returned
+355  * @param {Number} upper limit of the range, highest number that can be returned
+356  * @returns {Number} number that is >= lower and <= upper
+357  * @example
+358  * 
+359  * var num = rand(0, 10);
+360  * 
+361  * //num could be 0, 1, 2, 3 ... or 10
+362  * 
+363  */
+364 Karma.rand = function ( lower, upper ){
+365   return Math.floor(Math.random() * (upper - lower + 1) + lower);  
+366 };
+367 
+368 
+369 Karma.extend(Karma, {      
+370     /** This is the global locale as passed to Karma(),
+371      * such as "en", "es_SP"
+372      * @fieldOf Karma
+373      * @property {string} locale This is the global locale as passed to Karma()
+374      * @default 'en'
+375      */
+376     locale : 'en',
+377     /** Collection of images with special helper
+378      * methods added to each reference
+379      * @fieldOf Karma
+380      * @type object
+381      * @default empty object
+382      */
+383     image : {},
+384     /** Collection of audio files with special helper
+385      * methods added to each reference
+386      * @fieldOf Karma
+387      * @type object
+388      * @default empty object
+389      */
+390     audio : {},
+391     /** Collection of html 5 canvases with special helper
+392      * methods added to each reference
+393      * @fieldOf Karma
+394      * @type object
+395      * @default empty object
+396      */
+397     canvas : {},
+398     /** Collection of svgs with special helper
+399      * methods added to each reference
+400      * @fieldOf Karma
+401      * @type object
+402      * @default empty object
+403      */
+404     svg : {},
+405     /** Collection of videos with special helper
+406      * methods added to each reference
+407      * @fieldOf Karma
+408      * @type object
+409      * @default empty object
+410      */
+411     video : {},
+412     _localized : false,
+413     _assetPath : "assets/",
+414     _localePath : "",
+415     _initialized : false,
+416     _statusDiv: undefined,
+417     _loaderDiv : undefined,
+418     _counters : { total : 0, errors : 0, loaded : 0},
+419 
+420     //This constructs the Karma object per values provided by the user
+421     _init: function(options) {
+422 	this._initialized = true;
+423 	
+424 	//set up message that show count of assets loaded
+425 	//and has an ordered list to append error messages to
+426 	var _statusDiv = this._statusDiv = document.createElement('div');
+427 	this._loaderDiv = this._loaderDiv = document.createElement('div');	
+428 	var errorList = document.createElement('ol');
+429 
+430 	_statusDiv.setAttribute('id', 'karma-status');
+431 	_statusDiv.setAttribute('style', 'position:absolute;');
+432 	_statusDiv.innerHTML = 'Karma is loading ...';
+433 	this._loaderDiv.setAttribute('id', 'karma-loader');
+434 	this._loaderDiv.setAttribute('class', 'status');
+435 	errorList.setAttribute('id', 'errorList');
+436 
+437 	_statusDiv.appendChild(this._loaderDiv);
+438 	this._statusDiv.appendChild(errorList);
+439 	document.body.appendChild(_statusDiv);
+440 
+441 	//regular expression that matches the name of aprivate property
+442 	// the karma object
+443 	var regexPrivate = new RegExp('^_.*');
+444 	
+445 	for ( var option in options ) {
+446 	    if (options.hasOwnProperty(option)){
+447 		if (option === "image" || option === "audio" || option === 
+448 		    "svg" || option === "video" || option === "canvas"){ 
+449 		    
+450 		    if(!(options[option] instanceof Array)){
+451 			throw new Error("" + option + " must be an array");
+452 		    } else if (options[option].length === 0){
+453 			continue;
+454 		    }
+455 		} else if (regexPrivate.test(option)){
+456 		    //don't overwrite a private property of karma object
+457 		    continue;
+458 		}
+459 		
+460 		switch (option){
+461 		case "locale":
+462 
+463 		    if (this._isValidLocale(options[option])){
+464 			this.locale = this._normalizeLocale(options[option]);
+465 			this._localized = true;
+466 			this._localePath = Karma._computeLocalePath(this.locale);
+467 		    } else {
+468 			throw new Error("locale provided to karma._init() is invalid");
+469 		    }
+470 		    
+471 		    break;
+472 		case "image":
+473 		    options[option]._type = 'image';
+474 		    Karma._makeCollection(options[option], 'image');
+475 		    break;
+476 		case "audio":
+477 		    options[option]._type = 'audio';
+478 		    Karma._makeCollection(options[option], 'audio');
+479 		    break;
+480 		case "video":
+481 		    options[option]._type = 'video';
+482 		    Karma._makeCollection(options[option], 'video');
+483 		    break;
+484 		case "svg":
+485 		    options[option]._type = 'svg';
+486 		    Karma._makeCollection(options[option], 'svg');
+487 		    break;
+488 		case "canvas":
+489 		    options[option]._type = 'canvas';
+490 		    Karma._makeCollection(options[option], 'canvas');
+491 		    break;
+492 		}
+493 	    }
+494 	}
+495 
+496 
+497 
+498 	return this;
+499     },
+500     
+501     /** Waits until all assets loaded(ready), then calls callback cb
+502      * @memberOf Karma
+503      * @param {Function} [cb] callback function
+504      * @returns this
+505      * @throws {Error} if Karma is not initialized with the 
+506      * Karma({ options }) function
+507      * @example
+508      * 
+509      * var k = Karma({ . . . your assets here . . . });
+510      * k.ready(function(){ .. your code here . . .});
+511      * 
+512      * your code will not be called until all assets have been loaded
+513      * into collections
+514      * 
+515      */
+516     ready : function( cb ) {
+517 	var that = this;
+518 	if (Karma._initialized !== true){
+519 	    throw new Error("Karma not initialized");
+520 	}
+521 
+522 	if (this._counters.loaded !== this._counters.total){
+523 	    setTimeout(function(){ that.ready(cb);}, 5);
+524 	} else if (cb) {
+525 	    //hide the "Karma is loading..." message
+526 	    this._statusDiv.setAttribute('style', 'display:none;');
+527 
+528 	     cb();
+529 	} else if (!cb) {
+530 	    //hide the "Karma is loading..." message
+531 	    this._statusDiv.setAttribute('style', 'display:none;');
+532 	    
+533 	    //if no options passed, show it works message
+534 	    this._showStarterMessage();
+535 	}
+536 	
+537 	
+538 	   
+539 
+540 	return this;
+541     },
+542 
+543     //Display Apache-like "It works" message if no options
+544     _showStarterMessage : function (){
+545 	var starterMsg = document.createElement('div');
+546 	starterMsg.setAttribute('id', 'starterMsg');
+547 	starterMsg.innerHTML = "<h1>It Works</h1>";
+548 	document.body.appendChild(starterMsg);
+549     },
+550 
+551     //Updates visible counter of how many assets are loaded
+552     _updateStatus : function (errorMsg) {
+553 	var loaded = this._counters.loaded;
+554 	var total = this._counters.total;
+555 	var errors = this._counters.errors;
+556 	this._loaderDiv.innerHTML = "Loaded " + loaded + " / " + total + 
+557 	    "" + (errors > 0 ? " Errors [ " + errors +" ]" : '');
+558 	if (errorMsg) {
+559 	    var liError = document.createElement('li');
+560 	    liError.innerHTML = errorMsg;
+561 	    var errorList = document.getElementById('errorList');
+562 	    errorList.appendChild(liError);  
+563 	}
+564     },	    
+565 
+566     //matches 2 letter country code then optionally
+567     //a dash or underscore followed by a country or language identifier
+568     //i currently only allow a language identifier 2-3 chars long
+569     _isValidLocale : function (locale) {
+570 	var localeRegex = new RegExp('^[a-zA-Z][a-zA-Z]([-_][a-zA-z]{2,3})?$');
+571 	return localeRegex.test(locale);
+572     },
+573 
+574     _normalizeLocale : function(locale) {
+575 	var lang = "";
+576 	var country = "";
+577 	var divider = "";
+578 
+579 	lang = locale.slice(0, 2).toLowerCase();
+580 	divider = "_";
+581 	country = locale.slice(3, 6).toUpperCase();
+582 	
+583 	return locale.length > 2 ? "" + lang + divider + country : lang;
+584     },
+585     
+586 
+587     
+588 });
+589 
+590 //Helper functions for creating assets
+591 Karma._isLocalized = function (boolLocalized) {
+592     if (typeof boolLocalized === "boolean" ) {
+593 	if(boolLocalized === true && 
+594 	   Karma.locale === undefined){
+595 	    throw new Error("You cannot localize a media asset" +
+596 			    " if the global locale for Karma isn't set");
+597 	} else {
+598 	    return boolLocalized;
+599 	}
+600     } else if (typeof boolLocalized === undefined){
+601 	return false;
+602     } else{ 
+603 	throw new Error("This is not a valid value for the localized option");
+604     }
+605 };
+606 
+607 Karma._computeLocalePath = function(locale) {
+608     return Karma._assetPath + locale + "/";
+609 };
+610 
+611 
+612 
+613 
+614 Karma._makeCollection = function (configs, type){
+615     var makeAsset = function (config){
+616 	var asset = undefined;
+617 	var target = undefined;
+618 	switch(type){
+619 	    case "image":
+620 		target = Karma.kImage;
+621 		break;
+622 	    case "audio":
+623 		target = Karma.kAudio;
+624 		break;
+625 	    case "video":
+626 		target = Karma.kVideo;
+627 		break;
+628 	    case "svg":
+629 		target = Karma.kSvg;
+630 		break;
+631 	    case "canvas":
+632 		target = Karma.kCanvas;
+633 		break;
+634 	}
+635 
+636 	asset = Karma.create(target)._init(config);
+637 	Karma[type][config.name] = asset;
+638     };
+639 		       
+640     configs.forEach(function(config){ makeAsset(config);});
+641 };
+642 
+643 
+644 
+645 
+646 
+647 //Prototype objects for assets
+648 
+649 
+650 /** Prototype object for images
+651  *  @class This object is the prototype for images submitted to Karma in the
+652  *  Karma() method
+653  *  @ throws {Error} if the image asset is set to be localized but 
+654  *  the global locale is not set on the Karma object
+655  *  @ throws {Error} if the name and file properties are not supplied
+656  *  @example
+657  *  kImage is the prototype object for images. This 'media' asset is loaded 
+658  *  in a distinctly different way from the canvas or svg assets.    
+659  *
+660  */
+661 Karma.kImage = 
+662     {
+663     /** file location of image
+664      * @type String
+665      * @default ""
+666      */
+667     file : "",
+668     /** media object
+669      * @type Image
+670      * @default undefined 
+671      */	
+672     media : undefined,
+673     //actual path to the file
+674     _path : "",
+675     //if using localized version of this image
+676     _localized : false,
+677     _type : "image", 
+678     //initializes kImage instance with values provided by user
+679     _init : function (image) {
+680 	image._localized = image._localized || false;
+681 	Karma._counters.total++;
+682 
+683 	if (image.name === undefined || image.file === undefined){
+684 	    throw new Error("properties name and file have to be defined");
+685 	} else {
+686 	    this.name = image.name;
+687 	    this.file = image.file;
+688 	}
+689 
+690 	this.media = new Image(); 
+691 	
+692 	if(Karma._isLocalized(image._localized)){
+693 	    this._localized = image._localized;
+694 	    this._path = Karma._localePath + "image/";
+695 	} else {
+696 	    this._path = Karma._assetPath + "image/";
+697 	}
+698 
+699 	//IMPORTANT: This one magic line loads the file
+700 	this.media.src = this.src = this._path + this.file;
+701 	
+702 	//add event handlers
+703 	this._addEventHandlers();
+704 
+705 	
+706 	return this;
+707     },
+708     //Adds event handlers to update the counters when 
+709     //the image is successfully or unsuccessfully loaded
+710     _addEventHandlers : function () {
+711 	var that = this;
+712 
+713 	that.media.addEventListener(
+714 	    "load", 
+715 	    function (e) { 
+716 		Karma._counters.loaded++;
+717 		Karma._updateStatus();
+718 		that.status = "loaded";}, false);
+719 	
+720 	that.media.addEventListener(
+721 	    "error", 
+722 	    function (e) { 
+723 		Karma._counters.errors++;
+724 		that.status = "error";
+725 		var errorMsg = "Error: " + that._type.toUpperCase() +
+726 		    " " + that.name + " cannot be loaded."; 
+727 		Karma._updateStatus(errorMsg);
+728 	    }, 
+729 	    false);
+730 	that.media.addEventListener(
+731 	    "abort", 
+732 	    function (e) { 
+733 		Karma._counters.total++;
+734 		that.status = "aborted";
+735 		var errorMsg = "ABORT: " + that._type.toUpperCase() +
+736 		    " " + that.name + " loading was aborted."; 
+737 		Karma._updateStatus(errorMsg);
+738 
+739 	    }, false);
+740     }
+741     
+742 };
+743 
+744 /** Prototype object for audio files 
+745  *  @class This object is the prototype for audio files submitted to Karma in the
+746  * Karma() method
+747  *  @ throws {Error} if the individual audio asset is set to be localized but 
+748  *  the globale locale is not set on the Karma object
+749  *  @ throws {Error} if the name and file properties are not supplied
+750  *  @example
+751  *  kAudio is the prototype object for audio
+752  *  The audio assets are loaded in a distinctly different way
+753  *  from the canvas or svg assets. They also have distinctly different
+754  *  helper methods 
+755  *  
+756  *  You initialize the kAudio assets by passing an array of objects
+757  */
+758 Karma.kAudio = {
+759     /** file location of asset
+760      * @type String
+761      * @default ""
+762      */
+763     file : "",
+764     /**  Media object. You can access the src, autobuffer, autoplay, loop, and 
+765      * controls attributes 
+766      * via the media property of kAudio. Read more about the properties of the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-element-attributes">HTML 5 media element</a>
+767      * @type Audio
+768      * @default undefined
+769      */	
+770     media : undefined,
+771     //actual path to the file
+772     _path : "",
+773     //if using localized version of this asset
+774     _localized : false,
+775     _type : "audio", 
+776     //initializes kAudio instance with values provided by user
+777     _init : function (audio) {
+778 	audio._localized = audio._localized || false;
+779 	Karma._counters.total++;
+780 
+781 	if (audio.name === undefined || audio.file === undefined){
+782 	    throw new Error("properties name and file have to be defined");
+783 	} else {
+784 	    this.name = audio.name;
+785 	    this.file = audio.file;
+786 	}
+787 
+788 	this.media = new Audio(); 
+789 	
+790 	if(Karma._isLocalized(audio._localized)){
+791 	    this._localized = audio._localized;
+792 	    this._path = Karma._localePath  + "audio/";
+793 	} else {
+794 	    this._path = Karma._assetPath + "audio/";
+795 	}
+796 
+797 
+798 	//IMPORTANT: This one magic line loads the file
+799 	this.media.src = this.src = this._path + this.file;
+800 	
+801 	//add event handlers
+802 	this._addEventHandlers();
+803 
+804 	this.media.autobuffer = true;
+805 	this.media.load();
+806 
+807 	
+808 	return this;
+809     },
+810     //Adds event handlers to update the counters when 
+811     //the asset is successfully or unsuccessfully loaded
+812     _addEventHandlers : function () {
+813 	var that = this;
+814 	//'canplaythrough' event is a Browser Hack recommended by chromium devs
+815 	//http://code.google.com/p/chromium/issues/detail?id=20251&q=loading%20audio&colspec=ID%20Stars%20Pri%20Area%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS#c4
+816 
+817 	that.media.addEventListener(
+818 	    "canplaythrough", 
+819 	    function (e) { 
+820 		Karma._counters.loaded++;
+821 		Karma._updateStatus();
+822 		that.status = "loaded";}, false);
+823 	
+824 	that.media.addEventListener(
+825 	    "error", 
+826 	    function (e) { 
+827 		Karma._counters.errors++;
+828 		that.status = "error";
+829 		var errorMsg = "Error: " + that._type.toUpperCase() +
+830 		    " " + that.name + " cannot be loaded."; 
+831 		Karma._updateStatus(errorMsg);
+832 	    }, 
+833 	    false);
+834 	that.media.addEventListener(
+835 	    "abort", 
+836 	    function (e) { 
+837 		Karma._counters.total++;
+838 		that.status = "aborted";
+839 		var errorMsg = "ABORT: " + that._type.toUpperCase() +
+840 		    " " + that.name + " loading was aborted."; 
+841 		Karma._updateStatus(errorMsg);
+842 
+843 	    }, false);
+844 
+845     },
+846     /** Plays the audio file  */
+847     play : function () {
+848 	    this.media.play();  
+849     }
+850     
+851 };
+852 
+853 /** NYI:Prototype object for Video files 
+854  *  @class Not Yet Implemented:This object is the prototype for video files submitted 
+855  * to Karma in the Karma() method
+856  *  @ throws {Error} if the individual video asset is set to be localized but 
+857  *  the globale locale is not set on the Karma object
+858  *  @ throws {Error} if the name and file properties are not supplied
+859  */
+860 Karma.kVideo = {
+861     /** file location of asset
+862      * @type String
+863      * @default ""
+864      */
+865     file : "",
+866     /** media object
+867      * @type Video
+868      * @default undefined 
+869      */	
+870     media : undefined,
+871     //actual path to the file
+872     _path : "",
+873     //if using localized version of this asset
+874     _localized : false,
+875     _type : "video", 
+876     //initializes kVideo instance with values provided by user
+877     _init : function (video) {
+878 	//Not Yet Implemented
+879 	Karma._counters.errors++;
+880 	throw new Error("Video is not Yet Implemented");
+881 
+882 	video._localized = video._localized || false;
+883 	Karma._counters.total++;
+884 
+885 	if (video.name === undefined || video.file === undefined){
+886 	    throw new Error("properties name and file have to be defined");
+887 	} else {
+888 	    this.name = video.name;
+889 	    this.file = video.file;
+890 	}
+891 
+892 	this.media = new Video(); 
+893 	
+894 	if(Karma._isLocalized(video._localized)){
+895 	    this._localized = video._localized;
+896 	    this._path = Karma._localePath  + "video/";
+897 	} else {
+898 	    this._path = Karma._assetPath + "video/";
+899 	}
+900 
+901 
+902 	//IMPORTANT: This one magic line loads the file
+903 	this.media.src = this.src = this._path + this.file;
+904 	
+905 	//add event handlers
+906 	this._addEventHandlers();
+907 
+908 	return this;
+909     },
+910     //Adds event handlers to update the counters when 
+911     //the asset is successfully or unsuccessfully loaded
+912     _addEventHandlers : function () {
+913 	var that = this;
+914 	//'canplaythrough' event is a Browser Hack recommended by chromium devs
+915 	//http://code.google.com/p/chromium/issues/detail?id=20251&q=loading%20audio&colspec=ID%20Stars%20Pri%20Area%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS#c4
+916 
+917 	that.media.addEventListener(
+918 	    "canplaythrough", 
+919 	    function (e) { 
+920 		Karma._counters.loaded++;
+921 		Karma._updateStatus();
+922 		that.status = "loaded";}, false);
+923 	
+924 	that.media.addEventListener(
+925 	    "error", 
+926 	    function (e) { 
+927 		Karma._counters.errors++;
+928 		that.status = "error";
+929 		var errorMsg = "Error: " + that._type.toUpperCase() +
+930 		    " " + that.name + " cannot be loaded."; 
+931 		Karma._updateStatus(errorMsg);
+932 	    }, 
+933 	    false);
+934 	that.media.addEventListener(
+935 	    "abort", 
+936 	    function (e) { 
+937 		Karma._counters.total++;
+938 		that.status = "aborted";
+939 		var errorMsg = "ABORT: " + that._type.toUpperCase() +
+940 		    " " + that.name + " loading was aborted."; 
+941 		Karma._updateStatus(errorMsg);
+942 
+943 	    }, false);
+944 
+945     }
+946     
+947 };
+948 
+949 
+950 
+951 /** Prototype object for each canvas element submitted to Karma in the
+952  * Karma() method
+953  * @throws {Error} if the name and domId for the canvas element are not specified
+954  * @thows {Error} if the supplied domId does not match an element in the DOM
+955  * @class This object is the prototype for each canvas element submitted to Karma in the
+956  * Karma() method
+957  */
+958 Karma.kCanvas = {
+959     /** Name of the canvas, used internally by karma.js
+960      * @type String
+961      * @default ''
+962      */
+963     name : '',
+964     /** Width of canvas element
+965      * @type Number
+966      * @default 0
+967      */
+968     width: 0,
+969     /** Height of canvas element
+970      * @type Number
+971      * @default 0
+972      */
+973     height: 0,
+974     /**  Whether canvas is visible
+975      * @type boolean
+976      * @default true
+977      */
+978     visible: true,
+979     /** Element ID for canvas element in html document. This value is read-only
+980      * @type String
+981      * @default undefined
+982      */
+983     domId: undefined,
+984     /** Reference to the DOM element
+985      * @type DOMElement
+986      * @default undefined
+987      * @example
+988      * //You can access all properties and methods of the underlying DOM element
+989      * //using the 'node' property
+990      * Karma.canvas.someCanvas.node.dispatchEvent( ... some event ...);
+991      * var stuff = Karma.canvas.someCanvas.node.innerHTML;
+992      * 
+993      */
+994     node: undefined,
+995     /** The 2 Dimensional Rendering context property for this canvas
+996      * @type 2DRenderingContext
+997      * @default undefined
+998      * @example
+999      * //Almost all of the context attributes and methods are wrapped in helper functions
+1000      * //but you can also access them directly using the ctx property
+1001      * Karma.canvas.someCanvas.ctx.drawImage(someImage, x, y);
+1002      * Karma.canvas.someCanvas.ctx.fillStyle = "#ffffff";
+1003      */
+1004     ctx: undefined,
+1005 
+1006     //initializes object with values provides by user
+1007     _init: function (config) {
+1008 	for (var option in config){
+1009 	    if (config.hasOwnProperty(option)){
+1010 		switch (option){
+1011 		case "name":
+1012 		    this.name = config[option];
+1013 		    break;
+1014 		case "domId":
+1015 		    this.domId = config[option];
+1016 		    break;
+1017 		case "width":
+1018 		    if(!this.height){
+1019 			throw new Error("If you specify a width you must also" +
+1020 					"specify a height");
+1021 		    }
+1022 		    this.width = config[option];
+1023 		    break;
+1024 		case "height":
+1025 		    if(!this.width){
+1026 			throw new Error("If you specify a height you must also" +
+1027 					"specify a width");
+1028 		    }
+1029 		    this.height = parseInt(config.option, 10);
+1030 		    break;
+1031 		case "fps":
+1032 		    this.fps = parseInt(config.option, 10);
+1033 		    break;
+1034 		}
+1035 	    }
+1036 	}
+1037 	
+1038 	if(this.domId && document.getElementById(this.domId)){
+1039 	       	this.node = document.getElementById(this.domId);
+1040 		this.ctx = this.node.getContext('2d');
+1041 	} else {
+1042 	    throw new Error('you must specify a valid domId that' +
+1043 			    'is in your html page');
+1044 	}
+1045 
+1046 	if(!config.height && !config.width){
+1047 	    this.width = parseInt(this.node.getAttribute('width'), 10);
+1048 	    this.height = parseInt(this.node.getAttribute('height'), 10);
+1049 	}
+1050 
+1051 	return this;
+1052     },
+1053     /** Clear area of canvas element specified by parameters, if no
+1054      * parameters supplied, clears entire canvas
+1055      * @param {Number} [x=0] x coordinate, defaults to zero if left blank
+1056      * @param {Number} [y=0] y coordinate, defaults to zero if left blank  
+1057      * @param {Number} [width=0] width of area to be cleared, defaults 
+1058      * entire width of canvas
+1059      * @param {Number} [height=0] height of area to be cleared, defaults 
+1060      * entire height of canvas
+1061      * @returns this
+1062      * @example
+1063      * 
+1064      * k.canvas.ninja.clear();
+1065      * // clears the entire ninja canvas
+1066      * 
+1067      * k.canvas.ninja.clear(0, 10, 20, 30);
+1068      * //clears a specific portion of the ninja canvas
+1069      * 
+1070      */
+1071     clear : function ( x, y, width, height ) {
+1072 	var that = this;
+1073 	that.ctx.clearRect(
+1074 	    x || 0,
+1075 	    y || 0, 
+1076 	    width  || that.width, 
+1077 	    height || that.height
+1078 	);
+1079 	return that;
+1080     },
+1081   
+1082      /** The globalAlpha attribute gives an alpha value that is applied to shapes 
+1083      * and images before they are composited onto the canvas
+1084      * @param {Number} number in the range from 0.0 to 1.0
+1085      * @returns this
+1086      */
+1087     globalAlpha : function (attribute){
+1088 	var name = 'globalAlpha';
+1089 	this.ctx[name] = attribute;
+1090 	return this;
+1091     },
+1092  
+1093    /** Sets the globalCompositeOperation attribute, which sets how shapes and images 
+1094      * are drawn onto the existing bitmap, once they have had globalAlpha and the 
+1095      * current transformation matrix applied.
+1096      * For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1097      * @param {String} globalCompositeOperation source-atop, 
+1098      * source-in, source-out, 
+1099      * source-over, destination-atop, destination-in, destination-out, destination-over,
+1100      * lighter
+1101      * @returns this
+1102      */
+1103     globalCompositeOperation: function (attribute){
+1104 	var name = ' globalCompositeOperation';
+1105 	this.ctx[name] = attribute;
+1106 	return this;
+1107     },
+1108 
+1109     /** Sets the lineWidth attribute which gives the width of lines, in coordinate space 
+1110      * units.
+1111      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1112      * @param {Number} lineWidth
+1113      * @returns this
+1114      */
+1115     lineWidth: function (attribute){
+1116 	var name = 'lineWidth';
+1117 	this.ctx[name] = attribute;
+1118 	return this;
+1119     },
+1120     /** The lineCap attribute defines the type of endings that UAs will place on 
+1121      * the end of lines.  
+1122      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1123      * @param {String} type butt, round, square 
+1124      * @returns this
+1125      */
+1126     lineCap: function (attribute){
+1127 	var name = 'lineCap';
+1128 	this.ctx[name] = attribute;
+1129 	return this;
+1130     },
+1131     /** The lineJoin attribute defines the type of corners that UAs will place 
+1132      * where two lines meet. The three valid values are bevel, round, and miter. 
+1133      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1134      * @param {String} type
+1135      * @returns this
+1136      */
+1137     lineJoin: function (attribute){
+1138 	var name = 'lineJoin';
+1139 	this.ctx[name] = attribute;
+1140 	return this;
+1141     },
+1142    
+1143     /** Sets the miter limit 
+1144      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1145      * @param {Number} number
+1146      * @returns this
+1147      */
+1148     miterLimit: function (attribute){
+1149 	var name = 'miterLimit';
+1150 	this.ctx[name] = attribute;
+1151 	return this;
+1152     },
+1153     /** Sets the font property and takes the same syntax as setting the font property 
+1154      *  in CSS
+1155      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1156      * @param {String} 
+1157      * @returns this
+1158      */
+1159     font: function (attribute){
+1160 	var name = 'font';
+1161 	this.ctx[name] = attribute;
+1162 	return this;
+1163     },
+1164 
+1165     /** Changes the text alignment. The possible values are start, end, left, right, 
+1166      * and center. The default is start. Other values are ignored.
+1167      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1168      * @param {string} alignment 
+1169      * @returns this
+1170      */
+1171     textAlign: function (attribute){
+1172 	var name = 'textAlign';
+1173 	this.ctx[name] = attribute;
+1174 	return this;
+1175     },
+1176 
+1177     /** Changes the baseline alignment. If the value is one of top, hanging, middle, 
+1178      * alphabetic, ideographic, or bottom, then the value must be changed to the new value.
+1179      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1180      * @param {String} alignment
+1181      * @returns this
+1182      */
+1183     textBaseline: function (attribute){
+1184 	var name = 'textBaseline';
+1185 	this.ctx[name] = attribute;
+1186 	return this;
+1187     },
+1188     
+1189     /** Save the current state of the context
+1190      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1191      * @param 
+1192      * @returns this
+1193      */
+1194     save : function ( ){
+1195 	var name =  'save'; 
+1196 	this.ctx[name].apply(this.ctx, arguments);
+1197 	return this;
+1198     },
+1199     /** Restore the saved context
+1200      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1201      * @param 
+1202      * @returns this
+1203      */
+1204     restore : function ( ){
+1205 	var name =  'restore'; 
+1206 	this.ctx[name].apply(this.ctx, arguments);
+1207 	return this;
+1208     },
+1209      /** Perform a scale transformation
+1210      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1211      * @param 
+1212      * @returns this
+1213      */
+1214     scale : function ( ){
+1215 	var name =  'scale'; 
+1216 	this.ctx[name].apply(this.ctx, arguments);
+1217 	return this;
+1218     },
+1219    /** Perform a rotation transformation
+1220      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1221      * @param 
+1222      * @returns this
+1223      */
+1224     rotate : function ( ){
+1225 	var name =  'rotate'; 
+1226 	this.ctx[name].apply(this.ctx, arguments);
+1227 	return this;
+1228     },
+1229      /** Performa a translation transformation
+1230      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1231      * @param 
+1232      * @returns this
+1233      */
+1234     translate : function ( ){
+1235 	var name =  'translate'; 
+1236 	this.ctx[name].apply(this.ctx, arguments);
+1237 	return this;
+1238     },
+1239     
+1240     /** Transform the identity matrix
+1241      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1242      * @param 
+1243      * @returns this
+1244      */
+1245     transform : function ( ){
+1246 	var name =  'transform'; 
+1247 	this.ctx[name].apply(this.ctx, arguments);
+1248 	return this;
+1249     },
+1250     /** Set the transform
+1251      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1252      * @param 
+1253      * @returns this
+1254      */
+1255     setTransform : function ( ){
+1256 	var name =  'setTransform'; 
+1257 	this.ctx[name].apply(this.ctx, arguments);
+1258 	return this;
+1259     },
+1260     /** Clear a rectangular area 
+1261      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1262      * @param 
+1263      * @returns this
+1264      */
+1265     clearRect : function ( ){
+1266 	var name =  'clearRect'; 
+1267 	this.ctx[name].apply(this.ctx, arguments);
+1268 	return this;
+1269     },
+1270     /** Fill a rectangular area 
+1271      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1272      * @param 
+1273      * @returns this
+1274      */
+1275     fillRect : function ( ){
+1276 	var name =  'fillRect'; 
+1277 	this.ctx[name].apply(this.ctx, arguments);
+1278 	return this;
+1279     },
+1280       
+1281     /** Draw the outline of the rectangle
+1282      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1283      * @param 
+1284      * @returns this
+1285      */
+1286     strokeRect : function ( ){
+1287 	var name =  'strokeRect'; 
+1288 	this.ctx[name].apply(this.ctx, arguments);
+1289 	return this;
+1290     },
+1291     /** Begin a path 
+1292      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1293      * @param 
+1294      * @returns this
+1295      */
+1296     beginPath : function ( ){
+1297 	var name =  'beginPath'; 
+1298 	this.ctx[name].apply(this.ctx, arguments);
+1299 	return this;
+1300     },
+1301     /** End a path 
+1302      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1303      * @param 
+1304      * @returns this
+1305      */
+1306     closePath : function ( ){
+1307 	var name =  'closePath'; 
+1308 	this.ctx[name].apply(this.ctx, arguments);
+1309 	return this;
+1310     },
+1311     /** Move to specified coordinates 
+1312      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1313      * @param 
+1314      * @returns this
+1315      */
+1316     moveTo : function ( ){
+1317 	var name =  'moveTo'; 
+1318 	this.ctx[name].apply(this.ctx, arguments);
+1319 	return this;
+1320     },
+1321 
+1322 
+1323     /** Draw a line to the given coordinates 
+1324      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1325      * @param 
+1326      * @returns this
+1327      */
+1328     lineTo : function ( ){
+1329 	var name =  'lineTo'; 
+1330 	this.ctx[name].apply(this.ctx, arguments);
+1331 	return this;
+1332     },
+1333 
+1334     /** Draw a quadratic curve to given coordinates 
+1335      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1336      * @param 
+1337      * @returns this
+1338      */
+1339     quadraticCurveTo : function ( ){
+1340 	var name =  'quadraticCurveTo'; 
+1341 	this.ctx[name].apply(this.ctx, arguments);
+1342 	return this;
+1343     },
+1344     /** Draw a bezier curve to given coordinates 
+1345      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1346      * @param 
+1347      * @returns this
+1348      */
+1349     bezierCurveTo : function ( ){
+1350 	var name =  'bezierCurveTo'; 
+1351 	this.ctx[name].apply(this.ctx, arguments);
+1352 	return this;
+1353     },
+1354     /** Draw an arc to the given points
+1355      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1356      * @param 
+1357      * @returns this
+1358      */
+1359     arcTo : function ( ){
+1360 	var name =  'arcTo'; 
+1361 	this.ctx[name].apply(this.ctx, arguments);
+1362 	return this;
+1363     },
+1364     /** Create an arc 
+1365      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1366      * @param 
+1367      * @returns this
+1368      */
+1369     arc : function ( ){
+1370 	var name =  'arc'; 
+1371 	this.ctx[name].apply(this.ctx, arguments);
+1372 	return this;
+1373     },
+1374 
+1375     /** Create a rectangle 
+1376      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1377      * @param 
+1378      * @returns this
+1379      */
+1380     rect : function ( ){
+1381 	var name =  'rect'; 
+1382 	this.ctx[name].apply(this.ctx, arguments);
+1383 	return this;
+1384     },
+1385     /** fill in the current subpaths with the current fillstyle
+1386      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1387      * @param 
+1388      * @returns this
+1389      */
+1390     fill : function ( ){
+1391 	var name =  'fill'; 
+1392 	this.ctx[name].apply(this.ctx, arguments);
+1393 	return this;
+1394     },
+1395     /** Stroke the subpaths
+1396      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1397      * @param 
+1398      * @returns this
+1399      */
+1400     stroke : function ( ){
+1401 	var name =  'stroke'; 
+1402 	this.ctx[name].apply(this.ctx, arguments);
+1403 	return this;
+1404     },
+1405     
+1406     /** description 
+1407      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1408      * @param 
+1409      * @returns this
+1410      */
+1411     clip : function ( ){
+1412 	var name =  'clip'; 
+1413 	this.ctx[name].apply(this.ctx, arguments);
+1414 	return this;
+1415     },
+1416     /** description 
+1417      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1418      * @param 
+1419      * @returns this
+1420      */
+1421     fillText : function ( ){
+1422 	var name =  'fillText'; 
+1423 	this.ctx[name].apply(this.ctx, arguments);
+1424 	return this;
+1425     },
+1426     /** description 
+1427      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1428      * @param 
+1429      * @returns this
+1430      */
+1431     strokeText : function ( ){
+1432 	var name =  'strokeText'; 
+1433 	this.ctx[name].apply(this.ctx, arguments);
+1434 	return this;
+1435     },
+1436     /** description 
+1437      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1438      * @param 
+1439      * @returns this
+1440      */
+1441     measureText : function ( ){
+1442 	var name =  'measureText'; 
+1443 	this.ctx[name].apply(this.ctx, arguments);
+1444 	return this;
+1445     },
+1446     /** description 
+1447      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1448      * @param 
+1449      * @returns this
+1450      */
+1451     isPointInPath : function ( ){
+1452 	var name =  'isPointInPath'; 
+1453 	this.ctx[name].apply(this.ctx, arguments);
+1454 	return this;
+1455     },
+1456     
+1457     /** Sets the stroke style 
+1458      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1459      * @param 
+1460      * @returns this
+1461      */
+1462     strokeStyle: function (attribute){
+1463 	var name = 'strokeStyle';
+1464 	this.ctx[name] = attribute;
+1465 	return this;
+1466     },
+1467 
+1468     /** Sets the fill style
+1469      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1470      * @param 
+1471      * @returns this
+1472      */
+1473     fillStyle: function (attribute){
+1474 	var name = 'fillStyle';
+1475 	this.ctx[name] = attribute;
+1476 	return this;
+1477     },
+1478      /** description 
+1479      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1480      * @param 
+1481      * @returns this
+1482      */
+1483     createLinearGradient : function ( ){
+1484 	var name =  'createLinearGradient'; 
+1485 	this.ctx[name].apply(this.ctx, arguments);
+1486 	return this;
+1487     },
+1488     /** description 
+1489      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1490      * @param 
+1491      * @returns this
+1492      */
+1493     createRadialGradient : function ( ){
+1494 	var name =  'createRadialGradient'; 
+1495 	this.ctx[name].apply(this.ctx, arguments);
+1496 	return this;
+1497     },
+1498     /** description 
+1499      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1500      * @param 
+1501      * @returns this
+1502      */
+1503     createPattern : function ( ){
+1504 	var name =  'createPattern'; 
+1505 	this.ctx[name].apply(this.ctx, arguments);
+1506 	return this;
+1507     },
+1508      /** description 
+1509      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1510      * @param 
+1511      * @returns this
+1512      */
+1513     shadowOffsetX: function (attribute){
+1514 	var name = 'shadowOffsetX';
+1515 	this.ctx[name] = attribute;
+1516 	return this;
+1517     },
+1518     /** description 
+1519      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1520      * @param 
+1521      * @returns this
+1522      */
+1523     shadowOffsetY: function (attribute){
+1524 	var name = 'shadowOffsetY';
+1525 	this.ctx[name] = attribute;
+1526 	return this;
+1527     },
+1528     /** description 
+1529      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1530      * @param 
+1531      * @returns this
+1532      */
+1533     shadowBlur: function (attribute){
+1534 	var name = 'shadowBlur';
+1535 	this.ctx[name] = attribute;
+1536 	return this;
+1537     },
+1538     /** description 
+1539      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1540      * @param 
+1541      * @returns this
+1542      */
+1543     shadowColor: function (attribute){
+1544 	var name = 'shadowColor';
+1545 	this.ctx[name] = attribute;
+1546 	return this;
+1547     },
+1548    /** description 
+1549      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1550      * @param 
+1551      * @returns this
+1552      */
+1553     drawImage : function ( ){
+1554 	var name =  'drawImage'; 
+1555 	this.ctx[name].apply(this.ctx, arguments);
+1556 	return this;
+1557     },
+1558     /** description 
+1559      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1560      * @param 
+1561      * @returns this
+1562      */
+1563     getImageData : function ( ){
+1564 	var name =  'getImageData'; 
+1565 	this.ctx[name].apply(this.ctx, arguments);
+1566 	return this;
+1567     },
+1568     /** description 
+1569      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1570      * @param 
+1571      * @returns this
+1572      */
+1573     putImageData : function ( ){
+1574 	var name =  'putImageData'; 
+1575 	this.ctx[name].apply(this.ctx, arguments);
+1576 	return this;
+1577     },
+1578     /** description 
+1579      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1580      * @param 
+1581      * @returns this
+1582      */
+1583     createImageData : function ( ){
+1584 	var name =  'createImageData'; 
+1585 	this.ctx[name].apply(this.ctx, arguments);
+1586 	return this;
+1587     },
+1588     /** description 
+1589      *  For full details see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-globalcompositeoperation">W3C docs</a>
+1590      * @param 
+1591      * @returns this
+1592      */
+1593     drawWindow : function ( ){
+1594 	var name =  'drawWindow'; 
+1595 	this.ctx[name].apply(this.ctx, arguments);
+1596 	return this;
+1597     },
+1598     
+1599 
+1600  
+1601    
+1602 };
+1603 
+1604 
+1605 /** Prototype object for each svg element submitted to Karma in the
+1606  * Karma() method
+1607  * @throws {Error} if the name and domId for the svg element are not specified
+1608  * @thows {Error} if the supplied domId does not match an element in the DOM
+1609  * @class This object is the prototype for each svg element submitted to Karma in the
+1610  * Karma() method
+1611  */
+1612 Karma.kSvg = {
+1613     /** name of instance, used internally 
+1614      * @typeof string
+1615      * @default ""
+1616      */
+1617     name : "",
+1618     /** width of element 
+1619      * @type number
+1620      * @default 0
+1621      */
+1622     width: 0,
+1623     /** height of element 
+1624      * @type number
+1625      * @default 0
+1626      */
+1627     height: 0,
+1628     /** Status of element, either "loaded" or "error"
+1629      * @type string
+1630      * @default ""
+1631      */
+1632     status: "",
+1633     /**  Whether canvas is visible. This value is read-only
+1634      * @type boolean
+1635      * @default true
+1636      */
+1637     visible: true,
+1638     /** Element ID for canvas element in html document. 
+1639      * @type String
+1640      * @default undefined
+1641      */
+1642     domId: undefined,
+1643     /** Reference to the DOM element.
+1644      * @type DOMElement
+1645      * @default undefined
+1646      * @example 
+1647      * //You can access all properties and methods of the underlying DOM element
+1648      * //using the 'node' property
+1649      * Karma.svg.someSvg.node.dispatchEvent;
+1650      * Karma.svg.someSvg.node.addEvenListener(...);
+1651      */
+1652     node: undefined,
+1653     /** Reference to the SVGDocument. You can use the this.doc to manipulate 
+1654      * the SVG document 
+1655      * @type SVGDocument
+1656      * @default undefined
+1657      * @example
+1658      * var myElem = Karma.svg.someSvg.doc.getElementById('foobar');
+1659      * Karma.svg.someSvg.doc.createElement(...);
+1660      * Karma.svg.someSvg.doc.removeChild(someNode);
+1661      *     
+1662      */
+1663     doc: undefined,
+1664     /** Reference to the root element of the SVG Document 
+1665      * @type DocumentElement
+1666      * @default undefined
+1667      * @example
+1668      * // The root element is equivalent to "document" in a regular html document
+1669      * // The root attribute is used frequently with the jQuery SVG plugin for CSS selectors
+1670      * $('#someId', Karma.svg.someSvg.root).css(.. manipulate css attributes ...);
+1671      */
+1672     root: undefined,
+1673     _localized : undefined,
+1674     _init: function (config) {
+1675 	Karma._counters.total++;
+1676 
+1677 	for (var option in config){
+1678 	    if (config.hasOwnProperty(option)){
+1679 		switch (option){
+1680 		case "name":
+1681 		    this.name = config[option];
+1682 		    break;
+1683 		case "domId":
+1684 		    this.domId = config[option];
+1685 		    break;
+1686 		case "width":
+1687 		    if(!this.height){
+1688 			throw new Error("If you specify a width you must also" +
+1689 					"specify a height");
+1690 		    }
+1691 		    this.width = parseInt(config[option], 10);
+1692 		    break;
+1693 		case "height":
+1694 		    if(!this.width){
+1695 			throw new Error("If you specify a height you must also" +
+1696 					"specify a width");
+1697 		    }
+1698 		    this.height = config[option];
+1699 		    break;
+1700 		}
+1701 	    }
+1702 	}
+1703 	
+1704 	if(this.domId && document.getElementById(this.domId)){
+1705 	       	this.node = document.getElementById(this.domId);
+1706 	} else {
+1707 	    throw new Error('you must specify a valid domId that' +
+1708 			    'is in your html page');
+1709 	}
+1710 
+1711 	if(!config.height && !config.width){
+1712 	    this.width = parseInt(this.node.getAttribute('width'), 10);
+1713 	    this.height = parseInt(this.node.getAttribute('height'), 10);
+1714 	}
+1715 	
+1716 	var that = this;
+1717 	that._addEventHandlers();
+1718 		   
+1719 	return this;
+1720 	
+1721 	
+1722     },
+1723     _addEventHandlers : function () {
+1724 	var that = this;	
+1725 	that.doc = that.node.getSVGDocument();	
+1726 	that.node.addEventListener(
+1727 		"load", 
+1728 	    function (e) { 
+1729 		that.doc = that.node.getSVGDocument();    
+1730 		that.root = that.doc.documentElement;
+1731 		Karma._counters.loaded++;
+1732 		Karma._updateStatus();
+1733 		that.status = "loaded";
+1734 	    }, false);
+1735 
+1736 	that.node.addEventListener(
+1737 	    "error", 
+1738 	    function (e) { 
+1739 		Karma._counters.loaded--;
+1740 		Karma._counters.errors++;
+1741 		that.status = "error";
+1742 		var errorMsg = "Error: " + that._type.toUpperCase() +
+1743 		    " " + that.name + " cannot be loaded."; 
+1744 		Karma._updateStatus(errorMsg);
+1745 	    }, 
+1746 	    false);
+1747 	that.node.addEventListener(
+1748 	    "abort", 
+1749 	    function (e) { 
+1750 		that.status = "aborted";
+1751 		var errorMsg = "ABORT: " + that._type.toUpperCase() +
+1752 		    " " + that.name + " loading was aborted."; 
+1753 		Karma._updateStatus(errorMsg);
+1754 
+1755 	    }, false);
+1756 
+1757     }
+1758 };
+1759 
\ No newline at end of file diff --git a/docs/symbols/src/js_ui.feedback.js.html b/docs/symbols/src/js_ui.feedback.js.html new file mode 100755 index 0000000..4347818 --- /dev/null +++ b/docs/symbols/src/js_ui.feedback.js.html @@ -0,0 +1,144 @@ +
  1 /**
+  2 * @fileOverview a scoreboard widget
+  3 * @author Bryan Berry <bryan@olenepal.org> 
+  4 *  uses MIT License
+  5 */
+  6 
+  7 
+  8 
+  9 (function($){
+ 10 
+ 11      // This is a dummy function, just here as placeholder to
+ 12      // to make the jsdoc tool happy
+ 13      /** @name $.ui.feedback
+ 14       * @namespace Feedback widget
+ 15       */
+ 16      $.ui.feedback = function(){};
+ 17 
+ 18      $.widget('ui.feedback',
+ 19 	      /** @lends $.ui.feedback.prototype */
+ 20 	      {
+ 21 		  /** Displays the correct icon in the center of the screen
+ 22 		   *  and plays the sound "correct" if loaded
+ 23 		   */
+ 24 		  correct: function(){
+ 25 		      var $correct = this.$correct.css('display','block');
+ 26 		      setTimeout ( function() {
+ 27 				       $correct.fadeOut(500);
+ 28 				   }, 500);
+ 29 		      if (Karma && Karma.audio && Karma.audio.correct){
+ 30 			  Karma.audio.correct.play();
+ 31 		      }
+ 32 		      
+ 33 		  },
+ 34 		  /** Displays the incorrect icon in the center of the screen
+ 35 		   *  and plays the sound "incorrect" if loaded
+ 36 		   */
+ 37 		  incorrect: function(){
+ 38 		      
+ 39 		      var $incorrect = this.$incorrect.css('display','block');
+ 40 		      setTimeout ( function() {
+ 41 				       $incorrect.fadeOut(500);
+ 42 				   }, 500);
+ 43 
+ 44 		      //this.$incorrect.css('display','block').fadeOut(3000);
+ 45 		      if (Karma && Karma.audio && Karma.audio.incorrect){
+ 46 			  Karma.audio.incorrect.play();
+ 47 		      }
+ 48 		      
+ 49 		  },
+ 50 		  /** Display a happy face and text that says "You win!"
+ 51 		   * 
+ 52 		   */
+ 53 		  win: function(){
+ 54 		      this.$win.show();
+ 55 		      this.$overlay.show();
+ 56 		  },
+ 57 		  /** Display an unhappy face and text that says "You lose!"
+ 58 		   * 
+ 59 		   */
+ 60 		  lose: function(){
+ 61 		      this.$lose.show();
+ 62 		      this.$overlay.show();
+ 63 		  },
+ 64 		  _init : function(){
+ 65 		      var self = this;
+ 66 		      
+ 67 		      this.element
+ 68 			  .addClass('ui-feedback')
+ 69 			  .css({position:'absolute', 
+ 70 				top: '40%', left: '40%'});
+ 71 		      
+ 72 		      this.$correct = $('<div></div>')
+ 73 			  .addClass('ui-feedback-correct')
+ 74 			  .appendTo(this.element);
+ 75 
+ 76 		      this.$incorrect = $('<div></div>')
+ 77 			  .addClass('ui-feedback-incorrect')
+ 78 			  .appendTo(this.element);
+ 79 		      
+ 80 		      this.$win = $("<div class='ui-feedback-over'>" +
+ 81 				     "<div class='ui-feedback-win'></div>" +
+ 82 				     "<div class='ui-feedback-txt'>You win!" +
+ 83 				     "</div></div>")
+ 84 				    .click(
+ 85 					function(){
+ 86 					    self.$win.hide();
+ 87 					    self.$overlay.hide();
+ 88 					}
+ 89 				    )
+ 90 				    .appendTo(this.element);
+ 91 
+ 92 		      this.$lose = $("<div class='ui-feedback-over'>" +
+ 93 				     "<div class='ui-feedback-lose'></div>" +
+ 94 				     "<div class='ui-feedback-txt'>You lose!" +
+ 95 				     "</div></div>")
+ 96 				     .click(
+ 97 					 function(){
+ 98 					     self.$lose.hide();
+ 99 					     self.$overlay.hide();
+100 					 }
+101 				     )
+102 				     .appendTo(this.element);
+103 		      
+104 		      this.$overlay = $('<div></div>')
+105 			  .addClass('ui-feedback-overlay')
+106 			  .appendTo($('body'));
+107 
+108 		      
+109 
+110 		      $('body')
+111 			  .bind('feedbackCorrect', function(){
+112 				    self.correct();
+113 				})
+114 			  .bind('feedbackIncorrect', function(){
+115 				    self.incorrect();
+116 				});
+117 		     
+118 		  },
+119 		  /** Removes the feedback widget and all related data from the DOM */
+120 		  destroy : function(){
+121 		      this.element.remove();
+122 		      $.widget.prototype.destroy.apply(this, arguments);
+123 		  }
+124 
+125 		  
+126 	      });
+127 
+128 	      $.ui.feedback.getter = [];
+129 		
+130 		/** Default settings for the feedback widget
+131 		 * @namespace Default settings for the feedback widget
+132 		 * @extends $.ui.feedback
+133 		 */			   
+134 	      $.ui.feedback.defaults = {
+135 	      };
+136 
+137  })(jQuery);
\ No newline at end of file diff --git a/docs/symbols/src/js_ui.kFooter.js.html b/docs/symbols/src/js_ui.kFooter.js.html new file mode 100755 index 0000000..e92f416 --- /dev/null +++ b/docs/symbols/src/js_ui.kFooter.js.html @@ -0,0 +1,369 @@ +
  1 /**
+  2 * @fileOverview a footer widget 
+  3 * @author Bryan Berry <bryan@olenepal.org> 
+  4 *  uses MIT License
+  5 */
+  6 
+  7 
+  8 
+  9 (function($){
+ 10 
+ 11      // This is a dummy function, just here as placeholder to
+ 12      // to make the jsdoc tool happy
+ 13      /** @name $.ui.kFooter
+ 14       * @namespace kFooter widget 
+ 15       * @example Emits the event kFooterWinGame when the maxScore is reached <br />
+ 16       * Emits the event kFooterRestart when game restarted <br />
+ 17       * Start button emits kFooterStart event when clicked <br />
+ 18       * Restart button emits kFooterRestart event when clicked <br />
+ 19       * Pause button emits the kFooterPause event when clicked <br />
+ 20       */
+ 21      $.ui.kFooter = function(){};
+ 22 
+ 23      $.widget('ui.kFooter',
+ 24 	      /** @lends $.ui.kFooter.prototype */
+ 25 	      {
+ 26 		  /** Gets the current score
+ 27 		   * @returns {Number} current score
+ 28 		   */
+ 29 		  getScore : function(){
+ 30 		      return this._getData('score');
+ 31 		  },
+ 32 		   /** Sets the current score
+ 33 		   * @param {Number} newScore new score
+ 34 		   */
+ 35 		  setScore : function(newScore){
+ 36 		      this._setData('score', parseInt(newScore));
+ 37 		      this._refresh();
+ 38 		  },
+ 39 		  /** Gets the current total
+ 40 		   * @returns {Number} current total
+ 41 		   */
+ 42 		  getTotal : function(){
+ 43 		      return this._getData('total');
+ 44 		  },
+ 45 		  /** Sets the current total
+ 46 		   * @param {Number} newTotal new total
+ 47 		   */
+ 48 		  setTotal : function(newTotal){
+ 49 		      this._setData('total', parseInt(newTotal));
+ 50 		      this._refresh();  
+ 51 		  },
+ 52 		  /**
+ 53 		   * Resets the score and total to initial values and triggers 
+ 54 		   * the "kFooterRestart" event
+ 55 		   */
+ 56 		  restart : function(){
+ 57 		      this.element.trigger('kFooterRestart');
+ 58 		      this._setData('score', this._getData('initialScore'));
+ 59 		      this._setData('total', this._getData('initialTotal'));
+ 60 		      this._refresh();
+ 61 		  },
+ 62 		  /** Increments the score by 1 or by the supplied numeric argument
+ 63 		   * @param {Number} [val] increment value
+ 64 		   */
+ 65 		  inc : function(val){
+ 66 		      var incVal = parseInt(val) || 1;
+ 67 		      this._setData('score',  this._getData('score') + incVal);
+ 68 		      this._refresh();
+ 69 		      if(this._getData('winScore') === this._getData('score')){
+ 70 			  this.element.trigger('kFooterWinGame');
+ 71 		      }
+ 72 		  },
+ 73 		   /** Increments the total by 1 or by the supplied numeric argument
+ 74 		   * @param {Number} [val] increment value
+ 75 		   */
+ 76 		  incTotal : function(val){
+ 77 		      var incVal = parseInt(val) || 1;
+ 78 		      this._setData('total',  this._getData('total') + incVal);
+ 79 		      this._refresh();
+ 80 		  },
+ 81 		   /** Decrements the score by 1 or by the supplied numeric argument
+ 82 		   * @param {Number} [val] decrement value
+ 83 		   */
+ 84 		  dec : function(val){
+ 85 		      var decVal = parseInt(val) || 1;
+ 86 		      this._setData('score',  this._getData('score') - decVal);
+ 87 		      this._refresh();
+ 88 		  },
+ 89 		   /** Decrements the total by 1 or by the supplied numeric argument
+ 90 		   * @param {Number} [val] decrement value
+ 91 		   */
+ 92 		  decTotal : function(val){
+ 93 		      var decVal = parseInt(val) || 1;
+ 94 		      this._setData('total',  this._getData('total') - decVal);
+ 95 		      this._refresh();
+ 96 		  },
+ 97 		  /** Start the timer, defaults to 0:00 if no arguments supplied
+ 98 		   * @param {Number} [minutes] value for minutes, default to 0
+ 99 		   * @param {Number} [seconds]  value for seconds, default to 0 
+100 		   */ 
+101 		  startTimer : function(minutes, seconds){
+102 		      var timerRunning = this._getData('timerRunning')|| false;
+103 
+104 		      if (this._$timer && timerRunning === false){
+105 			  var mins = minutes || 0;
+106 			  var secs = seconds || 0;
+107 			  var timerId = null;
+108 			  var self = this;
+109 		      
+110 		      
+111 			  this._setData('mins', mins);
+112 			  this._setData('secs', secs);
+113 
+114 			  var addLeadingZero = function(num){
+115 			      if(''.concat(num).length === 1){
+116 				  return "0".concat(num);
+117 			      } else {
+118 				  return num;
+119 			      }
+120 			    
+121 			  };
+122 
+123 			  var increaseTimer = function(){
+124 			      if (self._getData('timerRunning') === false){
+125 				  return;
+126 			      }
+127 
+128 			      var s = self._getData('secs') + 1;
+129 			      var m = null;
+130 			      var timerId = null;
+131 					  
+132 			      if (s < 60) {
+133 				  self._setData('secs', s);
+134 				  self._$timerSecs.text(self._n(addLeadingZero(s)));
+135 			      } else {
+136 				  s = 0;
+137 				  m = self._getData('mins') + 1;
+138 				  self._$timerSecs.text(self._n(addLeadingZero(s)));
+139 				  self._$timerMins.text(self._n(addLeadingZero(m)));
+140 				  self._setData('secs', s);
+141 				  self._setData('mins', m);
+142 			      }
+143 				      
+144 			      timerId = setTimeout(increaseTimer, 1000);
+145 			      self._setData('timerId', timerId);
+146 
+147 			  };
+148 			  
+149 			  timerId = setTimeout(increaseTimer , 1000);
+150 
+151 			  this._setData('timerRunning', true);
+152 			  this._setData('timerId', timerId);
+153 		      }
+154 		  },
+155 		  /** Stop the timer
+156 		   */
+157 		  stopTimer : function(){
+158 		      this._setData('timerRunning', false);
+159 		  },
+160 		  _ : function(val, loc){
+161 		      return $.i18n.call($.ui.kFooter, val, loc);
+162 		  },
+163 		  _n : function(val, loc){
+164 		      return $._n(val, loc);
+165 		  },
+166 		  _init : function(){
+167 
+168 		      var divDisplay = "inline";
+169 		      var score = this.options.score;
+170 		      var total = this.options.total;
+171 		      var self = this;
+172 		      
+173 		      var options = $.extend({}, $.ui.kFooter.defaults, this.options);
+174 
+175 		      this._setData('initialScore', parseInt(options.score));
+176 		      this._setData('initialTotal', parseInt(options.total));
+177 		      this._setData('score', parseInt(options.score));
+178 		      this._setData('total', parseInt(options.total)); 
+179 		      this._setData('winScore', parseInt(options.winningScore)); 
+180 		      this._setData('locale', options.locale);
+181 
+182 		     
+183 		      this.element.addClass('ui-widget ui-widget-content ' +
+184 			      ' ui-kFooter');
+185 		      
+186 		      
+187 		      var $kFooter = $("<ul></ul>");
+188 		     
+189 		      
+190 		      if(options.scoreboard === true){
+191 			  
+192 			  var $scoreboard = $("<li class='left'>" + this._("Score") + 
+193 			      "</li>" + "<li class='left'>" +
+194 			      "<span id='kFooterScore' class='ui-corner-all number'>" + 
+195 			      this._n(score) + "</span></li>" +
+196 			      "<li class='left'>" + this._("Total") + "</li>" +
+197 			      "<li class='left'><span id='kFooterTotal' " +
+198 			      "class='ui-corner-all number'>" + 
+199 			  this._n(total) + "</span></li>")
+200 			      .appendTo($kFooter);
+201 			 
+202 			  this._score = $('#kFooterScore', $scoreboard);
+203 			  this._total = $('#kFooterTotal', $scoreboard);
+204 
+205 		      }
+206 
+207 		      if(options.timer === true){
+208 			  this._$timer = $("<li class='left'>" + this._("Timer") + 
+209 			      "</li>" +
+210 			      "<li class='left'><span id='kFooterMins'" + 
+211 			      "class='ui-corner-all" +
+212 			      " number timer'>" + this._n("00") + 
+213 			      "</span></li>" +
+214 			      "<li class='left'><span id='kFooterSecs'" + 
+215 			      "class='ui-corner-all " +
+216 			      "number timer'>"+ this._n("00") + 
+217 			      "</span></li>")
+218 			      .appendTo($kFooter);
+219 
+220 			  this._$timerMins = $('#kFooterMins', this._$timer);
+221 			  this._$timerSecs = $('#kFooterSecs', this._$timer);		     
+222 		      }
+223 
+224 		      //if options.checkAnswerBtn === true
+225 			 
+226 		      if (options.restartButton === true){
+227 			  var $restartButton = $("<li class='right'><button " +
+228 			      "class='ui-corner-all ui-state-default'>" +
+229  			      "<span class='ui-icon ui-icon-arrowrefresh-1-w'>" +
+230 			      "</span>" + 
+231 			      "<span class='text left'>" + this._('Play Again') + 
+232 			      "</span></button></li>")
+233 			      .click(function(){ 
+234 					 self.startTimer();
+235 					 self.restart();
+236 				     })
+237 			      .appendTo($kFooter);
+238 		      }
+239 		      
+240 		       if (options.pauseButton === true){
+241 			  var $pauseButton = $("<li class='right'><button " +
+242 			      "class='ui-corner-all ui-state-default'>" +
+243  			      "<span class='ui-icon ui-icon-pause'>" +
+244 			      "</span>" + 
+245 			      "<span class='text left'>" + this._('Pause') + 
+246 			      "</span></button></li>")
+247 			      .click(function(){ 
+248 					 self.stopTimer();
+249 					 self.element.trigger('kFooterPause'); 
+250 				     })
+251 			      .appendTo($kFooter);
+252 		      }
+253 
+254 		      if (options.startButton === true){
+255 			  var $startButton = $("<li class='right'><button " +
+256 			      "class='ui-corner-all ui-state-default'>" +
+257  			      "<span class='ui-icon ui-icon-play'>" +
+258 			      "</span>" + 
+259 			      "<span class='text left'>" + this._('Start') + 
+260 			      "</span></button></li>")
+261 			      .click(function(){ 
+262 				      self.startTimer();
+263 				      self.element.trigger('kFooterStart'); 
+264 				     })
+265 			      .appendTo($kFooter);
+266 		      }
+267 		  
+268 		      $('button', $kFooter).hover(
+269 			      function(){ 
+270 				  $(this).addClass("ui-state-hover"); 
+271 			      },
+272 			      function(){ 
+273 				  $(this).removeClass("ui-state-hover"); 
+274 			      });
+275 		      
+276 		      
+277 		      // Check if any html w/in this.element, if so wrap it in <li> </li>
+278 		      // and add to $kFooter later
+279 		      var $userHtml = this.element
+280 			  .children()
+281 			  .appendTo($kFooter);
+282 			  
+283 
+284 		      $userHtml.wrap('<li class="left"></li>');
+285 
+286 		      //get rid of userHtml
+287 		      this.element.empty();
+288 		      
+289 		      this.element.append($kFooter);
+290 		      
+291 		  },
+292 		  _refresh : function(){
+293 		      this._score.text(this._n(this._getData('score')));
+294 		      this._total.text(this._n(this._getData('total')));
+295 		  },
+296 		  /** Removes the kFooter widget and all related data from the DOM */
+297 		  destroy : function(){
+298 		      this.element.remove();
+299 		      $.widget.prototype.destroy.apply(this, arguments);
+300 		  }
+301 
+302 		  
+303 	      });
+304 
+305 	      $.ui.kFooter.getter = ['getScore', 'getTotal', '_n', '_' ];
+306 
+307 	      $.ui.kFooter.i18n = {};
+308 
+309 		
+310 		/** Default settings for the kFooter widget
+311 		 * @namespace Default settings for the kFooter widget
+312 		 * @extends $.ui.kFooter
+313 		 */			   
+314 	      $.ui.kFooter.defaults = {
+315                   /** Initial score
+316 		   * @type Number 
+317 		   * @default 0
+318 		   */
+319 		  score: 0, 
+320 		  /** Initial total
+321 		   * @type Number
+322 		   * @default 0
+323 		   */
+324 		  total: 0, 
+325 		  /** The score that will win the game
+326 		   * @type Number
+327 		   * @default 0
+328 		   */
+329 		  winningScore: 0,
+330 		  /** Default locale, valid options are "en" and "ne" 
+331 		   * @type String
+332 		   * @default "en"
+333 		   */
+334 		  locale: "ne",
+335 		  /** Display the scoreboard
+336 		   * @type boolean
+337 		   * @default true
+338 		   */
+339 		  scoreboard: true,
+340 		  /** Display the Start Button
+341 		   * @type boolean
+342 		   * @default false
+343 		   */
+344 		  startButton: false,
+345 		  /** Display the Retart Button
+346 		   * @type boolean
+347 		   * @default true
+348 		   */
+349 		  restartButton: true,
+350 		  /** Display the Pause Button
+351 		   * @type boolean
+352 		   * @default false
+353 		   */
+354 		  pauseButton: false,
+355 		  /** Display the timer
+356 		   * @type boolean
+357 		   * @default false
+358 		   */
+359 		  timer: false
+360 	      };
+361 
+362  })(jQuery);
\ No newline at end of file diff --git a/docs/symbols/src/js_ui.kHeader.js.html b/docs/symbols/src/js_ui.kHeader.js.html new file mode 100644 index 0000000..c01b922 --- /dev/null +++ b/docs/symbols/src/js_ui.kHeader.js.html @@ -0,0 +1,242 @@ +
  1 /**
+  2 * @fileOverview a Header widget
+  3 * @author Bryan Berry <bryan@olenepal.org> 
+  4 *  uses MIT License
+  5 */
+  6 
+  7 
+  8 
+  9 (function($){
+ 10 
+ 11      // This is a dummy function, just here as placeholder to
+ 12      // to make the jsdoc tool happy
+ 13      /** @name $.ui.kHeader
+ 14       * @namespace kHeader widget 
+ 15       * @example  
+ 16       */
+ 17      $.ui.kHeader = function(){};
+ 18 
+ 19      $.widget('ui.kHeader',
+ 20 	      /** @lends $.ui.kHeader.prototype */
+ 21 	      {	  _ : function(val, loc){
+ 22 		      if($.i18n){
+ 23 			  return $.i18n.call($.ui.kHeader, val, loc);
+ 24 		      }
+ 25 		      return val;
+ 26 		  },
+ 27 		  _n : function(val, loc){
+ 28 		      if ($.i18n){
+ 29 			  return $._n(val, loc);
+ 30 		      }
+ 31 		      return val;
+ 32 		  },
+ 33 
+ 34 		  _init : function(){		      
+ 35 		      var options = $.extend({}, $.ui.kHeader.defaults, this.options);
+ 36 		     
+ 37 		      this.element.addClass('ui-widget ui-widget-content');
+ 38 
+ 39 		      var $kHeader = $("<ul></ul>");
+ 40 		      
+ 41 		      var backLink = "#";
+ 42 		      var urlParams = window.location.search.slice(1).split('&');
+ 43 		      if (urlParams){
+ 44 			  backLink = urlParams[0].split('=')[1];
+ 45 		      }
+ 46 			  
+ 47 		      var $backBtn = $("<li class='left'> <a href='" + backLink + 
+ 48 			      "' class='kHeader-btn kHeader-back'></a></li>")
+ 49 			      .appendTo($kHeader);
+ 50 		      
+ 51 		      var $lessonTitle = $("<li class='left kHeader-title'>" + 
+ 52 			      "<span>" + options.title + 
+ 53 			      "</span></li>")
+ 54 			      .appendTo($kHeader);
+ 55 		      
+ 56 		      
+ 57 
+ 58 		      if (options.lessonPlan || options.teacherNote){
+ 59 			  
+ 60 			  var $dropDownArrow = $("<span class='kHeader-kDoc right'>" +
+ 61 			      "</span>")
+ 62 			      .appendTo($lessonTitle);
+ 63 
+ 64 			  var $dropDownArea = $("<div class='drop-down'></div>");
+ 65 			  
+ 66 			  if (options.lessonPlan){
+ 67 			      $("<div>" + 
+ 68 				"<a href='./kDoc.html?back=index.html&doc=lessonPlan'>" + 
+ 69 				this._("Lesson Plan") + "</a></div>")
+ 70 				.appendTo($dropDownArea);
+ 71 			  }
+ 72 
+ 73 			  if (options.teachersNote){
+ 74 			      $("<div>" + 
+ 75 				"<a href='./kDoc.html?back=index.html&doc=teachersNote'>" + 
+ 76 				this._("Teacher's Note") + "</a></div>")
+ 77 				.appendTo($dropDownArea);
+ 78 			  }
+ 79 			  
+ 80 			  $dropDownArea.appendTo($dropDownArrow);
+ 81 			  
+ 82 			   $dropDownArrow.hover(
+ 83 			      function(){				  
+ 84 				  $dropDownArea.show();
+ 85 			      },
+ 86 			      function(){
+ 87 				  $dropDownArea.hide();
+ 88 			      }
+ 89 			      );
+ 90 			  
+ 91 		      }
+ 92 
+ 93 		      if(options.zoom === true){
+ 94 			  
+ 95 			  var iframeScale = 1.0;
+ 96 			  var translateY = 0;
+ 97 			  var getIframeStyle = function(){
+ 98 			         return window.frames[0].document.body.style;
+ 99 			  };
+100 
+101 			  var zoomIn = function(){
+102 			      var iframeStyle = getIframeStyle();
+103 			      iframeScale = iframeScale + 0.1;
+104 			      translateY = translateY + 50;
+105 			      var scale = 'scale(' + iframeScale + ')';
+106 			      var translate = "translate(0px, " + translateY + "px)";
+107 
+108 			      iframeStyle.MozTransform = scale + ' ' + translate;
+109 			      iframeStyle.WebkitTransform = scale + ' ' + translate;
+110  			  };
+111 
+112 			  var zoomOut = function(){
+113 			      var iframeStyle = getIframeStyle();
+114 			      iframeScale = iframeScale - 0.1;
+115 			      translateY = translateY - 50;
+116 			      
+117 			      var scale = 'scale(' + iframeScale + ')';
+118 			      var translate = "translate(0px, " + translateY + "px)";
+119 
+120 
+121 			      iframeStyle.MozTransform = scale + ' ' + translate;
+122 			      iframeStyle.WebkitTransform = scale + ' ' + translate;
+123 
+124 			  };
+125 
+126 			  $("<li class='left kHeader-zoomIn kHeader-btn'>" +
+127 			      " </li>")
+128 			      .click(zoomIn)
+129 			      .appendTo($kHeader);
+130 
+131 			  $("<li class='left kHeader-zoomOut " + 
+132 				  "kHeader-btn'> </li>")
+133 			      .click(zoomOut)
+134 			      .appendTo($kHeader);
+135 		      }
+136 
+137 		      
+138 		      
+139 		      if($('#' + options.help).length){
+140 			  if($.ui.dialog){
+141 			      var $help = $('#'+ options.help)
+142 					      .dialog({
+143 						  position:[ "right", "top"], 
+144 						  modal:'true',autoOpen:false,width:500,
+145 						  height: 400,
+146 						  dialogClass: 'kHeader-help'
+147 					      });
+148 			  } else {
+149 			      
+150 			      if(console){
+151 				  console.log("You need to add the jQuery UI dialog" +
+152 					      " widget in order to use Help feature.");
+153 			      }
+154 			  }
+155 
+156 		      }
+157 
+158 		      $("<li class='right'> <a href='#'"  +
+159 			      "' class='kHeader-btn kHeader-help'></a></li>")
+160 			      .click(function(){ 
+161 					 if($.ui.dialog && $help){
+162 					     $help.dialog('open');
+163 					 }
+164 				     })
+165 			      .appendTo($kHeader);
+166 		      
+167 
+168 		      $("<li class='right'> <a href='http://olenepal.org'"  +
+169 			      "' class='kHeader-btn kHeader-brand'" +
+170 			      "title='साझा शिक्षा ई-पाटी'></a></li>")
+171 			      .appendTo($kHeader);
+172 
+173 		      this.element.append($kHeader);
+174 
+175 		      //0-width divs that hold hover imgs for pre-loading
+176 		      var $preloadImgDivs = $("<div class='kHeader-preload-img " +
+177 					      "kHeader-preload-back'></div>" +
+178 					     "<div class='kHeader-preload-img " +
+179 					      "kHeader-preload-zoom-in'></div>" +
+180 					     "<div class='kHeader-preload-img " +
+181 					      "kHeader-preload-zoom-out'></div>" +
+182 					     "<div class='kHeader-preload-img " +
+183 					      "kHeader-preload-ole'></div>" +
+184 					     "<div class='kHeader-preload-img " +
+185 					      "kHeader-preload-help'></div>"
+186 					     )
+187 					     .appendTo($kHeader);
+188 		      
+189 		  },
+190 		  /** Removes the kHeader widget and all related data from the DOM */
+191 		  destroy : function(){
+192 		      this.element.remove();
+193 		      $.widget.prototype.destroy.apply(this, arguments);
+194 		  }
+195 
+196 		  
+197 	      });
+198 
+199 	      $.ui.kHeader.getter = [];
+200      
+201 	      $.ui.kHeader.i18n = {};
+202      
+203 		/** Default settings for the kHeader widget
+204 		 * @namespace Default settings for the kHeader widget
+205 		 * @extends $.ui.kHeader
+206 		 */			   
+207 	      $.ui.kHeader.defaults = {
+208                   /** title
+209 		   * @type String 
+210 		   * @default ""
+211 		   */
+212 		  title: "",
+213 		  /** Turns on zoom buttons
+214 		   * @type boolean 
+215 		   * @default false
+216 		   */
+217 		  zoom: false,
+218 		  /** Creates drop-down with link to lesson plan
+219 		   * @type boolean or string file path to lesson plan
+220 		   * @default false
+221 		   */
+222 		  lessonPlan: false,
+223 		  /** Creates drop-down with link to teachersNote
+224 		   * @type boolean or string file path to teachersNote
+225 		   * @default false
+226 		   */
+227 		  teachersNote: false,
+228 		  /** Id of element containing help text
+229 		   * @type String 
+230 		   * @default "kHelp"
+231 		   */
+232 		  help: "kHelp"
+233 	      };
+234 
+235  })(jQuery);
\ No newline at end of file diff --git a/docs/symbols/src/js_ui.scoreboard.js.html b/docs/symbols/src/js_ui.scoreboard.js.html new file mode 100755 index 0000000..5807b6a --- /dev/null +++ b/docs/symbols/src/js_ui.scoreboard.js.html @@ -0,0 +1,333 @@ +
  1 /**
+  2 * @fileOverview a scoreboard widget
+  3 * @author Bryan Berry <bryan@olenepal.org> 
+  4 *  uses MIT License
+  5 */
+  6 
+  7 
+  8 
+  9 (function($){
+ 10 
+ 11      // This is a dummy function, just here as placeholder to
+ 12      // to make the jsdoc tool happy
+ 13      /** @name $.ui.scoreboard
+ 14       * @namespace Scoreboard widget
+ 15       */
+ 16      $.ui.scoreboard = function(){};
+ 17 
+ 18      $.widget('ui.scoreboard',
+ 19 	      /** @lends $.ui.scoreboard.prototype */
+ 20 	      {
+ 21 		  /** Gets the current score
+ 22 		   * @returns {Number} current score
+ 23 		   */
+ 24 		  getScore : function(){
+ 25 		      return this._getData('score');
+ 26 		  },
+ 27 		   /** Sets the current score
+ 28 		   * @param {Number} newScore new score
+ 29 		   */
+ 30 		  setScore : function(newScore){
+ 31 		      this._setData('score', parseInt(newScore));
+ 32 		      this._refresh();
+ 33 		  },
+ 34 		  /** Gets the current total
+ 35 		   * @returns {Number} current total
+ 36 		   */
+ 37 		  getTotal : function(){
+ 38 		      return this._getData('total');
+ 39 		  },
+ 40 		  /** Sets the current total
+ 41 		   * @param {Number} newTotal new score
+ 42 		   */
+ 43 		  setTotal : function(newTotal){
+ 44 		      this._setData('total', parseInt(newTotal));
+ 45 		      this._refresh();  
+ 46 		  },
+ 47 		  /**
+ 48 		   * Restarts the scoreboard and triggers the "scoreboardRestart" event
+ 49 		   */
+ 50 		  restart : function(){
+ 51 		      this.element.trigger('scoreboardRestart');
+ 52 		      this._setData('score', this._getData('initialScore'));
+ 53 		      this._setData('total', this._getData('initialTotal'));
+ 54 		      this._refresh();
+ 55 		  },
+ 56 		  /** Increments the score by 1 or by the supplied numeric argument
+ 57 		   * @param {Number} [val] increment value
+ 58 		   */
+ 59 		  inc : function(val){
+ 60 		      var incVal = parseInt(val) || 1;
+ 61 		      this._setData('score',  this._getData('score') + incVal);
+ 62 		      this._refresh();
+ 63 		      if(this._getData('winScore') === this._getData('score')){
+ 64 			  this.element.trigger('scoreboardWinGame');
+ 65 		      }
+ 66 		  },
+ 67 		   /** Increments the total by 1 or by the supplied numeric argument
+ 68 		   * @param {Number} [val] increment value
+ 69 		   */
+ 70 		  incTotal : function(val){
+ 71 		      var incVal = parseInt(val) || 1;
+ 72 		      this._setData('total',  this._getData('total') + incVal);
+ 73 		      this._refresh();
+ 74 		  },
+ 75 		   /** Decrements the score by 1 or by the supplied numeric argument
+ 76 		   * @param {Number} [val] decrement value
+ 77 		   */
+ 78 		  dec : function(val){
+ 79 		      var decVal = parseInt(val) || 1;
+ 80 		      this._setData('score',  this._getData('score') - decVal);
+ 81 		      this._refresh();
+ 82 		  },
+ 83 		   /** Decrements the total by 1 or by the supplied numeric argument
+ 84 		   * @param {Number} [val] decrement value
+ 85 		   */
+ 86 		  decTotal : function(val){
+ 87 		      var decVal = parseInt(val) || 1;
+ 88 		      this._setData('total',  this._getData('total') - decVal);
+ 89 		      this._refresh();
+ 90 		  },
+ 91 		  _ : function(val){
+ 92 		      var self = this;
+ 93 		      var convertNumLocale = function(num){
+ 94 			  //48 is the base for western numerals
+ 95 			  var convertDigit = function(digit){
+ 96 			  
+ 97 			      var numBase = 48;
+ 98 			      var prefix = "u00";
+ 99 			      
+100 			      if (self._getData('locale') === "ne"){
+101 				  prefix = "u0";
+102 				  numBase = 2406;
+103 			      }
+104 			 
+105 			      return '\\' + prefix + 
+106 			      		  (numBase + parseInt(digit)).toString(16);
+107 			  };
+108 			  
+109 			  var charArray = num.toString().split("").map(convertDigit);
+110 			  return eval('"' + charArray.join('') + '"');
+111 		      };
+112 		      
+113 		      var convertStringLocale = function (str){
+114 			  if (self._getData('locale') === "ne"){
+115 			      switch(str){
+116 				  case "Score":
+117 				      return "foo";
+118 				  case "Total":
+119 				      return "bar";
+120 				  default:
+121 				      return "string not translated";
+122 			      }
+123 			  }
+124 			      return "String really not translated";
+125 		      };    
+126 			  
+127 		      
+128 		      
+129 		      if (typeof val === "number"){
+130 			  return convertNumLocale(val);
+131 		      }
+132 		      
+133 		      if (this._getData('locale') !== "en"){
+134 			  return convertStringLocale(val);
+135 		      }else {
+136 			  return val;
+137 		      }
+138 
+139 	  
+140 		  },
+141 		  _init : function(){
+142 
+143 		      var divDisplay = "inline";
+144 		      var score = this.options.score;
+145 		      var total = this.options.total;
+146 		      var layoutId = "h";
+147 		      var self = this;
+148 		      
+149 		      var options = $.extend({}, $.ui.scoreboard.defaults, this.options);
+150 
+151 		      this._setData('initialScore', parseInt(options.score));
+152 		      this._setData('initialTotal', parseInt(options.total));
+153 		      this._setData('score', parseInt(options.score));
+154 		      this._setData('total', parseInt(options.total)); 
+155 		      this._setData('winScore', parseInt(options.winningScore)); 
+156 		      this._setData('locale', options.locale);
+157 
+158 		      if(this.options.layout === "vertical"){
+159 			  layoutId = "v";
+160 		      } 
+161 
+162 		      this.element.addClass('ui-scoreboard-container-' + layoutId +
+163 			      ' ui-widget ui-widget-content ui-corner-all');
+164 
+165 		      var $parent = $('<div>')
+166 		          .attr('id', 'uiScoreboard')
+167 		          .addClass('ui-scoreboard-spacing-' + layoutId);
+168 		     
+169 		      this._scoreText = $("<div><span>" + this._("Score") + "</span></div>")
+170 			  .addClass('ui-scoreboard-spacing-'+ layoutId +
+171 				    ' ui-corner-all ui-scoreboard-text')
+172 			  .appendTo($parent);
+173 
+174 		      this._score = $("<div><span>" + this._(score) + "</span></div>")
+175 		          .addClass('ui-scoreboard-spacing-' + layoutId +
+176 				    ' ui-scoreboard-text ui-scoreboard-number-' + layoutId)
+177 			  .appendTo($parent)
+178 			  .find('span:first');
+179 
+180 
+181 		     $("<div><span>Total</span></div>")
+182 			  .addClass('ui-scoreboard-spacing-' + layoutId +
+183 				    ' ui-corner-all ' + 
+184 				    'ui-scoreboard-text')
+185 			  .appendTo($parent);
+186 
+187 		      this._total = $("<div><span>" + this._(total) + "</span></div>")
+188 		          .addClass('ui-scoreboard-spacing-' + layoutId +
+189 				    ' ui-scoreboard-text ui-scoreboard-number-' + layoutId)
+190 			  .appendTo($parent)
+191 			  .find('span:first');
+192 
+193 
+194 		      var $templateBtn = $('<button></button>')
+195 			      .addClass('ui-scoreboard-spacing-' + layoutId + 
+196 					' ui-scoreboard-button ' +
+197 				        'ui-corner-all ui-state-default')
+198 			      .append(
+199 				  $('<span></span>')
+200 				      .addClass('ui-icon '
+201 			  			+ 'ui-scoreboard-icon')
+202 			      )
+203 			      .append( 
+204 				      $('<span>Restart</span>')
+205 					  .addClass('centered')
+206 			      );
+207 		       
+208 		      if(options.restartButton){
+209 			  var $restartBtn = $templateBtn.clone()
+210 			      .find('span:first')
+211 			      .addClass('ui-icon-arrowrefresh-1-w') 
+212 			      .end()
+213 			      .find('span:last') 
+214 			      .text('Restart')
+215 			      .end()
+216 			      .click(function(){ self.restart();})
+217 			      .appendTo($parent);	  
+218 		      }   
+219 
+220 
+221 		      if(options.pauseButton){
+222 
+223 			  var $pauseBtn = $templateBtn.clone()
+224 			    .find('span:first') //
+225 			    .removeClass('ui-icon-arrowrefresh-1-w')
+226 			    .addClass('ui-icon-pause') 
+227 			    .end()
+228 			    .find('span:last') 
+229 			    .text('Pause')
+230 			    .end()
+231 			    .click(function(){ 
+232 				       self.element.trigger('scoreboardPause'); 
+233 				   })
+234 			    .appendTo($parent);
+235 		      }
+236 
+237 		      if(options.startButton){
+238 			  var $startBtn = $templateBtn.clone()
+239 			      .find('span:first')
+240 			  //.removeClass('ui-icon-arrowrefresh-1-w')
+241 		              .addClass('ui-icon-arrowreturnthick-1-s')
+242 		              .end()
+243 			      .find('span:last')
+244 			      .text('Start')
+245 		              .end()
+246 			      .click(function(){ 
+247 				       self.element.trigger('scoreboardStart'); 
+248 				   })
+249 			      .appendTo($parent);
+250 		      }
+251 
+252 
+253 		      $parent.find('button').hover(
+254 			      function(){ 
+255 				  $(this).addClass("ui-state-hover"); 
+256 			      },
+257 			      function(){ 
+258 				  $(this).removeClass("ui-state-hover"); 
+259 			      });
+260 
+261 		      this.element.append($parent);
+262 
+263 		  },
+264 		  _refresh : function(){
+265 		      this._score.text(this._(this._getData('score')));
+266 		      this._total.text(this._(this._getData('total')));
+267 		  },
+268 		  /** Removes the scoreboard widget and all related data from the DOM */
+269 		  destroy : function(){
+270 		      this.element.remove();
+271 		      $.widget.prototype.destroy.apply(this, arguments);
+272 		  }
+273 
+274 		  
+275 	      });
+276 
+277 	      $.ui.scoreboard.getter = ['getScore', 'getTotal', '_convertNumLocale'];
+278 		
+279 		/** Default settings for the scoreboard widget
+280 		 * @namespace Default settings for the scoreboard widget
+281 		 * @extends $.ui.scoreboard
+282 		 */			   
+283 	      $.ui.scoreboard.defaults = {
+284                   /** Initial score
+285 		   * @type Number 
+286 		   * @default 0
+287 		   */
+288 		  score: 0, 
+289 		  /** Initial total
+290 		   * @type Number
+291 		   * @default 0
+292 		   */
+293 		  total: 0, 
+294 		  /** Initial layout, valid options are "horizontal" and "vertical"
+295 		   * @type String
+296 		   * @default "horizontal"
+297 		   */
+298 		  layout: "horizontal", 
+299 		  /** The score that will win the game
+300 		   * @type Number
+301 		   * @default 0
+302 		   */
+303 		  winningScore: 0,
+304 		  /** Default locale, valid options are "en" and "ne" 
+305 		   * @type String
+306 		   * @default "en"
+307 		   */
+308 		  locale: "en",
+309 		  /** Display the Start Button
+310 		   * @type boolean
+311 		   * @default false
+312 		   */
+313 		  startButton: false,
+314 		  /** Display the Retart Button
+315 		   * @type boolean
+316 		   * @default true
+317 		   */
+318 		  restartButton: true,
+319 		  /** Display the Pause Button
+320 		   * @type boolean
+321 		   * @default false
+322 		   */
+323 		  pauseButton: false
+324 	      };
+325 
+326  })(jQuery);
\ No newline at end of file diff --git a/index.html b/index.html new file mode 100755 index 0000000..3fab793 --- /dev/null +++ b/index.html @@ -0,0 +1,58 @@ + + + + English_Animal Identification + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
Help text here
+ +
+ + +
+
What is this?
+ + +
+ + + + + + +
+ +
+ Game Over +
+
+
+
+ + \ No newline at end of file diff --git a/js/jquery-1.3.2.js b/js/jquery-1.3.2.js new file mode 100755 index 0000000..462cde5 --- /dev/null +++ b/js/jquery-1.3.2.js @@ -0,0 +1,4376 @@ +/*! + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){ + +var + // Will speed up references to window, and allows munging its name. + window = this, + // Will speed up references to undefined, and allows munging its name. + undefined, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + + jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + this.context = selector; + return this; + } + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem && elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + var ret = jQuery( elem || [] ); + ret.context = document; + ret.selector = selector; + return ret; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document ).ready( selector ); + + // Make sure that old selector state is passed along + if ( selector.selector && selector.context ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return this.setArray(jQuery.isArray( selector ) ? + selector : + jQuery.makeArray(selector)); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.3.2", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num === undefined ? + + // Return a 'clean' array + Array.prototype.slice.call( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) + ret.selector = this.selector + (this.selector ? " " : "") + selector; + else if ( name ) + ret.selector = this.selector + "." + name + "(" + selector + ")"; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( typeof name === "string" ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text !== "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).clone(); + + if ( this[0].parentNode ) + wrap.insertBefore( this[0] ); + + wrap.map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: [].push, + sort: [].sort, + splice: [].splice, + + find: function( selector ) { + if ( this.length === 1 ) { + var ret = this.pushStack( [], "find", selector ); + ret.length = 0; + jQuery.find( selector, this[0], ret ); + return ret; + } else { + return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + })), "find", selector ); + } + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var html = this.outerHTML; + if ( !html ) { + var div = this.ownerDocument.createElement("div"); + div.appendChild( this.cloneNode(true) ); + html = div.innerHTML; + } + + return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; + } else + return this.cloneNode(true); + }); + + // Copy the events from the original to the clone + if ( events === true ) { + var orig = this.find("*").andSelf(), i = 0; + + ret.find("*").andSelf().each(function(){ + if ( this.nodeName !== orig[i].nodeName ) + return; + + var events = jQuery.data( orig[i], "events" ); + + for ( var type in events ) { + for ( var handler in events[ type ] ) { + jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); + } + } + + i++; + }); + } + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ + return elem.nodeType === 1; + }) ), "filter", selector ); + }, + + closest: function( selector ) { + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, + closer = 0; + + return this.map(function(){ + var cur = this; + while ( cur && cur.ownerDocument ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { + jQuery.data(cur, "closest", closer); + return cur; + } + cur = cur.parentNode; + closer++; + } + }); + }, + + not: function( selector ) { + if ( typeof selector === "string" ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector === "string" ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return !!selector && this.is( "." + selector ); + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if( jQuery.nodeName( elem, 'option' ) ) + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if ( typeof value === "number" ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value === undefined ? + (this[0] ? + this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, +i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ), + "slice", Array.prototype.slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, callback ) { + if ( this[0] ) { + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), + first = fragment.firstChild; + + if ( first ) + for ( var i = 0, l = this.length; i < l; i++ ) + callback.call( root(this[i], first), this.length > 1 || i > 0 ? + fragment.cloneNode(true) : fragment ); + + if ( scripts ) + jQuery.each( scripts, evalScript ); + } + + return this; + + function root( elem, cur ) { + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy === "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}, + toString = Object.prototype.toString; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && /\S/.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.support.scriptEval ) + script.appendChild( document.createTextNode( data ) ); + else + script.text = data; + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length === undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length === undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames !== undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force, extra ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + + if ( extra === "border" ) + return; + + jQuery.each( which, function() { + if ( !extra ) + val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + if ( extra === "margin" ) + val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; + else + val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + } + + if ( elem.offsetWidth !== 0 ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, Math.round(val)); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // We need to handle opacity special in IE + if ( name == "opacity" && !jQuery.support.opacity ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle ) + ret = computedStyle.getPropertyValue( name ); + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context, fragment ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { + var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); + if ( match ) + return [ context.createElement( match[1] ) ]; + } + + var ret = [], scripts = [], div = context.createElement("div"); + + jQuery.each(elems, function(i, elem){ + if ( typeof elem === "number" ) + elem += ''; + + if ( !elem ) + return; + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
" ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and + + + + + + + +
+
+ +
+ पाठविवरणर पाठयोजना सहज तरिकाले पढ्न तपाईले निम्न कार्य गर्न सक्नु हुन्छ । +

+

थिच्दा
+ अक्षर आकार ठुलो बनाउन सक्नुहुन्छ। +

+

+

थिच्दा
+ अक्षर आकार सानो बनाउन सक्नुहुन्छ। +

+

+ पाठ पृष्टको दाईने तर्फको ठाडो रेखा तल माथि गर्दा
+ तपाईले हाल पढिरहेको पृष्टलाई आवश्यकता अनुसार तल माथि गर्न सक्नुहुन्छ +
+ + + + + \ No newline at end of file diff --git a/lessonPlan.html b/lessonPlan.html new file mode 100755 index 0000000..cec9613 --- /dev/null +++ b/lessonPlan.html @@ -0,0 +1,709 @@ + + + +Animal identification + + + +
+

Animal Identification (पाठविवरण)

+

क्रियाकलापको + शिर्षक : Animal + Identification

+

क्रियाकलापको + कोड : II + E 14 (कक्षा , अङ्ग्रेजी )

+
+

शिक्षणको + हप्ता : , अथवा

+

पाठ्यपुस्तको + सम्बन्धित + पाठ : My English Book II

+
+
+

सिकाइ + क्षेत्र : Speaking, + reading, 8, 10, 12, 16

+

सिकाइउपलब्धि : १) ठिक उच्चारण, झोक्‍का उतार-चढाव मिलाई भाषाको प्रयोग

+

२) साधारण अङ्ग्रेजीमा जनावरका नामहरू भन्‍न

+

३) हेरेर वस्तुहरूका प्रचलित नामहरूको पहिचान गर्न

+

४) पाठ्यवस्तुबाट वस्तुहरूको खास नाम पत्ता लगाउन

+

सिकाइउपलब्धिको + विस्तृतीकरण : चित्रपत्तीको अभ्यास, वर्णमालाका ठूला अक्षरहरूको संयोजन खेल

+
+
+

क्रियाकलापको + उद्देश्य : दिएका जनावरहरूलाई चिन्‍नु तीनको नाम बताउन सक्नु

+

क्रियाकलाप + चलाउने तरिका : स्क्रिनमा एउटा प्रश्‍न, जनावरको चित्र केही जनावरका नामहरू देखिन्छन् जनावरलाई हेर्नुहोस्, सही नाम छान्‍नुहोस् क्लिक गर्नुहोस् सही नाममा क्लिक गरेमा ठीकको चिन्ह उछ जनावरको नामको उच्चारण सुनिन्छ यदि गलत उत्तरमा क्लिक भयो भने गलतको चिन्ह उछ त्यसपछि, तपाईंले सही उत्तर छान्‍ने मौका पाउनुहुन्छ तर स्क्रिनको माथि बायाँपट्टीको स्कोरमा अङ्क भने जोडिदैन

+

स्व-मूल्याङ्कन : स्क्रिनको माथि बायाँपट्टीको कुनामा आफूले मिलाएको उत्तरको अङ्क (Score) देखिन्छ।

+
+
+

-पाटी + प्रयोगपूर्वको + क्रियाकलाप : -पाटीमा भएका Vocabulary + Domestic Animals Vocabulary Wild Animals गराउनुहोस्

+

-पाटी + प्रयोगपछिको + क्रियाकलाप : विद्यार्थीहरूलाई शैक्षिकभ्रमणका लागि नजिकको वस्तीमा लैजानुहोस् लेख्‍ने कामका लागि आफूसँग कापी सीसाकलम बोक्न लगाउनुहोस् विद्यार्थीहरू सबैलाई एकपटकमा एउटा घरमा लगेर त्यहाँ देखिने जनावरका नामहरू लेख्‍न भन्‍नुहोस् यदि अङ्ग्रेजीमा नाम थाहा नभएका जनावरहरू टिएमा तीनको नाम नेपालीमा लेख्‍न लगाउनुहोस् विद्यार्थीहरूलाई कक्षाकोठामा ल्याउनुहोस् कालोपाटीमा तिनीहरूले देखेका जनावरका नामहरूको सूची तयार पार्नुहोस् सूची तयार पार्दा अङ्ग्रेजीमा थाहा भएका जनावरका नामहरू अङ्ग्रेजीमा अङ्ग्रेजीमा थाहा नभएका नामहरूलाई नेपालीमा लेख्‍नुहोस् अङ्ग्रेजीमा नामहरूको सूची तयार भए पछी यदि नेपालीमा लेख्‍नुपर्ने नामहरू भएमा त्यसलाई पनि लेख्‍नुहोस् विद्यार्थीहरूलाई दोहोर्‍याउन भन्‍दै ती नामहरू लेख्‍दै उच्चारण गर्न लगाउनुहोस् गृहकार्यमा हरेक विद्यार्थीहरूलाई आफ्नो छिमेकमा नजिकको घरमा भएका जनावरहरूको नाम लेखेर ल्याउने काम दिनुहोस्

+

-पुस्तकालयसित + सम्बन्धित + क्रियाकलाप :

+

सामूहिक + क्रियाकलाप :

+
+
+

गृहकार्य : सबै जनावरका नामहरू चिन्‍न ठीक तरिकाले भन्‍न नआउँदासम्म -पाटीको क्रियाकलापमा अभ्यास गरेर आउन लगाउनुहोस्

+

समान वा + सम्बन्धित + अन्य + क्रियाकलाप :

+

शिक्षणसम्बन्धि + थप सल्लाह :

+
+
+

उपयोगी + वेभसाइटहरू :

+
+
+ + diff --git a/start.html b/start.html new file mode 100755 index 0000000..3ee8538 --- /dev/null +++ b/start.html @@ -0,0 +1,65 @@ + + + + Start Page for English Animal Identification + + + + + + + + + +
+ +
+
+
+
+
साझा शिक्षा ई-पाटीद्वारा निर्मित
+
ई-पाठ
+
+
+ +
+ +
+ कक्षा: +
+
अँग्रेजी
+ +
+ This is a lesson for identifying animals +
+ + +
+
+ + +
+ + + \ No newline at end of file diff --git a/teachersNote.html b/teachersNote.html new file mode 100755 index 0000000..e1eaab7 --- /dev/null +++ b/teachersNote.html @@ -0,0 +1 @@ +Teacher's Note coming soon \ No newline at end of file -- cgit v0.9.1