コード例 #1
0
    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);
        */
    }
コード例 #2
0
    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;
    }
コード例 #3
0
ファイル: NewTopic.class.php プロジェクト: rolwi/koala
    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;
    }
コード例 #4
0
ファイル: NewElement.class.php プロジェクト: rolwi/koala
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     $object = $currentUser->get_workroom();
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Eigenschaften von " . $object->get_name());
     $dialog->setContent("Nulla dui purus, eleifend vel, consequat non, <br>\n\t\t\t\t\t\t\tdictum porta, nulla. Duis ante mi, laoreet ut,  <br>\n\t\t\t\t\t\t\tcommodo eleifend, cursus nec, lorem. Aenean eu est.  <br>\n\t\t\t\t\t\t\tEtiam imperdiet turpis. Praesent nec augue. Curabitur  <br>\n\t\t\t\t\t\t\tligula quam, rutrum id, tempor sed, consequat ac, dui. <br>\n\t\t\t\t\t\t\tVestibulum accumsan eros nec magna. Vestibulum vitae dui. <br>\n\t\t\t\t\t\t\tVestibulum nec ligula et lorem consequat ullamcorper.  <br>\n\t\t\t\t\t\t\tClass aptent taciti sociosqu ad litora torquent per  <br>\n\t\t\t\t\t\t\tconubia nostra, per inceptos hymenaeos. Phasellus  <br>\n\t\t\t\t\t\t\teget nisl ut elit porta ullamcorper. Maecenas  <br>\n\t\t\t\t\t\t\ttincidunt velit quis orci. Sed in dui. Nullam ut  <br>\n\t\t\t\t\t\t\tmauris eu mi mollis luctus. Class aptent taciti  <br>\n\t\t\t\t\t\t\tsociosqu ad litora torquent per conubia nostra, per  <br>\n\t\t\t\t\t\t\tinceptos hymenaeos. Sed cursus cursus velit. Sed a  <br>\n\t\t\t\t\t\t\tmassa. Duis dignissim euismod quam. Nullam euismod  <br>\n\t\t\t\t\t\t\tmetus ut orci. Vestibulum erat libero, scelerisque et,  <br>\n\t\t\t\t\t\t\tporttitor et, varius a, leo.");
     $dialog->setButtons(array(array("name" => "speichern", "href" => "save")));
     return $dialog->getHtml();
 }
コード例 #5
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 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;
 }
コード例 #6
0
ファイル: NewElement.class.php プロジェクト: rolwi/koala
    public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
    {
        $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
        $ajaxForm = new \Widgets\AjaxForm();
        $ajaxForm->setSubmitCommand("CreateFolder");
        $ajaxForm->setSubmitNamespace("Bookmarks");
        $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;
}

.attributeValue {
  float: left;
  width: 300px;
}

.attributeValue .text, .attributeValue textarea {
  width: 300px;
}

.attributeValueColumn {
  float: left;
  position: relative;
  text-align: center;
}

</style>
<input type="hidden" name="id" value="{$this->id}">
<div class="attribute">
\t<div class="attributeName">Ordnername:</div>
\t<div class="attributeValue"><input type="text" class="text" value="" name="name"></div>
</div>
<br>
END
);
        $ajaxResponseObject->setStatus("ok");
        $dialog = new \Widgets\Dialog();
        $dialog->setTitle("Erstelle neuen Ordner in »" . "Lesezeichen" . "«");
        $dialog->addWidget($ajaxForm);
        $dialog->setCloseButtonLabel(null);
        $ajaxResponseObject->addWidget($dialog);
        //$idRequestObject = new \IdRequestObject();
        //$idRequestObject->setId($this->id);
        return $ajaxResponseObject;
    }
コード例 #7
0
ファイル: Addpicture.class.php プロジェクト: rolwi/koala
 public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
 {
     $ajaxResponseObject->setStatus("ok");
     $ajaxDialog = new \Widgets\Dialog();
     $ajaxDialog->setTitle("Neue Bilder hinzufügen");
     $ajaxUploader = new \Widgets\AjaxUploader();
     $ajaxUploader->setNamespace("explorer");
     $ajaxUploader->setDestId($this->id);
     $ajaxDialog->addWidget($ajaxUploader);
     $ajaxResponseObject->addWidget($ajaxDialog);
     return $ajaxResponseObject;
 }
