コード例 #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
ファイル: 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;
    }
コード例 #3
0
ファイル: NewWaveForm.class.php プロジェクト: rolwi/koala
    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;
    }
コード例 #4
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;
    }
コード例 #5
0
ファイル: NewWebLinkForm.class.php プロジェクト: rolwi/koala
    public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
    {
        $ajaxResponseObject->setStatus("ok");
        $textInput = new \Widgets\TextInput();
        $ajaxForm = new \Widgets\AjaxForm();
        $ajaxForm->addWidget($textInput);
        $ajaxForm->setSubmitCommand("CreateWebLink");
        $ajaxForm->setSubmitNamespace("Explorer");
        $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">Titel:</div>
\t<div class="attributeValue"><input type="text" class="text" value="" name="name"></div>
</div>
<div class="attribute">
\t<div class="attributeName">Ziel-Url:</div>
\t<div class="attributeValue"><input type="text" class="text" value="" name="url"></div>
</div>
<br>
END
);
        $ajaxResponseObject->addWidget($ajaxForm);
        return $ajaxResponseObject;
    }
コード例 #6
0
    public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
    {
        $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
        $ajaxForm = new \Widgets\AjaxForm();
        $ajaxForm->setSubmitCommand("NewWorksheet");
        $ajaxForm->setSubmitNamespace("Worksheet");
        $html = '<table width="100%">';
        $html .= '<tr><td>Name des neuen Arbeitblattes:</td> <td><input name="name"></td></tr>';
        $html .= '<tr><input type="hidden" name="id" value="' . $this->id . '"></tr>';
        $html .= '</table>';
        $ajaxForm->setHtml(<<<END
\t\t{$html}
\t\t\t\t
END
);
        $ajaxResponseObject->setStatus("ok");
        $ajaxResponseObject->addWidget($ajaxForm);
        return $ajaxResponseObject;
    }
コード例 #7
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;
    }
コード例 #8
0
ファイル: NewTCRForm.class.php プロジェクト: rolwi/koala
    public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
    {
        $user = $GLOBALS["STEAM"]->get_current_steam_user();
        $groups = $user->get_groups();
        $options_group = "";
        $options_course = "";
        // add options for every group the current user is member in and for every course the user is staff member in
        foreach ($groups as $group) {
            if ((strStartsWith($group->get_groupname(), "PrivGroup") || strStartsWith($group->get_groupname(), "PublicGroup")) && !strStartsWith($group->get_name(), "group_")) {
                $options_group = $options_group . "<option value=\"" . $group->get_id() . "\">" . $group->get_name() . "</option> \n";
            } else {
                if (strStartsWith($group->get_groupname(), "Courses") && !strStartsWith($group->get_name(), "group_") && $group->get_name() == "staff") {
                    $group = $group->get_parent_group();
                    $name = $group->get_attribute("OBJ_DESC") . " (" . $group->get_name() . ")";
                    $options_course = $options_course . "<option value=\"" . $group->get_id() . "\">" . $name . "</option> \n";
                }
            }
        }
        $ajaxResponseObject->setStatus("ok");
        $ajaxForm = new \Widgets\AjaxForm();
        $ajaxForm->setSubmitCommand("Create");
        $ajaxForm->setSubmitNamespace("TCR");
        $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>
<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">Runden*:</div>
\t<div><input type="text" class="text" value="" name="rounds"></div>
</div>
<div class="attribute">
\t<div class="attributeNameRequired">Erstellen in*:</div>
\t<div>
\t\t<input type="radio" value="1" name="group_course" onClick="document.getElementById('group').style.display = 'none'; document.getElementById('course').style.display = '';">Kurs
\t\t<input type="radio" value="2" name="group_course" onClick="document.getElementById('group').style.display = ''; document.getElementById('course').style.display = 'none';">Gruppe
\t</div>
</div>
<div class="attribute" id="course" style="display:none;">
\t<div class="attributeNameRequired">Kurs*:</div>
\t<div>
\t\t<select name="course">
\t\t{$options_course}
\t\t</select>
\t</div>
</div>
<div class="attribute" id="group" style="display:none;" title="">
\t<div class="attributeNameRequired">Gruppe*:</div>
\t<div>
\t\t<select name="group">
\t\t{$options_group}
\t\t</select>
\t</div>
</div>
END
);
        $ajaxResponseObject->addWidget($ajaxForm);
        return $ajaxResponseObject;
    }
コード例 #9
0
ファイル: NewGallery.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("Create");
        $ajaxForm->setSubmitNamespace("Gallery");
        $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">Galeriename:</div>
\t<div class="attributeValue"><input type="text" class="text" value="" name="name"></div>
</div>
<br>\t\t\t
END
);
        $ajaxResponseObject->setStatus("ok");
        $ajaxResponseObject->addWidget($ajaxForm);
        //$idRequestObject = new \IdRequestObject();
        //$idRequestObject->setId($this->id);
        return $ajaxResponseObject;
        $extensions = \ExtensionMaster::getInstance()->getExtensionByType("IObjectExtension");
        $commands = array();
        foreach ($extensions as $extension) {
            $command = $extension->getCreateNewCommand($idRequestObject);
            if ($command) {
                $commands[] = $command;
            }
        }
        //hole objekt
        $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
        $dialog = new \Widgets\Dialog();
        $dialog->setTitle("Erstelle ein neues Objekt in " . $object->get_name());
        $dialog->setPositionX($this->params["mouseX"]);
        $dialog->setPositionY($this->params["mouseY"]);
        $html = "";
        foreach ($commands as $command) {
            $html .= $command->getExtensionName() . "<br>";
        }
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $dialog->addWidget($rawHtml);
        $ajaxResponseObject->setStatus("ok");
        $ajaxResponseObject->addWidget($dialog);
        return $ajaxResponseObject;
    }
