Commit 259a1047 authored by RawKStar77's avatar RawKStar77

show/hide viewsort controls on topbar hover or show_search

parent b603c983
...@@ -1172,8 +1172,12 @@ h3.stream { ...@@ -1172,8 +1172,12 @@ h3.stream {
cursor: pointer; cursor: pointer;
} }
.VS-search .VS-icon-cancel:hover { .VS-search .VS-icon-cancel:hover {
width: 11px; height: 11px;
background-position: center 0;
background-image: url(../images/svg/cancel_black.svg); background-image: url(../images/svg/cancel_black.svg);
background-size: contain;
cursor: pointer;
} }
.VS-search .VS-icon-search { .VS-search .VS-icon-search {
...@@ -1207,23 +1211,64 @@ h3.stream { ...@@ -1207,23 +1211,64 @@ h3.stream {
// View and Sort tabs //////////////////// // View and Sort tabs ////////////////////
.viewsort { .container {
left: 0;
top: 0;
position: fixed;
width: 100%; width: 100%;
text-align: center; height: 300px;
position: absolute; z-index: 2;
top: 29px; pointer-events: none;
right: 0;
}
.viewsort > .dropdown { .viewsort {
@include smallshadow(0); @include single-transition(top, .25s);
border-bottom-right-radius: 24px 72px; width: 100%;
border-bottom-left-radius: 24px 72px; text-align: center;
font-family: $sansFontFamily; position: absolute;
background: $white; top: 29px;
border: solid 1px $grayLighter; right: 0;
padding: 0 4px; pointer-events: all;
margin: 0 3px;
display: inline-block; &.hidden {
z-index: 4; top: 0;
}
}
.viewsort > .dropdown {
@include smallshadow(0);
border-bottom-right-radius: 24px 72px;
border-bottom-left-radius: 24px 72px;
font-family: $sansFontFamily;
background: $white;
border: solid 1px $grayLighter;
padding: 0 10px;
margin: 0 3px;
display: inline-block;
z-index: 4;
.dropdown-menu {
margin-top: 0;
li {
z-index: 0;
}
&:before, &:after {
display: none;
}
&.hidden {
display: none;
}
}
}
} }
.hoverfield {
height: 30px;
width: 80%;
position: fixed;
top: 0;
left: 29px;
z-index: 5;
}
\ No newline at end of file
...@@ -16,6 +16,9 @@ class App ...@@ -16,6 +16,9 @@ class App
annotator, authentication, baseURI, streamfilter, viewFilter annotator, authentication, baseURI, streamfilter, viewFilter
) -> ) ->
{plugins, host, providers} = annotator {plugins, host, providers} = annotator
#This must be set so the view sort controller can autohide.
$scope.show_search = false
$scope.$watch 'auth.personas', (newValue, oldValue) => $scope.$watch 'auth.personas', (newValue, oldValue) =>
unless newValue?.length unless newValue?.length
...@@ -697,12 +700,28 @@ class Viewer ...@@ -697,12 +700,28 @@ class Viewer
{view:'Document'} {view:'Document'}
{view:"Comments"} {view:"Comments"}
] ]
$scope.sorts = [ $scope.sorts = [
{sort:'Newest'} {sort:'Newest'}
{sort:'Oldest'} {sort:'Oldest'}
{sort:'Location'}] {sort:'Location'}]
$scope.predicate = 'updated' $scope.predicate = 'updated'
$scope.reverse = true $scope.reverse = true
$scope.hidden = 'hidden'
# $scope.xhover = false
$scope.$watch 'show_search', (newValue, oldValue) ->
if newValue
$scope.hidden = ''
else
$scope.hidden = 'hidden'
$scope.$watch 'xhover', (newValue, oldValue) ->
if newValue == true
$scope.hidden = ''
if newValue == false
if $scope.show_search == false
$scope.hidden = 'hidden'
$scope.focus = (annotation) -> $scope.focus = (annotation) ->
if angular.isArray annotation if angular.isArray annotation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment