本文整理汇总了PHP中AjaxResponseObject::addWidget方法的典型用法代码示例。如果您正苦于以下问题:PHP AjaxResponseObject::addWidget方法的具体用法?PHP AjaxResponseObject::addWidget怎么用?PHP AjaxResponseObject::addWidget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AjaxResponseObject
的用法示例。
在下文中一共展示了AjaxResponseObject::addWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
if (!isset($this->id)) {
$ajaxResponseObject->setStatus("ok");
$jswrapper = new \Widgets\JSWrapper();
$ids = "";
$elements = "";
foreach ($this->elements as $key => $element) {
if (count($this->elements) > $key + 1) {
$ids .= "{\"id\":\"" . $element->get_id() . "\", \"env\":\"" . $this->env . "\"}, ";
$elements .= "\"\", ";
} else {
$ids .= "{\"id\":\"" . $element->get_id() . "\", \"env\":\"" . $this->env . "\"}";
$elements .= "\"\"";
}
}
$js = "sendMultiRequest('Paste', jQuery.parseJSON('[{$ids}]'), jQuery.parseJSON('[{$elements}]'), 'updater', null, null, 'explorer', 'Füge Objekt ein ...', 0, " . count($this->elements) . ");";
$jswrapper->setJs($js);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
} else {
$ajaxResponseObject->setStatus("ok");
$clipboardModel = new \Explorer\Model\Clipboard($this->clipboard);
$jswrapper = new \Widgets\JSWrapper();
$js = "document.getElementById('clipboardIconbarWrapper').innerHTML = '" . $clipboardModel->getIconbarHtml() . "';";
if (count($this->clipboard->get_inventory()) == 0) {
$js .= "window.location.reload();";
}
$jswrapper->setJs($js);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
}
}
示例2: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$user = $GLOBALS["STEAM"]->get_current_steam_user();
if (!isset($this->params["group_course"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
if ($this->params["group_course"] == 1) {
if (!isset($this->params["course"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
$course = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["course"]);
$subgroups = $course->get_subgroups();
foreach ($subgroups as $subgroup) {
if ($subgroup->get_name() == "learners") {
$group = $subgroup;
}
if ($subgroup->get_name() == "staff") {
$staffgroup = $subgroup;
}
}
} else {
if (!isset($this->params["group"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
$group = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["group"]);
if ($this->params["group_admin"] == 0) {
$staffgroup = $user;
} else {
$staffgroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["group_admin"]);
}
}
// create data structure and set access rights
$rapidfeedback = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $this->params["title"], $group->get_workroom(), $this->params["desc"]);
$rapidfeedback->set_attribute("OBJ_TYPE", "RAPIDFEEDBACK_CONTAINER");
$rapidfeedback->set_attribute("RAPIDFEEDBACK_GROUP", $group);
$rapidfeedback->set_attribute("RAPIDFEEDBACK_STAFF", $staffgroup);
$rapidfeedback->set_attribute("RAPIDFEEDBACK_ADMIN_SURVEY", 1);
$rapidfeedback->set_sanction_all($group);
$rapidfeedback->set_sanction_all($staffgroup);
$ajaxResponseObject->setStatus("ok");
$jswrapper = new \Widgets\JSWrapper();
$jswrapper->setJs(<<<END
\t\tcloseDialog();
END
);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
}
示例3: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$ajaxUploader = new \Widgets\AjaxUploader();
$ajaxUploader->setSizeLimit(return_bytes(ini_get('post_max_size')));
$ajaxUploader->setNamespace("Explorer");
$ajaxUploader->setDestId($this->id);
$rawHTML = new \Widgets\RawHtml();
$rawHTML->setHtml("<div style=\"float:right\"><a class=\"button pill negative\" onclick=\"closeDialog();return false;\" href=\"#\">Schließen</a></div>");
$ajaxResponseObject->addWidget($ajaxUploader);
$ajaxResponseObject->addWidget($rawHTML);
return $ajaxResponseObject;
}
示例4: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$listViewer = new \Widgets\ListViewer();
$listViewer->setHeadlineProvider(new HeadlineProvider());
$listViewer->setContentProvider(new ContentProvider());
$listViewer->setColorProvider(new ColorProvider());
$listViewer->setContentFilter(new ContentFilter());
$listViewer->setContent($this->objects);
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->addWidget($listViewer);
$tipsy = new \Widgets\Tipsy();
$ajaxResponseObject->addWidget($tipsy);
return $ajaxResponseObject;
}
示例5: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$dialog = new \Widgets\Dialog();
$dialog->setTitle("Erstelle ein neues Artefakt");
$dialog->setCloseButtonLabel(null);
$submitCommand = "CreateArtefact";
$submitNamespace = "Portfolio";
$html = "<div id=\"wizard\" style=\"margin-left: 20px; margin-right: 20px\">";
$html .= <<<END
\t<form id="ajaxform" onsubmit="sendAjaxFrom(); return false;">
\t\t<input type="hidden" name="id" value="{$this->id}">
\t\t<div class="widgets_lable">Titel:</div>
\t\t<div class="widgets_textinput"><input type="text" value="" name="name"></div><br clear="all">
\t\t<div class="widgets_lable">Beschreibung:</div>
\t\t<div class="widgets_textinput"><input type="text" value="" name="desc"></div><br clear="all">
\t</form>
\t<script>
\tfunction sendAjaxFrom() {
\t\tform = formToObject("ajaxform");
\t\tsendRequest("{$submitCommand}", form, "wizard", "wizard", null, null, "{$submitNamespace}");
\t}
\t</script>
END;
$html .= "<div style=\"float:right\"><a href=\"#\" class=\"button pill left\" onclick=\"sendAjaxFrom(); return false;\"><b>Weiter</b></a><a class=\"button pill negative\" onclick=\"closeDialog();return false;\" href=\"#\">Abbrechen</a></div></div>";
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($html);
$dialog->addWidget($rawHtml);
$ajaxResponseObject->addWidget($dialog);
return $ajaxResponseObject;
}
示例6: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$idRequestObject = new \IdRequestObject();
/* $extensions = \ExtensionMaster::getInstance()->getExtensionByType("IObjectExtension");
$commands = array();
foreach ($extensions as $extension) {
$command = $extension->getCreateNewCommand($idRequestObject);
if ($command) {
$commands[] = $command;
}
}*/
$dialog = new \Widgets\Dialog();
$dialog->setTitle("Create a new artefact.");
$dialog->setPositionX($this->params["mouseX"]);
$dialog->setPositionY($this->params["mouseY"]);
$html = "<div style=\"margin-left: 20px; margin-right: 20px\">";
$noteImageUrl = $this->getExtension()->getAssetUrl() . "images/note.gif";
$fileImageUrl = $this->getExtension()->getAssetUrl() . "images/file.gif";
$html .= "<a href=\"\" onclick=\"sendRequest('NewUploadForm', {}, 'wizard_wrapper', 'wizard');return false;\" title=\"Create an artefact from a file.\"><img src=\"{$fileImageUrl}\"> Artefact from file (e.g. document, image, ...)</a><br>";
$html .= "<a href=\"\" onclick=\"sendRequest('NewTextForm', {}, 'wizard_wrapper', 'wizard');return false;\" title=\"Create a artefact with text.\"><img src=\"{$noteImageUrl}\"> Text </a><br>";
$html .= "</div><div id=\"wizard_wrapper\"></div>";
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($html);
$dialog->addWidget($rawHtml);
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->addWidget($dialog);
return $ajaxResponseObject;
}
示例7: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
//icons
$copyIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/copy.png";
$cutIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/cut.png";
$referIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/refer.png";
$trashIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/trash.png";
$hideIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/hide.png";
$bookmarkIcon = \Bookmarks::getInstance()->getAssetUrl() . "icons/bookmark.png";
$schoolBookmarkIcon = \School::getInstance()->getAssetUrl() . "icons/schoolbookmark.png";
$upIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/up.png";
$downIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/down.png";
$topIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/top.png";
$bottomIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/bottom.png";
$renameIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/rename.png";
$editIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/edit.png";
$propertiesIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/properties.png";
$rightsIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/rights.png";
$blankIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/blank.png";
// <img src=\"{$editIcon}\">
$popupMenu = new \Widgets\PopupMenu();
$items = array(array("name" => "Bearbeiten <img src=\"{$editIcon}\">", "command" => "EditTopic", "namespace" => "PortletTopic", "params" => "{'portletId':'{$this->id}'}", "type" => "popup"), array("name" => "Kategorie einfügen <img src=\"{$blankIcon}\">", "command" => "CreateCategory", "namespace" => "PortletTopic", "params" => "{'portletId':'{$this->id}'}", "type" => "popup"), array("name" => "Umsortieren <img src=\"{$blankIcon}\">", "direction" => "left", "menu" => array(array("name" => "Eins nach oben <img src=\"{$upIcon}\">", "command" => "Order", "namespace" => "Portal", "params" => "{'portletId':'{$this->id}','order':'up'}", "type" => "popup"), array("name" => "Eins nach unten <img src=\"{$downIcon}\">", "command" => "Order", "namespace" => "Portal", "params" => "{'portletId':'{$this->id}','order':'down'}", "type" => "popup"), array("name" => "Ganz nach oben <img src=\"{$topIcon}\">", "command" => "Order", "namespace" => "Portal", "params" => "{'portletId':'{$this->id}','order':'first'}", "type" => "popup"), array("name" => "Ganz nach unten <img src=\"{$bottomIcon}\">", "command" => "Order", "namespace" => "Portal", "params" => "{'portletId':'{$this->id}','order':'last'}", "type" => "popup"))), array("name" => "SEPARATOR"), array("name" => "Kopieren <img src=\"{$copyIcon}\">", "command" => "PortletCopy", "namespace" => "Portal", "params" => "{'id':'{$this->id}','user':'{$this->user}'}", "type" => "popup"), array("name" => "Ausschneiden <img src=\"{$cutIcon}\">", "command" => "PortletCut", "namespace" => "Portal", "params" => "{'id':'{$this->id}','user':'{$this->user}'}", "type" => "popup"), array("name" => "Referenzieren <img src=\"{$referIcon}\">", "command" => "PortletReference", "namespace" => "Portal", "params" => "{'id':'{$this->id}','user':'{$this->user}'}", "type" => "popup"), array("name" => "Löschen <img src=\"{$trashIcon}\">", "command" => "Delete", "namespace" => "PortletTopic", "params" => "{'portletId':'{$this->id}'}", "type" => "popup"), array("name" => "SEPARATOR"), 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("150px");
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->addWidget($popupMenu);
return $ajaxResponseObject;
}
示例8: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$order = json_decode($this->order);
if (is_array($order)) {
$worksheet = new \Worksheet\Worksheet($this->id);
$blocks = $worksheet->getBlocks();
if ($blocks and count($blocks) > 0) {
foreach ($blocks as $block) {
/* get position of current block in posted order */
$key = array_search($block->getId(), $order);
if ($key !== false) {
/* use the found key for order attribute */
$block->setOrder($key);
} else {
/* current blocks id was not found in posted order */
$block->setOrder(-1);
}
}
}
}
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml("");
$ajaxResponseObject->addWidget($rawHtml);
$ajaxResponseObject->setStatus("ok");
return $ajaxResponseObject;
}
示例9: ajaxResponse
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;
}
示例10: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
//icons
$copyIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/copy.png";
$cutIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/cut.png";
$referIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/refer.png";
$deleteIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/delete.png";
$hideIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/hide.png";
$bookmarkIcon = \Bookmarks::getInstance()->getAssetUrl() . "icons/bookmark.png";
$schoolBookmarkIcon = \School::getInstance()->getAssetUrl() . "icons/schoolbookmark.png";
$upIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/up.png";
$downIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/down.png";
$topIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/top.png";
$bottomIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/bottom.png";
$renameIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/rename.png";
$editIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/edit.png";
$propertiesIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/properties.png";
$rightsIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/rights.png";
$blankIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/blank.png";
$popupMenu = new \Widgets\PopupMenu();
$items = array(array("name" => "Bearbeiten <img src=\"{$editIcon}\">", "command" => "EditMessage", "namespace" => "PortletMsg", "params" => "{'portletObjectId':'{$this->portletObjectId}','messageObjectId':'{$this->messageObjectId}'}", "type" => "popup"), array("name" => "Bild bearbeiten <img src=\"{$blankIcon}\">", "command" => "EditMessageImage", "namespace" => "PortletMsg", "params" => "{'portletObjectId':'{$this->portletObjectId}','messageObjectId':'{$this->messageObjectId}'}", "type" => "popup"), array("name" => "Umsortieren <img src=\"{$blankIcon}\">", "direction" => "left", "menu" => array(array("name" => "Eins nach oben <img src=\"{$upIcon}\">", "command" => "OrderMessage", "namespace" => "PortletMsg", "params" => "{'portletObjectId':'{$this->portletObjectId}','messageObjectId':'{$this->messageObjectId}','order':'up'}", "type" => "popup"), array("name" => "Eins nach unten <img src=\"{$downIcon}\">", "command" => "OrderMessage", "namespace" => "PortletMsg", "params" => "{'portletObjectId':'{$this->portletObjectId}','messageObjectId':'{$this->messageObjectId}','order':'down'}", "type" => "popup"), array("name" => "Ganz nach oben <img src=\"{$topIcon}\">", "command" => "OrderMessage", "namespace" => "PortletMsg", "params" => "{'portletObjectId':'{$this->portletObjectId}','messageObjectId':'{$this->messageObjectId}','order':'first'}", "type" => "popup"), array("name" => "Ganz nach unten <img src=\"{$bottomIcon}\">", "command" => "OrderMessage", "namespace" => "PortletMsg", "params" => "{'portletObjectId':'{$this->portletObjectId}','messageObjectId':'{$this->messageObjectId}','order':'last'}", "type" => "popup"))), array("name" => "Löschen <img src=\"{$deleteIcon}\">", "command" => "DeleteMessage", "namespace" => "PortletMsg", "params" => "{'portletObjectId':'{$this->portletObjectId}','messageObjectId':'{$this->messageObjectId}'}", "type" => "popup"));
$popupMenu->setItems($items);
$popupMenu->setPosition(round($this->x + $this->width - 155) . "px", round($this->y + $this->height + 4) . "px");
$popupMenu->setWidth("150px");
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->addWidget($popupMenu);
return $ajaxResponseObject;
}
示例11: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$dialog = new \Widgets\Dialog();
$dialog->setTitle("Erstelle ein neues Portfolio");
$textInput = new \Widgets\TextInput();
$ajaxForm = new \Widgets\AjaxForm();
$ajaxForm->addWidget($textInput);
$ajaxForm->setSubmitCommand("CreatePortfolio");
$ajaxForm->setSubmitNamespace("Portfolio");
$ajaxForm->setHtml(<<<END
\t<div id="wizard_wrapper">
\t<input type="hidden" name="id" value="{$this->id}">
\t<div class="widgets_lable">Name:</div>
\t<div class="widgets_textinput"><input type="text" value="" name="name"></div><br clear="all">
\t<div class="widgets_lable">Beschreibung:</div>
\t<div class="widgets_textinput"><input type="text" value="" name="desc"></div><br clear="all">
\t</div>
END
);
$dialog->addWidget($ajaxForm);
$ajaxResponseObject->addWidget($dialog);
return $ajaxResponseObject;
/*
$ajaxUploader = new \Widgets\AjaxUploader();
$ajaxUploader->setSizeLimit(return_bytes(ini_get('post_max_size')));
$ajaxUploader->setBackend(PATH_URL . "explorer/");
$ajaxUploader->setEnvId($this->id);
//ROLF
$ajaxUploader->setCommand("Upload");
$ajaxUploader->setNamespace("Portfolio");
$ajaxResponseObject->addWidget($ajaxUploader);
*/
}
示例12: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$data = json_decode($this->data);
if (is_array($data)) {
$worksheet = new \Worksheet\Worksheet($this->id);
if ($worksheet->getStatus() == 1) {
$blocks = $worksheet->getBlocks();
if ($blocks and count($blocks) > 0) {
$i = 0;
foreach ($blocks as $block) {
$d = array();
foreach ($data[$i] as $key => $value) {
$d[$key] = $value;
}
$block->setSolution($d);
$i++;
}
}
}
}
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml("");
$ajaxResponseObject->addWidget($rawHtml);
$ajaxResponseObject->setStatus("ok");
return $ajaxResponseObject;
}
示例13: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
//icons
$copyIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/copy.png";
$cutIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/cut.png";
$referIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/refer.png";
$deleteIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/delete.png";
$hideIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/hide.png";
$bookmarkIcon = \Bookmarks::getInstance()->getAssetUrl() . "icons/bookmark.png";
$schoolBookmarkIcon = \School::getInstance()->getAssetUrl() . "icons/schoolbookmark.png";
$upIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/up.png";
$downIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/down.png";
$topIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/top.png";
$bottomIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/bottom.png";
$renameIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/rename.png";
$editIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/edit.png";
$propertiesIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/properties.png";
$rightsIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/rights.png";
$blankIcon = \Explorer::getInstance()->getAssetUrl() . "icons/menu/blank.png";
$popupMenu = new \Widgets\PopupMenu();
$items = array(array("name" => "Bearbeiten <img src=\"{$editIcon}\">", "command" => "EditTerm", "namespace" => "PortletAppointment", "params" => "{'portletId':'{$this->id}','termIndex':'{$this->termIndex}'}", "type" => "popup"), array("name" => "Löschen <img src=\"{$deleteIcon}\">", "command" => "DeleteTerm", "namespace" => "PortletAppointment", "params" => "{'portletId':'{$this->id}','termIndex':'{$this->termIndex}'}", "type" => "popup"));
$popupMenu->setItems($items);
$popupMenu->setPosition(round($this->x + $this->width - 155) . "px", round($this->y + $this->height + 4) . "px");
$popupMenu->setWidth("150px");
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->addWidget($popupMenu);
return $ajaxResponseObject;
}
示例14: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml(\Bookmarks\Model\Bookmark::getMarkerHtml($this->id));
$ajaxResponseObject->addWidget($rawHtml);
return $ajaxResponseObject;
}
示例15: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$objDesc = trim($this->object->get_attribute(OBJ_DESC));
if ($objDesc === 0 || $objDesc === "") {
$this->object->set_attribute(OBJ_DESC, $this->object->get_name());
}
$titelInput = new \Widgets\TextInput();
$titelInput->setData($this->object);
$titelInput->setFocus(true);
$titelInput->setContentProvider(new NameAttributeDataProvider("OBJ_NAME", getCleanName($this->object, -1)));
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setJs("jQuery(document).click(function() {removeAllDirectEditors();})");
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->addWidget($titelInput);
$ajaxResponseObject->addWidget($rawHtml);
return $ajaxResponseObject;
}