Файл: view/join/js/js_join_box.js
Строк: 115
<?php
addClass(boxLayerBG, 'bg_dark');
box.setOptions({hideButtons: true, width: 580, bodyStyle: 'padding: 0px; border: 0px;', onClean: function() {
if (cur.uiJoinBoxSex) cur.uiJoinBoxSex.destroy();
}, onHide: function() {
removeClass(boxLayerBG, 'bg_dark');
}, onShow: function() {
addClass(boxLayerBG, 'bg_dark');
}});
box.changed = true;
box.setOptions({width: 580, onClean: function() {
if (cur.uiJoinBoxSex) cur.uiJoinBoxSex.destroy();
}, hideButtons: true, bodyStyle: 'padding: 0'});
extend(cur, {
joinSubmitStart: function() {
if (isVisible(curBox().progress)) return;
var fname = trim(val('join_box_first_name')), lname = trim(val('join_box_last_name')), sex;
if (isVisible('join_box_sex_row')) {
sex = intval(cur.uiJoinBoxSex.val());
if (!sex) return cur.uiJoinBoxSex.showDefaultList();
}
ajax.post('join.php', {act: 'start', fname: fname, lname: lname, sex: sex, from: 'login?act=mobile&hash=5d8ed5ceb4ccabc4'}, {onDone: function(result, data) {
if (result == 1 || result == 2) {
if (data) {
val('join_box_msg', data);
/*
if (!isVisible('join_box_msg')) {
slideDown('join_box_msg', 100);
} else {
animate('join_box_msg', {backgroundColor: '#F4EBBD'}, 100, animate.pbind('join_box_msg', {backgroundColor: '#F9F6E7'}, 2000));
}
*/
animate('join_box_msg', {backgroundColor: '#F4EBBD', borderColor: '#D4BC4C'}, 100, animate.pbind('join_box_msg', {backgroundColor: '#F7F7F7', borderColor: '#F7F7F7'}, 2000));
}
if (result == 1) return elfocus('join_box_first_name');
return elfocus('join_box_last_name');
} else if (result == 3) {
if (cur.uiJoinSex) return cur.uiSex.showDefaultList();
curBox().showProgress();
stManager.add(['ui_controls.css', 'ui_controls.js'], function() {
cur.joinInitSex(data);
cur.uiJoinBoxSex.showDefaultList();
curBox().hideProgress();
});
}
}, showProgress: lockButton.pbind('join_submit_button'), hideProgress: unlockButton.pbind('join_submit_button')});
},
joinInitSex: function(data) {
cur.uiJoinBoxSex = new Dropdown(ge('join_box_sex'), data, {
width: 160,
placeholder: 'Укажите пол',
placeholderColor: '#777',
zeroPlaceholder: true
});
cur.uiJoinBoxSex.val([0, '']);
cur.uiJoinBoxSex.val([0, '']);
show('join_box_sex_row');
}
});
placeholderSetup('join_box_first_name', {back: true});
placeholderSetup('join_box_last_name', {back: true});
setTimeout(elfocus.pbind('join_box_first_name'), 0);
var sd = false;
if (sd) cur.joinInitSex(sd);
?>