myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1688681 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main: java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/scrip...
Date Wed, 01 Jul 2015 16:26:24 GMT
Author: lofwyr
Date: Wed Jul  1 16:26:24 2015
New Revision: 1688681

URL: http://svn.apache.org/r1688681
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap
- fix wait animation and error symbol
- using now glyphicons for that

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-overlay.js
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java?rev=1688681&r1=1688680&r2=1688681&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
Wed Jul  1 16:26:24 2015
@@ -491,29 +491,6 @@ public class PageRenderer extends PageRe
 
     writer.endElement(HtmlElements.FORM);
 
-    // The waiting for the next page image
-    // Warning: The image must be loaded before the submit, otherwise this feature will not
work with webkit
-    // browsers. This is the reason, why this code has moved from JavaScript to the renderer
here.
-    writer.startElement(HtmlElements.IMG, null);
-    writer.writeClassAttribute(Classes.create(page, "overlayWaitPreloadedImage"));
-    final String wait = ResourceManagerUtils.getImage(facesContext, "image/tobago-overlay-wait");
-    writer.writeAttribute(HtmlAttributes.SRC, wait, true);
-    writer.endElement(HtmlElements.IMG);
-
-    writer.startElement(HtmlElements.IMG, null);
-    writer.writeClassAttribute(Classes.create(page, "overlayErrorPreloadedImage"));
-    final String error = clientProperties.getUserAgent().isMsie6()
-        ? ResourceManagerUtils.getImage(facesContext, "image/remove") // XXX why png doesn't
work in ie6?
-        : ResourceManagerUtils.getImage(facesContext, "image/dialog-error");
-    writer.writeAttribute(HtmlAttributes.SRC, error, true);
-    writer.endElement(HtmlElements.IMG);
-
-    writer.startElement(HtmlElements.IMG, null);
-    writer.writeClassAttribute(Classes.create(page, "pngFixBlankImage"));
-    final String pngFixBlankImage = ResourceManagerUtils.getImage(facesContext, "image/blank");
-    writer.writeAttribute(HtmlAttributes.SRC, pngFixBlankImage, true);
-    writer.endElement(HtmlElements.IMG);
-
     writer.startElement(HtmlElements.IMG, null);
     writer.writeClassAttribute(Classes.create(page, "overlayBackgroundImage"));
     final String overlayBackgroundImage = ResourceManagerUtils.getImage(facesContext,

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-overlay.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-overlay.js?rev=1688681&r1=1688680&r2=1688681&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-overlay.js
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-overlay.js
Wed Jul  1 16:26:24 2015
@@ -65,6 +65,9 @@ Tobago.Config.set("Ajax", "waitOverlayDe
         this.overlay.outerWidth(this.element.outerWidth());
         this.overlay.outerHeight(this.element.outerHeight());
         this.overlay.offset(this.element.offset());
+        this.overlay.css({
+          position: "absolute" // XXX is set via class, but seams to be overridden in IE11?
+        });
       }
 
       jQuery("body").append(this.overlay);
@@ -72,29 +75,25 @@ Tobago.Config.set("Ajax", "waitOverlayDe
       var wait = jQuery("<div>").addClass("tobago-page-overlayCenter");
       this.overlay.append(wait);
 
-      var image = jQuery(this.options.error
-          ? "body>.tobago-page-overlayErrorPreloadedImage"
-          : "body>.tobago-page-overlayWaitPreloadedImage");
-
-      // in case of AJAX, we may need more of these objects, on the other side, on an normal
submit
-      // the animation stops, if we use the clone (don't know why, seems to be needed only
in WebKit)
-      if (this.options.ajax) {
-        image = image.clone();
+      var image = jQuery("<span>").css({fontSize: "xx-large"});
+      if (this.options.error) {
+        image.addClass("glyphicon glyphicon-flash").css({color: "#ff0000"});
+      } else {
+        image.addClass("glyphicon glyphicon-refresh tobago-x-spinning").css({opacity: 0.4});
       }
-
-      image.appendTo(wait);
-      image.removeClass(this.options.error
-          ? "tobago-page-overlayErrorPreloadedImage"
-          : "tobago-page-overlayWaitPreloadedImage");
+      wait.append(image);
       wait.show();
 
       var waitOverlayDelay = this.options.waitOverlayDelay
           ? this.options.waitOverlayDelay
           : Tobago.Config.get(this.options.ajax ? "Ajax" : "Tobago", "waitOverlayDelay");
 
+      if (Tobago.browser.isMsie678) {
+        this.overlay.css({filter: 'alpha(opacity=80)'});
+      }
+
       this.overlay.css({
         backgroundColor: jQuery('.tobago-page').css("background-color"),
-        filter: 'alpha(opacity=80)', //IE
         opacity: 0})
           .show()
           .delay(this.options.error ? 0 : waitOverlayDelay)

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1688681&r1=1688680&r2=1688681&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Wed Jul  1 16:26:24 2015
@@ -994,10 +994,10 @@ var Tobago = {
         var page = jQuery(".tobago-page");
         page.attr("title", "This application can't be used embedded inside an other site
" +
         "(configuration: prevent-frame-attacks=true)!");
-        var image = jQuery("body>.tobago-page-overlayErrorPreloadedImage").clone();
-        image.appendTo(page);
-        image.removeClass("tobago-page-overlayErrorPreloadedImage");
-        image.css({margin: "20px"});
+        jQuery("<span>")
+            .addClass("glyphicon glyphicon-flash")
+            .css({color: "#ff0000", fontSize: "xx-large", margin: "20px"})
+            .appendTo(page);
       }
     }
   },

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1688681&r1=1688680&r2=1688681&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
Wed Jul  1 16:26:24 2015
@@ -140,9 +140,6 @@ body > form > .navbar-fixed-top + * {
   position: relative;
 }
 
-.tobago-page-overlayWaitPreloadedImage,
-.tobago-page-overlayErrorPreloadedImage,
-.tobago-page-pngFixBlankImage,
 .tobago-page-overlayBackgroundImage {
   display: none;
 }
@@ -325,3 +322,18 @@ fixes missing space, I thinks normal Web
   display: none;
 }
 
+
+.glyphicon.tobago-x-spinning {
+  animation: tobago-x-spinning 1s infinite linear;
+  -webkit-animation: tobago-x-spinning_webkit 1s infinite linear;
+}
+
+@keyframes tobago-x-spinning {
+  from { transform: rotate(0deg);}
+  to { transform: rotate(360deg);}
+}
+
+@-webkit-keyframes tobago-x-spinning_webkit {
+  from { -webkit-transform: rotate(0deg);}
+  to { -webkit-transform: rotate(360deg);}
+}



Mime
View raw message