Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-5966: Admin UI Menu is fixed and doesn't respect smaller viewports

Shalin Shekhar Mangar751bc33ea9de
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c1f945e8907..baa6e171b4a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -134,6 +134,9 @@ Bug Fixes
* SOLR-6426: SolrZkClient clean can fail due to a race with children nodes. (Mark Miller)
+* SOLR-5966: Admin UI Menu is fixed and doesn't respect smaller viewports.
+ (Aman Tandon, steffkes via shalin)
+
Other Changes
---------------------
diff --git a/solr/webapp/web/css/styles/common.css b/solr/webapp/web/css/styles/common.css
index 8dcfeb2dd2c..e8382d09093 100644
--- a/solr/webapp/web/css/styles/common.css
+++ b/solr/webapp/web/css/styles/common.css
@@ -195,6 +195,11 @@ ul
z-index: 42;
}
+.scroll #header
+{
+ position: absolute;
+}
+
#header #solr
{
background-image: url( ../../img/solr.png );
diff --git a/solr/webapp/web/css/styles/menu.css b/solr/webapp/web/css/styles/menu.css
index 334acdc89c5..f441632dbd5 100644
--- a/solr/webapp/web/css/styles/menu.css
+++ b/solr/webapp/web/css/styles/menu.css
@@ -24,6 +24,12 @@ limitations under the License.
width: 150px;
}
+.scroll #menu-wrapper
+{
+ position: absolute;
+ top: 90px;
+}
+
.has-environment #menu-wrapper
{
top: 160px;
diff --git a/solr/webapp/web/js/scripts/app.js b/solr/webapp/web/js/scripts/app.js
index 8714ad46198..09a6667646b 100644
--- a/solr/webapp/web/js/scripts/app.js
+++ b/solr/webapp/web/js/scripts/app.js
@@ -144,6 +144,8 @@ var sammy = $.sammy
this.active_core = active_element;
}
+
+ check_fixed_menu();
}
);
}
@@ -403,6 +405,9 @@ var solr_admin = function( app_config )
}
);
+ check_fixed_menu();
+ $( window ).resize( check_fixed_menu );
+
var system_url = config.solr_path + '/admin/info/system?wt=json';
$.ajax
(
@@ -594,6 +599,11 @@ var solr_admin = function( app_config )
);
};
+ check_fixed_menu = function check_fixed_menu()
+ {
+ $( '#wrapper' ).toggleClass( 'scroll', $( window ).height() < $( '#menu-wrapper' ).height() + $( '#header' ).height() + 40 );
+ }
+
};
var connection_check_delay = 1000;