Пример #1
0
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     if (!isset($this->_attributes['traversable'])) {
         $this->_attributes['traversable'] = true;
     }
     if (!isset($this->_attributes['file_types'])) {
         $this->_attributes['file_types'] = array('jpg', 'png', 'gif', 'swf');
     }
     $this->_attributes['file_types_description'] = Translation::get('TXT_FILE_TYPES_IMAGE');
     $this->_attributes['upload_url'] = App::getURLAdressWithAdminPane() . 'files/add/' . base64_encode($this->_attributes['file_source']);
     $this->_attributes['load_handler'] = 'xajax_LoadFiles_' . $this->_id;
     App::getRegistry()->xajaxInterface->registerFunction(array('LoadFiles_' . $this->_id, $this, 'LoadFiles'));
     $this->_attributes['delete_handler'] = 'xajax_DeleteFile_' . $this->_id;
     App::getRegistry()->xajaxInterface->registerFunction(array('DeleteFile_' . $this->_id, $this, 'DeleteFile'));
     $this->_attributes['type_icons'] = array('cdup' => DESIGNPATH . '_images_panel/icons/filetypes/cdup.png', 'unknown' => DESIGNPATH . '_images_panel/icons/filetypes/unknown.png', 'directory' => DESIGNPATH . '_images_panel/icons/filetypes/directory.png', 'gif' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'png' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'jpg' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'bmp' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'txt' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'doc' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'rtf' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'odt' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'htm' => DESIGNPATH . '_images_panel/icons/filetypes/document.png', 'html' => DESIGNPATH . '_images_panel/icons/filetypes/document.png', 'php' => DESIGNPATH . '_images_panel/icons/filetypes/document.png');
 }
Пример #2
0
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_attributes['file_types'] = array('octet-stream', 'jpg', 'jpeg', 'png', 'gif', 'psd', 'doc', 'csv', 'xls', 'tgz', 'rar', 'zip', 'pdf', 'avi', 'mov', 'mpg', 'mpeg');
     $this->_attributes['file_types_description'] = Translation::get('TXT_FILE_TYPES_IMAGE');
 }
Пример #3
0
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_attributes['file_types'] = array('jpg', 'jpeg', 'png', 'gif', 'swf');
     $this->_attributes['file_types_description'] = Translation::get('TXT_FILE_TYPES_IMAGE');
 }