← Back to team overview

dhis2-devs team mailing list archive

DHIS header d2HeaderBar

 

Hi Team,

We are using d2HeaderBar in our custom app. We have a textarea in our app
and when we press enter in that or anywhere in document, app is redirecting
to dashboard page.  Without our knowledge, menu state is set open by
default, we had to close it programatically. To fix this, we have to add
this line to fix it temporarily.

dhis2.menu.mainAppMenu.closeAll();



This is how we are including header bar in our app.

angular.module('Reports', ['ngResource', 'ngRoute', 'ngCookies',
'd2HeaderBar']);


and in html we are just using the tag and the scripts

<d2-header-bar class="noprint"></d2-header-bar>


<script>
   window.dhis2 = window.dhis2 || {};
   dhis2.settings = dhis2.settings || {};
   dhis2.settings.baseUrl = '..';
</script>
<script type="text/javascript"
src="/dhis-web-commons/javascripts/dhis2/dhis2.translate.js"></script>
<script type="text/javascript"
src="/dhis-web-commons/javascripts/dhis2/dhis2.menu.js"></script>
<script type="text/javascript"
src="/dhis-web-commons/javascripts/dhis2/dhis2.menu.ui.js"></script>
<link type="text/css" rel="stylesheet"
href="/dhis-web-commons/font-awesome/css/font-awesome.min.css"/>
<link type="text/css" rel="stylesheet" media="screen"
href="/dhis-web-commons/css/menu.css">



Could you please let us know on if we are missing out anything.
*Note*: There is no issue in header bar. we are able to see it right and it
is functioning properly.




Thanks and Regards,
Sultan Ahamar.

Follow ups