put favorites, counter and new header_row into one container (header_row_right) to float them all to the right, also removed lots of unnecessary css and fixed alignment

This commit is contained in:
Ralf Becker 2014-03-12 09:47:40 +00:00
parent 7e78248e81
commit db1244dc50
3 changed files with 18 additions and 33 deletions

View File

@ -1806,8 +1806,8 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader,
} }
// Other stuff // Other stuff
this.icons_div = jQuery(document.createElement("div")) this.right_div = jQuery(document.createElement("div"))
.addClass('icons').appendTo(this.row_div); .addClass('header_row_right').appendTo(this.row_div);
// Record count // Record count
this.count = jQuery(document.createElement("span")) this.count = jQuery(document.createElement("span"))
@ -1818,7 +1818,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader,
this.count_total = jQuery(document.createElement("span")) this.count_total = jQuery(document.createElement("span"))
.appendTo(this.count) .appendTo(this.count)
.text(settings.total + ""); .text(settings.total + "");
this.count.prependTo(this.icons_div); this.count.prependTo(this.right_div);
// Favorites // Favorites
this._setup_favorites(settings['favorites']); this._setup_favorites(settings['favorites']);
@ -1852,7 +1852,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader,
// Another place to customize nextmatch // Another place to customize nextmatch
this.header_row = jQuery(document.createElement("div")) this.header_row = jQuery(document.createElement("div"))
.addClass('header_row').appendTo(this.row_div); .addClass('header_row').appendTo(this.right_div);
// Letter search // Letter search
var current_letter = this.nextmatch.options.settings.searchletter ? var current_letter = this.nextmatch.options.settings.searchletter ?
@ -2058,7 +2058,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader,
this.favorites = et2_createWidget('favorites', widget_options, this); this.favorites = et2_createWidget('favorites', widget_options, this);
// Add into header // Add into header
$j(this.favorites.getDOMNode(this.favorites)).appendTo(this.icons_div).css("float","right"); $j(this.favorites.getDOMNode(this.favorites)).prependTo(this.right_div);
}, },
/** /**
@ -2167,7 +2167,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader,
} }
} }
if(_sender == this.search || _sender == this.search_button) return this.search_box[0]; if(_sender == this.search || _sender == this.search_button) return this.search_box[0];
if(_sender.id == 'export') return this.icons_div[0]; if(_sender.id == 'export') return this.right_div[0];
if(_sender && _sender._type == "template") if(_sender && _sender._type == "template")
{ {

View File

@ -805,7 +805,7 @@ etemplate2.getById = function(id)
} }
} }
return null; return null;
} };
/** /**
* Plugin for egw.json type "et2_load" * Plugin for egw.json type "et2_load"

View File

@ -819,42 +819,29 @@ div.message.floating {
} }
.nextmatch_header .header_count { .nextmatch_header .header_count {
padding: 0px 20px; padding: 0px 20px;
margin: 6px 6px 0px; margin: 0px 6px 0px;
border: 1px solid #E0E0E0; border: 1px solid #E0E0E0;
float: right;
font-size: 150%; font-size: 150%;
text-align: center; text-align: center;
} }
.nextmatch_header > .search { .nextmatch_header .search {
float: left; padding-left: 1ex;
width: 16%;
position: relative;
z-index: 1;
} }
.nextmatch_header > .search > input { .nextmatch_header_row select {
width: 75%; max-width: 14%;
margin-right: 2ex;
} }
.nextmatch_header > .filters { .nextmatch_header_row > .header_row_right {
padding-left: 5px; float: right;
position: relative; padding-right: 1ex;
top: 7px;
white-space: nowrap;
} }
.nextmatch_header > .filters select { .nextmatch_header_row > .header_row_right > * {
width: 14%; display: inline-block;
margin-right: 2ex;
}
.nextmatch_header .et2_button_icon {
vertical-align: middle;
}
.nextmatch_header > .filters .et2_button_icon {
margin-right: 1ex;
} }
.et2_nextmatch .nextmatch_header { .et2_nextmatch .nextmatch_header {
border: none; border: none;
background-image: none; background-image: none;
background-color: transparent; background-color: transparent;
margin-bottom: 3px;
} }
.et2_nextmatch .nextmatch_header_row > div { .et2_nextmatch .nextmatch_header_row > div {
display: inline-block; display: inline-block;
@ -862,9 +849,7 @@ div.message.floating {
/* Favorites */ /* Favorites */
.nextmatch_header div[id$=favorite_wrapper] { .nextmatch_header div[id$=favorite_wrapper] {
margin-top: 6px; margin-top: 6px;
vertical-align: middle;
position: relative; position: relative;
z-index: 1;
} }
#nm_favorites_popup_filters .filter_id, #nm_favorites_popup_filters .filter_id,
#nm_favorites_popup_filters .filter_value { #nm_favorites_popup_filters .filter_value {