classy_cas 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,150 @@
1
+ /**
2
+ * jQuery.ScrollTo
3
+ * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
4
+ * Dual licensed under MIT and GPL.
5
+ * Date: 2/19/2008
6
+ *
7
+ * @projectDescription Easy element scrolling using jQuery.
8
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
9
+ * Tested with jQuery 1.2.1. On FF 2.0.0.11, IE 6, Opera 9.22 and Safari 3 beta. on Windows.
10
+ *
11
+ * @author Ariel Flesler
12
+ * @version 1.3.3
13
+ *
14
+ * @id jQuery.scrollTo
15
+ * @id jQuery.fn.scrollTo
16
+ * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
17
+ * The different options for target are:
18
+ * - A number position (will be applied to all axes).
19
+ * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
20
+ * - A jQuery/DOM element ( logically, child of the element to scroll )
21
+ * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
22
+ * - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
23
+ * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead.
24
+ * @param {Object} settings Hash of settings, optional.
25
+ * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
26
+ * @option {Number} duration The OVERALL length of the animation.
27
+ * @option {String} easing The easing method for the animation.
28
+ * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
29
+ * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
30
+ * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
31
+ * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
32
+ * @option {Function} onAfter Function to be called after the scrolling ends.
33
+ * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
34
+ * @return {jQuery} Returns the same jQuery object, for chaining.
35
+ *
36
+ * @example $('div').scrollTo( 340 );
37
+ *
38
+ * @example $('div').scrollTo( '+=340px', { axis:'y' } );
39
+ *
40
+ * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
41
+ *
42
+ * @example var second_child = document.getElementById('container').firstChild.nextSibling;
43
+ * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
44
+ * alert('scrolled!!');
45
+ * }});
46
+ *
47
+ * @example $('div').scrollTo( { top: 300, left:'+=200' }, { offset:-20 } );
48
+ *
49
+ * Notes:
50
+ * - jQuery.scrollTo will make the whole window scroll, it accepts the same arguments as jQuery.fn.scrollTo.
51
+ * - If you are interested in animated anchor navigation, check http://jquery.com/plugins/project/LocalScroll.
52
+ * - The options margin, offset and over are ignored, if the target is not a jQuery object or a DOM element.
53
+ * - The option 'queue' won't be taken into account, if only 1 axis is given.
54
+ */
55
+ ;(function( $ ){
56
+
57
+ var $scrollTo = $.scrollTo = function( target, duration, settings ){
58
+ $scrollTo.window().scrollTo( target, duration, settings );
59
+ };
60
+
61
+ $scrollTo.defaults = {
62
+ axis:'y',
63
+ duration:1
64
+ };
65
+
66
+ //returns the element that needs to be animated to scroll the window
67
+ $scrollTo.window = function(){
68
+ return $( $.browser.safari ? 'body' : 'html' );
69
+ };
70
+
71
+ $.fn.scrollTo = function( target, duration, settings ){
72
+ if( typeof duration == 'object' ){
73
+ settings = duration;
74
+ duration = 0;
75
+ }
76
+ settings = $.extend( {}, $scrollTo.defaults, settings );
77
+ duration = duration || settings.speed || settings.duration;//speed is still recognized for backwards compatibility
78
+ settings.queue = settings.queue && settings.axis.length > 1;//make sure the settings are given right
79
+ if( settings.queue )
80
+ duration /= 2;//let's keep the overall speed, the same.
81
+ settings.offset = both( settings.offset );
82
+ settings.over = both( settings.over );
83
+
84
+ return this.each(function(){
85
+ var elem = this, $elem = $(elem),
86
+ t = target, toff, attr = {},
87
+ win = $elem.is('html,body');
88
+ switch( typeof t ){
89
+ case 'number'://will pass the regex
90
+ case 'string':
91
+ if( /^([+-]=)?\d+(px)?$/.test(t) ){
92
+ t = both( t );
93
+ break;//we are done
94
+ }
95
+ t = $(t,this);// relative selector, no break!
96
+ case 'object':
97
+ if( t.is || t.style )//DOM/jQuery
98
+ toff = (t = $(t)).offset();//get the real position of the target
99
+ }
100
+ $.each( settings.axis.split(''), function( i, axis ){
101
+ var Pos = axis == 'x' ? 'Left' : 'Top',
102
+ pos = Pos.toLowerCase(),
103
+ key = 'scroll' + Pos,
104
+ act = elem[key],
105
+ Dim = axis == 'x' ? 'Width' : 'Height',
106
+ dim = Dim.toLowerCase();
107
+
108
+ if( toff ){//jQuery/DOM
109
+ attr[key] = toff[pos] + ( win ? 0 : act - $elem.offset()[pos] );
110
+
111
+ if( settings.margin ){//if it's a dom element, reduce the margin
112
+ attr[key] -= parseInt(t.css('margin'+Pos)) || 0;
113
+ attr[key] -= parseInt(t.css('border'+Pos+'Width')) || 0;
114
+ }
115
+
116
+ attr[key] += settings.offset[pos] || 0;//add/deduct the offset
117
+
118
+ if( settings.over[pos] )//scroll to a fraction of its width/height
119
+ attr[key] += t[dim]() * settings.over[pos];
120
+ }else
121
+ attr[key] = t[pos];//remove the unnecesary 'px'
122
+
123
+ if( /^\d+$/.test(attr[key]) )//number or 'number'
124
+ attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(Dim) );//check the limits
125
+
126
+ if( !i && settings.queue ){//queueing each axis is required
127
+ if( act != attr[key] )//don't waste time animating, if there's no need.
128
+ animate( settings.onAfterFirst );//intermediate animation
129
+ delete attr[key];//don't animate this axis again in the next iteration.
130
+ }
131
+ });
132
+ animate( settings.onAfter );
133
+
134
+ function animate( callback ){
135
+ $elem.animate( attr, duration, settings.easing, callback && function(){
136
+ callback.call(this, target);
137
+ });
138
+ };
139
+ function max( Dim ){
140
+ var el = win ? $.browser.opera ? document.body : document.documentElement : elem;
141
+ return el['scroll'+Dim] - el['client'+Dim];
142
+ };
143
+ });
144
+ };
145
+
146
+ function both( val ){
147
+ return typeof val == 'object' ? val : { top:val, left:val };
148
+ };
149
+
150
+ })( jQuery );
@@ -0,0 +1,397 @@
1
+ * {margin:0;padding:0}
2
+ .clear { clear: both; height: 0; }
3
+
4
+ .wat-cf:after {
5
+ content: ".";
6
+ display: block;
7
+ height: 0;
8
+ clear: both;
9
+ visibility: hidden;
10
+ }
11
+
12
+ .wat-cf {display: inline-block;}
13
+
14
+ /* Hides from IE-mac \*/
15
+ * html .wat-cf {height: 1%;}
16
+ .wat-cf {display: block;}
17
+ /* End hide from IE-mac */
18
+
19
+ h1 { margin: 15px 0; font-size: 22px; font-weight: normal; }
20
+ h2 { font-size: 22px; margin: 15px 0; font-weight: normal;}
21
+ h3 { font-size: 18px; margin: 10px 0; font-weight: normal;}
22
+ h4 { font-size: 16px; margin: 10px 0; font-weight: normal;}
23
+ hr {height: 1px; border: 0; }
24
+ p { margin: 15px 0;}
25
+ a img { border: none; }
26
+
27
+ body {
28
+ font-size: 12px;
29
+ font-family: sans-serif;
30
+ }
31
+
32
+ #container {
33
+ min-width: 960px;
34
+ }
35
+
36
+ #header, #wrapper {
37
+ padding: 0 20px;
38
+ }
39
+
40
+ #header {
41
+ position: relative;
42
+ padding-top: 1px;
43
+ }
44
+
45
+ #header h1 {
46
+ margin: 0;
47
+ padding: 10px 0;
48
+ font-size: 26px;
49
+ }
50
+
51
+ #header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
52
+ text-decoration: none;
53
+ }
54
+
55
+ #main {
56
+ width: 70%;
57
+ float: left;
58
+ }
59
+
60
+ .actions-bar {
61
+ padding: 10px 1px;
62
+ }
63
+
64
+ .actions-bar .actions {
65
+ float: left;
66
+ }
67
+
68
+
69
+ .actions-bar .pagination {
70
+ float: right;
71
+ padding: 1px 0;
72
+ }
73
+
74
+ #sidebar {
75
+ width: 25%;
76
+ float: right;
77
+ }
78
+
79
+ #sidebar h3 {
80
+ padding: 10px 15px;
81
+ margin: 0;
82
+ font-size: 13px;
83
+ }
84
+
85
+ #sidebar .block {
86
+ margin-bottom: 20px;
87
+ padding-bottom: 10px;
88
+ }
89
+
90
+ #sidebar .block .content {
91
+ padding: 0 15px;
92
+ }
93
+
94
+ #sidebar ul.navigation li a:link, #sidebar ul.navigation li a:visited {
95
+ display: block;
96
+ padding: 10px 15px;
97
+ }
98
+
99
+ #sidebar .block .sidebar-block, #sidebar .notice {
100
+ padding:10px;
101
+ }
102
+
103
+ #wrapper {
104
+ padding-top: 20px;
105
+ }
106
+
107
+ #main .block {
108
+ margin-bottom: 20px;
109
+ padding-top: 1px;
110
+ }
111
+
112
+ #main .block .content .inner {
113
+ padding: 0 15px 15px;
114
+ }
115
+
116
+ #main .main p.first {
117
+ margin-top: 0;
118
+ }
119
+
120
+ #user-navigation {
121
+ position: absolute;
122
+ top: 0px;
123
+ right: 20px;
124
+ }
125
+
126
+ #main-navigation {
127
+ width: 100%;
128
+ }
129
+
130
+ #user-navigation ul, #main-navigation ul, .secondary-navigation ul, #sidebar ul.navigation {
131
+ margin: 0;
132
+ padding: 0;
133
+ list-style-type: none;
134
+ }
135
+
136
+ #user-navigation ul li, #main-navigation ul li, .secondary-navigation ul li {
137
+ float: left;
138
+ }
139
+
140
+ #main-navigation ul li {
141
+ margin-right: 5px;
142
+ }
143
+
144
+ #user-navigation ul li {
145
+ padding: 5px 10px;
146
+ }
147
+
148
+ #main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
149
+ .secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
150
+ #user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
151
+ text-decoration: none;
152
+ }
153
+
154
+ #main-navigation ul li a {
155
+ font-size: 14px;
156
+ line-height: 14px;
157
+ display: block;
158
+ padding: 8px 15px;
159
+ }
160
+
161
+ .secondary-navigation {
162
+ font-size: 13px;
163
+ border-bottom-width: 10px;
164
+ border-bottom-style: solid;
165
+ }
166
+
167
+ .secondary-navigation ul li a {
168
+ display: block;
169
+ padding: 10px 15px;
170
+ }
171
+
172
+ #footer {
173
+ padding-bottom: 20px;
174
+ }
175
+
176
+ /* pagination */
177
+
178
+ .pagination a, .pagination span, .pagination em {
179
+ padding: 2px 5px;
180
+ margin-right: 5px;
181
+ display: block;
182
+ float: left;
183
+ border-style: solid;
184
+ border-width: 1px;
185
+ }
186
+
187
+ .pagination em {
188
+ font-weight: bold;
189
+ }
190
+
191
+ .pagination a {
192
+ text-decoration: none;
193
+ }
194
+
195
+ /* tables */
196
+ .table {
197
+ width: 100%;
198
+ border-collapse: collapse;
199
+ margin-bottom: 15px;
200
+ }
201
+
202
+ .table th {
203
+ padding: 10px;
204
+ font-weight: bold;
205
+ text-align: left;
206
+ }
207
+
208
+ .table th.first {
209
+ width: 30px;
210
+ }
211
+
212
+ .table th.last {
213
+ width: 200px;
214
+ }
215
+
216
+ .table .checkbox {
217
+ margin-left: 10px;
218
+ }
219
+
220
+ .table td {
221
+ padding: 10px;
222
+ }
223
+
224
+ .table td.last {
225
+ text-align: right;
226
+ }
227
+
228
+ /* forms */
229
+
230
+ input.checkbox {
231
+ margin: 0;
232
+ padding: 0;
233
+ }
234
+
235
+ .form .group {
236
+ margin-bottom: 15px;
237
+ }
238
+
239
+ .form div.left {
240
+ width: 20%;
241
+ float: left;
242
+ }
243
+
244
+ .form div.right {
245
+ width: 75%;
246
+ float: right;
247
+ }
248
+
249
+ .form .columns .column {
250
+ width: 48%;
251
+ }
252
+
253
+ .form .columns .left {
254
+ float: left;
255
+ }
256
+
257
+ .form .columns .right {
258
+ float: right;
259
+ }
260
+
261
+ .form label.label, .form input.text_field, .form textarea.text_area {
262
+ font-size: 1.2em;
263
+ padding: 1px 0;
264
+ margin: 0;
265
+ }
266
+
267
+ .form label.right {
268
+ text-align: right;
269
+ }
270
+
271
+ .form input.checkbox, .form input.radio {
272
+ margin-right: 5px;
273
+ }
274
+
275
+ .form label.checkbox, .form label.radio {
276
+ line-height: 1.5em;
277
+ }
278
+
279
+ .form label.label {
280
+ display: block;
281
+ padding-bottom: 2px;
282
+ font-weight: bold;
283
+ }
284
+
285
+ .form div.fieldWithErrors label.label {
286
+ display: inline;
287
+ }
288
+
289
+ .form .fieldWithErrors .error {
290
+ color: red;
291
+ }
292
+
293
+ .form input.text_field, .form textarea.text_area {
294
+ width: 100%;
295
+ border-width: 1px;
296
+ border-style: solid;
297
+ }
298
+
299
+ /* lists */
300
+
301
+ ul.list {
302
+ margin: 0;
303
+ padding: 0;
304
+ list-style-type: none;
305
+ }
306
+
307
+ ul.list li {
308
+ clear: left;
309
+ padding-bottom: 5px;
310
+ }
311
+
312
+ ul.list li .left {
313
+ float: left;
314
+ }
315
+
316
+ ul.list li .left .avatar {
317
+ width: 50px;
318
+ height: 50px;
319
+ }
320
+
321
+ ul.list li .item {
322
+ margin-left: 80px;
323
+ }
324
+
325
+ ul.list li .item .avatar {
326
+ float: left;
327
+ margin: 0 5px 5px 0;
328
+ width: 30px;
329
+ height: 30px;
330
+ }
331
+
332
+ /* box */
333
+
334
+ #box {
335
+ width: 500px;
336
+ margin: 50px auto;
337
+ }
338
+
339
+ #box .block {
340
+ margin-bottom: 20px;
341
+ }
342
+
343
+ #box .block h2 {
344
+ padding: 10px 15px;
345
+ margin: 0;
346
+ }
347
+
348
+ #box .block .content {
349
+ padding: 10px 20px;
350
+ }
351
+
352
+ /* Inspired by http://particletree.com/features/rediscovering-the-button-element */
353
+
354
+ a.button:link, a.button:visited, a.button:hover, a.button:active, button.button {
355
+ color: #222;
356
+ display:block;
357
+ float:left;
358
+ margin:0 7px 0 0;
359
+ background-color: #eee;
360
+ border:1px solid #bfbfbf;
361
+ font-size: 1em;
362
+ line-height: 1.3em;
363
+ font-weight:bold;
364
+ cursor:pointer;
365
+ padding:5px 10px 6px 7px;
366
+ text-decoration: none;
367
+ }
368
+
369
+ button.button {
370
+ width:auto;
371
+ overflow:visible;
372
+ padding:4px 10px 3px 7px; /* IE6 */
373
+ }
374
+ button.button[type] {
375
+ padding:5px 10px 5px 7px; /* Firefox */
376
+ line-height:17px; /* Safari */
377
+ }
378
+
379
+ *:first-child+html button.button[type] {
380
+ padding:4px 10px 3px 7px; /* IE7 */
381
+ }
382
+
383
+ button.button img, a.button img {
384
+ margin:0 3px -3px 0 !important;
385
+ padding:0;
386
+ border:none;
387
+ width:16px;
388
+ height:16px;
389
+ }
390
+
391
+ button.button:hover, a.button:hover {
392
+ background-color:#dedede;
393
+ }
394
+
395
+ button.button:active, a.button:active {
396
+ background-color:#e5e5e5;
397
+ }