From 203e7ca3a127270873931b623b0ba2bac955d1f0 Mon Sep 17 00:00:00 2001 From: Patrick Speiser Date: Fri, 28 Sep 2012 21:28:35 +0200 Subject: [PATCH] More groundwork for home page ajax --- .gitignore | 32 + data/interfaces/default/index.html | 96 ++- data/js/libs/jquery.dataTables.min.js | 801 +++++--------------------- data/js/libs/jquery.js | 2 + headphones/webserve.py | 11 +- 5 files changed, 233 insertions(+), 709 deletions(-) create mode 100644 data/js/libs/jquery.js diff --git a/.gitignore b/.gitignore index 74e29c78..b557314a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ + # Compiled source # ################### *.pyc *.py~ +*.pyproj +*.sln # Logs and databases # ###################### @@ -19,3 +22,32 @@ cache/* ehthumbs.db Icon? Thumbs.db + +#ignore thumbnails created by windows +Thumbs.db +#Ignore files build by Visual Studio +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* \ No newline at end of file diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index bcd8cf2b..f33920e0 100644 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -8,58 +8,13 @@ - Artist Name - Status - Latest Album - Have + Artist Name + Status + Latest Album + Have - %for artist in artists: - <% - totaltracks = artist['TotalTracks'] - havetracks = artist['HaveTracks'] - if not havetracks: - havetracks = 0 - try: - percent = (havetracks*100.0)/totaltracks - if percent > 100: - percent = 100 - except (ZeroDivisionError, TypeError): - percent = 0 - totaltracks = '?' - - if artist['ReleaseDate'] and artist['LatestAlbum']: - releasedate = artist['ReleaseDate'] - albumdisplay = '%s (%s)' % (artist['LatestAlbum'], artist['ReleaseDate']) - if releasedate > helpers.today(): - grade = 'A' - else: - grade = 'Z' - elif artist['LatestAlbum']: - releasedate = '' - grade = 'Z' - albumdisplay = '%s' % artist['LatestAlbum'] - else: - releasedate = '' - grade = 'Z' - albumdisplay = 'None' - - if artist['Status'] == 'Paused': - grade = 'X' - - if artist['Status'] == 'Loading': - grade = 'L' - - %> - -
- ${artist['ArtistName']} - ${artist['Status']} - ${albumdisplay} -
${havetracks}/${totaltracks}
- - %endfor @@ -72,7 +27,9 @@