diff --git a/assets/js/common/functionsSchema.js b/assets/js/common/functionsSchema.js index 05dec0eb..b684d5d3 100644 --- a/assets/js/common/functionsSchema.js +++ b/assets/js/common/functionsSchema.js @@ -427,7 +427,14 @@ var ComunicWeb = { * Set a new mail value */ set: function(mail){}, - } + }, + + /** + * Search form component + */ + searchForm: { + //TODO : implement + }, }, diff --git a/assets/js/components/menuBar/authenticated.js b/assets/js/components/menuBar/authenticated.js index b2e1f7cd..39d7f217 100644 --- a/assets/js/components/menuBar/authenticated.js +++ b/assets/js/components/menuBar/authenticated.js @@ -123,8 +123,8 @@ ComunicWeb.components.menuBar.authenticated = { */ addSearchForm: function(navbarElem){ //Create form element - var searchForm = createElem("form", navbarElem.parentNode); - searchForm.className = "navbar-form navbar-left"; + var searchForm = createElem("li", navbarElem); + searchForm.className = "dropdown navbar-form navbar-left"; searchForm.setAttribute("role", "search"); //Create form group @@ -137,6 +137,6 @@ ComunicWeb.components.menuBar.authenticated = { searchInput.placeholder = "Search..."; searchInput.type = "text"; searchInput.id = "navbar-search-input"; - + } }; \ No newline at end of file diff --git a/assets/js/components/searchForm/searchForm.js b/assets/js/components/searchForm/searchForm.js new file mode 100644 index 00000000..116cabbc --- /dev/null +++ b/assets/js/components/searchForm/searchForm.js @@ -0,0 +1,14 @@ +/** + * Search form component + * + * @author Pierre HUBERT + */ + +ComunicWeb.components.searchForm = { + /** + * Initializate a search form element + * + * @param {HTMLElement} + */ + +} \ No newline at end of file diff --git a/corePage/config/dev.config.php b/corePage/config/dev.config.php index 6bfb98b8..ce152290 100644 --- a/corePage/config/dev.config.php +++ b/corePage/config/dev.config.php @@ -63,6 +63,7 @@ $config['JSfiles'] = array( //Components "%PATH_ASSETS%js/components/mailCaching.js", + "%PATH_ASSETS%js/components/searchForm/searchForm.js", "%PATH_ASSETS%js/components/menuBar/common.js", "%PATH_ASSETS%js/components/menuBar/notAuthenticated.js", "%PATH_ASSETS%js/components/menuBar/authenticated.js",