Author: andrei_exadel
Date: 2009-03-25 13:53:03 -0400 (Wed, 25 Mar 2009)
New Revision: 13197
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
Log:
Fix image size slider
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java 2009-03-25
17:43:48 UTC (rev 13196)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ImageSizeHelper.java 2009-03-25
17:53:03 UTC (rev 13197)
@@ -26,16 +26,19 @@
final static String CSS_CLASS = "preview_box_photo_";
final static String FILE_POSTFIX = "_small";
final static String IMAGE_BG = "/img/shell/frame_photo_%1$d.png";
+ final static String IMAGE_BG_STYLE = "width: %1$dpx; height: %1$dpx";
int x;
+ String bgStyle;
String cssClass;
String imageBgSrc;
String filePostfix;
private ImageDimension(int x) {
this.x = x;
+ this.bgStyle = String.format(IMAGE_BG_STYLE, x + 20);
cssClass = CSS_CLASS + x;
- imageBgSrc = String.format(IMAGE_BG, x);
+ imageBgSrc = String.format(IMAGE_BG, (x == 160) ? 200 : x);
filePostfix = FILE_POSTFIX + x;
}
@@ -51,6 +54,10 @@
public String getImageBg() {
return imageBgSrc;
}
+
+ public String getImageBgStyle() {
+ return bgStyle;
+ }
public String getFilePostfix() {
return filePostfix;
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-03-25
17:43:48 UTC (rev 13196)
+++
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-03-25
17:53:03 UTC (rev 13197)
@@ -350,6 +350,14 @@
.preview_box_photo_160 div.photo_name {text-align : center; overflow : hidden; width :
180px; white-space : nowrap; margin-top : 3px; text-overflow: ellipsis; height : 14px;}
.preview_box_photo_160 div.photo_data {text-align : center; overflow : hidden; width :
180px; white-space : nowrap; text-overflow: ellipsis; color : #666666; font-size : 10px;
height : 14px}
+.preview_box_photo_200 {width : 220px; position : relative; float : left; margin : 0px
10px 10px 0px;}
+.preview_box_photo_200 img.pr_photo_bg {width : 220px; height : 220px; position :
absolute; border: 0px;}
+.preview_box_photo_200 table{position : relative; width : 220px; height : 220px;
text-align : center; vertical-align : middle; border-collapse : collapse;}
+.preview_box_photo_200 table img{margin: 0px 0px 0px 0px; border : 1px solid #FFFFFF;}
+.preview_box_photo_200 div.photo_name {text-align : center; overflow : hidden; width :
220px; white-space : nowrap; margin-top : 3px; text-overflow: ellipsis; height : 14px;}
+.preview_box_photo_200 div.photo_data {text-align : center; overflow : hidden; width :
220px; white-space : nowrap; text-overflow: ellipsis; color : #666666; font-size : 10px;
height : 14px}
+
+
.preview_box_photo_nav {width : 100px; height : 100px; position : relative; float : left;
margin : 0px 2px 0px 0px;}
.preview_box_photo_nav img.pr_photo_bg {width : 100px; height : 100px; position :
absolute; border: 0px;}
.preview_box_photo_nav table{position : relative; width : 100px; height : 100px;
text-align : center; vertical-align : middle; border-collapse : collapse;}