mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 18:08:50 +00:00
Improved search form responsive mode.
This commit is contained in:
parent
c98683e573
commit
837bc35a6b
@ -199,9 +199,10 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
* @return {HTMLElement} The user element
|
||||
*/
|
||||
addSearchForm: function(navbarElem){
|
||||
//Create form element
|
||||
|
||||
//Create form element (large screens)
|
||||
var searchForm = createElem("li", navbarElem);
|
||||
searchForm.className = "dropdown navbar-form navbar-left messages-menu";
|
||||
searchForm.className = "dropdown navbar-form navbar-left messages-menu hidden-xs";
|
||||
searchForm.setAttribute("role", "search");
|
||||
|
||||
//Create form group
|
||||
@ -221,5 +222,23 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
|
||||
//Initializate menu
|
||||
ComunicWeb.components.search.form.init(searchInput, dropdownContainer);
|
||||
|
||||
//Create search link (small screen)
|
||||
var searchLinkLi = createElem2({
|
||||
appendTo: navbarElem,
|
||||
type: "li",
|
||||
class: "navbar-left messages-menu visible-xs"
|
||||
});
|
||||
|
||||
var searchLink = createElem2({
|
||||
appendTo: searchLinkLi,
|
||||
type: "a",
|
||||
innerHTML: "Search"
|
||||
});
|
||||
|
||||
searchLink.addEventListener("click", function(){
|
||||
openPage("search");
|
||||
});
|
||||
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user