コード例 #8
0
    public function processData(\IRequestObject $requestObject)
    {
        $params = $requestObject->getParams();
        $objectId = $params["messageObjectId"];
        $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
        $oldImageId = $object->get_attribute("bid:portlet:msg:picture_id");
        $dialog = new \Widgets\Dialog();
        $dialog->setTitle("Meldungsbild bearbeiten");
        $dialog->setPositionX($this->params["mouseX"]);
        $dialog->setPositionY($this->params["mouseY"]);
        //$dialog->setWidth(450);
        $emptyImageUrl = PATH_URL . "portletMsg/asset/empty.jpg";
        $ajaxUploader = new \Widgets\AjaxUploader();
        if ($oldImageId !== 0) {
            $imgWidget = new \Widgets\RawHtml();
            $imgWidget->setHtml("Um ein Bild hochzuladen ziehen sie eine Datei auf dieses Feld oder doppelklicken sie hier.<br><img id=\"uploaderImage\" src=\"" . PATH_URL . "download/document/{$oldImageId}\"></img>");
            $ajaxUploader->setPreview($imgWidget);
        } else {
            $imgWidget = new \Widgets\RawHtml();
            $imgWidget->setHtml("Um ein Bild hochzuladen ziehen sie eine Datei auf dieses Feld oder doppelklicken sie hier.<br><img id=\"uploaderImage\" src=\"{$emptyImageUrl}\"></img>");
            $ajaxUploader->setPreview($imgWidget);
        }
        $ajaxUploader->setSizeLimit(return_bytes(ini_get('post_max_size')));
        $ajaxUploader->setNamespace("PortletMsg");
        $ajaxUploader->setCommand("UploadImage");
        $ajaxUploader->setDestId($object->get_id());
        $ajaxUploader->setMultiUpload(false);
        $ajaxUploader->setOnComplete("function(id, fileName, responseJSON){document.getElementById('uploaderImage').src = '" . PATH_URL . "download/document/' + responseJSON.oid; jQuery('#uploaderImage').addClass('saved')}");
        $dialog->addWidget($ajaxUploader);
        $raw = new \Widgets\RawHtml();
        $raw->setHtml(<<<END
\t\t<a href="#" class="button pill negative" onclick="sendRequest('DeleteImage', {'id':{$object->get_id()}}, '', 'data', null, function() {document.getElementById('uploaderImage').src = '{$emptyImageUrl}'; jQuery('#uploaderImage').addClass('saved')}, 'PortletMsg');">Bild löschen</a>
END
);
        $dialog->addWidget($raw);
        $dialog->addWidget(new \Widgets\Clearer());
        $radioButton = new \Widgets\RadioButton();
        $radioButton->setLabel("Bildposition");
        $radioButton->setOptions(array(array("name" => "links", "value" => "left"), array("name" => "nicht umfließend", "value" => "none"), array("name" => "rechts", "value" => "right")));
        $radioButton->setData($object);
        $radioButton->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:msg:picture_alignment"));
        $dialog->addWidget($radioButton);
        $dialog->addWidget(new \Widgets\Clearer());
        $sizeInput = new \Widgets\TextInput();
        $sizeInput->setLabel("Bildbreite");
        $sizeInput->setData($object);
        $sizeInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:msg:picture_width"));
        $dialog->addWidget($sizeInput);
        $this->dialog = $dialog;
    }
コード例 #9
0
ファイル: NewPortlet.class.php プロジェクト: rolwi/koala
 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
0
ファイル: EditMsgPortlet.class.php プロジェクト: rolwi/koala
 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;
 }
コード例 #11
0
ファイル: EditPosition.class.php プロジェクト: rolwi/koala
 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;
     }
 }
コード例 #12
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 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"));
     $titelInput = new \Widgets\TextInput();
     $titelInput->setLabel("Überschrift");
     $titelInput->setData($object);
     $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
     $dialog->addWidget($titelInput);
     $dialog->addWidget(new \Widgets\Clearer());
     $align = new \Widgets\ComboBox();
     $align->setLabel("Sortierung");
     $align->setOptions(array(array("name" => "Frühe Termine zuerst anzeigen", "value" => "earliest_first"), array("name" => "Späte Termine zuerst anzeigen", "value" => "latest_first")));
     $align->setData($object);
     $align->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:app:app_order"));
     $dialog->addWidget($align);
     $this->dialog = $dialog;
 }
コード例 #13
0
 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     //		$objectId = $params["messageObjectId"];
     //		$object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     //var_dump($params);
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Portfolio Importieren");
     $dialog->setPositionX($this->params["mouseX"]);
     $dialog->setPositionY($this->params["mouseY"]);
     $ajaxUploader = new \Widgets\AjaxUploader();
     $imgWidget = new \Widgets\RawHtml();
     $imgWidget->setHtml("Um ein Portfolio zu importieren ziehen sie die Datei auf dieses Feld oder doppelklicken sie hier.<br>");
     //$ajaxUploader->setPreview($imgWidget);
     //		}
     $ajaxUploader->setSizeLimit(return_bytes(ini_get('post_max_size')));
     $ajaxUploader->setNamespace("Portfolio");
     $ajaxUploader->setCommand("UploadImport");
     $ajaxUploader->setDestId($params["id"]);
     $ajaxUploader->setMultiUpload(false);
     //		$ajaxUploader->setOnComplete("function(id, fileName, responseJSON){document.getElementById('uploaderArtefact').src = '" . PATH_URL . "download/document/' + responseJSON.oid; jQuery('#uploaderArtefact').addClass('saved')}");
     $ajaxUploader->setOnComplete("function(id, fileName, responseJSON){location.reload();}");
     $dialog->addWidget($ajaxUploader);
     //		$dialog->addWidget($raw);
     $dialog->addWidget(new \Widgets\Clearer());
     $this->dialog = $dialog;
 }
