Author: hnategh
New Revision: 55059
URL: http://svn.stylite.de/viewvc/egroupware?rev=55059&view=rev
Log:
Add overlay attribute for seachbox widget
Modified:
trunk/etemplate/js/et2_extension_nextmatch.js
trunk/etemplate/js/et2_widget_textbox.js
trunk/etemplate/templates/default/etemplate2.css
— trunk/etemplate/js/et2_extension_nextmatch.js (original)
+++ trunk/etemplate/js/et2_extension_nextmatch.js Thu Feb 18 12:16:47 2016
@@ -2288,11 +2288,18 @@
this.search_box = jQuery(document.createElement(“div”))
.addClass(‘search’)
.prependTo(egwIsMobile()?this.nextmatch.div:this.row_div);
+
-
// searchbox widget options
-
var searchbox_options = {
-
id:"search",
-
overlay:(typeof settings.searchbox != 'undefined' && typeof settings.searchbox.overlay != 'undefined')?settings.searchbox.overlay:true,
-
onchange:function(){
-
self.nextmatch.applyFilters({search: this.get_value()});
-
},
-
value:settings.search
-
};
// searchbox widget
-
this.et2_searchbox = et2_createWidget('searchbox', {id:"search",onchange:function(){
-
self.nextmatch.applyFilters({search: this.get_value()});
-
}
-
},this);
— trunk/etemplate/js/et2_widget_textbox.js (original)
+++ trunk/etemplate/js/et2_widget_textbox.js Thu Feb 18 12:16:47 2016
@@ -415,9 +415,16 @@
var et2_searchbox = et2_textbox.extend(
{
/**
-
- Ignore all more advanced attributes.
- */
- attributes: {},
-
-
*/
-
attributes: {
-
overlay:{
-
name:"Overlay searchbox",
-
type:"boolean",
-
default:true,
-
description:"Define wheter the searchbox overlays while it's open (true) or stay as solid box infront of the search button (false). Default is true."
-
}
-
},
/**
- Constructor
@@ -439,10 +446,11 @@
_createWidget:function()
{
var self = this;
-
if (this.options.overlay) this.flex.addClass('overlay');
// search button indicator
this.button = et2_createWidget('button',{image:"search","background_image":"1"},this);
this.button.onclick= function(){
@@ -474,8 +482,11 @@
},
blur: function(event){
-
if (!event.relatedTarget || !jQuery(event.relatedTarget.parentNode).hasClass('et2_searchbox'))
-
{
-
self._show_hide((!self.options.overlay && self.get_value()));
-
}
-
if (typeof self.oldValue !='undefined' && self._oldValue != self.get_value()) {
self.change();
}
},
@@ -524,10 +535,12 @@
if (!this.get_value())
{
jQuery(this.button.getDOMNode()).removeClass(‘toolbar_toggled’);
— trunk/etemplate/templates/default/etemplate2.css (original)
+++ trunk/etemplate/templates/default/etemplate2.css Thu Feb 18 12:16:47 2016
@@ -2316,9 +2316,10 @@
z-index: 500;
white-space: nowrap;
}
-.et2_searchbox input {
+.et2_searchbox .flex.overlay input {
position: absolute;
- /* top: 1px; */
+}
+.et2_searchbox .flex input{
height: 18px;
width: 100%;
}
@@ -2331,9 +2332,15 @@
top: 3px;
}
.et2_searchbox .flex {
- width: 200px;
- position:relative;
- display: inline-block;
- padding-right: 7px;
- float: right;
+}
+.et2_searchbox .flex.overlay {
width: 150px;
- position: absolute;
- display: inline-block;
- position: absolute;
}
.et2_searchbox .hide {
display: none !important;
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs