You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/07/17 13:42:04 UTC

[1/2] isis git commit: ISIS-1652: hides the

Repository: isis
Updated Branches:
  refs/heads/master 207d21ebc -> c3cc2db64


ISIS-1652: hides the <ul> container for AdditionalLinkListInline if all contained items are themselves not visible


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/825561e0
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/825561e0
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/825561e0

Branch: refs/heads/master
Commit: 825561e04ed7de05806e46e574cc1d5554c866d9
Parents: 207d21e
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jul 17 14:38:02 2017 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jul 17 14:38:02 2017 +0100

----------------------------------------------------------------------
 .../entityactions/AdditionalLinksPanel.java     | 43 ++++++++++++--------
 1 file changed, 26 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/825561e0/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksPanel.java
index 4804bbd..8e4248c 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksPanel.java
@@ -90,7 +90,18 @@ public class AdditionalLinksPanel extends PanelAbstract<ListOfLinksModel> {
 
         final List<LinkAndLabel> linkAndLabels = getModel().getObject();
 
-        final WebMarkupContainer container = new WebMarkupContainer(ID_ADDITIONAL_LINK_LIST);
+        final WebMarkupContainer container = new WebMarkupContainer(ID_ADDITIONAL_LINK_LIST) {
+            @Override
+            public boolean isVisible() {
+                for (LinkAndLabel linkAndLabel : links) {
+                    final AbstractLink link = linkAndLabel.getLink();
+                    if(link.isVisible()) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+        };
         addOrReplace(container);
 
         container.setOutputMarkupId(true);
@@ -106,22 +117,19 @@ public class AdditionalLinksPanel extends PanelAbstract<ListOfLinksModel> {
                 final LinkAndLabel linkAndLabel = item.getModelObject();
 
                 final AbstractLink link = linkAndLabel.getLink();
-                if(link instanceof ActionLink) {
-                    final ActionLink actionLink = (ActionLink) link;
-
-                    item.add(new AttributeModifier("title",  new Model<String>() {
-                        @Override
-                        public String getObject() {
-                            final String reasonDisabledIfAny = actionLink.getReasonDisabledIfAny();
-                            return first(reasonDisabledIfAny, linkAndLabel.getDescriptionIfAny());
-                        }
-                    }));
-
-                } else {
-                    item.add(new AttributeModifier("title",
-                            first(linkAndLabel.getReasonDisabledIfAny(), linkAndLabel.getDescriptionIfAny())));
-                }
-
+                final AttributeModifier attributeModifier = link instanceof ActionLink
+                        ? new AttributeModifier("title", new Model<String>() {
+                            @Override
+                            public String getObject() {
+                                final ActionLink actionLink = (ActionLink) link;
+                                final String reasonDisabledIfAny = actionLink.getReasonDisabledIfAny();
+                                return first(reasonDisabledIfAny, linkAndLabel.getDescriptionIfAny());
+                            }
+                        })
+                        : new AttributeModifier("title",
+                        first(linkAndLabel.getReasonDisabledIfAny(), linkAndLabel.getDescriptionIfAny()));
+
+                item.add(attributeModifier);
 
                 // ISIS-1615, prevent bootstrap from changing the HTML link's 'title' attribute on client-side;
                 // bootstrap will not touch the 'title' attribute once the HTML link has a 'data-original-title' attribute
@@ -159,6 +167,7 @@ public class AdditionalLinksPanel extends PanelAbstract<ListOfLinksModel> {
                 item.addOrReplace(link);
             }
         };
+
         container.addOrReplace(listView);
     }
 


[2/2] isis git commit: ISIS-1647: reverts the use of fade-in for modal dialogs (because breaks the javascript to automatically put the focus on the first parameter of the dialog)

Posted by da...@apache.org.
ISIS-1647: reverts the use of fade-in for modal dialogs (because breaks the javascript to automatically put the focus on the first parameter of the dialog)


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/c3cc2db6
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/c3cc2db6
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/c3cc2db6

Branch: refs/heads/master
Commit: c3cc2db64ac40641f10f877f04e3bc645f69dce0
Parents: 825561e
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jul 17 14:38:46 2017 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jul 17 14:38:46 2017 +0100

----------------------------------------------------------------------
 .../viewer/wicket/ui/components/widgets/bootstrap/ModalDialog.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c3cc2db6/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/bootstrap/ModalDialog.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/bootstrap/ModalDialog.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/bootstrap/ModalDialog.java
index 4204bd3..f3a5e07 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/bootstrap/ModalDialog.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/bootstrap/ModalDialog.java
@@ -41,7 +41,7 @@ public class ModalDialog<T> extends Modal<T> implements ActionPrompt {
     public ModalDialog(String id, IModel<T> model) {
         super(id, model);
 
-        setFadeIn(true);
+        setFadeIn(false);
         setUseKeyboard(true);
         setDisableEnforceFocus(true);
         setOutputMarkupPlaceholderTag(true);