- // resize the iframe based on internal contents on page load
- function autoResize(id){
- var newheight;
- var newwidth;
-
- if(document.getElementById){
- newheight = document.getElementById(id).contentWindow.document .body.scrollHeight;
- newwidth = document.getElementById(id).contentWindow.document .body.scrollWidth;
- }
-
- document.getElementById(id).height = (newheight+ 10) + "px";
- document.getElementById(id).width= (newwidth + 5) + "px";
- //alert('height: ' + newheight);
+// resize the iframe based on internal contents on page load
+function autoResize(id){
+ var newheight;
+ var newwidth;
+
+ if(document.getElementById){
+ newheight = document.getElementById(id).contentWindow.document .body.scrollHeight;
+ newwidth = document.getElementById(id).contentWindow.document .body.scrollWidth;
}
+ document.getElementById(id).height = (newheight+ 10) + "px";
+ document.getElementById(id).width= (newwidth + 5) + "px";
+
+
+ var currFFZoom = 1;
+ var currIEZoom = 100;
+ var frameBody = $('#noteframe').contents().find('body');
+
+ $('#plus-btn').on('click',function(){
+ if ($.browser.mozilla){
+ var step = 0.25;
+ currFFZoom += step;
+ frameBody.css('MozTransform','scale(' + currFFZoom + ')');
+ } else {
+ var step = 25;
+ currIEZoom += step;
+ frameBody.css('zoom', ' ' + currIEZoom + '%');
+ }
+ });
+
+ $('#minus-btn').on('click',function(){
+ if ($.browser.mozilla){
+ var step = 0.25;
+ currFFZoom -= step;
+ frameBody.css('MozTransform','scale(' + currFFZoom + ')');
+ } else {
+ var step = 25;
+ currIEZoom -= step;
+ frameBody.css('zoom', ' ' + currIEZoom + '%');
+ }
+ });
+}
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/lightbox.css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<!-- include Font Awesome -->
- <link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
+ <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>