X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FNoAuth%2FRichText%2Fckeditor%2Fplugins%2Fautogrow%2Fplugin.js;h=3437de2219a02228e8b24ad996fabed6cd6f7444;hb=679854b8bbc65d112071111bbd7f34a6a481fb30;hp=a399376a491cfee70ea020797cc1a05fee6f66a0;hpb=9b328d940af56b9924a342192ebb0790478fa705;p=freeside.git diff --git a/rt/share/html/NoAuth/RichText/ckeditor/plugins/autogrow/plugin.js b/rt/share/html/NoAuth/RichText/ckeditor/plugins/autogrow/plugin.js index a399376a4..3437de221 100644 --- a/rt/share/html/NoAuth/RichText/ckeditor/plugins/autogrow/plugin.js +++ b/rt/share/html/NoAuth/RichText/ckeditor/plugins/autogrow/plugin.js @@ -1,6 +1,6 @@ -/* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ -(function(){var a=function(b){var c=b.document,d=b.window.getViewPaneSize().height,e;if(CKEDITOR.env.ie)e=c.getBody().$.scrollHeight+24;else e=c.getDocumentElement().$.offsetHeight;var f=b.config.autoGrow_minHeight,g=b.config.autoGrow_maxHeight;f==undefined&&(b.config.autoGrow_minHeight=f=200);if(f)e=Math.max(e,f);if(g)e=Math.min(e,g);if(e!=d){e=b.fire('autoGrow',{currentHeight:d,newHeight:e}).newHeight;b.resize(b.container.getStyle('width'),e,true);}};CKEDITOR.plugins.add('autogrow',{init:function(b){for(var c in {contentDom:1,key:1,selectionChange:1,insertElement:1})b.on(c,function(d){if(d.editor.mode=='wysiwyg')setTimeout(function(){a(d.editor);},100);});}});})(); +(function(){function a(d){var e=d.getStyle('overflow-y'),f=d.getDocument(),g=CKEDITOR.dom.element.createFromHtml(''+(CKEDITOR.env.webkit?' ':'')+'',f);f[CKEDITOR.env.ie?'getBody':'getDocumentElement']().append(g);var h=g.getDocumentPosition(f).y+g.$.offsetHeight;g.remove();d.setStyle('overflow-y',e);return h;};function b(d){var e=d.document,f=e.getBody(),g=e.getDocumentElement();return e.$.compatMode=='BackCompat'?f:g;};var c=function(d){if(!d.window)return;var e=b(d),f=d.window.getViewPaneSize().height,g=a(e);g+=d.config.autoGrow_bottomSpace||0;var h=d.config.autoGrow_minHeight!=undefined?d.config.autoGrow_minHeight:200,i=d.config.autoGrow_maxHeight||Infinity;g=Math.max(g,h);g=Math.min(g,i);if(g!=f){g=d.fire('autoGrow',{currentHeight:f,newHeight:g}).newHeight;d.resize(d.container.getStyle('width'),g,true);}if(e.$.scrollHeight>e.$.clientHeight&&g