コード例 #10
0
    public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
    {
        $user = $GLOBALS["STEAM"]->get_current_steam_user();
        $groups = $user->get_groups();
        $options_basegroup = "";
        $options_admingroup = "";
        $options_course = "";
        foreach ($groups as $group) {
            if ((strStartsWith($group->get_groupname(), "PrivGroup") || strStartsWith($group->get_groupname(), "PublicGroup")) && !strStartsWith($group->get_name(), "group_")) {
                if ($group->is_admin($user)) {
                    $options_basegroup = $options_basegroup . "<option value=\"" . $group->get_id() . "\">" . $group->get_name() . "</option> \n";
                }
                $options_admingroup = $options_admingroup . "<option value=\"" . $group->get_id() . "\">" . $group->get_name() . "</option> \n";
            } else {
                if (strStartsWith($group->get_groupname(), "Courses") && !strStartsWith($group->get_name(), "group_") && $group->get_name() == "staff") {
                    $group = $group->get_parent_group();
                    $name = $group->get_attribute("OBJ_DESC") . " (" . $group->get_name() . ")";
                    $options_course = $options_course . "<option value=\"" . $group->get_id() . "\">" . $name . "</option> \n";
                }
            }
        }
        $ajaxResponseObject->setStatus("ok");
        $ajaxForm = new \Widgets\AjaxForm();
        $ajaxForm->setSubmitCommand("Create");
        $ajaxForm->setSubmitNamespace("Pyramiddiscussion");
        $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>
<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">Anzahl der Startfelder*:</div>
\t<div>
\t\t<select name="startElements" size="1" style="width: 50%">
\t\t\t<option value="2">2</option>
\t\t\t<option value="4">4</option>
\t\t\t<option value="8">8</option>
\t\t\t<option value="16">16</option>
\t\t\t<option value="32">32</option>
\t\t\t<option value="64">64</option>
\t\t</select>
\t</div>
</div>
<div class="attribute">
\t<div class="attributeNameRequired">Eingabeeditor*:</div>
\t<div>
\t\t<select name="editor" size="1" style="width: 50%">
\t\t\t<option value="text/plain">Einfacher Text</option>
\t\t\t<option value="text/html">HTML Notation</option>
\t\t\t<option value="text/wiki">Wiki Notation</option>
\t\t</select>
\t</div>
</div>
<div class="attribute">
\t<div class="attributeNameRequired">Erstellen in*:</div>
\t<div>
\t\t<input type="radio" value="1" name="group" onClick="document.getElementById('admingroup').style.display = 'none'; document.getElementById('basegroup').style.display = 'none'; document.getElementById('course').style.display = '';">Kurs
\t\t<input type="radio" value="2" name="group" onClick="document.getElementById('admingroup').style.display = ''; document.getElementById('basegroup').style.display = ''; document.getElementById('course').style.display = 'none';">Gruppe
\t</div>
</div>
<div class="attribute" id="course" style="display:none;">
\t<div class="attributeNameRequired">Kurs*:</div>
\t<div>
\t\t<select name="course">
\t\t\t{$options_course}
\t\t</select>
\t</div>
</div>
<div class="attribute" id="basegroup" style="display:none;" title="Es werden nur Gruppen angezeigt, in denen Sie Administrator sind.">
\t<div class="attributeNameRequired">Basisgruppe*:</div>
\t<div>
\t\t<select name="basegroup">
\t\t\t{$options_basegroup}
\t\t</select>
\t</div>
</div>
<div class="attribute" id="admingroup" style="display:none;">
\t<div class="attributeNameRequired">Admingruppe*:</div>
\t<div>
\t\t<select name="admingroup">
\t\t\t{$options_admingroup}
\t\t</select>
\t</div>
</div>
END
);
        $ajaxResponseObject->addWidget($ajaxForm);
        return $ajaxResponseObject;
    }
コード例 #11
0
ファイル: NewPortalForm.class.php プロジェクト: rolwi/koala
    public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
    {
        $ajaxResponseObject->setStatus("ok");
        $ajaxForm = new \Widgets\AjaxForm();
        $ajaxForm->setSubmitCommand("Create");
        $ajaxForm->setSubmitNamespace("Portal");
        $img_3_col = $this->getExtension()->getAssetUrl() . "images/portal_3_col.jpg";
        $img_2_col = $this->getExtension()->getAssetUrl() . "images/portal_2_col.jpg";
        $img_1_col = $this->getExtension()->getAssetUrl() . "images/portal_1_col.jpg";
        $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">Portalname:</div>
\t<div class="attributeValue"><input type="text" class="text" value="" name="name"></div>
</div>
<div style="height:150px" class="attribute">
\t<div class="attributeName">Anzahl Spalten:</div>
\t<div class="attributeValue"> 
\t\t<div style="width:100px" class="attributeValueColumn">
\t\t\t\t<input type="radio" checked="" value="3" name="columns">Standard<br>
\t\t\t\t<img width="100" height="100" border="0" src="{$img_3_col}">
\t\t</div>
\t\t<div style="width:100px" class="attributeValueColumn">
\t\t\t\t<input type="radio" value="2" name="columns">2-spaltig<br>
\t\t\t\t<img width="100" height="100" border="0" src="{$img_2_col}">
\t\t</div>
\t\t<div style="width:100px" class="attributeValueColumn">
\t\t\t\t<input type="radio" value="1" name="columns">1-spaltig<br>
\t\t\t\t<img width="100" height="100" border="0" src="{$img_1_col}">
\t\t</div>
\t</div>
</div>
END
);
        $ajaxResponseObject->addWidget($ajaxForm);
        return $ajaxResponseObject;
    }