-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished rough draft of contacts index page redesign
- Loading branch information
1 parent
be22d05
commit e6a9887
Showing
14 changed files
with
158 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#search { | ||
|
||
margin-top: 15px; | ||
|
||
.tabs { | ||
background: none; | ||
|
||
li { | ||
a:link, a:visited { | ||
background-color: #ddd; | ||
color: #222; | ||
font-weight: normal; | ||
font-size: 11px; | ||
} | ||
a:hover { | ||
background-color: #ccc; | ||
} | ||
a:active { | ||
background-color: #aaa; | ||
color: white; | ||
} | ||
a.active { | ||
background-color: #eee; | ||
color: black; | ||
} | ||
} | ||
} | ||
|
||
.remote { | ||
border: none; | ||
background-color: #eee; | ||
padding: 10px; | ||
} | ||
|
||
.options { | ||
float: right; | ||
padding-top: 10px; | ||
margin-right: 30px; | ||
} | ||
.options a { | ||
border-bottom: 1px dotted darkCyan; | ||
color: darkCyan; | ||
text-decoration: none; | ||
} | ||
|
||
#query { | ||
margin-top: 6px; | ||
} | ||
} | ||
|
||
.defaultTextActive { color: #a1a1a1; } | ||
|
||
#buttons { | ||
float: right; | ||
padding: 7px; | ||
|
||
.create_asset, ul { display: inline; } | ||
.create_asset { | ||
margin-left: 24px; | ||
display: inline-block; | ||
vertical-align: top; | ||
padding-top: 1px; | ||
span.arrow { | ||
display: inline-block; | ||
vertical-align: middle; | ||
} | ||
} | ||
} | ||
|
||
|
||
ul.format-buttons li { | ||
display: inline; | ||
margin: 0 5px; | ||
|
||
a { | ||
display: inline-block; | ||
width: 16px; | ||
height: 16px; | ||
opacity: 0.3; | ||
} | ||
a.active { opacity: 1; } | ||
a:hover { opacity: 0.6; } | ||
a:active { opacity: 1; } | ||
|
||
a.brief-button { background: url('brief.png'); } | ||
a.long-button { background: url('long.png'); } | ||
a.full-button { background: url('full.png'); } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
.filters#filters | ||
= render "shared/search" | ||
= hook(:index_contact_sidebar_bottom, self) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
page.call "crm.flick", :empty, :toggle | ||
page.call "crm.hide_form", :options if called_from_index_page? | ||
page.call "crm.flip_form", :create_contact | ||
|
||
unless params[:cancel].true? | ||
page[:create_contact].replace_html :partial => "new" | ||
page.call "crm.init_chosen_fields" | ||
page.call "crm.set_title", :create_contact, t(:create_contact) | ||
page.call "crm.create_or_select_account", request.referer =~ /\/accounts\// || @account.id.blank? | ||
hook(:new_contact_rjs, self, :page => page) | ||
else | ||
page.call "crm.set_title", :create_contact, t(:contacts) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
- path = controller.controller_name | ||
- path = "admin/#{path}" if controller.class.to_s.starts_with?("Admin::") | ||
- current_sort_by = t("option_" + Contact.sort_by_map.invert[@sort_by]) | ||
- current_naming = t("option_#{@naming}") | ||
|
||
%div{ :style => "margin: 0px 0px 6px 0px" } | ||
= text_field_tag('query', @current_query, :size => 23, :onfocus => "if (this.value == 'Search #{path}') { this.value = ''; jQuery(this).removeClass('defaultTextActive'); }", :onblur => "if (this.value == '' ) { this.value = 'Search #{path}'; jQuery(this).addClass('defaultTextActive'); }") | ||
|
||
.sorting.options | ||
-# sort_by_displaying: Sort {{models}} by {{field}} displaying first name {{position}} last name. | ||
= t(:sort_by, :models => t(:contacts_small), :field => link_to(current_sort_by, "#", :id => :sort_by)).html_safe | ||
|
||
%script | ||
= render "shared/sort_by" | ||
|
||
|
||
:javascript | ||
var defaultText = 'Search #{path}'; | ||
previous_#{path}_search_value = defaultText; | ||
new Form.Element.Observer('query', 1.5, function(element, value) { | ||
if (value != defaultText && previous_#{path}_search_value != '') { | ||
crm.search(value, '#{path}'); | ||
} | ||
previous_#{path}_search_value = value; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- current_outline = t("option_#{@outline}") | ||
|
||
%ul.format-buttons | ||
%li= link_to '', '#', :title => "Brief format", :"data-outline" => "brief", :class => ["brief-button", ("active" if current_outline == "brief")].compact.join(" ") | ||
%li= link_to '', '#', :title => "Long format", :"data-outline" => "long", :class => ["long-button", ("active" if current_outline == "long")].compact.join(" ") | ||
%li= link_to '', '#', :title => "Full format", :"data-outline" => "full", :class => ["full-button", ("active" if current_outline == "full")].compact.join(" ") | ||
|
||
|
||
:javascript | ||
jQuery('a[data-outline]').click(function(){ | ||
|
||
#{remote_function(:url => send("redraw_#{controller.controller_name}_path"), :with => "'outline=' + jQuery(this).data('outline')",:loading => "$('loading').show()", :complete => "$('loading').hide()")} | ||
|
||
jQuery('a[data-outline]').removeClass('active'); | ||
jQuery(this).addClass('active'); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.