version v0.1.3

This commit is contained in:
2016-02-14 04:37:31 +01:00
parent 7dd657471d
commit 45a0e86e74
18 changed files with 366 additions and 83 deletions

View File

@@ -22,6 +22,19 @@ NPGClient.PageHandler = {
return self.getPageByName(self.currPage).getUIElems();
},
//
getCurrPageUIElemByName: function(name) {
/*
var self = this;
if (self.pages.length > 0) {
for (var i = 0; i < self.pages.length; i++) {
if (name == self.pages[i].name) return self.pages[i];
}
}
return undefined;
*/
},
//
getPageByName: function(name) {
@@ -37,17 +50,19 @@ NPGClient.PageHandler = {
// create login page
createLoginPage: function() {
//
console.log('[NPGClient] Creating Login Page');
var self = this;
var p = new NPGClient.AppPage('login');
// Title label
p.addUIObject(new NPGClient.UILabel('login_title', NPGClient.LOGIN.TITLE));
self.pages.push(p);
// name input
p.addUIObject(new NPGClient.UIInputText('login_input', NPGClient.LOGIN.INPUT));
// Server status
p.addUIObject(new NPGClient.UIStatusText('login_servstat', NPGClient.LOGIN.SERVSTATUS));
// test cursor
p.addUIObject(new NPGClient.UICursor('login_cursor', NPGClient.LOGIN.CURSOR));
//
self.pages.push(p);
},
};