$("#topbar-second > .container > #tabmenu").append(newText);
}
+ if( $(".global-content-wrapper").length) {
+ // get the heading element
+ var heading = $(".global-content-wrapper > h3").first();
+ // get the text of the heading
+ var headingContent = heading.text();
+ // create a new element with the content of the heading
+ var newText = '<h4 class="heading">'+headingContent+'</h4>';
+ // remove the old heading element
+ heading.remove(),
+ // put the new element to the second nav bar
+ $("#topbar-second > .container > #tabmenu").append(newText);
+ }
+
// Dropdown menus with the class "dropdown-head" will display the active tab
// as button text
$("body").on('click', '.dropdown-head .dropdown-menu li a, .dropdown-head .dropdown-menu li button', function(){
return item.name;
}
-(function( $ ) {
+(function($) {
$.fn.contact_filter = function(backend_url, typ, autosubmit, onselect) {
- if(typeof typ === 'undefined') typ = '';
- if(typeof autosubmit === 'undefined') autosubmit = false;
+ if (typeof typ === 'undefined') {
+ typ = '';
+ }
+
+ if (typeof autosubmit === 'undefined') {
+ autosubmit = false;
+ }
// Autocomplete contacts
contacts = {
match: /(^)([^\n]+)$/,
index: 2,
- search: function(term, callback) { contact_search(term, callback, backend_url, typ); },
+ search: function(term, callback) {contact_search(term, callback, backend_url, typ);},
replace: filter_replace,
- template: contact_filter,
+ template: contact_filter
};
this.attr('autocomplete','off');
var a = this.textcomplete([contacts], {className:'accontacts', appendTo: '#contact-list'});
- a.on('textComplete:select', function(e, value, strategy) { $(".dropdown-menu.textcomplete-dropdown.media-list").show(); });
+ a.on('textComplete:select', function(e, value, strategy) {
+ $(".dropdown-menu.textcomplete-dropdown.media-list").show();
+ });
};
})( jQuery );