Esempio n. 1
0
 /**
  * Renders JavaScript body of function.
  */
 public function renderInitJavaScript(MultipleFileUpload $upload)
 {
     $tpl = $this->createTemplate(dirname(__FILE__) . "/initJS.js");
     $tpl->sizeLimit = ini_get('upload_max_filesize') . 'B';
     $tpl->token = $upload->getToken();
     $tpl->maxFiles = $upload->maxFiles;
     $tpl->backLink = (string) $upload->form->action;
     $tpl->swfuId = $upload->getHtmlId() . "-swfuBox";
     $tpl->simUploadFiles = $upload->simUploadThreads;
     return $tpl->__toString(TRUE);
 }
Esempio n. 2
0
 /**
  * Renders JavaScript body of function.
  */
 public function renderInitJavaScript(MultipleFileUpload $upload)
 {
     $tpl = $this->createTemplate(dirname(__FILE__) . "/initJS.latte");
     $tpl->sizeLimit = $upload->maxFileSize;
     $tpl->token = $upload->getToken();
     $tpl->maxFiles = $upload->maxFiles;
     $tpl->backLink = (string) $upload->form->action;
     $tpl->uploadifyId = $upload->getHtmlId() . "-uploadifyBox";
     $tpl->simUploadFiles = $upload->simUploadThreads;
     return $tpl->__toString(TRUE);
 }
Esempio n. 3
0
 /**
  * This is reaction to flash related bug.
  * Flash has problems with "-" in ids. So
  * solution is simple, replace "-" with "_"
  * 
  * @param MultipleFileUpload $upload
  * @return type
  */
 function getHtmlIdFlashCompatible(MultipleFileUpload $upload)
 {
     return str_replace("-", "_", $upload->getHtmlId() . "-box");
 }