2016-06-02 15:35:31 +02:00
|
|
|
import AppConstants from '../../constants/application_constants';
|
|
|
|
|
2016-06-13 14:35:02 +02:00
|
|
|
import { InjectInHeadUtils } from '../../utils/inject';
|
2016-06-02 15:35:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Imports shmui and its dependencies (jQuery)
|
|
|
|
*
|
|
|
|
* @return {Promise} Promise that resolves with [jquery.shmui.js, shmui.css] on success.
|
|
|
|
*/
|
|
|
|
function importLib() {
|
|
|
|
return InjectInHeadUtils.inject(AppConstants.jquery.sdkUrl)
|
|
|
|
.then(() => Promise.all([
|
2016-06-03 17:52:38 +02:00
|
|
|
System.import('shmui/jquery.shmui'),
|
2016-06-02 15:35:31 +02:00
|
|
|
System.import('shmui/shmui.css')
|
2016-06-03 17:52:38 +02:00
|
|
|
]));
|
2016-06-02 15:35:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default { importLib };
|