fix upload error
This commit is contained in:
parent
8c8e44809d
commit
b6a473042e
|
@ -1,18 +1,29 @@
|
||||||
|
function init_upload(temp_length){
|
||||||
|
var value = $("input[name='all_upload_length']")
|
||||||
|
if (value.val()==''){
|
||||||
|
value.val(temp_length)
|
||||||
|
$.ajax({
|
||||||
|
type : "post",
|
||||||
|
url : "/admin/galleries/init_upload",
|
||||||
|
dataType : "json",
|
||||||
|
data:{all_length: value.val()},
|
||||||
|
async: false,
|
||||||
|
global:false,
|
||||||
|
success: function()
|
||||||
|
{
|
||||||
|
},
|
||||||
|
error : function(data){
|
||||||
|
alert('init upload process failed, please try again later.')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (value.val()=='1'){
|
||||||
|
value.val('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
function form_submit() {
|
function form_submit() {
|
||||||
var temp_length = $('#file-list').find('li.template-upload').length
|
var temp_length = $('#file-list').find('li.template-upload').length
|
||||||
$.ajax({
|
init_upload(temp_length)
|
||||||
type : "post",
|
|
||||||
url : "/admin/galleries/init_upload",
|
|
||||||
dataType : "json",
|
|
||||||
data:{all_length: temp_length},
|
|
||||||
async: false,
|
|
||||||
success: function()
|
|
||||||
{
|
|
||||||
},
|
|
||||||
error : function(data){
|
|
||||||
alert('init upload process failed, please try again later.')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var length_upload
|
var length_upload
|
||||||
var count_upload
|
var count_upload
|
||||||
var send_start
|
var send_start
|
||||||
|
@ -38,25 +49,24 @@ function form_submit() {
|
||||||
window.location.href = '/admin/galleries/upload_process'
|
window.location.href = '/admin/galleries/upload_process'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
$.ajax({
|
||||||
|
url : "/admin/galleries/start_upload_process",
|
||||||
|
dataType : "json",
|
||||||
|
type : "post",
|
||||||
|
error: function(){
|
||||||
|
alert('init upload process failed, please try again later.')
|
||||||
|
},
|
||||||
|
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
|
||||||
$.ajax({
|
init_upload(temp_length)
|
||||||
type : "post",
|
|
||||||
url : "/admin/galleries/init_upload",
|
|
||||||
dataType : "json",
|
|
||||||
data:{all_length: temp_length},
|
|
||||||
async: false,
|
|
||||||
success: function()
|
|
||||||
{
|
|
||||||
},
|
|
||||||
error : function(data){
|
|
||||||
alert('init upload process failed, please try again later.')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
!function ($) {
|
!function ($) {
|
||||||
$.fn.checkListLength = function (param){
|
$.fn.checkListLength = function (param){
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- Bottom Nav -->
|
<!-- Bottom Nav -->
|
||||||
|
<input name='all_upload_length' type="hidden">
|
||||||
<div class="order-edit-notification">Images re-ordering enabled.</div>
|
<div class="order-edit-notification">Images re-ordering enabled.</div>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-left">
|
<div class="action pull-left">
|
||||||
|
|
Loading…
Reference in New Issue