You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2018/05/29 08:33:41 UTC
[royale-asjs] branch feature/revert-refactor updated: Enable
DropDown separators
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch feature/revert-refactor
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/feature/revert-refactor by this push:
new 9cd1765 Enable DropDown separators
9cd1765 is described below
commit 9cd1765ccfd7c270ea807d859151f5ee041787b2
Author: Harbs <ha...@in-tools.com>
AuthorDate: Tue May 29 11:33:28 2018 +0300
Enable DropDown separators
---
.../src/main/royale/org/apache/royale/html/DropDownList.as | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DropDownList.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DropDownList.as
index 77781e3..e4b49e8 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DropDownList.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/DropDownList.as
@@ -125,10 +125,16 @@ package org.apache.royale.html
n = value.length;
for (i = 0; i < n; i++) {
opt = document.createElement('option') as HTMLOptionElement;
- if (lf)
- opt.text = value[i][lf];
- else
- opt.text = value[i];
+ //TODO create DropDownListView for JS.
+ // We need a spearate view for dropdown list with and without separators.
+ var optionText:String = lf ? value[i][lf] : value[i];
+ if(!optionText || optionText.indexOf("-") == 0)
+ {
+ opt.disabled = true;
+ opt.text = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
+ } else {
+ opt.text = optionText;
+ }
dd.add(opt, null);
}
--
To stop receiving notification emails like this one, please contact
harbs@apache.org.