コード例 #14
0
ファイル: Comment.class.php プロジェクト: rolwi/koala
 public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
 {
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     $currentUserName = $currentUser->get_name();
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Eintrag diskutieren");
     $dialog->setDescription("...");
     $dialog->setPositionX($this->params["mouseX"]);
     $dialog->setPositionY($this->params["mouseY"]);
     // get discussion thread between portfolio owner and current user or create empty thread
     $threads = $this->entry->get_annotations();
     $discussion = null;
     foreach ($threads as $thread) {
         if ($thread->get_name() === $currentUserName) {
             $discussion = $thread;
         }
     }
     if (!isset($discussion)) {
         $discussion = \steam_factory::create_document($GLOBALS["STEAM"]->get_id(), $currentUserName, "Discussing with " . $currentUserName . ".", "text/plain");
         $this->entry->add_annotation($discussion);
     }
     $chat = new \Widgets\Chat();
     $chat->setData($discussion);
     $dialog->addWidget($chat);
     $dialog->addWidget(new \Widgets\Clearer());
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml("<hr>");
     $dialog->addWidget($rawHtml);
     $textinput = new \Widgets\TextInput();
     $textinput->setData($discussion);
     $textinput->setContentProvider(\Widgets\DataProvider::annotationDataProvider());
     $textinput->setLabel("Kommentar schreiben");
     $dialog->addWidget($textinput);
     $ajaxResponseObject->setStatus("ok");
     $ajaxResponseObject->addWidget($dialog);
     return $ajaxResponseObject;
 }
コード例 #15
0
ファイル: NewArtefactForm.class.php プロジェクト: rolwi/koala
    public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
    {
        $ajaxResponseObject->setStatus("ok");
        $dialog = new \Widgets\Dialog();
        $dialog->setTitle("Erstelle ein neues Artefakt");
        $textInput = new \Widgets\TextInput();
        $ajaxForm = new \Widgets\AjaxForm();
        $ajaxForm->addWidget($textInput);
        $ajaxForm->setSubmitCommand("CreateArtefactCertificate");
        $ajaxForm->setSubmitNamespace("Portfolio");
        $ajaxForm->setHtml(<<<END
\t<div id="wizard">
\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</div>
END
);
        $dialog->addWidget($ajaxForm);
        $ajaxResponseObject->addWidget($dialog);
        return $ajaxResponseObject;
    }
コード例 #16
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 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("Eigenschaften von Spalte " . $object->get_attribute("OBJ_DESC"));
     $dialog->setPositionX($this->params["mouseX"]);
     $dialog->setPositionY($this->params["mouseY"]);
     $clearer = new \Widgets\Clearer();
     $sizeInput = new \Widgets\TextInput();
     $sizeInput->setLabel("Breite der Spalte");
     $sizeInput->setData($object);
     $sizeInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portal:column:width"));
     $dialog->addWidget($sizeInput);
     $dialog->addWidget($clearer);
     $this->dialog = $dialog;
 }
コード例 #17
0
ファイル: EditTopic.class.php プロジェクト: rolwi/koala
 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"]);
     $titel = new \Widgets\TextInput();
     $clearer = new \Widgets\Clearer();
     $titel->setLabel("Überschrift");
     $titel->setData($object);
     $titel->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
     $dialog->addWidget($titel);
     $dialog->addWidget($clearer);
     $this->dialog = $dialog;
 }
コード例 #18
0
 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     $objectId = $params["portletId"];
     $categoryIndex = $params["categoryIndex"];
     $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $dialog = new \Widgets\Dialog();
     //$dialog->setTitle("Eigenschaften von Kategorie: $categoryIndex in " . $object->get_name());
     $dialog->setTitle("Bearbeiten von Kategorie");
     $dialog->setPositionX($this->params["mouseX"]);
     $dialog->setPositionY($this->params["mouseY"]);
     $clearer = new \Widgets\Clearer();
     $titel = new \Widgets\TextInput();
     $titel->setLabel("Titel");
     $titel->setData($object);
     //$titel->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
     $titel->setContentProvider(new AttributeDataProviderPortletTopicCategory($categoryIndex));
     $dialog->addWidget($titel);
     $dialog->addWidget($clearer);
     $this->dialog = $dialog;
 }
コード例 #19
0
ファイル: EditTopicEntry.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     $objectId = $params["portletId"];
     $categoryIndex = $params["categoryIndex"];
     $entryIndex = $params["entryIndex"];
     $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $dialog = new \Widgets\Dialog();
     //$dialog->setTitle("Eigenschaften von Eintrag $entryIndex Kategorie $categoryIndex in " . $object->get_name());
     $dialog->setTitle("Bearbeiten von Eintrag");
     $dialog->setPositionX($this->params["mouseX"]);
     $dialog->setPositionY($this->params["mouseY"]);
     $clearer = new \Widgets\Clearer();
     $titel = new \Widgets\TextInput();
     $description = new \Widgets\TextInput();
     $link = new \Widgets\TextInput();
     $newBrowser = new \Widgets\Checkbox();
     //set labels
     $titel->setLabel("Titel");
     $description->setLabel("Beschreibung");
     $link->setLabel("Link-Adresse");
     $newBrowser->setLabel("Link in einem neuen Fenster öffnen");
     $titel->setData($object);
     $titel->setContentProvider(new AttributeDataProviderPortletTopicEntry($categoryIndex, $entryIndex, "title"));
     $description->setData($object);
     $description->setContentProvider(new AttributeDataProviderPortletTopicEntry($categoryIndex, $entryIndex, "description"));
     $link->setData($object);
     $link->setContentProvider(new AttributeDataProviderPortletTopicEntry($categoryIndex, $entryIndex, "link_url"));
     //checkbox
     $newBrowser->setData($object);
     $newBrowser->setCheckedValue("checked");
     $newBrowser->setUncheckedValue("");
     $newBrowser->setContentProvider(new AttributeDataProviderPortletTopicEntry($categoryIndex, $entryIndex, "link_target"));
     $dialog->addWidget($titel);
     $dialog->addWidget($clearer);
     $dialog->addWidget($description);
     $dialog->addWidget($clearer);
     $dialog->addWidget($link);
     $dialog->addWidget($clearer);
     $dialog->addWidget($newBrowser);
     $dialog->addWidget($clearer);
     $this->dialog = $dialog;
 }
