Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
Merge pull request #27 from adobe/pflynn/fix-css-loading
Browse files Browse the repository at this point in the history
Remove dependency on RequireJS 1.x since Brackets is moving to 2.1.
  • Loading branch information
Terrence Ryan committed Oct 30, 2012
2 parents 6f0b34d + 6c9e3aa commit ce8b6bd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.js
Expand Up @@ -43,6 +43,7 @@ define(function (require, exports, module) {
Menus = brackets.getModule("command/Menus"),
Dialogs = brackets.getModule("widgets/Dialogs"),
FileUtils = brackets.getModule("file/FileUtils"),
ExtensionUtils = brackets.getModule("utils/ExtensionUtils"),
eve,
format = (function () {
var tokenRegex = /\{([^\}]+)\}/g,
Expand Down Expand Up @@ -83,9 +84,7 @@ define(function (require, exports, module) {
var PGB_COMMAND_ID = "phonegap.build"; // package-style naming to avoid collisions
CommandManager.register(Strings.COMMAND_NAME, PGB_COMMAND_ID, eve.f("pgb.button.click"));

var button = $("<a>"),
path2 = require.nameToUrl("icon.svg");
path2 = path2.substring(0, path2.indexOf("icon.svg["));
var button = $("<a>");

function zipProject(id) {
var rootPath = ProjectManager.getProjectRoot().fullPath,
Expand Down Expand Up @@ -221,14 +220,15 @@ define(function (require, exports, module) {
xhr.send(form);
}
}


ExtensionUtils.loadStyleSheet(module, "pgb.css");

button.attr({
title: Strings.COMMAND_NAME,
id: "pgb-btn",
href: "#",
"class": "disabled"
}).html('<link rel="stylesheet" href="' + path2 + 'pgb.css">')
.click(eve.f("pgb.button.click"));
}).click(eve.f("pgb.button.click"));
button.insertAfter("#toolbar-go-live");

var $panel = $('<div id="pgb-panel" class="bottom-panel">\
Expand Down

0 comments on commit ce8b6bd

Please sign in to comment.