require.config({ | |
shim: { | |
knockoutbase: ['jq_tmpl'], | |
jq_additional: ['jq_validate'], | |
jq_simplemodal: ['3rd/twbs.bootstrap'], | |
jq_translate: ['jq_i18n'], | |
}, | |
paths: { | |
base64: '3rd/webtoolkit.base64', | |
echarts: '3rd/apache.echarts', | |
knockout: '3rd/knockout', | |
knockoutbase: '3rd/knockout.base', | |
jq_additional: '3rd/jquery.additional-methods', | |
jq_chosen: '3rd/jquery.chosen', | |
jq_fileinput: '3rd/jquery.fileinput', | |
jq_i18n: '3rd/jquery.i18n', | |
jq_simplemodal: '3rd/jquery.simplemodal', | |
jq_tmpl: '3rd/jquery.tmpl', | |
jq_translate: '3rd/jquery.translate', | |
jq_validate: '3rd/jquery.validate', | |
jquery: '3rd/require-jquery', | |
jqui: '3rd/jqui', | |
text: '3rd/require-text', | |
tmpl: '../subpg', | |
underscore: '3rd/underscore', | |
service: 'com', | |
CryptoJS: '3rd/crypto-js', | |
menu: 'com', | |
adm_lan: 'com', | |
adm_others: 'com', | |
adm_management: 'com', | |
adm_pin: 'com', | |
adm_quick_set: 'com', | |
main: 'com', | |
language: 'com', | |
entry: 'com', | |
logout: 'com', | |
opmode: 'com', | |
opmode_popup: 'com', | |
router: 'com', | |
statusBar: 'com', | |
status_traffic_alert: 'com', | |
tooltip: 'com', | |
phonebook: 'sim_device', | |
sim_abnormal: 'sim_device', | |
ota_update: 'sim_device', | |
sd: 'sim_device', | |
sd_httpshare: 'sim_device', | |
sms_set: 'sim_device', | |
sms_sim_messages: 'sim_device', | |
sms_list: 'sim_device', | |
ussd: 'sim_device', | |
network_apn_set: 'net', | |
network_dial_set: 'net', | |
network_dial_set_cpe: 'net', | |
locknet: 'net', | |
network_net_select: 'net', | |
ddns: 'net', | |
firewall: 'net', | |
firewall_dmz_set: 'net', | |
firewall_parental_control: 'net', | |
firewall_port_filter: 'net', | |
firewall_port_forward: 'net', | |
firewall_port_map: 'net', | |
firewall_upnp_set: 'net', | |
firewall_url_filter: 'net', | |
wifi_advance: 'wifi', | |
wifi_ap_station: 'wifi', | |
wifi_guest: 'wifi', | |
wifi_mac_filter: 'wifi', | |
wifi_main: 'wifi', | |
wifi_sleep_mode: 'wifi', | |
wifi_station_info: 'wifi', | |
wifi_wps: 'wifi', | |
}, | |
}); | |
require("set service lib".split(" "), | |
function (set, fnc, util) { | |
function initAndLoad(cfg) { | |
require([cfg.menu, cfg.set], function (params) { | |
require("menu language logout statusBar router entry jq_additional jq_translate jq_simplemodal base64".split(" "), | |
function (menu, language, logout, statusBar, router, entry) { | |
menu.init(); | |
language.init(); | |
router.init(); | |
logout.init(); | |
statusBar.init(); | |
}); | |
}); | |
} | |
if (!set.RJ45_SUPPORT) { | |
initAndLoad({ | |
set: set.DEVICE + '/set', | |
menu: set.DEVICE + '/menu' | |
}); | |
} else { | |
var tmp = "menu"; | |
fnc.getOpMode({}, function (mod) { | |
set.blc_wan_mode = mod.blc_wan_mode; | |
switch (mod.blc_wan_mode) { | |
case "AUTO_PPPOE": | |
case "PPPOE": | |
tmp = "menu_pppoe"; | |
break; | |
default: | |
tmp = "menu"; | |
break; | |
} | |
initAndLoad({ | |
set: set.DEVICE + '/set', | |
menu: set.DEVICE + '/' + tmp | |
}); | |
}); | |
} | |
}); |