コード例 #20
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
 {
     $entry = $this->entry;
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle($entry::getEntryTypeEditDescription());
     $dialog->setDescription($entry::getEntryTypeEditInfo());
     $dialog->setPositionX($this->params["mouseX"]);
     $dialog->setPositionY($this->params["mouseY"]);
     $dialog->setForceReload(true);
     $dialog->setButtons(array(array("class" => "negative", "js" => "sendRequest('deleteEntry', {'id':'{$this->id}'}, '', 'data', null, function(response) {closeDialog(); location.reload();}); return false;", "label" => "Löschen")));
     $clearer = new \Widgets\Clearer();
     $entryAttributes = $entry->getEntryAttributes();
     foreach ($entryAttributes as $entryAttribute) {
         $widget = new $entryAttribute["widget"]();
         $widget->setData($this->id);
         $widget->setContentProvider(new \Widgets\AttributeDataProvider($entryAttribute["attributeName"]));
         $widget->setLabel($entryAttribute["label"]);
         $dialog->addWidget($widget);
         $dialog->addWidget($clearer);
     }
     /*		$type = new \Widgets\ComboBox();
     		$type->setData($this->id);
     		$type->setContentProvider(new \Widgets\AttributeDataProvider("PORTFOLIO_ENTRY_SCHOOL_TYPE"));
     		$type->setLabel("Schulabschluss");
     		$type->setOptions(array(array("name"=>"Volks/- Hauptschulabschluss", "value"=>"haupt"),
     								array("name"=>"Mittlere Reife/Realschulabschluss", "value"=>"real"),
     								array("name"=>"Fachhochschulreife", "value"=>"fh"),
     								array("name"=>"Abitur", "value"=>"abi"),
     								array("name"=>"Sonstige", "value"=>"sonst")));
     		
     		$dialog->addWidget($type);
     		$dialog->addWidget($clearer);
     		
     		$note = new \Widgets\ComboBox();
     		$note->setData($this->id);
     		$note->setContentProvider(new \Widgets\AttributeDataProvider("PORTFOLIO_ENTRY_SCHOOL_NOTE"));
     		$note->setLabel("Druchschnittsnote");
     		$note->setOptions(array(array("name"=>"Sehr gut (1)", "value"=>"1"),
     								array("name"=>"Gut (2)", "value"=>"2"),
     								array("name"=>"Befriedigend (3)", "value"=>"3"),
     								array("name"=>"Ausreichend (4)", "value"=>"4")));
     								
     		$dialog->addWidget($note);
     		$dialog->addWidget($clearer);
     		
     		$year = new \Widgets\DatePicker();
     		$year->setData($this->id);
     		$year->setContentProvider(new \Widgets\AttributeDataProvider("PORTFOLIO_ENTRY_DATE"));
     		$year->setLabel("Abschlussdatum");
     		$year->setPlaceholder("z.B. 01.01.1995");
     		$dialog->addWidget($year);
     		$dialog->addWidget($clearer);
     		
     		$bemerk = new \Widgets\TextInput();
     		$bemerk->setLabel("Bemerkung");
     		$bemerk->setData($this->id);
     		$bemerk->setContentProvider(new \Widgets\AttributeDataProvider("PORTFOLIO_ENTRY_NOTE"));
     		$bemerk->setPlaceholder("z.B. inhaltliche Schwerpunkte; besondere Leistungen");
     		$dialog->addWidget($bemerk);
     		$dialog->addWidget($clearer);*/
     $ajaxResponseObject->setStatus("ok");
     $ajaxResponseObject->addWidget($dialog);
     return $ajaxResponseObject;
 }
コード例 #21
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 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"]);
     $clearer = new \Widgets\Clearer();
     /* not used
     		$titelInput = new \Widgets\TextInput();
     		$titelInput->setLabel("Titel");
     		$titelInput->setData($object);
     		$titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
     		$dialog->addWidget($titelInput);
     		$dialog->addWidget($clearer);
     		*/
     $headlineInput = new \Widgets\TextInput();
     $headlineInput->setLabel("Überschrift");
     $headlineInput->setData($object);
     $headlineInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([headline])"));
     $dialog->addWidget($headlineInput);
     $dialog->addWidget($clearer);
     $urlInput = new \Widgets\TextInput();
     $urlInput->setLabel("Adresse");
     $urlInput->setData($object);
     $urlInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([url])"));
     $dialog->addWidget($urlInput);
     $dialog->addWidget($clearer);
     $descriptionInput = new \Widgets\TextInput();
     $descriptionInput->setLabel("Beschreibung");
     $descriptionInput->setData($object);
     $descriptionInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([description])"));
     $dialog->addWidget($descriptionInput);
     $dialog->addWidget($clearer);
     /*
     $mediaTypeInput = new \Widgets\TextInput();
     $mediaTypeInput->setLabel("Typ"); //Film, Bild, Ton
     $mediaTypeInput->setData($object);
     $mediaTypeInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([media_type])"));
     $dialog->addWidget($mediaTypeInput);
     $dialog->addWidget($clearer);
     */
     $radioButton = new \Widgets\RadioButton();
     $radioButton->setLabel("Typ");
     $radioButton->setOptions(array(array("name" => "Film", "value" => "movie"), array("name" => "Bild", "value" => "image"), array("name" => "Ton", "value" => "audio")));
     $radioButton->setData($object);
     $radioButton->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([media_type])"));
     $dialog->addWidget($radioButton);
     $dialog->addWidget($clearer);
     $this->dialog = $dialog;
 }
