public function getCommandByObjectId(IdRequestObject $idRequestObject) { $object = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $idRequestObject->getId()); if ($object instanceof steam_docextern) { return new \Explorer\Commands\ViewDocument(); } }
public function frameResponse(\FrameResponseObject $frameResponseObject) { $currentUser = $GLOBALS["STEAM"]->get_current_steam_user(); if (isset($this->id)) { $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); if ($object instanceof \steam_exit) { $object = $object->get_exit(); $this->id = $object->get_id(); } } else { $object = $currentUser->get_trashbin(); $this->id = $object->get_id(); } if ($object && $object instanceof \steam_container) { $objects = $object->get_inventory(); } else { $objects = array(); } $this->getExtension()->addJS(); $this->getExtension()->addCSS(); $title = "Papierkorb"; $actionBar = new \Widgets\ActionBar(); $actionBar->setActions(array(array("name" => "Papierkorb leeren", "ajax" => array("onclick" => array("command" => "EmptyTrashbin", "params" => array("fromNameSpace" => "Trashbin"), "requestType" => "popup", "namespace" => "explorer"))))); $loader = new \Widgets\Loader(); $loader->setWrapperId("trashbinWrapper"); $loader->setMessage("Lade Daten ..."); $loader->setCommand("loadContent"); $loader->setParams(array("id" => $this->id)); $loader->setElementId("trashbinWrapper"); $loader->setType("updater"); $frameResponseObject->setTitle($title); $frameResponseObject->addWidget($actionBar); $frameResponseObject->addWidget($loader); return $frameResponseObject; }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $objectId = $params["portletId"]; $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); $dialog = new \Widgets\Dialog(); $dialog->setTitle("Bearbeiten von " . $object->get_attribute("OBJ_DESC")); $dialog->setPositionX($this->params["mouseX"]); $dialog->setPositionY($this->params["mouseY"]); $titelInput = new \Widgets\TextInput(); $titelInput->setLabel("Überschrift"); $titelInput->setData($object); //$titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC")); $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([headline])")); $dialog->addWidget($titelInput); $dialog->addWidget(new \Widgets\Clearer()); $align = new \Widgets\ComboBox(); $align->setLabel("Ausrichtung"); $align->setOptions(array(array("name" => "Linksbündig", "value" => "left"), array("name" => "Rechtsbündig", "value" => "right"), array("name" => "Zentriert", "value" => "center"))); $align->setData($object); $align->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([alignment])")); $dialog->addWidget($align); $dialog->addWidget(new \Widgets\Clearer()); $size = new \Widgets\ComboBox(); $size->setLabel("Größe"); $size->setOptions(array(array("name" => "15", "value" => "15"), array("name" => "20", "value" => "20"), array("name" => "25", "value" => "25"), array("name" => "30", "value" => "30"), array("name" => "35", "value" => "35"), array("name" => "40", "value" => "40"), array("name" => "50", "value" => "50"), array("name" => "60", "value" => "60"))); $size->setData($object); $size->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([size])")); $dialog->addWidget($size); $this->dialog = $dialog; }
private function __construct($objectId, $mySide) { $this->mySide = $mySide; $this->object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); if (!$this->object || !$this->object instanceof \steam_container) { throw new Exception("Wave side not found."); } //$controlObject = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $this->object->get_path() . "/control.xml"); if (isset($controlObject) && $controlObject instanceof \steam_document) { $xmlStr = $controlObject->get_content(); $xml = simplexml_load_string($xmlStr); $children = $xml->children(); foreach ($children as $child) { if ($child->getName() == "OBJ_DESC") { $this->object->set_attribute(OBJ_DESC, $child->asXML()); } else { if ($child->getName() == "steamweb_type") { $this->object->set_attribute("WAVEPAGE_TYPE", $child->asXML()); } else { if ($child->getName() == "steamweb_type_config") { $subChildren = $child->children(); $map = XmlHelper::xml_to_array($subChildren[0]); $this->object->set_attribute("WAVEPAGE_TYPE_CONFIG", $map[0]); } else { if ($child->getName() == "steamweb_module_ssp") { $subChildren = $child->children(); $this->object->set_attribute("WAVEPAGE_MODULE_SSP_ALBUM_NO", $subChildren[0]->asXML()); } } } } } } }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $objectId = $params["portletId"]; $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); $dialog = new \Widgets\Dialog(); $dialog->setTitle("Bearbeiten von " . $object->get_attribute("OBJ_DESC")); $termIndex = $params["termIndex"]; $titelInput = new \Widgets\TextInput(); $titelInput->setLabel("Titel"); $titelInput->setData($object); $titelInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "topic")); $dialog->addWidget($titelInput); $dialog->addWidget(new \Widgets\Clearer()); $descriptionInput = new \Widgets\TextInput(); $descriptionInput->setLabel("Beschreibung"); $descriptionInput->setData($object); $descriptionInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "description")); $dialog->addWidget($descriptionInput); $dialog->addWidget(new \Widgets\Clearer()); $loactionInput = new \Widgets\TextInput(); $loactionInput->setLabel("Ort"); $loactionInput->setData($object); $loactionInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "location")); $dialog->addWidget($loactionInput); $dialog->addWidget(new \Widgets\Clearer()); //datepicker $datepickerStart = new \Widgets\DatePicker(); $datepickerStart->setLabel("Startdatum"); $datepickerStart->setData($object); $datepickerStart->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "start_date")); $datepickerStart->setDatePicker(true); $datepickerStart->setTimePicker(false); $dialog->addWidget($datepickerStart); $dialog->addWidget(new \Widgets\Clearer()); $timepickerStart = new \Widgets\DatePicker(); $timepickerStart->setLabel("Startzeit"); $timepickerStart->setData($object); $timepickerStart->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "start_time")); $timepickerStart->setDatePicker(false); $timepickerStart->setTimePicker(true); $dialog->addWidget($timepickerStart); $dialog->addWidget(new \Widgets\Clearer()); $datepickerEnd = new \Widgets\DatePicker(); $datepickerEnd->setLabel("Enddatum"); $datepickerEnd->setData($object); $datepickerEnd->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "end_date")); $datepickerEnd->setDatePicker(true); $datepickerEnd->setTimePicker(false); $dialog->addWidget($datepickerEnd); $dialog->addWidget(new \Widgets\Clearer()); //url $linkurlInput = new \Widgets\TextInput(); $linkurlInput->setLabel("Link-Adresse"); $linkurlInput->setData($object); $linkurlInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "linkurl")); $dialog->addWidget($linkurlInput); $dialog->addWidget(new \Widgets\Clearer()); $this->dialog = $dialog; }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->id = $this->params["id"]; $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $object->move($GLOBALS["STEAM"]->get_current_steam_user()->get_attribute(USER_TRASHBIN)); }
function copy_msg($steam, $source) { //create container $copy = steam_factory::create_container($steam, $source->get_attribute(OBJ_NAME), $steam->get_login_user()); $copy->set_attribute("bid:doctype", "portlet"); $copy->set_attribute("bid:portlet", "msg"); //copy pictures if available $old_content = $source->get_attribute("bid:portlet:content"); $copy_content = array(); foreach ($old_content as $msg_id) { $message = steam_factory::get_object($steam, $msg_id); $new_message = steam_factory::create_copy($steam, $message); $new_message->move($copy); array_push($copy_content, $new_message->get_id()); $picture_id = $message->get_attribute("bid:portlet:msg:picture_id"); if ($picture_id != null || $picture_id != "") { //duplicate picture $new_picture = steam_factory::create_copy($steam, steam_factory::get_object($steam, $picture_id)); $new_picture->move($copy); //update portlet content $new_message->set_attribute("bid:portlet:msg:picture_id", $new_picture->get_id()); } } //set correct content $copy->set_attribute("bid:portlet:content", $copy_content); return $copy; }
public function getData($object) { if (is_int($object)) { $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $id); } if ($object instanceof \steam_object) { $portletContent = $object->get_attribute("bid:portlet:content"); $endDate = $portletContent["end_date"]; $startDate = $portletContent["start_date"]; switch ($this->field) { //end date /* case "end_day": return $endDate["day"]; case "end_month": return $endDate["month"]; case "end_year": return $endDate["year"]; //start date case "start_year": return $startDate["year"]; case "start_month": return $startDate["month"]; case "start_day": return $startDate["day"]; */ case "start_date": return $startDate["day"] . "." . $startDate["month"] . "." . $startDate["year"]; case "end_date": return $endDate["day"] . "." . $endDate["month"] . "." . $endDate["year"]; default: return "Error on field: {$this->field}"; } } }
public function frameResponse(\FrameResponseObject $frameResponseObject) { $portfolios = \PortfolioModel::getMyPortfolios(); $listViewer = new \Widgets\ListViewer(); if (isset($this->portfolioId)) { $portfolioObject = new \PortfolioModel(\steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->portfolioId)); } if (isset($this->artefactId)) { $artefactObject = new \ArtefactModel(\steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->artefactId)); } $steamUser = $GLOBALS["STEAM"]->get_current_steam_user(); // /** check the rights of the log-in user */ // $threadObject_allowed_read = $threadObject->check_access_read($steamUser); // $threadObject_write = $threadObject->check_access_write($steamUser); // $threadObject_annotate = $threadObject->check_access_annotate($steamUser); $listViewer->setHeadlineProvider(new HeadlineProviderDebug()); $listViewer->setContentProvider(new ContentProviderDebug()); if (isset($portfolioObject)) { $listViewer->setContent($artefacts); } else { $listViewer->setContent($portfolios); } $frameResponseObject->addWidget($listViewer); return $frameResponseObject; }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $name = $params["title"]; $column = $params["parent"]; $version = "1.0"; //check diffrent types of parameter if (is_string($column)) { $columnObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $column); } else { $columnObject = $column; } //get date $currentYear = date("Y") . ""; $nextYear = date("Y") + 1 . ""; //create $pollObject = \steam_factory::create_container($GLOBALS["STEAM"]->get_id(), $name, $columnObject); $pollTopic = "Beschreibung der Abstimmung"; $startDate = array("day" => "01", "month" => "01", "year" => $currentYear); $endDate = array("day" => "01", "month" => "01", "year" => $nextYear); $options = array("Eintrag A", "Eintrag B", "Eintrag C", "Eintrag D", "Eintrag E", "Eintrag F"); $optionsVotecount = array(0, 0, 0, 0, 0, 0); $pollContent = array("end_date" => $endDate, "options" => $options, "options_votecount" => $optionsVotecount, "poll_topic" => $pollTopic, "start_date" => $startDate); $pollObject->set_attributes(array(OBJ_DESC => $name, OBJ_TYPE => "container_portlet_bid", "bid:portlet" => "poll", "bid:portlet:version" => $version, "bid:portlet:content" => $pollContent)); }
public function getCommandByObjectId(IdRequestObject $idRequestObject) { $object = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $idRequestObject->getId()); if ($object instanceof steam_link) { return new \Explorer\Commands\Index(); } }
public function isChangeable($object) { if (is_int($object)) { $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $object); } return !$object->is_locked($this->attribute) && $object->check_access_write($GLOBALS["STEAM"]->get_current_steam_user()); }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $name = $params["title"]; $column = $params["parent"]; $version = "3.0"; //check diffrent types of parameter if (is_string($column)) { $columnObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $column); } else { $columnObject = $column; } //default values $descripton = "keine Beschreibung"; $mediaType = "movie"; //$url="http://www.bid-owl.de/download/347240/video.flv"; //test url $url = ""; //create $media = \steam_factory::create_container($GLOBALS["STEAM"]->get_id(), $name, $columnObject); //$mediaType = "image"; //$mediaType = "audio"; $mediaType = "movie"; $mediaContent = array("headline" => $name, "description" => $descripton, "media_type" => $mediaType, "url" => $url); $media->set_attributes(array(OBJ_DESC => $name, OBJ_TYPE => "container_portlet_bid", "bid:portlet" => "media", "bid:portlet:version" => $version, "bid:portlet:content" => $mediaContent)); }
public function processData(\IRequestObject $requestObject) { //create portlet $params = $requestObject->getParams(); $name = $params["title"]; $column = $params["parent"]; $version = "3.0"; //check diffrent types of parameter if (is_string($column)) { $columnObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $column); } else { $columnObject = $column; } //default values $address = "http://api.flickr.com/services/feeds/photoset.gne?set=72157603709124069&nsid=12597119@N03&lang=de-de&format=rss_200"; $address = "http://www.lehrer-online.de/rss-materialien.xml"; $num_items = "5"; $desc_length = "50"; $style = "message"; //Breit $style = "rss_feed"; //Schmal $allow_html = "checked"; //create object $portletObject = \steam_factory::create_container($GLOBALS["STEAM"]->get_id(), $name, $columnObject); $portletContent = array("address" => $address, "num_items" => $num_items, "desc_length" => $desc_length, "style" => $style, "allow_html" => $allow_html); $portletObject->set_attributes(array(OBJ_DESC => $name, OBJ_TYPE => "container_portlet_bid", "bid:portlet" => "rss", "bid:portlet:version" => $version, "bid:portlet:content" => $portletContent)); }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->id = $this->params["id"]; $this->direction = $this->params["direction"]; $this->object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $environment = $this->object->get_environment(); $inventory = $environment->get_inventory(); foreach ($inventory as $key => $element) { if ($element->get_id() == $this->id) { $index = $key; } } if ($this->direction == "up") { $environment->swap_inventory($index, $index - 1); } else { if ($this->direction == "down") { $environment->swap_inventory($index, $index + 1); } else { if ($this->direction == "top") { //$environment->swap_inventory($index, 0); for ($i = 0; $i < $index; $i++) { $environment->swap_inventory(0, $i); } } else { if ($this->direction == "bottom") { //$environment->swap_inventory($index, count($inventory)-1); for ($i = count($inventory) - 1; $i >= $index; $i--) { $environment->swap_inventory($index, $i); } } } } } }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $parentObjectId = $params["portletObjectId"]; $name = "Neue Meldung"; //check diffrent types of parameter if (is_string($parentObjectId)) { $portletObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $parentObjectId); } else { $portletObject = $parentObjectId; } $pName = "Neue Meldung"; $pContent = "Bitte geben Sie hier den Meldungstext ein."; $pMimeType = "text/plain"; $pEnvironment = $portletObject; //default is FALSE $pDescription = ""; $messageObject = \steam_factory::create_document($GLOBALS["STEAM"]->get_id(), $pName, $pContent, $pMimeType, $pEnvironment, $pDescription); $messageObject->set_attribute("bid:doctype", "portlet:msg"); $messageObject->set_attribute("bid:portlet:msg:link_open", "checked"); $messageObject->set_attribute("bid:portlet:msg:link_url", ""); $messageObject->set_attribute("bid:portlet:msg:link_url_label", ""); $messageObject->set_attribute("bid:portlet:msg:picture_alignment", "left"); $messageObject->set_attribute("bid:portlet:msg:picture_width", ""); $this->addMessageIdToPortlet($portletObject, $messageObject); }
function check_permissions($user, $oid, $password) { $query = "select v from i_users where k='" . $user . "'"; $result = mysql_query($query); $row = mysql_fetch_row($result); $uid = $result[0]; // if we dont have uid we can get this from i_users $query = "select v from i_security_cache where k='" . $oid . ":" . $uid . "'"; $result = mysql_query($query); $row = mysql_fetch_row($result); $permissions = $row[0]; // read permission is bit "1" if (($permissions & 1) == 1) { return 1; } else { $permission_denied = $permissions >> 16; if (($permission_denied & 1) == 1) { return 0; } else { $STEAM = new steam_connector(STEAM_SERVER, STEAM_PORT, $user, $password); $document = steam_factory::get_object($STEAM->get_id(), (int) $oid, CLASS_OBJECT); if ($document->check_access_read($STEAM->get_current_steam_user()) === 1) { return 1; } } } return 0; }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $objectId = $params["portletObjectId"]; $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); $dialog = new \Widgets\Dialog(); //$dialog->setTitle("Eigenschaften von " . $object->get_name()); $dialog->setTitle("Bearbeiten von Nachrichten " . $object->get_attribute("OBJ_DESC")); $dialog->setPositionX($this->params["mouseX"]); $dialog->setPositionY($this->params["mouseY"]); //create widgets $list1 = new \Widgets\SelectList(); $button1 = new \Widgets\Button(); $button2 = new \Widgets\Button(); //get messages $inventory = $object->get_inventory(); foreach ($inventory as $message) { if ($message->get_attribute("DOC_TYPE") != "") { continue; } $list1->addOption($message->get_id(), $message->get_name()); } $button1->setLabel("neue Nachricht oben anfügen"); $button2->setLabel("neue Nachricht unten anfügen"); //add widgets to dialog $dialog->addWidget($list1); $dialog->addWidget($button1); $dialog->addWidget($button2); $this->dialog = $dialog; }
private function getCategoryTitle($object, $categoryIndex) { $objectId = $object->get_id(); $topicObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); $content = $topicObject->get_attribute("bid:portlet:content"); return $content[$categoryIndex]["title"]; }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $objectId = $params["portletId"]; $appointmentObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); $terms = $appointmentObject->get_attribute("bid:portlet:content"); //get date $currentDay = date("d") . ""; $currentMonth = date("m") . ""; $currentYear = date("Y") . ""; //new term parts $description = "Beschreibung"; $endDate = array("day" => "", "month" => "", "year" => ""); $linkurl = ""; $location = "Ort"; $startDate = array("day" => $currentDay, "month" => $currentMonth, "year" => $currentYear); $startTime = array("hour" => "12", "minutes" => "00"); $topic = "Neuer Termin"; //compose term $newTerm = array("description" => $description, "end_date" => $endDate, "linkurl" => $linkurl, "location" => $location, "start_date" => $startDate, "start_time" => $startTime, "topic" => $topic); if ($terms == "") { $terms = array(); } $terms[] = $newTerm; $appointmentObject->set_attribute("bid:portlet:content", $terms); }
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject) { $idRequestObject = new \IdRequestObject(); $idRequestObject->setId($this->id); $extensions = \ExtensionMaster::getInstance()->getExtensionByType("IObjectExtension"); $commands = array(); foreach ($extensions as $extension) { if (strstr(strtolower(get_class($extension)), "portlet")) { $command = $extension->getCreateNewCommand($idRequestObject); if ($command) { $commands[] = $command; } } } $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $dialog = new \Widgets\Dialog(); $dialog->setTitle("Erstelle ein neues Objekt in Spalte " . $object->get_name()); $dialog->setCloseButtonLabel(null); $dialog->setPositionX($this->params["mouseX"]); $dialog->setPositionY($this->params["mouseY"]); $html = "<div id=\"wizard\" style=\"margin-left: 20px; margin-right: 20px\">"; foreach ($commands as $command) { $namespaces = $command->getExtension()->getUrlNamespaces(); $html .= "<a href=\"\" onclick=\"sendRequest('{$command->getCommandName()}', {'id':{$this->id}}, 'wizard', 'wizard', null, null, '{$namespaces[0]}');return false;\" title=\"{$command->getExtension()->getObjectReadableDescription()}\"><img src=\"{$command->getExtension()->getObjectIconUrl()}\"> {$command->getExtension()->getObjectReadableName()}</a><br>"; } $html .= "<div style=\"float:right\"><a class=\"button pill negative\" onclick=\"closeDialog();return false;\" href=\"#\">Abbrechen</a></div></div><div id=\"wizard_wrapper\"></div>"; $rawHtml = new \Widgets\RawHtml(); $rawHtml->setHtml($html); $dialog->addWidget($rawHtml); $ajaxResponseObject->setStatus("ok"); $ajaxResponseObject->addWidget($dialog); return $ajaxResponseObject; }
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject) { $count = count($this->selection); $explorerAssetUrl = \Explorer::getInstance()->getAssetUrl(); if (!in_array($this->id, $this->selection) || in_array($this->id, $this->selection) && $count == 1) { $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $env = $object->get_environment(); $inventory = $env->get_inventory(); foreach ($inventory as $key => $element) { if ($element->get_id() == $this->id) { $index = $key; } } $popupMenu = new \Widgets\PopupMenu(); if ($object instanceof \steam_trashbin) { $items = array(array("name" => "Papierkorb leeren", "command" => "EmptyTrashbin", "namespace" => "explorer", "params" => "{'id':'{$this->id}'}")); } else { if ($env instanceof \steam_trashbin) { $items = array(array("raw" => "<a href=\"#\" onclick=\"sendMultiRequest('EmptyTrashbin', getParamsArray({}), getElementIdArray(''), 'updater', null, null, 'explorer', 'Lösche Objekte ...', 0, getSelectionAsArray().length); return false;\">{$count} Objekte löschen<img src=\"\"></a>"), array("raw" => "<a href=\"#\" onclick=\"sendMultiRequest('Delete', getParamsArray({}), getElementIdArray(''), 'updater', null, null, 'explorer', 'Lösche Objekte ...', 0, getSelectionAsArray().length); return false;\">{$count} Objekte wiederherstellen<img src=\"\"></a>")); } else { $copyIcon = $explorerAssetUrl . "icons/menu/copy.png"; $cutIcon = $explorerAssetUrl . "icons/menu/cut.png"; $referIcon = $explorerAssetUrl . "icons/menu/refer.png"; $trashIcon = $explorerAssetUrl . "icons/menu/trash.png"; $hideIcon = $explorerAssetUrl . "icons/menu/hide.png"; $bookmarkIcon = \Bookmarks::getInstance()->getAssetUrl() . "icons/bookmark.png"; $schoolBookmarkIcon = \School::getInstance()->getAssetUrl() . "icons/schoolbookmark.png"; $upIcon = $explorerAssetUrl . "icons/menu/up.png"; $downIcon = $explorerAssetUrl . "icons/menu/down.png"; $topIcon = $explorerAssetUrl . "icons/menu/top.png"; $bottomIcon = $explorerAssetUrl . "icons/menu/bottom.png"; $renameIcon = $explorerAssetUrl . "icons/menu/rename.png"; $editIcon = $explorerAssetUrl . "icons/menu/edit.png"; $propertiesIcon = $explorerAssetUrl . "icons/menu/properties.png"; $rightsIcon = $explorerAssetUrl . "icons/menu/rights.png"; $blankIcon = $explorerAssetUrl . "icons/menu/blank.png"; $items = array(array("name" => "Kopieren<img src=\"{$copyIcon}\">", "command" => "Copy", "namespace" => "explorer", "params" => "{'id':'{$this->id}'}"), array("name" => "Ausschneiden<img src=\"{$cutIcon}\">", "command" => "Cut", "namespace" => "explorer", "params" => "{'id':'{$this->id}'}"), array("name" => "Referenzieren<img src=\"{$referIcon}\">", "command" => "Reference", "namespace" => "explorer", "params" => "{'id':'{$this->id}'}"), array("name" => "Löschen<img src=\"{$trashIcon}\">", "command" => "Delete", "namespace" => "explorer", "params" => "{'id':'{$this->id}'}"), array("name" => "Darstellung<img src=\"{$blankIcon}\">", "direction" => "left", "menu" => array(array("raw" => " <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'transparent'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/transparent.png\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'red'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/red.png\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'orange'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/orange.png\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'yellow'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/yellow.png\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'green'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/green.png\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'blue'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/blue.png\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'purple'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/purple.png\"></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"#\" onclick=\"sendRequest('ChangeColorLabel', {'id':'{$this->id}', 'color':'grey'}, 'listviewer-overlay', 'updater', null, null, 'explorer'); return false;\"><img src=\"{$explorerAssetUrl}icons/grey.png\"></a>"))), array("name" => "Umsortieren<img src=\"{$blankIcon}\">", "direction" => "left", "menu" => array($index != 0 ? array("name" => "Eins nach oben<img src=\"{$upIcon}\">", "command" => "Order", "namespace" => "explorer", "params" => "{'id':'{$this->id}', 'direction':'up'}") : "", $index < count($inventory) - 1 ? array("name" => "Eins nach unten<img src=\"{$downIcon}\">", "command" => "Order", "namespace" => "explorer", "params" => "{'id':'{$this->id}', 'direction':'down'}") : "", $index != 0 ? array("name" => "Ganz nach oben<img src=\"{$topIcon}\">", "command" => "Order", "namespace" => "explorer", "params" => "{'id':'{$this->id}', 'direction':'top'}") : "", $index < count($inventory) - 1 ? array("name" => "Ganz nach unten<img src=\"{$bottomIcon}\">", "command" => "Order", "namespace" => "explorer", "params" => "{'id':'{$this->id}', 'direction':'bottom'}") : "")), array("name" => "SEPARATOR"), array("raw" => "<a href=\"#\" onclick=\"event.stopPropagation(); removeAllDirectEditors();if (!jQuery('#{$this->id}_1').hasClass('directEditor')) { jQuery('#{$this->id}_1').addClass('directEditor').html(''); var obj = new Object; obj.id = '{$this->id}'; sendRequest('GetDirectEditor', obj, '{$this->id}_1', 'updater',null,null,'explorer'); } jQuery('.popupmenuwapper').parent().html('');jQuery('.open').removeClass('open'); return false;\">Umbenennen<img src=\"{$renameIcon}\"></a>"), $object instanceof \steam_container && $object->get_attribute("bid:presentation") === "index" ? array("name" => "Listenansicht<img src=\"{$blankIcon}\">", "link" => PATH_URL . "Explorer/Index/" . $this->id . "/?view=list") : "", $object instanceof \steam_document && strstr($object->get_attribute(DOC_MIME_TYPE), "text") ? array("name" => "Bearbeiten<img src=\"{$editIcon}\">", "link" => PATH_URL . "Explorer/EditDocument/" . $this->id . "/") : "", array("name" => "Eigenschaften...<img src=\"{$propertiesIcon}\">", "command" => "Properties", "namespace" => "explorer", "params" => "{'id':'{$this->id}'}", "type" => "popup"), array("name" => "Rechte...<img src=\"{$rightsIcon}\">", "command" => "Sanctions", "namespace" => "explorer", "params" => "{'id':'{$this->id}'}", "type" => "popup")); } } $popupMenu->setItems($items); $popupMenu->setPosition(round($this->x + $this->width - 155) . "px", round($this->y + $this->height + 4) . "px"); $popupMenu->setWidth("170px"); } else { $copyIcon = $explorerAssetUrl . "icons/menu/copy.png"; $cutIcon = $explorerAssetUrl . "icons/menu/cut.png"; $referIcon = $explorerAssetUrl . "icons/menu/refer.png"; $trashIcon = $explorerAssetUrl . "icons/menu/trash.png"; $hideIcon = $explorerAssetUrl . "icons/menu/hide.png"; $blankIcon = $explorerAssetUrl . "icons/menu/blank.png"; $popupMenu = new \Widgets\PopupMenu(); $items = array(array("raw" => "<a href=\"#\" onclick=\"sendMultiRequest('EmptyTrashbin', getParamsArray({}), getElementIdArray(''), 'updater', null, null, 'explorer', 'Lösche Objekte ...', 0, getSelectionAsArray().length); return false;\">{$count} Objekte löschen<img src=\"{$trashIcon}\"></a>"), array("raw" => "<a href=\"#\" onclick=\"sendMultiRequest('Delete', getParamsArray({}), getElementIdArray(''), 'updater', null, null, 'explorer', 'Lösche Objekte ...', 0, getSelectionAsArray().length); return false;\">{$count} Objekte wiederherstellen<img src=\"{$trashIcon}\"></a>")); $popupMenu->setItems($items); $popupMenu->setPosition(round($this->x + $this->width - 155) . "px", round($this->y + $this->height + 4) . "px"); $popupMenu->setWidth("180px"); } $ajaxResponseObject->setStatus("ok"); $ajaxResponseObject->addWidget($popupMenu); return $ajaxResponseObject; }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $objectId = $params["messageObjectId"]; $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); $dialog = new \Widgets\Dialog(); $dialog->setTitle("Meldung bearbeiten"); $dialog->setPositionX($this->params["mouseX"]); $dialog->setPositionY($this->params["mouseY"]); //$dialog->setWidth(450); $clearer = new \Widgets\Clearer(); $titelInput = new \Widgets\TextInput(); $titelInput->setLabel("Überschrift"); $titelInput->setData($object); $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_NAME")); $dialog->addWidget($titelInput); $dialog->addWidget($clearer); $titelInput = new \Widgets\TextInput(); $titelInput->setLabel("Untertitel"); $titelInput->setData($object); $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC")); $dialog->addWidget($titelInput); $dialog->addWidget($clearer); $contentText = new \Widgets\Textarea(); $contentText->setLabel("Inhalt"); $contentText->setTextareaClass("mce-small"); $contentText->setWidth(480); $contentText->setData($object); $contentText->setContentProvider(\Widgets\DataProvider::contentProvider()); $dialog->addWidget($contentText); $dialog->addWidget($clearer); $dialog->addWidget($clearer); $titelInput = new \Widgets\TextInput(); $titelInput->setLabel("Link-Text"); $titelInput->setData($object); $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:msg:link_url_label")); $dialog->addWidget($titelInput); $dialog->addWidget($clearer); $titelInput = new \Widgets\TextInput(); $titelInput->setLabel("Link-Adresse"); $titelInput->setData($object); $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:msg:link_url")); $dialog->addWidget($titelInput); $dialog->addWidget($clearer); $widget = new \Widgets\Checkbox(); $widget->setLabel("Link in einem neuen Fenster öffnen"); $widget->setData($object); $widget->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:msg:link_open")); $widget->setCheckedValue("checked"); $widget->setUncheckedValue(""); $dialog->addWidget($widget); //create widgets //$button1 = new \Widgets\Button(); //TODO: add a edit box for the message here //$button1->setLabel("abschicken"); //add widgets to dialog //$dialog->addWidget($button1); $this->dialog = $dialog; }
private function getEntryField($object, $entryIndex) { $objectId = $object->get_id(); $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); $portletContent = $object->get_attribute("bid:portlet:content"); $optionsDescription = $portletContent["options"]; return $optionsDescription[$entryIndex]; }
public function getCommandByObjectId(IdRequestObject $idRequestObject) { $object = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $idRequestObject->getId()); $type = getObjectType($object); if (array_search($type, array("referenceFolder", "userHome", "groupWorkroom", "room", "container")) !== false) { return new \Explorer\Commands\Index(); } }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->portfolioId = $this->params["portfolio"]; $this->checked = $this->params["checked"]; $this->artefactId = $this->params["artefactId"]; $this->artefact = new \ArtefactModel(\steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->artefactId)); }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->id = $this->params["id"]; $this->color = $this->params["color"]; $this->object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $this->object->set_attribute("OBJ_COLOR_LABEL", $this->color); }
public function __construct($objectId, $myEngine) { $this->myEngine = $myEngine; $this->object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); if (!$this->object || !$this->object instanceof \steam_container) { throw new Exception("Wave side not found."); } }
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject) { $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $dialog = new \Widgets\Dialog(); $dialog->setTitle("Erstelle neues Thema in »" . getCleanName($object) . "«"); $ajaxForm = new \Widgets\AjaxForm(); $ajaxForm->setSubmitCommand("CreateTopic"); $ajaxForm->setSubmitNamespace("Forum"); $ajaxForm->setHtml(<<<END \t<input type="hidden" name="id" value="{$this->id}"> \t<div class="widgets_lable">Überschrift:</div> \t<div class="widgets_textinput"><input type="text" value="" name="title"></div><br clear="all"> \t<div class="widgets_lable">Inhalt:</div> \t<div class="widgets_textarea"><textarea rows="10" style="width:100%" class="mce-small" value="" name="content" id="content"></textarea><br clear="all"> \t<script type="text/javascript"> \t\t \tvar mce_defaults = { \t \t\t\tmode : "specific_textareas", \t \t\t\t \t \t\t\t// General options \t\t\t\t\ttheme : "advanced", \t\t\t\t\tcontent_css : "{PATH_URL}widgets/css/tinymce.css", \t\t\t\t\tskin: "o2k7", \t\t\t\t\tremove_linebreaks: false, \t\t\t\t convert_urls : false, \t\t\t\t verify_html: "false", \t\t\t\t\tlanguage: "de", \t\t\t\t\t \t\t\t\t\t// Theme options \t\t\t\t\ttheme_advanced_buttons3 : "", \t\t\t\t\ttheme_advanced_buttons4 : "", \t\t\t\t\ttheme_advanced_toolbar_location : "top", \t\t\t\t\ttheme_advanced_toolbar_align : "left", \t\t\t\t\ttheme_advanced_statusbar_location : "none", \t\t\t\t\ttheme_advanced_resizing : false, \t\t\t\t\t \t \t}; \t \t \t \t \t \t\tload("mce", function() { \t\t\t\t\ttinyMCE.init(\$.extend({ \t\t\t\t\t\teditor_selector: "mce-small", \t\t\t\t\t\tplugins : "emotions,paste,noneditable", \t\t\t\t\t\t// Theme options \t\t\t\t\t\ttheme_advanced_buttons1 : "bold,italic,underline,|,bullist,numlist,|,link,unlink,|,forecolor,removeformat,|,undo,redo,pasteword", \t\t\t\t\t\ttheme_advanced_buttons2 : "" \t\t\t\t\t}, mce_defaults)); \t \t\t}); \t \t</script> END ); $dialog->addWidget($ajaxForm); $dialog->setCloseButtonLabel(null); $ajaxResponseObject->setStatus("ok"); $ajaxResponseObject->addWidget($dialog); return $ajaxResponseObject; }
public function processData(\IRequestObject $requestObject) { $params = $requestObject->getParams(); $objectId = $params["portletId"]; $topicObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId); //delete the object $trashbin = $GLOBALS["STEAM"]->get_current_steam_user()->get_attribute("USER_TRASHBIN"); $topicObject->move($trashbin); }