kopia lustrzana https://github.com/FacilMap/facilmap
Fix search field resizing when there are no results (#62)
rodzic
c185d19ca2
commit
41cda2c44a
|
@ -45,6 +45,11 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fm-search.fm-hasResults .fm-search-results {
|
||||
min-height: 60px;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
.fm-search .no-results {
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<div class="fm-search-results" ng-show="searchResults">
|
||||
<div class="fm-search-results">
|
||||
<div uib-alert class="alert-danger no-results" ng-if="searchResults.length == 0">No results have been found.</div>
|
||||
<ul class="list-group" ng-if="searchResults.length > 0">
|
||||
<li ng-repeat="result in searchResults" class="list-group-item" ng-class="{active: activeResult === result}">
|
||||
|
|
|
@ -431,11 +431,12 @@ fm.app.factory("fmMapSearch", function($rootScope, $compile, fmUtils, $timeout,
|
|||
el.find(".fm-search-results").resizable({
|
||||
handles: {
|
||||
se: el.find(".fm-search-resize")
|
||||
}
|
||||
},
|
||||
minHeight: 0
|
||||
}).one("resize", () => {
|
||||
el.filter(".fm-search").addClass("fm-search-resized");
|
||||
}).on("resize", () => {
|
||||
el.find("form").css("width", el.find(".fm-search-results").css("width"));
|
||||
el.find("form").css("width", `${el.find(".fm-search-results").innerWidth()}px`);
|
||||
});
|
||||
|
||||
return searchUi;
|
||||
|
|
Ładowanie…
Reference in New Issue