コード例 #22
0
ファイル: EditTopic.class.php プロジェクト: rolwi/koala
 public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
 {
     $forumId = $this->params["forum"];
     $objectId = $this->id;
     $steam = $GLOBALS["STEAM"];
     $steamId = $steam->get_id();
     $forum = \steam_factory::get_object($steamId, $forumId);
     /** log-in user */
     $steamUser = \lms_steam::get_current_user();
     /** id of the log-in user */
     $steamUserId = $steamUser instanceof \steam_user ? $steamUser->get_id() : 0;
     /** the current category object */
     $object = \steam_factory::get_object($steamId, $objectId);
     /** the content of the category object */
     $object_content = $object->get_content(1);
     /** additional required attributes */
     $attrib = $object->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_CREATION_TIME, OBJ_LAST_CHANGED, "bid:description"), 1);
     /* get the annotating forum object */
     $forum = $object->get_annotating(1);
     /** check the rights of the log-in user */
     $allowed_write = $object->check_access_write($steamUser, 1);
     // flush the buffer
     $result = $steam->buffer_flush();
     $object_content = $result[$object_content];
     $attrib = $result[$attrib];
     $forum = $result[$forum];
     $allowed_write = $result[$allowed_write];
     $forum_attrib = $forum->get_attributes(array(OBJ_NAME, OBJ_DESC, "bid:description"), 1);
     $result = $steam->buffer_flush();
     $forum_attrib = $result[$forum_attrib];
     $content = $object_content;
     $title = $attrib[OBJ_DESC];
     $description = isset($attrib["bid:description"]) ? $attrib["bid:description"] : "";
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Bearbeite aktuelles Thema »" . getCleanName($object) . "«");
     $clearer = new \Widgets\Clearer();
     $titelInput = new \Widgets\TextInput();
     $titelInput->setLabel("Überschrift");
     $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);
     /*$widget = new \Widgets\Checkbox();
     		$widget->setLabel("Benutzer dürfen ihre Antworten bearbeiten");
     		$widget->setData($object);
     		$widget->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:forum:is_editable"));
     		$widget->setCheckedValue("checked");
     		$widget->setUncheckedValue("");
     		$dialog->addWidget($widget);*/
     /*	$ajaxForm = new \Widgets\AjaxForm();
     		$ajaxForm->setSubmitCommand("EditTopicContent");
     		$ajaxForm->setSubmitNamespace("Forum");
     
     		$ajaxForm->setHtml(<<<END
     	<input type="hidden" name="id" value="{$this->id}">
     	
     	
     	<div class="widgets_lable">Überschrift:</div>
     	<div class="widgets_textinput"><input type="text" value="{$title}" name="title"></div><br clear="all">
     	<div class="widgets_lable">Inhalt:</div>
     	<div class="widgets_textarea"><textarea rows="10" style="width:100%" class="tinymce"  value="{$content}" name="content1" id="content1"></textarea><br clear="all">
     	
     END
     		);
     			
     		$dialog->addWidget($ajaxForm);*/
     $ajaxResponseObject->setStatus("ok");
     $ajaxResponseObject->addWidget($dialog);
     return $ajaxResponseObject;
 }
コード例 #23
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     $objectId = $params["portletId"];
     $clearer = new \Widgets\Clearer();
     $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"));
     $addressInput = new \Widgets\TextInput();
     $addressInput->setLabel("RSS-Adresse");
     $addressInput->setData($object);
     $addressInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([address])"));
     $countInput = new \Widgets\TextInput();
     $countInput->setLabel("Anzahl Beiträge");
     $countInput->setData($object);
     $countInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([num_items])"));
     $lengthInput = new \Widgets\TextInput();
     $lengthInput->setLabel("Länge des Inhalts");
     $lengthInput->setData($object);
     $lengthInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([desc_length])"));
     $checkbox = new \Widgets\Checkbox();
     $checkbox->setLabel("HTML zulassen");
     $checkbox->setData($object);
     $checkbox->setCheckedValue("checked");
     $checkbox->setUncheckedValue("");
     $checkbox->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([allow_html])"));
     $dialog->addWidget($titelInput);
     $dialog->addWidget($clearer);
     $dialog->addWidget($addressInput);
     $dialog->addWidget($clearer);
     $dialog->addWidget($countInput);
     $dialog->addWidget($clearer);
     $dialog->addWidget($lengthInput);
     $dialog->addWidget($clearer);
     $dialog->addWidget($checkbox);
     $this->dialog = $dialog;
 }
コード例 #24
0
ファイル: EditMessage.class.php プロジェクト: rolwi/koala
 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;
 }
