Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bhInfo): popovers made simple #545

Merged
merged 1 commit into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions client/src/js/components/bhInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
angular.module('bhima.components')
.component('bhInfo', {
template :
'<span ' +
' class="text-info fa fa-info-circle" ' +
' uib-popover-template="$ctrl.template" ' +
' popover-placement="right" ' +
' popover-append-to-body="true" ' +
' popover-trigger="mouseenter"> ' +
'</span> ',
bindings : {
template: '@',
direction: '@'
}
});
22 changes: 7 additions & 15 deletions client/src/partials/patient_invoice/patientInvoice.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,7 @@

<label class="control-label">
{{ "FORM.LABELS.TYPE" | translate }}
<span
class="text-info fa fa-info-circle"
uib-popover-template="'typePopover.tmpl.html'"
popover-placement="right"
popover-append-to-body="true"
popover-trigger="mouseenter">
</span>
<bh-info template="typePopover.tmpl.html" direction="right"></bh-info>
</label>

<!-- TODO distributable vs. non distributable sales or invoices should be designed/reviewed carefully -->
Expand Down Expand Up @@ -189,29 +183,27 @@ <h4 ng-repeat="service in PatientInvoiceCtrl.Invoice.billingServices track by se

<h4>
{{ "FORM.LABELS.BILLING_SERVICES" | translate }}

<!-- popover template definitions temporarily at the base of this file -->
<span
class="text-info"
class="text-info fa fa-info-circle"
ng-show="PatientInvoiceCtrl.Invoice.billingServices.length > 0"
uib-popover-template="'billingServicesPopover.tmpl.html'"
popover-placement="right"
popover-append-to-body="true"
popover-trigger="mouseenter">
<span class="fa fa-info-circle"></span>
popover-trigger="mouseenter"
>
</span>
</h4>

<h4>
{{ "FORM.LABELS.SUBSIDIES" | translate }}
<span
class="text-info"
class="text-info fa fa-info-circle"
ng-show="PatientInvoiceCtrl.Invoice.subsidies.length > 0"
uib-popover-template="'subsidiesPopover.tmpl.html'"
popover-placement="right"
popover-append-to-body="true"
popover-trigger="mouseenter">
<span class="fa fa-info-circle"></span>
popover-trigger="mouseenter"
>
</span>
</h4>

Expand Down