##// END OF EJS Templates
ui: use more distinctive icons for search hints
marcink -
r4096:cb3daaa5 default
parent child Browse files
Show More
@@ -449,6 +449,7 b' class HomeView(BaseAppView):'
449 449 'id': -10,
450 450 'value': query,
451 451 'value_display': label,
452 'value_icon': '<i class="icon-code"></i>',
452 453 'type': 'search',
453 454 'subtype': 'repo',
454 455 'url': h.route_path('search_repo',
@@ -466,6 +467,7 b' class HomeView(BaseAppView):'
466 467 'id': -20,
467 468 'value': query,
468 469 'value_display': label,
470 'value_icon': '<i class="icon-history"></i>',
469 471 'type': 'search',
470 472 'subtype': 'repo',
471 473 'url': h.route_path('search_repo',
@@ -491,6 +493,7 b' class HomeView(BaseAppView):'
491 493 'id': -30,
492 494 'value': query,
493 495 'value_display': label,
496 'value_icon': '<i class="icon-code"></i>',
494 497 'type': 'search',
495 498 'subtype': 'repo_group',
496 499 'url': h.route_path('search_repo_group',
@@ -508,6 +511,7 b' class HomeView(BaseAppView):'
508 511 'id': -40,
509 512 'value': query,
510 513 'value_display': label,
514 'value_icon': '<i class="icon-history"></i>',
511 515 'type': 'search',
512 516 'subtype': 'repo_group',
513 517 'url': h.route_path('search_repo_group',
@@ -529,6 +533,7 b' class HomeView(BaseAppView):'
529 533 'id': -1,
530 534 'value': query,
531 535 'value_display': u'File search for: `{}`'.format(query),
536 'value_icon': '<i class="icon-code"></i>',
532 537 'type': 'search',
533 538 'subtype': 'global',
534 539 'url': h.route_path('search',
@@ -539,6 +544,7 b' class HomeView(BaseAppView):'
539 544 'id': -2,
540 545 'value': query,
541 546 'value_display': u'Commit search for: `{}`'.format(query),
547 'value_icon': '<i class="icon-history"></i>',
542 548 'type': 'search',
543 549 'subtype': 'global',
544 550 'url': h.route_path('search',
@@ -889,6 +889,7 b''
889 889 var searchType = data['type'];
890 890 var searchSubType = data['subtype'];
891 891 var valueDisplay = data['value_display'];
892 var valueIcon = data['value_icon'];
892 893
893 894 var pattern = '(' + escapeRegExChars(value) + ')';
894 895
@@ -906,7 +907,12 b''
906 907 }
907 908 // full text search/hints
908 909 else if (searchType === 'search') {
910 if (valueIcon === undefined) {
909 911 icon += '<i class="icon-more"></i> ';
912 } else {
913 icon += valueIcon + ' ';
914 }
915
910 916 if (searchSubType !== undefined && searchSubType == 'repo') {
911 917 valueDisplay += '<div class="pull-right tag">repository</div>';
912 918 }
General Comments 0
You need to be logged in to leave comments. Login now