bedrock_sass 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/_vendor/tinymce/plugins/advlist/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/advlist/plugin.js +428 -0
- data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/anchor/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/anchor/plugin.js +338 -0
- data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autolink/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autolink/plugin.js +404 -0
- data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autoresize/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +451 -0
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autosave/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autosave/plugin.js +608 -0
- data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/bbcode/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +264 -0
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/charmap/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/charmap/plugin.js +850 -0
- data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/code/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/code/plugin.js +338 -0
- data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/codesample/css/prism.css +138 -0
- data/assets/_vendor/tinymce/plugins/codesample/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/codesample/plugin.js +1582 -0
- data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +272 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +496 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/directionality/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/directionality/plugin.js +270 -0
- data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +256 -0
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/fullpage/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +962 -0
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +455 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/help/img/logo.png +0 -0
- data/assets/_vendor/tinymce/plugins/help/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/help/plugin.js +1527 -0
- data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/hr/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/hr/plugin.js +195 -0
- data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/image/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/image/plugin.js +1572 -0
- data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/imagetools/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +4444 -0
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +2 -0
- data/assets/_vendor/tinymce/plugins/importcss/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/importcss/plugin.js +577 -0
- data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +482 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +395 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/link/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/link/plugin.js +1231 -0
- data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/lists/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/lists/plugin.js +1985 -0
- data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/media/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/media/plugin.js +2026 -0
- data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +313 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/noneditable/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +316 -0
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +354 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/paste/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/paste/plugin.js +2935 -0
- data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/preview/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/preview/plugin.js +410 -0
- data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/print/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/print/plugin.js +194 -0
- data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/save/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/save/plugin.js +370 -0
- data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +977 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +1419 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +419 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/table/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/table/plugin.js +15527 -0
- data/assets/_vendor/tinymce/plugins/table/plugin.min.js +5 -0
- data/assets/_vendor/tinymce/plugins/template/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/template/plugin.js +807 -0
- data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/textcolor/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +619 -0
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/textpattern/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +718 -0
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/toc/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/toc/plugin.js +559 -0
- data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/css/visualblocks.css +154 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +459 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/visualchars/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +1325 -0
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/wordcount/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +735 -0
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.mobile.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +131 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/object.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +2 -0
- data/assets/_vendor/tinymce/themes/inlite/index.js +7 -0
- data/assets/_vendor/tinymce/themes/inlite/theme.js +18787 -0
- data/assets/_vendor/tinymce/themes/inlite/theme.min.js +5 -0
- data/assets/_vendor/tinymce/themes/mobile/index.js +7 -0
- data/assets/_vendor/tinymce/themes/mobile/theme.js +23384 -0
- data/assets/_vendor/tinymce/themes/mobile/theme.min.js +8 -0
- data/assets/_vendor/tinymce/themes/modern/index.js +7 -0
- data/assets/_vendor/tinymce/themes/modern/theme.js +18311 -0
- data/assets/_vendor/tinymce/themes/modern/theme.min.js +5 -0
- data/assets/_vendor/tinymce/tinymce.js +44399 -0
- data/assets/bedrock/js/bedrock.js +16587 -6193
- data/assets/bedrock/scss/_bedrock-components.scss +16 -0
- data/assets/bedrock/scss/_bedrock-settings.scss +15 -0
- data/assets/bedrock/scss/components/attachments-grid.scss +138 -0
- data/assets/bedrock/scss/components/dropzone-upload.scss +158 -0
- data/assets/bedrock/scss/components/global.scss +16 -8
- data/assets/bedrock/scss/components/helper-classes.scss +59 -0
- data/assets/bedrock/scss/components/inline-edit-box.scss +80 -0
- data/assets/bedrock/scss/components/login-box.scss +48 -0
- data/assets/bedrock/scss/components/no-content.scss +31 -0
- data/assets/bedrock/scss/components/off-canvas-menu.scss +1 -1
- data/assets/bedrock/scss/components/page-content.scss +51 -0
- data/assets/bedrock/scss/components/reveal-panel.scss +89 -0
- data/assets/bedrock/scss/components/select-box.scss +332 -0
- data/assets/bedrock/scss/components/tiny-mce-editor.scss +14 -7
- data/lib/bedrock_sass.rb +6 -0
- data/lib/bedrock_sass/engine.rb +8 -0
- data/lib/bedrock_sass/version.rb +1 -1
- data/lib/tasks/before_assets_precompile.rake +11 -0
- metadata +188 -2
@@ -0,0 +1 @@
|
|
1
|
+
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.Env")}),g("2",["4"],function(a){return a("tinymce.PluginManager")}),g("5",[],function(){var a=function(a){return a.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},b=function(a){return a.getParam("default_link_target","")};return{getAutoLinkPattern:a,getDefaultLinkTarget:b}}),g("3",["1","2","5"],function(a,b,c){var d=function(a,b){return a===b||" "===a||160===a.charCodeAt(0)},e=function(a){k(a,-1,"(",!0)},f=function(a){k(a,0,"",!0)},g=function(a){k(a,-1,"",!1)},h=function(a,b){if(b<0&&(b=0),3===a.nodeType){var c=a.data.length;b>c&&(b=c)}return b},i=function(a,b,c){1!==b.nodeType||b.hasChildNodes()?a.setStart(b,h(b,c)):a.setStartBefore(b)},j=function(a,b,c){1!==b.nodeType||b.hasChildNodes()?a.setEnd(b,h(b,c)):a.setEndAfter(b)},k=function(a,b,e){var f,g,h,k,l,m,n,o,p,q,r=c.getAutoLinkPattern(a),s=c.getDefaultLinkTarget(a);if("A"!==a.selection.getNode().tagName){if(f=a.selection.getRng(!0).cloneRange(),f.startOffset<5){if(o=f.endContainer.previousSibling,!o){if(!f.endContainer.firstChild||!f.endContainer.firstChild.nextSibling)return;o=f.endContainer.firstChild.nextSibling}if(p=o.length,i(f,o,p),j(f,o,p),f.endOffset<5)return;g=f.endOffset,k=o}else{if(k=f.endContainer,3!==k.nodeType&&k.firstChild){for(;3!==k.nodeType&&k.firstChild;)k=k.firstChild;3===k.nodeType&&(i(f,k,0),j(f,k,k.nodeValue.length))}g=1===f.endOffset?2:f.endOffset-1-b}h=g;do i(f,k,g>=2?g-2:0),j(f,k,g>=1?g-1:0),g-=1,q=f.toString();while(" "!==q&&""!==q&&160!==q.charCodeAt(0)&&g-2>=0&&q!==e);d(f.toString(),e)?(i(f,k,g),j(f,k,h),g+=1):0===f.startOffset?(i(f,k,0),j(f,k,h)):(i(f,k,g),j(f,k,h)),m=f.toString(),"."===m.charAt(m.length-1)&&j(f,k,h-1),m=f.toString().trim(),n=m.match(r),n&&("www."===n[1]?n[1]="http://www.":/@$/.test(n[1])&&!/^mailto:/.test(n[1])&&(n[1]="mailto:"+n[1]),l=a.selection.getBookmark(),a.selection.setRng(f),a.execCommand("createlink",!1,n[1]+n[2]),s&&a.dom.setAttrib(a.selection.getNode(),"target",s),a.selection.moveToBookmark(l),a.nodeChanged())}},l=function(b){var c;return b.on("keydown",function(a){if(13===a.keyCode)return g(b)}),a.ie?void b.on("focus",function(){if(!c){c=!0;try{b.execCommand("AutoUrlDetect",!1,!0)}catch(a){}}}):(b.on("keypress",function(a){if(41===a.keyCode)return e(b)}),void b.on("keyup",function(a){if(32===a.keyCode)return f(b)}))};return{setup:l}}),g("0",["1","2","3"],function(a,b,c){return b.add("autolink",function(a){c.setup(a)}),function(){}}),d("0")()}();
|
@@ -0,0 +1,451 @@
|
|
1
|
+
(function () {
|
2
|
+
|
3
|
+
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
4
|
+
|
5
|
+
// Used when there is no 'main' module.
|
6
|
+
// The name is probably (hopefully) unique so minification removes for releases.
|
7
|
+
var register_3795 = function (id) {
|
8
|
+
var module = dem(id);
|
9
|
+
var fragments = id.split('.');
|
10
|
+
var target = Function('return this;')();
|
11
|
+
for (var i = 0; i < fragments.length - 1; ++i) {
|
12
|
+
if (target[fragments[i]] === undefined)
|
13
|
+
target[fragments[i]] = {};
|
14
|
+
target = target[fragments[i]];
|
15
|
+
}
|
16
|
+
target[fragments[fragments.length - 1]] = module;
|
17
|
+
};
|
18
|
+
|
19
|
+
var instantiate = function (id) {
|
20
|
+
var actual = defs[id];
|
21
|
+
var dependencies = actual.deps;
|
22
|
+
var definition = actual.defn;
|
23
|
+
var len = dependencies.length;
|
24
|
+
var instances = new Array(len);
|
25
|
+
for (var i = 0; i < len; ++i)
|
26
|
+
instances[i] = dem(dependencies[i]);
|
27
|
+
var defResult = definition.apply(null, instances);
|
28
|
+
if (defResult === undefined)
|
29
|
+
throw 'module [' + id + '] returned undefined';
|
30
|
+
actual.instance = defResult;
|
31
|
+
};
|
32
|
+
|
33
|
+
var def = function (id, dependencies, definition) {
|
34
|
+
if (typeof id !== 'string')
|
35
|
+
throw 'module id must be a string';
|
36
|
+
else if (dependencies === undefined)
|
37
|
+
throw 'no dependencies for ' + id;
|
38
|
+
else if (definition === undefined)
|
39
|
+
throw 'no definition function for ' + id;
|
40
|
+
defs[id] = {
|
41
|
+
deps: dependencies,
|
42
|
+
defn: definition,
|
43
|
+
instance: undefined
|
44
|
+
};
|
45
|
+
};
|
46
|
+
|
47
|
+
var dem = function (id) {
|
48
|
+
var actual = defs[id];
|
49
|
+
if (actual === undefined)
|
50
|
+
throw 'module [' + id + '] was undefined';
|
51
|
+
else if (actual.instance === undefined)
|
52
|
+
instantiate(id);
|
53
|
+
return actual.instance;
|
54
|
+
};
|
55
|
+
|
56
|
+
var req = function (ids, callback) {
|
57
|
+
var len = ids.length;
|
58
|
+
var instances = new Array(len);
|
59
|
+
for (var i = 0; i < len; ++i)
|
60
|
+
instances[i] = dem(ids[i]);
|
61
|
+
callback.apply(null, instances);
|
62
|
+
};
|
63
|
+
|
64
|
+
var ephox = {};
|
65
|
+
|
66
|
+
ephox.bolt = {
|
67
|
+
module: {
|
68
|
+
api: {
|
69
|
+
define: def,
|
70
|
+
require: req,
|
71
|
+
demand: dem
|
72
|
+
}
|
73
|
+
}
|
74
|
+
};
|
75
|
+
|
76
|
+
var define = def;
|
77
|
+
var require = req;
|
78
|
+
var demand = dem;
|
79
|
+
// this helps with minification when using a lot of global references
|
80
|
+
var defineGlobal = function (id, ref) {
|
81
|
+
define(id, [], function () { return ref; });
|
82
|
+
};
|
83
|
+
/*jsc
|
84
|
+
["tinymce.plugins.autoresize.Plugin","ephox.katamari.api.Cell","tinymce.core.PluginManager","tinymce.plugins.autoresize.api.Commands","tinymce.plugins.autoresize.core.Resize","global!tinymce.util.Tools.resolve","tinymce.core.Env","tinymce.core.util.Delay","tinymce.plugins.autoresize.api.Settings"]
|
85
|
+
jsc*/
|
86
|
+
define(
|
87
|
+
'ephox.katamari.api.Cell',
|
88
|
+
|
89
|
+
[
|
90
|
+
],
|
91
|
+
|
92
|
+
function () {
|
93
|
+
var Cell = function (initial) {
|
94
|
+
var value = initial;
|
95
|
+
|
96
|
+
var get = function () {
|
97
|
+
return value;
|
98
|
+
};
|
99
|
+
|
100
|
+
var set = function (v) {
|
101
|
+
value = v;
|
102
|
+
};
|
103
|
+
|
104
|
+
var clone = function () {
|
105
|
+
return Cell(get());
|
106
|
+
};
|
107
|
+
|
108
|
+
return {
|
109
|
+
get: get,
|
110
|
+
set: set,
|
111
|
+
clone: clone
|
112
|
+
};
|
113
|
+
};
|
114
|
+
|
115
|
+
return Cell;
|
116
|
+
}
|
117
|
+
);
|
118
|
+
|
119
|
+
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
120
|
+
/**
|
121
|
+
* ResolveGlobal.js
|
122
|
+
*
|
123
|
+
* Released under LGPL License.
|
124
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
125
|
+
*
|
126
|
+
* License: http://www.tinymce.com/license
|
127
|
+
* Contributing: http://www.tinymce.com/contributing
|
128
|
+
*/
|
129
|
+
|
130
|
+
define(
|
131
|
+
'tinymce.core.PluginManager',
|
132
|
+
[
|
133
|
+
'global!tinymce.util.Tools.resolve'
|
134
|
+
],
|
135
|
+
function (resolve) {
|
136
|
+
return resolve('tinymce.PluginManager');
|
137
|
+
}
|
138
|
+
);
|
139
|
+
|
140
|
+
/**
|
141
|
+
* ResolveGlobal.js
|
142
|
+
*
|
143
|
+
* Released under LGPL License.
|
144
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
145
|
+
*
|
146
|
+
* License: http://www.tinymce.com/license
|
147
|
+
* Contributing: http://www.tinymce.com/contributing
|
148
|
+
*/
|
149
|
+
|
150
|
+
define(
|
151
|
+
'tinymce.core.Env',
|
152
|
+
[
|
153
|
+
'global!tinymce.util.Tools.resolve'
|
154
|
+
],
|
155
|
+
function (resolve) {
|
156
|
+
return resolve('tinymce.Env');
|
157
|
+
}
|
158
|
+
);
|
159
|
+
|
160
|
+
/**
|
161
|
+
* ResolveGlobal.js
|
162
|
+
*
|
163
|
+
* Released under LGPL License.
|
164
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
165
|
+
*
|
166
|
+
* License: http://www.tinymce.com/license
|
167
|
+
* Contributing: http://www.tinymce.com/contributing
|
168
|
+
*/
|
169
|
+
|
170
|
+
define(
|
171
|
+
'tinymce.core.util.Delay',
|
172
|
+
[
|
173
|
+
'global!tinymce.util.Tools.resolve'
|
174
|
+
],
|
175
|
+
function (resolve) {
|
176
|
+
return resolve('tinymce.util.Delay');
|
177
|
+
}
|
178
|
+
);
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Settings.js
|
182
|
+
*
|
183
|
+
* Released under LGPL License.
|
184
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
185
|
+
*
|
186
|
+
* License: http://www.tinymce.com/license
|
187
|
+
* Contributing: http://www.tinymce.com/contributing
|
188
|
+
*/
|
189
|
+
|
190
|
+
define(
|
191
|
+
'tinymce.plugins.autoresize.api.Settings',
|
192
|
+
[
|
193
|
+
],
|
194
|
+
function () {
|
195
|
+
var getAutoResizeMinHeight = function (editor) {
|
196
|
+
return parseInt(editor.getParam('autoresize_min_height', editor.getElement().offsetHeight), 10);
|
197
|
+
};
|
198
|
+
|
199
|
+
var getAutoResizeMaxHeight = function (editor) {
|
200
|
+
return parseInt(editor.getParam('autoresize_max_height', 0), 10);
|
201
|
+
};
|
202
|
+
|
203
|
+
var getAutoResizeOverflowPadding = function (editor) {
|
204
|
+
return editor.getParam('autoresize_overflow_padding', 1);
|
205
|
+
};
|
206
|
+
|
207
|
+
var getAutoResizeBottomMargin = function (editor) {
|
208
|
+
return editor.getParam('autoresize_bottom_margin', 50);
|
209
|
+
};
|
210
|
+
|
211
|
+
var shouldAutoResizeOnInit = function (editor) {
|
212
|
+
return editor.getParam('autoresize_on_init', true);
|
213
|
+
};
|
214
|
+
|
215
|
+
return {
|
216
|
+
getAutoResizeMinHeight: getAutoResizeMinHeight,
|
217
|
+
getAutoResizeMaxHeight: getAutoResizeMaxHeight,
|
218
|
+
getAutoResizeOverflowPadding: getAutoResizeOverflowPadding,
|
219
|
+
getAutoResizeBottomMargin: getAutoResizeBottomMargin,
|
220
|
+
shouldAutoResizeOnInit: shouldAutoResizeOnInit
|
221
|
+
};
|
222
|
+
}
|
223
|
+
);
|
224
|
+
/**
|
225
|
+
* Plugin.js
|
226
|
+
*
|
227
|
+
* Released under LGPL License.
|
228
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
229
|
+
*
|
230
|
+
* License: http://www.tinymce.com/license
|
231
|
+
* Contributing: http://www.tinymce.com/contributing
|
232
|
+
*/
|
233
|
+
|
234
|
+
/**
|
235
|
+
* This class contains all core logic for the autoresize plugin.
|
236
|
+
*
|
237
|
+
* @class tinymce.autoresize.Plugin
|
238
|
+
* @private
|
239
|
+
*/
|
240
|
+
define(
|
241
|
+
'tinymce.plugins.autoresize.core.Resize',
|
242
|
+
[
|
243
|
+
'tinymce.core.Env',
|
244
|
+
'tinymce.core.util.Delay',
|
245
|
+
'tinymce.plugins.autoresize.api.Settings'
|
246
|
+
],
|
247
|
+
function (Env, Delay, Settings) {
|
248
|
+
var isFullscreen = function (editor) {
|
249
|
+
return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
250
|
+
};
|
251
|
+
|
252
|
+
/**
|
253
|
+
* Calls the resize x times in 100ms intervals. We can't wait for load events since
|
254
|
+
* the CSS files might load async.
|
255
|
+
*/
|
256
|
+
var wait = function (editor, oldSize, times, interval, callback) {
|
257
|
+
Delay.setEditorTimeout(editor, function () {
|
258
|
+
resize(editor, oldSize);
|
259
|
+
|
260
|
+
if (times--) {
|
261
|
+
wait(editor, oldSize, times, interval, callback);
|
262
|
+
} else if (callback) {
|
263
|
+
callback();
|
264
|
+
}
|
265
|
+
}, interval);
|
266
|
+
};
|
267
|
+
|
268
|
+
var toggleScrolling = function (editor, state) {
|
269
|
+
var body = editor.getBody();
|
270
|
+
if (body) {
|
271
|
+
body.style.overflowY = state ? '' : 'hidden';
|
272
|
+
if (!state) {
|
273
|
+
body.scrollTop = 0;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
};
|
277
|
+
|
278
|
+
/**
|
279
|
+
* This method gets executed each time the editor needs to resize.
|
280
|
+
*/
|
281
|
+
var resize = function (editor, oldSize) {
|
282
|
+
var deltaSize, doc, body, resizeHeight, myHeight;
|
283
|
+
var marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;
|
284
|
+
var dom = editor.dom;
|
285
|
+
|
286
|
+
doc = editor.getDoc();
|
287
|
+
if (!doc) {
|
288
|
+
return;
|
289
|
+
}
|
290
|
+
|
291
|
+
if (isFullscreen(editor)) {
|
292
|
+
toggleScrolling(editor, true);
|
293
|
+
return;
|
294
|
+
}
|
295
|
+
|
296
|
+
body = doc.body;
|
297
|
+
resizeHeight = Settings.getAutoResizeMinHeight(editor);
|
298
|
+
|
299
|
+
// Calculate outer height of the body element using CSS styles
|
300
|
+
marginTop = dom.getStyle(body, 'margin-top', true);
|
301
|
+
marginBottom = dom.getStyle(body, 'margin-bottom', true);
|
302
|
+
paddingTop = dom.getStyle(body, 'padding-top', true);
|
303
|
+
paddingBottom = dom.getStyle(body, 'padding-bottom', true);
|
304
|
+
borderTop = dom.getStyle(body, 'border-top-width', true);
|
305
|
+
borderBottom = dom.getStyle(body, 'border-bottom-width', true);
|
306
|
+
myHeight = body.offsetHeight + parseInt(marginTop, 10) + parseInt(marginBottom, 10) +
|
307
|
+
parseInt(paddingTop, 10) + parseInt(paddingBottom, 10) +
|
308
|
+
parseInt(borderTop, 10) + parseInt(borderBottom, 10);
|
309
|
+
|
310
|
+
// Make sure we have a valid height
|
311
|
+
if (isNaN(myHeight) || myHeight <= 0) {
|
312
|
+
// Get height differently depending on the browser used
|
313
|
+
// eslint-disable-next-line no-nested-ternary
|
314
|
+
myHeight = Env.ie ? body.scrollHeight : (Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight);
|
315
|
+
}
|
316
|
+
|
317
|
+
// Don't make it smaller than the minimum height
|
318
|
+
if (myHeight > Settings.getAutoResizeMinHeight(editor)) {
|
319
|
+
resizeHeight = myHeight;
|
320
|
+
}
|
321
|
+
|
322
|
+
// If a maximum height has been defined don't exceed this height
|
323
|
+
var maxHeight = Settings.getAutoResizeMaxHeight(editor);
|
324
|
+
if (maxHeight && myHeight > maxHeight) {
|
325
|
+
resizeHeight = maxHeight;
|
326
|
+
toggleScrolling(editor, true);
|
327
|
+
} else {
|
328
|
+
toggleScrolling(editor, false);
|
329
|
+
}
|
330
|
+
|
331
|
+
// Resize content element
|
332
|
+
if (resizeHeight !== oldSize.get()) {
|
333
|
+
deltaSize = resizeHeight - oldSize.get();
|
334
|
+
dom.setStyle(editor.iframeElement, 'height', resizeHeight + 'px');
|
335
|
+
oldSize.set(resizeHeight);
|
336
|
+
|
337
|
+
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
338
|
+
// So we need to continue to resize the iframe down until the size gets fixed
|
339
|
+
if (Env.webKit && deltaSize < 0) {
|
340
|
+
resize(editor);
|
341
|
+
}
|
342
|
+
}
|
343
|
+
};
|
344
|
+
|
345
|
+
var setup = function (editor, oldSize) {
|
346
|
+
editor.on("init", function () {
|
347
|
+
var overflowPadding, bottomMargin, dom = editor.dom;
|
348
|
+
|
349
|
+
overflowPadding = Settings.getAutoResizeOverflowPadding(editor);
|
350
|
+
bottomMargin = Settings.getAutoResizeBottomMargin(editor);
|
351
|
+
|
352
|
+
if (overflowPadding !== false) {
|
353
|
+
dom.setStyles(editor.getBody(), {
|
354
|
+
paddingLeft: overflowPadding,
|
355
|
+
paddingRight: overflowPadding
|
356
|
+
});
|
357
|
+
}
|
358
|
+
|
359
|
+
if (bottomMargin !== false) {
|
360
|
+
dom.setStyles(editor.getBody(), {
|
361
|
+
paddingBottom: bottomMargin
|
362
|
+
});
|
363
|
+
}
|
364
|
+
});
|
365
|
+
|
366
|
+
editor.on('nodechange setcontent keyup FullscreenStateChanged', function (e) {
|
367
|
+
resize(editor, oldSize);
|
368
|
+
});
|
369
|
+
|
370
|
+
if (Settings.shouldAutoResizeOnInit(editor)) {
|
371
|
+
editor.on('init', function () {
|
372
|
+
// Hit it 20 times in 100 ms intervals
|
373
|
+
wait(editor, oldSize, 20, 100, function () {
|
374
|
+
// Hit it 5 times in 1 sec intervals
|
375
|
+
wait(editor, oldSize, 5, 1000);
|
376
|
+
});
|
377
|
+
});
|
378
|
+
}
|
379
|
+
};
|
380
|
+
|
381
|
+
return {
|
382
|
+
setup: setup,
|
383
|
+
resize: resize
|
384
|
+
};
|
385
|
+
}
|
386
|
+
);
|
387
|
+
/**
|
388
|
+
* Commands.js
|
389
|
+
*
|
390
|
+
* Released under LGPL License.
|
391
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
392
|
+
*
|
393
|
+
* License: http://www.tinymce.com/license
|
394
|
+
* Contributing: http://www.tinymce.com/contributing
|
395
|
+
*/
|
396
|
+
|
397
|
+
define(
|
398
|
+
'tinymce.plugins.autoresize.api.Commands',
|
399
|
+
[
|
400
|
+
'tinymce.plugins.autoresize.core.Resize'
|
401
|
+
],
|
402
|
+
function (Resize) {
|
403
|
+
var register = function (editor, oldSize) {
|
404
|
+
editor.addCommand('mceAutoResize', function () {
|
405
|
+
Resize.resize(editor, oldSize);
|
406
|
+
});
|
407
|
+
};
|
408
|
+
|
409
|
+
return {
|
410
|
+
register: register
|
411
|
+
};
|
412
|
+
}
|
413
|
+
);
|
414
|
+
/**
|
415
|
+
* Plugin.js
|
416
|
+
*
|
417
|
+
* Released under LGPL License.
|
418
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
419
|
+
*
|
420
|
+
* License: http://www.tinymce.com/license
|
421
|
+
* Contributing: http://www.tinymce.com/contributing
|
422
|
+
*/
|
423
|
+
|
424
|
+
/**
|
425
|
+
* This class contains all core logic for the autoresize plugin.
|
426
|
+
*
|
427
|
+
* @class tinymce.autoresize.Plugin
|
428
|
+
* @private
|
429
|
+
*/
|
430
|
+
define(
|
431
|
+
'tinymce.plugins.autoresize.Plugin',
|
432
|
+
[
|
433
|
+
'ephox.katamari.api.Cell',
|
434
|
+
'tinymce.core.PluginManager',
|
435
|
+
'tinymce.plugins.autoresize.api.Commands',
|
436
|
+
'tinymce.plugins.autoresize.core.Resize'
|
437
|
+
],
|
438
|
+
function (Cell, PluginManager, Commands, Resize) {
|
439
|
+
PluginManager.add('autoresize', function (editor) {
|
440
|
+
if (!editor.inline) {
|
441
|
+
var oldSize = Cell(0);
|
442
|
+
Commands.register(editor, oldSize);
|
443
|
+
Resize.setup(editor, oldSize);
|
444
|
+
}
|
445
|
+
});
|
446
|
+
|
447
|
+
return function () {};
|
448
|
+
}
|
449
|
+
);
|
450
|
+
dem('tinymce.plugins.autoresize.Plugin')();
|
451
|
+
})();
|