mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Button widget annotations: implement reference testing
Moreover, ensure that the read-only state is respected and improve CSS names.
This commit is contained in:
parent
ba012c7a68
commit
0c9a06c020
6 changed files with 58 additions and 20 deletions
|
@ -563,9 +563,10 @@ var CheckboxWidgetAnnotationElement =
|
|||
* @returns {HTMLSectionElement}
|
||||
*/
|
||||
render: function CheckboxWidgetAnnotationElement_render() {
|
||||
this.container.className = 'checkboxWidgetAnnotation';
|
||||
this.container.className = 'buttonWidgetAnnotation checkBox';
|
||||
|
||||
var element = document.createElement('input');
|
||||
element.disabled = this.data.readOnly;
|
||||
element.type = 'checkbox';
|
||||
element.id = this.data.fieldName;
|
||||
if (this.data.fieldValue && this.data.fieldValue !== 'Off') {
|
||||
|
@ -604,10 +605,11 @@ var RadioButtonWidgetAnnotationElement =
|
|||
* @returns {HTMLSectionElement}
|
||||
*/
|
||||
render: function RadioButtonWidgetAnnotationElement_render() {
|
||||
this.container.className = 'radioButtonWidgetAnnotation';
|
||||
this.container.className = 'buttonWidgetAnnotation radioButton';
|
||||
|
||||
var element = document.createElement('input');
|
||||
var id = this.data.fieldName + '.' + this.data.buttonValue;
|
||||
element.disabled = this.data.readOnly;
|
||||
element.type = 'radio';
|
||||
element.id = id;
|
||||
element.name = this.data.fieldName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue