-
Notifications
You must be signed in to change notification settings - Fork 987
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Task #CR-970 - Navigation * navbar-toggler: added margin-top of 20px * changed popover message to modal (trying to resume later, when in preview mode)
- Loading branch information
Showing
21 changed files
with
626 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export var NavbarScripts = function () { | ||
var getContentByElementId = function getContentByElementId(elementId) { | ||
var targetHtml = document.getElementById(elementId); | ||
return targetHtml.innerHTML; | ||
}; | ||
|
||
var replaceContent = function replaceContent(replacementContent,targetElementId) { | ||
var element = document.getElementById(targetElementId); | ||
element.innerHTML = ''; | ||
element.innerHTML = replacementContent; | ||
}; | ||
|
||
var initNavbarEvents = function () { | ||
|
||
$(document).on('click', '[data-navtargetid]', function() { | ||
replaceContent(getContentByElementId('main-dropdown'), 'back-content'); | ||
//replace menu content with submenu content | ||
replaceContent(getContentByElementId($(this).data('navtargetid')), 'main-dropdown'); | ||
}); | ||
$(document).on('click', '.back-link', function() { | ||
// switch menu content back to original content (this currently works only with one level nested elements) | ||
replaceContent(getContentByElementId('back-content'), 'main-dropdown'); | ||
}); | ||
}; | ||
|
||
return { | ||
initNavbarEvents: initNavbarEvents, | ||
}; | ||
}; | ||
// register to global scope | ||
window.NavbarScripts = NavbarScripts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.