コード例 #25
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 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"));
     $clearer = new \Widgets\Clearer();
     $descriptionInput = new \Widgets\TextInput();
     $descriptionInput->setLabel("Überschrift");
     $descriptionInput->setData($object);
     $descriptionInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
     $dialog->addWidget($descriptionInput);
     $dialog->addWidget($clearer);
     $descriptionInput = new \Widgets\TextInput();
     $descriptionInput->setLabel("Beschreibung");
     $descriptionInput->setData($object);
     $descriptionInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([poll_topic])"));
     $dialog->addWidget($descriptionInput);
     $dialog->addWidget($clearer);
     //datepicker
     $datepickerStart = new \Widgets\DatePicker();
     $datepickerStart->setLabel("Start der Abstimmung");
     $datepickerStart->setData($object);
     $datepickerStart->setContentProvider(new AttributeDataProviderPortletPollDates("start_date"));
     $dialog->addWidget($datepickerStart);
     $dialog->addWidget($clearer);
     $datepickerEnd = new \Widgets\DatePicker();
     $datepickerEnd->setLabel("Ende der Abstimmung");
     $datepickerEnd->setData($object);
     $datepickerEnd->setContentProvider(new AttributeDataProviderPortletPollDates("end_date"));
     $dialog->addWidget($datepickerEnd);
     $dialog->addWidget($clearer);
     $dialog->addWidget($clearer);
     $descLabelWidth = 60;
     $descInputWidth = 250;
     $voteLabelWidth = 1;
     $voteInputWidth = 20;
     //items
     //0
     $item0Description = new \Widgets\TextInput();
     $item0Description->setLabelWidth($descLabelWidth);
     $item0Description->setInputWidth($descInputWidth);
     $item0Description->setInputBackgroundColor("rgb(255,120,111)");
     $item0Description->setLabel("Antworten");
     $item0Description->setData($object);
     $item0Description->setContentProvider(new AttributeDataProviderPortletPollVotes(0, "description"));
     $dialog->addWidget($item0Description);
     $item0Votes = new \Widgets\TextInput();
     $item0Votes->setLabelWidth($voteLabelWidth);
     $item0Votes->setInputWidth($voteInputWidth);
     $item0Votes->setInputBackgroundColor("rgb(255,120,111)");
     //$item0Votes->setLabel("Stimmen");
     $item0Votes->setData($object);
     $item0Votes->setContentProvider(new AttributeDataProviderPortletPollVotes(0, "votes"));
     $dialog->addWidget($item0Votes);
     $dialog->addWidget($clearer);
     //1
     $item1Description = new \Widgets\TextInput();
     $item1Description->setLabelWidth($descLabelWidth);
     $item1Description->setInputWidth($descInputWidth);
     $item1Description->setInputBackgroundColor("rgb(250,186,97)");
     $item1Description->setData($object);
     $item1Description->setContentProvider(new AttributeDataProviderPortletPollVotes(1, "description"));
     $dialog->addWidget($item1Description);
     $item1Votes = new \Widgets\TextInput();
     $item1Votes->setLabelWidth($voteLabelWidth);
     $item1Votes->setInputWidth($voteInputWidth);
     $item1Votes->setInputBackgroundColor("rgb(250,186,97)");
     //$item1Votes->setLabel("Stimmen");
     $item1Votes->setData($object);
     $item1Votes->setContentProvider(new AttributeDataProviderPortletPollVotes(1, "votes"));
     $dialog->addWidget($item1Votes);
     $dialog->addWidget($clearer);
     //2
     $item2Description = new \Widgets\TextInput();
     $item2Description->setLabelWidth($descLabelWidth);
     $item2Description->setInputWidth($descInputWidth);
     $item2Description->setInputBackgroundColor("rgb(244,229,123)");
     //$item2Description->setLabel("Beschreibung Feld 3");
     $item2Description->setData($object);
     $item2Description->setContentProvider(new AttributeDataProviderPortletPollVotes(2, "description"));
     $dialog->addWidget($item2Description);
     $item2Votes = new \Widgets\TextInput();
     $item2Votes->setLabelWidth($voteLabelWidth);
     $item2Votes->setInputWidth($voteInputWidth);
     $item2Votes->setInputBackgroundColor("rgb(244,229,123)");
     //$item2Votes->setLabel("Stimmen");
     $item2Votes->setData($object);
     $item2Votes->setContentProvider(new AttributeDataProviderPortletPollVotes(2, "votes"));
     $dialog->addWidget($item2Votes);
     $dialog->addWidget($clearer);
     //3
     $item3Description = new \Widgets\TextInput();
     $item3Description->setLabelWidth($descLabelWidth);
     $item3Description->setInputWidth($descInputWidth);
     $item3Description->setInputBackgroundColor("rgb(194,222,102)");
     //$item3Description->setLabel("Beschreibung Feld 4");
     $item3Description->setData($object);
     $item3Description->setContentProvider(new AttributeDataProviderPortletPollVotes(3, "description"));
     $dialog->addWidget($item3Description);
     $item3Votes = new \Widgets\TextInput();
     $item3Votes->setLabelWidth($voteLabelWidth);
     $item3Votes->setInputWidth($voteInputWidth);
     $item3Votes->setInputBackgroundColor("rgb(194,222,102)");
     //$item3Votes->setLabel("Stimmen");
     $item3Votes->setData($object);
     $item3Votes->setContentProvider(new AttributeDataProviderPortletPollVotes(3, "votes"));
     $dialog->addWidget($item3Votes);
     $dialog->addWidget($clearer);
     //4
     $item4Description = new \Widgets\TextInput();
     $item4Description->setLabelWidth($descLabelWidth);
     $item4Description->setInputWidth($descInputWidth);
     $item4Description->setInputBackgroundColor("rgb(113,182,255)");
     //$item4Description->setLabel("Beschreibung Feld 5");
     $item4Description->setData($object);
     $item4Description->setContentProvider(new AttributeDataProviderPortletPollVotes(4, "description"));
     $dialog->addWidget($item4Description);
     $item4Votes = new \Widgets\TextInput();
     $item4Votes->setLabelWidth($voteLabelWidth);
     $item4Votes->setInputWidth($voteInputWidth);
     $item4Votes->setInputBackgroundColor("rgb(113,182,255)");
     //$item4Votes->setLabel("Stimmen");
     $item4Votes->setData($object);
     $item4Votes->setContentProvider(new AttributeDataProviderPortletPollVotes(4, "votes"));
     $dialog->addWidget($item4Votes);
     $dialog->addWidget($clearer);
     //5
     $item5Description = new \Widgets\TextInput();
     $item5Description->setLabelWidth($descLabelWidth);
     $item5Description->setInputWidth($descInputWidth);
     $item5Description->setInputBackgroundColor("rgb(207,163,224)");
     //$item5Description->setLabel("Beschreibung Feld 6");
     $item5Description->setData($object);
     $item5Description->setContentProvider(new AttributeDataProviderPortletPollVotes(5, "description"));
     $dialog->addWidget($item5Description);
     $item5Votes = new \Widgets\TextInput();
     $item5Votes->setLabelWidth($voteLabelWidth);
     $item5Votes->setInputWidth($voteInputWidth);
     $item5Votes->setInputBackgroundColor("rgb(207,163,224)");
     //$item5Votes->setLabel("Stimmen");
     $item5Votes->setData($object);
     $item5Votes->setContentProvider(new AttributeDataProviderPortletPollVotes(5, "votes"));
     $dialog->addWidget($item5Votes);
     $dialog->addWidget($clearer);
     $this->dialog = $dialog;
 }
