Browse Source

Several more fixes to formatting of standard response

pull/1243/head
jlukic 10 years ago
parent
commit
0f911e16d0
3 changed files with 20 additions and 15 deletions
  1. 17
      src/definitions/modules/search.js
  2. 5
      src/definitions/modules/search.less
  3. 13
      src/themes/default/modules/search.variables

17
src/definitions/modules/search.js

@ -296,7 +296,7 @@ $.fn.search = function(parameters) {
if( searchRegExp.test( content[field] ) ) {
results.push(content);
}
else if( fullTextRegExp.test( content[field] ) ) {
else if( settings.searchFullText && fullTextRegExp.test( content[field] ) ) {
fullTextResults.push(content);
}
}
@ -665,7 +665,7 @@ $.fn.search.settings = {
// api config
apiSettings : false,
type : 'simple',
type : 'standard',
minCharacters : 1,
source : false,
@ -673,10 +673,11 @@ $.fn.search.settings = {
'title',
'description'
],
searchFullText : true,
automatic : 'true',
hideDelay : 0,
searchDelay : 300,
searchDelay : 200,
maxResults : 7,
cache : true,
@ -694,7 +695,6 @@ $.fn.search.settings = {
onResultsOpen : function(){},
onResultsClose : function(){},
className: {
active : 'active',
down : 'down',
@ -824,7 +824,7 @@ $.fn.search.settings = {
}
return false;
},
simple: function(response) {
standard: function(response) {
var
html = ''
;
@ -835,6 +835,9 @@ $.fn.search.settings = {
if(result.url) {
html += '<a class="result" href="' + result.url + '">';
}
else {
html += '<a class="result">';
}
if(result.image !== undefined) {
html += ''
+ '<div class="image">'
@ -855,9 +858,7 @@ $.fn.search.settings = {
html += ''
+ '</div>'
;
if(results.url) {
html += '</a>';
}
html += '</a>';
});
if(response.resultPage) {

5
src/definitions/modules/search.less

@ -87,9 +87,10 @@
---------------*/
.ui.search > .results .result {
font-family: @pageFont;
cursor: pointer;
display: block;
overflow: hidden;
font-family: @pageFont;
font-size: @resultFontSize;
padding: @resultVerticalPadding @resultHorizontalPadding;
color: @resultTextColor;
@ -130,6 +131,7 @@
}
.ui.search > .results .result .description {
margin-top: @resultDescriptionDistance;
font-size: @resultDescriptionFontSize;
color: @resultDescriptionColor;
}
.ui.search > .results .result .price {
@ -300,6 +302,7 @@
.ui.search > .results .category > .name {
background: @categoryNameBackground;
font-family: @categoryNameFont;
font-size: @categoryNameFontSize;
width: @categoryNameWidth;
float: @categoryNameFontSize;
float: @categoryNameFloat;

13
src/themes/default/modules/search.variables

@ -28,7 +28,7 @@
@resultsBoxShadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.2);
/* Result */
@resultFontSize: 0.9285em;
@resultFontSize: 1em;
@resultVerticalPadding: 0.5em;
@resultHorizontalPadding: 1em;
@resultTextColor: @textColor;
@ -45,11 +45,12 @@
/* Result Content */
@resultTitleFont: @headerFont;
@resultTitleFontWeight: bold;
@resultTitleFontSize: 1.1em;
@resultTitleFontSize: 1em;
@resultTitleColor: @darkTextColor;
/* Description */
@resultDescriptionDistance: 0.25em;
@resultDescriptionFontSize: 0.9285em;
@resultDescriptionDistance: 0em;
@resultDescriptionColor: @lightTextColor;
/* Price */
@ -59,11 +60,11 @@
/* Special Message */
@messageVerticalPadding: 1em;
@messageHorizontalPadding: 1em;
@messageHeaderFontSize: 1.2em;
@messageHeaderFontSize: 1.1428em;
@messageHeaderFontWeight: bold;
@messageHeaderColor: @textColor;
@messageDescriptionDistance: 0.25rem;
@messageDescriptionFontSize: 1rem;
@messageDescriptionFontSize: 1em;
@messageDescriptionColor: @textColor;
/* All Results Link */
@ -122,7 +123,7 @@
@categoryNameBackground: @darkWhite;
@categoryNameFont: @pageFont;
@categoryNameFontSize: 0.9em;
@categoryNameFontSize: 1em;
@categoryNameFloat: left;
@categoryNamePadding: 0.4em 1em;
@categoryNameFontWeight: bold;

Loading…
Cancel
Save