本文整理汇总了PHP中AjaxResponseObject::setStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP AjaxResponseObject::setStatus方法的具体用法?PHP AjaxResponseObject::setStatus怎么用?PHP AjaxResponseObject::setStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AjaxResponseObject
的用法示例。
在下文中一共展示了AjaxResponseObject::setStatus方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
if (isset($this->params["categoryIndex"]) && isset($this->params["value"])) {
$data = array();
$oldValue = $this->getEntryField($this->object, $this->categoryIndex, $this->entryIndex, $this->field);
try {
$this->setEntryField($this->object, $this->categoryIndex, $this->entryIndex, $this->field, $this->value);
} catch (steam_exception $e) {
$data["oldValue"] = $oldValue;
$data["error"] = $e->get_message();
$data["undo"] = false;
$ajaxResponseObject->setStatus("ok");
$ajaxResponseObject->setData($data);
return $ajaxResponseObject;
}
$ajaxResponseObject->setStatus("ok");
$newValue = $this->getEntryField($this->object, $this->categoryIndex, $this->entryIndex, $this->field);
if ($newValue === $this->params["value"]) {
$data["oldValue"] = $oldValue;
$data["newValue"] = $newValue;
$data["error"] = "none";
$data["undo"] = true;
} else {
$data["oldValue"] = $oldValue;
$data["error"] = "Data could not be saved.";
$data["undo"] = false;
}
$ajaxResponseObject->setData($data);
} else {
$ajaxResponseObject->setStatus("error");
}
return $ajaxResponseObject;
}
示例2: 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;
}
}
示例3: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$pyramidPosition = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$user = $GLOBALS["STEAM"]->get_current_steam_user();
if ($this->params["action"] == "join") {
// changing group (only) in the group choosing phase
$pyramid = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["pyramid"]);
$phase = $pyramid->get_attribute("PYRAMIDDISCUSSION ACTCOL");
if ($phase == 0) {
if ($this->params["formergroup"] == $this->params["newgroup"]) {
$formergroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["formergroup"]);
$formergroup->remove_member($user);
} else {
if ($this->params["formergroup"] == 0) {
$newgroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["newgroup"]);
$newgroup->add_member($user);
} else {
$formergroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["formergroup"]);
$formergroup->remove_member($user);
$newgroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["newgroup"]);
$newgroup->add_member($user);
}
}
}
$ajaxResponseObject->setStatus("ok");
return $ajaxResponseObject;
} else {
$read_position_states = array();
$read_position_states[$user->get_id()] = 1;
$pyramidPosition->set_attribute("PYRAMIDDISCUSSION_POS_READ_STATES", $read_position_states);
$column = $pyramidPosition->get_attribute("PYRAMIDDISCUSSION_COLUMN");
$row = $pyramidPosition->get_attribute("PYRAMIDDISCUSSION_ROW");
$dialog = new \Widgets\Dialog();
$dialog->setTitle("Bearbeite Position " . $column . "-" . $row);
$dialog->setWidth("600");
$clearer = new \Widgets\Clearer();
$titleInput = new \Widgets\TextInput();
$titleInput->setLabel("Titel");
$titleInput->setData($pyramidPosition);
$titleInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
$dialog->addWidget($titleInput);
$dialog->addWidget($clearer);
$textareaWidget = new \Widgets\Textarea();
$textareaWidget->setTextareaClass("mce-small");
$textareaWidget->setWidth("600");
$textareaWidget->setData($pyramidPosition);
$textareaWidget->setContentProvider(\Widgets\DataProvider::contentProvider());
$dialog->addWidget($textareaWidget);
$dialog->addWidget($clearer);
$ajaxResponseObject->addWidget($dialog);
$ajaxResponseObject->setStatus("ok");
return $ajaxResponseObject;
}
}
示例4: 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;
}
示例5: 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;
}
示例6: 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;
}
示例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)
{
//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;
}
示例9: 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;
}
示例10: 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);
*/
}
示例11: 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;
}
示例12: 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;
}
示例13: 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;
}
示例14: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$ajaxForm = new \Widgets\AjaxForm();
$ajaxForm->setSubmitCommand("Create");
$ajaxForm->setSubmitNamespace("Wave");
$ajaxForm->setHtml(<<<END
<style type="text/css">
.attribute {
clear: left;
padding: 5px 2px 5px 2px;
}
.attributeName {
float: left;
padding-right: 20px;
text-align: right;
width: 80px;
}
.attributeNameRequired {
float: left;
padding-right: 20px;
text-align: right;
font-weight: bold;
width: 80px;
}
.attributeValue {
float: left;
width: 300px;
}
.attributeValue .text, .attributeValue textarea {
wwidth: 100px;
}
.attributeValueColumn {
float: left;
position: relative;
text-align: center;
}
</style>
<hr>
<input type="hidden" name="id" value="{$this->id}">
<div class="attribute">
\t<div class="attributeNameRequired">Titel*:</div>
\t<div><input type="text" class="text" value="" name="title"></div>
</div>
<div class="attribute">
\t<div class="attributeNameRequired">Slogen:</div>
\t<div><input type="text" class="text" value="" name="slogan"></div>
</div>
END
);
$ajaxResponseObject->addWidget($ajaxForm);
return $ajaxResponseObject;
}
示例15: ajaxResponse
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;
}