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 2014/09/12 14:23:13 UTC

[1/4] git commit: fixed broken link

Repository: isis
Updated Branches:
  refs/heads/master 0b52e7ae6 -> fb62c47fe


fixed broken link

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

Branch: refs/heads/master
Commit: 5337c5d35b05da9445fcd73ffc9ce06d7842d22c
Parents: 5e181df
Author: Michal Bernhard <mi...@bernhard.cz>
Authored: Tue Dec 3 11:26:56 2013 +0100
Committer: Michal Bernhard <mi...@bernhard.cz>
Committed: Tue Dec 3 11:26:56 2013 +0100

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/5337c5d3/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index f9fc8a5..e114177 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ Integration of maps on the object page:
 
 #### Wicked Charts integration
 
-An action that returns a [WickedChart](wicked-charts.googlecode.com).
+An action that returns a [WickedChart](http://wicked-charts.googlecode.com).
 
 ![](https://raw.github.com/danhaywood/isis-wicket-wickedcharts/master/images/screenshot-2.png)
 


[4/4] git commit: ISIS-794: upgraded to Wicket 6.17.0, removed CharSequenceResource and using Wicket's equivalent instead.

Posted by da...@apache.org.
ISIS-794: upgraded to Wicket 6.17.0, removed CharSequenceResource and using Wicket's equivalent instead.


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

Branch: refs/heads/master
Commit: fb62c47fe775ce7a7c152c3e85cbe97912297757
Parents: c1c0d53
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Sep 12 13:18:45 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Sep 12 13:18:45 2014 +0100

----------------------------------------------------------------------
 component/viewer/wicket/pom.xml                 |   6 +-
 .../isisapplib/CharSequenceResource.java        | 120 -------------------
 .../scalars/isisapplib/IsisClobPanel.java       |   4 +-
 3 files changed, 4 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/fb62c47f/component/viewer/wicket/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/pom.xml b/component/viewer/wicket/pom.xml
index f4a1e3f..3cfdb5e 100644
--- a/component/viewer/wicket/pom.xml
+++ b/component/viewer/wicket/pom.xml
@@ -40,9 +40,9 @@
         <siteBaseDir>.</siteBaseDir>
         <relativeUrl />
 
-        <wicket.version>6.15.0</wicket.version>
-        <wicket-jquery-ui.version>6.15.0</wicket-jquery-ui.version>
-        <wicketstuff.version>6.15.0</wicketstuff.version>
+        <wicket.version>6.17.0</wicket.version>
+        <wicket-jquery-ui.version>6.17.0</wicket-jquery-ui.version>
+        <wicketstuff.version>6.17.0</wicketstuff.version>
 
         <wicket-webjars.version>0.4.1</wicket-webjars.version>
         <webjars-bootstrap.version>2.3.2</webjars-bootstrap.version>

http://git-wip-us.apache.org/repos/asf/isis/blob/fb62c47f/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/CharSequenceResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/CharSequenceResource.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/CharSequenceResource.java
deleted file mode 100644
index 36cd077..0000000
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/CharSequenceResource.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.isis.viewer.wicket.ui.components.scalars.isisapplib;
-
-import java.net.URLConnection;
-import org.apache.wicket.request.resource.AbstractResource;
-import org.apache.wicket.request.resource.ContentDisposition;
-import org.apache.wicket.util.time.Time;
-
-/**
- * Adapted from {@link org.apache.wicket.request.resource.ByteArrayResource}
- */
-public class CharSequenceResource extends AbstractResource {
-    private static final long serialVersionUID = 1L;
-
-    /** the content type. */
-    private final String contentType;
-
-    private CharSequence chars;
-
-    /** the time that this resource was last modified; same as construction time. */
-    private final Time lastModified = Time.now();
-
-    private final String filename;
-
-    public CharSequenceResource(final String contentType, final CharSequence chars, final String filename)
-    {
-        this.contentType = contentType;
-        this.chars = chars;
-        this.filename = filename;
-    }
-
-    protected void configureResponse(final ResourceResponse response, final Attributes attributes)
-    {
-    }
-
-    /**
-     * @see org.apache.wicket.request.resource.AbstractResource#newResourceResponse(org.apache.wicket.request.resource.IResource.Attributes)
-     */
-    @Override
-    protected ResourceResponse newResourceResponse(final Attributes attributes)
-    {
-        final ResourceResponse response = new ResourceResponse();
-
-        String contentType = this.contentType;
-
-        if (contentType == null)
-        {
-            if (filename != null)
-            {
-                contentType = URLConnection.getFileNameMap().getContentTypeFor(filename);
-            }
-
-            if (contentType == null)
-            {
-                contentType = "application/octet-stream";
-            }
-        }
-
-
-        response.setContentType(contentType);
-        response.setLastModified(lastModified);
-
-        final CharSequence data = getData(attributes);
-        if (data == null)
-        {
-            response.setError(404 /* HttpServletResponse.SC_NOT_FOUND */);
-        }
-        else
-        {
-            response.setContentLength(data.length());
-
-            if (response.dataNeedsToBeWritten(attributes))
-            {
-                if (filename != null)
-                {
-                    response.setFileName(filename);
-                    response.setContentDisposition(ContentDisposition.ATTACHMENT);
-                }
-                else
-                {
-                    response.setContentDisposition(ContentDisposition.INLINE);
-                }
-
-                response.setWriteCallback(new WriteCallback()
-                {
-                    @Override
-                    public void writeData(final Attributes attributes)
-                    {
-                        //attributes.getResponse().write(data);
-                        attributes.getResponse().write(data);
-                    }
-                });
-
-                configureResponse(response, attributes);
-            }
-        }
-
-        return response;
-    }
-
-    protected CharSequence getData(final Attributes attributes)
-    {
-        return chars;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb62c47f/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisClobPanel.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisClobPanel.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisClobPanel.java
index 546fda3..ec551de 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisClobPanel.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisClobPanel.java
@@ -22,12 +22,10 @@ package org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib;
 
 import java.nio.charset.Charset;
 import java.util.List;
-
 import com.google.common.base.Charsets;
-
 import org.apache.wicket.markup.html.form.upload.FileUpload;
+import org.apache.wicket.request.resource.CharSequenceResource;
 import org.apache.wicket.request.resource.IResource;
-
 import org.apache.isis.applib.value.Clob;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 


[3/4] git commit: ISIS-872: Merge remote-tracking branch 'michalbcz/master'

Posted by da...@apache.org.
ISIS-872: Merge remote-tracking branch 'michalbcz/master'

* michalbcz/master:
  fixed broken link

Conflicts:
	README.md


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

Branch: refs/heads/master
Commit: c1c0d534b95d9d1dbe3b2aa87d59ffbf9bb61df4
Parents: df84145 5337c5d
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Sep 12 13:03:05 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Sep 12 13:03:05 2014 +0100

----------------------------------------------------------------------
 README.md | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c1c0d534/README.md
----------------------------------------------------------------------
diff --cc README.md
index 1ae852b,e114177..15c0bb0
--- a/README.md
+++ b/README.md
@@@ -77,16 -49,7 +77,19 @@@ The downloaded file can be opened in Ex
  
  #### Wicked Charts integration
  
 -An action that returns a [WickedChart](http://wicked-charts.googlecode.com).
 +Summary chart for a collection with `BigDecimal` properties:
 +
 +<img src="https://raw.github.com/danhaywood/isis-wicket-wickedcharts/master/images/summarychart-tab.png" style="width: 900px;"/>
 +
 +... renders the returned chart with associated summary data:
 +
 +<img src="https://raw.github.com/danhaywood/isis-wicket-wickedcharts/master/images/summarychart.png" style="width: 900px;"/>
 +
 +
 +Scalar chart, being the result of an action to analyze `ToDoItem`s by their category:
 +
 +<img src="https://raw.github.com/danhaywood/isis-wicket-wickedcharts/master/images/piechart.png" style="width: 900px;"/>
  
 -![](https://raw.github.com/danhaywood/isis-wicket-wickedcharts/master/images/screenshot-2.png)
++A scalar chart is simply a wrapper around a [WickedChart](http://wicked-charts.googlecode.com).
++s
+ 


[2/4] git commit: ISIS-889: tweaked the javascript to adjust margin.

Posted by da...@apache.org.
ISIS-889: tweaked the javascript to adjust margin.

The action prompt dialog is *meant to* be sized through our call to Wicket.Window.get().autoSizeWindow().  However, it seems not to size correctly on Chrome.  I noticed though that manually adjusting the margin on one of the aciton panel's container element down by a pixel sorted out the issue.

So this is pretty hacky, but I've added in a patch to the javascript that calls ww.autoSizeWindow(), to manually change the CSS by 1 pixel.  Seems to do the job, and unnoticeable on Firefox.


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

Branch: refs/heads/master
Commit: df841459e777927ea0676429e6896f7bbb55089e
Parents: 0b52e7a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Sep 12 12:51:42 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Sep 12 12:51:42 2014 +0100

----------------------------------------------------------------------
 .../actionprompt/ActionPromptModalWindow.java        | 13 +++++++++----
 .../actions/ActionParametersFormPanel.java           | 15 ++++++++++++---
 .../widgets/zclip/SimpleClipboardModalWindow.java    | 12 +++++-------
 3 files changed, 26 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/df841459/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
index 746a7a6..742ece6 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
@@ -106,10 +106,15 @@ public class ActionPromptModalWindow extends ModalWindow implements ActionPrompt
         StringBuilder builder = new StringBuilder();
 
         // ISIS-771, WICKET-5101
-        builder.append("window.setTimeout("
-                + "function() {\n "
-                + "var ww = Wicket.Window.get();\n ww.autoSizeWindow();\n "
-                + "}\n, 0);\n");
+        builder.append(
+                "window.setTimeout(" +
+                "function() {\n " +
+                "  var ww = Wicket.Window.get();\n " +
+                "  ww.autoSizeWindow();\n " +
+                // this is a nasty hack to make dialog appear without scrollbars on Chrome (noticed in version 37.0.2062.120 m)
+                // really though this ought to be fixed in Wicket.Window.get().autoSizeWindow();
+                "  $('.actionPanel .myBlockContainer').css('margin', '19px');\n " +
+                "}\n, 0);\n");
         
         target.appendJavaScript(builder.toString());
 

http://git-wip-us.apache.org/repos/asf/isis/blob/df841459/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
index 1c2c5dc..529fa1a 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
@@ -180,9 +180,18 @@ public class ActionParametersFormPanel extends PanelAbstract<ActionModel> {
                     super.onError(target, form);
                     if(actionPromptIfAny != null) {
                         // resize, to show any feedback messages.
-                        
-                        // ISIS-771: in Wicket 6.12.0 the var ww returns null.
-                        target.appendJavaScript("var ww = Wicket.Window.get();\n ww.autoSizeWindow();");
+
+                        target.appendJavaScript(
+                                "window.setTimeout(" +
+                                        "function() {\n " +
+                                        "  var ww = Wicket.Window.get();\n " +
+                                        "  ww.autoSizeWindow();\n " +
+                                        // the hack that works for initial rendering of dialog on Chrome
+                                        // (to manually adjust the margin) doesn't seem to work if there's an error
+                                        // so have chosen just to leave things as the are
+                                        // (really, the issue is with Wicket.Window.get().autoSizeWindow() anyway...)
+                                        "}\n, 0);\n"
+                        );
                     }
                     target.add(form);
                 }

http://git-wip-us.apache.org/repos/asf/isis/blob/df841459/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/zclip/SimpleClipboardModalWindow.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/zclip/SimpleClipboardModalWindow.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/zclip/SimpleClipboardModalWindow.java
index 630dde1..a7d0d7b 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/zclip/SimpleClipboardModalWindow.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/zclip/SimpleClipboardModalWindow.java
@@ -22,9 +22,6 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.models.ActionPrompt;
 
 public class SimpleClipboardModalWindow extends ModalWindow implements ActionPrompt {
@@ -103,10 +100,11 @@ public class SimpleClipboardModalWindow extends ModalWindow implements ActionPro
         builder.append("$('.first-field input').focus();\n");
         
         // ISIS-771: in Wicket 6.12.0 the var ww returns null.
-        builder.append("window.setTimeout("
-                + "function() {\n "
-                + "var ww = Wicket.Window.get();\n ww.autoSizeWindow();\n "
-                + "}\n, 0);\n");
+        builder.append("window.setTimeout(" +
+                            "function() {\n " +
+                            "  var ww = Wicket.Window.get();\n" +
+                            "  ww.autoSizeWindow();\n " +
+                            "}\n, 0);\n");
 
         target.appendJavaScript(builder.toString());
     }