File tree Expand file tree Collapse file tree
frontend/src/modules/scaffold Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,25 @@ define([
6666 Backbone . Form . editors . TextArea . prototype . render = function ( ) {
6767 textAreaRender . call ( this ) ;
6868
69- _ . defer ( function ( ) {
69+ function until ( conditionFunction ) {
70+ function poll ( resolve ) {
71+ if ( conditionFunction ( ) ) {
72+ resolve ( ) ;
73+ return ;
74+ }
75+ setTimeout ( function ( ) {
76+ poll ( resolve )
77+ } , 10 ) ;
78+ }
79+ return new Promise ( poll ) ;
80+ }
81+ function isAttached ( $element ) {
82+ return function ( ) {
83+ return Boolean ( $element . parents ( 'body' ) . length ) ;
84+ } ;
85+ }
86+
87+ until ( isAttached ( this . $el ) ) . then ( function ( ) {
7088 this . editor = CKEDITOR . replace ( this . $el [ 0 ] , {
7189 dataIndentationChars : '' ,
7290 disableNativeSpellChecker : false ,
Original file line number Diff line number Diff line change 66 <link rel =" stylesheet" href =" css/adapt.css" />
77 <link rel =" stylesheet" href =" font-awesome-4.5.0/css/font-awesome.min.css" >
88 <script type =" text/javascript" src =" modernizr.js" ></script >
9- <script src =" //cdn.ckeditor.com/4.16.2 /full-all/ckeditor.js" ></script >
9+ <script src =" //cdn.ckeditor.com/4.17.0 /full-all/ckeditor.js" ></script >
1010 {{ #if isProduction }}
1111 <script type =" text/javascript" src =" require.js" data-main =" js/origin.js{{ #if dateStampAsString }} ?{{ dateStampAsString }} {{ /if }} " ></script >
1212 {{ else }}
You can’t perform that action at this time.
0 commit comments