Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
rolling back progress bar change pending fix for multiple spinners
Browse files Browse the repository at this point in the history
  • Loading branch information
rgarcia committed Apr 14, 2012
1 parent fe90484 commit 07a2d15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion static/js/views/fullwindow.js
Expand Up @@ -20,7 +20,6 @@ define([

onResize: function() {
// make sure the TOC div reaches the bottom of the screen
console.log('[Window height: ' + $(window).height() + '.]');
var windowHeight = $(window).height();
this.$tocWell.height(windowHeight - 100);

Expand Down
4 changes: 3 additions & 1 deletion static/js/views/languageview.js
Expand Up @@ -96,6 +96,7 @@ define([
this.mainResultsView.startSpinner();
var self = this;
this.collection.fetch({
/*
xhr: function() {
var xhr = jQuery.ajaxSettings.xhr();
if (xhr instanceof window.XMLHttpRequest) {
Expand All @@ -108,12 +109,13 @@ define([
}
return xhr;
},
*/
success: function(coll, resp) {
console.log('[Success fetching ' + self.languageName + '.]');
self.searchHeaderView.lastQuery = null; // TODO: use abstractions
self.searchHeaderView.onSearch();
self.mainResultsView.spinner.stop();
self.mainResultsView.removeDownlaodProgress();
//self.mainResultsView.removeDownlaodProgress();
self.active = true;
},
});
Expand Down
7 changes: 6 additions & 1 deletion static/js/views/searchresults.js
Expand Up @@ -27,14 +27,19 @@ define([
shadow : false // Whether to render a shadow
};
this.spinner = new Spinner(opts).spin();
$(this.spinner.el).css('margin-top', $(window).height()/4);
$(this.spinner.el).css('margin-left', $(window).width()/4);
/*
var halfHeight = opts.radius + opts.length + opts.width;
$(this.spinner.el).css('margin-top', $(window).height()/4 + halfHeight);
$(this.spinner.el).css('margin-left', "50%");
$(this.spinner.el).css("height", halfHeight + "px");
*/
$(this.el).append(this.spinner.el);
}
},

/*
setDownloadProgress: function(receivedB, totalB) {
if (!this.options.spinner)
return;
Expand All @@ -59,7 +64,7 @@ define([
this.progressEl = undefined;
}
},

*/
render: function() {
console.log('[Data loaded, rendering models.]');
// render a subview for each model in the collection
Expand Down

0 comments on commit 07a2d15

Please sign in to comment.