| | |
| | | /* |
| | | Copyright (c) 2012, ISPConfig UG |
| | | Copyright (c) 2012, ISPConfig UG (haftungsbeschränkt) |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | |
| | | var link = '<a href="'+((item['url'] != undefined) ? item['url'] : 'javascript:void(0);')+'" '+((item['onclick'] != undefined) ? ' onclick="'+fillSearchFieldCode.replace("%", item[settings.fillSearchFieldWith])+(settings.runJS ? item['onclick'] : '')+'"' : '')+((item['target'] != undefined) ? ' target="'+item['target']+'"' : '')+'>'; |
| | | |
| | | output += '<li class="'+settings.cssPrefix+'cdata">'+link+"\n"; |
| | | output += '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td>'; |
| | | output += '<p>'; |
| | | output += (item['title'] != undefined) ? '<span class="'+settings.cssPrefix+'cdata-title">'+item['title']+"</span><br />\n" : ''; |
| | | output += (item['title'] != undefined) ? '<span class="'+settings.cssPrefix+'cdata-title">'+item['title']+"</span>\n": ''; |
| | | output += (item['description'] != undefined) ? ''+item['description']+''+"\n" : ''; |
| | | output += '</p>'+"\n"; |
| | | output += '</td></tr></table>'; |
| | | output += '</a></li>'+"\n"; |
| | | } |
| | | cnt++; |
| | |
| | | //resultBox.html(output).css({'position' : 'absolute', 'top' : searchField.position().top+searchField.outerHeight(), 'right' : '0'}).fadeIn(); |
| | | if(settings.resultBoxPosition == 'n'){ |
| | | resultBox.html(output).css({'position' : 'absolute', 'top' : searchField.position().top-resultBox.outerHeight(), 'left' : searchField.position().left+searchField.outerWidth()-resultBox.outerWidth()}).fadeIn(); |
| | | } |
| | | if(settings.resultBoxPosition == 'e'){ |
| | | } else if(settings.resultBoxPosition == 'e'){ |
| | | resultBox.html(output).css({'position' : 'absolute', 'top' : searchField.position().top, 'left' : searchField.position().left+searchField.outerWidth()}).fadeIn(); |
| | | } |
| | | if(settings.resultBoxPosition == 's'){ |
| | | } else if(settings.resultBoxPosition == 's'){ |
| | | resultBox.html(output).css({'position' : 'absolute', 'top' : searchField.position().top+searchField.outerHeight(), 'left' : searchField.position().left+searchField.outerWidth()-resultBox.outerWidth()}).fadeIn(); |
| | | } |
| | | if(settings.resultBoxPosition == 'w'){ |
| | | } else if(settings.resultBoxPosition == 'w'){ |
| | | resultBox.html(output).css({'position' : 'absolute', 'top' : searchField.position().top, 'left' : searchField.position().left-resultBox.outerWidth()}).fadeIn(); |
| | | } else { |
| | | resultBox.html(output).fadeIn(); |
| | | } |
| | | |
| | | searchField.removeClass(settings.cssPrefix+'loading'); |