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
this.icons_div = jQuery(document.createElement("div"))
.addClass('icons').appendTo(this.row_div);
this.right_div = jQuery(document.createElement("div"))
.addClass('header_row_right').appendTo(this.row_div);
// Record count
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"))
.appendTo(this.count)
.text(settings.total + "");
this.count.prependTo(this.icons_div);
this.count.prependTo(this.right_div);
// 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
this.header_row = jQuery(document.createElement("div"))
.addClass('header_row').appendTo(this.row_div);
.addClass('header_row').appendTo(this.right_div);
// Letter search
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);
// 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.id == 'export') return this.icons_div[0];
if(_sender.id == 'export') return this.right_div[0];
if(_sender && _sender._type == "template")
{

View File

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

View File

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