Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
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
2 changes: 1 addition & 1 deletion src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ define(function LiveDevelopment(require, exports, module) {

function _onDetached(event, res) {
// If there already is a reason for closing the session, do not overwrite it
if (!_closeReason) {
if (!_closeReason && res && res.reason) {
// Get the explanation from res.reason, e.g. "replaced_with_devtools", "target_closed", "canceled_by_user"
// Examples taken from https://chromiumcodereview.appspot.com/10947037/patch/12001/13004
// However, the link refers to the Chrome Extension API, it may not apply 100% to the Inspector API
Expand Down
27 changes: 14 additions & 13 deletions src/preferences/PreferencesDialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,23 @@ define(function (require, exports, module) {
$baseUrlControl,
dialog;

dialog = Dialogs.showModalDialogUsingTemplate(Mustache.render(SettingsDialogTemplate, Strings))
.done(function (id) {
if (id === Dialogs.DIALOG_BTN_OK) {
var baseUrlValue = $baseUrlControl.val();
var result = _validateBaseUrl(baseUrlValue);
if (result === "") {
ProjectManager.setBaseUrl(baseUrlValue);
} else {
// Re-invoke dialog with result (error message)
showProjectPreferencesDialog(baseUrlValue, result);
}
dialog = Dialogs.showModalDialogUsingTemplate(Mustache.render(SettingsDialogTemplate, Strings));

dialog.done(function (id) {
if (id === Dialogs.DIALOG_BTN_OK) {
var baseUrlValue = $baseUrlControl.val();
var result = _validateBaseUrl(baseUrlValue);
if (result === "") {
ProjectManager.setBaseUrl(baseUrlValue);
} else {
// Re-invoke dialog with result (error message)
showProjectPreferencesDialog(baseUrlValue, result);
}
});
}
});

// Populate project settings
$dlg = $(".project-settings-dialog.instance");
$dlg = dialog.getElement();

// Title
$title = $dlg.find(".dialog-title");
Expand Down
4 changes: 2 additions & 2 deletions src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1104,10 +1104,10 @@ define(function (require, exports, module) {

/**
* Invoke project settings dialog.
* @return {Dialog}
* @return {$.Promise}
*/
function _projectSettings() {
return PreferencesDialogs.showProjectPreferencesDialog(getBaseUrl());
return PreferencesDialogs.showProjectPreferencesDialog(getBaseUrl()).getPromise();
}

/**
Expand Down