Showing link to upload file and nanogong form see #4493

skala
Julio Montoya 13 years ago
parent d967a6d8bf
commit 46f7ffabf1
  1. 26
      main/inc/lib/nanogong.lib.php

@ -421,15 +421,13 @@ class Nanogong {
function check_gong() {
//var record = document.getElementById("nanogong");
var recorder;
var java_enabled = navigator.javaEnabled()
return java_enabled;
}
function show_simple_upload_form() {
$("#no_nanogong_div").show();
$("#nanogong_div").hide();
//$("#nanogong_div").hide();
$("#preview").hide();
}
@ -539,7 +537,6 @@ class Nanogong {
$preview_file = $this->show_audio_file(true, true);
$preview_file = Display::div($preview_file, array('id' => 'preview', 'style' => 'text-align:center; padding-left: 25px;'));
$html .= '<center>';
@ -548,17 +545,6 @@ class Nanogong {
$html .= Display::return_icon('microphone.png', get_lang('PressRecordButton'),'', ICON_SIZE_BIG);
$html .='<br />';
$html .= '<div id="no_nanogong_div">';
//$html .= Display::return_message(get_lang('BrowserNotSupportNanogongSend'), 'warning');
$html .= '<form id="form_nanogong_simple" class="form-search" action="'.$url.'" name="form_nanogong" method="POST" enctype="multipart/form-data">';
$html .= '<input type="file" name="file">';
$html .= '<a href="#" class="btn" onclick="upload_file()" />'.get_lang('UploadFile').'</a>';
$html .= '</form>';
$html .= '</div>';
$html .= '<div id="nanogong_div">';
$html .= '<applet id="nanogong" archive="'.api_get_path(WEB_LIBRARY_PATH).'nanogong/nanogong.jar" code="gong.NanoGong" width="250" height="40" align="middle">';
@ -585,8 +571,18 @@ class Nanogong {
$html .= '<a href="#" class="btn" onclick="send_voice()" />'.get_lang('SendRecord').'</a>';
$html .= '</form></div>';
$html .= Display::url(get_lang('ProblemsRecordingUploadYourOwnAudioFile'), 'javascript:void(0)', array('onclick' => 'show_simple_upload_form();'));
$html .= '<br /><br /><div id="no_nanogong_div">';
//$html .= Display::return_message(get_lang('BrowserNotSupportNanogongSend'), 'warning');
$html .= '<form id="form_nanogong_simple" class="form-search" action="'.$url.'" name="form_nanogong" method="POST" enctype="multipart/form-data">';
$html .= '<input type="file" name="file">';
$html .= '<a href="#" class="btn" onclick="upload_file()" />'.get_lang('UploadFile').'</a>';
$html .= '</form>';
$html .= '</div>';
$html .= '</center>';

Loading…
Cancel
Save