From 98c8a47dd0abab808aa9331d26db24e6c49615a3 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 26 May 2012 11:01:55 +0200 Subject: [PATCH] IE9 fixes --- couchpotato/core/helpers/request.py | 11 ++++++++--- couchpotato/core/plugins/movie/static/search.js | 10 +++++++--- couchpotato/static/scripts/couchpotato.js | 4 ++-- couchpotato/static/style/main.css | 1 + 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/couchpotato/core/helpers/request.py b/couchpotato/core/helpers/request.py index 16a2f73d..07aa18e8 100644 --- a/couchpotato/core/helpers/request.py +++ b/couchpotato/core/helpers/request.py @@ -1,7 +1,7 @@ from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import natcmp from flask.globals import current_app -from flask.helpers import json +from flask.helpers import json, make_response from libs.werkzeug.urls import url_decode from urllib import unquote import flask @@ -72,6 +72,11 @@ def jsonify(mimetype, *args, **kwargs): def jsonified(*args, **kwargs): callback = getParam('callback_func', None) if callback: - return padded_jsonify(callback, *args, **kwargs) + content = padded_jsonify(callback, *args, **kwargs) else: - return jsonify('application/json', *args, **kwargs) + content = jsonify('application/json', *args, **kwargs) + + response = make_response(content) + response.cache_control.no_cache = True + + return response diff --git a/couchpotato/core/plugins/movie/static/search.js b/couchpotato/core/plugins/movie/static/search.js index 438ba9aa..bfb3b0d4 100644 --- a/couchpotato/core/plugins/movie/static/search.js +++ b/couchpotato/core/plugins/movie/static/search.js @@ -221,7 +221,9 @@ Block.Search.Item = new Class({ } }).adopt( self.thumbnail = info.images && info.images.poster.length > 0 ? new Element('img.thumbnail', { - 'src': info.images.poster[0] + 'src': info.images.poster[0], + 'height': null, + 'width': null }) : null, new Element('div.info').adopt( self.title = new Element('h2', { @@ -332,8 +334,10 @@ Block.Search.Item = new Class({ self.options.adopt( new Element('div').adopt( - self.info.images && self.info.images.poster.length > 0 ? new Element('img.thumbnail', { - 'src': self.info.images.poster[0] + self.option_thumbnail = self.info.images && self.info.images.poster.length > 0 ? new Element('img.thumbnail', { + 'src': self.info.images.poster[0], + 'height': null, + 'width': null }) : null, self.info.in_wanted ? new Element('span.in_wanted', { 'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label diff --git a/couchpotato/static/scripts/couchpotato.js b/couchpotato/static/scripts/couchpotato.js index e2c23b82..c3a63397 100644 --- a/couchpotato/static/scripts/couchpotato.js +++ b/couchpotato/static/scripts/couchpotato.js @@ -24,8 +24,8 @@ var CouchPotato = new Class({ if(window.location.hash) History.handleInitialState(); - else - self.openPage(window.location.pathname); + + self.openPage(window.location.pathname); History.addEvent('change', self.openPage.bind(self)); self.c.addEvent('click:relay(a[href^=/]:not([target]))', self.pushState.bind(self)); diff --git a/couchpotato/static/style/main.css b/couchpotato/static/style/main.css index d580368c..884d8724 100644 --- a/couchpotato/static/style/main.css +++ b/couchpotato/static/style/main.css @@ -437,6 +437,7 @@ body > .spinner, .mask{ border-radius:3px; border: 1px solid #252930; box-shadow: inset 0 1px 0px rgba(255,255,255,0.20), 0 0 3px rgba(0,0,0, 0.2); + background: rgb(55,62,74); background-image: -webkit-gradient( linear, left bottom,