dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43462
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22037: Removed the icon show detail elements and changed the data elemets to links which display the det...
------------------------------------------------------------
revno: 22037
committer: jijukjose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-02-24 14:51:13 +0100
message:
Removed the icon show detail elements and changed the data elemets to links which display the details on mouse click.
modified:
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/views/defaultForm.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/compare-form.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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-19 16:53:52 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2016-02-24 13:51:13 +0000
@@ -542,15 +542,24 @@
width: 15px;
}
-/*classes for the details icon on dataelements*/
-.info-icon {
- color: #3162C5;
- width:14px;
- height: 14px;
- cursor: pointer;
-}
+/*classes for the details tooltip popup for dataelements*/
.popover {
max-width:400px;
pointer-events:none;
+}
+
+.tooltip-separator-line {
+ height: 0;
+ margin-right:0em;
+ margin-top: 0em;
+ margin-bottom: 0em;
+ width:100%;
+ align: center;
+ border: 0;
+ border-top: 1px solid #ddd;"
+}
+
+.tooltip-font {
+ font-size: small;
}
\ 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-22 12:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2016-02-24 13:51:13 +0000
@@ -15,10 +15,11 @@
</thead>
<tbody>
<tr ng-repeat="eventGridColumn in eventGridColumns" ng-if="eventGridColumn.id !== 'comment' && eventGridColumn.id !== 'uid' && eventGridColumn.id !== 'eventDate' && !hiddenFields[eventGridColumn.id]">
- <td >
- {{eventGridColumn.displayName}}
- <d2-info ng-if="prStDes[de.dataElement.id].dataElement.description" data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.description}}"},
- {"name":"{{"url" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.url}}"}]'>
+ <td>
+ <d2-info display-name="{{eventGridColumn.displayName}}"
+ data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDes[eventGridColumn.id].dataElement.description}}"},
+ {"name":"{{"url" | translate}}", "data":"{{prStDes[eventGridColumn.id].dataElement.url}}"}]'
+ data-title="Details">
</d2-info>
<span ng-if="eventGridColumn.compulsory" class="required">*</span>
</td>
@@ -275,11 +276,13 @@
<tbody>
<tr ng-repeat="de in section.programStageDataElements" ng-if="!hiddenFields[de.dataElement.id]">
<td>
- {{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.displayName}}
-
- <d2-info ng-if="prStDes[de.dataElement.id].dataElement.description" data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.description}}"},
- {"name":"{{"url" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.url}}"}]'>
+ <d2-info display-name="{{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName :
+ prStDes[de.dataElement.id].dataElement.displayName}}"
+ data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.description}}"},
+ {"name":"{{"url" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.url}}"}]'
+ data-title="Details">
</d2-info>
+
<span ng-if="prStDes[de.dataElement.id].compulsory" class="required">*</span>
</td>
<td>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html 2016-02-12 15:42:21 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html 2016-02-24 13:51:13 +0000
@@ -21,7 +21,7 @@
<div class="pull-right hideInPrint">
<button class="btn btn-primary hideInPrint"
type="button"
- ng-if="editingEventInGrid""
+ ng-if="editingEventInGrid"
ng-click="showEventList()">
{{'close_editing'| translate}}
</button>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/compare-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/compare-form.html 2016-02-22 12:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/compare-form.html 2016-02-24 13:51:13 +0000
@@ -159,12 +159,12 @@
<div class="row row-alternate compare-form-row" ng-repeat="prStDe in currentStage.programStageDataElements" ng-if="currentEvent.eventDate && !isHidden(prStDe.dataElement.id, currentEvent)">
<div ng-class="getCompareModeColSize(compareModeColDefs.header)" class="compare-form-extra-padding">
- <span ng-bind="prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName"></span>
+ <d2-info display-name="{{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName}}"
+ data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDe.dataElement.description}}"},
+ {"name":"{{"url" | translate}}", "data":"{{prStDe.dataElement.url}}"}]'
+ data-title="Details">
+ </d2-info>
<span ng-if="prStDe.compulsory" class="required">*</span>
- <span class="hideInPrint">
- <d2-info ng-if="prStDe.dataElement.description" data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDe.dataElement.description}}"}]'>
- </d2-info>
- </span>
</div>
<div ng-class="getCompareModeColSize(compareModeColDefs.otherEvents)" ng-if="otherStageEvents.length > 0" class="compare-form-extra-padding">
@@ -299,14 +299,16 @@
</div>
</div>
- <div class="row row-alternate compare-form-row" ng-repeat="de in section.programStageDataElements" ng-if="!isHidden(de.dataElement.id, currentEvent)">
+ <div class="row row-alternate compare-form-row" ng-repeat="de in section.programStageDataElements"
+ ng-if="!isHidden(de.dataElement.id, currentEvent)">
<div ng-class="getCompareModeColSize(compareModeColDefs.header)" class="compare-form-extra-padding">
- <span ng-bind="prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.displayName"></span>
+ <d2-info display-name="{{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName :
+ prStDes[de.dataElement.id].dataElement.displayName}}"
+ data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.description}}"},
+ {"name":"{{"url" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.url}}"}]'
+ data-title="Details">
+ </d2-info>
<span ng-if="prStDes[de.dataElement.id].compulsory" class="required">*</span>
- <span class="hideInPrint">
- <d2-info ng-if="prStDes[de.dataElement.id].dataElement.description" data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDes[de.dataElement.id].dataElement.description}}"}]'>
- </d2-info>
- </span>
</div>
<!--other Events in section -->
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2016-02-22 12:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2016-02-24 13:51:13 +0000
@@ -14,11 +14,13 @@
</thead>
<tr class="col-md-12" ng-repeat="prStDe in currentStage.programStageDataElements" ng-if="!isHidden(prStDe.dataElement.id, currentEvent)">
<td>
- <span ng-bind="prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName"></span>
+ <d2-info display-name="{{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName}}"
+ data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDe.dataElement.description}}"},
+ {"name":"{{"url" | translate}}", "data":"{{prStDe.dataElement.url}}"}]'
+ data-title="Details">
+ </d2-info>
<span ng-if="prStDe.compulsory" class="required">*</span>
- <span class="hideInPrint">
- <d2-info ng-if="prStDe.dataElement.description" data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDe.dataElement.description}}"}]'>
- </d2-info>
+ <span class="hideInPrint">
<span ng-if="otherValuesLists[prStDe.dataElement.id]" ng-repeat="altValue in otherValuesLists[prStDe.dataElement.id] track by $index">
<span class="label label-default">{{altValue | translate}}</span>
</span>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html 2016-02-22 12:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html 2016-02-24 13:51:13 +0000
@@ -64,10 +64,12 @@
{{currentStage.excecutionDateLabel}}
</th>
<th class="" ng-repeat="prStDe in currentStage.programStageDataElements">
- {{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName}}
+ <d2-info display-name="{{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName}}"
+ data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDe.dataElement.description}}"},
+ {"name":"{{"url" | translate}}", "data":"{{prStDe.dataElement.url}}"}]'
+ data-title="Details">
+ </d2-info>
<span ng-if="prStDe.compulsory" class="required">*</span>
- <d2-info ng-if="prStDe.dataElement.description" data-content='[{"name":"{{"description" | translate}}", "data":"{{prStDe.dataElement.description}}"}]'>
- </d2-info>
</th>
<th class="" style="text-align: right">Status</th>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html 2016-02-22 12:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html 2016-02-24 13:51:13 +0000
@@ -2,9 +2,12 @@
<table class="dhis2-list-table-striped dhis2-table-hover">
<tr ng-repeat="attribute in attributes | filter: {attribute: 'true'} " ng-if="!hiddenFields[attribute.id] && ((editingDisabled && attribute.show) || !editingDisabled)">
<td>
- <span ng-bind="attribute.displayName"></span><span ng-if="attribute.mandatory || attribute.unique" class="required">*</span>
- <d2-info ng-if="attribute.description" data-content='[{"name":"{{"description" | translate}}", "data":"{{attribute.description}}"}]'>
+ <d2-info display-name="{{attribute.displayName}}"
+ data-content='[{"name":"{{"description" | translate}}", "data":"{{attribute.description}}"},
+ {"name":"{{"url" | translate}}", "data":"{{attribute.url}}"}]'
+ data-title="Details">
</d2-info>
+ <span ng-if="attribute.mandatory || attribute.unique" class="required">*</span>
</td>
<td>
<ng-form name="innerForm">
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2016-02-19 16:53:52 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2016-02-24 13:51:13 +0000
@@ -1927,15 +1927,24 @@
margin-left: 1%;
}
-/*classes for the details icon on dataelements*/
-.info-icon {
- color: #3162C5;
- width:14px;
- height: 14px;
- cursor: pointer;
-}
+/*classes for the details tooltip popup for dataelements*/
.popover {
max-width:400px;
pointer-events:none;
-}
\ No newline at end of file
+}
+
+.tooltip-separator-line {
+ height: 0;
+ margin-right:0em;
+ margin-top: 0em;
+ margin-bottom: 0em;
+ width:100%;
+ align: center;
+ border: 0;
+ border-top: 1px solid #ddd;"
+}
+
+.tooltip-font {
+ font-size: small;
+}
=== 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-19 16:53:52 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-02-24 13:51:13 +0000
@@ -626,64 +626,65 @@
link: function (scope, element, attrs) {
}
};
-}).directive('d2Info', function ($translate) {
- return {
- restrict: 'EA',
- template: '<span type="button" class="glyphicon glyphicon-info-sign info-icon" data-container="body" data-toggle="popover"' +
- 'data-placement="right" data-html="true" data-title="{{title}}" data-content="{{formattedContent}}"></span>',
- scope: {
- title: '@?',
- content: '@'
- },
- link: function (scope, element) {
- var showIcon = true;
-
-
- 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;
- }
- }
- });
- });
-
- element.on('$destroy', function (e) {
- $('[data-toggle="popover"]').each(function () {
- if (!e.target) {
- alert("No target");
- }
- if (!$(this).is(e.target)) {
- $(this).popover('hide');
- }
- });
- });
-
-
- 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 += '<div><b>' + content.name + ': </b><a href=' + content.data + ' target=\'_blank\' style=\'cursor:pointer;pointer-events:auto;\'>' + content.data + '</a></div>';
-
- } else {
- formattedString += '<div><b>' + content.name + ': </b>' + content.data + '</div>';
- }
- }
- return formattedString;
+})
+.directive('d2Info', function ($translate) {
+ return {
+ restrict: 'EA',
+ template: '<a style="cursor: pointer;" type="button" data-container="body" data-toggle="popover"' +
+ 'data-placement="right" data-html="true" data-title="{{title}}" data-trigger="click" ' +
+ 'data-content="{{formattedContent}}">' +
+ '{{displayName}}'+
+ '</a>',
+ scope: {
+ title: '@?',
+ content: '@',
+ displayName: '@'
+ },
+ link: function (scope, element) {
+ var showIcon = true;
+
+ scope.formattedContent = getFormattedContent(scope.content);
+
+ $('body').on('click', function (e) {
+ $('[data-toggle="popover"]').each(function () {
+ if (!$(this).is(e.target)) {
+ $(this).popover('hide');
+ } else {
+ if (showIcon) {
+ $(this).popover('show');
+ }
+ }
+ });
+ });
+
+ element.on('$destroy', function (e) {
+ $('[data-toggle="popover"]').each(function () {
+ if (!$(this).is(e.target)) {
+ $(this).popover('hide');
+ scope.clicked = 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 (index >= 1) {
+ formattedString += '<hr class="tooltip-separator-line">';
+ }
+ if (content.name === $translate.instant('url') && content.data !== "Not available") {
+ formattedString += '<div class="tooltip-font"><b>' + content.name + ': </b><a href=' + content.data + ' target=\'_blank\' style=\'cursor:pointer;pointer-events:auto;\'>' + content.data + '</a></div>';
+ } else {
+ formattedString += '<div class="tooltip-font"><b>' + content.name + ': </b>' + content.data + '</div>';
+ }
}
+ return formattedString;
}
}
- });
\ No newline at end of file
+ }
+});
\ No newline at end of file