-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
190 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# brackets-basic-buttons | ||
Basic Buttons Extension for Adobe Brackets | ||
## Instructions | ||
Simply adds Save All, Undo/Redo, and optional Custom button to the toolbar. | ||
Right-click for alternate actions, specify any command for third button. | ||
|
||
## History | ||
- 1.0.0 Sept 2016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#save-button{ | ||
background-image: url(save.png); | ||
} | ||
#undo-button{ | ||
background-image: url(undo.png); | ||
} | ||
#custom-button{ | ||
background-image: url(custom.png); | ||
} | ||
/* | ||
#save-button:hover{ | ||
background-position: 0px -24px; | ||
} | ||
#undo-button:hover{ | ||
background-position: 0px -24px; | ||
} | ||
*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
const CUSTOM_COMMAND = "change.this"; | ||
|
||
|
||
/* | ||
Right-click the custom command icon to edit this file any time for your convenience. | ||
When saved, go to Debug menu: Reload With Extensions. (or press F5) | ||
See https://github.com/adobe/brackets/blob/master/src/command/Commands.js | ||
Change command text, for example: | ||
CUSTOM_COMMAND = "view.toggleSidebar"; | ||
or CUSTOM_COMMAND = "cmd.findAllAndSelect"; | ||
or CUSTOM_COMMAND = "navigate.showInOS"; | ||
Set text to empty or "none" to hide icon: | ||
CUSTOM_COMMAND = "none"; | ||
or CUSTOM_COMMAND = ""; | ||
*/ | ||
|
||
|
||
/* | ||
Sample Commands: | ||
"app.reload" | ||
"file.new" | ||
"file.newDoc" | ||
"file.newFile" | ||
"file.newFolder" | ||
"file.openFolder" | ||
"file.open" | ||
"file.save" | ||
"file.saveAll" | ||
"file.saveAs" | ||
"file.close" | ||
"file.close_all" | ||
"file.delete" | ||
"file.rename" | ||
"file.refresh" | ||
"edit.undo" | ||
"edit.redo" | ||
"edit.cut" | ||
"edit.copy" | ||
"edit.paste" | ||
"edit.selectAll" | ||
"edit.selectLine" | ||
"edit.splitSelIntoLines" | ||
"edit.indent" | ||
"edit.unindent" | ||
"edit.duplicate" | ||
"edit.deletelines" | ||
"edit.lineComment" | ||
"edit.blockComment" | ||
"edit.lineUp" | ||
"edit.lineDown" | ||
"edit.findNext" | ||
"edit.findPrevious" | ||
"cmd.find" | ||
"cmd.findInFiles" | ||
"cmd.findNext" | ||
"cmd.findAllAndSelect" | ||
"view.increaseFontSize" | ||
"view.decreaseFontSize" | ||
"view.restoreFontSize" | ||
"view.scrollLineUp" | ||
"view.scrollLineDown" | ||
"view.toggleLineNumbers" | ||
"view.toggleActiveLine" | ||
"view.toggleWordWrap" | ||
"view.toggleSidebar" | ||
"view.hideSidebar" | ||
"view.showSidebar" | ||
"navigate.nextDoc" | ||
"navigate.prevDoc" | ||
"navigate.nextDocListOrder" | ||
"navigate.prevDocListOrder" | ||
"navigate.showInFileTree" | ||
"navigate.showInOS" | ||
"navigate.quickOpen" | ||
"navigate.jumptoDefinition" | ||
"navigate.gotoDefinition" | ||
"navigate.nextMatch" | ||
"navigate.previousMatch" | ||
"file.addToWorkingSet" | ||
"cmd.addToWorkingSetAndOpen" | ||
"cmd.sortWorkingSetByName" | ||
"cmd.sortWorkingSetByType" | ||
"cmd.sortWorkingSetByAdded" | ||
"cmd.splitViewNone" | ||
"cmd.splitViewVertical" | ||
"cmd.splitViewHorizontal" | ||
"cmd.open" | ||
"help.showExtensionsFolder" | ||
See CommandManager.getAll() | ||
*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* Brackets Basic-Buttons Extension */ | ||
|
||
define(function (require, exports, module) { | ||
'use strict'; | ||
|
||
//console.log("Starting Basic-Buttons Extension"); | ||
|
||
var ExtensionUtils = brackets.getModule("utils/ExtensionUtils"); | ||
var CommandManager = brackets.getModule("command/CommandManager"); | ||
var CustomButtom = require("./custom"); | ||
|
||
ExtensionUtils.loadStyleSheet(module, "basicbuttons.css"); | ||
|
||
var toolbarSaveButton = $(document.createElement("a")) | ||
.attr("id", "save-button") | ||
.attr("href", "#") | ||
.attr("title", "Save All") | ||
.on("click", function () { | ||
CommandManager.execute("file.saveAll"); | ||
}) | ||
.on("contextmenu", function () { | ||
CommandManager.execute("file.save"); | ||
}) | ||
.appendTo($("#main-toolbar .buttons")); | ||
|
||
var toolbarUndoButton = $(document.createElement("a")) | ||
.attr("id", "undo-button") | ||
.attr("href", "#") | ||
.attr("title", "Undo/Redo (Right-click)") | ||
.on("click", function () { | ||
CommandManager.execute("edit.undo"); | ||
}) | ||
.on("contextmenu", function () { | ||
CommandManager.execute("edit.redo"); | ||
}) | ||
.appendTo($("#main-toolbar .buttons")); | ||
|
||
if (CUSTOM_COMMAND && CUSTOM_COMMAND != "none") { | ||
|
||
const CustomPath = ExtensionUtils.getModulePath(module) + "custom.js"; | ||
|
||
var toolbarCustomButton = $(document.createElement("a")) | ||
.attr("id", "custom-button") | ||
.attr("href", "#") | ||
.attr("title", CUSTOM_COMMAND) | ||
.on("click", function () { | ||
if (CUSTOM_COMMAND == "change.this" || CUSTOM_COMMAND.indexOf('.') < 3) | ||
CommandManager.execute("cmd.addToWorkingSetAndOpen", {fullPath: CustomPath}); | ||
else | ||
CommandManager.execute(CUSTOM_COMMAND); | ||
}) | ||
.on("contextmenu", function () { | ||
CommandManager.execute("cmd.addToWorkingSetAndOpen", {fullPath: CustomPath}); | ||
}) | ||
.appendTo($("#main-toolbar .buttons")); | ||
//toolbarCustomButton.css("background-position", "0 0"); | ||
|
||
} | ||
|
||
console.log("Loaded Basic-Buttons Extension"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "basic-buttons", | ||
"title": "Basic Buttons", | ||
"description": "Simply adds Save All, Undo/Redo, and optional Custom button to toolbar. Right-click for alternate action.", | ||
"homepage": "http://github.com/SkinVista/brackets-basic-buttons", | ||
"author": "SkinVista <[email protected]>", | ||
"license": "PPD (Persistent Public Domain)", | ||
"version": "1.0.0", | ||
"engines": { | ||
"brackets": ">=0.20.0" | ||
} | ||
} |