Changeset 698 for pro-violet-viettel/refs/LectureEditor/menus.as
- Timestamp:
- Jan 19, 2015 11:51:02 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/refs/LectureEditor/menus.as
r297 r698 402 402 403 403 function ClearAllData() { 404 dataXML.firstChild.removeNode();405 404 movScene.ClearBackGround(); 406 405 while (movScene.bkgnd_node.childNodes.length > 0) movScene.bkgnd_node.lastChild.removeNode(); … … 565 564 function(param) { 566 565 ClearAllData(); 566 567 567 currentFile = param.id; 568 568 fscommand("Set Title", param.name); … … 587 587 } 588 588 }); 589 } 590 591 // open from Violet Space (using HMTL/javascript to display folders & files) 592 // when user clicked a file in Violet Space, a new window (which contains the lecture editor client) will be opened; ID of the selected lecture will be passed via flashvar 593 function OpenFileById() { 594 clearInterval(_root.openFileInterval); 595 596 if (fileId == undefined) return; 597 if (fileId == "") return; 598 599 //ShowGrayScreen(); 600 ClearAllData(); 601 currentFile = fileId; 602 LoadXMLData(spaceUrl + "file?id="+fileId+"&userid="+userId); 589 603 } 590 604 … … 1100 1114 } 1101 1115 1102 // Thay cho phần LoginViolet: 1103 dataXML.firstChild.attributes.Info = unescape(appUserName) + " - " + unescape(appAddress); 1104 dataXML.firstChild.attributes.Check = dataXML.firstChild.attributes.Info.length + 13; 1105 movScene.movTemplate.userInfo = movDefLayout.userInfo = dataXML.firstChild.attributes.Info; 1106 licenseInfo = {type: licType, customer: licCustomer, create: licCreate, expire: licExpire} 1116 // load user info 1117 function LoadUserInfo() { 1118 // gray screen 1119 ShowGrayScreen(); 1120 1121 // load user info 1122 var xml_userinfo:XML = new XML(); 1123 xml_userinfo.ignoreWhite = true; 1124 1125 xml_userinfo.onLoad = function(success) { 1126 // hide gray screen 1127 ShowGrayScreen(false); 1128 1129 // user data 1130 var attr:Object = this.firstChild.firstChild.attributes; 1131 userId = attr.userId; 1132 userLevel = attr.userLevel; 1133 userPhone = attr.userPhone; 1134 userMoney = attr.userMoney; 1135 appUserName = attr.appUserName; 1136 appAddress = attr.appAddress; 1137 dataXML.firstChild.attributes.Info = unescape(appUserName) + " - " + unescape(appAddress); 1138 dataXML.firstChild.attributes.Check = dataXML.firstChild.attributes.Info.length + 13; 1139 movScene.movTemplate.userInfo = movDefLayout.userInfo = dataXML.firstChild.attributes.Info; 1140 licenseInfo = { type: attr.licType, customer: attr.licCustomer, create: attr.licCreate, expire: attr.licExpire } 1141 1142 // 1143 if (fileId != undefined) { 1144 _root.openFileInterval = setInterval(OpenFileById, 1000); 1145 } 1146 } 1147 1148 var str:String = (host == undefined) ? userInfoUrl : (host + userInfoUrl); 1149 xml_userinfo.load(str); 1150 } 1151 1152 // Nếu user info được lấy theo cách truyền từ flashvars: 1153 function UpdateFromFlashVars() { 1154 dataXML.firstChild.attributes.Info = unescape(appUserName) + " - " + unescape(appAddress); 1155 dataXML.firstChild.attributes.Check = dataXML.firstChild.attributes.Info.length + 13; 1156 movScene.movTemplate.userInfo = movDefLayout.userInfo = dataXML.firstChild.attributes.Info; 1157 licenseInfo = {type: licType, customer: licCustomer, create: licCreate, expire: licExpire} 1158 } 1107 1159 1108 1160
Note: See TracChangeset
for help on using the changeset viewer.