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.PluginManager")}),g("5",["4"],function(a){return a("tinymce.dom.DOMUtils")}),g("6",["4"],function(a){return a("tinymce.EditorManager")}),g("7",["4"],function(a){return a("tinymce.Env")}),g("8",["4"],function(a){return a("tinymce.util.Tools")}),g("9",[],function(){var a=function(a){return a.getParam("importcss_merge_classes")},b=function(a){return a.getParam("importcss_exclusive")},c=function(a){return a.getParam("importcss_selector_converter")},d=function(a){return a.getParam("importcss_selector_filter")},e=function(a){return a.getParam("importcss_groups")},f=function(a){return a.getParam("importcss_append")},g=function(a){return a.getParam("importcss_file_filter")};return{shouldMergeClasses:a,shouldImportExclusive:b,getSelectorConverter:c,getSelectorFilter:d,getCssGroups:e,shouldAppend:f,getFileFilter:g}}),g("3",["5","6","7","8","9"],function(a,b,c,d,e){var f=function(a){var b=c.cacheSuffix;return"string"==typeof a&&(a=a.replace("?"+b,"").replace("&"+b,"")),a},g=function(a,c){var d=a.settings,e=d.skin!==!1&&(d.skin||"lightgray");if(e){var f=d.skin_url?a.documentBaseURI.toAbsolute(d.skin_url):b.baseURL+"/skins/"+e;return c===f+"/content"+(a.inline?".inline":"")+".min.css"}return!1},h=function(a){return"string"==typeof a?function(b){return b.indexOf(a)!==-1}:a instanceof RegExp?function(b){return a.test(b)}:a},i=function(a,b,c){function e(b,i){var j,k=b.href;if(k=f(k),k&&c(k,i)&&!g(a,k)){d.each(b.imports,function(a){e(a,!0)});try{j=b.cssRules||b.rules}catch(a){}d.each(j,function(a){a.styleSheet?e(a.styleSheet,!0):a.selectorText&&d.each(a.selectorText.split(","),function(a){h.push(d.trim(a))})})}}var h=[],i={};d.each(a.contentCSS,function(a){i[a]=!0}),c||(c=function(a,b){return b||i[a]});try{d.each(b.styleSheets,function(a){e(a)})}catch(a){}return h},j=function(a,b){var c,f=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b);if(f){var g=f[1],h=f[2].substr(1).split(".").join(" "),i=d.makeMap("a,img");return f[1]?(c={title:b},a.schema.getTextBlockElements()[g]?c.block=g:a.schema.getBlockElements()[g]||i[g.toLowerCase()]?c.selector=g:c.inline=g):f[2]&&(c={inline:"span",title:b.substr(1),classes:h}),e.shouldMergeClasses(a)!==!1?c.classes=h:c.attributes={"class":h},c}},k=function(a,b){return d.grep(a,function(a){return!a.filter||a.filter(b)})},l=function(a){return d.map(a,function(a){return d.extend({},a,{original:a,selectors:{},filter:h(a.filter),item:{text:a.title,menu:[]}})})},m=function(a,b){return null===b||e.shouldImportExclusive(a)!==!1},n=function(a,b,c,d){return!(m(a,c)?b in d:b in c.selectors)},o=function(a,b,c,d){m(a,c)?d[b]=!0:c.selectors[b]=!0},p=function(a,b,c,d){var f;return f=d&&d.selector_converter?d.selector_converter:e.getSelectorConverter(a)?e.getSelectorConverter(a):function(){return j(a,c,d)},f.call(b,c,d)},q=function(b){b.on("renderFormatsMenu",function(c){var f={},g=h(e.getSelectorFilter(b)),j=c.control,m=l(e.getCssGroups(b)),q=function(c,e){if(n(b,c,e,f)){o(b,c,e,f);var g=p(b,b.plugins.importcss,c,e);if(g){var h=g.name||a.DOM.uniqueId();return b.formatter.register(h,g),d.extend({},j.settings.itemDefaults,{text:g.title,format:h})}}return null};e.shouldAppend(b)||j.items().remove(),d.each(i(b,c.doc||b.getDoc(),h(e.getFileFilter(b))),function(a){if(a.indexOf(".mce-")===-1&&(!g||g(a))){var b=k(m,a);if(b.length>0)d.each(b,function(b){var c=q(a,b);c&&b.item.menu.push(c)});else{var c=q(a,null);c&&j.add(c)}}}),d.each(m,function(a){a.item.menu.length>0&&j.add(a.item)}),c.control.renderNew()})};return{defaultConvertSelectorToFormat:j,setup:q}}),g("2",["3"],function(a){var b=function(b){var c=function(c){return a.defaultConvertSelectorToFormat(b,c)};return{convertSelectorToFormat:c}};return{get:b}}),g("0",["1","2","3"],function(a,b,c){return a.add("importcss",function(a){return c.setup(a),b.get(a)}),function(){}}),d("0")()}();
|
@@ -0,0 +1,482 @@
|
|
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.insertdatetime.Plugin","ephox.katamari.api.Cell","tinymce.core.PluginManager","tinymce.plugins.insertdatetime.api.Commands","tinymce.plugins.insertdatetime.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.fullpage.api.Settings","tinymce.plugins.insertdatetime.core.Actions","tinymce.core.util.Tools","tinymce.plugins.insertdatetime.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
|
+
* Settings.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.plugins.fullpage.api.Settings',
|
152
|
+
[
|
153
|
+
],
|
154
|
+
function () {
|
155
|
+
var shouldHideInSourceView = function (editor) {
|
156
|
+
return editor.getParam('fullpage_hide_in_source_view');
|
157
|
+
};
|
158
|
+
|
159
|
+
var getDefaultXmlPi = function (editor) {
|
160
|
+
return editor.getParam('fullpage_default_xml_pi');
|
161
|
+
};
|
162
|
+
|
163
|
+
var getDefaultEncoding = function (editor) {
|
164
|
+
return editor.getParam('fullpage_default_encoding');
|
165
|
+
};
|
166
|
+
|
167
|
+
var getDefaultFontFamily = function (editor) {
|
168
|
+
return editor.getParam('fullpage_default_font_family');
|
169
|
+
};
|
170
|
+
|
171
|
+
var getDefaultFontSize = function (editor) {
|
172
|
+
return editor.getParam('fullpage_default_font_size');
|
173
|
+
};
|
174
|
+
|
175
|
+
var getDefaultTextColor = function (editor) {
|
176
|
+
return editor.getParam('fullpage_default_text_color');
|
177
|
+
};
|
178
|
+
|
179
|
+
var getDefaultTitle = function (editor) {
|
180
|
+
return editor.getParam('fullpage_default_title');
|
181
|
+
};
|
182
|
+
|
183
|
+
var getDefaultDocType = function (editor) {
|
184
|
+
return editor.getParam('fullpage_default_doctype', '<!DOCTYPE html>');
|
185
|
+
};
|
186
|
+
|
187
|
+
return {
|
188
|
+
shouldHideInSourceView: shouldHideInSourceView,
|
189
|
+
getDefaultXmlPi: getDefaultXmlPi,
|
190
|
+
getDefaultEncoding: getDefaultEncoding,
|
191
|
+
getDefaultFontFamily: getDefaultFontFamily,
|
192
|
+
getDefaultFontSize: getDefaultFontSize,
|
193
|
+
getDefaultTextColor: getDefaultTextColor,
|
194
|
+
getDefaultTitle: getDefaultTitle,
|
195
|
+
getDefaultDocType: getDefaultDocType
|
196
|
+
};
|
197
|
+
}
|
198
|
+
);
|
199
|
+
/**
|
200
|
+
* ResolveGlobal.js
|
201
|
+
*
|
202
|
+
* Released under LGPL License.
|
203
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
204
|
+
*
|
205
|
+
* License: http://www.tinymce.com/license
|
206
|
+
* Contributing: http://www.tinymce.com/contributing
|
207
|
+
*/
|
208
|
+
|
209
|
+
define(
|
210
|
+
'tinymce.core.util.Tools',
|
211
|
+
[
|
212
|
+
'global!tinymce.util.Tools.resolve'
|
213
|
+
],
|
214
|
+
function (resolve) {
|
215
|
+
return resolve('tinymce.util.Tools');
|
216
|
+
}
|
217
|
+
);
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Settings.js
|
221
|
+
*
|
222
|
+
* Released under LGPL License.
|
223
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
224
|
+
*
|
225
|
+
* License: http://www.tinymce.com/license
|
226
|
+
* Contributing: http://www.tinymce.com/contributing
|
227
|
+
*/
|
228
|
+
|
229
|
+
define(
|
230
|
+
'tinymce.plugins.insertdatetime.api.Settings',
|
231
|
+
[
|
232
|
+
],
|
233
|
+
function () {
|
234
|
+
var getDateFormat = function (editor) {
|
235
|
+
return editor.getParam('insertdatetime_dateformat', editor.translate('%Y-%m-%d'));
|
236
|
+
};
|
237
|
+
|
238
|
+
var getTimeFormat = function (editor) {
|
239
|
+
return editor.getParam('insertdatetime_timeformat', editor.translate('%H:%M:%S'));
|
240
|
+
};
|
241
|
+
|
242
|
+
var getFormats = function (editor) {
|
243
|
+
return editor.getParam('insertdatetime_formats', ['%H:%M:%S', '%Y-%m-%d', '%I:%M:%S %p', '%D']);
|
244
|
+
};
|
245
|
+
|
246
|
+
var getDefaultDateTime = function (editor) {
|
247
|
+
var formats = getFormats(editor);
|
248
|
+
return formats.length > 0 ? formats[0] : getTimeFormat(editor);
|
249
|
+
};
|
250
|
+
|
251
|
+
var shouldInsertTimeElement = function (editor) {
|
252
|
+
return editor.getParam('insertdatetime_element', false);
|
253
|
+
};
|
254
|
+
|
255
|
+
return {
|
256
|
+
getDateFormat: getDateFormat,
|
257
|
+
getTimeFormat: getTimeFormat,
|
258
|
+
getFormats: getFormats,
|
259
|
+
getDefaultDateTime: getDefaultDateTime,
|
260
|
+
shouldInsertTimeElement: shouldInsertTimeElement
|
261
|
+
};
|
262
|
+
}
|
263
|
+
);
|
264
|
+
|
265
|
+
/**
|
266
|
+
* Actions.js
|
267
|
+
*
|
268
|
+
* Released under LGPL License.
|
269
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
270
|
+
*
|
271
|
+
* License: http://www.tinymce.com/license
|
272
|
+
* Contributing: http://www.tinymce.com/contributing
|
273
|
+
*/
|
274
|
+
|
275
|
+
define(
|
276
|
+
'tinymce.plugins.insertdatetime.core.Actions',
|
277
|
+
[
|
278
|
+
'tinymce.core.util.Tools',
|
279
|
+
'tinymce.plugins.insertdatetime.api.Settings'
|
280
|
+
],
|
281
|
+
function (Tools, Settings) {
|
282
|
+
var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
283
|
+
var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
284
|
+
var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
285
|
+
var monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
286
|
+
|
287
|
+
var addZeros = function (value, len) {
|
288
|
+
value = '' + value;
|
289
|
+
|
290
|
+
if (value.length < len) {
|
291
|
+
for (var i = 0; i < (len - value.length); i++) {
|
292
|
+
value = '0' + value;
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
return value;
|
297
|
+
};
|
298
|
+
|
299
|
+
var getDateTime = function (editor, fmt, date) {
|
300
|
+
date = date || new Date();
|
301
|
+
|
302
|
+
fmt = fmt.replace('%D', '%m/%d/%Y');
|
303
|
+
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
304
|
+
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
305
|
+
fmt = fmt.replace('%y', '' + date.getYear());
|
306
|
+
fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
|
307
|
+
fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
|
308
|
+
fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
|
309
|
+
fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
|
310
|
+
fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
|
311
|
+
fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
|
312
|
+
fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
|
313
|
+
fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
|
314
|
+
fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
|
315
|
+
fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
|
316
|
+
fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
|
317
|
+
fmt = fmt.replace('%%', '%');
|
318
|
+
|
319
|
+
return fmt;
|
320
|
+
};
|
321
|
+
|
322
|
+
var updateElement = function (editor, timeElm, computerTime, userTime) {
|
323
|
+
var newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
|
324
|
+
timeElm.parentNode.insertBefore(newTimeElm, timeElm);
|
325
|
+
editor.dom.remove(timeElm);
|
326
|
+
editor.selection.select(newTimeElm, true);
|
327
|
+
editor.selection.collapse(false);
|
328
|
+
};
|
329
|
+
|
330
|
+
var insertDateTime = function (editor, format) {
|
331
|
+
if (Settings.shouldInsertTimeElement(editor)) {
|
332
|
+
var userTime = getDateTime(editor, format);
|
333
|
+
var computerTime;
|
334
|
+
|
335
|
+
if (/%[HMSIp]/.test(format)) {
|
336
|
+
computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');
|
337
|
+
} else {
|
338
|
+
computerTime = getDateTime(editor, '%Y-%m-%d');
|
339
|
+
}
|
340
|
+
|
341
|
+
var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
342
|
+
|
343
|
+
if (timeElm) {
|
344
|
+
updateElement(editor, timeElm, computerTime, userTime);
|
345
|
+
} else {
|
346
|
+
editor.insertContent('<time datetime="' + computerTime + '">' + userTime + '</time>');
|
347
|
+
}
|
348
|
+
} else {
|
349
|
+
editor.insertContent(getDateTime(editor, format));
|
350
|
+
}
|
351
|
+
};
|
352
|
+
|
353
|
+
return {
|
354
|
+
insertDateTime: insertDateTime,
|
355
|
+
getDateTime: getDateTime
|
356
|
+
};
|
357
|
+
}
|
358
|
+
);
|
359
|
+
/**
|
360
|
+
* Commands.js
|
361
|
+
*
|
362
|
+
* Released under LGPL License.
|
363
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
364
|
+
*
|
365
|
+
* License: http://www.tinymce.com/license
|
366
|
+
* Contributing: http://www.tinymce.com/contributing
|
367
|
+
*/
|
368
|
+
|
369
|
+
define(
|
370
|
+
'tinymce.plugins.insertdatetime.api.Commands',
|
371
|
+
[
|
372
|
+
'tinymce.plugins.fullpage.api.Settings',
|
373
|
+
'tinymce.plugins.insertdatetime.core.Actions'
|
374
|
+
],
|
375
|
+
function (Settings, Actions) {
|
376
|
+
var register = function (editor) {
|
377
|
+
editor.addCommand('mceInsertDate', function () {
|
378
|
+
Actions.insertDateTime(editor, Settings.getDateFormat());
|
379
|
+
});
|
380
|
+
|
381
|
+
editor.addCommand('mceInsertTime', function () {
|
382
|
+
Actions.insertDateTime(editor, Settings.getTimeFormat());
|
383
|
+
});
|
384
|
+
};
|
385
|
+
|
386
|
+
return {
|
387
|
+
register: register
|
388
|
+
};
|
389
|
+
}
|
390
|
+
);
|
391
|
+
|
392
|
+
|
393
|
+
/**
|
394
|
+
* Buttons.js
|
395
|
+
*
|
396
|
+
* Released under LGPL License.
|
397
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
398
|
+
*
|
399
|
+
* License: http://www.tinymce.com/license
|
400
|
+
* Contributing: http://www.tinymce.com/contributing
|
401
|
+
*/
|
402
|
+
|
403
|
+
define(
|
404
|
+
'tinymce.plugins.insertdatetime.ui.Buttons',
|
405
|
+
[
|
406
|
+
'tinymce.core.util.Tools',
|
407
|
+
'tinymce.plugins.insertdatetime.api.Settings',
|
408
|
+
'tinymce.plugins.insertdatetime.core.Actions'
|
409
|
+
],
|
410
|
+
function (Tools, Settings, Actions) {
|
411
|
+
var createMenuItems = function (editor, lastFormatState) {
|
412
|
+
var formats = Settings.getFormats(editor);
|
413
|
+
|
414
|
+
return Tools.map(formats, function (fmt) {
|
415
|
+
return {
|
416
|
+
text: Actions.getDateTime(editor, fmt),
|
417
|
+
onclick: function () {
|
418
|
+
lastFormatState.set(fmt);
|
419
|
+
Actions.insertDateTime(editor, fmt);
|
420
|
+
}
|
421
|
+
};
|
422
|
+
});
|
423
|
+
};
|
424
|
+
|
425
|
+
var register = function (editor, lastFormatState) {
|
426
|
+
var menuItems = createMenuItems(editor, lastFormatState);
|
427
|
+
|
428
|
+
editor.addButton('insertdatetime', {
|
429
|
+
type: 'splitbutton',
|
430
|
+
title: 'Insert date/time',
|
431
|
+
menu: menuItems,
|
432
|
+
onclick: function () {
|
433
|
+
var lastFormat = lastFormatState.get();
|
434
|
+
Actions.insertDateTime(editor, lastFormat ? lastFormat : Settings.getDefaultDateTime(editor));
|
435
|
+
}
|
436
|
+
});
|
437
|
+
|
438
|
+
editor.addMenuItem('insertdatetime', {
|
439
|
+
icon: 'date',
|
440
|
+
text: 'Date/time',
|
441
|
+
menu: menuItems,
|
442
|
+
context: 'insert'
|
443
|
+
});
|
444
|
+
};
|
445
|
+
|
446
|
+
return {
|
447
|
+
register: register
|
448
|
+
};
|
449
|
+
}
|
450
|
+
);
|
451
|
+
|
452
|
+
/**
|
453
|
+
* Plugin.js
|
454
|
+
*
|
455
|
+
* Released under LGPL License.
|
456
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
457
|
+
*
|
458
|
+
* License: http://www.tinymce.com/license
|
459
|
+
* Contributing: http://www.tinymce.com/contributing
|
460
|
+
*/
|
461
|
+
|
462
|
+
define(
|
463
|
+
'tinymce.plugins.insertdatetime.Plugin',
|
464
|
+
[
|
465
|
+
'ephox.katamari.api.Cell',
|
466
|
+
'tinymce.core.PluginManager',
|
467
|
+
'tinymce.plugins.insertdatetime.api.Commands',
|
468
|
+
'tinymce.plugins.insertdatetime.ui.Buttons'
|
469
|
+
],
|
470
|
+
function (Cell, PluginManager, Commands, Buttons) {
|
471
|
+
PluginManager.add('insertdatetime', function (editor) {
|
472
|
+
var lastFormatState = Cell(null);
|
473
|
+
|
474
|
+
Commands.register(editor);
|
475
|
+
Buttons.register(editor, lastFormatState);
|
476
|
+
});
|
477
|
+
|
478
|
+
return function () { };
|
479
|
+
}
|
480
|
+
);
|
481
|
+
dem('tinymce.plugins.insertdatetime.Plugin')();
|
482
|
+
})();
|