mirror of
https://github.com/danog/schema.tl.git
synced 2024-11-30 04:28:58 +01:00
Heckin good changes
This commit is contained in:
parent
d5689ff2c7
commit
a72f6f7dac
@ -115,6 +115,7 @@ header {
|
||||
|
||||
.hero-typeahead .typeahead-result {
|
||||
padding: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hero-typeahead .typeahead-result.selected {
|
||||
|
@ -1,13 +1,13 @@
|
||||
<html ng-app="tlDocsApp">
|
||||
<head>
|
||||
<title>TL-Schema Explorer</title>
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
<link rel="stylesheet" href="/css/styles.css?v2">
|
||||
<link rel="stylesheet" href="/css/fonts.css">
|
||||
<link rel="stylesheet" href="/css/rgs.css">
|
||||
<script src="/js/schema.js"></script>
|
||||
<script src="/js/angular.min.js"></script>
|
||||
<script src="/js/ngroute.min.js"></script>
|
||||
<script src="/js/app.js"></script>
|
||||
<script src="/js/app.js?v2"></script>
|
||||
|
||||
<meta property="og:title" content="TL-Schema Explorer">
|
||||
<meta property="og:site_name" content="TL-Schema Explorer">
|
||||
|
@ -185,6 +185,10 @@ tlDocsApp.controller("mainController", function($scope, $rootScope, $location, s
|
||||
$location.path(`/${result.type}/${result.name}`)
|
||||
}
|
||||
|
||||
$scope.clickResult = function(result) {
|
||||
$location.path(`/${result.type}/${result.name}`)
|
||||
}
|
||||
|
||||
if($rootScope.globalSearch) {
|
||||
$scope.search = $rootScope.globalSearch
|
||||
document.getElementById("heroSearchBar").focus()
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="hero-input">
|
||||
<input type="text" id="heroSearchBar" class="hero-search" placeholder="{{ searchPlaceholder }}" ng-model="search" ng-focus="displayTypeahead = true" ng-blur="displayTypeahead = false" ng-change="updateSearchResults()" my-enter="goToResult()" my-arrow-down="selectedResult = (selectedResult === 100 ? selectedResult : selectedResult + 1)" my-arrow-up="selectedResult = (selectedResult === 0 ? selectedResult : selectedResult - 1)">
|
||||
<div class="hero-typeahead">
|
||||
<div class="typeahead-result {{ result.type }} {{ selectedResult === index ? 'selected' : '' }}" ng-repeat="(index, result) in typeaheadResults | limitTo:50 track by $index">
|
||||
<div class="typeahead-result {{ result.type }} {{ selectedResult === index ? 'selected' : '' }}" ng-repeat="(index, result) in typeaheadResults | limitTo:50 track by $index" ng-click="clickResult(result)">
|
||||
{{ result.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user