blob: a771f7df6e8e8e3741535fe94b3ee5d1c3bedc8a [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001require.config({
2 shim: {
3 knockoutbase: ['jq_tmpl'],
4 jq_additional: ['jq_validate'],
5 jq_simplemodal: ['3rd/twbs.bootstrap'],
6 jq_translate: ['jq_i18n'],
7 },
8 paths: {
9 base64: '3rd/webtoolkit.base64',
10 echarts: '3rd/apache.echarts',
11 knockout: '3rd/knockout',
12 knockoutbase: '3rd/knockout.base',
13 jq_additional: '3rd/jquery.additional-methods',
14 jq_chosen: '3rd/jquery.chosen',
15 jq_fileinput: '3rd/jquery.fileinput',
16 jq_i18n: '3rd/jquery.i18n',
17 jq_simplemodal: '3rd/jquery.simplemodal',
18 jq_tmpl: '3rd/jquery.tmpl',
19 jq_translate: '3rd/jquery.translate',
20 jq_validate: '3rd/jquery.validate',
21 jquery: '3rd/require-jquery',
22 jqui: '3rd/jqui',
23 text: '3rd/require-text',
24 tmpl: '../subpg',
25 underscore: '3rd/underscore',
26 service: 'com',
27
28 CryptoJS: '3rd/crypto-js',
29
30 menu: 'com',
31 adm_lan: 'com',
32 adm_others: 'com',
33 adm_management: 'com',
34 adm_pin: 'com',
35 adm_quick_set: 'com',
36 main: 'com',
37 language: 'com',
38 entry: 'com',
39 logout: 'com',
40 opmode: 'com',
41 opmode_popup: 'com',
42 router: 'com',
43 statusBar: 'com',
44 status_traffic_alert: 'com',
45 tooltip: 'com',
46
47 phonebook: 'sim_device',
48 sim_abnormal: 'sim_device',
49 ota_update: 'sim_device',
50 sd: 'sim_device',
51 sd_httpshare: 'sim_device',
52 sms_set: 'sim_device',
53 sms_sim_messages: 'sim_device',
54 sms_list: 'sim_device',
55 ussd: 'sim_device',
56 network_apn_set: 'net',
57 network_dial_set: 'net',
58 network_dial_set_cpe: 'net',
59 locknet: 'net',
60 network_net_select: 'net',
61 ddns: 'net',
62 firewall: 'net',
63 firewall_dmz_set: 'net',
64 firewall_parental_control: 'net',
65 firewall_port_filter: 'net',
66 firewall_port_forward: 'net',
67 firewall_port_map: 'net',
68 firewall_upnp_set: 'net',
69 firewall_url_filter: 'net',
70 wifi_advance: 'wifi',
71 wifi_ap_station: 'wifi',
72 wifi_guest: 'wifi',
73 wifi_mac_filter: 'wifi',
74 wifi_main: 'wifi',
75 wifi_sleep_mode: 'wifi',
76 wifi_station_info: 'wifi',
77 wifi_wps: 'wifi',
78 },
79
80});
81
82require("set service lib".split(" "),
83 function (set, fnc, util) {
84 function initAndLoad(cfg) {
85 require([cfg.menu, cfg.set], function (params) {
86 require("menu language logout statusBar router entry jq_additional jq_translate jq_simplemodal base64".split(" "),
87 function (menu, language, logout, statusBar, router, entry) {
88 menu.init();
89 language.init();
90 router.init();
91 logout.init();
92 statusBar.init();
93 });
94 });
95 }
96 if (!set.RJ45_SUPPORT) {
97 initAndLoad({
98 set: set.DEVICE + '/set',
99 menu: set.DEVICE + '/menu'
100 });
101 } else {
102 var tmp = "menu";
103 fnc.getOpMode({}, function (mod) {
104 set.blc_wan_mode = mod.blc_wan_mode;
105 switch (mod.blc_wan_mode) {
106 case "AUTO_PPPOE":
107 case "PPPOE":
108 tmp = "menu_pppoe";
109 break;
110 default:
111 tmp = "menu";
112 break;
113 }
114 initAndLoad({
115 set: set.DEVICE + '/set',
116 menu: set.DEVICE + '/' + tmp
117 });
118 });
119 }
120
121});