提交 | 用户 | 时间
|
58d006
|
1 |
require.config({ |
A |
2 |
baseUrl: '../assets/js', |
|
3 |
|
|
4 |
waitSeconds: 600, |
|
5 |
|
|
6 |
shim: { |
|
7 |
'bootstrap': { |
|
8 |
deps: ['jquery'] |
|
9 |
}, |
|
10 |
'ace': { |
|
11 |
deps: ['jquery', 'bootstrap'] |
|
12 |
}, |
|
13 |
'ace-elements': { |
|
14 |
deps: ['ace'] |
|
15 |
} |
|
16 |
} |
|
17 |
}); |
|
18 |
require(['jquery', 'bootstrap', 'ace', 'ace-extra', 'ace-elements'], function($) { |
|
19 |
//try, to hide possible errors in case ace.demo is not available |
|
20 |
try { |
|
21 |
ace.demo.init(true);//true means the call is not from inside a jQuery document ready event |
|
22 |
} catch(e) {} |
|
23 |
|
|
24 |
/** |
|
25 |
//you can restore state of elements now (ace-extra.js is loaded) |
|
26 |
$('.ace-save-state').each(function() { |
|
27 |
ace.settings.loadState(this); |
|
28 |
}); |
|
29 |
|
|
30 |
//or as soon as you render an element such as sidebar, etc ... |
|
31 |
ace.settings.loadState('sidebar'); |
|
32 |
*/ |
|
33 |
}); |