Skip to content

Commit

Permalink
library sort
Browse files Browse the repository at this point in the history
  • Loading branch information
comster committed Aug 12, 2012
1 parent d58daf3 commit ce380b6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/jukebox/web/cache.manifest
@@ -1,5 +1,5 @@
CACHE MANIFEST
# ver 0.204
# ver 0.3122

CACHE:
index.css
Expand Down
2 changes: 1 addition & 1 deletion apps/jukebox/web/houseAuth.js
Expand Up @@ -335,7 +335,7 @@
$localFile.find('progress').show();
uploadFile(f, {complete: function(data){
$localFile.remove();
self.updateAvatar(data.filename);
self.updateAvatar(data.file.filename);
}, progress: function(percent){
self.$el.find('progress').val(percent);
}});
Expand Down
10 changes: 6 additions & 4 deletions apps/jukebox/web/jukebox.js
Expand Up @@ -73,8 +73,10 @@
this.views[i].$el.removeAttr('selected');
}
this.views[viewName].render();
//this.views[viewName].$el.show();
this.views[viewName].$el.attr('selected', true);
if(viewName == 'Player') {
this.views['Previewer'].$el.attr('selected', true);
}

this.options.$frames.attr('data-sel', viewName);

Expand Down Expand Up @@ -1056,7 +1058,7 @@
var skip = 0;
var loadMore = function(limit) {
skip = skip + limit;
self.fetch({add:true, data: {sort: 'playCount-', limit: limit, skip: skip}, complete: fetchComplete});
self.fetch({add:true, data: {sort: 'playCount', limit: limit, skip: skip}, complete: fetchComplete});
}
var fetchComplete = function(xresp){
if(xresp.responseText && xresp.responseText.length > 0 && xresp.responseText !== '[]') {
Expand All @@ -1066,7 +1068,7 @@
}, 10000);
}
}
this.fetch({add:true, data: {sort: 'playCount-', limit: 100}});
this.fetch({add:true, data: {sort: 'playCount', limit: 100}});
}, search: function(term) {
var self = this;
if(this.searching) return;
Expand Down Expand Up @@ -1107,7 +1109,7 @@
} else {
var inserted = false;
self.$ul.find('li').each(function(i,e){
if(!inserted && $(e).attr('data-rank') < doc.get('playCount')) {
if(!inserted && $(e).attr('data-rank') > doc.get('playCount')) {
$(e).before($li);
inserted = true;
}
Expand Down
1 change: 1 addition & 0 deletions apps/jukebox/web/test
@@ -0,0 +1 @@
function (){var y=this;if(!TWTR.Widget.hasLoadedStyleSheet){window.setTimeout(function(){y.render.call(y)},50);return this}this.setTheme(this.theme,this._isCreator);if(this._isProfileWidget){h.add(this.widgetEl,"twtr-widget-profile")}if(this._isScroll){h.add(this.widgetEl,"twtr-scroll")}if(!this._isLive&&!this._isScroll){this.wh[1]="auto"}if(this._isSearchWidget&&this._isFullScreen){document.title="Twitter search: "+escape(this.searchString)}this.widgetEl.innerHTML=this._getWidgetHtml();var x=this.byClass("twtr-timeline","div");if(this._isLive&&!this._isFullScreen){var z=function(AA){if(y._behavior==="all"){return }if(J.call(this,AA)){y.pause.call(y)}};var w=function(AA){if(y._behavior==="all"){return }if(J.call(this,AA)){y.resume.call(y)}};this.removeEvents=function(){M.remove(x,"mouseover",z);M.remove(x,"mouseout",w)};M.add(x,"mouseover",z);M.add(x,"mouseout",w)}this._rendered=true;this._ready();return this}
3 changes: 3 additions & 0 deletions endPoints/files/index.js
Expand Up @@ -285,6 +285,9 @@ var spawn = require('child_process').spawn;
if(exif.Title) {
newSong.title = exif.Title;
newSong.ss += exif.Title;
} else {
newSong.title = newSong.filename;
newSong.ss += newSong.filename;
}
if(exif.Album) {
newSong.album = exif.Album;
Expand Down
6 changes: 3 additions & 3 deletions endPoints/index.js
Expand Up @@ -47,17 +47,17 @@
endpoints.push({"apps": require('./apps')(house)});

// File system
endpoints.push({"fs": require('./fs')(house, {
/*endpoints.push({"fs": require('./fs')(house, {
ds: house.dataSources.fileSystem,
path: process.cwd()
})});
})});*/

//
// ## Mongo Collections
//
// Information about the collections
//
endpoints.push({"collections": require('./collections')(house, {ds: mongoDs})});
//endpoints.push({"collections": require('./collections')(house, {ds: mongoDs})});

//
// Mongo GridFs
Expand Down

0 comments on commit ce380b6

Please sign in to comment.