-
Notifications
You must be signed in to change notification settings - Fork 0
Bugfix doublequotes #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
706c2bf
quotefix
AbomDocPhibes 3aeeb3b
Update auto-complete.js
AbomDocPhibes 0cc3cef
Update auto-complete.js
AbomDocPhibes d54650f
Update auto-complete.js
AbomDocPhibes 5d9aaca
Update AutoComplete.adc
AbomDocPhibes dc86224
encodingfix
AbomDocPhibes a24550e
encoding fix
AbomDocPhibes fafe4d5
Update single.html
AbomDocPhibes e81a2e4
html value fixes
AbomDocPhibes de14b4e
Update changelog.md
AbomDocPhibes 261fed2
changelog & config change
AbomDocPhibes 1beb429
5.5 syntax fix
AbomDocPhibes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,74 @@ | ||
| {% | ||
| ' Input settings | ||
| Dim inputId | ||
| Dim inputName | ||
| Dim inputValue | ||
| Dim inputSearchValue = "" | ||
|
|
||
| ' Get properties | ||
| Dim autofocus = "" | ||
| If (CurrentADC.PropValue("autofocus") = "autofocus") Then | ||
| autofocus = "autofocus" | ||
| EndIf | ||
|
|
||
| Dim selectOnHover = CurrentADC.PropValue("selectOnHover") | ||
|
|
||
| Dim arrParentAnswers = CurrentQuestion.ParentLoop.Answers | ||
| Dim idxPA | ||
|
|
||
| For idxPA = 1 To arrParentAnswers.Count | ||
| inputName = CurrentQuestion.Iteration(arrParentAnswers[idxPA].Index).InputName() | ||
| inputId = inputName | ||
| inputValue = CurrentQuestion.Iteration(arrParentAnswers[idxPA].Index).InputValue() | ||
|
|
||
| ' Get selected answer | ||
| If (arrParentAnswers[idxPA].Caption = CurrentADC.PropValue("searchField")) Then | ||
| inputSearchValue = CurrentQuestion.Iteration(arrParentAnswers[idxPA].Index).InputValue() | ||
| EndIf | ||
| %} | ||
| <script type="text/javascript"> | ||
| window.value = '{%= selectOnHover %}'; | ||
| </script> | ||
|
|
||
| <input id="{%= inputId %}" aria-label="{%=inputId%}" class="autocomplete hiddens" type="text" autocomplete="off" name="{%= inputName%}" value="{%:= inputValue %}" /> | ||
| {% | ||
| Next idxPA | ||
| %} | ||
| <br /> | ||
| {% | ||
| Dim highlightInput = CurrentADC.PropValue("highlightInputOnError") | ||
| Dim highlightConditionBlockingMessage = CurrentADC.PropValue("highlightConditionBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim highlightConditionNonBlockingMessage = CurrentADC.PropValue("highlightConditionNonBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim classHighlight = On(highlightInput = "yes" And highlightConditionBlockingMessage = "true"," blocking_errormessage",On(highlightInput = "yes" And highlightConditionNonBlockingMessage = "true"," nonblocking_errormessage","")) | ||
| Dim placeholder = CurrentADC.PropValue("placeholder") | ||
| %} | ||
|
|
||
| <input id="adc_{%= CurrentADC.InstanceId %}_input" aria-label="{%:= placeholder %}" | ||
| class="autocomplete{%= classHighlight %}" {%= autofocus %} type="search" autocomplete="off" name="adc_{%= CurrentADC.InstanceId %}_input" | ||
| placeholder="{%:= placeholder %}" value="{%:= inputSearchValue %}" /> | ||
| <button class="close-icon" type="reset"></button> | ||
| <div class="nomatch"></div> | ||
| {% | ||
| ' Input settings | ||
| Dim inputId | ||
| Dim inputName | ||
| Dim inputValue | ||
| Dim inputSearchValue = "" | ||
|
|
||
| ' Get properties | ||
| Dim autofocus = "" | ||
| If (CurrentADC.PropValue("autofocus") = "autofocus") Then | ||
| autofocus = "autofocus" | ||
| EndIf | ||
|
|
||
| Dim selectOnHover = CurrentADC.PropValue("selectOnHover") | ||
|
|
||
| Dim arrParentAnswers = CurrentQuestion.ParentLoop.Answers | ||
| Dim idxPA | ||
|
|
||
| For idxPA = 1 To arrParentAnswers.Count | ||
| inputName = CurrentQuestion.Iteration(arrParentAnswers[idxPA].Index).InputName() | ||
| inputId = inputName | ||
| inputValue = CurrentQuestion.Iteration(arrParentAnswers[idxPA].Index).InputValue() | ||
|
|
||
| ' Get selected answer | ||
| If (arrParentAnswers[idxPA].Caption = CurrentADC.PropValue("searchField")) Then | ||
| inputSearchValue = CurrentQuestion.Iteration(arrParentAnswers[idxPA].Index).InputValue() | ||
| EndIf | ||
|
|
||
| ' Safe escaped value for hidden open-end input | ||
| Dim safeInputValue = inputValue | ||
| safeInputValue = safeInputValue.Replace("&", "&").Replace("<", "<").Replace(">", ">") | ||
| %} | ||
AbomDocPhibes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <script type="text/javascript"> | ||
| window.value = '{%= selectOnHover %}'; | ||
| </script> | ||
AbomDocPhibes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <input id="{%= inputId %}" aria-label="{%= inputId %}" class="autocomplete hiddens" type="text" autocomplete="off" name="{%= inputName %}" value="{%:= safeInputValue %}" /> | ||
| {% | ||
| Next idxPA | ||
|
|
||
| Dim highlightInput = CurrentADC.PropValue("highlightInputOnError") | ||
| Dim highlightConditionBlockingMessage = CurrentADC.PropValue("highlightConditionBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim highlightConditionNonBlockingMessage = CurrentADC.PropValue("highlightConditionNonBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim classHighlight = On(highlightInput = "yes" And highlightConditionBlockingMessage = "true"," blocking_errormessage",On(highlightInput = "yes" And highlightConditionNonBlockingMessage = "true"," nonblocking_errormessage","")) | ||
| Dim placeholder = CurrentADC.PropValue("placeholder") | ||
|
|
||
| ' Safe escaped value for visible text node | ||
| Dim safeInputSearchValue = inputSearchValue | ||
| safeInputSearchValue = safeInputSearchValue.Replace("&", "&").Replace("<", "<").Replace(">", ">") | ||
|
|
||
| ' Safe escaped placeholder | ||
| Dim safePlaceholder = placeholder | ||
| safePlaceholder = safePlaceholder.Replace("&", "&").Replace("<", "<").Replace(">", ">") | ||
AbomDocPhibes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| %} | ||
| <br /> | ||
|
|
||
| <input id="adc_{%= CurrentADC.InstanceId %}_input" aria-label="{%:= safePlaceholder %}" | ||
| class="autocomplete{%= classHighlight %}" {%= autofocus %} type="search" autocomplete="off" name="adc_{%= CurrentADC.InstanceId %}_input" | ||
| placeholder="{%:= safePlaceholder %}" value="" /> | ||
|
|
||
| <span id="adc_{%= CurrentADC.InstanceId %}_text" style="display:none;">{%:= safeInputSearchValue %}</span> | ||
|
|
||
| <script type="text/javascript"> | ||
| (function () { | ||
| var input = document.getElementById("adc_{%= CurrentADC.InstanceId %}_input"); | ||
| var text = document.getElementById("adc_{%= CurrentADC.InstanceId %}_text"); | ||
| if (input && text) { | ||
| input.value = text.textContent || text.innerText || ""; | ||
| } | ||
| })(); | ||
| </script> | ||
|
|
||
| <button class="close-icon" type="reset"></button> | ||
| <div class="nomatch"></div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,83 @@ | ||
| {% | ||
| ' Input settings | ||
| Dim inputId | ||
| Dim inputName | ||
| Dim inputValue | ||
| Dim inputSearchValue = "" | ||
|
|
||
| ' Get properties | ||
| Dim autofocus = "" | ||
| If (CurrentADC.PropValue("autofocus") = "autofocus") Then | ||
| autofocus = "autofocus" | ||
| EndIf | ||
|
|
||
| Dim selectOnHover = CurrentADC.PropValue("selectOnHover") | ||
|
|
||
|
|
||
| ' Generate input fields | ||
| inputName = CurrentQuestion.InputName() | ||
| inputId = inputName | ||
| inputValue = CurrentQuestion.InputValue() | ||
|
|
||
| ' Get selected answer | ||
| Dim arrAnswers = CurrentQuestion.Answers | ||
| Dim idxA | ||
|
|
||
| For idxA = 1 To arrAnswers.Count | ||
| inputSearchValue = arrAnswers[idxA].Caption | ||
| Next idxA | ||
| %} | ||
|
|
||
| <script type="text/javascript"> | ||
| window.value = '{%= selectOnHover %}'; | ||
| </script> | ||
|
|
||
| <input id="{%= inputId %}" aria-label="{%=inputId%}" class="autocomplete hiddens" type="text" autocomplete="off" name="{%= inputName%}" value="{%:= inputValue %}" /> | ||
|
|
||
| <br /> | ||
| {% | ||
| Dim highlightInput = CurrentADC.PropValue("highlightInputOnError") | ||
| Dim highlightConditionBlockingMessage = CurrentADC.PropValue("highlightConditionBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim highlightConditionNonBlockingMessage = CurrentADC.PropValue("highlightConditionNonBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim classHighlight = On(highlightInput = "yes" And highlightConditionBlockingMessage = "true"," blocking_errormessage",On(highlightInput = "yes" And highlightConditionNonBlockingMessage = "true"," nonblocking_errormessage","")) | ||
| Dim placeholder = CurrentADC.PropValue("placeholder") | ||
| %} | ||
|
|
||
| <input id="adc_{%= CurrentADC.InstanceId %}_input" aria-label="{%:= placeholder %}" | ||
| class="autocomplete{%= classHighlight %}" {%= autofocus %} type="search" autocomplete="off" name="adc_{%= CurrentADC.InstanceId %}_input" | ||
| placeholder="{%:= placeholder %}" value="{%:= inputSearchValue %}" /> | ||
| <button class="close-icon" type="reset"></button> | ||
| <div class="nomatch"></div> | ||
| {% | ||
| ' Input settings | ||
| Dim inputId | ||
| Dim inputName | ||
| Dim inputValue | ||
| Dim inputSearchValue = "" | ||
|
|
||
| ' Get properties | ||
| Dim autofocus = "" | ||
| If (CurrentADC.PropValue("autofocus") = "autofocus") Then | ||
| autofocus = "autofocus" | ||
| EndIf | ||
|
|
||
| Dim selectOnHover = CurrentADC.PropValue("selectOnHover") | ||
|
|
||
| ' Generate input fields | ||
| inputName = CurrentQuestion.InputName() | ||
| inputId = inputName | ||
| inputValue = CurrentQuestion.InputValue() | ||
|
|
||
| ' Get selected answer | ||
| Dim arrAnswers = CurrentQuestion.Answers | ||
| Dim idxA | ||
|
|
||
| For idxA = 1 To arrAnswers.Count | ||
| inputSearchValue = arrAnswers[idxA].Caption | ||
| Next idxA | ||
|
|
||
| Dim highlightInput = CurrentADC.PropValue("highlightInputOnError") | ||
| Dim highlightConditionBlockingMessage = CurrentADC.PropValue("highlightConditionBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim highlightConditionNonBlockingMessage = CurrentADC.PropValue("highlightConditionNonBlockingErrorMessage").ToLowerCase().Trim() | ||
| Dim classHighlight = On(highlightInput = "yes" And highlightConditionBlockingMessage = "true"," blocking_errormessage",On(highlightInput = "yes" And highlightConditionNonBlockingMessage = "true"," nonblocking_errormessage","")) | ||
| Dim placeholder = CurrentADC.PropValue("placeholder") | ||
| Dim safeInputValue = inputValue | ||
| Dim safeInputSearchValue = inputSearchValue | ||
| Dim safePlaceholder = placeholder | ||
|
|
||
|
|
||
|
|
||
| ' Escape for HTML attributes | ||
| safeInputValue = safeInputValue.Replace("&", "&").Replace("<", "<").Replace(">", ">") | ||
| safeInputSearchValue = safeInputSearchValue.Replace("&", "&").Replace("<", "<").Replace(">", ">") | ||
| safePlaceholder = safePlaceholder.Replace("&", "&").Replace("<", "<").Replace(">", ">") | ||
AbomDocPhibes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| %} | ||
|
|
||
| <script type="text/javascript"> | ||
| window.value = '{%= selectOnHover %}'; | ||
| </script> | ||
AbomDocPhibes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <input id="{%= inputId %}" | ||
| aria-label="{%= inputId %}" | ||
| class="autocomplete hiddens" | ||
| type="text" | ||
| autocomplete="off" | ||
| name="{%= inputName %}" | ||
| value="{%:= safeInputValue %}" /> | ||
| <br /> | ||
|
|
||
| <input id="adc_{%= CurrentADC.InstanceId %}_input" | ||
| aria-label="{%:= safePlaceholder %}" | ||
| class="autocomplete{%= classHighlight %}" | ||
| {%= autofocus %} | ||
| type="search" | ||
| autocomplete="off" | ||
| name="adc_{%= CurrentADC.InstanceId %}_input" | ||
| placeholder="{%:= safePlaceholder %}" | ||
| value="" /> | ||
|
|
||
| <span id="adc_{%= CurrentADC.InstanceId %}_text" style="display:none;">{%:= safeInputSearchValue %}</span> | ||
|
|
||
| <script type="text/javascript"> | ||
| window.value = '{%= selectOnHover %}'; | ||
| (function () { | ||
| var input = document.getElementById("adc_{%= CurrentADC.InstanceId %}_input"); | ||
| var text = document.getElementById("adc_{%= CurrentADC.InstanceId %}_text"); | ||
| if (input && text) { | ||
| input.value = text.textContent || text.innerText || ""; | ||
| } | ||
| })(); | ||
| </script> | ||
|
|
||
| <button class="close-icon" type="reset"></button> | ||
| <div class="nomatch"></div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.