Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[ARCH] Updated bootstrap to 2.3.1 and less to 1.3.3 (needed for bootstrap) #3996

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/command/Menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ define(function (require, exports, module) {
* Closes all menus that are open
*/
function closeAll() {
$(".dropdown").removeClass("open");
$(".dropdown").removeClass("open").dropdown("toggle");
}

/**
Expand Down Expand Up @@ -877,7 +877,7 @@ define(function (require, exports, module) {

var $newMenu = $("<li class='dropdown context-menu' id='" + StringUtils.jQueryIdEscape(id) + "'></li>"),
$popUp = $("<ul class='dropdown-menu'></ul>"),
$toggle = $("<a href='#' class='dropdown-toggle'></a>").hide();
$toggle = $("<a href='#' class='dropdown-toggle' data-toggle='dropdown'></a>").hide();

// assemble the menu fragments
$newMenu.append($toggle).append($popUp);
Expand Down Expand Up @@ -945,6 +945,7 @@ define(function (require, exports, module) {
}

// open the context menu at final location
$menuWindow.dropdown("toggle");
$menuAnchor.addClass("open")
.css({"left": posLeft, "top": posTop});
};
Expand All @@ -953,7 +954,7 @@ define(function (require, exports, module) {
* Closes the context menu.
*/
ContextMenu.prototype.close = function () {
$("#" + StringUtils.jQueryIdEscape(this.id)).removeClass("open");
$("#" + StringUtils.jQueryIdEscape(this.id)).removeClass("open").dropdown("toggle");
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/extensibility/ExtensionManagerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ define(function (require, exports, module) {
self._setupEventHandlers();
self._render();
}).fail(function () {
$("<div class='alert-message error load-error'/>")
$("<div class='alert error load-error'/>")
.text(Strings.EXTENSION_MANAGER_ERROR_LOAD)
.appendTo(self.$el);
}).always(function () {
Expand Down
2 changes: 1 addition & 1 deletion src/extensibility/InstallExtensionDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ define(function (require, exports, module) {
this.$dlg = $(".install-extension-dialog.instance");
this.$url = this.$dlg.find(".url").focus();
this.$okButton = this.$dlg.find(".dialog-button[data-button-id='ok']");
this.$cancelButton = this.$dlg.find(".dialog-button[data-button-id='cancel']");
this.$cancelButton = this.$dlg.find(".dialog-button[data-dismiss='modal']");
this.$inputArea = this.$dlg.find(".input-field");
this.$msgArea = this.$dlg.find(".message-field");
this.$msg = this.$msgArea.find(".message");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<table class="zebra-striped row-highlight condensed-table">
<table class="table table-striped table-condensed row-highlight">
<tbody>
{{#reportList}}
<tr>
Expand Down
2 changes: 1 addition & 1 deletion src/htmlContent/about-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ <h2>{{APP_NAME_ABOUT_BOX}}</h2>
</div>
</div>
<div class="modal-footer">
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{CLOSE}}</a>
<a href="#" class="dialog-button btn primary" data-button-id="ok" data-dismiss="modal">{{CLOSE}}</a>
</div>
</div>
4 changes: 2 additions & 2 deletions src/htmlContent/extension-manager-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<input class="search" type="text" placeholder="Search">
<h1 class="dialog-title">{{EXTENSION_MANAGER_TITLE}}</h1>
</div>
<div class="modal-body no-padding zebra-striped"></div>
<div class="modal-body no-padding table-striped"></div>
<div class="modal-footer">
<button class="btn left install-from-url">{{INSTALL_FROM_URL}}</button>
<button class="dialog-button btn primary" data-button-id="close">{{CLOSE}}</button>
<button class="dialog-button btn primary" data-button-id="ok" data-dismiss="modal">{{CLOSE}}</button>
</div>
</div>
2 changes: 1 addition & 1 deletion src/htmlContent/extension-manager-view-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</td>
<td class="ext-desc">
{{^isCompatible}}
<div class="alert-message warning">
<div class="alert warning">
{{#requiresNewer}}{{Strings.EXTENSION_INCOMPATIBLE_NEWER}}{{/requiresNewer}}
{{^requiresNewer}}{{Strings.EXTENSION_INCOMPATIBLE_OLDER}}{{/requiresNewer}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/htmlContent/install-extension-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ <h1 class="dialog-title">{{INSTALL_EXTENSION_TITLE}}</h1>
<div class="modal-footer">
<button class="btn left browse-extensions">{{BROWSE_EXTENSIONS}}</button>
<button class="dialog-button btn primary" data-button-id="ok" disabled>{{INSTALL}}</button>
<button class="dialog-button btn" data-button-id="cancel">{{CANCEL}}</button>
<button class="dialog-button btn" data-button-id="cancel" data-dismiss="modal">{{CANCEL}}</button>
</div>
</div>
2 changes: 1 addition & 1 deletion src/htmlContent/project-settings-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ <h1 class="dialog-title"></h1>
</div>
<div class="modal-footer">
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{OK}}</a>
<a href="#" class="dialog-button btn" data-button-id="cancel">{{CANCEL}}</a>
<a href="#" class="dialog-button btn" data-button-id="cancel" data-dismiss="modal">{{CANCEL}}</a>
</div>
</div>
2 changes: 1 addition & 1 deletion src/htmlContent/update-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1 class="dialog-title">{{UPDATE_AVAILABLE_TITLE}}</h1>
</div>
</div>
<div class="modal-footer">
<a href="#" class="dialog-button btn left" data-button-id="cancel">{{CANCEL}}</a>
<a href="#" class="dialog-button btn left" data-button-id="cancel" data-dismiss="modal">{{CANCEL}}</a>
<a href="#" class="dialog-button btn primary" data-button-id="download">{{GET_IT_NOW}}</a>
</div>
</div>
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

<!-- TODO (Issue #278): switch between runtime LESS compilation in dev mode and precompiled version -->
<link rel="stylesheet/less" href="styles/brackets.less">
<script src="thirdparty/less-1.3.0.min.js"></script>
<script src="thirdparty/less-1.3.3.min.js"></script>
<script src="thirdparty/mustache/mustache.js"></script>
<!-- <link rel="stylesheet" href="brackets.min.css"> -->

Expand Down
2 changes: 1 addition & 1 deletion src/preferences/PreferencesDialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ define(function (require, exports, module) {

// Error message
if (errorMessage) {
$dlg.find(".field-container").append("<div class='alert-message' style='margin-bottom: 0'>" + errorMessage + "</div>");
$dlg.find(".field-container").append("<div class='alert' style='margin-bottom: 0'>" + errorMessage + "</div>");
}

// Give focus to first control
Expand Down
4 changes: 2 additions & 2 deletions src/search/FindInFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ define(function (require, exports, module) {
$(".modal-bar .message").css("display", "none");
$(".modal-bar .error")
.css("display", "inline-block")
.html("<div class='alert-message' style='margin-bottom: 0'>" + e.message + "</div>");
.html("<div class='alert' style='margin-bottom: 0'>" + e.message + "</div>");
return null;
}
}
Expand Down Expand Up @@ -245,7 +245,7 @@ define(function (require, exports, module) {

function _showSearchResults(searchResults, query, scope) {
if (searchResults && searchResults.length) {
var $resultTable = $("<table class='zebra-striped row-highlight condensed-table' />")
var $resultTable = $("<table class='table table-striped table-condensed row-highlight' />")
.append("<tbody>");

// Count the total number of matches
Expand Down
2 changes: 1 addition & 1 deletion src/search/FindReplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ define(function (require, exports, module) {
$(".modal-bar .message").css("display", "none");
$(".modal-bar .error")
.css("display", "inline-block")
.html("<div class='alert-message' style='margin-bottom: 0'>" + e.message + "</div>");
.html("<div class='alert' style='margin-bottom: 0'>" + e.message + "</div>");
return "";
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/styles/bootstrap/VERSION

This file was deleted.

34 changes: 34 additions & 0 deletions src/styles/bootstrap/accordion.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// Accordion
// --------------------------------------------------


// Parent container
.accordion {
margin-bottom: @baseLineHeight;
}

// Group == heading + body
.accordion-group {
margin-bottom: 2px;
border: 1px solid #e5e5e5;
.border-radius(@baseBorderRadius);
}
.accordion-heading {
border-bottom: 0;
}
.accordion-heading .accordion-toggle {
display: block;
padding: 8px 15px;
}

// General toggle styles
.accordion-toggle {
cursor: pointer;
}

// Inner needs the styles because you can't animate properly with any styles on the element
.accordion-inner {
padding: 9px 15px;
border-top: 1px solid #e5e5e5;
}
79 changes: 79 additions & 0 deletions src/styles/bootstrap/alerts.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
//
// Alerts
// --------------------------------------------------


// Base styles
// -------------------------

.alert {
padding: 8px 35px 8px 14px;
margin-bottom: @baseLineHeight;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
background-color: @warningBackground;
border: 1px solid @warningBorder;
.border-radius(@baseBorderRadius);
}
.alert,
.alert h4 {
// Specified for the h4 to prevent conflicts of changing @headingsColor
color: @warningText;
}
.alert h4 {
margin: 0;
}

// Adjust close link position
.alert .close {
position: relative;
top: -2px;
right: -21px;
line-height: @baseLineHeight;
}


// Alternate styles
// -------------------------

.alert-success {
background-color: @successBackground;
border-color: @successBorder;
color: @successText;
}
.alert-success h4 {
color: @successText;
}
.alert-danger,
.alert-error {
background-color: @errorBackground;
border-color: @errorBorder;
color: @errorText;
}
.alert-danger h4,
.alert-error h4 {
color: @errorText;
}
.alert-info {
background-color: @infoBackground;
border-color: @infoBorder;
color: @infoText;
}
.alert-info h4 {
color: @infoText;
}


// Block alerts
// -------------------------

.alert-block {
padding-top: 14px;
padding-bottom: 14px;
}
.alert-block > p,
.alert-block > ul {
margin-bottom: 0;
}
.alert-block p + p {
margin-top: 5px;
}
53 changes: 45 additions & 8 deletions src/styles/bootstrap/bootstrap.less
Original file line number Diff line number Diff line change
@@ -1,26 +1,63 @@
/*!
* Bootstrap v1.4.0
* Bootstrap v2.3.1
*
* Copyright 2011 Twitter, Inc
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Thu Jan 5 07:14:51 PST 2012
*/

// CSS Reset
@import "reset.less";

// Core variables and mixins
@import "variables.less"; // Modify this for custom colors, font-sizes, etc
@import "mixins.less";

// CSS Reset
@import "reset.less";

// Grid system and page structure
@import "scaffolding.less";
@import "grid.less";
@import "layouts.less";

// Styled patterns and elements
// Base CSS
@import "type.less";
@import "code.less";
@import "forms.less";
@import "tables.less";
@import "patterns.less";

// Components: common
@import "sprites.less";
@import "dropdowns.less";
@import "wells.less";
@import "component-animations.less";
@import "close.less";

// Components: Buttons & Alerts
@import "buttons.less";
@import "button-groups.less";
@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less

// Components: Nav
@import "navs.less";
@import "navbar.less";
@import "breadcrumbs.less";
@import "pagination.less";
@import "pager.less";

// Components: Popovers
@import "modals.less";
@import "tooltip.less";
@import "popovers.less";

// Components: Misc
@import "thumbnails.less";
@import "media.less";
@import "labels-badges.less";
@import "progress-bars.less";
@import "accordion.less";
@import "carousel.less";
@import "hero-unit.less";

// Utility classes
@import "utilities.less"; // Has to be last to override when necessary
24 changes: 24 additions & 0 deletions src/styles/bootstrap/breadcrumbs.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// Breadcrumbs
// --------------------------------------------------


.breadcrumb {
padding: 8px 15px;
margin: 0 0 @baseLineHeight;
list-style: none;
background-color: #f5f5f5;
.border-radius(@baseBorderRadius);
> li {
display: inline-block;
.ie7-inline-block();
text-shadow: 0 1px 0 @white;
> .divider {
padding: 0 5px;
color: #ccc;
}
}
> .active {
color: @grayLight;
}
}
Loading