diff --git a/zeppelin-web/src/app/home/home.css b/zeppelin-web/src/app/home/home.css index 75f25216834..8b37eb8fa90 100644 --- a/zeppelin-web/src/app/home/home.css +++ b/zeppelin-web/src/app/home/home.css @@ -23,6 +23,10 @@ body { -ms-overflow-style: scrollbar; } +.home { + margin-bottom: 0px !important; +} + .bodyAsIframe { background: white; } @@ -99,10 +103,29 @@ a.navbar-brand:hover { color: #fff !important; } +/* Css for the Notebook Dropdown */ + +.expandable ul { + padding-left: 10px !important; +} + +.expandable li { + list-style-type: none; +} + +.dropdown-menu .notebook-list-item { + text-decoration: none; +} + +.dropdown-menu .notebook-list-item:hover { + background: #f5f5f5; +} + /* bootstrap customization for scrollable dropdown menu */ -.dropdown-menu > .scrollbar-container > li > a { +.dropdown-menu > .scrollbar-container > li > a, +.dropdown-menu .notebook-list-item { display: block; - padding: 3px 20px; + padding: 1px 10px; clear: both; font-weight: normal; line-height: 1.42857143; @@ -117,9 +140,9 @@ a.navbar-brand:hover { background: #f5f5f5; } -.dropdown-menu > .scrollbar-container > .active > a, -.dropdown-menu > .scrollbar-container > .active > a:hover, -.dropdown-menu > .scrollbar-container > .active > a:focus { +#notebook-list li.active > a, +#notebook-list li.active > a:hover, +#notebook-list li.active > a:focus { color: #fff; text-decoration: none; background: #428bca; @@ -216,11 +239,13 @@ a.navbar-brand:hover { } @media (max-width: 767px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a, + #notebook-list li a { color: #D3D3D3; } - .navbar-nav .open .dropdown-menu > .scrollbar-container > li > a { + .navbar-nav .open .dropdown-menu > .scrollbar-container > li > a, + #notebook-list li a { padding: 5px 15px 5px 25px; line-height: 20px; } @@ -230,7 +255,8 @@ a.navbar-brand:hover { } .navbar-inverse .navbar-nav .open .dropdown-menu > .scrollbar-container > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .scrollbar-container > li > a:focus { + .navbar-inverse .navbar-nav .open .dropdown-menu > .scrollbar-container > li > a:focus, + #notebook-list li a:hover { color: #fff; background: transparent; } @@ -263,8 +289,9 @@ a.navbar-brand:hover { } @media (min-width: 768px) { - #notebook-list { - max-height: 500px; + .dropdown-menu.navbar-dropdown-maxHeight { + max-height: calc(100vh - 60px); + overflow: auto; } } diff --git a/zeppelin-web/src/components/expandCollapse/expandCollapse.css b/zeppelin-web/src/components/expandCollapse/expandCollapse.css new file mode 100644 index 00000000000..b1a60d848fd --- /dev/null +++ b/zeppelin-web/src/components/expandCollapse/expandCollapse.css @@ -0,0 +1,17 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + .expandable { + display: none; +} diff --git a/zeppelin-web/src/components/expandCollapse/expandCollapse.directive.js b/zeppelin-web/src/components/expandCollapse/expandCollapse.directive.js new file mode 100644 index 00000000000..ec401755e06 --- /dev/null +++ b/zeppelin-web/src/components/expandCollapse/expandCollapse.directive.js @@ -0,0 +1,33 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +angular.module('zeppelinWebApp').directive('expandCollapse', function() { + return { + restrict: 'EA', + link: function(scope, element, attrs){ + angular.element(element).click( function(event) { + if(angular.element(element).find('.expandable:visible').length > 1) { + angular.element(element).find('.expandable:visible').slideUp('slow'); + angular.element(element).find('i.icon-folder-alt').toggleClass('icon-folder icon-folder-alt'); + } else { + angular.element(element).find('.expandable').first().slideToggle('200',function() { + angular.element(element).find('i').first().toggleClass('icon-folder icon-folder-alt'); + }); + } + event.stopPropagation(); + }); + } + }; +}); diff --git a/zeppelin-web/src/components/navbar/navbar-notebookList-elem.html b/zeppelin-web/src/components/navbar/navbar-notebookList-elem.html new file mode 100644 index 00000000000..590154f2e23 --- /dev/null +++ b/zeppelin-web/src/components/navbar/navbar-notebookList-elem.html @@ -0,0 +1,36 @@ + + + + + {{noteName(note)}} + +