This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 65cb83e -Add NoViewport when need a Container without Viewport
(WizardPage) -Improve scrolling in Wizard to show scrollbars at content level,
nor in inner content (unless required) -Improve wizard example with Page 5
showing a large lorem ipsum text that scrolls
65cb83e is described below
commit 65cb83e4f0e791ff58f4793a7bf1940125789da7
Author: Carlos Rovira <[email protected]>
AuthorDate: Tue Mar 12 00:38:19 2019 +0100
-Add NoViewport when need a Container without Viewport (WizardPage)
-Improve scrolling in Wizard to show scrollbars at content level, nor in
inner content (unless required)
-Improve wizard example with Page 5 showing a large lorem ipsum text that
scrolls
---
.../src/main/royale/WizardPlayGround.mxml | 28 +++++++---
.../projects/Jewel/src/main/resources/defaults.css | 6 +-
.../projects/Jewel/src/main/royale/JewelClasses.as | 1 +
.../royale/org/apache/royale/jewel/WizardPage.as | 2 +-
.../royale/jewel/supportClasses/NoViewport.as | 65 ++++++++++++++++++++++
.../Jewel/src/main/sass/components/_wizard.sass | 5 +-
6 files changed, 97 insertions(+), 10 deletions(-)
diff --git a/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml
b/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml
index 13f6179..c1be59e 100644
--- a/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/WizardPlayGround.mxml
@@ -66,8 +66,13 @@ limitations under the License.
<j:WizardStep name="page1"
nextStep="page2" initialPage="true" stepLabel="Page 1"/>
</views:step>
- <c:FormExample localId="formaExample"
label="Form Example in Page 1"/>
+ <j:Group>
+ <j:beads>
+ <j:VerticalCenteredLayout
gap="9"/>
+ </j:beads>
+ <c:FormExample localId="formaExample"
label="Form Example in Page 1"/>
+ </j:Group>
</j:WizardPage>
<j:WizardPage name="page2">
@@ -120,12 +125,21 @@ limitations under the License.
<j:WizardStep name="page5"
previousStep="page4" stepLabel="Page 5"/>
</views:step>
- <j:Group>
- <j:beads>
- <j:VerticalCenteredLayout
gap="9"/>
- </j:beads>
- <html:H1 text="Page 5"/>
- </j:Group>
+ <j:Grid>
+ <j:GridCell desktopNumerator="1"
desktopDenominator="1"
+
tabletNumerator="1" tabletDenominator="1"
+
phoneNumerator="1" phoneDenominator="1">
+
+ <html:H1 text="Page 5 (With
Scroll)"/>
+ <j:Label multiline="true"
width="450" html="Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Mauris finibus blandit risus sed elementum. Nulla consectetur vestibulum
fringilla. Pellentesque id facilisis tortor. Fusce neque velit, placerat sit
amet nibh at, interdum fringilla lectus. Pellentesque eget porta nulla. Aenean
eu nisi eros. Sed consequat convallis neque vel iaculis. Aliquam ut varius
nunc. Fusce sit amet mattis nisl. Nunc nibh diam, dictum sit amet lacus nec,
moll [...]
+
+ Donec tincidunt sit amet nisl ut varius. Sed varius massa augue, in
convallis risus cursus ac. Donec accumsan lobortis tortor, quis mollis velit
mollis nec. Cras placerat ullamcorper tellus. Suspendisse potenti. Aenean sed
ipsum augue. Phasellus ullamcorper maximus urna, imperdiet facilisis risus
ornare eget. Praesent imperdiet posuere nisl ut efficitur. Sed pharetra est eu
lacus volutpat, nec congue urna sodales.
+
+ Maecenas et convallis nisi, vel lobortis ex. Aliquam scelerisque
interdum libero quis elementum. Nunc vitae auctor nunc, a lacinia sem. Duis ut
posuere erat, at finibus tortor. Pellentesque in nisl in tellus rhoncus
accumsan non eu nulla. In gravida imperdiet nibh, eget tincidunt lacus
convallis id. Maecenas vel eleifend nunc. Quisque mattis turpis sed turpis
sagittis fringilla. Donec cursus tempus tellus eu sodales. Pellentesque et
tortor at nisl aliquet placerat. Nulla facilisi. Nunc [...]
+
+ Nam massa ante, hendrerit quis sodales eu, auctor eu quam. Quisque
ullamcorper vitae est non volutpat. Proin porta metus in purus pharetra, vel
lobortis massa efficitur. Proin consequat metus sit amet ipsum consectetur,
vitae mollis neque imperdiet. Maecenas condimentum, nulla vel placerat
interdum, eros neque mollis dui, non cursus orci turpis eget ipsum. Nulla non
velit at velit laoreet finibus. Pellentesque non consequat sapien. Cras et
porttitor lectus. Aliquam ultricies rhoncus sem [...]
+ </j:GridCell>
+ </j:Grid>
</j:WizardPage>
</j:Wizard>
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css
b/frameworks/projects/Jewel/src/main/resources/defaults.css
index e21e342..ae5a815 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -3902,10 +3902,14 @@ j|Wizard {
IWizardContentArea: ClassReference("org.apache.royale.jewel.WizardContent");
}
+j|WizardPage {
+ IViewport:
ClassReference("org.apache.royale.jewel.supportClasses.NoViewport");
+}
+
j|WizardContent {
IBeadView: ClassReference("org.apache.royale.html.beads.ContainerView");
IBeadLayout:
ClassReference("org.apache.royale.jewel.beads.layouts.NullLayout");
- IViewport: ClassReference("org.apache.royale.jewel.supportClasses.Viewport");
+ IViewport:
ClassReference("org.apache.royale.jewel.supportClasses.scrollbar.ScrollingViewport");
IViewportModel:
ClassReference("org.apache.royale.html.beads.models.ViewportModel");
}
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index 99cb5ed..e9a0233 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -99,6 +99,7 @@ package
import org.apache.royale.jewel.supportClasses.textinput.ITextInput;
ITextInput;
import org.apache.royale.jewel.supportClasses.Viewport; Viewport;
+ import org.apache.royale.jewel.supportClasses.NoViewport; NoViewport;
import
org.apache.royale.jewel.supportClasses.scrollbar.ScrollingViewport;
ScrollingViewport;
import org.apache.royale.jewel.supportClasses.datagrid.DataGridColumn;
DataGridColumn;
import
org.apache.royale.jewel.supportClasses.datechooser.DateChooserTable;
DateChooserTable;
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardPage.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardPage.as
index 21dd736..ac40c69 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardPage.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardPage.as
@@ -47,7 +47,7 @@ package org.apache.royale.jewel
/**
* WizardPage is the main class for a page inside the WizardContent
*/
- public class WizardPage extends ScrollableSectionContent
+ public class WizardPage extends SectionContent
{
/**
* constructor.
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/NoViewport.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/NoViewport.as
new file mode 100644
index 0000000..2fec150
--- /dev/null
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/NoViewport.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.jewel.supportClasses
+{
+ import org.apache.royale.core.IContentView;
+ import org.apache.royale.core.IStrand;
+ import org.apache.royale.core.UIBase;
+ import org.apache.royale.html.supportClasses.Viewport;
+ import org.apache.royale.utils.loadBeadFromValuesManager;
+
+ /**
+ * NoViewport is set when we need to avoid default Viewport in Container
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.6
+ */
+ public class NoViewport extends
org.apache.royale.html.supportClasses.Viewport
+ {
+ /**
+ * Constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9.3
+ */
+ public function NoViewport()
+ {
+ super();
+ }
+
+ /**
+ * @royaleignorecoercion Class
+ * @royaleignorecoercion org.apache.royale.core.UIBase
+ */
+ COMPILE::JS
+ override public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ contentArea = loadBeadFromValuesManager(IContentView,
"iContentView", _strand) as UIBase;
+
+ if (!contentArea)
+ contentArea = value as UIBase;
+ }
+ }
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_wizard.sass
b/frameworks/projects/Jewel/src/main/sass/components/_wizard.sass
index 61ad735..b6260a2 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_wizard.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_wizard.sass
@@ -55,6 +55,9 @@ j|Wizard
IBeadModel:
ClassReference("org.apache.royale.jewel.beads.models.WizardModel")
IWizardContentArea: ClassReference("org.apache.royale.jewel.WizardContent")
+j|WizardPage
+ IViewport:
ClassReference("org.apache.royale.jewel.supportClasses.NoViewport")
+
// j|WizardNavigator
// IBeadView:
ClassReference("org.apache.royale.jewel.beads.views.ListView")
// IBeadController:
ClassReference("org.apache.royale.jewel.beads.controllers.ListSingleSelectionMouseController")
@@ -83,5 +86,5 @@ j|Wizard
j|WizardContent
IBeadView: ClassReference("org.apache.royale.html.beads.ContainerView")
IBeadLayout:
ClassReference("org.apache.royale.jewel.beads.layouts.NullLayout")
- IViewport:
ClassReference("org.apache.royale.jewel.supportClasses.Viewport")
+ IViewport:
ClassReference("org.apache.royale.jewel.supportClasses.scrollbar.ScrollingViewport")
IViewportModel:
ClassReference("org.apache.royale.html.beads.models.ViewportModel")