--- /dev/null
+(function( jQuery ) {
+ var matched,
+ userAgent = navigator.userAgent || "";
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://api.jquery.com/jQuery.browser
+ // jQuery.uaMatch maintained for back-compat
+ jQuery.uaMatch = function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
+ /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) ||
+ [];
+
+ return {
+ browser: match[ 1 ] || "",
+ version: match[ 2 ] || "0"
+ };
+ };
+
+ matched = jQuery.uaMatch( userAgent );
+
+ jQuery.browser = {};
+
+ if ( matched.browser ) {
+ jQuery.browser[ matched.browser ] = true;
+ jQuery.browser.version = matched.version;
+ }
+
+ // Deprecated, use jQuery.browser.webkit instead
+ // Maintained for back-compat only
+ if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+ }
+
+}( jQuery ));
\ No newline at end of file
--- /dev/null
+/*
+ Plugin: iframe autoheight jQuery Plugin
+ Version: 1.9.5
+ Description: when the page loads set the height of an iframe based on the height of its contents
+ see README: http://github.com/house9/jquery-iframe-auto-height
+*/
+!function(e){e.fn.iframeAutoHeight=function(t){function i(e){h.debug&&h.debug===!0&&window.console&&console.log(e)}function n(t,n){i("Diagnostics from '"+n+"'");try{i(" "+e(t,window.top.document).contents().find("body")[0].scrollHeight+" for ...find('body')[0].scrollHeight"),i(" "+e(t.contentWindow.document).height()+" for ...contentWindow.document).height()"),i(" "+e(t.contentWindow.document.body).height()+" for ...contentWindow.document.body).height()")}catch(r){i(" unable to check in this state")}i("End diagnostics -> results vary by browser and when diagnostics are requested")}var r;if(e.browser===r){var o=[];return o.push("WARNING: you appear to be using a newer version of jquery which does not support the $.browser variable."),o.push("The jQuery iframe auto height plugin relies heavly on the $.browser features."),o.push("Install jquery-browser: https://raw.github.com/house9/jquery-iframe-auto-height/master/release/jquery.browser.js"),alert(o.join("\n")),e}var h=e.extend({heightOffset:0,minHeight:0,maxHeight:0,callback:function(){},animate:!1,debug:!1,diagnostics:!1,resetToMinHeight:!1,triggerFunctions:[],heightCalculationOverrides:[]},t);return i(h),this.each(function(){function t(e){var t=null;return jQuery.each(o,function(i,n){return e[n]?(t=s[n],!1):void 0}),null===t&&(t=s["default"]),t}function r(r){h.diagnostics&&n(r,"resizeHeight"),h.resetToMinHeight&&h.resetToMinHeight===!0&&(r.style.height=h.minHeight+"px");var o=e(r,window.top.document).contents().find("body"),s=t(e.browser),a=s(r,o,h,e.browser);i(a),a<h.minHeight&&(i("new height is less than minHeight"),a=h.minHeight),h.maxHeight>0&&a>h.maxHeight&&(i("new height is greater than maxHeight"),a=h.maxHeight),a+=h.heightOffset,i("New Height: "+a),h.animate?e(r).animate({height:a+"px"},{duration:500}):r.style.height=a+"px",h.callback.apply(e(r),[{newFrameHeight:a}])}var o=["webkit","mozilla","msie","opera"],s={};s["default"]=function(e,t,i){return t[0].scrollHeight+i.heightOffset},jQuery.each(o,function(e,t){s[t]=s["default"]}),jQuery.each(h.heightCalculationOverrides,function(e,t){s[t.browser]=t.calculation});var a=0,c=this.contentDocument||this.contentWindow.document;if(i(this),h.diagnostics&&n(this,"each iframe"),h.triggerFunctions.length>0){i(h.triggerFunctions.length+" trigger Functions");for(var u=0;u<h.triggerFunctions.length;u++)h.triggerFunctions[u](r,this)}if(e.browser.webkit||e.browser.opera||e.browser.chrome){i("browser is webkit or opera"),e(this).load(function(){var e=0,t=this,n=function(){r(t)};0===a?e=500:t.style.height=h.minHeight+"px",i("load delay: "+e),setTimeout(n,e),a++});var g=e(this).attr("src");e(this).attr("src",""),e(this).attr("src",g)}else"complete"===c.readyState?r(this):e(this).load(function(){r(this)})})}}(jQuery);;
\ No newline at end of file
{% extends "telemeta/admin.html" %}
{% load i18n %}
+{% block extra_javascript %}
+{{ block.super }}
+<script src="{{ STATIC_URL }}telemeta/js/jquery.iframe-auto-height.plugin.1.9.5.min.js" type="text/javascript"
+></script>
+<script src="{{ STATIC_URL }}telemeta/js/jquery.browser.js" type="text/javascript"></script>
+{% endblock %}
+
{% block title %}
<h1><img src="{{ STATIC_URL }}telemeta/images/admin_red.png" style="vertical-align:middle" /> {% trans "Administration" %} > {% trans "General" %}</h1>
{% endblock %}
{% block tabcontents %}
- <iframe align="middle" frameborder="0" width="100%" height="600px" src="{% url "telemeta-home" %}admin/django/" />
+ <iframe align="middle" frameborder="0" width="100%" src="{% url "telemeta-home" %}admin/django/"></iframe>
+
+ <script type='text/javascript'>
+ $('iframe').iframeAutoHeight();
+ </script>
+
{% endblock %}
+
+