Permalink
Browse files

Made folder names darker. Turned off word-wrap.

  • Loading branch information...
njx committed Aug 28, 2012
1 parent d4f6170 commit 43bbde0648af1261c9b88d48120aadc78f2b98e1
Showing with 21 additions and 10 deletions.
  1. +10 −8 main.js
  2. +11 −2 styles.css
View
18 main.js
@@ -38,6 +38,7 @@ define(function (require, exports, module) {
Commands = brackets.getModule("command/Commands"),
CommandManager = brackets.getModule("command/CommandManager"),
ExtensionUtils = brackets.getModule("utils/ExtensionUtils"),
+ LoadEvents = brackets.getModule("utils/LoadEvents"),
strings = brackets.getModule("strings");
var $dropdownToggle;
@@ -55,7 +56,6 @@ define(function (require, exports, module) {
recentProjects = recentProjects.slice(0, 20);
}
prefs.setValue("recentProjects", recentProjects);
- console.log("Recent projects: " + recentProjects);
}
function renderPath(path) {
@@ -77,7 +77,7 @@ define(function (require, exports, module) {
var folderSpan = $("<span></span>").addClass("recent-folder").text(folder),
restSpan = $("<span></span>").addClass("recent-folder-path").text(" in " + rest);
- return $("<a></a>").append(folderSpan).append(restSpan);
+ return $("<a></a>").addClass("recent-folder-link").append(folderSpan).append(restSpan);
}
function toggle(e) {
@@ -119,7 +119,7 @@ define(function (require, exports, module) {
if (hasProject) {
$("<li class='divider'>").appendTo($dropdown);
}
- $("<li><a>" + strings.CMD_OPEN_FOLDER + "</a></li>")
+ $("<li><a id='open-folder-link'>" + strings.CMD_OPEN_FOLDER + "</a></li>")
.click(function () {
CommandManager.execute(Commands.FILE_OPEN_FOLDER);
})
@@ -139,11 +139,13 @@ define(function (require, exports, module) {
// Initialize extension
ExtensionUtils.loadStyleSheet(module, "styles.css");
- $("#project-title")
- .wrap("<div id='project-dropdown-toggle'></div>")
- .after("<span class='dropdown-arrow'></span>");
- $dropdownToggle = $("#project-dropdown-toggle").click(toggle);
-
$(ProjectManager).on("projectOpen", add);
$(ProjectManager).on("beforeProjectClose", add);
+
+ LoadEvents.htmlContentLoadComplete(function () {
+ $("#project-title")
+ .wrap("<div id='project-dropdown-toggle'></div>")
+ .after("<span class='dropdown-arrow'></span>");
+ $dropdownToggle = $("#project-dropdown-toggle").click(toggle);
+ });
});
View
@@ -15,9 +15,18 @@
#project-dropdown.dropdown-menu {
position: absolute;
display: block;
+ max-width: none;
z-index: 100;
}
-.recent-folder-path {
- color: #ccc;
+.recent-folder-link, .recent-folder, .recent-folder-path {
+ white-space: nowrap;
+}
+
+.recent-folder, #open-folder-link {
+ color: #333;
}
+
+.recent-folder-path {
+ color: #aaa;
+}

0 comments on commit 43bbde0

Please sign in to comment.