summaryrefslogtreecommitdiff
path: root/program/js/tinymce/plugins/autoresize/plugin.min.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-01 14:24:05 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-01 14:24:05 +0200
commita8f4d847369496981f96825bb7390a44f9428a84 (patch)
tree2a999deedf83948c8910c16c4182543e9ff6ae9f /program/js/tinymce/plugins/autoresize/plugin.min.js
parent5af3b33f97695bd174c36851117523cd37569bf8 (diff)
Update to TinyMCE 4.1.3 + small code improvements
Diffstat (limited to 'program/js/tinymce/plugins/autoresize/plugin.min.js')
-rw-r--r--program/js/tinymce/plugins/autoresize/plugin.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/js/tinymce/plugins/autoresize/plugin.min.js b/program/js/tinymce/plugins/autoresize/plugin.min.js
index fed1d4f86..dc88d852d 100644
--- a/program/js/tinymce/plugins/autoresize/plugin.min.js
+++ b/program/js/tinymce/plugins/autoresize/plugin.min.js
@@ -1 +1 @@
-tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function i(n){var s,r,g,u,l,m,h,d,f=tinymce.DOM;if(r=e.getDoc()){if(g=r.body,u=r.documentElement,l=o.autoresize_min_height,!g||n&&"setcontent"===n.type&&n.initial||t())return void(g&&u&&(g.style.overflowY="auto",u.style.overflowY="auto"));h=e.dom.getStyle(g,"margin-top",!0),d=e.dom.getStyle(g,"margin-bottom",!0),m=g.offsetHeight+parseInt(h,10)+parseInt(d,10),(isNaN(m)||0>=m)&&(m=tinymce.Env.ie?g.scrollHeight:tinymce.Env.webkit&&0===g.clientHeight?0:g.offsetHeight),m>o.autoresize_min_height&&(l=m),o.autoresize_max_height&&m>o.autoresize_max_height?(l=o.autoresize_max_height,g.style.overflowY="auto",u.style.overflowY="auto"):(g.style.overflowY="hidden",u.style.overflowY="hidden",g.scrollTop=0),l!==a&&(s=l-a,f.setStyle(f.get(e.id+"_ifr"),"height",l+"px"),a=l,tinymce.isWebKit&&0>s&&i(n))}}function n(e,t,o){setTimeout(function(){i({}),e--?n(e,t,o):o&&o()},t)}var o=e.settings,a=0;e.settings.inline||(o.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),o.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t=e.getParam("autoresize_overflow_padding",1);e.dom.setStyles(e.getBody(),{paddingBottom:e.getParam("autoresize_bottom_margin",50),paddingLeft:t,paddingRight:t})}),e.on("nodechange setcontent keyup FullscreenStateChanged",i),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){n(20,100,function(){n(5,1e3)})}),e.addCommand("mceAutoResize",i))}); \ No newline at end of file
+tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function i(o){var r,s,g,m,l,d,u,h,f,c,_,p,y=tinymce.DOM;if(s=e.getDoc()){if(g=s.body,m=s.documentElement,l=n.autoresize_min_height,!g||o&&"setcontent"===o.type&&o.initial||t())return void(g&&m&&(g.style.overflowY="auto",m.style.overflowY="auto"));u=e.dom.getStyle(g,"margin-top",!0),h=e.dom.getStyle(g,"margin-bottom",!0),f=e.dom.getStyle(g,"padding-top",!0),c=e.dom.getStyle(g,"padding-bottom",!0),_=e.dom.getStyle(g,"border-top-width",!0),p=e.dom.getStyle(g,"border-bottom-width",!0),d=g.offsetHeight+parseInt(u,10)+parseInt(h,10)+parseInt(f,10)+parseInt(c,10)+parseInt(_,10)+parseInt(p,10),(isNaN(d)||0>=d)&&(d=tinymce.Env.ie?g.scrollHeight:tinymce.Env.webkit&&0===g.clientHeight?0:g.offsetHeight),d>n.autoresize_min_height&&(l=d),n.autoresize_max_height&&d>n.autoresize_max_height?(l=n.autoresize_max_height,g.style.overflowY="auto",m.style.overflowY="auto"):(g.style.overflowY="hidden",m.style.overflowY="hidden",g.scrollTop=0),l!==a&&(r=l-a,y.setStyle(e.iframeElement,"height",l+"px"),a=l,tinymce.isWebKit&&0>r&&i(o))}}function o(e,t,n){setTimeout(function(){i({}),e--?o(e,t,n):n&&n()},t)}var n=e.settings,a=0;e.settings.inline||(n.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),n.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t=e.getParam("autoresize_overflow_padding",1);e.dom.setStyles(e.getBody(),{paddingBottom:e.getParam("autoresize_bottom_margin",50),paddingLeft:t,paddingRight:t})}),e.on("nodechange setcontent keyup FullscreenStateChanged",i),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){o(20,100,function(){o(5,1e3)})}),e.addCommand("mceAutoResize",i))}); \ No newline at end of file