|
1 |
| -(function(global) { |
| 1 | +(function (global) { |
2 | 2 | 'use strict';
|
3 | 3 |
|
4 |
| - $(function() { |
| 4 | + $(function () { |
5 | 5 | var body = $('body'),
|
6 | 6 | head = $('head');
|
7 | 7 |
|
8 |
| - body.prepend( $('<toolbar></toolbar>') ); |
9 |
| - body.append( $('<media-library></media-library>') ); |
| 8 | + body.prepend($('<toolbar></toolbar>')); |
| 9 | + body.append($('<media-library></media-library>')); |
10 | 10 |
|
11 |
| - head.append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/css?family=Roboto:400,500,700,300,100') ); |
12 |
| - head.append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/icon?family=Material+Icons') ); |
13 |
| - head.append( $('<link rel="stylesheet" type="text/css" />').attr('href', config.CONTENT_SNIPPETS_EDIT_CSS_URL) ); |
| 11 | + head.append($('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/css?family=Roboto:400,500,700,300,100')); |
| 12 | + head.append($('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/icon?family=Material+Icons')); |
| 13 | + head.append($('<link rel="stylesheet" type="text/css" />').attr('href', config.CONTENT_SNIPPETS_EDIT_CSS_URL)); |
14 | 14 |
|
15 |
| - $.getScript('https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js', function() { |
16 |
| - global.CKEDITOR.plugins.addExternal( 'media-selector', global.config.CKEDITOR_PLUGINS_URL + 'media-selector/', 'plugin.js' ); |
17 |
| - global.CKEDITOR.plugins.addExternal( 'sourcedialog', global.config.CKEDITOR_PLUGINS_URL + 'sourcedialog/', 'plugin.js' ); |
18 |
| - global.CKEDITOR.plugins.addExternal( 'codemirror', global.config.CKEDITOR_PLUGINS_URL + 'codemirror/', 'plugin.js' ); |
| 15 | + $.getScript('https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js', function () { |
| 16 | + $.getScript('https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js', function () { |
| 17 | + global.CKEDITOR.plugins.addExternal('media-selector', global.config.CKEDITOR_PLUGINS_URL + 'media-selector/', 'plugin.js'); |
| 18 | + global.CKEDITOR.plugins.addExternal('sourcedialog', global.config.CKEDITOR_PLUGINS_URL + 'sourcedialog/', 'plugin.js'); |
| 19 | + global.CKEDITOR.plugins.addExternal('codemirror', global.config.CKEDITOR_PLUGINS_URL + 'codemirror/', 'plugin.js'); |
19 | 20 |
|
20 |
| - global.CKEDITOR.config.allowedContent = true; |
21 |
| - global.CKEDITOR.config.extraPlugins = 'media-selector,sourcedialog'; |
22 |
| - global.CKEDITOR.config.removePlugins = 'image,sourcearea'; |
| 21 | + global.CKEDITOR.config.allowedContent = true; |
| 22 | + global.CKEDITOR.config.extraPlugins = 'media-selector,sourcedialog'; |
| 23 | + global.CKEDITOR.config.removePlugins = 'image,sourcearea'; |
23 | 24 |
|
24 |
| - var stores = { |
25 |
| - WebpageStore: new WebpageStore(), |
26 |
| - MediasStore: new MediasStore() |
27 |
| - }; |
| 25 | + var stores = { |
| 26 | + WebpageStore: new WebpageStore(), |
| 27 | + MediasStore: new MediasStore() |
| 28 | + }; |
28 | 29 |
|
29 |
| - _.each(stores, function(store) { |
30 |
| - RiotControl.addStore(store); |
31 |
| - }); |
| 30 | + _.each(stores, function (store) { |
| 31 | + RiotControl.addStore(store); |
| 32 | + }); |
32 | 33 |
|
33 |
| - global.stores = stores; |
| 34 | + global.stores = stores; |
34 | 35 |
|
35 |
| - riot.mount('snippet'); |
36 |
| - riot.mount('media-library'); |
37 |
| - riot.mount('toolbar'); |
| 36 | + riot.mount('snippet'); |
| 37 | + riot.mount('media-library'); |
| 38 | + riot.mount('toolbar'); |
| 39 | + }); |
38 | 40 | });
|
39 | 41 | });
|
40 | 42 | }(this));
|
0 commit comments