mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-06 17:29:19 +00:00
Switch to using javascript widgets using site styling
- Quickstart selector is implemented using bootstrap-select rather than the dropdown button used elsewhere - Quickstart selector is still to be styled
This commit is contained in:
+4
-21
@@ -12,24 +12,10 @@ $(function(){
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
//OPENS ITEM DROPDOWN WIDGET
|
||||
$(".js-item--open-dropdown").click(function () {
|
||||
var dropdownItem = $(this).parents(".js-item-dropdown--wrapper");
|
||||
var documentHeight = $(document).height();
|
||||
var headerHeight = $("header").outerHeight();
|
||||
var footerHeight = $("footer").outerHeight();
|
||||
var scrimHeight = documentHeight - headerHeight - footerHeight;
|
||||
|
||||
dropdownItem.toggleClass("js-open");
|
||||
dropdownItem.siblings().removeClass("js-open");
|
||||
$(this).parents(".js-item-dropdown-widget--wrapper").siblings().find(".js-item-dropdown--wrapper").removeClass("js-open");
|
||||
|
||||
$("#scrim").addClass("js-show").css("height", scrimHeight).css("top", headerHeight);
|
||||
$("#scrim").click(function() {
|
||||
$(".js-item-dropdown--wrapper").removeClass("js-open");
|
||||
$(this).removeClass("js-show");
|
||||
});
|
||||
$("#scrim").click(function() {
|
||||
$(".js-item-dropdown--wrapper").removeClass("js-open");
|
||||
$(".js-item--open-dropdown").removeClass("js-show");
|
||||
$("#scrim").removeClass("js-show");
|
||||
});
|
||||
|
||||
//OPENS SEARCH DROPDOWN
|
||||
@@ -48,7 +34,6 @@ $(function(){
|
||||
$(".body--container, .js-search-input-close").click(function() {
|
||||
inputContainer.removeClass("js-show");
|
||||
$(".nav-search").removeClass("js-highlight");
|
||||
$("#scrim").removeClass("js-show");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -112,8 +97,6 @@ $(function(){
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
var detectOs = function() {
|
||||
if (navigator.appVersion.indexOf("Win")!=-1) return "Windows";
|
||||
if (navigator.appVersion.indexOf("Mac")!=-1) return "Mac";
|
||||
|
||||
@@ -46,11 +46,11 @@ Spring.Release = function(data) {
|
||||
Spring.Release.prototype = {
|
||||
statusIconClass: function() {
|
||||
if (this.preRelease) {
|
||||
return "icon-projects-pre";
|
||||
return "icon-pre-release";
|
||||
} else if (this.current) {
|
||||
return "icon-projects-current";
|
||||
return "icon-current-version";
|
||||
} else {
|
||||
return "icon-projects-supported";
|
||||
return "icon-supported-version";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,7 @@ Spring.QuickStartSelectorView = Backbone.View.extend({
|
||||
this.$el.html(
|
||||
this.template(this.model)
|
||||
);
|
||||
this.$('.selectpicker').selectpicker();
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ describe("Project", function () {
|
||||
});
|
||||
|
||||
it("has a statusIconClass", function() {
|
||||
expect(releases[0].statusIconClass()).toEqual("icon-projects-pre");
|
||||
expect(releases[1].statusIconClass()).toEqual("icon-projects-current");
|
||||
expect(releases[2].statusIconClass()).toEqual("icon-projects-supported");
|
||||
expect(releases[0].statusIconClass()).toEqual("icon-pre-release");
|
||||
expect(releases[1].statusIconClass()).toEqual("icon-current-version");
|
||||
expect(releases[2].statusIconClass()).toEqual("icon-supported-version");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user