コード例 #26
0
ファイル: EditReply.class.php プロジェクト: rolwi/koala
 public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
 {
     $object_id = $this->id;
     $steam = $GLOBALS["STEAM"];
     $steamId = $steam->get_id();
     /** log-in user */
     $steamUser = \lms_steam::get_current_user();
     /** id of the log-in user */
     $steamUserId = $steamUser->get_id();
     /** name of the log-in user */
     $steamUserName = $steamUser->get_name();
     /** the current object */
     $object = \steam_factory::get_object($steamId, $object_id);
     /** the content of the message object */
     $object_content = $object->get_content(1);
     /** additional required attributes */
     $attrib = $object->get_attributes(array(OBJ_NAME, OBJ_DESC, OBJ_CREATION_TIME, OBJ_LAST_CHANGED), 1);
     /** get the annotating category */
     $category = $object->get_annotating(1);
     /** check the rights of the log-in user */
     $allowed_write = $object->check_access_write($steamUser, 1);
     // flush the buffer
     $result = $steam->buffer_flush();
     $object_content = $result[$object_content];
     $attrib = $result[$attrib];
     $category = $result[$category];
     $allowed_write = $result[$allowed_write];
     $category_attributes = $category->get_attributes(array(OBJ_NAME, OBJ_DESC), 1);
     $result = $steam->buffer_flush();
     $category_attributes = $result[$category_attributes];
     $content = $object_content;
     $title = $attrib[OBJ_DESC];
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Bearbeite aktuelles Thema »" . getCleanName($object) . "«");
     $clearer = new \Widgets\Clearer();
     $titelInput = new \Widgets\TextInput();
     $titelInput->setLabel("Überschrift");
     $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);
     /*$ajaxForm = new \Widgets\AjaxForm();
     		 $ajaxForm->setSubmitCommand("EditReplyContent");
     		 $ajaxForm->setSubmitNamespace("Forum");
     
     		 $ajaxForm->setHtml(<<<END
     		 <input type="hidden" name="id" value="{$this->id}">
     		 <input type="hidden" name="forum" value="{$this->params["forum"]}">
     		 <div class="widgets_lable">Überschrift:</div>
     		 <div class="widgets_textinput"><input type="text" value="{$title}" name="title"></div><br clear="all">
     		 <div class="widgets_lable">Inhalt:</div>
     		 <div class="widgets_textarea"><textarea rows="10" style="width:100%" class="tinymce"  value="{$content}" name="content1" id="content1"></textarea><br clear="all">
     		 <input id="content_id" type="hidden" name="content" value="">
     		 <script type="text/javascript">
     		 tinyMCE.init({
     		 mode : "textareas",
     
     		 // General options
     		 theme : "advanced",
     		 skin: "o2k7",
     		 id: "content1",
     		 name:"content1",
     		 force_br_newlines : true,
     		 force_p_newlines : false,
     		 forced_root_block : '',
     
     		 language: "de",
     		 plugins : "emotions,paste",
     
     			//Specific options
     			setup : function(ed) {
     			ed.onKeyUp.add(function(ed, o) {
     			var content = "<p>"+ed.getContent()+"</p>";
     			$("#content_id").val(content);
     			});
     			ed.onInit.add(function(ed) {
     			ed.setContent('{$content}');
     			});
     
     			},
     
     			// Theme options
     			theme_advanced_buttons1 : "bold,italic,underline,|,image,link,unlink,|,forecolor,removeformat,|,undo,redo,pasteword,|,code",
     			theme_advanced_buttons2 : "",
     			theme_advanced_buttons3 : "",
     			theme_advanced_buttons4 : "",
     			theme_advanced_toolbar_location : "top",
     			theme_advanced_toolbar_align : "left",
     			theme_advanced_statusbar_location : "none",
     			theme_advanced_resizing : false
     			});
     
     			</script>
     			END
     			);
     			$dialog->addWidget($ajaxForm);*/
     $ajaxResponseObject->setStatus("ok");
     $ajaxResponseObject->addWidget($dialog);
     return $ajaxResponseObject;
 }
