4 include_once(
"class.ilCloudPluginGUI.php");
206 $ilTabs->activateTab(
"content");
224 $tpl->addJavaScript(
"./Modules/Cloud/js/ilCloudFileList.js");
225 $tpl->addJavaScript(
"./Modules/Cloud/js/jquery.address.js");
226 $tpl->addJavascript(
"./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
227 $tpl->addCss(
"./Modules/Cloud/templates/css/cloud.css");
229 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
233 $this->tpl_file_tree =
new ilTemplate(
"tpl.cloud_file_tree.html",
true,
true,
"Modules/Cloud");
235 $file_tree =
new ilCloudFileTree($this->getGUIClass()->object->getRootFolder(), $this->getGUIClass()->object->getRootId(), $this->getGUIClass()->object->getId(), $this->getGUIClass()->object->getServiceName());
240 $this->tpl_file_tree->setVariable(
"ASYNC_GET_BLOCK", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilobjcloudgui",
"asyncGetBlock",
true)));
241 $this->tpl_file_tree->setVariable(
"ASYNC_CREATE_FOLDER", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilcloudplugincreatefoldergui",
"asyncCreateFolder",
true)));
242 $this->tpl_file_tree->setVariable(
"ASYNC_UPLOAD_FILE", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilcloudpluginuploadgui",
"asyncUploadFile",
true)));
243 $this->tpl_file_tree->setVariable(
"ASYNC_DELETE_ITEM", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilcloudplugindeletegui",
"asyncDeleteItem",
true)));
244 $this->tpl_file_tree->setVariable(
"ROOT_ID", json_encode($file_tree->getRootNode()->getId()));
245 $this->tpl_file_tree->setVariable(
"ROOT_PATH", json_encode($file_tree->getRootNode()->getPath()));
248 $this->tpl_file_tree->setVariable(
"CURRENT_PATH", json_encode(
$_POST[
"path"]));
249 $file_tree->updateFileTree(
$_POST[
"path"]);
250 $node = $file_tree->getNodeFromPath(
$_POST[
"path"]);
251 $this->tpl_file_tree->setVariable(
"CURRENT_ID", json_encode($node->getId()));
255 $this->tpl_file_tree->setVariable(
"CURRENT_PATH", json_encode($file_tree->getRootNode()->getPath()));
256 $this->tpl_file_tree->setVariable(
"CURRENT_ID", json_encode($file_tree->getRootNode()->getID()));
258 $txt_max_file_size = $lng->txt(
"file_notice") .
" " .
ilCloudConnector::getPluginClass($this->getGUIClass()->object->getServiceName(), $this->getGUIClass()->object->getId())->getMaxFileSize() .
" MB";
259 $this->tpl_file_tree->setVariable(
"MAX_FILE_SIZE", json_encode($txt_max_file_size));
261 $tpl->setContent($this->tpl_file_tree->get());
262 $tpl->setPermanentLink(
"cld", $this->
getGuiClass()->object->getRefId(),
"_path__endPath");
298 $this->getGUIClass()->object->setAuthComplete(
false);
299 $this->getGUIClass()->object->doUpdate();
318 $ov_id =
"il_add_new_cld_item_v";
319 $ov_trigger_id = $ov_id .
"_tr";
322 $ilToolbar->setId(
'xcld_toolbar');
323 $ilToolbar->addText(
"<div class='xcld_locator'>". $toolbar_locator->getHtml().
"</div>");
324 $ilToolbar->addSeparator();
325 $ilToolbar->addButton($lng->txt(
"cld_add_new_item"),
"#",
"",
"",
"", $ov_trigger_id,
'submit emphsubmit');
326 include_once
"Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
329 $ov->addTrigger($ov_trigger_id,
"click", $ov_trigger_id,
false,
"tl",
"tr");
330 $tpl->setVariable(
"SELECT_OBJTYPE_REPOS",
'<div id="' . $ov_id .
'" class="ilOverlay ilNoDisplay">'.$list_gui_html.
'</div>');