function OnInit() { //let strInput=JSON.stringify(cData); //HandleModelList(cData); TranslatePage(); RequestProfile(); } function RequestProfile() { var tSend={}; tSend['sequence_id']=Math.round(new Date() / 1000); tSend['command']="request_userguide_profile"; SendWXMessage( JSON.stringify(tSend) ); } function HandleStudio( pVal ) { // alert(strInput); // alert(JSON.stringify(strInput)); // // let pVal=IsJson(strInput); // if(pVal==null) // { // alert("Msg Format Error is not Json"); // return; // } let strCmd=pVal['command']; //alert(strCmd); if(strCmd=='response_userguide_profile') { HandleModelList(pVal['response']); } } function ShowPrinterThumb(pItem, strImg) { $(pItem).attr('src',strImg); $(pItem).attr('onerror',null); } function ChooseModel( ModelName ) { let ChooseItem=$(".ModelCheckBox[model='"+ModelName+"']"); if(ChooseItem!=null) { if( $(ChooseItem).hasClass('ModelCheckBoxSelected') ) $(ChooseItem).removeClass('ModelCheckBoxSelected'); else $(ChooseItem).addClass('ModelCheckBoxSelected'); } } function HandleModelList( pVal ) { if( !pVal.hasOwnProperty("model") ) return; let pModel=pVal['model']; let nTotal=pModel.length; let ModelHtml={}; for(let n=0;n'+ '
'+ ' '+sVV+''+ '
'+ '
all
'+ '
none
'+ '
'+ '
'+ '
'+ '
'+ ''; if(sVV=='Bambu Lab') $('#Content').html( HtmlNewVendor + $('#Content').html() ); else $('#Content').append( HtmlNewVendor ); } let ModelName=OneModel['model']; //Collect Html Node Nozzel Html if( !ModelHtml.hasOwnProperty(strVendor)) ModelHtml[strVendor]=''; let CoverImage="../../image/printer/"+OneModel['model']+"_cover.png"; let CoverImage2="../../../profiles/"+strVendor+"/"+OneModel['model']+"_cover.png"; let CoverImage3=pVal['configpath']+"/system/"+strVendor+"/"+OneModel['model']+"_cover.png"; //alert( 'FinalCover: '+FinalCover ); ModelHtml[strVendor]+='
'+ '
'+ ''+ '
'+ '
'+ '
'+OneModel['model']+'
'+ '
'; } //Update Nozzel Html Append for( let key in ModelHtml ) { $(".OneVendorBlock[vendor='"+key+"'] .PrinterArea").append( ModelHtml[key] ); } //Update Checkbox for(let m=0;m0) window.open('../22/index.html','_self'); } function OnExit() { let ModelAll={}; let ModelSelect=$(".ModelCheckBoxSelected"); let nTotal=ModelSelect.length; if( nTotal==0 ) { ShowNotice(1); return 0; } for(let n=0;n