dialog-promise
Advanced tools
Comparing version 0.9.4 to 0.9.5
@@ -462,6 +462,4 @@ "use strict"; | ||
button.textContent=elementDefinition.label; | ||
if(elementDefinition.attributes){ | ||
elementDefinition.attributes.forEach(function(attr){ | ||
button.setAttribute(attr.name, attr.value); | ||
}) | ||
for(var attr in elementDefinition.attributes){ | ||
button.setAttribute(attr,elementDefinition.attributes[attr]); | ||
} | ||
@@ -581,2 +579,5 @@ button.addEventListener('click', function(){ | ||
} | ||
for(var attr in inputDef.attributes){ | ||
input.setAttribute(attr,inputDef.attributes[attr]); | ||
} | ||
input.value = defaultValue; | ||
@@ -583,0 +584,0 @@ var firstKey=true; |
{ | ||
"name": "dialog-promise", | ||
"description": "Dialog that returns promises", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"author": "Codenautas <codenautas@googlegroups.com>", | ||
@@ -6,0 +6,0 @@ "repository": "codenautas/dialog-promise", |
@@ -69,8 +69,9 @@ # dialog-promise | ||
`withCloseButton` |`true` |display the close button | ||
`mainAttrs` |`{}` |attributes for main dialog window | ||
`mainAttrs` |`{}` |attributes (properties) for main dialog window | ||
`setAttrs` |`{}` |DOM attributes for main dialog window | ||
`reject` |`true` |true if rejects the promise when close by the close button, Esc key or clicking outside of the dialog | ||
`closeValue` |`undefined` |value if rejects the promise when close by the close button, Esc key or clicking outside of the dialog | ||
`inputDef` |`{lines:2}` |transforms input to textarea with *lines* rows | ||
`inputDef` |`{lines:1, attributes:{attrname: 'attrvalue', othername:'othervalue'}}` |lines option transforms input to textarea with *lines* rows, attributes is used to set attributes | ||
`buttonDef` |`{label:'Ok', value:true}`|main button of the alertPromise dialog | ||
`buttonsDef` |`{label:'Ok', value:true, attributes:[{name: 'attrname', value: 'attrvalue'},{name: 'other', value: true}]}`| button description | ||
`buttonsDef` |`{label:'Ok', value:true, attributes:{attrname: 'attrvalue', othername:'othervalue'}}`| button description | ||
`askForNoRepeat` |`false` |id (or object) to permits the user to ask to remember de answer | ||
@@ -77,0 +78,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
53377
866
115