right-rails 0.6.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -0
- data/README.rdoc +71 -0
- data/Rakefile +144 -14
- data/generators/right_rails/right_rails_generator.rb +18 -21
- data/init.rb +11 -32
- data/lib/generators/right_rails/right_rails_generator.rb +27 -0
- data/lib/generators/right_rails/templates/iframed.html.erb +10 -0
- data/lib/right-rails.rb +1 -1
- data/lib/right_rails/config.rb +278 -0
- data/lib/right_rails/controller_extensions.rb +10 -5
- data/lib/right_rails/helpers/basic.rb +10 -66
- data/lib/right_rails/helpers/forms.rb +141 -139
- data/lib/right_rails/helpers/misc.rb +45 -67
- data/lib/right_rails/helpers/rails.rb +40 -105
- data/lib/right_rails/helpers.rb +364 -1
- data/lib/right_rails/java_script_generator.rb +34 -24
- data/lib/right_rails.rb +6 -1
- data/{images → public/images}/colorpicker.png +0 -0
- data/{images → public/images}/resizable.png +0 -0
- data/public/javascripts/right/autocompleter-src.js +612 -0
- data/public/javascripts/right/autocompleter.js +18 -0
- data/public/javascripts/right/calendar-src.js +1448 -0
- data/public/javascripts/right/calendar.js +36 -0
- data/public/javascripts/right/colorpicker-src.js +967 -0
- data/public/javascripts/right/colorpicker.js +26 -0
- data/{javascripts/right-dnd-src.js → public/javascripts/right/dnd-src.js} +86 -52
- data/public/javascripts/right/dnd.js +20 -0
- data/{javascripts/right-effects-src.js → public/javascripts/right/effects-src.js} +90 -45
- data/public/javascripts/right/effects.js +17 -0
- data/{javascripts/right-ui-i18n-de.js → public/javascripts/right/i18n/de.js} +7 -7
- data/{javascripts/right-ui-i18n-en-us.js → public/javascripts/right/i18n/en-us.js} +1 -1
- data/{javascripts/right-ui-i18n-es.js → public/javascripts/right/i18n/es.js} +7 -7
- data/{javascripts/right-ui-i18n-fr.js → public/javascripts/right/i18n/fr.js} +7 -7
- data/{javascripts/right-ui-i18n-hu.js → public/javascripts/right/i18n/hu.js} +7 -7
- data/{javascripts/right-ui-i18n-jp.js → public/javascripts/right/i18n/jp.js} +7 -7
- data/{javascripts/right-ui-i18n-nl.js → public/javascripts/right/i18n/nl.js} +7 -7
- data/{javascripts/right-ui-i18n-pt-br.js → public/javascripts/right/i18n/pt-br.js} +7 -7
- data/{javascripts/right-ui-i18n-ru.js → public/javascripts/right/i18n/ru.js} +7 -7
- data/{javascripts/right-ui-i18n-ua.js → public/javascripts/right/i18n/ua.js} +17 -12
- data/public/javascripts/right/in-edit-src.js +352 -0
- data/public/javascripts/right/in-edit.js +13 -0
- data/public/javascripts/right/json-src.js +160 -0
- data/public/javascripts/right/json.js +10 -0
- data/public/javascripts/right/lightbox-src.js +881 -0
- data/public/javascripts/right/lightbox.js +24 -0
- data/{javascripts/right-rails-src.js → public/javascripts/right/rails-src.js} +195 -171
- data/public/javascripts/right/rails.js +14 -0
- data/public/javascripts/right/rater-src.js +366 -0
- data/public/javascripts/right/rater.js +13 -0
- data/public/javascripts/right/resizable-src.js +420 -0
- data/public/javascripts/right/resizable.js +15 -0
- data/public/javascripts/right/selectable-src.js +687 -0
- data/public/javascripts/right/selectable.js +22 -0
- data/public/javascripts/right/slider-src.js +377 -0
- data/public/javascripts/right/slider.js +14 -0
- data/public/javascripts/right/sortable-src.js +392 -0
- data/public/javascripts/right/sortable.js +16 -0
- data/public/javascripts/right/tabs-src.js +1123 -0
- data/public/javascripts/right/tabs.js +29 -0
- data/public/javascripts/right/tooltip-src.js +307 -0
- data/public/javascripts/right/tooltip.js +12 -0
- data/public/javascripts/right/uploader-src.js +283 -0
- data/public/javascripts/right/uploader.js +13 -0
- data/{javascripts → public/javascripts}/right-olds-src.js +134 -186
- data/public/javascripts/right-olds.js +18 -0
- data/public/javascripts/right-safe-src.js +161 -0
- data/public/javascripts/right-safe.js +8 -0
- data/{javascripts → public/javascripts}/right-src.js +2558 -1750
- data/public/javascripts/right.js +92 -0
- data/spec/lib/right_rails/config_spec.rb +133 -0
- data/spec/lib/right_rails/controller_extensions_spec.rb +1 -1
- data/spec/lib/right_rails/helpers/basic_spec.rb +77 -66
- data/spec/lib/right_rails/helpers/forms_spec.rb +231 -33
- data/spec/lib/right_rails/helpers/misc_spec.rb +94 -26
- data/spec/lib/right_rails/helpers/rails_spec.rb +42 -7
- data/spec/lib/right_rails/helpers_spec.rb +125 -0
- data/spec/lib/right_rails/java_script_generator_spec.rb +30 -0
- data/spec/rcov.opts +3 -0
- data/spec/spec_helper.rb +12 -7
- metadata +70 -61
- data/README.textile +0 -69
- data/javascripts/right-autocompleter-src.js +0 -318
- data/javascripts/right-autocompleter.js +0 -9
- data/javascripts/right-behavior-src.js +0 -261
- data/javascripts/right-behavior.js +0 -8
- data/javascripts/right-calendar-src.js +0 -946
- data/javascripts/right-calendar.js +0 -9
- data/javascripts/right-colorpicker-src.js +0 -635
- data/javascripts/right-colorpicker.js +0 -9
- data/javascripts/right-dnd.js +0 -9
- data/javascripts/right-effects.js +0 -6
- data/javascripts/right-events-src.js +0 -321
- data/javascripts/right-events.js +0 -6
- data/javascripts/right-in-edit-src.js +0 -194
- data/javascripts/right-in-edit.js +0 -6
- data/javascripts/right-json-src.js +0 -141
- data/javascripts/right-json.js +0 -6
- data/javascripts/right-lightbox-src.js +0 -651
- data/javascripts/right-lightbox.js +0 -9
- data/javascripts/right-olds.js +0 -9
- data/javascripts/right-rails.js +0 -9
- data/javascripts/right-rater-src.js +0 -253
- data/javascripts/right-rater.js +0 -9
- data/javascripts/right-resizable-src.js +0 -336
- data/javascripts/right-resizable.js +0 -9
- data/javascripts/right-selectable-src.js +0 -565
- data/javascripts/right-selectable.js +0 -7
- data/javascripts/right-slider-src.js +0 -288
- data/javascripts/right-slider.js +0 -7
- data/javascripts/right-sortable-src.js +0 -225
- data/javascripts/right-sortable.js +0 -9
- data/javascripts/right-tabs-src.js +0 -937
- data/javascripts/right-tabs.js +0 -6
- data/javascripts/right-tooltips-src.js +0 -195
- data/javascripts/right-tooltips.js +0 -9
- data/javascripts/right-uploader-src.js +0 -167
- data/javascripts/right-uploader.js +0 -9
- data/javascripts/right.js +0 -7
@@ -1,14 +1,37 @@
|
|
1
1
|
/**
|
2
|
-
* Additional visual effects module
|
2
|
+
* RightJS Additional visual effects module
|
3
|
+
* http://rightjs.org/plugins/effects
|
3
4
|
*
|
4
|
-
* Copyright (C) 2008-2010 Nikolay
|
5
|
+
* Copyright (C) 2008-2010 Nikolay Nemshilov
|
5
6
|
*/
|
6
|
-
|
7
|
-
|
7
|
+
(function(RightJS) {
|
8
|
+
if (!RightJS.Fx) { throw "RightJS Fx is missing"; }
|
9
|
+
|
10
|
+
/**
|
8
11
|
* The basic move visual effect
|
9
12
|
*
|
10
13
|
* @copyright (C) 2009-2010 Nikolay V. Nemshilov
|
11
14
|
*/
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The plugin initializtion script
|
18
|
+
*
|
19
|
+
* Copyright (C) 2010 Nikolay Nemshilov
|
20
|
+
*/
|
21
|
+
|
22
|
+
var R = RightJS,
|
23
|
+
$ = RightJS.$,
|
24
|
+
$w = RightJS.$w,
|
25
|
+
$A = RightJS.$A,
|
26
|
+
Fx = RightJS.Fx,
|
27
|
+
Class = RightJS.Class,
|
28
|
+
Object = RightJS.Object,
|
29
|
+
Element = RightJS.Element,
|
30
|
+
defined = RightJS.defined,
|
31
|
+
isHash = RightJS.isHash,
|
32
|
+
isString = RightJS.isString;
|
33
|
+
|
34
|
+
|
12
35
|
Fx.Move = new Class(Fx.Morph, {
|
13
36
|
extend: {
|
14
37
|
Options: Object.merge(Fx.Options, {
|
@@ -26,11 +49,11 @@ Fx.Move = new Class(Fx.Morph, {
|
|
26
49
|
var position = this.element.getStyle('position'), end_style = {};
|
27
50
|
|
28
51
|
if (position != 'absolute' || position != 'relative') {
|
29
|
-
this.element.style.position = position = position == 'fixed' ? 'absolute' : 'relative';
|
52
|
+
this.element._.style.position = position = position == 'fixed' ? 'absolute' : 'relative';
|
30
53
|
}
|
31
54
|
|
32
|
-
if (end_position.top) end_position.y = end_position.top.toInt();
|
33
|
-
if (end_position.left) end_position.x = end_position.left.toInt();
|
55
|
+
if (end_position.top) { end_position.y = end_position.top.toInt(); }
|
56
|
+
if (end_position.left) { end_position.x = end_position.left.toInt(); }
|
34
57
|
|
35
58
|
// adjusting the end position
|
36
59
|
var cur_position = this.element.position();
|
@@ -40,15 +63,15 @@ Fx.Move = new Class(Fx.Morph, {
|
|
40
63
|
|
41
64
|
if (this.options.position == 'relative') {
|
42
65
|
if (position == 'absolute') {
|
43
|
-
if (defined(end_position.x)) end_position.x += cur_position.x;
|
44
|
-
if (defined(end_position.y)) end_position.y += cur_position.x;
|
66
|
+
if (defined(end_position.x)) { end_position.x += cur_position.x; }
|
67
|
+
if (defined(end_position.y)) { end_position.y += cur_position.x; }
|
45
68
|
} else {
|
46
|
-
if (defined(end_position.x)) end_position.x += rel_left;
|
47
|
-
if (defined(end_position.y)) end_position.y += rel_top;
|
69
|
+
if (defined(end_position.x)) { end_position.x += rel_left; }
|
70
|
+
if (defined(end_position.y)) { end_position.y += rel_top; }
|
48
71
|
}
|
49
72
|
} else if (position == 'relative') {
|
50
|
-
if (defined(end_position.x)) end_position.x += rel_left - cur_position.x;
|
51
|
-
if (defined(end_position.y)) end_position.y += rel_top - cur_position.y;
|
73
|
+
if (defined(end_position.x)) { end_position.x += rel_left - cur_position.x; }
|
74
|
+
if (defined(end_position.y)) { end_position.y += rel_top - cur_position.y; }
|
52
75
|
}
|
53
76
|
|
54
77
|
// need this to bypass the other styles from the subclasses
|
@@ -72,6 +95,7 @@ Fx.Move = new Class(Fx.Morph, {
|
|
72
95
|
return position;
|
73
96
|
}
|
74
97
|
});
|
98
|
+
|
75
99
|
/**
|
76
100
|
* Zoom visual effect, graduately zoom and element in or out
|
77
101
|
*
|
@@ -110,12 +134,12 @@ Fx.Zoom = new Class(Fx.Move, {
|
|
110
134
|
if (isHash(size)) {
|
111
135
|
var sizes = $E('div').insertTo(
|
112
136
|
$E('div', {style: "visibility:hidden;float:left;height:0;width:0"}).insertTo(document.body)
|
113
|
-
).setStyle(size).
|
137
|
+
).setStyle(size).size();
|
114
138
|
|
115
|
-
if (size.height) size = sizes.y / this.element.
|
116
|
-
else size = sizes.x / this.element.
|
139
|
+
if (size.height) { size = sizes.y / this.element.size().y; }
|
140
|
+
else { size = sizes.x / this.element.size().x; }
|
117
141
|
} else if (isString(size)) {
|
118
|
-
size = size.endsWith('%') ? size.toFloat() / 100 : size.toFloat();
|
142
|
+
size = R(size).endsWith('%') ? R(size).toFloat() / 100 : R(size).toFloat();
|
119
143
|
}
|
120
144
|
|
121
145
|
return size;
|
@@ -125,20 +149,24 @@ Fx.Zoom = new Class(Fx.Move, {
|
|
125
149
|
_getBasicStyle: function(proportion) {
|
126
150
|
var style = this._cloneStyle(this.element, this.PROPERTIES), re = /([\d\.]+)/g;
|
127
151
|
|
152
|
+
function adjust_value(m) {
|
153
|
+
return ''+ (R(m).toFloat() * proportion);
|
154
|
+
}
|
155
|
+
|
128
156
|
for (var key in style) {
|
129
|
-
if (key === 'width' || key === 'height')
|
157
|
+
if (key === 'width' || key === 'height') {
|
158
|
+
style[key] = style[key] || (this.element['offset'+R(key).capitalize()]+'px');
|
159
|
+
}
|
130
160
|
|
131
161
|
if (style[key].match(re)) {
|
132
|
-
style[key] = style[key].replace(re,
|
133
|
-
return ''+ (m.toFloat() * proportion);
|
134
|
-
});
|
162
|
+
style[key] = style[key].replace(re, adjust_value);
|
135
163
|
} else {
|
136
164
|
delete(style[key]);
|
137
165
|
}
|
138
166
|
}
|
139
167
|
|
140
168
|
// preventing the border disappearance
|
141
|
-
if (style.borderWidth && style.borderWidth.toFloat() < 1) {
|
169
|
+
if (style.borderWidth && R(style.borderWidth).toFloat() < 1) {
|
142
170
|
style.borderWidth = '1px';
|
143
171
|
}
|
144
172
|
|
@@ -148,7 +176,7 @@ Fx.Zoom = new Class(Fx.Move, {
|
|
148
176
|
// getting the position adjustments
|
149
177
|
_getEndPosition: function(proportion) {
|
150
178
|
var position = {};
|
151
|
-
var sizes = this.element.
|
179
|
+
var sizes = this.element.size();
|
152
180
|
var x_diff = sizes.x * (proportion - 1);
|
153
181
|
var y_diff = sizes.y * (proportion - 1);
|
154
182
|
|
@@ -186,6 +214,7 @@ Fx.Zoom = new Class(Fx.Move, {
|
|
186
214
|
return position;
|
187
215
|
}
|
188
216
|
});
|
217
|
+
|
189
218
|
/**
|
190
219
|
* Bounce visual effect, slightly moves an element forward and back
|
191
220
|
*
|
@@ -231,6 +260,7 @@ Fx.Bounce = new Class(Fx, {
|
|
231
260
|
return this;
|
232
261
|
}
|
233
262
|
});
|
263
|
+
|
234
264
|
/**
|
235
265
|
* run out and run in efffects
|
236
266
|
*
|
@@ -243,8 +273,8 @@ Fx.Run = new Class(Fx.Move, {
|
|
243
273
|
})
|
244
274
|
},
|
245
275
|
|
246
|
-
prepare: function(
|
247
|
-
var how =
|
276
|
+
prepare: function(in_how) {
|
277
|
+
var how = in_how || 'toggle', position = {}, dimensions = this.element.dimensions(), threshold = 80;
|
248
278
|
|
249
279
|
if (how == 'out' || (how == 'toggle' && this.element.visible())) {
|
250
280
|
if (this.options.direction == 'left') {
|
@@ -254,7 +284,7 @@ Fx.Run = new Class(Fx.Move, {
|
|
254
284
|
}
|
255
285
|
this.onFinish(function() {
|
256
286
|
this.element.hide().setStyle(this.getEndPosition({x: dimensions.left, y: dimensions.top}));
|
257
|
-
})
|
287
|
+
});
|
258
288
|
} else {
|
259
289
|
dimensions = this.element.setStyle('visibility: hidden').show().dimensions();
|
260
290
|
var pre_position = {};
|
@@ -273,6 +303,7 @@ Fx.Run = new Class(Fx.Move, {
|
|
273
303
|
return this.$super(position);
|
274
304
|
}
|
275
305
|
});
|
306
|
+
|
276
307
|
/**
|
277
308
|
* The puff visual effect
|
278
309
|
*
|
@@ -287,11 +318,11 @@ Fx.Puff = new Class(Fx.Zoom, {
|
|
287
318
|
|
288
319
|
// protected
|
289
320
|
|
290
|
-
prepare: function(
|
291
|
-
var how =
|
321
|
+
prepare: function(in_how) {
|
322
|
+
var how = in_how || 'toggle', opacity = 0, size = this.options.size, initial_style;
|
292
323
|
|
293
324
|
if (how == 'out' || (how == 'toggle' && this.element.visible())) {
|
294
|
-
|
325
|
+
initial_style = this.getEndPosition(this._getZoomedStyle(1));
|
295
326
|
this.onFinish(function() {
|
296
327
|
initial_style.opacity = 1;
|
297
328
|
this.element.hide().setStyle(initial_style);
|
@@ -301,7 +332,7 @@ Fx.Puff = new Class(Fx.Zoom, {
|
|
301
332
|
this.element.setStyle('visibility: visible').show();
|
302
333
|
|
303
334
|
var width = this.element.offsetWidth;
|
304
|
-
|
335
|
+
initial_style = this.getEndPosition(this._getZoomedStyle(1));
|
305
336
|
|
306
337
|
this.onFinish(function() {
|
307
338
|
this.element.setStyle(initial_style);
|
@@ -323,12 +354,13 @@ Fx.Puff = new Class(Fx.Zoom, {
|
|
323
354
|
}
|
324
355
|
|
325
356
|
});
|
357
|
+
|
326
358
|
/**
|
327
359
|
* Handles the to-class and from-class visual effects
|
328
360
|
*
|
329
|
-
* Copyright (C) 2009-2010 Nikolay
|
361
|
+
* Copyright (C) 2009-2010 Nikolay Nemshilov
|
330
362
|
*/
|
331
|
-
Fx.CSS = new Class(Fx.Morph, {
|
363
|
+
Fx.Css = Fx.CSS = new Class(Fx.Morph, {
|
332
364
|
STYLES: $w('width height lineHeight opacity border padding margin color fontSize background top left right bottom'),
|
333
365
|
|
334
366
|
// protected
|
@@ -338,16 +370,27 @@ Fx.CSS = new Class(Fx.Morph, {
|
|
338
370
|
this.removeClass = remove_class || '';
|
339
371
|
|
340
372
|
// wiring the classes add/remove on-finish
|
341
|
-
if (add_class) this.onFinish(this.element.addClass.bind(this.element, add_class));
|
342
|
-
if (remove_class) this.onFinish(this.element.removeClass.bind(this.element, remove_class));
|
373
|
+
if (add_class) { this.onFinish(this.element.addClass.bind(this.element, add_class)); }
|
374
|
+
if (remove_class) { this.onFinish(this.element.removeClass.bind(this.element, remove_class)); }
|
343
375
|
|
344
376
|
return this.$super({});
|
345
377
|
},
|
346
378
|
|
347
379
|
// hacking the old method to make it apply the classes
|
348
|
-
_endStyle:
|
349
|
-
|
350
|
-
|
380
|
+
_endStyle: function(style, keys) {
|
381
|
+
var element = this.element, dummy = $(element._.cloneNode(true))
|
382
|
+
.setStyle('position:absolute;z-index:-1;visibility:hidden')
|
383
|
+
.setWidth(element.size().x)
|
384
|
+
.addClass(this.addClass).removeClass(this.removeClass);
|
385
|
+
|
386
|
+
if (element._.parentNode) { element.insert(dummy, 'before'); }
|
387
|
+
|
388
|
+
var after = this._cloneStyle(dummy, keys);
|
389
|
+
|
390
|
+
dummy.remove();
|
391
|
+
|
392
|
+
return after;
|
393
|
+
},
|
351
394
|
|
352
395
|
// replacing the old method to make it return our own list of properties
|
353
396
|
_styleKeys: function() {
|
@@ -359,17 +402,18 @@ Fx.CSS = new Class(Fx.Morph, {
|
|
359
402
|
return this.$super(hash);
|
360
403
|
}
|
361
404
|
});
|
405
|
+
|
362
406
|
/**
|
363
407
|
* Element shortcuts for the additional effects
|
364
408
|
*
|
365
|
-
* @copyright (C) 2009-2010 Nikolay
|
409
|
+
* @copyright (C) 2009-2010 Nikolay Nemshilov
|
366
410
|
*/
|
367
|
-
Element.include({
|
411
|
+
RightJS.Element.include({
|
368
412
|
/**
|
369
413
|
* The move visual effect shortcut
|
370
414
|
*
|
371
|
-
* @param Object end position x/y or top/left
|
372
|
-
* @param Object fx options
|
415
|
+
* @param position Object end position x/y or top/left
|
416
|
+
* @param options Object fx options
|
373
417
|
* @return Element self
|
374
418
|
*/
|
375
419
|
move: function(position, options) {
|
@@ -423,14 +467,15 @@ Element.include({
|
|
423
467
|
/**
|
424
468
|
* The Fx.Class effect shortcut
|
425
469
|
*
|
426
|
-
* @param String css-class name to add
|
427
|
-
* @param String css-class name to remove
|
470
|
+
* @param add String css-class name to add
|
471
|
+
* @param remove String css-class name to remove
|
428
472
|
* @param Object fx options
|
429
473
|
*/
|
430
474
|
morphToClass: function() {
|
431
475
|
var args = $A(arguments);
|
432
|
-
if (args[0] === null) args[0] = '';
|
476
|
+
if (args[0] === null) { args[0] = ''; }
|
433
477
|
|
434
478
|
return this.fx('CSS', args);
|
435
479
|
}
|
436
|
-
});
|
480
|
+
});
|
481
|
+
})(RightJS);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS Additional visual effects module
|
3
|
+
* http://rightjs.org/plugins/effects
|
4
|
+
*
|
5
|
+
* Copyright (C) 2008-2010 Nikolay Nemshilov
|
6
|
+
*/
|
7
|
+
(function(g){if(!g.Fx)throw"RightJS Fx is missing";var i=g,o=g.$,n=g.$w,p=g.$A,e=g.Fx,j=g.Class,h=g.Object,q=g.Element,k=g.defined,r=g.isHash,s=g.isString;e.Move=new j(e.Morph,{extend:{Options:h.merge(e.Options,{duration:"long",position:"absolute"})},prepare:function(a){return this.$super(this.getEndPosition(a))},getEndPosition:function(a){var b=this.element.getStyle("position"),c={};if(b!="absolute"||b!="relative")this.element._.style.position=b=b=="fixed"?"absolute":"relative";if(a.top)a.y=a.top.toInt();
|
8
|
+
if(a.left)a.x=a.left.toInt();var d=this.element.position(),f=this.getParentPosition(),l=d.x-f.x;f=d.y-f.y;if(this.options.position=="relative")if(b=="absolute"){if(k(a.x))a.x+=d.x;if(k(a.y))a.y+=d.x}else{if(k(a.x))a.x+=l;if(k(a.y))a.y+=f}else if(b=="relative"){if(k(a.x))a.x+=l-d.x;if(k(a.y))a.y+=f-d.y}for(var m in a)switch(m){case "top":case "left":break;case "y":c.top=a.y+"px";break;case "x":c.left=a.x+"px";break;default:c[m]=a[m]}return c},getParentPosition:function(){e.Move.Dummy=e.Move.Dummy||
|
9
|
+
new q("div",{style:"width:0;height:0;visibility:hidden"});this.element.insert(e.Move.Dummy,"before");var a=e.Move.Dummy.position();e.Move.Dummy.remove();return a}});e.Zoom=new j(e.Move,{PROPERTIES:n("width height lineHeight paddingTop paddingRight paddingBottom paddingLeft fontSize borderWidth"),extend:{Options:h.merge(e.Move.Options,{position:"relative",duration:"normal",from:"center"})},prepare:function(a,b){return this.$super(this._getZoomedStyle(a,b))},_getZoomedStyle:function(a,b){var c=this._getProportion(a);
|
10
|
+
return h.merge(this._getBasicStyle(c),this._getEndPosition(c),b||{})},_getProportion:function(a){if(r(a)){var b=$E("div").insertTo($E("div",{style:"visibility:hidden;float:left;height:0;width:0"}).insertTo(document.body)).setStyle(a).size();a=a.height?b.y/this.element.size().y:b.x/this.element.size().x}else if(s(a))a=i(a).endsWith("%")?i(a).toFloat()/100:i(a).toFloat();return a},_getBasicStyle:function(a){function b(l){return""+i(l).toFloat()*a}var c=this._cloneStyle(this.element,this.PROPERTIES),
|
11
|
+
d=/([\d\.]+)/g;for(var f in c){if(f==="width"||f==="height")c[f]=c[f]||this.element["offset"+i(f).capitalize()]+"px";if(c[f].match(d))c[f]=c[f].replace(d,b);else delete c[f]}if(c.borderWidth&&i(c.borderWidth).toFloat()<1)c.borderWidth="1px";return c},_getEndPosition:function(a){var b={},c=this.element.size(),d=c.x*(a-1);a=c.y*(a-1);switch(this.options.from.replace("-"," ").split(" ").sort().join("_")){case "top":b.x=-d/2;break;case "right":b.x=-d;b.y=-a/2;break;case "bottom":b.x=-d/2;case "bottom_left":b.y=
|
12
|
+
-a;break;case "bottom_right":b.y=-a;case "right_top":b.x=-d;break;case "center":b.x=-d/2;case "left":b.y=-a/2;break;default:}return b}});e.Bounce=new j(e,{extend:{Options:h.merge(e.Options,{duration:"short",direction:"top",value:16})},prepare:function(a){a=a||this.options.value;this.element.position();var b={duration:e.Durations[this.options.duration]||this.options.duration,position:"relative"},c="y";switch(this.options.direction){case "right":a=-a;case "left":c="x";break;case "bottom":a=-a}var d=
|
13
|
+
{},f={};d[c]=-a;f[c]=a;(new e.Move(this.element,b)).start(d);(new e.Move(this.element,b)).start(f);this.finish.bind(this).delay(1);return this}});e.Run=new j(e.Move,{extend:{Options:h.merge(e.Move.Options,{direction:"left"})},prepare:function(a){var b=a||"toggle";a={};var c=this.element.dimensions();if(b=="out"||b=="toggle"&&this.element.visible()){if(this.options.direction=="left")a.x=-c.width-80;else a.y=-c.height-80;this.onFinish(function(){this.element.hide().setStyle(this.getEndPosition({x:c.left,
|
14
|
+
y:c.top}))})}else{c=this.element.setStyle("visibility: hidden").show().dimensions();b={};if(this.options.direction=="left"){b.x=-c.width-80;a.x=c.left}else{b.y=-c.height-80;a.y=c.top}this.element.setStyle(this.getEndPosition(b)).setStyle("visibility: visible")}return this.$super(a)}});e.Puff=new j(e.Zoom,{extend:{Options:h.merge(e.Zoom.Options,{size:1.4})},prepare:function(a){var b=a||"toggle",c=0;a=this.options.size;var d;if(b=="out"||b=="toggle"&&this.element.visible()){d=this.getEndPosition(this._getZoomedStyle(1));
|
15
|
+
this.onFinish(function(){d.opacity=1;this.element.hide().setStyle(d)})}else{this.element.setStyle("visibility: visible").show();b=this.element.offsetWidth;d=this.getEndPosition(this._getZoomedStyle(1));this.onFinish(function(){this.element.setStyle(d)});this.element.setStyle(h.merge(this.getEndPosition(this._getZoomedStyle(a)),{opacity:0,visibility:"visible"}));a=b/this.element.offsetWidth;c=1}return this.$super(a,{opacity:c})}});e.Css=e.CSS=new j(e.Morph,{STYLES:n("width height lineHeight opacity border padding margin color fontSize background top left right bottom"),
|
16
|
+
prepare:function(a,b){this.addClass=a||"";this.removeClass=b||"";a&&this.onFinish(this.element.addClass.bind(this.element,a));b&&this.onFinish(this.element.removeClass.bind(this.element,b));return this.$super({})},_endStyle:function(a,b){var c=this.element,d=o(c._.cloneNode(true)).setStyle("position:absolute;z-index:-1;visibility:hidden").setWidth(c.size().x).addClass(this.addClass).removeClass(this.removeClass);c._.parentNode&&c.insert(d,"before");c=this._cloneStyle(d,b);d.remove();return c},_styleKeys:function(){var a=
|
17
|
+
{};this.STYLES.each(function(b){a[b]=1});return this.$super(a)}});g.Element.include({move:function(a,b){return this.fx("move",[a,b||{}])},bounce:function(){return this.fx("bounce",arguments)},zoom:function(a,b){return this.fx("zoom",[a,b||{}])},run:function(){return this.fx("run",arguments)},puff:function(){return this.fx("puff",arguments)},morphToClass:function(){var a=p(arguments);if(a[0]===null)a[0]="";return this.fx("CSS",a)}})})(RightJS);
|
@@ -7,8 +7,8 @@ if (self.Calendar) {
|
|
7
7
|
$ext(Calendar.i18n, {
|
8
8
|
Done: 'Erledigt',
|
9
9
|
Now: 'Jetzt',
|
10
|
-
|
11
|
-
|
10
|
+
NextMonth: 'Nächster Monat',
|
11
|
+
PrevMonth: 'Vorhergehender Monat',
|
12
12
|
NextYear: 'Nächstes Jahr',
|
13
13
|
PrevYear: 'Vorhergehendes Jahr',
|
14
14
|
|
@@ -22,16 +22,16 @@ if (self.Calendar) {
|
|
22
22
|
|
23
23
|
if (self.Lightbox) {
|
24
24
|
$ext(Lightbox.i18n, {
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Close: 'Schliessen',
|
26
|
+
Prev: 'Vorhergehendes Bild',
|
27
|
+
Next: 'Nächstes Bild'
|
28
28
|
});
|
29
29
|
}
|
30
30
|
|
31
31
|
if (self.InEdit) {
|
32
32
|
$ext(InEdit.i18n, {
|
33
|
-
|
34
|
-
|
33
|
+
Save: "Speichern",
|
34
|
+
Cancel: "Abbruch"
|
35
35
|
});
|
36
36
|
}
|
37
37
|
|
@@ -7,8 +7,8 @@ if (self.Calendar) {
|
|
7
7
|
$ext(Calendar.i18n, {
|
8
8
|
Done: 'Hecho',
|
9
9
|
Now: 'Ahora',
|
10
|
-
|
11
|
-
|
10
|
+
NextMonth: 'Mes siguiente',
|
11
|
+
PrevMonth: 'Mes precedente',
|
12
12
|
NextYear: 'Año siguiente',
|
13
13
|
PrevYear: 'Año precedente',
|
14
14
|
|
@@ -22,16 +22,16 @@ if (self.Calendar) {
|
|
22
22
|
|
23
23
|
if (self.Lightbox) {
|
24
24
|
$ext(Lightbox.i18n, {
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Close: 'Cerrar',
|
26
|
+
Prev: 'Imagen precedente',
|
27
|
+
Next: 'Imagen siguiente'
|
28
28
|
});
|
29
29
|
}
|
30
30
|
|
31
31
|
if (self.InEdit) {
|
32
32
|
$ext(InEdit.i18n, {
|
33
|
-
|
34
|
-
|
33
|
+
Save: "Guardar",
|
34
|
+
Cancel: "Borrar"
|
35
35
|
});
|
36
36
|
}
|
37
37
|
|
@@ -7,8 +7,8 @@ if (self.Calendar) {
|
|
7
7
|
$ext(Calendar.i18n, {
|
8
8
|
Done: "Fait",
|
9
9
|
Now: "Maint.",
|
10
|
-
|
11
|
-
|
10
|
+
NextMonth: "Mois prochain",
|
11
|
+
PrevMonth: "Mois précédent",
|
12
12
|
NextYear: "L'année prochain",
|
13
13
|
PrevYear: "L'année précédente",
|
14
14
|
|
@@ -22,16 +22,16 @@ if (self.Calendar) {
|
|
22
22
|
|
23
23
|
if (self.Lightbox) {
|
24
24
|
$ext(Lightbox.i18n, {
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Close: 'Fermer',
|
26
|
+
Prev: 'Image précédente',
|
27
|
+
Next: 'Image suivante'
|
28
28
|
});
|
29
29
|
}
|
30
30
|
|
31
31
|
if (self.InEdit) {
|
32
32
|
$ext(InEdit.i18n, {
|
33
|
-
|
34
|
-
|
33
|
+
Save: "Enregistrer",
|
34
|
+
Cancel: "Annuler"
|
35
35
|
});
|
36
36
|
}
|
37
37
|
|
@@ -7,8 +7,8 @@ if (self.Calendar) {
|
|
7
7
|
$ext(Calendar.i18n, {
|
8
8
|
Done: 'Kész',
|
9
9
|
Now: 'Most',
|
10
|
-
|
11
|
-
|
10
|
+
NextMonth: 'Következő hónap',
|
11
|
+
PrevMonth: 'Előző hónap',
|
12
12
|
NextYear: 'Következő év',
|
13
13
|
PrevYear: 'Előző év',
|
14
14
|
|
@@ -29,16 +29,16 @@ if (self.Calendar) {
|
|
29
29
|
|
30
30
|
if (self.Lightbox) {
|
31
31
|
$ext(Lightbox.i18n, {
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
Close: 'Bezár',
|
33
|
+
Prev: 'Előző kép',
|
34
|
+
Next: 'Következő kép'
|
35
35
|
});
|
36
36
|
}
|
37
37
|
|
38
38
|
if (self.InEdit) {
|
39
39
|
$ext(InEdit.i18n, {
|
40
|
-
|
41
|
-
|
40
|
+
Save: "Save",
|
41
|
+
Cancel: "Cancel"
|
42
42
|
});
|
43
43
|
}
|
44
44
|
|
@@ -11,8 +11,8 @@ if (self.Calendar) {
|
|
11
11
|
$ext(Calendar.i18n, {
|
12
12
|
Done: 'Done',
|
13
13
|
Now: '今日',
|
14
|
-
|
15
|
-
|
14
|
+
NextMonth: '翌月',
|
15
|
+
PrevMonth: '前の月',
|
16
16
|
NextYear: '翌年',
|
17
17
|
PrevYear: '前年',
|
18
18
|
|
@@ -26,16 +26,16 @@ if (self.Calendar) {
|
|
26
26
|
|
27
27
|
if (self.Lightbox) {
|
28
28
|
$ext(Lightbox.i18n, {
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
Close: '閉じる',
|
30
|
+
Prev: '前の画像',
|
31
|
+
Next: '次の画像'
|
32
32
|
});
|
33
33
|
}
|
34
34
|
|
35
35
|
if (self.InEdit) {
|
36
36
|
$ext(InEdit.i18n, {
|
37
|
-
|
38
|
-
|
37
|
+
Save: "保存",
|
38
|
+
Cancel: "キャンセル"
|
39
39
|
});
|
40
40
|
}
|
41
41
|
|
@@ -7,8 +7,8 @@ if (self.Calendar) {
|
|
7
7
|
$ext(Calendar.i18n, {
|
8
8
|
Done: 'Klaar',
|
9
9
|
Now: 'Nu',
|
10
|
-
|
11
|
-
|
10
|
+
NextMonth: 'Volgende maand',
|
11
|
+
PrevMonth: 'Vorige maand',
|
12
12
|
NextYear: 'Volgend jaar',
|
13
13
|
PrevYear: 'Vorig jaar',
|
14
14
|
|
@@ -22,16 +22,16 @@ if (self.Calendar) {
|
|
22
22
|
|
23
23
|
if (self.Lightbox) {
|
24
24
|
$ext(Lightbox.i18n, {
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Close: 'Sluiten',
|
26
|
+
Prev: 'Vorige afbeelding',
|
27
|
+
Next: 'Volgende afbeelding'
|
28
28
|
});
|
29
29
|
}
|
30
30
|
|
31
31
|
if (self.InEdit) {
|
32
32
|
$ext(InEdit.i18n, {
|
33
|
-
|
34
|
-
|
33
|
+
Save: "Opslaan",
|
34
|
+
Cancel: "Annuleren"
|
35
35
|
});
|
36
36
|
}
|
37
37
|
|
@@ -7,8 +7,8 @@ if (self.Calendar) {
|
|
7
7
|
$ext(Calendar.i18n, {
|
8
8
|
Done: 'Feito',
|
9
9
|
Now: 'Agora',
|
10
|
-
|
11
|
-
|
10
|
+
NextMonth: 'Próximo Mês',
|
11
|
+
PrevMonth: 'Mês Anterior',
|
12
12
|
NextYear: 'Próximo ano',
|
13
13
|
PrevYear: 'Ano anterior',
|
14
14
|
|
@@ -22,16 +22,16 @@ if (self.Calendar) {
|
|
22
22
|
|
23
23
|
if (self.Lightbox) {
|
24
24
|
$ext(Lightbox.i18n, {
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Close: 'Fechar',
|
26
|
+
Prev: 'Anterior',
|
27
|
+
Next: 'Próxima'
|
28
28
|
});
|
29
29
|
}
|
30
30
|
|
31
31
|
if (self.InEdit) {
|
32
32
|
$ext(InEdit.i18n, {
|
33
|
-
|
34
|
-
|
33
|
+
Save: "Salvar",
|
34
|
+
Cancel: "Cancelar"
|
35
35
|
});
|
36
36
|
}
|
37
37
|
|
@@ -7,8 +7,8 @@ if (self.Calendar) {
|
|
7
7
|
$ext(Calendar.i18n, {
|
8
8
|
Done: 'Готово',
|
9
9
|
Now: 'Сейчас',
|
10
|
-
|
11
|
-
|
10
|
+
NextMonth: 'Следующий месяц',
|
11
|
+
PrevMonth: 'Предыдущий месяц',
|
12
12
|
NextYear: 'Следующий год',
|
13
13
|
PrevYear: 'Предыдущий год',
|
14
14
|
|
@@ -22,16 +22,16 @@ if (self.Calendar) {
|
|
22
22
|
|
23
23
|
if (self.Lightbox) {
|
24
24
|
$ext(Lightbox.i18n, {
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Close: 'Закрыть',
|
26
|
+
Prev: 'Предыдущее изображение',
|
27
|
+
Next: 'Следующее изображение'
|
28
28
|
});
|
29
29
|
}
|
30
30
|
|
31
31
|
if (self.InEdit) {
|
32
32
|
$ext(InEdit.i18n, {
|
33
|
-
|
34
|
-
|
33
|
+
Save: "Сохранить",
|
34
|
+
Cancel: "Отмена"
|
35
35
|
});
|
36
36
|
}
|
37
37
|
|
@@ -1,16 +1,21 @@
|
|
1
1
|
/**
|
2
2
|
* RightJS UI Internationalization: Ukrainian module
|
3
3
|
*
|
4
|
+
* Copyright (C) Maxim Golubev
|
4
5
|
* Copyright (C) Nikolay Nemshilov
|
5
6
|
*/
|
6
7
|
if (self.Calendar) {
|
8
|
+
$ext(Calendar.Options, {
|
9
|
+
firstDay: 0
|
10
|
+
});
|
11
|
+
|
7
12
|
$ext(Calendar.i18n, {
|
8
|
-
Done: '
|
9
|
-
Now: '
|
10
|
-
|
11
|
-
|
12
|
-
NextYear: '
|
13
|
-
PrevYear: '
|
13
|
+
Done: 'Гаразд',
|
14
|
+
Now: 'Зараз',
|
15
|
+
NextMonth: 'Наступный мiсяць',
|
16
|
+
PrevMonth: 'Попереднiй мiсяць',
|
17
|
+
NextYear: 'Наступний рiк',
|
18
|
+
PrevYear: 'Попереднiй рiк',
|
14
19
|
|
15
20
|
dayNames: $w('Неділя Понеділок Вівторок Середа Четвер П\'ятниця Субота'),
|
16
21
|
dayNamesShort: $w('Ндл Пнд Втр Срд Чтв Птн Сбт'),
|
@@ -22,22 +27,22 @@ if (self.Calendar) {
|
|
22
27
|
|
23
28
|
if (self.Lightbox) {
|
24
29
|
$ext(Lightbox.i18n, {
|
25
|
-
|
26
|
-
|
27
|
-
|
30
|
+
Close: 'Сховати',
|
31
|
+
Prev: 'Попереднє зображення',
|
32
|
+
Next: 'Наступне зображення'
|
28
33
|
});
|
29
34
|
}
|
30
35
|
|
31
36
|
if (self.InEdit) {
|
32
37
|
$ext(InEdit.i18n, {
|
33
|
-
|
34
|
-
|
38
|
+
Save: "Зберегти",
|
39
|
+
Cancel: "Скасувати"
|
35
40
|
});
|
36
41
|
}
|
37
42
|
|
38
43
|
if (self.Colorpicker) {
|
39
44
|
$ext(Colorpicker.i18n, {
|
40
|
-
Done: '
|
45
|
+
Done: 'Гаразд'
|
41
46
|
});
|
42
47
|
}
|
43
48
|
|