• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/uf/controller.php
  • Класс: BitrixDiskUfController
  • Вызов: Controller::processActionOpenDialog
protected function processActionOpenDialog()
{
	$selectedService = '';
	$fakeMove = $this->request->getQuery('wish') === 'fakemove';
	$enabledMultiSelect = $this->request->getQuery('multiselect') !== 'N';
	if($this->request->getQuery('cloudImport'))
	{
		$list = $this->listCloudStorages();
		$types = array(
			'cloud' => array(
				'id' => 'cloud',
				'order' => 4,
			),
		);
		$selectedService = $this->request->getQuery('service');
	}
	else
	{
		$list = $this->listStorages();
		if(!$list)
		{
			$this->sendJsonErrorResponse();
		}
		$types = array(
			'recently_used' => array(
				'id' => 'recently_used',
				'order' => 1,
				'searchable' => false,
			),
			'user' => array(
				'id' => 'user',
				'order' => 2,
				'searchable' => false,
			),
			'common' => array(
				'id' => 'common',
				'name' => Loc::getMessage('DISK_UF_CONTROLLER_SHARED_DOCUMENTS'),
				'order' => 3,
				'searchable' => false,
			),
			'group' => array(
				'id' => 'group',
				'name' => Loc::getMessage('DISK_UF_CONTROLLER_MY_GROUPS'),
				'order' => 4,
				'searchable' => false,
			),
		);
		if($fakeMove)
		{
			unset($types['recently_used']);
		}
	}

	$dialogName = $this->request->getQuery('dialogName');
	if ($dialogName == '')
	{
		$dialogName = 'DiskFileDialog';
	}

	$dialogTitle = Loc::getMessage($fakeMove? 'DISK_UF_CONTROLLER_SAVE_DOCUMENT_TITLE' : 'DISK_UF_CONTROLLER_SELECT_DOCUMENT_TITLE');
	if (!$fakeMove && !$enabledMultiSelect)
		$dialogTitle = Loc::getMessage('DISK_UF_CONTROLLER_SELECT_ONE_DOCUMENT_TITLE');

	$js = "
		
			";

	$this->sendResponse($js);
}