=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 2016-01-25 10:14:50 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties 2016-02-19 12:07:47 +0000 @@ -164,4 +164,6 @@ audit_modified=Modified By audit_history_unavailable=There are no previous values stored, so audit history is not available for audit_history=Audit History -delete_error_audit=The event could not be deleted because it contains an auditlog. \ No newline at end of file +delete_error_audit=The event could not be deleted because it contains an auditlog. +description=Description +url=URL === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2016-02-12 15:42:21 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2016-02-19 12:07:47 +0000 @@ -540,4 +540,16 @@ .fa-icon-width { width: 15px; +} + +.info-icon { + color: #3162C5; + width:14px; + height: 14px; + cursor: pointer; +} + +.popover { + max-width:400px; + pointer-events:none; } \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2016-02-12 15:42:21 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2016-02-19 12:07:47 +0000 @@ -17,9 +17,12 @@ {{eventGridColumn.displayName}} - * + + + * - +
@@ -269,11 +272,15 @@ - + - - {{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.displayName}} - * + + {{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.displayName}} + + + + * === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-02-12 15:42:21 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-02-19 12:07:47 +0000 @@ -625,4 +625,50 @@ }], link: function (scope, element, attrs) {} }; +}).directive('d2Info',function($translate){ + var showIcon = true; + return { + restrict: 'EA', + template:'', + scope: { + title:'@?', + content:'@' + }, + link: function(scope,element, attrs) { + scope.formattedContent = getFormattedContent(scope.content); + $('body').on('click', function (e) { + scope.$apply(); + + $('[data-toggle="popover"]').each(function () { + if (!$(this).is(e.target)) { + $(this).popover('hide'); + } else { + if(showIcon) { + $(this).popover('show'); + showIcon=false; + } + } + }); + }); + + function getFormattedContent(contentArrayString) { + var contentArray = $.parseJSON(contentArrayString); + var formattedString = ""; + for (var index = 0; index < contentArray.length; index++) { + var content = contentArray[index]; + if (!content.data) { + content.data="Not available"; + } + if (content.name === $translate.instant('url') && content.data !== "Not available") { + formattedString += '
'+ content.name + ': ' + content.data + '
'; + + } else { + formattedString += '
' + content.name + ': ' + content.data + '
'; + } + } + return formattedString; + } + } + } }); \ No newline at end of file