]> git.mxchange.org Git - friendica.git/blob - library/cropper/tests/example-CSS-Float.htm
added index to config and pconfig table
[friendica.git] / library / cropper / tests / example-CSS-Float.htm
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
3 <head>\r
4         <meta http-equiv="Content-type" content="text/html; charset=utf-8" />\r
5         <meta http-equiv="Content-Language" content="en-us" />\r
6         <title>CSS - Float test</title>\r
7         <script src="../lib/prototype.js" type="text/javascript"></script>      \r
8         <script src="../lib/scriptaculous.js?load=builder,dragdrop" type="text/javascript"></script>\r
9         <script src="../cropper.js" type="text/javascript"></script>\r
10         \r
11         \r
12         <script type="text/javascript" charset="utf-8">\r
13                 \r
14                 // setup the callback function\r
15                 function onEndCrop( coords, dimensions ) {\r
16                         $( 'x1' ).value = coords.x1;\r
17                         $( 'y1' ).value = coords.y1;\r
18                         $( 'x2' ).value = coords.x2;\r
19                         $( 'y2' ).value = coords.y2;\r
20                         $( 'width' ).value = dimensions.width;\r
21                         $( 'height' ).value = dimensions.height;\r
22                 }\r
23                 \r
24                 // float example\r
25                 Event.observe(\r
26                         window,\r
27                         'load',\r
28                         function() {\r
29                                 new Cropper.Img(\r
30                                         'testFloatImage',\r
31                                         { \r
32                                                 onEndCrop: function( coords, dimensions ) {\r
33                                                         $( 'floatX1' ).value = coords.x1;\r
34                                                         $( 'floatY1' ).value = coords.y1;\r
35                                                         $( 'floatX2' ).value = coords.x2;\r
36                                                         $( 'floatY2' ).value = coords.y2;\r
37                                                         $( 'floatWidth' ).value = dimensions.width;\r
38                                                         $( 'floatHeight' ).value = dimensions.height;\r
39                                                 }\r
40                                         }\r
41                                 );\r
42                         }\r
43                 );              \r
44                 \r
45                 if( typeof(dump) != 'function' ) {\r
46                         Debug.init(true, '/');\r
47                         \r
48                         function dump( msg ) {\r
49                                 Debug.raise( msg );\r
50                         };\r
51                 } else dump( '---------------------------------------\n' );\r
52                 \r
53                 \r
54         </script>\r
55         <link rel="stylesheet" type="text/css" href="debug.css" media="all" />\r
56         <style type="text/css">\r
57                 label { \r
58                         clear: left;\r
59                         margin-left: 50px;\r
60                         float: left;\r
61                         width: 5em;\r
62                 }\r
63                 \r
64                 html, body { \r
65                         margin: 0;\r
66                 }\r
67                 \r
68                 #testWrap {\r
69                         margin: 20px 0 0 50px; /* Just while testing, to make sure we return the correct positions for the image & not the window */\r
70                 }\r
71                 \r
72                 #test-float {\r
73                         width: 600px;\r
74                         float: right;\r
75                         background-color: #eee;\r
76                         border: 3px solid #000;\r
77                         margin: 10px;\r
78                         padding: 5px;\r
79                 }\r
80 \r
81         </style>\r
82 </head>\r
83 <body>\r
84         <h2>Test page with floating wrapper</h2>\r
85         <p>\r
86                 Some test content before the image\r
87         </p>\r
88 \r
89 <div id="test-float">\r
90         <h2>Float test</h2>\r
91         <div id="testFloatWrap">\r
92                 <img src="castle.jpg" alt="test image" id="testFloatImage" width="500" height="333" />\r
93         </div>\r
94         \r
95         <p>\r
96                 <label for="floatX1">x1:</label>\r
97                 <input type="text" name="floatX1" id="floatX1" />\r
98         </p>\r
99         <p>\r
100                 <label for="floatY1">y1:</label>\r
101                 <input type="text" name="floatY1" id="floatY1" />\r
102         </p>\r
103         <p>\r
104                 <label for="floatX2">x2:</label>\r
105                 <input type="text" name="floatX2" id="floatX2" />\r
106         </p>\r
107         <p>\r
108                 <label for="floatY2">y2:</label>\r
109                 <input type="text" name="floatY2" id="floatY2" />\r
110         </p>\r
111         <p>\r
112                 <label for="floatWidth">width:</label>\r
113                 <input type="text" name="floatWidth" id="floatWidth" />\r
114         </p>\r
115         <p>\r
116                 <label for="floatHeight">height</label>\r
117                 <input type="text" name="floatHeight" id="floatHeight" />\r
118         </p>  \r
119 </div>\r
120 \r
121 </body>\r
122 </html>\r
123 \r
124 \r