dialog-promise
Advanced tools
Comparing version 0.9.6 to 0.9.7
@@ -328,3 +328,3 @@ "use strict"; | ||
event.preventDefault(); | ||
}else if(code>=112 && code<=123){ | ||
}else if(code>=112 && code<=123 || code==67 && event.ctrlKey){ | ||
}else{ | ||
@@ -390,3 +390,13 @@ var topDialog=document.getElementById(window.openDialogPromises.lastWindows[0]); | ||
var letra=String.fromCharCode(code).toUpperCase(); | ||
if(topDialog.innerDivDialog && topDialog.innerDivDialog.hotkeys && topDialog.innerDivDialog.hotkeys[letra] && (document.activeElement.tagName=='BODY' || document.activeElement.tagName=='BUTTON' || document.activeElement.tagName=='INPUT' && document.activeElement.type=='BUTTON')){ | ||
if( | ||
topDialog.innerDivDialog | ||
&& topDialog.innerDivDialog.hotkeys | ||
&& topDialog.innerDivDialog.hotkeys[letra] | ||
&& ( | ||
document.activeElement.tagName=='BODY' | ||
|| document.activeElement.tagName=='BUTTON' | ||
|| document.activeElement.tagName=='INPUT' && document.activeElement.type=='BUTTON') | ||
&& !event.ctrlKey | ||
&& !event.altKey | ||
){ | ||
topDialog.innerDivDialog.hotkeys[letra].click(); | ||
@@ -393,0 +403,0 @@ event.preventDefault(); |
{ | ||
"name": "dialog-promise", | ||
"description": "Dialog that returns promises", | ||
"version": "0.9.6", | ||
"version": "0.9.7", | ||
"author": "Codenautas <codenautas@googlegroups.com>", | ||
@@ -14,8 +14,8 @@ "repository": "codenautas/dialog-promise", | ||
"devDependencies": { | ||
"@types/mocha": "~5.2.1", | ||
"@types/puppeteer": "~1.3.2", | ||
"@types/mocha": "~5.2.5", | ||
"@types/puppeteer": "~1.11.1", | ||
"mocha": "~5.2.0", | ||
"puppeteer": "~1.4.0", | ||
"best-globals": "~0.10.4", | ||
"discrepances": "~0.2.2", | ||
"puppeteer": "~1.11.0", | ||
"best-globals": "~0.10.7", | ||
"discrepances": "~0.2.4", | ||
"server4test": "~0.2.1" | ||
@@ -22,0 +22,0 @@ }, |
@@ -112,2 +112,22 @@ # dialog-promise | ||
## simpleFormPromise(elements, opts) | ||
Shows a simple form | ||
### elements | ||
* if it is a string it shows the text | ||
* if it is an HTML elementit shows it | ||
* otherwise creates a button | ||
## Opciones | ||
atributo de element |predeterminado|uso | ||
---------------------|--------------|------------------------------------- | ||
`dialogPromiseDone` | |see spanish | ||
`firstFocus` |`null` |see spanish | ||
`label` | |see spanish | ||
`attributes` |`{}` |see spanish | ||
`value` |`null` |see spanish | ||
`hotkey` | |see spanish | ||
## License | ||
@@ -114,0 +134,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54947
884
136