本文整理汇总了PHP中ilAdvancedSelectionListGUI::setPullRight方法的典型用法代码示例。如果您正苦于以下问题:PHP ilAdvancedSelectionListGUI::setPullRight方法的具体用法?PHP ilAdvancedSelectionListGUI::setPullRight怎么用?PHP ilAdvancedSelectionListGUI::setPullRight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilAdvancedSelectionListGUI
的用法示例。
在下文中一共展示了ilAdvancedSelectionListGUI::setPullRight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTinyMenu
/**
* Get Tiny Menu
*/
static function getTinyMenu($a_par_type, $a_int_links = false, $a_wiki_links = false, $a_keywords = false, $a_style_id = 0, $a_paragraph_styles = true, $a_save_return = true, $a_anchors = false, $a_save_new = true)
{
global $lng, $ilCtrl;
$mathJaxSetting = new ilSetting("MathJax");
include_once "./Services/COPage/classes/class.ilPageEditorSettings.php";
include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
$btpl = new ilTemplate("tpl.tiny_menu.html", true, true, "Services/COPage");
// debug ghost element
if (DEVMODE == 1) {
$btpl->touchBlock("debug_ghost");
}
// bullet list
$btpl->touchBlock("blist_button");
ilTooltipGUI::addTooltip("il_edm_blist", $lng->txt("cont_blist"), "iltinymenu_bd");
// numbered list
$btpl->touchBlock("nlist_button");
ilTooltipGUI::addTooltip("il_edm_nlist", $lng->txt("cont_nlist"), "iltinymenu_bd");
// list indent
$btpl->touchBlock("list_indent");
ilTooltipGUI::addTooltip("ilIndentBut", $lng->txt("cont_list_indent"), "iltinymenu_bd");
// list outdent
$btpl->touchBlock("list_outdent");
ilTooltipGUI::addTooltip("ilOutdentBut", $lng->txt("cont_list_outdent"), "iltinymenu_bd");
if ($a_int_links) {
$btpl->touchBlock("bb_ilink_button");
ilTooltipGUI::addTooltip("iosEditInternalLinkTrigger", $lng->txt("cont_link_to_internal"), "iltinymenu_bd");
}
ilTooltipGUI::addTooltip("il_edm_xlink", $lng->txt("cont_link_to_external"), "iltinymenu_bd");
// remove format
$btpl->touchBlock("rformat_button");
ilTooltipGUI::addTooltip("il_edm_rformat", $lng->txt("cont_remove_format"), "iltinymenu_bd");
if ($a_paragraph_styles) {
// new paragraph
$btpl->setCurrentBlock("new_par");
$btpl->setVariable("IMG_NEWPAR", "+");
$btpl->parseCurrentBlock();
ilTooltipGUI::addTooltip("il_edm_newpar", $lng->txt("cont_insert_new_paragraph"), "iltinymenu_bd");
$btpl->setCurrentBlock("par_edit");
$btpl->setVariable("TXT_PAR_FORMAT", $lng->txt("cont_par_format"));
include_once "./Services/COPage/classes/class.ilPCParagraphGUI.php";
$btpl->setVariable("STYLE_SELECTOR", ilPCParagraphGUI::getStyleSelector($a_selected, ilPCParagraphGUI::_getCharacteristics($a_style_id), true));
ilTooltipGUI::addTooltip("ilAdvSelListAnchorText_style_selection", $lng->txt("cont_paragraph_styles"), "iltinymenu_bd");
$btpl->parseCurrentBlock();
}
if ($a_keywords) {
$btpl->setCurrentBlock("bb_kw_button");
$btpl->setVariable("CC_KW", "kw");
$btpl->parseCurrentBlock();
ilTooltipGUI::addTooltip("il_edm_kw", $lng->txt("cont_text_keyword"), "iltinymenu_bd");
}
if ($a_wiki_links) {
$btpl->setCurrentBlock("bb_wikilink_button2");
$btpl->setVariable("TXT_WIKI_BUTTON2", $lng->txt("obj_wiki"));
$btpl->setVariable("WIKI_BUTTON2_URL", $ilCtrl->getLinkTargetByClass("ilwikipagegui", ""));
$btpl->parseCurrentBlock();
$btpl->setCurrentBlock("bb_wikilink_button");
$btpl->setVariable("TXT_WLN2", $lng->txt("obj_wiki"));
$btpl->parseCurrentBlock();
ilTooltipGUI::addTooltip("il_edm_wlink", $lng->txt("cont_link_to_wiki"), "iltinymenu_bd");
}
$aset = new ilSetting("adve");
include_once "./Services/COPage/classes/class.ilPageContentGUI.php";
foreach (ilPageContentGUI::_getCommonBBButtons() as $c => $st) {
// these are handled via drop down now...
if (in_array($c, array("com", "quot", "acc", "code"))) {
continue;
}
if (ilPageEditorSettings::lookupSettingByParentType($a_par_type, "active_" . $c, true)) {
$cc_code = $c;
if ($aset->get("use_physical")) {
$cc_code = str_replace(array("str", "emp", "imp"), array("B", "I", "U"), $cc_code);
}
if ($c != "tex" || $mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
$btpl->setCurrentBlock("bb_" . $c . "_button");
$btpl->setVariable("CC_" . strtoupper($c), $cc_code);
$btpl->parseCurrentBlock();
ilTooltipGUI::addTooltip("il_edm_cc_" . $c, $lng->txt("cont_cc_" . $c), "iltinymenu_bd");
// $btpl->setVariable("TXT_".strtoupper($c), $this->lng->txt("cont_text_".$c));
}
}
}
if ($mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
ilTooltipGUI::addTooltip("il_edm_tex", $lng->txt("cont_tex"), "iltinymenu_bd");
}
ilTooltipGUI::addTooltip("il_edm_fn", $lng->txt("cont_fn"), "iltinymenu_bd");
include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
$sdd = new ilAdvancedSelectionListGUI();
$sdd->setPullRight(false);
$sdd->setListTitle($lng->txt("save") . "...");
if ($a_save_return) {
$btpl->setCurrentBlock("save_return");
$btpl->setVariable("TXT_SAVE_RETURN", $lng->txt("save_return"));
$btpl->parseCurrentBlock();
$sdd->addItem($lng->txt("save_return"), "", "#", "", "", "", "", "", "ilCOPage.cmdSaveReturn(false); return false;");
}
if ($a_save_new) {
$btpl->setCurrentBlock("save_new");
//.........这里部分代码省略.........
示例2: getCharStyleSelector
/**
* Get character style selector
*/
static function getCharStyleSelector($a_par_type, $a_use_callback = true)
{
global $lng;
include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
$selection = new ilAdvancedSelectionListGUI();
$selection->setPullRight(false);
$selection->setFormSelectMode("char_characteristic", "", false, "", "", "", "", "", "", "");
$selection->setId("char_style_selection");
$selection->setSelectionHeaderClass("ilEditSubmit");
$selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
//$selection->setSelectedValue($a_selected);
$selection->setUseImages(false);
$selection->setOnClickMode(ilAdvancedSelectionListGUI::ON_ITEM_CLICK_NOP);
if ($a_use_callback) {
$selection->setSelectCallback("ilCOPage.setCharacterClass");
}
//$chars = $a_chars;
//$title_char = ($chars[$a_selected] != "")
// ? $chars[$a_selected]
// : $a_selected;
$selection->setListTitle(" <i>A</i>");
/*if ($chars[$a_seleted] == "" && ($a_seleted != ""))
{
$chars = array_merge(array($a_seleted => $a_seleted),
$chars);
}*/
$chars = array("Comment" => array("code" => "com", "txt" => $lng->txt("cont_char_style_com")), "Quotation" => array("code" => "quot", "txt" => $lng->txt("cont_char_style_quot")), "Accent" => array("code" => "acc", "txt" => $lng->txt("cont_char_style_acc")), "Code" => array("code" => "code", "txt" => $lng->txt("cont_char_style_code")));
foreach ($chars as $key => $char) {
if (ilPageEditorSettings::lookupSettingByParentType($a_par_type, "active_" . $char["code"], true)) {
$t = "text_inline";
$tag = "span";
switch ($key) {
case "Code":
$tag = "code";
break;
}
$html = '<' . $tag . ' class="ilc_' . $t . '_' . $key . '" style="font-size:90%; margin-top:2px; margin-bottom:2px; position:static;">' . $char["txt"] . "</" . $tag . ">";
// this next line is very important for IE. The real onclick event is on the surrounding <tr> of the
// advanced selection list. But it is impossible to prevent the tr-event from removing the focus
// on tiny withouth the following line, that receives the click event before and stops the faulty default
// bevaviour of IE, see bug report #8723
$html = '<a class="nostyle" style="display:block;" href="#" onclick="return false;">' . $html . "</a>";
$selection->addItem($char["txt"], $key, "", "", $key, "", $html);
}
}
return $selection->getHTML();
}