Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
work on button styles
Browse files Browse the repository at this point in the history
Addresses #12
  • Loading branch information
Joel Glovier committed Sep 7, 2014
1 parent 41023c4 commit e6a8c54
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 49 deletions.
54 changes: 27 additions & 27 deletions app/patients/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="form-control">
{{id}}
</div>
</div>
</div>
{{em-input property="firstName" label="First Name"}}
{{em-input property="lastName" label="Last Name"}}
<div class="form-group">
Expand Down Expand Up @@ -60,9 +60,9 @@
<div class="panel-heading">
<h3 class="panel-title">
<a data-toggle="collapse" data-parent="#patient-accordion" href="#patient-diagnosis">
Additional Diagnoses
Additional Diagnoses
{{#if canAddDiagnosis}}
<button class="btn btn-primary" {{action "showAddDiagnosis" bubbles=false }}>New Diagnosis</button>
<button class="btn btn-primary align-right" {{action "showAddDiagnosis" bubbles=false }}><span class="octicon octicon-plus"></span> New Diagnosis</button>
{{/if}}
</a>
</h3>
Expand All @@ -82,7 +82,7 @@
<td>{{description}}</td>
<td>
{{#if canDeleteDiagnosis}}
<button class="btn btn-primary" {{action "deleteDiagnosis" this}}>Delete</button>
<button class="btn btn-defaul warning" {{action "deleteDiagnosis" this}}><span class="octicon octicon-x"></span> Delete</button>
{{/if}}
</td>
</tr>
Expand All @@ -96,9 +96,9 @@
<div class="panel-heading">
<h3 class="panel-title">
<a data-toggle="collapse" data-parent="#patient-accordion" href="#patient-medication">
Medication
Medication
{{#if canAddMedication}}
<button class="btn btn-primary" {{action "newMedication" bubbles=false }}>New Medication</button>
<button class="btn btn-primary align-right" {{action "newMedication" bubbles=false }}><span class="octicon octicon-plus"></span>New Medication</button>
{{/if}}
</a>
</h3>
Expand All @@ -124,10 +124,10 @@
<td>
{{#if canEdit}}
{{#if parentController.canAddMedication}}
<button class="btn btn-primary" {{action "editMedication" this}}>Edit</button>
<button class="btn btn-default neutral" {{action "editMedication" this}}>Edit</button>
{{/if}}
{{#if parentController.canDeleteMedication}}
<button class="btn btn-default" {{action "showDeleteMedication" this bubbles=false }}>Delete</button>
<button class="btn btn-default warning" {{action "showDeleteMedication" this bubbles=false }}><span class="octicon octicon-x"></span>Delete</button>
{{/if}}
{{/if}}
</td>
Expand All @@ -141,9 +141,9 @@
<div class="panel-heading">
<h3 class="panel-title">
<a data-toggle="collapse" data-parent="#patient-accordion" href="#patient-labs">
Labs
Labs
{{#if canAddLab}}
<button class="btn btn-primary" {{action "newLab" bubbles=false }}>New Lab</button>
<button class="btn btn-primary align-right" {{action "newLab" bubbles=false }}><span class="octicon octicon-plus"></span> New Lab</button>
{{/if}}
</a>
</h3>
Expand Down Expand Up @@ -173,10 +173,10 @@
<td>
{{#if canEdit}}
{{#if parentController.canAddLab}}
<button class="btn btn-primary" {{action "editLab" this}}>Edit</button>
<button class="btn btn-default neutral" {{action "editLab" this}}>Edit</button>
{{/if}}
{{#if parentController.canDeleteLab}}
<button class="btn btn-default" {{action "showDeleteLab" this bubbles=false }}>Delete</button>
<button class="btn btn-default warning" {{action "showDeleteLab" this bubbles=false }}><span class="octicon octicon-x"></span> Delete</button>
{{/if}}
{{/if}}
</td>
Expand All @@ -190,9 +190,9 @@
<div class="panel-heading">
<h3 class="panel-title">
<a data-toggle="collapse" data-parent="#patient-accordion" href="#patient-imaging">
Imaging
Imaging
{{#if canAddImaging}}
<button class="btn btn-primary" {{action "newImaging" bubbles=false }}>New Imaging</button>
<button class="btn btn-primary align-right" {{action "newImaging" bubbles=false }}><span class="octicon octicon-plus"></span> New Imaging</button>
{{/if}}
</a>
</h3>
Expand All @@ -209,7 +209,7 @@
<th>Notes</th>
<th>Requested By</th>
<th>Actions</th>
</tr>
</tr>
{{#each patientImaging itemController="imaging/item-controller"}}
<tr {{action "editImaging" this}}>
<td>{{date-format requestedDate}}</td>
Expand All @@ -222,10 +222,10 @@
<td>
{{#if canEdit}}
{{#if parentController.canAddImaging}}
<button class="btn btn-primary" {{action "editImaging" this}}>Edit</button>
<button class="btn btn-default neutral" {{action "editImaging" this}}>Edit</button>
{{/if}}
{{#if parentController.canDeleteImaging}}
<button class="btn btn-default" {{action "showDeleteImaging" this bubbles=false }}>Delete</button>
<button class="btn btn-default warning" {{action "showDeleteImaging" this bubbles=false }}><span class="octicon octicon-x"></span> Delete</button>
{{/if}}
{{/if}}
</td>
Expand All @@ -234,14 +234,14 @@
</table>
</div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">
<a data-toggle="collapse" data-parent="#patient-accordion" href="#patient-visits">
Visits
Visits
{{#if canAddVisit}}
<button class="btn btn-primary" {{action "newVisit" bubbles=false }}>New Visit</button>
<button class="btn btn-primary align-right" {{action "newVisit" bubbles=false }}><span class="octicon octicon-plus"></span> New Visit</button>
{{/if}}
</a>
</h3>
Expand All @@ -267,10 +267,10 @@
<td>{{visitType}}</td>
<td>
{{#if patientController.canAddVisit}}
<button class="btn btn-primary" {{action "editVisit" this}}>Edit</button>
<button class="btn btn-default neutral" {{action "editVisit" this}}>Edit</button>
{{/if}}
{{#if patientController.canDeleteVisit}}
<button class="btn btn-default" {{action "showDeleteVisit" this bubbles=false }}>Delete</button>
<button class="btn btn-default warning" {{action "showDeleteVisit" this bubbles=false }}><span class="octicon octicon-x"></span> Delete</button>
{{/if}}
</td>
</tr>
Expand All @@ -284,9 +284,9 @@
<div class="panel-heading">
<h3 class="panel-title">
<a data-toggle="collapse" data-parent="#patient-accordion" href="#patient-appointments">
Appointments
Appointments
{{#if canAddAppointment}}
<button class="btn btn-primary" {{action "newAppointment" bubbles=false }}>New Appointment</button>
<button class="btn btn-primary align-right" {{action "newAppointment" bubbles=false }}><span class="octicon octicon-plus"></span> New Appointment</button>
{{/if}}
</a>
</h3>
Expand All @@ -310,10 +310,10 @@
<td>{{appointmentType}}</td>
<td>
{{#if patientController.canAddAppointment}}
<button class="btn btn-primary" {{action "editAppointment" this}}>Edit</button>
<button class="btn btn-default neutral" {{action "editAppointment" this}}>Edit</button>
{{/if}}
{{#if patientController.canDeleteAppointment}}
<button class="btn btn-default" {{action "showDeleteAppointment" this bubbles=false }}>Delete</button>
<button class="btn btn-default warning" {{action "showDeleteAppointment" this bubbles=false }}><span class="octicon octicon-x"></span> Delete</button>
{{/if}}
</td>
</tr>
Expand All @@ -323,5 +323,5 @@
</div>
</div>
</div>

</div>
12 changes: 6 additions & 6 deletions app/patients/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
{{#if parentController.showActions}}
<td>
{{#if parentController.canAdd}}
<button class="btn btn-default" {{action 'editItem' this}}>Edit</button>
<button class="btn btn-default neutral" {{action 'editItem' this}}>Edit</button>
{{/if}}
{{#if parentController.canDelete}}
<button class="btn btn-default" {{action 'deleteItem' this}}>Delete</button>
<button class="btn btn-default warning" {{action 'deleteItem' this}}><span class="octicon octicon-x"></span> Delete</button>
{{/if}}
</td>
{{/if}}
{{/if}}
</tr>
{{/each}}
{{/with}}
</table>
{{else}}
<div class="alert alert-info">
<em>No patients found.</em>
<em>No patients found.</em>
{{#if canAdd}}
<em>Create a new patient record?</em>
<button class="btn btn-primary" {{action 'newItem'}}>New Patient</button>
<em>Create a new patient record?</em>
<button class="btn btn-primary on-white" {{action 'newItem'}}>New Patient</button>
{{/if}}
</div>
{{/if}}
37 changes: 36 additions & 1 deletion app/styles/_bootstrap-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,43 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

.btn {

&.on-white {
background-color: $blue_light;
color: $navy;
}

&.warning {
background-color: $red_light;
color: $red;

&:hover,
&:focus {
background-color: $red;
color: white;
}
}

&.neutral {
background-color: $gray_light;
color: $gray;

&:hover,
&:focus { opacity: .8 }
}

.octicon {
position: relative;
left: -3px;
}

&.align-right { float: right; }
&.align-left { float: left; }

}

.btn-default {
text-shadow: 0 1px 0 #fff;
background-color: $green;
border: none;
border-radius: 3px;
Expand Down
20 changes: 12 additions & 8 deletions app/styles/_variables_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// Variables
// -------------------------------------------/

$green: #00bd9c;
$green_light: #13d8b6;
$navy: #2e4359;
$navy_mid: #546a83;
$navy_mid2: #3A4D63;
$navy_drk: #253649;
$navy_text: #97afc8;
$blue_light: #dbebff;
$green: #00bd9c;
$green_light: #13d8b6;
$navy: #2e4359;
$navy_mid: #546a83;
$navy_mid2: #3A4D63;
$navy_drk: #253649;
$navy_text: #97afc8;
$blue_light: #dbebff;
$red: #ff6d6f;
$red_light: rgba($red,.3);
$gray_light: #d9d9d9;
$gray: rgba($navy,.65);


// end variables ------------/
Expand Down
4 changes: 2 additions & 2 deletions app/templates/paging.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{#if showPagination}}
<div class="btn-group pull-right">
<button class="btn btn-default" {{action 'previousPage'}}{{bind-attr disabled=disablePreviousPage}}>
<button class="btn btn-default on-white" {{action 'previousPage'}}{{bind-attr disabled=disablePreviousPage}}>
<span class="glyphicon glyphicon-chevron-left"></span>
</button>
<button class="btn btn-default" {{action 'nextPage'}}{{bind-attr disabled=disableNextPage}}>
<button class="btn btn-default on-white" {{action 'nextPage'}}{{bind-attr disabled=disableNextPage}}>
<span class="glyphicon glyphicon-chevron-right"></span>
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/templates/panel.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
</div>
<div class="panel-footer">
{{#if showUpdateButton}}
<button class="btn btn-primary" {{action updateButtonAction}} {{bind-attr disabled=isUpdateDisabled }}>{{updateButtonText}}</button>
<button class="btn btn-primary on-white" {{action updateButtonAction}} {{bind-attr disabled=isUpdateDisabled }}>{{updateButtonText}}</button>
{{/if}}
<button class="btn btn-default" {{action "cancel"}}>Return</button>
<button class="btn btn-default warning" {{action "cancel"}}>Cancel</button>
</div>
</div>
4 changes: 2 additions & 2 deletions app/templates/search-listing.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="panel panel-primary">
<div class="panel-body">
<div class="panel-body">
{{yield}}
</div>
</div>
<button class="btn btn-primary" {{action 'allItems'}}>{{view.allButtonText}}</button>
<button class="btn btn-primary on-white" {{action 'allItems'}}>{{view.allButtonText}}</button>

23 changes: 22 additions & 1 deletion dist/assets/hospitalrun.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e6a8c54

Please sign in to comment.