src/widgets/Dialogs.js
Function showModalDialogUsingTemplate
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showModalDialogUsingTemplate(template, autoDismiss) {
if (autoDismiss === undefined) {
autoDismiss = true;
}
Function _keydownHook
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _keydownHook = function (e, autoDismiss) {
var $primaryBtn = this.find(".primary"),
buttonId = null,
which = String.fromCharCode(e.which),
$focusedElement = this.find(".dialog-button:focus, a:focus");
Avoid deeply nested control flow statements. Open
Open
if (_hasButton(this, DIALOG_BTN_DONTSAVE)) {
buttonId = DIALOG_BTN_DONTSAVE;
}
Avoid deeply nested control flow statements. Open
Open
if (_hasButton(this, DIALOG_BTN_DONTSAVE)) {
buttonId = DIALOG_BTN_DONTSAVE;
}
Avoid deeply nested control flow statements. Open
Open
} else if (e.metaKey && (e.which === KeyEvent.DOM_VK_PERIOD)) {
buttonId = DIALOG_BTN_CANCEL;
}
Function showModalDialog
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function showModalDialog(dlgClass, title, message, buttons, autoDismiss) {