Doing more achievement work-ish.

This commit is contained in:
Brian Buller 2015-11-17 13:08:50 -06:00
parent 9760208632
commit 204f1dd8bd
3 changed files with 10 additions and 4 deletions

View File

@ -121,9 +121,8 @@ function buildList() {
B("#levelup-user-"+idName).append(userNameSpan.text(userName));
B("#levelup-user-"+idName).append(B("<div>").attr('id','levelup-user-'+idName+'-smalllevel').addClass('levelup-smalllevel').text("Level "+userLevel));
B("#levelup-user-"+idName).append(B("<div>").attr('id','levelup-user-'+idName+'-xp').addClass('levelup-xp').text("("+xp+"/"+toNext+")"));
}
B('.levelup-user').on('click', function() {
console.log("Load User Profile: "+B(this).attr('data-username'));
window.location.href = '/levelup/profile/'+B(this).attr('data-username');
});
}
}

View File

@ -8,6 +8,7 @@ import (
/*
* General Message Processor
* Handles general message stuff, stats, etc.
*/
type generalProcessor struct{}

View File

@ -90,6 +90,7 @@ func (wm *levelUpAchieveWebModule) GetName() string {
func (wm *levelUpAchieveWebModule) GetRoutes() map[string]func(http.ResponseWriter, *http.Request) {
ret := make(map[string]func(http.ResponseWriter, *http.Request))
ret["/levelup/achieve"] = wm.handleLevelUpAchieveGeneral
ret["/levelup/achieve/admin"] = wm.handleLevelUpAchieveAdmin
return ret
}
func (wm *levelUpAchieveWebModule) Register() {
@ -107,6 +108,11 @@ func (wm *levelUpAchieveWebModule) GetBottomMenuEntries() []menuItem {
return ret
}
func (wm *levelUpAchieveWebModule) handleLevelUpAchieveAdmin(w http.ResponseWriter, req *http.Request) {
// TODO: Test for admin login
initRequest(w, req)
}
func (wm *levelUpAchieveWebModule) handleLevelUpAchieveGeneral(w http.ResponseWriter, req *http.Request) {
initRequest(w, req)
//setMenuItemActive("Achieve GET!")