From 41672f96c76744e7051da0c7b2e81164faf5ae33 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Fri, 21 Sep 2012 14:29:20 +0100 Subject: [PATCH] removed unnecessary file --- .../base/javascript/modules/pdf-viewer.js | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 ckan/public/base/javascript/modules/pdf-viewer.js diff --git a/ckan/public/base/javascript/modules/pdf-viewer.js b/ckan/public/base/javascript/modules/pdf-viewer.js deleted file mode 100644 index 1a8a0d95e7b..00000000000 --- a/ckan/public/base/javascript/modules/pdf-viewer.js +++ /dev/null @@ -1,45 +0,0 @@ -// data viewer module -// resizes the iframe when the content is loaded -this.ckan.module('data-viewer', function (jQuery, _) { - return { - initialize: function () { - jQuery.proxyAll(this, /_on/); - this.el.on('load', this._onLoad); - this._FirefoxFix(); - }, - - _onLoad: function() { - var that = this; - var loc = $('body').data('site-root'); - // see if page is in part of the same domain - if (this.el.attr('src').substring(0, loc.length) === loc) { - this._recalibrate(); - this.el.contents().find('body').resize(function() { - // this might break in firefox on the graph page - that._recalibrate(); - }); - } - else { - this.el.animate({height: 600}, 600); - } - }, - - _recalibrate: function() { - // save reference to this to use in timeout - var that = this; - resizeTimer = setTimeout(function() { - var height = that.el.contents().height(); - that.el.animate({height: height}, height); - }, 100); - }, - - // firefox caches iframes so force it to get fresh content - _FirefoxFix: function() { - if(/#$/.test(this.el.src)){ - this.el.src = this.el.src.substr(0, this.src.length - 1); - } else { - this.el.src = this.el.src + '#'; - } - } - }; -});