diff --git a/app/assets/stylesheets/angular/clients.css.scss b/app/assets/stylesheets/angular/clients.css.scss
index c63d21f4..28ab53a0 100644
--- a/app/assets/stylesheets/angular/clients.css.scss
+++ b/app/assets/stylesheets/angular/clients.css.scss
@@ -107,6 +107,11 @@ $client-form-nav-padding: 50px;
}
}
}
+
+ .data-table {
+ background-color: $light-gray;
+ @include ng-scope-hover();
+ }
}
.section-edit {
@@ -388,15 +393,11 @@ $client-form-nav-padding: 50px;
text-align: center;
}
- .ng-scope:hover {
- cursor: pointer;
- cursor: hand;
- background-color: #f7f7f7;
- }
-
tr th i {
color: #666;
}
+
+ @include ng-scope-hover();
}
.history-table {
@@ -424,6 +425,8 @@ $client-form-nav-padding: 50px;
color: #999;
}
}
+
+ @include ng-scope-hover();
}
.documents-table {
diff --git a/app/assets/stylesheets/shared/_constants.css.scss b/app/assets/stylesheets/shared/_constants.css.scss
index 914a5f32..fdeccf55 100644
--- a/app/assets/stylesheets/shared/_constants.css.scss
+++ b/app/assets/stylesheets/shared/_constants.css.scss
@@ -9,4 +9,6 @@ $nav-width-desktops: 200px;
$nav-width-widescreens: $nav-width-desktops;
$light-gray: #f8f8f8;
-$light-green: #ddffdd;
\ No newline at end of file
+$light-green: #ddffdd;
+
+$table-hover: rgba(200,200,200,0.1);
\ No newline at end of file
diff --git a/app/assets/stylesheets/shared/_utilities.css.scss b/app/assets/stylesheets/shared/_utilities.css.scss
index 97a8ef52..0ddf1d7c 100644
--- a/app/assets/stylesheets/shared/_utilities.css.scss
+++ b/app/assets/stylesheets/shared/_utilities.css.scss
@@ -55,3 +55,11 @@ $break-xlarge: 1200px;
-moz-border-radius: $radius;
border-radius: $radius;
}
+
+@mixin ng-scope-hover() {
+ .ng-scope:hover {
+ cursor: pointer;
+ cursor: hand;
+ background-color: $table-hover;
+ }
+}
\ No newline at end of file
diff --git a/app/views/templates/clients/_action_table.html.erb b/app/views/templates/clients/_action_table.html.erb
index 13c49ad7..4b143d9b 100644
--- a/app/views/templates/clients/_action_table.html.erb
+++ b/app/views/templates/clients/_action_table.html.erb
@@ -26,14 +26,16 @@
No <%= name %> available. |
<%= " | orderBy:#{model}Predicate:#{model}Reverse" if local_assigns[:sortable] %>"
- <%= defined?(rowhref) && raw("data-click-href='#{rowhref}'") %> >
+ <%= defined?(rowHref) && raw("data-click-href='#{rowHref}'") %>
+ <% # TODO: Investigate weirld interaction between single quotes and double qoutes which occurs when it is all one string %>
+ <%= defined?(rowClick) && raw("data-ng-click=" + rowClick) %> >
<% fields.each do |field| %>
<%= raw field[:content] %> |
<% end %>
<% actions.each do |action| %>
>
+ class="pure-button pure-button-small <%= action[:class] %>" <%= raw action[:attrs] %> eat-click>
<% end %>
diff --git a/app/views/templates/clients/_field_table.html.erb b/app/views/templates/clients/_field_table.html.erb
index 168abb7b..caf435a6 100644
--- a/app/views/templates/clients/_field_table.html.erb
+++ b/app/views/templates/clients/_field_table.html.erb
@@ -10,6 +10,7 @@
:locals => {
:name => 'data',
:model => "client.#{field[:id]}.value",
+ :rowClick => "editInField('#{field[:id]}',$index)",
:fields => [
{
:name => field[:type].first[:name],
diff --git a/app/views/templates/clients/_recent_table.html.erb b/app/views/templates/clients/_recent_table.html.erb
index 23ab502e..953ea93f 100644
--- a/app/views/templates/clients/_recent_table.html.erb
+++ b/app/views/templates/clients/_recent_table.html.erb
@@ -3,7 +3,7 @@
:name => 'clients',
:model => 'clients.clients',
:limit => local_assigns[:limit],
- :rowhref => '#/clients/show/{{ item.id }}',
+ :rowHref => '#/clients/show/{{ item.id }}',
:fields => [
{
:name => 'Name',
diff --git a/app/views/templates/clients/index.html.erb b/app/views/templates/clients/index.html.erb
index 2a600f0b..dcadf992 100644
--- a/app/views/templates/clients/index.html.erb
+++ b/app/views/templates/clients/index.html.erb
@@ -39,7 +39,7 @@
:name => 'clients',
:model => 'clients',
:infiniteScroll => 'updateResults(true)',
- :rowhref => '#/clients/show/{{ item.id }}',
+ :rowHref => '#/clients/show/{{ item.id }}',
:sortable => {},
:fields => [
{
diff --git a/app/views/templates/clients/show.html.erb b/app/views/templates/clients/show.html.erb
index 4a7d7d27..cf348ea1 100644
--- a/app/views/templates/clients/show.html.erb
+++ b/app/views/templates/clients/show.html.erb
@@ -89,6 +89,7 @@
:locals => {
:name => 'history',
:model => 'history',
+ :rowHref => '#/clients/edit/{{ item.client_id }}/{{ item.id }}',
:fields => [
{
:name => 'Description',
@@ -127,6 +128,7 @@
:locals => {
:name => 'documents',
:model => 'documents',
+ :rowHref => '/api/documents/{{ item.id }}',
:fields => [
{
:name => 'Description',
diff --git a/app/views/templates/index.html.erb b/app/views/templates/index.html.erb
index 525663e0..06b89593 100644
--- a/app/views/templates/index.html.erb
+++ b/app/views/templates/index.html.erb
@@ -22,6 +22,7 @@
:name => 'history',
:model => 'history',
:limit => 5,
+ :rowHref => '#/clients/edit/{{ item.client_id }}/{{ item.id }}',
:fields => [
{
:name => 'Description',
@@ -29,8 +30,8 @@
:content => <<-END
{{ item.description | ellipsize: 40:1 }}
END
|