- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
var nav = null;
function init_dev_steps(step) {
this.step = step;
this.steps_glass = ge('dev_steps_s');
this.steps_glass_c = geByClass('content', this.steps_glass)[0];
this.steps_wrap = ge('dev_steps_c');
this.steps_content = geByClass('content', this.steps_wrap)[0];
this.anim = Fx.Transitions.sineInOut;
this.move = function(to_step) {
if (to_step == (this.moving ? this.m_to : this.step)) return;
var moving = true;
if (!this.moving) {
moving = false;
this.m_height = this.steps_wrap.offsetHeight - 2;
this.m_g = (this.step - 1) * 140;
this.m_c = (1 - this.step) * 540;
this.m_cur = this.step;
this.tick = 0;
var self = this;
this.moving = setInterval(function() {
self.m_time += 13;
if (self.anim_h) {
self.tick += 1;
if (self.tick == 3) {
if (self.m_time > self.h_time) {
self.m_height = self.m_to_height;
} else {
self.m_height = self.anim(self.m_time, self.m_from_height, self.m_to_height - self.m_from_height, self.h_time);
}
self.steps_wrap.style.height = self.m_height + 'px';
self.tick = 0;
}
if (self.m_time > self.h_time) {
self.m_g = self.m_to_g;
self.m_c = self.m_to_c;
self.anim_h = false;
self.anim_v = (self.m_to_height != self.m_height);
self.m_time -= self.h_time;
} else {
self.m_g = self.anim(self.m_time, self.m_from_g, self.m_to_g - self.m_from_g, self.h_time);
self.m_c = self.anim(self.m_time, self.m_from_c, self.m_to_c - self.m_from_c, self.h_time);
if (self.diff) self.steps_glass.style.width = self.anim(self.m_time, self.from, self.diff, self.h_time)+'px';
}
self.steps_content.style.marginLeft = self.m_c + 'px';
self.steps_glass.style.marginLeft = self.m_g + 'px';
self.steps_glass_c.style.marginLeft = (-self.m_g - 2) + 'px';
self.m_cur = Math.floor(self.m_g / 140) + 1;
}
if (!self.anim_h) {
self.step = self.m_to;
//hab.setHash('devstep' + this.step);
location.hash = 'devstep' + self.step;
self.steps_wrap.style.height = self.m_to_height + 'px';
clearInterval(self.moving);
self.moving = false;
if (self.step == 3 && ge('inv_password')) focus('inv_password');
}
}, 13);
}
...
Комментарии (0) RSS
Добавить комментарий