本文整理匯總了PHP中Button::contextMenu方法的典型用法代碼示例。如果您正苦於以下問題:PHP Button::contextMenu方法的具體用法?PHP Button::contextMenu怎麽用?PHP Button::contextMenu使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Button
的用法示例。
在下文中一共展示了Button::contextMenu方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getHTML
function getHTML($id)
{
$this->loadMeOrEmpty();
$gui = new HTMLGUI2();
$gui->setObject($this);
$gui->setName("Serie");
$gui->setShowAttributes(array("name", "sprache", "dir", "lastupdate", "genre", "description", "status", "quality", "RSSFilterID", "altFeedName1", "altFileName1"));
#$gui->setType("adapter", "hidden");
#$gui->setType("lastupdate", "readonly");
#$gui->setType("siteID", "hidden");
#$gui->setType("url", "hidden");
$gui->setType("description", "textarea");
$gui->setLabel("sprache", "Language");
$gui->setLabel("lastupdate", "Last update");
$gui->setLabel("RSSFilterID", "RSS feed");
$gui->setLabel("altFileName1", "alt. file name");
$gui->setLabel("altFeedName1", "alt. feed name");
$gui->setFieldDescription("altFileName1", "This is useful if the filenames do not match the full series name. trinityDB will then look for both names on the harddrive. For example 'switch' instead of 'Switch Reloaded'.");
$gui->setFieldDescription("altFeedName1", "This is useful if the feed names do not match the full series name. trinityDB will then look for both names in the feeds. For example 'Human.Target.2010' instead of 'Human Target (2010)'.");
$gui->setParser("lastupdate", "SerieGUI::lastUpdateParser");
$gui->setType("quality", "select");
$gui->setOptions("quality", array_keys(self::getQualities()), array_values(self::getQualities()));
$gui->setType("sprache", "select");
$gui->setOptions("sprache", array("en", "de"), array("english", "deutsch"));
$gui->setStandardSaveButton($this);
$gui->insertSpaceAbove("RSSFilterID");
$gui->selectWithCollection("RSSFilterID", new mRSSFilterGUI(), "RSSFilterName", "none");
$tab = new HTMLSideTable("right");
$B = new Button("Download\nepisodes", "./trinityDB/Serien/Updates.png");
#$B->rmePCR("Serie", $this->ID, "downloadEpisodes", array("'1'"), "Popup.display('Download-Status', transport);");
$B->popup("", "Download-Status", "Serie", $this->ID, "downloadEpisodes", array("'1'"));
$S = new Button("Settings", "./images/i2/settings.png");
$S->type("icon");
$S->style("float:right;margin-right:-20px;");
$S->contextMenu("Serie", "download", "Settings");
$tab->addRow($S . $B);
$B = new Button("Show\nepisodes", "./trinityDB/Serien/Folge.png");
$B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $this->getID() . "');");
$tab->addRow($B);
#$B = new Button("Find new\nepisodes","./trinityDB/RSSFilter/RSSFilter.png");
#$B->rmePCR("Serie", $this->ID, "checkRSS", "", "Popup.display('Episoden-Status', transport);");
#$tab->addRow($B);
$B = new Button("Check\nepisodes", "okCatch");
$B->rmePCR("Serie", $this->ID, "checkAllEpisodes", "", "Popup.display('Episoden-Status', transport);");
$tab->addRow($B);
$Image = new Button("", DBImageGUI::imageLink("Serie", $this->getID(), "cover", false, true), "icon");
$Image->style("width:150px;");
$tab->addRow(array($Image));
return $tab . $gui->getEditHTML();
}
示例2: operationsButton
public function operationsButton()
{
$pluginName = str_replace("GUI", "", get_class($this->object));
$id = $this->object->getID();
$userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $pluginName);
$userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $pluginName);
/*if($this->texts == null) {
$c = $this->loadLanguageClass("HTML");
$this->texts = $c->getEditTexts();
}*/
$html = "";
if (PMReflector::implementsInterface($pluginName, "iNewWithValues") and $userCanCreate) {
$os = "1";
} else {
$os = "0";
}
if (PMReflector::implementsInterface($pluginName, "iCloneable") and $userCanCreate) {
$os .= "1";
} else {
$os .= "0";
}
if ((PMReflector::implementsInterface($pluginName, "iDeletable") or PMReflector::implementsInterface($pluginName, "iDeletable2")) and $userCanDelete) {
$os .= "1";
} else {
$os .= "0";
}
if (PMReflector::implementsInterface($pluginName, "iRepeatable") and Session::isPluginLoaded("mRepeatable")) {
$os .= "1";
} else {
$os .= "0";
}
if (PMReflector::implementsInterface($pluginName, "iXMLExport")) {
$os .= "1";
} else {
$os .= "0";
}
if ($id != -1 and $os != "00000") {
$B = new Button("Operationen", "wrench", "iconic");
$B->style("float:right;margin-top:-3px;");
$B->contextMenu("HTML", "operations:{$pluginName}:{$id}:{$os}", "Operationen");
$html = $B;
}
#$html .= "<img title=\"Operationen\" id=\"".$pluginName."Operations\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','operations:$pluginName:$id:$os','".$this->texts["Operationen"].":');\" style=\"float:right;\" />";
return $html;
}
示例3: addRestrictionParser
public static function addRestrictionParser($w, $l, $p)
{
$deText = array();
$deText["Umbenennung"] = "Umbenennung";
$deText["Einschränkung"] = "Einschränkung";
$deText["Ausblenden"] = "Ausblenden";
$deText["Plugin"] = "Plugin";
$ac = new anyC();
$singularLanguageClass = $ac->loadLanguageClass("Userdata");
$text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deText;
$BA = new Button("Anmeldung", "./plugins/Userdata/login.png");
$BA->contextMenu("mUserdata", "login", "Anmeldung", "right", "up");
$BA->style("float:right;");
$BN = new Button("Einschränkung\nhinzufügen", "restrictions");
$BN->contextMenu("mUserdata", "1", "Einschränkung", "right", "up");
$BS = new Button("Plugin-\nspezifisch", "lieferschein");
$BS->contextMenu("mUserdata", "4", "Plugin-spezifisch", "right", "up");
$BS->style("float:right;");
$BP = new Button("Plugin\nausblenden", "tab");
$BP->contextMenu("mUserdata", "5", "Plugin ausblenden", "right", "up");
$BR = new Button("Rollen", "./plugins/Userdata/role.png");
$BR->popup("", "Rollen", "mUserdata", "-1", "rolesPopup", array("lastLoadedLeft"));
return "<p class=\"highlight\">Achtung: Die möglichen Berechtigungen sind von der geladenen Anwendung und ihren Plugins abhängig. Melden Sie sich an einer anderen Anwendung an, um weitere Berechtigungen zu vergeben.</p>" . "\n\t\t<!--<input type=\"button\" class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Feld\numbenennen"]) ? $text["Feld\numbenennen"] : "Feld\numbenennen") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','2','" . $text["Umbenennung"] . ":');\" style=\"float:right;background-image:url(./images/navi/relabel.png);\" />\n\t\t<button class=\"bigButton backgroundColor3\" value=\"" . (isset($text["Einschränkung\nhinzufügen"]) ? $text["Einschränkung\nhinzufügen"] : "") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','1','" . $text["Einschränkung"] . ":');\" style=\"margin-bottom:10px;background-image:url(./images/navi/restrictions.png);\" /><br />-->\n\t\t{$BN}{$BS}<br><br>\n\t\t<!--<input type=\"button\" class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Feld\nausblenden"]) ? $text["Feld\nausblenden"] : "Feld\nausblenden") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','3','" . $text["Ausblenden"] . ":');\" style=\"float:right;background-image:url(./images/navi/clear.png);\" />\n\t\t<button class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Plugin-\nspezifisch"]) ? $text["Plugin-\nspezifisch"] : "Plugin-\nspezifisch") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','4','" . $text["Plugin"] . ":');\" style=\"margin-bottom:10px;background-image:url(./images/navi/lieferschein.png);\" />-->\n\t\t{$BP}{$BA}<br><br>\n\t\t{$BR}\n\t\t<!--<button class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Plugin\nausblenden"]) ? $text["Plugin\nausblenden"] : "Plugin\nausblenden") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','5','" . $text["Plugin"] . ":');\" style=\"background-image:url(./images/navi/tab.png);\" />-->";
}
示例4: settings
function settings($plugin, $identifier = "", $leftOrRight = "right")
{
$this->settings = $B = new Button("Einstellungen", "wrench", "iconic");
if (strpos($this->style, "float:right;") !== false) {
$B->style("float:right;margin-right:-22px;");
} else {
$B->style("margin-left:4px;margin-bottom:15px;");
}
$B->contextMenu($plugin, $identifier, "Einstellungen:", $leftOrRight);
$B->className("buttonSettings iconicG");
return $B;
}
示例5: settings
function settings($plugin, $identifier = "")
{
$this->settings = $B = new Button("Einstellungen", "./images/i2/settings.png");
$B->type("icon");
if (strpos($this->style, "float:right;") !== false) {
$B->style("float:right;margin-right:-22px;");
} else {
$B->style("margin-left:4px;margin-bottom:15px;");
}
$B->contextMenu($plugin, $identifier, "Einstellungen:");
return $B;
}