Browse Source

Optimize initial requests

pull/1680/head
Ruud 12 years ago
parent
commit
2f5cb81029
  1. 2
      couchpotato/core/_base/updater/static/updater.js
  2. 6
      couchpotato/core/notifications/core/static/notification.js
  3. 13
      couchpotato/core/plugins/movie/static/list.js
  4. 2
      couchpotato/static/scripts/page/wanted.js
  5. 9
      couchpotato/templates/index.html

2
couchpotato/core/_base/updater/static/updater.js

@ -5,7 +5,7 @@ var UpdaterBase = new Class({
initialize: function(){
var self = this;
App.addEvent('load', self.info.bind(self, 1000))
App.addEvent('load', self.info.bind(self, 2000))
App.addEvent('unload', function(){
if(self.timer)
clearTimeout(self.timer);

6
couchpotato/core/notifications/core/static/notification.js

@ -28,14 +28,10 @@ var NotificationBase = new Class({
$(App.block.notification).inject(App.getBlock('search'), 'after');
self.badge = new Element('div.badge').inject(App.block.notification, 'top').hide();
/* App.getBlock('notification').addLink(new Element('a.more', {
'href': App.createUrl('notifications'),
'text': 'Show older notifications'
})); */
});
window.addEvent('load', function(){
self.startInterval.delay(Browser.safari ? 100 : 0, self)
self.startInterval.delay(2000, self)
});
},

13
couchpotato/core/plugins/movie/static/list.js

@ -255,6 +255,7 @@ var MovieList = new Class({
});
// Get available chars and highlight
if(self.navigation.isDisplayed() || self.navigation.isVisible())
Api.request('movie.available_chars', {
'data': Object.merge({
'status': self.options.status
@ -274,17 +275,7 @@ var MovieList = new Class({
self.navigation_menu.addLink(menu_item);
})
else
self.navigation_menu.hide()
self.nav_scrollspy = new ScrollSpy({
min: 10,
onEnter: function(){
self.navigation.addClass('float')
},
onLeave: function(){
self.navigation.removeClass('float')
}
});
self.navigation_menu.hide();
},

2
couchpotato/static/scripts/page/wanted.js

@ -30,7 +30,7 @@ Page.Wanted = new Class({
$(self.wanted).inject(self.el);
// Check if search is in progress
self.startProgressInterval();
self.startProgressInterval.delay(4000, self);
}
},

9
couchpotato/templates/index.html

@ -20,6 +20,15 @@
<script type="text/javascript" src="https://www.youtube.com/player_api" defer="defer"></script>
<script type="text/javascript">
window.addEvent('load', function() {
setTimeout(function(){
window.scrollTo(0, 1);
window.scrollTo(0, 0);
}, 100);
});
window.addEvent('domready', function() {
new Uniform();

Loading…
Cancel
Save