modified : category selection issue fixed
This commit is contained in:
parent
0d84c22c0f
commit
c7b42e9b42
1 changed files with 8 additions and 1 deletions
|
@ -74,6 +74,8 @@
|
|||
var totalFiles = 0;
|
||||
var baseurl = '{$baseurl}';
|
||||
var config_for_mp4 = '{$config_for_mp4}';
|
||||
var defaultCategory = "{$cbvid->get_default_cid()}";
|
||||
alert(defaultCategory);
|
||||
if('{$uploaderDetails.uploadScriptPath}'!=''){
|
||||
var uploadurl = '{$uploaderDetails.uploadScriptPath}';
|
||||
}else{
|
||||
|
@ -159,7 +161,12 @@
|
|||
$(oneUploadForm).find("input[name='title']").val(files[i].name.slice(0, -4));
|
||||
|
||||
$(oneUploadForm).find("textarea#desc").val(files[i].name.slice(0, -4));
|
||||
$(oneUploadForm).find("input[name='category[]']:first").attr('checked', 'checked');
|
||||
var categories = $(oneUploadForm).find("input[name='category[]']");
|
||||
$.each(categories,function(i,v){
|
||||
if ($(this).val() == defaultCategory ){
|
||||
$(this).attr('checked', 'checked');
|
||||
};
|
||||
});
|
||||
wrapperDiv.appendChild(oneUploadForm);
|
||||
uploadForms.push(wrapperDiv);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue