| 1 |
import HTTP from './http'; |
| 2 |
import Store from './store/question'; |
| 3 |
import './fill-in-blanks'; |
| 4 |
|
| 5 |
window.$Vue = window.$Vue || Vue; |
| 6 |
window.$Vuex = window.$Vuex || Vuex; |
| 7 |
|
| 8 |
const $ = window.jQuery; |
| 9 |
|
| 10 |
/** |
| 11 |
* Init app. |
| 12 |
* |
| 13 |
* @since 3.0.0 |
| 14 |
*/ |
| 15 |
$( document ).ready( function() { |
| 16 |
window.LP_Question_Store = new $Vuex.Store( Store( lp_question_editor ) ); |
| 17 |
|
| 18 |
HTTP( { ns: 'LPQuestionEditorRequest', store: LP_Question_Store } ); |
| 19 |
|
| 20 |
setTimeout( () => { |
| 21 |
if ( $( '#admin-editor-lp_question' ).length ) { |
| 22 |
window.LP_Question_Editor = new $Vue( { |
| 23 |
el: '#admin-editor-lp_question', |
| 24 |
template: '<lp-question-editor></lp-question-editor>', |
| 25 |
} ); |
| 26 |
} |
| 27 |
}, 100 ); |
| 28 |
} ); |
| 29 |
|