Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
really Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
timoweiss authored and timoweiss committed Apr 8, 2014
1 parent 549bfa7 commit d2c1a9a
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions requireeditor.js
Expand Up @@ -202,7 +202,7 @@ define(function(require, exports, module) {
var options = {
placement: "left",
trigger: "manual",
autoHideDelay: 2000,
autoHideDelay: 3000,
title: function() {
return selectedModulName;
},
Expand All @@ -211,6 +211,7 @@ define(function(require, exports, module) {
}
};
//Show twipsy with errormessage
$tempTwipsyDiv.data('twipsy', null);
$tempTwipsyDiv.twipsy(options).twipsy("show");
return;

Expand All @@ -219,32 +220,28 @@ define(function(require, exports, module) {
Dialogs.cancelModalDialogIfOpen('npm-install-dialog');
var currenInlineEditor = EditorManager.getActiveEditor().getInlineWidgets();

//
_.each(currenInlineEditor, function(inlineEditor) {
// Close if it's a require-editor
if (inlineEditor.hasOwnProperty('requireEditor')) {
inlineEditor.close();
}

});
//currenInlineEditor[0].close();
if (data) {
var installedModuleName = data[data.length-1][0];

templateContent = '<div id="' +installedModuleName+'"></div><div class="tooltip-arrow"></div><div class="tooltip-innerQuickRequire">' + installedModuleName + ' ' + Strings.NOTIFICATON_INSTALL_NPMMODULE_END + '</div></div>';
templateContent = '<div class="tooltip-arrow"></div><div class="tooltip-innerQuickRequire">' + installedModuleName + ' ' + Strings.NOTIFICATON_INSTALL_NPMMODULE_END + '</div>';

//configure twipsy
var options = {
placement: "above",
trigger: "manual",
autoHideDelay: 2000,
title: function() {
return selectedModulName;
},
autoHideDelay: 3000,
template: function() {
return templateContent;
}
};
$tempTwipsyDiv.data('twipsy', null);
$tempTwipsyDiv.twipsy(options).twipsy('show');


Expand All @@ -258,11 +255,6 @@ define(function(require, exports, module) {
$(document).undelegate('.install-module-btn', 'click');
}
StatusBar.hideBusyIndicator(INDICATOR_ID2);
setTimeout(function() {
// Bugfix for twipsy-caching
//$tempTwipsyDiv.twipsy('hide');

}, 5100);
};
//run npm install with the selectedModulName
requireNpmbridge.callNpmInstall(selectedModulName, savePackage, notifyUserCallback);
Expand Down

0 comments on commit d2c1a9a

Please sign in to comment.