First commit
This commit is contained in:
74
application/demo/leftSide/leftSide.button.news.js
Normal file
74
application/demo/leftSide/leftSide.button.news.js
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
import menuButton from './leftSide.button.js';
|
||||
|
||||
export default class newsButton extends menuButton{
|
||||
|
||||
text = "Home";
|
||||
|
||||
#ifdef MACOS
|
||||
|
||||
borderTopLeftRadius = 8;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
create() {
|
||||
|
||||
var pathName = window.location.pathname;
|
||||
|
||||
var pathParts = pathName.split("/");
|
||||
|
||||
if( !pathParts[1] ) {
|
||||
|
||||
this.stateMachine.composeState( );
|
||||
|
||||
}
|
||||
|
||||
//this.activateButton();
|
||||
|
||||
this.openPage();
|
||||
|
||||
}
|
||||
|
||||
async click() {
|
||||
|
||||
this.stateMachine.composeState( "Home" );
|
||||
|
||||
this.openPage();
|
||||
|
||||
}
|
||||
|
||||
state openPage() {
|
||||
|
||||
var application = this.parent.parent;
|
||||
|
||||
var rightSide = application.rightSide;
|
||||
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
application.minimizeButton.close();
|
||||
|
||||
#endif
|
||||
|
||||
this.deactivateButtons();
|
||||
|
||||
//this.activateButton();
|
||||
|
||||
console.log("rightSide", rightSide);
|
||||
|
||||
rightSide.newsPages.newsItemPage.transform = "translateX(0)";
|
||||
|
||||
rightSide.newsPages.newsPage.transform = "translateX(0)";
|
||||
|
||||
rightSide.hideChildren();
|
||||
|
||||
rightSide.newsPages.show();
|
||||
|
||||
//rightSide.newsPages.newsItemPage.newsListTable.body.sync()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user