+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
-<head>\r
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />\r
- <meta http-equiv="Content-Language" content="en-us" />\r
- <title></title>\r
-</head>\r
-<body>\r
- <!--\r
- \r
- This is a static test file for the HTML & CSS structure employed, tested in \r
- the following browsers:\r
- \r
- PC:\r
- IE 6: working\r
- IE 5.5: working\r
- IE 5.0: opacity issues\r
- FF 1.5: working\r
- Opera 9: working\r
- MAC:\r
- Camino 1.0: working\r
- FF 1.5: working\r
- Safari 2.0: working\r
- \r
- --> \r
- <style type="text/css"> \r
- .imgCrop_wrap {\r
- width: 500px; /* @TODO IN JS */\r
- height: 333px; /* @TODO IN JS */\r
- position: relative;\r
- cursor: crosshair;\r
- }\r
- \r
- /* fix for IE displaying all boxes at line-height by default */\r
- .imgCrop_wrap,\r
- .imgCrop_wrap * {\r
- font-size: 0;\r
- }\r
- \r
- .imgCrop_overlay {\r
- background-color: #000;\r
- opacity: 0.5;\r
- filter:alpha(opacity=50);\r
- position: absolute;\r
- width: 100%;\r
- height: 100%;\r
- }\r
- \r
- .imgCrop_selArea {\r
- position: absolute;\r
- cursor: move;\r
- /* @TODO: rest to be done via JS when selecting areas */\r
- top: 110px;\r
- left: 210px;\r
- width: 200px;\r
- height: 200px;\r
- z-index: 2;\r
- background: transparent url(castle.jpg) no-repeat -210px -110px;\r
- }\r
- \r
- /* imgCrop_clickArea is all a fix for IE 5.5 & 6 to allow the user to click on the given area */\r
- .imgCrop_clickArea {\r
- width: 100%;\r
- height: 100%;\r
- background-color: #FFF;\r
- opacity: 0.01;\r
- filter:alpha(opacity=01);\r
- }\r
- \r
- .imgCrop_marqueeHoriz {\r
- position: absolute;\r
- width: 100%;\r
- height: 1px;\r
- background: transparent url(marqueeHoriz.gif) repeat-x 0 0;\r
- }\r
- \r
- .imgCrop_marqueeVert {\r
- position: absolute;\r
- height: 100%;\r
- width: 1px;\r
- background: transparent url(marqueeVert.gif) repeat-y 0 0;\r
- }\r
- \r
- .imgCrop_marqueeNorth { top: 0; left: 0; }\r
- .imgCrop_marqueeEast { top: 0; right: 0; }\r
- .imgCrop_marqueeSouth { bottom: 0px; left: 0; }\r
- .imgCrop_marqueeWest { top: 0; left: 0; }\r
- \r
- \r
- .imgCrop_handle {\r
- position: absolute;\r
- border: 1px solid #333;\r
- width: 6px;\r
- height: 6px;\r
- background: #FFF;\r
- opacity: 0.5;\r
- filter:alpha(opacity=50);\r
- z-index: 3;\r
- }\r
- \r
- .imgCrop_handleN {\r
- top: -3px;\r
- left: 0;\r
- margin-left: 49%; /* @TODO : in JS */\r
- cursor: n-resize;\r
- }\r
- \r
- .imgCrop_handleNE { \r
- top: -3px;\r
- right: -3px;\r
- cursor: ne-resize;\r
- }\r
- \r
- .imgCrop_handleE {\r
- top: 0;\r
- right: -3px;\r
- margin-top: 49%; /* @TODO : in JS */\r
- cursor: e-resize;\r
- }\r
- \r
- .imgCrop_handleSE {\r
- right: -3px;\r
- bottom: -3px;\r
- cursor: se-resize;\r
- }\r
- \r
- .imgCrop_handleS {\r
- right: 0;\r
- bottom: -3px;\r
- margin-right: 49%; /* @TODO : in JS */\r
- cursor: s-resize;\r
- }\r
- \r
- .imgCrop_handleSW {\r
- left: -3px;\r
- bottom: -3px;\r
- cursor: sw-resize;\r
- }\r
- \r
- .imgCrop_handleW {\r
- top: 0;\r
- left: -3px;\r
- margin-top: 49%; /* @TODO : in JS */\r
- cursor: e-resize;\r
- }\r
- \r
- .imgCrop_handleNW {\r
- top: -3px;\r
- left: -3px;\r
- cursor: nw-resize;\r
- }\r
- \r
- /**\r
- * Create an area to click & drag around on as the default browser behaviour is to let you drag the image \r
- */\r
- .imgCrop_dragArea {\r
- width: 100%;\r
- height: 100%;\r
- z-index: 200;\r
- position: absolute;\r
- top: 0;\r
- left: 0;\r
- }\r
- \r
- \r
- .imgCrop_previewWrap {\r
- width: 200px; /* @TODO : in JS */\r
- height: 200px; /* @TODO : in JS */\r
- overflow: hidden;\r
- position: relative;\r
- }\r
- \r
- /* @TODO : all in JS */\r
- .imgCrop_previewWrap img {\r
- position: absolute;\r
- width: 500px;\r
- height: 333px;\r
- left: -210px;\r
- top: -110px;\r
- }\r
- \r
- /**\r
- * These are just for the static test\r
- */\r
- .imgCrop_wrap {\r
- margin: 20px 0 0 50px;\r
- float: left;\r
- }\r
- \r
- #previewWrapper {\r
- float: left;\r
- margin-left: 20px;\r
- }\r
- \r
- \r
- </style>\r
- \r
- <br /><br />\r
- \r
- <!-- This is all attached to the image dynamically -->\r
- <div class="imgCrop_wrap">\r
- <img src="castle.jpg" alt="test image" id="testImage" width="500" height="333" />\r
- <div class="imgCrop_dragArea">\r
- <div class="imgCrop_overlay"></div>\r
- <div class="imgCrop_selArea">\r
- <!-- marquees -->\r
- <!-- the inner spans are only required for IE to stop it making the divs 1px high/wide -->\r
- <div class="imgCrop_marqueeHoriz imgCrop_marqueeNorth"><span></span></div>\r
- <div class="imgCrop_marqueeVert imgCrop_marqueeEast"><span></span></div>\r
- <div class="imgCrop_marqueeHoriz imgCrop_marqueeSouth"><span></span></div>\r
- <div class="imgCrop_marqueeVert imgCrop_marqueeWest"><span></span></div> \r
- <!-- handles -->\r
- <div class="imgCrop_handle imgCrop_handleN"></div>\r
- <div class="imgCrop_handle imgCrop_handleNE"></div>\r
- <div class="imgCrop_handle imgCrop_handleE"></div>\r
- <div class="imgCrop_handle imgCrop_handleSE"></div>\r
- <div class="imgCrop_handle imgCrop_handleS"></div>\r
- <div class="imgCrop_handle imgCrop_handleSW"></div>\r
- <div class="imgCrop_handle imgCrop_handleW"></div>\r
- <div class="imgCrop_handle imgCrop_handleNW"></div>\r
- <div class="imgCrop_clickArea"></div>\r
- </div> \r
- <div class="imgCrop_clickArea"></div> \r
- </div> \r
- </div>\r
- \r
- <div id="previewWrapper">\r
- <h3>Preview:</h3>\r
- <div class="imgCrop_previewWrap">\r
- <img src="castle.jpg" alt="test image" id="previewImage" />\r
- </div>\r
- </div>\r
-</body>\r
-</html>\r
-\r
-\r