Update gallery.js
This commit is contained in:
parent
03510c38da
commit
86aacba3b6
|
@ -16,29 +16,31 @@ function form_submit() {
|
||||||
var length_upload
|
var length_upload
|
||||||
var count_upload
|
var count_upload
|
||||||
var send_start
|
var send_start
|
||||||
$( 'form#fileupload' ).ajaxSuccess(function() {
|
if (temp_length>1){
|
||||||
if (typeof length_upload == "undefined"){
|
$( 'form#fileupload' ).ajaxSuccess(function() {
|
||||||
count_upload = 1
|
if (typeof length_upload == "undefined"){
|
||||||
length_upload = $('#file-list').find('li.template-upload').length
|
count_upload = 1
|
||||||
}
|
length_upload = $('#file-list').find('li.template-upload').length
|
||||||
else{
|
}
|
||||||
count_upload ++
|
else{
|
||||||
}
|
count_upload ++
|
||||||
if (count_upload === length_upload){
|
}
|
||||||
send_start = undefined
|
if (count_upload === length_upload){
|
||||||
$.ajax({
|
send_start = undefined
|
||||||
url : "/admin/galleries/start_upload_process",
|
$.ajax({
|
||||||
dataType : "json",
|
url : "/admin/galleries/start_upload_process",
|
||||||
type : "post",
|
dataType : "json",
|
||||||
error: function(){
|
type : "post",
|
||||||
alert('init upload process failed, please try again later.')
|
error: function(){
|
||||||
},
|
alert('init upload process failed, please try again later.')
|
||||||
success: function(){
|
},
|
||||||
window.location.href = '/admin/galleries/upload_process'
|
success: function(){
|
||||||
}
|
window.location.href = '/admin/galleries/upload_process'
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function form_only_one_submit() {
|
function form_only_one_submit() {
|
||||||
var temp_length = 1
|
var temp_length = 1
|
||||||
|
|
Loading…
Reference in New Issue