diff --git a/etemplate/inc/class.etemplate_new.inc.php b/etemplate/inc/class.etemplate_new.inc.php index 0cdb6eb9c4..32efe566c4 100644 --- a/etemplate/inc/class.etemplate_new.inc.php +++ b/etemplate/inc/class.etemplate_new.inc.php @@ -710,15 +710,18 @@ foreach($files as $filename) $widgets = $GLOBALS['egw']->hooks->process('etemplate2_register_widgets'); foreach($widgets as $app => $list) { - foreach($list as $class) + if (is_array($list)) { - try + foreach($list as $class) { - class_exists($class); // trigger autoloader - } - catch(Exception $e) - { - error_log($e->getMessage()); + try + { + class_exists($class); // trigger autoloader + } + catch(Exception $e) + { + error_log($e->getMessage()); + } } } } diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index f65afe587f..0ac34c711f 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -2268,6 +2268,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, var settings = this.nextmatch.options.settings; this.div.prependTo(nm_div); + this.div.addClass('et2_toolbar'); // get toolbar styling // Left & Right (& row) headers this.headers = [ @@ -2279,20 +2280,21 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, // The rest of the header this.header_div = this.row_div = jQuery(document.createElement("div")) .addClass("nextmatch_header_row") + .addClass('et2_toolbar_actionlist') // get toolbar styling .appendTo(this.div); - + // Search this.search_box = jQuery(document.createElement("div")) .prependTo(egwIsMobile()?this.nextmatch.div:this.row_div); - // searchbox widget + // searchbox widget this.et2_searchbox = et2_createWidget('searchbox', {id:"search",onchange:function(){ self.nextmatch.applyFilters({search: this.get_value()}); } },this); - + // Set activeFilters to current value this.nextmatch.activeFilters.search = settings.search; - + this.et2_searchbox.set_value(settings.search); /** * Mobile theme specific part for nm header diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index a9e5eba9b5..8ca1021953 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -1388,7 +1388,7 @@ var et2_link_string = expose(et2_valueWidget.extend([et2_IDetachedDOM], .appendTo(this.list) .addClass("et2_link loading") .click( function(e){ - if (self.options.expose_view && typeof _link_data.type !='undefined' + if (self.options.expose_view && typeof _link_data.type !='undefined' && _link_data.type.match(self.mime_regexp,'ig')) { self._init_blueimp_gallery(e, _link_data); @@ -1602,7 +1602,7 @@ var et2_link_list = et2_link_string.extend( window.location = url+"?download"; return false; } - + // Multiple file download for those that support it a = $j(a) .prop('href', url) @@ -1615,7 +1615,7 @@ var et2_link_list = et2_link_string.extend( a.remove(); return false; } - + self.egw().open(link_data, "", "view",'download',link_data.target ? link_data.target : link_data.app,link_data.app); }); this.context.addItem("zip", this.egw().lang("Save as Zip"), this.egw().image('save_zip'), function(menu_item) { @@ -1767,7 +1767,7 @@ var et2_link_list = et2_link_string.extend( { this._format_vfs($td, dirs, _link_data); } - //Bind the click handler if there is download_url + //Bind the click handler if there is download_url if (_link_data && (typeof _link_data.download_url != 'undefined' || _link_data.app !='egw-data')) { $td.click( function(){ @@ -1781,7 +1781,7 @@ var et2_link_list = et2_link_string.extend( { self.egw().open(_link_data, "", "view",null,_link_data.target ? _link_data.target : _link_data.app,_link_data.app); } - }); + }); } } @@ -1841,7 +1841,7 @@ var et2_link_list = et2_link_string.extend( self.context.getItem("zip").set_enabled($j('[id^="link_-"]',this.list).length >= 2); // Show delete item only if the widget is not readonly self.context.getItem("delete").set_enabled(!self.options.readonly); - + self.context.data = _link_data; self.context.showAt(e.pageX, e.pageY, true); e.preventDefault(); diff --git a/etemplate/js/et2_widget_textbox.js b/etemplate/js/et2_widget_textbox.js index 2422c794de..5771caba86 100644 --- a/etemplate/js/et2_widget_textbox.js +++ b/etemplate/js/et2_widget_textbox.js @@ -154,10 +154,10 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable], }); } }, - + /** * Override the parent set_id method to manuipulate the input DOM node - * + * * @param {type} _value * @returns {undefined} */ @@ -165,12 +165,12 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable], { this._super.apply(this,arguments); // Remove the name attribute inorder to affect autocomplete="off" - // for no password save. ATM seems all browsers ignore autocomplete for + // for no password save. ATM seems all browsers ignore autocomplete for // input field inside the form if (this.options.type === "passwd" && this.options.autocomplete === "off") this.input.removeAttr('name'); }, - + destroy: function() { var node = this.getInputNode(); if (node) $j(node).unbind("keypress"); @@ -276,7 +276,7 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable], this.options.autocomplete = _value; this.input.attr('autocomplete', _value); }, - + resize: function (_height) { if (_height && this.options.multiline) @@ -409,7 +409,7 @@ et2_register_widget(et2_textbox_ro, ["textbox_ro"]); /** * et2_searchbox is a widget which provides a collapsable input search * with on searching indicator and clear handler regardless of any browser limitation. - * + * * @type type */ var et2_searchbox = et2_textbox.extend( @@ -428,23 +428,23 @@ var et2_searchbox = et2_textbox.extend( this.value = ""; this.div = jQuery(document.createElement('div')) .addClass('et2_searchbox'); - + this._super.apply(this, arguments); this.setDOMNode(this.div[0]); this._createWidget(); }, - + _createWidget:function() { var self = this; // search button indicator - this.button = et2_createWidget('button',{class:"et2_button_with_image"},this); - this.button.onclick= function(){ + this.button = et2_createWidget('button',{image: 'search', background_image: true/*class:"et2_button_with_image"*/},this); + this.button.onclick = function(){ self._show_hide(true); - self.search.input.focus() + self.search.input.focus(); }; this.div.prepend(this.button.getDOMNode()); - + // input field this.search = et2_createWidget('textbox',{"blur":egw.lang("search"), onkeypress:function(event) { @@ -470,7 +470,7 @@ var et2_searchbox = et2_textbox.extend( self.set_value(''); } }, - + blur: function(event){ self._show_hide(false); if (self._oldValue != self.get_value()) { @@ -482,7 +482,7 @@ var et2_searchbox = et2_textbox.extend( } }); this.div.append(this.search.getDOMNode()); - + // clear button implementation this.clear = jQuery(document.createElement('span')) .addClass('ui-icon clear') @@ -503,9 +503,9 @@ var et2_searchbox = et2_textbox.extend( }) .appendTo(this.div); }, - + /** - * Show/hide search field + * Show/hide search field * @param {boolean} _stat true means show and false means hide */ _show_hide: function(_stat) @@ -513,7 +513,7 @@ var et2_searchbox = et2_textbox.extend( jQuery(this.search.getDOMNode()).toggleClass('hide',!_stat); jQuery('span.clear',this.div).toggleClass('hide',!_stat); }, - + /** * toggle search button status based on value */ @@ -535,17 +535,17 @@ var et2_searchbox = et2_textbox.extend( change:function() { this._searchToggleState(); - + this._super.apply(this,arguments); }, - - + + get_value:function(){ return this.search.input.val(); }, - + /** - * override doLoadingFinished in order to set initial state + * override doLoadingFinished in order to set initial state */ doLoadingFinished: function() {