From: <neb...@us...> - 2009-09-01 13:44:11
|
Revision: 1833 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1833&view=rev Author: nebelschwade Date: 2009-09-01 13:44:00 +0000 (Tue, 01 Sep 2009) Log Message: ----------- Changed Layout and Playlist Handling Added new JS-Classes A Simple Examples for testing learn-Case Modified Paths: -------------- trunk/src/moosique.net/css/style.css trunk/src/moosique.net/img/controls.png trunk/src/moosique.net/img/loading.gif trunk/src/moosique.net/index.php trunk/src/moosique.net/js/interface.js trunk/src/moosique.net/js/player.js trunk/src/moosique.net/moosique/classes/Config.php trunk/src/moosique.net/moosique/classes/Debugger.php trunk/src/moosique.net/moosique/classes/DllearnerConnection.php trunk/src/moosique.net/moosique/classes/RequestHandler.php trunk/src/moosique.net/moosique/classes/SparqlQueryBuilder.php trunk/src/moosique.net/moosique/classes/View.php trunk/src/moosique.net/moosique/config.ini trunk/src/moosique.net/moosique/index.php trunk/src/moosique.net/moosique/main.wsdl Added Paths: ----------- trunk/src/moosique.net/css/index.php trunk/src/moosique.net/css/reset.css trunk/src/moosique.net/img/bg.png trunk/src/moosique.net/js/index.php trunk/src/moosique.net/js/jsmin-1.1.1.php trunk/src/moosique.net/js/mootools-1.2.3-core-yc.js trunk/src/moosique.net/js/request.js trunk/src/moosique.net/moosique/classes/FirePHP.class.php trunk/src/moosique.net/moosique/data/ trunk/src/moosique.net/moosique/data/allRecords.txt trunk/src/moosique.net/moosique/data/allRecordsWithTags.txt trunk/src/moosique.net/moosique/data/allTags.txt trunk/src/moosique.net/moosique/data/allTagsByPopularity.txt trunk/src/moosique.net/moosique/data/dontUse.txt trunk/src/moosique.net/moosique/data/tagsWeUse.txt trunk/src/moosique.net/moosique/getAllTags.php trunk/src/moosique.net/moosique/jamendo.owl trunk/src/moosique.net/moosique/learnTest.php trunk/src/moosique.net/moosique/stonerTest.owl trunk/src/moosique.net/moosique/tagsToOwl.php Removed Paths: ------------- trunk/src/moosique.net/css/default.css trunk/src/moosique.net/js/ajax.js trunk/src/moosique.net/js/mootools-core.js trunk/src/moosique.net/js/mootools-more.js trunk/src/moosique.net/moosique/classes/FirePHP.php trunk/src/moosique.net/moosique/xml2json/ Deleted: trunk/src/moosique.net/css/default.css =================================================================== --- trunk/src/moosique.net/css/default.css 2009-08-29 14:08:33 UTC (rev 1832) +++ trunk/src/moosique.net/css/default.css 2009-09-01 13:44:00 UTC (rev 1833) @@ -1,44 +0,0 @@ -@media all { /* Yes we want to reset this for print-Styles too */ -/* Based on various Reset-Styles, included own stuff and added mediabox-Style */ -/* Reset all elements except form stuff */ -html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; vertical-align: baseline; -} - -html { height: 100%; } -body { height: 101%; background-color: #fff; color: #000; line-height: 1; } -ol, ul { list-style: none; } -table { border-collapse: collapse; border-spacing: 0; } -caption, th, td { text-align: left; font-weight: normal; } -blockquote:before, blockquote:after, q:before, q:after { content: ""; } -blockquote, q { quotes: "" ""; } -strong, b { font-weight: bold; } -em, i { font-style: italic; } -label, input[type=button], input[type=submit], button { cursor: pointer; } -abbr[title] { border-bottom: 1px dotted #888 !important; cursor: help; } -a abbr { cursor: pointer !important; } - -/* General purpose-Classes */ -.hidden { position: absolute; left: -9999999em; top: -9999999em;} - -/* Clearfix hack */ -.clearfix:after { clear: both; content: "."; display: block; height: 0; visibility: hidden; } -.clearfix { display: inline-block; } -* html .clearfix { height: 1%; } -.clearfix { display: block; } - -/* Special Stuff */ -:focus { outline: 0; } -a { text-decoration: none; } -a:hover { text-decoration: underline; } -a:active { position: relative; top: 1px; } -.ie6 a:active, .ie7 a:active { position: static; top: auto; } -input:focus, textarea:focus, select:focus { background: #eee; } -fieldset { border: 1px solid #333; padding: 9px; } -fieldset legend { padding: 0 9px; } -h1, h2, h3, h4, h5, h6 { clear: both; font-weight: normal; } - -} /* End @media all */ Added: trunk/src/moosique.net/css/index.php =================================================================== --- trunk/src/moosique.net/css/index.php (rev 0) +++ trunk/src/moosique.net/css/index.php 2009-09-01 13:44:00 UTC (rev 1833) @@ -0,0 +1,27 @@ +<?php +/* This little Script takes all included css-files and + * compresses them by removing comments, line-breaks and + * useless space-characters + */ +header('Content-type: text/css'); +// set offset to 365 days = 1 year +$offset = 60 * 60 * 24 * 365; +header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $offset) . ' GMT'); + +ob_start('compress'); /* uncomment for deployment, smaller css-files */ +// ob_start(); + +function compress($buffer) { + // remove comments + $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); + // remove tabs, spaces, newlines, etc. + $buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); + return $buffer; +} + +/* the css-files to include and compress */ +include('reset.css'); +include('style.css'); + +ob_end_flush(); +?> \ No newline at end of file Added: trunk/src/moosique.net/css/reset.css =================================================================== --- trunk/src/moosique.net/css/reset.css (rev 0) +++ trunk/src/moosique.net/css/reset.css 2009-09-01 13:44:00 UTC (rev 1833) @@ -0,0 +1,25 @@ +/* basic reset */ +/* =================================================================== */ +@media all { +html, body, div, h1, h2, h3, +h4, h5, h6, ul, ol, dl, li, +dt, dd, p, img, blockquote, +pre, form, fieldset, table, +th, td { margin: 0; padding: 0; font: inherit; color: inherit; + text-decoration: none; border: none; outline: none; } +ol, ul { list-style: none; } +table { border-collapse: collapse; border-spacing: 0; } +caption, th, td { text-align: left; font-weight: normal; } +label, input[type=button], +input[type=submit], button { cursor: pointer; } +:focus { outline: 0; } +input, textarea, +select, option { font: inherit; color: inherit; } +a { color: inherit; font: inherit; text-decoration: none; } +a:hover { text-decoration: underline; } +a:active { position: relative; top: 1px; } +.hidden { position: absolute; left: -9999px; top: -9999px; } +.clearfix:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; + visibility: hidden; width: 0; height: 0; } +.clearfix { display: inline-block; } +} /* end @media all */ \ No newline at end of file Modified: trunk/src/moosique.net/css/style.css =================================================================== --- trunk/src/moosique.net/css/style.css 2009-08-29 14:08:33 UTC (rev 1832) +++ trunk/src/moosique.net/css/style.css 2009-09-01 13:44:00 UTC (rev 1833) @@ -1,372 +1,135 @@ -/* moosique.net - * - * Semiblack: #131313 - * Light Grey: #545454 - * White: #f8faf7 - * Yellowish: #ffbc00 - * - */ - +/* moosique.net - a jamendo radio with recommendations! */ @media screen { - -/* Default Element Styling --- Start Editing below this line */ -/* =================================================================== */ -* { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - color: #131313; -} +/*=============== Default Styling ===============*/ +body { font: normal 12px/16px Verdana, Arial, sans-serif; color: #f1f7e4; + background: url('../img/bg.png') top left repeat #3a3a3a; border-top: 5px solid #1fd611; } +input, textarea, select { background: #292929; border: 1px solid #5a5a5a; outline: none; padding: 5px; } +input[type=submit] { padding: 5px 10px; } +textarea:focus, input:focus, +select:focus { border: 1px solid #1fd611; } +a:hover { color: #1fd611; } +h1 { font: 32px/32px Georgia, Times, serif; } +h2 { font: 28px/28px Georgia, Times, serif; } +h3 { font: 20px/20px Georgia, Times, serif; } +h4 { font: 16px/16px Georgia, Times, serif; } +h5 { font: 12px/12px Georgia, Times, serif; } +h6 { font: 10px/10px Georgia, Times, serif; } +pre { font: normal 10px/14px Monaco, Courier, monospace; } +p, h1, h2, h3, h4, h5, h6, +table, ul, ol, blockquote, +pre, form { margin-bottom: 16px; } -body { - background: #f8faf7; -} - -a:hover { - color: #ffbc00; -} - -/* Abstand Zeilenhoehe nach unten bei manchen Elementen */ -p, h1, h2, h3, h4, h5, h6, table, ul, ol, blockquote, pre, form { - margin-bottom: 16px; -} - -/* Default Container Positioning */ -/* =================================================================== */ -#container, #header, #mainContainer, #content { - position: relative; -} - -#headerContainer { - height: 95px; - background: #333; - border-bottom: 5px solid #ffbc00; - padding: 20px 0 0 0; -} - -#header { - width: 760px; - margin: 0 auto; -} - -#container { - border-top: 1px solid #ccc; -} - -#mainContainer { - width: 700px; - margin: 0 auto; - padding: 30px; - border: 1px solid #ccc; - border-top: none; -} - -#footer { - padding: 20px; - text-align: center; -} - -/* header Area */ -/* =================================================================== */ -#header h1 a { - font-size: 32px; - line-height: 32px; - font-family: Georgia, Times, "Times New Roman", serif; - text-decoration: none; - color: #f8faf7; -} - -#status, #header .currentlyPlaying { - position: absolute; - top: 0; - right: 0; - width: 380px; - background: #545454; - padding: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#status { - background: #545454; - color: #f8faf7; - z-index: 1000000; - height: 32px; - line-height: 32px; - text-align: center; -} - -.currentlyPlaying h2, .currentlyPlaying h3, .currentlyPlaying h4 { - margin-bottom: 0; -} - -#header .currentlyPlaying h2 { - font-size: 10px; -} - -#header .currentlyPlaying h4 { - position: absolute; - bottom: 10px; - right: 10px; - font-size: 10px; -} - -#searchForm input#searchValue { - margin: 0 5px; - width: 100px; -} - -#loadingImg { - display: none; -} - -/* mainMenu & status */ -/* =================================================================== */ - -#mainMenu ul { - position: absolute; - top: 70px; - right: 0; -} - -#mainMenu ul li { - float: left; - -moz-border-radius-topleft: 10px; - -moz-border-radius-topright: 10px; - -webkit-border-top-left-radius: 10px; - -webkit-border-top-right-radius: 10px; - padding: 0 15px; - background: #545454; - margin: 5px 0 0 5px; - height: 20px; - line-height: 20px; -} - -#mainMenu ul li a { - color: #131313; -} - -#mainMenu ul li.active { - height: 25px; - line-height: 25px; - margin-top: 0; - background: #ffbc00; -} - -#mainMenu ul li.active a { - font-weight: bold; -} - -#mainMenu ul li a:hover { - text-decoration: none; -} - - -/* Content Area Default Styles */ -/* =================================================================== */ -#content h2, #content h3 { - font-size: 16px; - line-height: 24px; - font-weight: bold; -} - -/* for debugging */ -#content pre { - font-family: "Courier New", Courier, monospace; - font-size: 10px; -} - /* Initial hiding */ -#recommendations, #player, #information, #help { - display: none; /* Initial Hide */ -} +#recommendations, #player, +#information, #help, +#loadingImg, #header h1 { display: none; } -#footer * { - font-size: 10px; -} +/* Rounded Corners */ +input, textarea, select { -moz-border-radius: 5px; -webkit-border-radius: 5px; } +#content, #status, #playing, +#playerControls, #results li { -moz-border-radius: 10px; -webkit-border-radius: 10px; } +#mainMenu a { -moz-border-radius-bottomleft: 10px; -moz-border-radius-bottomright: 10px; + -webkit-border-bottom-left-radius: 10px; -webkit-border-bottom-right-radius: 10px; } + +/* button-click-feeling for links, by offsetting top position */ +#prev:active, #next:active, +#stop:active, #mute:active +#playPause:active, { position: relative; top: 2px; } +#playlist .delete:active, +#playlist .moveUp:active, +#playlist .moveDown:active { top: 6px; } -/* home -- search results */ -/* =================================================================== */ -#results h3 em { - font-size: 16px; -} +/*=============== Default Containers ===============*/ +#container, #header, +#headerContainer, +#mainContainer, #content, +#playlist li { position: relative; } +#container { width: 760px; margin: 0 auto; } +#header { height: 150px; padding-top: 20px; } +#content { background: #292929; padding: 20px; } +#footer { font: normal 10px/14px Verdana, Arial, sans-serif; padding: 20px; text-align: center; } -#results ul li h3 a { - font-weight: normal; -} -#results ul li img { - border: 2px solid #545454; - margin-bottom: 16px; -} +/*=============== header Area, Player Controls, Status, Playing and Search Form ===============*/ +#status, #playing { position: absolute; top: 70px; left: 0; width: 490px; height: 60px; + background: #292929; padding: 10px 20px; } +#playerControls { position: absolute; top: 70px; right: 0; width: 170px; height: 60px; + padding: 10px 20px; background: #292929; } +#status { background: #393939; height: 60px; line-height: 60px; text-align: center; + font-weight: bold; border: 1px solid #1fd611; z-index: 1000; } +#playing span { display: block; margin-bottom: 0; font-size: 10px; } +#playing .track { font: bold 12px/32px Verdana, Arial, sans-serif; } +#playing .time { position: absolute; bottom: 10px; right: 20px; } -#results ul li { - display: block; - border: 1px dotted #545454; - padding: 16px; - margin: 0 16px 16px 0; - float: left; - width: 300px; -} +#prev, #next, #stop, +#playPause, #mute { display: block; width: 20px; height: 40px; text-indent: -10000px; + float: left; margin: 10px 0 0 10px; } +/* Sprites */ +#prev { background: url(../img/controls.png) 0px -160px no-repeat; } +#next { background: url(../img/controls.png) 0px -120px no-repeat; } +#stop { background: url(../img/controls.png) 0px -80px no-repeat; } +#mute { background: url(../img/controls.png) 0px -280px no-repeat; margin-right: 0; width: 23px; } +#playPause { background: url(../img/controls.png) 0px 0px no-repeat; width: 26px; } -#results .artistSearch ul li { - height: 450px; -} +/* Search form */ +#searchValue { margin: 0 5px; width: 100px; } +#loadingImg { cursor: wait; } -#results ul ul { - list-style: square; -} -#results ul li ul li, -#results .artistSearch ul li ul li, -#results .tagSearch ul li ul li { - border: none; - display: list-item; - padding: 0; - margin: 0 0 0 32px; - width: auto; - height: auto; - float: none; -} +/*=============== Menu ===============*/ +#mainMenu ul { position: absolute; top: 0; right: 0; } +#mainMenu li { float: left; } +#mainMenu a { display: block; margin-left: 10px; line-height: 30px; height: 30px; + padding: 10px 12px; color: #fafafa; background: #4a4a4a; } +#mainMenu .active a, +#mainMenu .active a:hover { background: #1fd611; } +#mainMenu a:hover { text-decoration: none; background: #5a5a5a; } -#results .tagSearch ul li ul { - clear: both; -} - +/*=============== Search Results ===============*/ +#results li h3 a { font-weight: normal; } +#results li img { border: 2px solid #545454; margin-bottom: 16px; } +#results li { display: block; border: 1px solid #545454; padding: 16px; margin-bottom: 16px; + float: left; width: 318px; } +#results li.odd { margin-right: 16px; clear: both; } +#results ul ul { list-style: disc; } -#results .artistSearch ul li div.artistImage { - text-align: center; -} +/* This is for the list of found albums etc */ +#results li li, +#results .artistSearch li li, +#results .tagSearch li li { border: none; display: list-item; padding: 0; margin: 0 0 0 32px; + width: auto; height: auto; float: none; } +#results .tagSearch ul ul { clear: both; } +#results .artistImage { text-align: center; } +#results .cover { margin-right: 16px; width: 110px; float: left; } +#results .tagSearch h4 { display: inline; } -#results .tagSearch ul li div.cover { - margin-right: 16px; - width: 110px; - float: left; -} -#results .tagSearch ul li h4 { - display: inline; - font-weight: bold; -} +/*=============== Recommendations and playlist ===============*/ +#recommended a:hover { cursor: pointer; text-decoration: none; font-weight: bold; color: #131313; } +#playlist, #recommended, +#recently { margin-left: 36px; list-style: decimal; } +#playlist li, #recently li, +#recommended li { line-height: 24px; } +#playlist .ymp-btn-page-pause { font-weight: bold; } +/* Playlist buttons */ +#playlist .delete, +#playlist .moveUp, +#playlist .moveDown { position: absolute; display: block; top: 5px; right: 20px; width: 14px; height: 14px; + line-height: 14px; text-indent: -10000px; + background: url(../img/controls.png) 0px -200px no-repeat;} +#playlist .moveUp { background: url(../img/controls.png) 0px -360px no-repeat; right: 40px; } +#playlist .moveDown { background: url(../img/controls.png) 0px -320px no-repeat; right: 60px; } +/*=============== Information / Help ===============*/ -/* Recommendations */ -/* =================================================================== */ -#recommended { - list-style: decimal; - margin-left: 24px; -} -#recommended li { - line-height: 24px; -} -#recommended a:hover { - cursor: pointer; - text-decoration: none; - font-weight: bold; - color: #131313; -} -/* information */ -/* =================================================================== */ - - - - -/* player */ -/* =================================================================== */ - -#playerControls { - position: absolute; - width: 149px; - height: 37px; - top: 0; - right: 0; - padding: 10px 20px; - background: #545454; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#prev, #next, #stop, #playPause, #mute { - display: block; - width: 20px; - height: 37px; - text-decoration: none; - text-indent: -1000000px; - float: left; - margin-right: 10px; -} - -/* clicky feel */ -#prev:active, #next:active, #stop:active, -#playPause:active, #mute:active { - position: relative; - top: 2px; -} - -/* Sprites */ -#prev { background: url(../img/controls.png) 0px -160px no-repeat; } -#next { background: url(../img/controls.png) 0px -120px no-repeat; } -#stop { background: url(../img/controls.png) 0px -80px no-repeat; } - -#playPause { - background: url(../img/controls.png) 0px 0px no-repeat; - width: 26px; -} - -#mute { - background: url(../img/controls.png) 0px -280px no-repeat; - margin-right: 0; - width: 23px; -} -/* End Sprites */ - -#playlist li { - position: relative; /* Delete Buttons */ - list-style: decimal; - list-style-position: inside; - cursor: move; - padding: 3px; -} - -#playlist li a.ymp-btn-page-pause { - font-weight: bold; -} - -/* Delete buttons */ -#playlist li a.del { - position: absolute; - display: block; - top: 5px; - right: 20px; - width: 14px; - height: 14px; - line-height: 14px; - margin-right: -19px; - z-index: 1000; - text-indent: -99999999px; - background: url(../img/controls.png) 0px -200px no-repeat; -} - -/* Draggable li-Items */ -#playlist li.moving { - background: #666; - border: 3px solid #ffbc00; - font-weight: bold; -} - - - - - - } /* end @media screen */ \ No newline at end of file Added: trunk/src/moosique.net/img/bg.png =================================================================== (Binary files differ) Property changes on: trunk/src/moosique.net/img/bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/src/moosique.net/img/controls.png =================================================================== (Binary files differ) Modified: trunk/src/moosique.net/img/loading.gif =================================================================== (Binary files differ) Modified: trunk/src/moosique.net/index.php =================================================================== --- trunk/src/moosique.net/index.php 2009-08-29 14:08:33 UTC (rev 1832) +++ trunk/src/moosique.net/index.php 2009-09-01 13:44:00 UTC (rev 1833) @@ -1,153 +1,133 @@ -<?php session_start(); ?><!DOCTYPE html +<?php session_start(); ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <title>moosique.net</title> - <link href="css/default.css" rel="stylesheet" type="text/css" /> - <link href="css/style.css" rel="stylesheet" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <link href="css/" rel="stylesheet" type="text/css" /> + <title>moosique.net</title> </head> - -<!--[if IE 7]><body class="ie7"><![endif]--> -<!--[if lte IE 6]><body class="ie6"><![endif]--> -<!--[if !IE]><!--><body><!-- <![endif]--> - - <div id="headerContainer"> - <div id="header"> - <h1><a href="index.php">moosique.net</a></h1> - - <div id="mainMenu"> - <ul class="clearfix"> - <li class="active"><a href="#" class="home">Home</a></li> - <li><a href="#" class="player">Player</a></li> - <li><a href="#" class="recommendations">Recommendations</a></li> - <li><a href="#" class="information">Information</a></li> - <li><a href="#" class="help">Help</a></li> - </ul> - </div> - - <form id="searchForm" method="get" action="moosique/"> - <div class="clearfix"> - <select name="typeOfSearch" id="typeOfSearch"> +<body> +<div id="container"> + <div id="header"> + <h1>moosique.net</h1> + <div id="mainMenu"> + <ul class="clearfix"> + <li class="active"><a href="#" class="home">Search</a></li> + <li><a href="#" class="player">Playlist</a></li> + <li><a href="#" class="recommendations">Recommendations</a></li> + <li><a href="#" class="information">Info</a></li> + <li><a href="#" class="help">?</a></li> + </ul> + </div> + <form id="searchForm" method="get" action="moosique/"> + <ol> + <li> + <select name="searchType" id="searchType"> + <?php /* <option value="allSearch">Everything</option> */ ?> <option value="artistSearch">Artist</option> <option value="tagSearch">Tag</option> - <?php /* <option value="songSearch">Song</option> - <option value="lastfm">Last.fm-User</option> - */ ?> + <?php /* <option value="lastfm">Last.fm-User</option> */ ?> </select> <input id="searchValue" name="searchValue" type="text" /> - <input id="searchSubmit" name="searchSubmit" value="Search" title="Search" type="submit" disabled="disabled" /> + <input id="searchSubmit" name="searchSubmit" value="Search" title="Search" type="submit" /> <img id="loadingImg" src="img/loading.gif" alt="Loading..." /> - </div> - </form> - - <div id="status"> </div> - - <div class="currentlyPlaying"> - <h2>Player stopped</h2> - <h3>...</h3> - <h4>0:00 / 0:00</h4> - </div> - + </li> + </ol> + </form> + <div id="playerControls"> + <a href="#" id="playPause" title="Play/Pause">Play / Pause</a> + <a href="#" id="stop" title="Stop playing">Stop</a> + <a href="#" id="prev" title="Play previous Track in Playlist">Previous Tack</a> + <a href="#" id="next" title="Play next Track in Playlist">Next Track</a> + <a href="#" id="mute" title="Sound on/off">Mute</a> </div> + <h4 id="status"> </h4> + <div id="playing"> + <span class="info">Player stopped</span> + <span class="track">...</span> + <span class="time">0:00 / 0:00</span> + </div> </div> - <div id="container"> - <div id="mainContainer"> - <div id="content" class="clearfix"> + <div id="content"> + <div id="home"> + <div id="welcome"> + <h2>Welcome to moosique.net!</h2> + <p> + Want to listen to some good free music? Just enter an artist or song + name or search for music using tags <!-- or enter your last.fm username --> and let the moogic + happen. By listening to songs you like, the system will automatically learn about + your musical taste and generate recommendations. You can find them in the tab »Recommendations«. + </p> + <p> + You can find information about the song currently playing in the tab »Information« and view + your Playlist and control the Player in the Tab »Player«. + </p> + <p> + Now get started and add something to the Playlist! + </p> + </div> + <div id="results"> - <div id="home"> - <div id="welcome"> - <h2>Welcome to moosique.net!</h2> - <p> - Want to listen to some good free music? Just enter an artist or song - name or search for music using tags <!-- or enter your last.fm username --> and let the moogic - happen. By listening to songs you like, the system will automatically learn about - your musical taste and generate recommendations. You can find them in the tab »Recommendations«. - </p> - <p> - You can find information about the song currently playing in the tab »Information« and view - your Playlist and control the Player in the Tab »Player«. - </p> - <p> - Now get started and add something to the Playlist! - </p> - </div> - <div id="results"> - - </div> - </div> + </div> + </div> - <div id="recommendations"> - <h2>Recommended Songs</h2> - <p>Click a song to add it to your playlist.</p> - <ol id="recommended"> - <li></li> - </ol> - - </div> + <div id="recommendations"> + <h2>Recommended Songs</h2> + <p>These are the automatically generated recommendations. Click on a song to add it to your playlist.</p> + <ol id="recommended"> + <li></li> + </ol> + <h2>Recently Listened to</h2> + <p>These are the songs you recently listened to. Click on a song to re-enqueue it to your current playlist. (NOT WORKING YET!)</p> + <ol id="recently"> + <li></li> + </ol> + </div> - <div id="information"> - <div id="moreInfo"> - <h2>About the Artist</h2> - <img src="http://imgjam.com/albums/8654/covers/1.200.jpg" alt="Cover" /> - <p> - Iusto odio dignissim qui blandit praesent. Nisl ut aliquip ex ea commodo, consequat - duis autem vel eum. Nam liber tempor cum soluta nobis eleifend option congue nihil - imperdiet doming id. In hendrerit eu feugiat nulla luptatum zzril delenit augue duis - dolore te feugait. Quod ii legunt saepius claritas est etiam processus dynamicus - qui nobis videntur parum. - </p> - </div> - </div> - - <div id="player"> - <h3>Playlist</h3> - <p> - You can delete entries from the playlist by clicking the small x on the left. <br /> - You also can move the playlist-entries around to change their order. - </p> + <div id="information"> + <div id="moreInfo"> + <h2>About the Artist</h2> + <img src="http://imgjam.com/albums/8654/covers/1.200.jpg" alt="Cover" /> + <p> + Iusto odio dignissim qui blandit praesent. Nisl ut aliquip ex ea commodo, consequat + duis autem vel eum. Nam liber tempor cum soluta nobis eleifend option congue nihil + imperdiet doming id. In hendrerit eu feugiat nulla luptatum zzril delenit augue duis + dolore te feugait. Quod ii legunt saepius claritas est etiam processus dynamicus + qui nobis videntur parum. + </p> + </div> + </div> + + <div id="player"> + <h3>Playlist</h3> + <p> + You can delete entries from the playlist by clicking the small x on the left and change their order by clicking on the small up- and down-arrows.<br /> + </p> + <ol id="playlist"> + <li></li> + </ol> + + </div> - <ol id="playlist"> - <li></li> - </ol> + <div id="help"> + + </div> - <div id="playerControls"> - <a href="#" id="playPause" title="Play/Pause">Play / Pause</a> - <a href="#" id="stop" title="Stop playing">Stop</a> - <a href="#" id="prev" title="Play previous Track in Playlist">Previous Tack</a> - <a href="#" id="next" title="Play next Track in Playlist">Next Track</a> - <a href="#" id="mute" title="Sound on/off">Mute</a> - </div> - - </div> + </div> <!-- end content --> - <div id="help"> - - </div> - - </div> <!-- end content --> - </div> <!-- end mainContainer --> - <div id="footer"> - <a href="http://jamendo.com">Jamendo</a> | - <a href="http://mediaplayer.yahoo.com/">Yahoo! Media Player</a> | - <a href="http://aksw.org/Projects/DLLearner">Powered by DL-Learner</a> - </div> - </div> <!-- end container --> + <div id="footer"> + <a href="http://jamendo.com">Jamendo</a> | + <a href="http://mediaplayer.yahoo.com/">Yahoo! Media Player</a> | + <a href="http://aksw.org/Projects/DLLearner">DL-Learner</a> + </div> +</div> <!-- end container --> - - <!-- JS at the bottom, faster loading pages --> - <script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script> - - <script type="text/javascript" src="js/mootools-core.js"></script> - <script type="text/javascript" src="js/mootools-more.js"></script> - - <script type="text/javascript" src="js/player.js"></script> - <script type="text/javascript" src="js/interface.js"></script> - <script type="text/javascript" src="js/ajax.js"></script> +<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script> +<script type="text/javascript" src="js/"></script> </body> </html> \ No newline at end of file Deleted: trunk/src/moosique.net/js/ajax.js =================================================================== --- trunk/src/moosique.net/js/ajax.js 2009-08-29 14:08:33 UTC (rev 1832) +++ trunk/src/moosique.net/js/ajax.js 2009-09-01 13:44:00 UTC (rev 1833) @@ -1,93 +0,0 @@ -window.addEvent('domready', function() { - -// handle search requests -$('searchForm').addEvent('submit', function(e) { - - var results = $('results'); - var submit = $('searchSubmit'); - var loading = $('loadingImg'); - - e.stop(); // prevent form submitting the non-ajax way - this.set('send', { - - onRequest: function() { - submit.set('disabled', 'disabled'); // disable submit button until request complete - // show homescreen for resultdisplaying - showTab('home'); - submit.setStyle('display', 'none'); - loading.setStyle('display', 'inline'); - results.set('html', '<h2>Searching...</h2>'); - }, - - onFailure: function() { - results.set('html', '<h2>Unable to process your search. Try again.</h2>'); - }, - - onSuccess: function(response) { - submit.erase('disabled'); // reenable submitbutton - submit.setStyle('display', 'inline'); - loading.setStyle('display', 'none'); - - // if the welcome-text ist present, cut it to help - if ($('welcome')) { - if ($('welcome').get('html').length > 100) { - $('help').set('html', $('welcome').get('html')); - $('welcome').destroy(); - } - } - - // display results - results.set('html', response); - - // addEvents to result-links - makeAddable(); - } - - }); - - // only send form if value is at least 3 - if ($('searchValue').get('value').length > 2) { - this.send(); - } - -}); - -makeAddable(); - -}); - - -/** - * For Recommendations and Search-Results - */ -function makeAddable() { - $$('a.addToPlaylist').each(function(a) { - a.addEvent('click', function(e) { - e.stop(); // dont follow link - // remove the class from preventing adding again - - a.removeClass('addToPlaylist'); - - // TODO, now using xspfs, later we only will use mp3-links - a.set('type', 'application/xspf+xml'); - - // if the Playlist is empty, remove entries - if ($('playlist').getFirst()) { - if ($('playlist').getFirst().get('text') == '') { - $('playlist').empty(); - } - } - - - a.getParent().inject($('playlist')); - if (a.get('title')) { - a.set('text', a.get('title')); - } - - // - mooPlayer.refreshPlaylist(); - showTab('player'); - - }); - }); -} \ No newline at end of file Added: trunk/src/moosique.net/js/index.php =================================================================== --- trunk/src/moosique.net/js/index.php (rev 0) +++ trunk/src/moosique.net/js/index.php 2009-09-01 13:44:00 UTC (rev 1833) @@ -0,0 +1,30 @@ +<?php +/* This little Script takes all included js-files and + * compresses them with the PHP-Variant of js-min + * found here: http://code.google.com/p/jsmin-php/ + */ +header('Content-type: application/javascript'); +// set offset to 365 days = 1 year +$offset = 60 * 60 * 24 * 365; +header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $offset) . ' GMT'); + +ob_start('compress'); + +function compress($buffer) { + include('jsmin-1.1.1.php'); + $buffer = JSMin::minify($buffer); + return $buffer; +} + +/* the javascript-files to include and compress */ +include('mootools-1.2.3-core-yc.js'); +include('player.js'); +include('interface.js'); +include('request.js'); + + +// Since we include the IE6-Fixes with a CC, we don't +// add and compress them here + +ob_end_flush(); +?> \ No newline at end of file Modified: trunk/src/moosique.net/js/interface.js =================================================================== --- trunk/src/moosique.net/js/interface.js 2009-08-29 14:08:33 UTC (rev 1832) +++ trunk/src/moosique.net/js/interface.js 2009-09-01 13:44:00 UTC (rev 1833) @@ -1,22 +1,30 @@ window.addEvent('domready', function() { // switching between search, recommendation and information - -$$('#mainMenu ul li a').each(function(a) { +$$('#mainMenu a').each(function(a) { a.addEvent('click', function(e) { e.stop(); // dont follow link showTab(a.get('class').toString()); }); - }); -$('searchValue').addEvent('keyup', function() { - if (this.get('value').length > 2) { - $('searchSubmit').erase('disabled'); - } else { - $('searchSubmit').set('disabled', 'disabled'); +// update recently listened song if a cookie is set +// update the #recently ol +var rlc = Cookie.read('recentlyListened'); +var rl = JSON.decode(rlc); + +if (rl) { + if (rl.length > 0) { + var count = rl.length; + var recentlyHTML = ''; + for (var i = 0; i < count; i++ ) { + recentlyHTML += '<li>'; + recentlyHTML += rl[i] + '<br />'; + recentlyHTML += '</li>'; + } + document.id('recently').set('html', recentlyHTML); } -}); +} }); @@ -26,10 +34,10 @@ * @param {String} tabID ID of the Tab to show */ function showTab(tabID) { - $$('#mainMenu ul li').removeClass('active'); - $$('#mainMenu ul li a.' + tabID).getParent().toggleClass('active'); - $('content').getChildren().setStyle('display', 'none') - $(tabID).setStyle('display', 'block'); + $$('#mainMenu li').removeClass('active'); + $$('#mainMenu a.' + tabID).getParent().toggleClass('active'); + document.id('content').getChildren().setStyle('display', 'none'); + document.id(tabID).setStyle('display', 'block'); } Added: trunk/src/moosique.net/js/jsmin-1.1.1.php =================================================================== --- trunk/src/moosique.net/js/jsmin-1.1.1.php (rev 0) +++ trunk/src/moosique.net/js/jsmin-1.1.1.php 2009-09-01 13:44:00 UTC (rev 1833) @@ -0,0 +1,291 @@ +<?php +/** + * jsmin.php - PHP implementation of Douglas Crockford's JSMin. + * + * This is pretty much a direct port of jsmin.c to PHP with just a few + * PHP-specific performance tweaks. Also, whereas jsmin.c reads from stdin and + * outputs to stdout, this library accepts a string as input and returns another + * string as output. + * + * PHP 5 or higher is required. + * + * Permission is hereby granted to use this version of the library under the + * same terms as jsmin.c, which has the following license: + * + * -- + * Copyright (c) 2002 Douglas Crockford (www.crockford.com) + * + * 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 shall be used for Good, not Evil. + * + * 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. + * -- + * + * @package JSMin + * @author Ryan Grove <ry...@wo...> + * @copyright 2002 Douglas Crockford <do...@cr...> (jsmin.c) + * @copyright 2008 Ryan Grove <ry...@wo...> (PHP port) + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version 1.1.1 (2008-03-02) + * @link http://code.google.com/p/jsmin-php/ + */ + +class JSMin { + const ORD_LF = 10; + const ORD_SPACE = 32; + + protected $a = ''; + protected $b = ''; + protected $input = ''; + protected $inputIndex = 0; + protected $inputLength = 0; + protected $lookAhead = null; + protected $output = ''; + + // -- Public Static Methods -------------------------------------------------- + + public static function minify($js) { + $jsmin = new JSMin($js); + return $jsmin->min(); + } + + // -- Public Instance Methods ------------------------------------------------ + + public function __construct($input) { + $this->input = str_replace("\r\n", "\n", $input); + $this->inputLength = strlen($this->input); + } + + // -- Protected Instance Methods --------------------------------------------- + + protected function action($d) { + switch($d) { + case 1: + $this->output .= $this->a; + + case 2: + $this->a = $this->b; + + if ($this->a === "'" || $this->a === '"') { + for (;;) { + $this->output .= $this->a; + $this->a = $this->get(); + + if ($this->a === $this->b) { + break; + } + + if (ord($this->a) <= self::ORD_LF) { + throw new JSMinException('Unterminated string literal.'); + } + + if ($this->a === '\\') { + $this->output .= $this->a; + $this->a = $this->get(); + } + } + } + + case 3: + $this->b = $this->next(); + + if ($this->b === '/' && ( + $this->a === '(' || $this->a === ',' || $this->a === '=' || + $this->a === ':' || $this->a === '[' || $this->a === '!' || + $this->a === '&' || $this->a === '|' || $this->a === '?')) { + + $this->output .= $this->a . $this->b; + + for (;;) { + $this->a = $this->get(); + + if ($this->a === '/') { + break; + } elseif ($this->a === '\\') { + $this->output .= $this->a; + $this->a = $this->get(); + } elseif (ord($this->a) <= self::ORD_LF) { + throw new JSMinException('Unterminated regular expression '. + 'literal.'); + } + + $this->output .= $this->a; + } + + $this->b = $this->next(); + } + } + } + + protected function get() { + $c = $this->lookAhead; + $this->lookAhead = null; + + if ($c === null) { + if ($this->inputIndex < $this->inputLength) { + $c = $this->input[$this->inputIndex]; + $this->inputIndex += 1; + } else { + $c = null; + } + } + + if ($c === "\r") { + return "\n"; + } + + if ($c === null || $c === "\n" || ord($c) >= self::ORD_SPACE) { + return $c; + } + + return ' '; + } + + protected function isAlphaNum($c) { + return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1; + } + + protected function min() { + $this->a = "\n"; + $this->action(3); + + while ($this->a !== null) { + switch ($this->a) { + case ' ': + if ($this->isAlphaNum($this->b)) { + $this->action(1); + } else { + $this->action(2); + } + break; + + case "\n": + switch ($this->b) { + case '{': + case '[': + case '(': + case '+': + case '-': + $this->action(1); + break; + + case ' ': + $this->action(3); + break; + + default: + if ($this->isAlphaNum($this->b)) { + $this->action(1); + } + else { + $this->action(2); + } + } + break; + + default: + switch ($this->b) { + case ' ': + if ($this->isAlphaNum($this->a)) { + $this->action(1); + break; + } + + $this->action(3); + break; + + case "\n": + switch ($this->a) { + case '}': + case ']': + case ')': + case '+': + case '-': + case '"': + case "'": + $this->action(1); + break; + + default: + if ($this->isAlphaNum($this->a)) { + $this->action(1); + } + else { + $this->action(3); + } + } + break; + + default: + $this->action(1); + break; + } + } + } + + return $this->output; + } + + protected function next() { + $c = $this->get(); + + if ($c === '/') { + switch($this->peek()) { + case '/': + for (;;) { + $c = $this->get(); + + if (ord($c) <= self::ORD_LF) { + return $c; + } + } + + case '*': + $this->get(); + + for (;;) { + switch($this->get()) { + case '*': + if ($this->peek() === '/') { + $this->get(); + return ' '; + } + break; + + case null: + throw new JSMinException('Unterminated comment.'); + } + } + + default: + return $c; + } + } + + return $c; + } + + protected function peek() { + $this->lookAhead = $this->get(); + return $this->lookAhead; + } +} + +// -- Exceptions --------------------------------------------------------------- +class JSMinException extends Exception {} +?> \ No newline at end of file Added: trunk/src/moosique.net/js/mootools-1.2.3-core-yc.js =================================================================== --- trunk/src/moosique.net/js/mootools-1.2.3-core-yc.js (rev 0) +++ trunk/src/moosique.net/js/mootools-1.2.3-core-yc.js 2009-09-01 13:44:00 UTC (rev 1833) @@ -0,0 +1,356 @@ +//MooTools, <http://mootools.net>, My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2009 Valerio Proietti, <http://mad4milk.net>, MIT Style License. + +var MooTools={version:"1.2.3",build:"4980aa0fb74d2f6eb80bcd9f5b8e1fd6fbb8f607"};var Native=function(k){k=k||{};var a=k.name;var i=k.legacy;var b=k.protect; +var c=k.implement;var h=k.generics;var f=k.initialize;var g=k.afterImplement||function(){};var d=f||i;h=h!==false;d.constructor=Native;d.$family={name:"native"}; +if(i&&f){d.prototype=i.prototype;}d.prototype.constructor=d;if(a){var e=a.toLowerCase();d.prototype.$family={name:e};Native.typize(d,e);}var j=function(n,l,o,m){if(!b||m||!n.prototype[l]){n.prototype[l]=o; +}if(h){Native.genericize(n,l,b);}g.call(n,l,o);return n;};d.alias=function(n,l,p){if(typeof n=="string"){var o=this.prototype[n];if((n=o)){return j(this,l,n,p); +}}for(var m in n){this.alias(m,n[m],l);}return this;};d.implement=function(m,l,o){if(typeof m=="string"){return j(this,m,l,o);}for(var n in m){j(this,n,m[n],l); +}return this;};if(c){d.implement(c);}return d;};Native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=Array.prototype.slice.call(arguments); +return b.prototype[c].apply(d.shift(),d);};}};Native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c);}};Native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b); +};}};(function(){var a={Array:Array,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String};for(var h in a){new Native({name:h,initialize:a[h],protect:true}); +}var d={"boolean":Boolean,"native":Native,object:Object};for(var c in d){Native.typize(d[c],c);}var f={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]}; +for(var e in f){for(var b=f[e].length;b--;){Native.genericize(a[e],f[e][b],true);}}})();var Hash=new Native({name:"Hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getClean()); +}for(var b in a){this[b]=a[b];}return this;}});Hash.implement({forEach:function(b,c){for(var a in this){if(this.hasOwnProperty(a)){b.call(c,this[a],a,this); +}}},getClean:function(){var b={};for(var a in this){if(this.hasOwnProperty(a)){b[a]=this[a];}}return b;},getLength:function(){var b=0;for(var a in this){if(this.hasOwnProperty(a)){b++; +}}return b;}});Hash.alias("forEach","each");Array.implement({forEach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this);}}});Array.alias("forEach","each"); +function $A(b){if(b.item){var a=b.length,c=new Array(a);while(a--){c[a]=b[a];}return c;}return Array.prototype.slice.call(b);}function $arguments(a){return function(){return arguments[a]; +};}function $chk(a){return !!(a||a===0);}function $clear(a){clearTimeout(a);clearInterval(a);return null;}function $defined(a){return(a!=undefined);}function $each(c,b,d){var a=$type(c); +((a=="arguments"||a=="collection"||a=="array")?Array:Hash).each(c,b,d);}function $empty(){}function $extend(c,a){for(var b in (a||{})){c[b]=a[b];}return c; +}function $H(a){return new Hash(a);}function $lambda(a){return($type(a)=="function")?a:function(){return a;};}function $merge(){var a=Array.slice(arguments); +a.unshift({});return $mixin.apply(null,a);}function $mixin(e){for(var d=1,a=arguments.length;d<a;d++){var b=arguments[d];if($type(b)!="object"){continue; +}for(var c in b){var g=b[c],f=e[c];e[c]=(f&&$type(g)=="object"&&$type(f)=="object")?$mixin(f,g):$unlink(g);}}return e;}function $pick(){for(var b=0,a=arguments.length; +b<a;b++){if(arguments[b]!=undefined){return arguments[b];}}return null;}function $random(b,a){return Math.floor(Math.random()*(a-b+1)+b);}function $splat(b){var a=$type(b); +return(a)?((a!="array"&&a!="arguments")?[b]:b):[];}var $time=Date.now||function(){return +new Date;};function $try(){for(var b=0,a=arguments.length;b<a; +b++){try{return arguments[b]();}catch(c){}}return null;}function $type(a){if(a==undefined){return false;}if(a.$family){return(a.$family.name=="number"&&!isFinite(a))?false:a.$family.name; +}if(a.nodeName){switch(a.nodeType){case 1:return"element";case 3:return(/\S/).test(a.nodeValue)?"textnode":"whitespace";}}else{if(typeof a.length=="number"){if(a.callee){return"arguments"; +}else{if(a.item){return"collection";}}}}return typeof a;}function $unlink(c){var b;switch($type(c)){case"object":b={};for(var e in c){b[e]=$unlink(c[e]); +}break;case"hash":b=new Hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d]);}break;default:return c;}return b;}var Browser=$merge({Engine:{name:"unknown",version:0},Platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase()},Features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector)},Plugins:{},Engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getElementsByClassName)?950:925)); +},trident:function(){return(!window.ActiveXObject)?false:((window.XMLHttpRequest)?5:4);},webkit:function(){return(navigator.taintEnabled)?false:((Browser.Features.xpath)?((Browser.Features.query)?525:420):419); +},gecko:function(){return(document.getBoxObjectFor==undefined)?false:((document.getElementsByClassName)?19:18);}}},Browser||{});Browser.Platform[Browser.Platform.name]=true; +Browser.detect=function(){for(var b in this.Engines){var a=this.Engines[b]();if(a){this.Engine={name:b,version:a};this.Engine[b]=this.Engine[b+a]=true; +break;}}return{name:b,version:a};};Browser.detect();Browser.Request=function(){return $try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject("MSXML2.XMLHTTP"); +});};Browser.Features.xhr=!!(Browser.Request());Browser.Plugins.Flash=(function(){var a=($try(function(){return navigator.plugins["Shockwave Flash"].description; +},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");})||"0 r0").match(/\d+/g);return{version:parseInt(a[0]||0+"."+a[1],10)||0,build:parseInt(a[2],10)||0}; +})();function $exec(b){if(!b){return b;}if(window.execScript){window.execScript(b);}else{var a=document.createElement("script");a.setAttribute("type","text/javascript"); +a[(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerText":"text"]=b;document.head.appendChild(a);document.head.removeChild(a);}return b;}Native.UID=1; +var $uid=(Browser.Engine.trident)?function(a){return(a.uid||(a.uid=[Native.UID++]))[0];}:function(a){return a.uid||(a.uid=Native.UID++);};var Window=new Native({name:"Window",legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(a){$uid(a); +if(!a.Element){a.Element=$empty;if(Browser.Engine.webkit){a.document.createElement("iframe");}a.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{}; +}a.document.window=a;return $extend(a,Window.Prototype);},afterImplement:function(b,a){window[b]=Window.Prototype[b]=a;}});Window.Prototype={$family:{name:"window"}}; +new Window(window);var Document=new Native({name:"Document",legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(a){$uid(a);a.head=a.getElementsByTagName("head")[0]; +a.html=a.getElementsByTagName("html")[0];if(Browser.Engine.trident&&Browser.Engine.version<=4){$try(function(){a.execCommand("BackgroundImageCache",false,true); +});}if(Browser.Engine.trident){a.window.attachEvent("onunload",function(){a.window.detachEvent("onunload",arguments.callee);a.head=a.html=a.window=null; +});}return $extend(a,Document.Prototype);},afterImplement:function(b,a){document[b]=Document.Prototype[b]=a;}});Document.Prototype={$family:{name:"document"}}; +new Document(document);Array.implement({every:function(c,d){for(var b=0,a=this.length;b<a;b++){if(!c.call(d,this[b],b,this)){return false;}}return true; +},filter:function(d,e){var c=[];for(var b=0,a=this.length;b<a;b++){if(d.call(e,this[b],b,this)){c.push(this[b]);}}return c;},clean:function(){return this.filter($defined); +},indexOf:function(c,d){var a=this.length;for(var b=(d<0)?Math.max(0,a+d):d||0;b<a;b++){if(this[b]===c){return b;}}return -1;},map:function(d,e){var c=[]; +for(var b=0,a=this.length;b<a;b++){c[b]=d.call(e,this[b],b,this);}return c;},some:function(c,d){for(var b=0,a=this.length;b<a;b++){if(c.call(d,this[b],b,this)){return true; +}}return false;},associate:function(c){var d={},b=Math.min(this.length,c.length);for(var a=0;a<b;a++){d[c[a]]=this[a];}return d;},link:function(c){var a={}; +for(var e=0,b=this.length;e<b;e++){for(var d in c){if(c[d](this[e])){a[d]=this[e];delete c[d];break;}}}return a;},contains:function(a,b){return this.indexOf(a,b)!=-1; +},extend:function(c){for(var b=0,a=c.length;b<a;b++){this.push(c[b]);}return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[$random(0,this.length-1)]:null; +},include:function(a){if(!this.contains(a)){this.push(a);}return this;},combine:function(c){for(var b=0,a=c.length;b<a;b++){this.include(c[b]);}return this; +},erase:function(b){for(var a=this.length;a--;a){if(this[a]===b){this.splice(a,1);}}return this;},empty:function(){this.length=0;return this;},flatten:function(){var d=[]; +for(var b=0,a=this.length;b<a;b++){var c=$type(this[b]);if(!c){continue;}d=d.concat((c=="array"||c=="collection"||c=="arguments")?Array.flatten(this[b]):this[b]); +}return d;},hexToRgb:function(b){if(this.length!=3){return null;}var a=this.map(function(c){if(c.length==1){c+=c;}return c.toInt(16);});return(b)?a:"rgb("+a+")"; +},rgbToHex:function(d){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!d){return"transparent";}var b=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16); +b.push((c.length==1)?"0"+c:c);}return(d)?b:"#"+b.join("");}});Function.implement({extend:function(a){for(var b in a){this[b]=a[b];}return this;},create:function(b){var a=this; +b=b||{};return function(d){var c=b.arguments;c=(c!=undefined)?$splat(c):Array.slice(arguments,(b.event)?1:0);if(b.event){c=[d||window.event].extend(c); +}var e=function(){return a.apply(b.bind||null,c);};if(b.delay){return setTimeout(e,b.delay);}if(b.periodical){return setInterval(e,b.periodical);}if(b.attempt){return $try(e); +}return e();};},run:function(a,b){return this.apply(b,$splat(a));},pass:function(a,b){return this.create({bind:b,arguments:a});},bind:function(b,a){return this.create({bind:b,arguments:a}); +},bindWithEvent:function(b,a){return this.create({bind:b,arguments:a,event:true});},attempt:function(a,b){return this.create({bind:b,arguments:a,attempt:true})(); +},delay:function(b,c,a){return this.create({bind:c,arguments:a,delay:b})();},periodical:function(c,b,a){return this.create({bind:b,arguments:a,periodical:c})(); +}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this));},round:function(a){a=Math.pow(10,a||0);return Math.round(this*a)/a;},times:function(b,c){for(var a=0; +a<this;a++){b.call(c,a,this);}},toFloat:function(){return parseFloat(this);},toInt:function(a){return parseInt(this,a||10);}});Number.alias("times","each"); +(function(b){var a={};b.each(function(c){if(!Number[c]){a[c]=function(){return Math[c].apply(null,[this].concat($A(arguments)));};}});Number.implement(a); +})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);String.implement({test:function(a,b){return((typeof a=="string")?new RegExp(a,b):a).test(this); +},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:this.indexOf(a)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim(); +},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase()); +});},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1"); +},toInt:function(a){return parseInt(this,a||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(b){var a=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); +return(a)?a.slice(1).hexToRgb(b):null;},rgbToHex:function(b){var a=this.match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null;},stripScripts:function(b){var a=""; +var c=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){a+=arguments[1]+"\n";return"";});if(b===true){$exec(a);}else{if($type(b)=="function"){b(a,c); +}}return c;},substitute:function(a,b){return this.replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1);}return(a[c]!=undefined)?a[c]:""; +});}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){for(var a in this){if(this.hasOwnProperty(a)&&this[a]===b){return a;}}return null; +},hasValue:function(a){return(Hash.keyOf(this,a)!==null);},extend:function(a){Hash.each(a||{},function(c,b){Hash.set(this,b,c);},this);return this;},combine:function(a){Hash.each(a||{},function(c,b){Hash.include(this,b,c); +},this);return this;},erase:function(a){if(this.hasOwnProperty(a)){delete this[a];}return this;},get:function(a){return(this.hasOwnProperty(a))?this[a]:null; +},set:function(a,b){if(!this[a]||this.hasOwnProperty(a)){this[a]=b;}return this;},empty:function(){Hash.each(this,function(b,a){delete this[a];},this); +return this;},include:function(a,b){if(this[a]==undefi... [truncated message content] |