Skip to content

Commit

Permalink
replaced arrow icons with html to make sure it gets the brand color. …
Browse files Browse the repository at this point in the history
…needs to be optimized in addNewSegment in firefox +ie it is 1 or 2 pixel too high/low
  • Loading branch information
tsteur committed May 22, 2014
1 parent acd0f95 commit c812b5a
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 40 deletions.
22 changes: 2 additions & 20 deletions plugins/CoreHome/javascripts/dataTable.js
Expand Up @@ -544,24 +544,6 @@ $.extend(DataTable.prototype, UIControl.prototype, {
handleSort: function (domElem) {
var self = this;

function getSortImageSrc() {
var imageSortSrc = false;
if (currentIsSubDataTable) {
if (self.param.filter_sort_order == 'asc') {
imageSortSrc = 'plugins/Zeitgeist/images/sort_subtable_asc.png';
} else {
imageSortSrc = 'plugins/Zeitgeist/images/sort_subtable_desc.png';
}
} else {
if (self.param.filter_sort_order == 'asc') {
imageSortSrc = 'plugins/Zeitgeist/images/sortasc.png';
} else {
imageSortSrc = 'plugins/Zeitgeist/images/sortdesc.png';
}
}
return imageSortSrc;
}

if (self.props.enable_sort) {
$('.sortable', domElem).off('click.dataTableSort').on('click.dataTableSort',
function () {
Expand All @@ -574,7 +556,7 @@ $.extend(DataTable.prototype, UIControl.prototype, {
if (self.param.filter_sort_column) {
// are we in a subdatatable?
var currentIsSubDataTable = $(domElem).parent().hasClass('cellSubDataTable');
var imageSortSrc = getSortImageSrc();
var imageSortClassType = currentIsSubDataTable ? 'sortSubtable' : ''
var imageSortWidth = 16;
var imageSortHeight = 16;

Expand All @@ -585,7 +567,7 @@ $.extend(DataTable.prototype, UIControl.prototype, {
// adding an image and the class columnSorted to the TD
$("th#" + self.param.filter_sort_column + ' #thDIV', domElem).parent()
.addClass('columnSorted')
.prepend('<div class="sortIconContainer sortIconContainer' + ImageSortClass + '"><img class="sortIcon" width="' + imageSortWidth + '" height="' + imageSortHeight + '" src="' + imageSortSrc + '" /></div>');
.prepend('<div class="sortIconContainer sortIconContainer' + ImageSortClass + ' ' + imageSortClassType + '"><span class="sortIcon" width="' + imageSortWidth + '" height="' + imageSortHeight + '" /></div>');
}
},

Expand Down
6 changes: 3 additions & 3 deletions plugins/Morpheus/stylesheets/general/_forms.less
Expand Up @@ -25,8 +25,8 @@ button[type="button"],
cursor: pointer;
border: 0px !important;
&:hover {
background: #ff9600 !important;
background-color: #ff9600 !important;
background: @theme-color-brand !important;
background-color: @theme-color-brand !important;
}

em {
Expand Down Expand Up @@ -137,7 +137,7 @@ button[type="button"],
content: '';
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-bottom: 5px solid #d4291f;
border-bottom: 5px solid @theme-color-brand;
border-top-color: transparent;
position: absolute;
top: 1px;
Expand Down
24 changes: 24 additions & 0 deletions plugins/Morpheus/stylesheets/theme.less
Expand Up @@ -394,6 +394,30 @@ table.dataTable {
.sortIcon {
margin-top: -1px;
}

.sortIconContainerAsc .sortIcon {
margin-top: -6px;
}

.sortIconContainer.sortSubtable {
color: @theme-color-text-light;
}

.sortIconContainerAsc .sortIcon:after {
content: " \25B2";
border-bottom: 5px solid @theme-color-brand;
border-top: 0px;
}

.sortIcon:after {
content: " \25BC";
font-size: 1px;
color: @theme-color-brand;
border-left: 4px solid rgba(0, 0, 0, 0);
border-right: 4px solid rgba(0, 0, 0, 0);
border-top: 5px solid @theme-color-brand;
}

}
}
}
Expand Down
53 changes: 45 additions & 8 deletions plugins/MultiSites/angularjs/dashboard/dashboard.less
Expand Up @@ -160,21 +160,58 @@
}

.heading {
display: inline-block;
display: inline;
margin-top: 4px;
}

#evolution_selector {
margin: 0px;
margin-top: -3px;
}

.multisites_asc,
.multisites_desc {
width: 16px;
height: 13px;
float: none;
display: inline-block;
background-image: url(plugins/Zeitgeist/images/sortdesc.png);
vertical-align: top;
margin: 0px;
margin-left: 6px;
margin-top: -1px;
}

#evolution {
.multisites_asc,
.multisites_desc {
margin-right: 6px;
margin-left: 0px;
}
.evolution {
vertical-align: top;
}
}

.multisites_asc {
width: 16px;
height: 13px;
display: inline-block;
background-image: url(plugins/Zeitgeist/images/sortasc.png);
margin-top: -7px;
vertical-align: top;
}

.multisites_desc:after {
content: " \25BC";
font-size: 1px;
color: @theme-color-brand;
border-left: 4px solid rgba(0, 0, 0, 0);
border-right: 4px solid rgba(0, 0, 0, 0);
border-top: 5px solid @theme-color-brand;
}
.multisites_asc:after {
content: " \25BC";
font-size: 1px;
color: @theme-color-brand;
border-left: 4px solid rgba(0, 0, 0, 0);
border-right: 4px solid rgba(0, 0, 0, 0);
border-bottom: 5px solid @theme-color-brand;
}

div.sparkline {
float:none;
}
Expand Down
31 changes: 25 additions & 6 deletions plugins/SegmentEditor/stylesheets/segmentation.less
Expand Up @@ -396,11 +396,6 @@ div.scrollable {
text-decoration: none;
}

.segment-element .segment-top a.dropdown {
padding: 0 17px 0 0;
background: url(plugins/Zeitgeist/images/sort_subtable_desc.png) 100% -2px no-repeat;
}

.segment-element .segment-footer {
background: #eae8e3;
border-top: 1px solid #a9a399;
Expand Down Expand Up @@ -701,4 +696,28 @@ a.metric_category {
.segment-element.anchorRight {
right:-1px;
left:auto;
}
}

.available_segments {
display: inline-block;
width: 160px;
}

.available_segments a.dropdown,
.segment-element .segment-top a.dropdown {
padding: 0 17px 0 0;
background: none !important;
}

.available_segments a.dropdown:after,
.segment-element .segment-top a.dropdown:after {
content: " \25BC";
font-size: 0px;
color: @theme-color-brand;
border-left: 4px solid rgba(0, 0, 0, 0);
border-right: 4px solid rgba(0, 0, 0, 0);
border-top: 5px solid @theme-color-brand;
margin-left: 7px;
display: inline-block;
vertical-align: sub;
}
35 changes: 32 additions & 3 deletions plugins/Zeitgeist/stylesheets/general/_jqueryUI.less
Expand Up @@ -87,12 +87,41 @@ div.ui-state-highlight {
padding: 0;
}

.ui-datepicker-header .ui-icon-circle-triangle-w,
.ui-datepicker-header .ui-icon-circle-triangle-e {
content: " \25BC";
font-size: 1px;
color: @theme-color-brand;
border-top: 4px solid rgba(0, 0, 0, 0);
border-bottom: 4px solid rgba(0, 0, 0, 0);
border-left: 5px solid @theme-color-brand;
margin-left: 7px;
display: inline-block;
vertical-align: sub;
background: none !important;
height: auto;
width: auto;
}

.ui-datepicker-header .ui-icon-circle-triangle-w {
background: url(plugins/Zeitgeist/images/datepicker_arr_l.png) no-repeat 5px 4px !important;
border-left: 0px;
border-right: 5px solid @theme-color-brand;
}

.ui-datepicker-header .ui-icon-circle-triangle-e {
background: url(plugins/Zeitgeist/images/datepicker_arr_r.png) no-repeat 6px 4px !important;
.ui-datepicker-prev {
background: none !important;
left: 5px !important;
top: 3px !important;
}
.ui-datepicker-next {
background: none !important;
right: 2px !important;
top: 3px !important;
}

.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span {
margin-left: -5px;
margin-top: -5px;
}

.ui-datepicker .ui-datepicker-next-hover,
Expand Down

0 comments on commit c812b5a

Please sign in to comment.