You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/02/24 05:41:52 UTC
[royale-asjs] 02/02: more work to try to get search indexing to work
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 07339fac5b1f1159828fa68499df0b41d332d8b8
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri Feb 23 21:41:33 2018 -0800
more work to try to get search indexing to work
---
.../src/main/resources/royale-index-template.html | 1 +
.../ASDoc/src/main/royale/ASDocMainView.mxml | 30 +++++++++++++++++++---
2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/examples/royale/ASDoc/src/main/resources/royale-index-template.html b/examples/royale/ASDoc/src/main/resources/royale-index-template.html
index d949120..db94b7b 100644
--- a/examples/royale/ASDoc/src/main/resources/royale-index-template.html
+++ b/examples/royale/ASDoc/src/main/resources/royale-index-template.html
@@ -20,6 +20,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Royale Website Template">
+ <meta name="Description" content="Apache Royale ActionScript Library Reference">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="ASDoc.css" />
diff --git a/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml b/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml
index 83d8630..5136378 100644
--- a/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml
+++ b/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml
@@ -33,10 +33,13 @@ limitations under the License.
import org.apache.royale.html.PopUpList;
import org.apache.royale.utils.PointUtils;
+ private var packagesReady:Boolean = false;
+
private function packagesReadyHandler(event:Event):void
{
+ packagesReady = true;
// wait until package data is ready before updating initial view to any anchor hash
- updateView();
+ hashChanged();
}
/**
@@ -80,7 +83,15 @@ limitations under the License.
private var findMember:String ;
- private function updateView():void
+ private function paramsReady():void
+ {
+ if (packagesReady)
+ updateView(efb.urlParameters);
+ else
+ clb.callLater(paramsReady);
+ }
+
+ private function hashChanged():void
{
if (popUpList)
{
@@ -93,6 +104,11 @@ limitations under the License.
hash = hash.substring(2);
if (hash.charAt(0) == "#")
hash = hash.substring(1);
+ updateView(hash);
+ }
+
+ private function updateView(hash:String):void
+ {
if (!hash)
currentState = "packages";
else
@@ -121,12 +137,17 @@ limitations under the License.
}
}
applicationModel.addEventListener("currentDataChanged", findMemberDetail);
- classList.selectedItem = cls;
+ classList.selectedItem = cls;
+ var title:String = cls;
+ if (pkg.length > 1)
+ title += " (" + pkg + ")";
+ router.title = title;
classChangedHandler();
}
else
{
packageList.selectedItem = hash;
+ router.title = hash;
packageChangedHandler();
}
}
@@ -375,7 +396,8 @@ limitations under the License.
<js:beads>
<js:ViewDataBinding />
<js:OneFlexibleChildVerticalLayoutForOverflow flexibleChild="topContainer" />
- <js:HashChangeNotifierBead id="router" hashChange="updateView()" />
+ <js:HashChangeNotifierBeadWithTitle id="router" hashChange="hashChanged()" />
+ <js:EscapedFragmentBead id="efb" ready="paramsReady()" />
<js:CallLaterBead id="clb" />
</js:beads>
<rs:DocTopBar />
--
To stop receiving notification emails like this one, please contact
aharui@apache.org.