public static function edit(HTMLGUIX $gui) { $BC = new Button("Abbrechen", "stop"); $BC->style("margin:10px;float:right;"); $BC->onclick("\$j('#popupListEntries .lastSelected').removeClass('lastSelected'); \$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetailsm" . $gui->object()->getClearClass() . "').animate({'width':'400px'}, 200, 'swing'); });"); $gui->addToEvent("onSave", "\$j('#popupListEntries .lastSelected').removeClass('lastSelected'); \$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetailsm" . $gui->object()->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ " . OnEvent::reloadPopup("m" . $gui->object()->getClearClass()) . " }); }); "); #$gui->displayMode("popup"); return $BC . "<div style=\"clear:both;\"></div>" . $gui->getEditHTML(); }
public function getHTML($id, $page) { $bps = $this->getMyBPSData(); $this->setParser("TodoTillDay", "Util::CLDateParser"); $this->setParser("TodoTillTime", "Util::CLTimeParser"); $this->addOrderV3("TodoTillDay", "DESC"); $this->addOrderV3("TodoTillTime", "DESC"); if ($bps != -1 and isset($bps["ownerClass"])) { $this->addAssocV3("TodoClass", "=", $bps["ownerClass"]); $this->addAssocV3("TodoClassID", "=", $bps["ownerClassID"]); } $gui = new HTMLGUIX(); $this->loadMultiPageMode($id, $page, 8); $gui->name("Aktivität"); $gui->colWidth("TodoType", "20px"); $gui->colWidth("TodoDoneTime", "20px"); $gui->object($this); $gui->parser("TodoDoneTime", "mTodoGUI::parserDone"); $gui->parser("TodoDescription", "mTodoGUI::descParser"); $gui->parser("TodoType", "TodoGUI::typesImage"); $gui->parser("TodoTillDay", "mTodoGUI::dayParser"); $gui->activateFeature("CRMEditAbove", $this); $gui->displayMode("CRMSubframeContainer"); $gui->attributes(array("TodoType", "TodoTillDay", "TodoDescription", "TodoDoneTime")); $gui->customize($this->customizer); return $gui->getBrowserHTML($id); }
public function getPopupManager($rootDir = null, $class = null, $classID = null, $usePool = false, $fieldDefaultFile = "", $uploadTargetFilename = null) { if ($rootDir != null) { $T = new HTMLTable(1); #$rel = "$rootDir"; $root = FileStorage::getFilesDir() . $rootDir; $_SESSION["BPS"]->setProperty("mFileGUI", "path", $root); $_SESSION["BPS"]->setProperty("mFileGUI", "root", $root); $F = new File($root); $F->loadMe(); if ($F->getA() == null) { if (is_writable(FileStorage::getFilesDir())) { mkdir($root, 0777, true); } else { $B = new Button("", "stop"); $B->type("icon"); $B->style("float:left;margin-right:10px;"); $T->addRow($B . "Das Verzeichnis <code>{$rootDir}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt."); die($T); } } } $bps = $this->getMyBPSData(); if (strpos($bps["path"], $bps["root"]) === false) { $bps["path"] = $bps["root"]; } if ($bps != -1 and isset($bps["path"])) { $this->setDir($bps["path"]); } $this->hideDirs(true); $gui = new HTMLGUIX(); $gui->object($this); $cols = array(); if ($fieldDefaultFile != "") { $C = new $class($classID); self::$fieldDefaultFile = array($C, $C->A($fieldDefaultFile), $fieldDefaultFile); $cols[] = "isDefault"; $gui->colWidth("isDefault", 20); $gui->parser("isDefault", "mFileGUI::parserDefault"); } $cols[] = "FileName"; $gui->attributes($cols); $gui->parser("FileName", "mFileGUI::nameParser2"); $gui->options(true, false, false); $gui->name("Datei"); $gui->addToEvent("onDelete", OnEvent::reloadPopup("mFile")); $oldFiles = ""; if ($class != null and $classID != null) { $AC = anyC::get("Datei", "DateiClassID", $classID); $AC->addAssocV3("DateiClass", "=", $class); $oldFiles = new HTMLTable(2, "Verknüpfte Dateien"); while ($F = $AC->getNextEntry()) { $BDL = new Button("Datei herunterladen", "./plugins/Files/download.png", "icon"); $BDL->onclick("windowWithRme('File','" . $F->A("DateiPath") . "','download','');"); $BDL->style("float:right;"); $oldFiles->addRow(array($BDL . $F->A("DateiName"))); } } $BPool = new Button("Pool\nanzeigen", "./lightCRM/Mail/images/attach.png"); $BPool->style("float:right;margin:10px;"); $BPool->onclick(OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'"))); if ($usePool and $rootDir) { echo $BPool . "<div style=\"clear:both;\"></div>"; if (file_exists(FileStorage::getFilesDir() . "{$class}Pool")) { echo OnEvent::script("window.setTimeout(function(){ if(\$j('#editDetailsmFileSidePanel').length > 0) return; " . OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'")) . "}, 100);"); } } $F = new HTMLForm("fileUpload", array("datei")); $s = array("path" => $bps["path"], "class" => "File"); if ($uploadTargetFilename != null) { $s["targetFilename"] = $uploadTargetFilename; } $F->setType("datei", "file", null, $s); $F->addJSEvent("datei", "onChange", OnEvent::reloadPopup("mFile")); $F->getTable()->setColWidth(1, 120); echo "<p class=\"prettyTitle\">/" . basename($bps["path"]) . "</p><p style=\"color:grey;margin-top:-15px;margin-bottom:10px;\"><small>" . dirname(realpath($bps["path"])) . "</small></p>" . $F . $gui->getBrowserHTML(-1) . $oldFiles; }
public function getHTML($id, $page) { #$bps = $this->getMyBPSData(); Aspect::registerOnetimePointCut("aboveList", "GUIFactory::getContainer", "FileManagerGUI::adviceAboveList"); /*$rootDir = null; if($bps != -1 AND isset($bps["root"])) $rootDir = $bps["root"]; if($rootDir != null){ $T = new HTMLTable(1); $rel = "specifics/$rootDir"; $root = Util::getRootPath().$rel; $_SESSION["BPS"]->setProperty("FileManagerGUI", "path", $root); $_SESSION["BPS"]->setProperty("FileManagerGUI", "root", $root); $F = new File($root); $F->loadMe(); if($F->getA() == null){ if(is_writable(Util::getRootPath()."specifics")) mkdir($root); else{ $B = new Button("", "stop"); $B->type("icon"); $B->style("float:left;margin-right:10px;"); $T->addRow($B."Das Verzeichnis <code>$rel</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt."); return $T; } } } $bps = $this->getMyBPSData(); //go again #print_r($bps); if(isset($bps["path"]) AND strpos($bps["path"], $bps["root"]) === false) $bps["path"] = $bps["root"]; if($bps != -1 AND isset($bps["path"])) $this->setDir($bps["path"]);*/ $pathing = $this->setPath(); if ($pathing !== true) { return $pathing; } $this->hideDirs(true); $gui = new HTMLGUIX(); $gui->object($this); $gui->name("Datei"); #$gui->colWidth("FileIsDir", 20); $gui->attributes(array("FileName")); #$gui->parser("FileIsDir","mFileGUI::popupIsDirParser2"); $gui->parser("FileName", "mFileGUI::nameParser2"); $gui->addToEvent("onDelete", BPS::getProperty("FileManagerGUI", "reloadFunction", "contentManager.reloadFrame('contentLeft');")); $gui->options(true, false, false); $gui->displayMode(BPS::getProperty("FileManagerGUI", "displayMode", "CRMSubframeContainer")); #$gui->displayMode("popup"); return $gui->getBrowserHTML(-1); }