mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-27 03:08:51 +00:00
Made the search form lives
This commit is contained in:
parent
3c803a16c0
commit
97fd4e5ce4
@ -5,6 +5,12 @@
|
||||
*/
|
||||
|
||||
ComunicWeb.components.searchForm = {
|
||||
|
||||
/**
|
||||
* Store the text input area
|
||||
*/
|
||||
_textInput: null,
|
||||
|
||||
/**
|
||||
* Initializate a search form element
|
||||
*
|
||||
@ -42,6 +48,9 @@ ComunicWeb.components.searchForm = {
|
||||
ComunicWeb.components.searchForm.ontextchange(textInput, searchResultBox, searchBoxContainer, footerLink);
|
||||
}
|
||||
|
||||
//Cache textinput area
|
||||
this._textInput = textInput;
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
@ -140,5 +149,19 @@ ComunicWeb.components.searchForm = {
|
||||
//Apply user informations
|
||||
userImage.src = userInfos.accountImage;
|
||||
usernameElem.innerHTML = userInfos.firstName + " " + userInfos.lastName;
|
||||
|
||||
//Make user link element live
|
||||
userLinkElement.onclick = function() {
|
||||
ComunicWeb.components.searchForm.close();
|
||||
openUserPage(userIDorPath(userInfos));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Close and clear the search form
|
||||
*/
|
||||
close: function(){
|
||||
this._textInput.value = "";
|
||||
this._textInput.onkeyup();
|
||||
}
|
||||
}
|
@ -256,7 +256,7 @@ ComunicWeb.user.userInfos = {
|
||||
getIDorPath: function(userInfos){
|
||||
|
||||
//Check if a virtual directory is available
|
||||
if(userInfos.virtualDirectory != null){
|
||||
if(userInfos.virtualDirectory != null && userInfos.virtualDirectory != ""){
|
||||
return userInfos.virtualDirectory;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user