コード例 #27
0
ファイル: Properties.class.php プロジェクト: rolwi/koala
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     $object = $currentUser->get_workroom();
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Eigenschaften von " . $object->get_name());
     $dialog->setButtons(array(array("name" => "speichern", "href" => "save")));
     return $dialog->getHtml();
 }
コード例 #28
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 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"));
     $clearer = new \Widgets\Clearer();
     $titelInput = new \Widgets\TextInput();
     $titelInput->setLabel("Überschrift");
     $titelInput->setData($object);
     $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
     $dialog->addWidget($titelInput);
     $dialog->addWidget($clearer);
     $descriptionInput = new \Widgets\TextInput();
     $descriptionInput->setLabel("Beschreibung");
     $descriptionInput->setData($object);
     $descriptionInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([poll_topic])"));
     $dialog->addWidget($descriptionInput);
     $dialog->addWidget($clearer);
     //datepicker
     $datepickerStart = new \Widgets\DatePicker();
     $datepickerStart->setLabel("Start der Abstimmung");
     $datepickerStart->setData($object);
     $datepickerStart->setContentProvider(new AttributeDataProviderPortletTermplanDates("start_date"));
     $dialog->addWidget($datepickerStart);
     $dialog->addWidget($clearer);
     $datepickerEnd = new \Widgets\DatePicker();
     $datepickerEnd->setLabel("Ende der Abstimmung");
     $datepickerEnd->setData($object);
     $datepickerEnd->setContentProvider(new AttributeDataProviderPortletTermplanDates("end_date"));
     $dialog->addWidget($datepickerEnd);
     $dialog->addWidget($clearer);
     $termLabelWidth = 50;
     $termInputWidth = 300;
     //term descriptions
     $term0 = new \Widgets\TextInput();
     $term0->setLabelWidth($termLabelWidth);
     $term0->setInputWidth($termInputWidth);
     $term0->setLabel("Eintrag 1");
     $term0->setData($object);
     $term0->setContentProvider(new AttributeDataProviderPortletTermplanEntries("0"));
     $dialog->addWidget($term0);
     $dialog->addWidget($clearer);
     $term1 = new \Widgets\TextInput();
     $term1->setLabelWidth($termLabelWidth);
     $term1->setInputWidth($termInputWidth);
     $term1->setLabel("Eintrag 2");
     $term1->setData($object);
     $term1->setContentProvider(new AttributeDataProviderPortletTermplanEntries("1"));
     $dialog->addWidget($term1);
     $dialog->addWidget($clearer);
     $term2 = new \Widgets\TextInput();
     $term2->setLabelWidth($termLabelWidth);
     $term2->setInputWidth($termInputWidth);
     $term2->setLabel("Eintrag 3");
     $term2->setData($object);
     $term2->setContentProvider(new AttributeDataProviderPortletTermplanEntries("2"));
     $dialog->addWidget($term2);
     $dialog->addWidget($clearer);
     $term3 = new \Widgets\TextInput();
     $term3->setLabelWidth($termLabelWidth);
     $term3->setInputWidth($termInputWidth);
     $term3->setLabel("Eintrag 4");
     $term3->setData($object);
     $term3->setContentProvider(new AttributeDataProviderPortletTermplanEntries("3"));
     $dialog->addWidget($term3);
     $dialog->addWidget($clearer);
     $term4 = new \Widgets\TextInput();
     $term4->setLabelWidth($termLabelWidth);
     $term4->setInputWidth($termInputWidth);
     $term4->setLabel("Eintrag 5");
     $term4->setData($object);
     $term4->setContentProvider(new AttributeDataProviderPortletTermplanEntries("4"));
     $dialog->addWidget($term4);
     $dialog->addWidget($clearer);
     $term5 = new \Widgets\TextInput();
     $term5->setLabelWidth($termLabelWidth);
     $term5->setInputWidth($termInputWidth);
     $term5->setLabel("Eintrag 6");
     $term5->setData($object);
     $term5->setContentProvider(new AttributeDataProviderPortletTermplanEntries("5"));
     $dialog->addWidget($term5);
     $dialog->addWidget($clearer);
     $this->dialog = $dialog;
 }
コード例 #29
0
ファイル: EditTerm.class.php プロジェクト: rolwi/koala
 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;
 }