1
0
mirror of https://github.com/balkian/go5ears.git synced 2024-12-22 17:38:11 +00:00

Updated jquery-ui and GoEar scraper

This commit is contained in:
J.Fernando Sánchez 2013-01-24 21:40:42 +01:00
parent 243488e42e
commit b8e884b354
9 changed files with 25608 additions and 14 deletions

View File

@ -16,7 +16,7 @@ html,body {
#wrapper {
position:relative;
height: auto !important;
min-height: 80%;
min-height:80%;
margin: 0 auto 0;
}
#headerPage {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -194,13 +194,18 @@ $(document).ready(function(){
$(function() {
$( ".sortable" ).sortable();
$( ".sortable" ).disableSelection();
$( "#accordion" ).accordion({fillSpace:true});
$( "#accordion" ).accordion({heightStyle: "fill"});
$(window).resize(function(){
$("#accordion").accordion("refresh");
});
});
$('.accordion .head').click(function() {
$(this).next().toggle();
return false;
}).next().hide();
function Song(id, group, title, quality) {
var self = this;

9555
js/jquery-1.9.0.js vendored Normal file

File diff suppressed because it is too large Load Diff

14850
js/jquery-ui-1.10.0.custom.js vendored Normal file

File diff suppressed because it is too large Load Diff

6
js/jquery-ui-1.10.0.custom.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -38,21 +38,21 @@ app.get('/search', function(req, resp){
html += data;
}).on('end', function() {
// the whole of webpage data has been collected. parsing time!
$(html).find('a.play').each(function(i,elem){
var prev = $(elem).prevAll('a');
var title = $(prev).children('.song').text();
var quality = $(elem).next("p").text().split("|")[0].trim();
var group = $(prev).children('.group').text();
var id = prev.attr('href').split('/')[1];
resultsol = $(html).find('ol#results');
$(resultsol).find('li').each(function(i,elem){
var a=$(elem).find('a');
var id=a.attr('href').split('/')[1];
var title = a.find('span.songtitleinfo').html();
var group = a.find('span.groupnameinfo').html();
var quality = $(elem).find('p.comment').html().split('|')[0];
if(typeof title != 'undefined' && typeof group != 'undefined' ){
results.push({id:id,title:title,group:group,quality:quality})
}
});
console.log("Results:"+JSON.stringify(results));
resp.send(JSON.stringify(results));
});
});
});
});
app.get('/play', function(req,resp){

View File

@ -2,9 +2,9 @@
<html>
<head>
<link rel='stylesheet' media='screen' href="css/main.css" />
<link type="text/css" href="css/ui-darkness/jquery-ui-1.8.24.custom.css" rel="stylesheet">
<link type="text/css" href="css/ui-darkness/jquery-ui-1.10.0.custom.css" rel="stylesheet">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.24.custom.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.0.custom.min.js"></script>
<script type='text/javascript' src='js/knockout-2.1.0.js'></script>
<script type='text/javascript' src='https://github.com/downloads/rniemeyer/knockout-sortable/knockout-sortable.js'></script>
<script type='text/javascript' src='js/app.js'></script>
@ -39,7 +39,6 @@
<div id="wrapper">
<div id="accordion" class="ui-accordion ui-widget ui-helper-reset ui-accordion-icons">
<h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role="tab" aria-expanded="true" aria-selected="true" tabindex="0">
<span class="ui-icon ui-icon-triangle-1-s"></span>
<a href="#" tabindex="0">Listen</a>
</h3>
<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="height: 14px; display: block; overflow: auto; padding-top: 11px; padding-bottom: 11px; " role="tabpanel">
@ -57,7 +56,7 @@
<span class="deletesong ui-icon ui-icon-trash" data-bind="click: $root.removeSong">Remove</span>
</li>
</ul>
</div> <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role="tab" aria-expanded="true" aria-selected="true" tabindex="0"><span class="ui-icon ui-icon-triangle-1-s"></span>
</div> <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role="tab" aria-expanded="true" aria-selected="true" tabindex="0">
<a href="#" tabindex="-1">Search</a>
</h3>
<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="height: 14px; display: block; overflow: auto; padding-top: 11px; padding-bottom: 11px; " role="tabpanel">