- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 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
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
$(document).ready(function() {
var pan_button = $('#pan_uploadButton'), interval;
var celo_button = $('#celo_uploadButton'), interval;
var face_button = $('#face_uploadButton'), interval;
var l_prof_button = $('#l_prof_uploadButton'), interval;
var r_prof_button = $('#r_prof_uploadButton'), interval;
var upper_button = $('#upper_uploadButton'), interval;
var lower_button = $('#lower_uploadButton'), interval;
var add1_button = $('#add1_uploadButton'), interval;
var add2_button = $('#add2_uploadButton'), interval;
var add3_button = $('#add3_uploadButton'), interval;
var add4_button = $('#add4_uploadButton'), interval;
var order = $('#ord').val();
$.ajax_upload(pan_button, order, 1, {
action : 'stars_orders/uploadAjx/',
name : 'userfile',
onSubmit : function(file, ext) {
//$("#uploadButton font").text('Загрузка');
/*
* Выключаем кнопку на время загрузки файла
*/
this.disable();
},
onComplete : function(file, response) {
//$("#uploadButton font").text('Загрузить');
var path = "templates/star_smile/images/"+response;
var htmls = '<img width="187" height="124" src="'+path+'" />';
$("#pan_img").html(htmls);
$(".pan_loading").html('Изменить');
$(".pan_deleting").html('Удалить');
// снова включаем кнопку
this.enable();
// показываем что файл загружен
//$("<li>" + file + "</li>").appendTo("#files");
}
});
$.ajax_upload(celo_button, order, 2, {
action : 'stars_orders/uploadAjx/',
name : 'userfile',
onSubmit : function(file, ext) {
//$("#uploadButton font").text('Загрузка');
/*
* Выключаем кнопку на время загрузки файла
*/
this.disable();
},
onComplete : function(file, response) {
//$("#uploadButton font").text('Загрузить');
var path = "templates/star_smile/images/"+response;
var htmls = '<img width="187" height="124" src="'+path+'" />';
$("#celo_img").html(htmls);
$(".celo_loading").html('Изменить');
$(".celo_deleting").html('Удалить');
// снова включаем кнопку
this.enable();
// показываем что файл загружен
//$("<li>" + file + "</li>").appendTo("#files");
}
});
$.ajax_upload(face_button, order, 3, {
action : 'stars_orders/uploadAjx/',
name : 'userfile',
onSubmit : function(file, ext) {
//$("#uploadButton font").text('Загрузка');
/*
* Выключаем кнопку на время загрузки файла
*/
this.disable();
},
onComplete : function(file, response) {
//$("#uploadButton font").text('Загрузить');
var path = "templates/star_smile/images/"+response;
var htmls = '<img width="187" height="124" src="'+path+'" />';
$("#face_img").html(htmls);
$(".face_loading").html('Изменить');
$(".face_deleting").html('Удалить');
// снова включаем кнопку
this.enable();
// показываем что файл загружен
//$("<li>" + file + "</li>").appendTo("#files");
}
});
$.ajax_upload(l_prof_button, order, 4, { ... и вот так вот 11 раз
покороче нельзя было?