2009-08-25 12:16:42 +00:00
|
|
|
// JavaScript Document
|
|
|
|
var embed_check = baseurl+"/actions/embed_form_verifier.php";
|
2010-12-29 09:41:11 +00:00
|
|
|
function check_embed_code(objId)
|
|
|
|
{
|
2011-05-04 15:19:19 +00:00
|
|
|
var theForm = '#embedUploadForm'+objId;
|
|
|
|
if($(theForm+" #embed_code").val() == "")
|
2009-08-25 12:16:42 +00:00
|
|
|
alert("Embed code was empty");
|
2011-05-04 15:19:19 +00:00
|
|
|
else if($(theForm+" #duration").val() == "")
|
2009-08-25 12:16:42 +00:00
|
|
|
alert("Please enter video duration");
|
|
|
|
else
|
|
|
|
{
|
2011-05-04 15:19:19 +00:00
|
|
|
|
2009-08-25 12:16:42 +00:00
|
|
|
$.post(embed_check,
|
|
|
|
{
|
2011-05-04 15:19:19 +00:00
|
|
|
embed_code : encode64($(theForm+" #embed_code").val()),
|
|
|
|
duration : $(theForm+" #duration").val(),
|
2009-08-25 12:16:42 +00:00
|
|
|
file_name : file_name,
|
2011-05-04 15:19:19 +00:00
|
|
|
thumb_file : $(theForm+" #thumb_file").val(),
|
|
|
|
verify_embed : 'yes'
|
2009-08-25 12:16:42 +00:00
|
|
|
},
|
|
|
|
|
2011-05-04 15:19:19 +00:00
|
|
|
|
2009-08-25 12:16:42 +00:00
|
|
|
function (data) {
|
|
|
|
if(data.err)
|
|
|
|
{
|
|
|
|
alert(data.err);
|
|
|
|
}else{
|
2011-05-04 15:19:19 +00:00
|
|
|
$(theForm).submit();
|
2009-08-25 12:16:42 +00:00
|
|
|
}
|
|
|
|
}, "json");
|
|
|
|
}
|
|
|
|
}
|