当前位置: 首页>>代码示例>>PHP>>正文


PHP RequestContext::name方法代码示例

本文整理汇总了PHP中RequestContext::name方法的典型用法代码示例。如果您正苦于以下问题:PHP RequestContext::name方法的具体用法?PHP RequestContext::name怎么用?PHP RequestContext::name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RequestContext的用法示例。


在下文中一共展示了RequestContext::name方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     $name = RequestContext::name($fieldName);
     $m = "<input type='text' \n\t\t\t\tname='{$name}' \n\t\t\t\tid='{$fieldName}' \n\t\t\t\tsize='" . $this->_size . "' maxlength='" . $this->_maxlength . "'" . (!$this->isEnabled() ? " readonly='readonly'" : "");
     if ($this->_value != null && $this->_value != $this->_startingDisplay) {
         $m .= " value='" . htmlspecialchars($this->_value, ENT_QUOTES) . "'";
     } else {
         if ($this->_startingDisplay) {
             $v = htmlspecialchars($this->_startingDisplay, ENT_QUOTES);
             $m .= "\n\t\t\t\tvalue='{$v}' style='color: #888' ";
             $m .= "\n\t\t\t\tonfocus='if (this.value == \"{$v}\") { this.value=\"\";  this.style.color=\"#000\";}'";
             $m .= "\n\t\t\t\tonblur='if (this.value == \"\") { this.value=\"{$v}\"; this.style.color=\"#888\";}'";
         }
     }
     if ($this->_style) {
         $m .= "\n\t\t\t\tstyle=\"" . str_replace("\"", "\\\"", $this->_style) . "\"";
     }
     if ($this->_onchange) {
         $m .= "\n\t\t\t\tonchange=\"" . str_replace("\"", "\\\"", $this->_onchange) . "\"";
     }
     $m .= " />";
     $errText = $this->getErrorText();
     $errRule = $this->getErrorRule();
     $errStyle = $this->getErrorStyle();
     if ($errText && $errRule) {
         $m .= "\n\t\t<span id='" . $fieldName . "_error' style=\"padding-left: 10px; {$errStyle}\">&laquo; {$errText}</span>";
         $m .= Wizard::getValidationJavascript($fieldName, $errRule, $fieldName . "_error", $this->_showError);
         $this->_showError = false;
     }
     return $m;
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:39,代码来源:WTextField.class.php

示例2: buildContent

 function buildContent()
 {
     $harmoni = Harmoni::instance();
     $centerPane = $this->getActionRows();
     $centerPane->add(new Heading(_("Upload a file to view its EXIF/IPTC data"), 2), null, null, LEFT, TOP);
     ob_start();
     print "\n<form action='" . $harmoni->request->quickURL() . "' method='post' enctype='multipart/form-data'>";
     print "\n\t<input type='file' name='" . RequestContext::name('image_file') . "'/>";
     print "\n\t<input type='submit'/>";
     print "\n</form>";
     $centerPane->add(new Block(ob_get_clean(), STANDARD_BLOCK), null, null, LEFT, TOP);
     if (isset($_FILES[RequestContext::name('image_file')]) && !$_FILES[RequestContext::name('image_file')]['error']) {
         $fileArray = $_FILES[RequestContext::name('image_file')];
         ob_start();
         print "<h2>" . $fileArray['name'] . "</h2>";
         $exifImporter = new ExifRepositoryImporter($fileArray['tmp_name'], null, false);
         $exifImporter->getSingleAssetInfo($fileArray['tmp_name']);
         // 			printpre($exifImporter->_photoshopIPTC);
         print "\n<h3>" . _("IPTC Fields") . "</h3>";
         $this->printFields($exifImporter->extractPhotoshopMetaData());
         print "\n<h3>" . _("EXIF Fields") . "</h3>";
         $this->printFields($exifImporter->extractExifMetadata($fileArray['tmp_name']));
         $centerPane->add(new Block(ob_get_clean(), STANDARD_BLOCK), null, null, LEFT, TOP);
     }
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:25,代码来源:viewExif.act.php

示例3: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     ob_start();
     print "<div>";
     print "<input type='hidden' name='" . RequestContext::name($fieldName) . "' value=''/>";
     $steps = $this->_stepContainer->getSteps();
     $currStep = $this->_stepContainer->getCurrentStep();
     $a = array();
     foreach (array_keys($steps) as $stepKey) {
         ob_start();
         if ($stepKey == $currStep) {
             print "<b>";
         } else {
             print "<a href='#' onclick=\"";
             print "var input = this.parentNode.firstChild; ";
             print "input.value = '" . $stepKey . "'; ";
             print "submitWizard(input.form); ";
             print "return false; \">";
         }
         print $stepKey + 1 . ". " . $steps[$stepKey]->getDisplayName();
         if ($stepKey == $currStep) {
             print "</b>";
         } else {
             print "</a>";
         }
         $a[] = ob_get_clean();
     }
     print implode("\n&raquo;\n", $a);
     print "</div>";
     return ob_get_clean();
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:39,代码来源:WStepDisplayBar.class.php

示例4: buildContent

 /**
  * Build the content for this action
  * 
  * @return void
  * @access public
  * @since 4/26/05
  */
 function buildContent()
 {
     $defaultTextDomain = textdomain("polyphony");
     $actionRows = $this->getActionRows();
     $pageRows = new Container(new YLayout(), OTHER, 1);
     $harmoni = Harmoni::instance();
     $harmoni->request->startNamespace("polyphony-agents");
     $agentManager = Services::getService("Agent");
     $idManager = Services::getService("Id");
     $cm = Services::getService("CourseManagement");
     $everyoneId = $idManager->getId("edu.middlebury.agents.everyone");
     $usersId = $idManager->getId("edu.middlebury.agents.users");
     /*********************************************************
      * the agent search form
      *********************************************************/
     // Users header
     $actionRows->add(new Heading(_("Users"), 2), "100%", null, LEFT, CENTER);
     ob_start();
     $self = $harmoni->request->quickURL();
     $lastCriteria = $harmoni->request->get("search_criteria");
     $search_criteria_name = RequestContext::name("search_criteria");
     $search_type_name = RequestContext::name("search_type");
     print _("Search For Users") . ": ";
     print "<form action='{$self}' method='post'>\n\t\t\t<div>\n\t\t\t<input type='text' name='{$search_criteria_name}' value='{$lastCriteria}' />";
     print "\n\t<input type='submit' value='" . _("Search") . "' />";
     print "\n\t<a href='" . $harmoni->request->quickURL() . "'>";
     print "<input type='button' value='" . _("Clear") . "' /></a>";
     print "\n</div>\n</form>";
     $actionRows->add(new Block(ob_get_contents(), STANDARD_BLOCK), "100%", null, LEFT, CENTER);
     ob_end_clean();
     /*********************************************************
      * the agent search results
      *********************************************************/
     ob_start();
     if ($search_criteria = $harmoni->request->get('search_criteria')) {
         //$typeParts = explode("::", @html_entity_decode($search_type, ENT_COMPAT, 'UTF-8'));
         $searchType = new HarmoniType("Agent & Group Search", "edu.middlebury.harmoni", "TokenSearch");
         //$searchType = new HarmoniType("Agent & Group Search", "edu.middlebury.harmoni", "WildcardSearch");
         $string = "*" . $search_criteria . "*";
         $agents = $agentManager->getAgentsBySearch($string, $searchType);
         print "search: " . $search_criteria;
         while ($agents->hasNext()) {
             $agent = $agents->next();
             $id = $agent->getId();
             $harmoni->history->markReturnURL("polyphony/agents/edit_agent_details");
             print "\n<p align='center'><a href='" . $harmoni->request->quickURL("agents", "edit_agent_details", array("agentId" => $id->getIdString())) . "'>";
             print "\n" . $agent->getDisplayName() . "</a>";
             print "\n - <a href=\"Javascript:alert('" . _("Id:") . '\\n\\t' . addslashes($id->getIdString()) . "')\">Id</a></p>";
         }
         print "\n</div>";
         $actionRows->add(new Block(ob_get_contents(), STANDARD_BLOCK), "100%", null, LEFT, CENTER);
         ob_end_clean();
     }
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:61,代码来源:agent_search.act.php

示例5: getDescription

 /**
  * Answer a description of this category for display purposes
  * 
  * @return string
  * @access public
  * @since 4/1/08
  */
 public function getDescription()
 {
     $harmoni = Harmoni::instance();
     $handler = $harmoni->getOutputHandler();
     $handler->setHead($handler->getHead() . "\n\t\t<script type='text/javascript' src='" . MYPATH . "/javascript/PortalSearch.js'></script>");
     ob_start();
     print "\n<form onsubmit='PortalSearch.submitForm(this); return false;' action='";
     print $harmoni->request->quickUrl('portal', 'perform_search');
     print "' method='post'>";
     print "\n\t<input type='text' name='" . RequestContext::name('query') . "' size='15'/>";
     print "\n\t<input type='submit' value='" . _("Search &raquo;") . "'/>";
     print "\n</form>";
     return ob_get_clean();
 }
开发者ID:adamfranco,项目名称:segue,代码行数:21,代码来源:SearchPortalCategory.class.php

示例6: init

 /**
  * Initialize this object
  * 
  * @return void
  * @access public
  * @since 5/15/06
  */
 function init()
 {
     if (!$this->_initilaized) {
         $harmoni = Harmoni::instance();
         $harmoni->request->startNamespace('SimpleFieldModule');
         $this->_contextFieldName = RequestContext::name($this->_fieldname);
         if (RequestContext::value($this->_fieldname)) {
             $this->_value = RequestContext::value($this->_fieldname);
         } else {
             $this->_value = null;
         }
         $harmoni->request->endNamespace();
         $this->_initilaized = true;
     }
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:22,代码来源:SimpleFieldModule.class.php

示例7: getSiteHeader

 /**
  * Add the site header gui components
  * 
  * @return Component
  * @access public
  * @since 4/7/08
  */
 public function getSiteHeader()
 {
     $harmoni = Harmoni::instance();
     ob_start();
     $harmoni->request->startNamespace('polyphony-tags');
     print "\n<form action='" . SiteDispatcher::quickURL(null, null, array('tag' => RequestContext::value('tag'))) . "' method='post' style='display: inline;'>";
     print "\n\t<select name='" . RequestContext::name('num_tags') . "'";
     print " onchange='this.form.submit()'>";
     $options = array(50, 100, 200, 400, 600, 1000, 0);
     foreach ($options as $option) {
         print "\n\t\t<option value='" . $option . "' " . ($option == $this->getNumTags() ? " selected='selected'" : "") . ">" . ($option ? $option : _('all')) . "</option>";
     }
     print "\n\t</select>";
     print "\n</form>";
     $harmoni->request->endNamespace();
     return new Block(str_replace('%1', ob_get_clean(), _("Showing top %1 tags")), STANDARD_BLOCK);
 }
开发者ID:adamfranco,项目名称:segue,代码行数:24,代码来源:segue.act.php

示例8: buildContent

 /**
  * Build the content for this action
  * 
  * @return boolean
  * @access public
  * @since 2/28/08
  */
 function buildContent()
 {
     $harmoni = Harmoni::instance();
     $actionRows = $this->getActionRows();
     ob_start();
     print "\n<form action='" . $harmoni->request->quickURL() . "' method='get'>";
     print "\n\t<input name='" . RequestContext::name('interval_size') . "' size='3' value='";
     if (RequestContext::value('interval_size')) {
         print RequestContext::value('interval_size');
     } else {
         print '3';
     }
     print "'/>";
     if (RequestContext::value('interval_unit')) {
         $val = RequestContext::value('interval_unit');
     } else {
         $val = 'MONTH';
     }
     $units = array('DAY', 'WEEK', 'MONTH', 'YEAR');
     print "\n\t<select name='" . RequestContext::name('interval_unit') . "'>";
     foreach ($units as $unit) {
         print "\n\t\t<option value='" . $unit . "'";
         if ($val == $unit) {
             print " selected='selected'";
         }
         print ">" . ucfirst(strtolower($unit . 's')) . "</option>";
     }
     print "\n\t</select>";
     print "\n\t<input type='submit' value='" . _('Set Date Range') . "'/>";
     print "\n</form>";
     print "\n<p>";
     $params = array();
     if (RequestContext::value('interval_size')) {
         $params['interval_size'] = RequestContext::value('interval_size');
     }
     if (RequestContext::value('interval_unit')) {
         $params['interval_unit'] = RequestContext::value('interval_unit');
     }
     print "<img src='" . $harmoni->request->quickURL("logs", "usage_graph", $params) . "' alt='" . _("Usage Graph") . "'/>";
     print "</p>";
     $actionRows->add(new Block(ob_get_clean(), STANDARD_BLOCK), "100%", null, CENTER, CENTER);
 }
开发者ID:adamfranco,项目名称:segue,代码行数:49,代码来源:usage.act.php

示例9: getResultsMarkup

 /**
  * Answer the markup for a set of search results
  * 
  * @param string $fieldName
  * @param array $results An array of WSearchResult objects
  * @return string
  * @access public
  * @since 11/27/07
  */
 public function getResultsMarkup($fieldName, $results)
 {
     $harmoni = Harmoni::instance();
     if (count($results)) {
         print "\n\t<table id='" . RequestContext::name($fieldName) . "_output' class='search_results' cellspacing='0'>";
         $colorKey = 0;
         foreach ($results as $result) {
             print "\n\t\t<tr class='search_result_item '>";
             print "\n\t\t\t<td class='color" . $colorKey . "'>";
             print $result->getMarkup();
             print "\n\t\t\t</td>";
             print "\n\t\t\t<td class='action_button color" . $colorKey . "'>";
             $url = $harmoni->request->quickURL('roles', 'modify', array('node' => SiteDispatcher::getCurrentNodeId(), 'agent' => $result->getIdString()));
             print "\n\t\t\t<button onclick='window.location = \"{$url}\".urlDecodeAmpersands(); return false;'>" . _("Modify Roles &raquo;") . "</button>";
             print "\n\t\t\t</td>";
             print "\n\t\t</tr>";
             $colorKey = intval(!$colorKey);
         }
         print "\n\t</table>";
     }
 }
开发者ID:adamfranco,项目名称:segue,代码行数:30,代码来源:AgentSearchSource.class.php

示例10: init

 /**
  * Initialize this object
  * 
  * @return void
  * @access public
  * @since 5/15/06
  */
 function init()
 {
     if (!$this->_initilaized) {
         $harmoni = Harmoni::instance();
         $harmoni->request->startNamespace('PartAndValuesModule');
         $this->_contextPartStructFieldName = RequestContext::name($this->_partStructFieldName);
         $this->_contextValueFieldName = RequestContext::name($this->_valueFieldName);
         if (RequestContext::value($this->_partStructFieldName)) {
             $this->_partStruct = RequestContext::value($this->_partStructFieldName);
         } else {
             $this->_partStruct = null;
         }
         if (RequestContext::value($this->_valueFieldName)) {
             $this->_value = RequestContext::value($this->_valueFieldName);
         } else {
             $this->_value = null;
         }
         $harmoni->request->endNamespace();
         $this->_initilaized = true;
     }
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:28,代码来源:PartAndValuesModule.class.php

示例11: buildContent

 /**
  * Build the content for this action
  * 
  * @return void
  * @access public
  * @since 4/26/05
  */
 function buildContent()
 {
     $defaultTextDomain = textdomain("polyphony");
     $actionRows = $this->getActionRows();
     $harmoni = Harmoni::instance();
     ob_start();
     $userPrefs = UserData::instance();
     // 		$userPrefs->setPreference('test_pref2', 'goodbye world');
     print "\n<input type='button' value='" . _("Clear Session-Values") . "'/>";
     // 		print "\n<input type='button' value='"._("Delete All Values")."'/>";
     print "\n<table border='1'>";
     print "\n\t<thead>";
     print "\n\t\t<tr>";
     print "\n\t\t\t<th>" . "</th>";
     print "\n\t\t\t<th>" . _('Key') . "</th>";
     print "\n\t\t\t<th>" . _('Value') . "</th>";
     print "\n\t\t\t<th>" . "</th>";
     print "\n\t\t\t<th>" . _('Session-Value') . "</th>";
     print "\n\t\t\t<th>" . _('Stored-Value') . "</th>";
     print "\n\t\t</tr>";
     print "\n\t</thead>";
     print "\n\t<tbody>";
     foreach ($userPrefs->getPreferenceKeys() as $key) {
         print "\n\t\t<tr>";
         print "\n\t\t\t<td><input type='button' name='" . RequestContext::name('delete') . "' value='" . _("Delete") . "'/></td>";
         print "\n\t\t\t<td class='user_pref_key'>" . $key . "</td>";
         print "\n\t\t\t<td class='user_pref_val'><input type='text' name='" . RequestContext::name('pref_val') . "' value=\"" . $userPrefs->getPreference($key) . "\"/></td>";
         print "\n\t\t\t<td><input type='button' name='" . RequestContext::name('save') . "' value='" . _("Save Changes") . "'/></td>";
         print "\n\t\t\t<td class='user_pref_sess_val'>" . $userPrefs->getPreferenceSessionValue($key) . "</td>";
         print "\n\t\t\t<td class='user_pref_stored_val'>" . $userPrefs->getPreferencePersistantValue($key) . "</td>";
         print "\n\t\t</tr>";
     }
     print "\n\t\t<tr>";
     print "\n\t\t\t<td></td>";
     print "\n\t\t\t<td><input type='text' name='" . RequestContext::name('pref_key') . "'/></td>";
     print "\n\t\t\t<td><input type='text' name='" . RequestContext::name('pref_val') . "'/></td>";
     print "\n\t\t\t<td><input type='button' name='" . RequestContext::name('new') . "' value='" . _("Create New Preference") . "'/></td>";
     print "\n\t\t\t<td></td>";
     print "\n\t\t\t<td></td>";
     print "\n\t\t</tr>";
     print "\n\t</tbody>";
     print "\n</table>";
     $actionRows->add(new Block(ob_get_clean(), STANDARD_BLOCK), "100%", null, LEFT, TOP);
     textdomain($defaultTextDomain);
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:52,代码来源:preferences.act.php

示例12: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     $name = RequestContext::name($fieldName) . "[]";
     $style = '';
     if ($this->_style) {
         $style = " style=\"" . addslashes($this->_style) . "\"";
     }
     $m = "<select name='{$name}' size='" . $this->_size . "' multiple{$style}>\n";
     foreach (array_keys($this->_items) as $key) {
         $disp = $this->_items[$key];
         $selected = in_array($key, $this->_value) ? " selected='selected'" : "";
         $val = htmlspecialchars($key, ENT_QUOTES);
         $m .= "<option value='{$val}'{$selected}>" . htmlspecialchars($disp) . "</option>\n";
     }
     $m .= "</select>\n";
     return $m;
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:25,代码来源:WMultiSelectList.class.php

示例13: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     $guimanager = Services::getService("GUIManager");
     $name = RequestContext::name($fieldName);
     $value = $this->_value;
     $settings = $this->_settings;
     $colorwheelurl = "http://slug.middlebury.edu/~nstamato/polyphony/main/library/Wizard/Components/WColorWheelFiles/";
     $style = '';
     if ($this->_style) {
         $style = " style=\"" . addslashes($this->_style) . "\"";
     }
     $guimanager->setHead($guimanager->getHead() . "\n<link rel=\"stylesheet\" \n\t\thref='" . $colorwheelurl . "colorwheel.css' type=\"text/css\">" . "\n<script type=\"text/javascript\" src='" . $colorwheelurl . "colorblind.js'></script>" . "\n<script type=\"text/javascript\" src='" . $colorwheelurl . "colorwheel.js'></script>");
     $m = "<br /><div id=\"maindiv\" style='position:relative; border:1px solid #000; height:500px; width:800px; font:11px/1.2 verdana,sans-serif;'>\n\t\t\n\t\t<div id=\"maincolorsample\"></div>\n\t\t<div id='image'>\n\t\t\t<div id=\"wheelarea\"></div>\n\t\t\t<div id=\"pointer0\"></div>\n\t\t\t<div id=\"pointer1\"></div>\n\t\t\t<div id=\"pointer2\"></div>\n\t\t\t<div id=\"pointer3\"></div>\n\t\t</div>\n\t\t<div id=\"maincolorhue\"></div>\n\t\t\n\t\t\n\t\t<div id='scheme-select'>\n\t\t\t<img id=\"previmg-mono\"  src=" . $colorwheelurl . "prev_mono.gif\" alt=\"\" width=\"41\" height=\"52\" onclick=\"selectScheme('mono')\">\n\t\t\t<img id=\"previmg-compl\" class='previmg' src=" . $colorwheelurl . "prev_compl.gif\" alt=\"\" width=\"41\" height=\"52\" onclick=\"selectScheme('compl')\">\n\t\t\t<img id=\"previmg-triad\" class='previmg' src=" . $colorwheelurl . "prev_triad.gif\" alt=\"\" width=\"41\" height=\"52\" onclick=\"selectScheme('triad')\">\n\t\t\t<img id=\"previmg-tetrad\" class='previmg' src=" . $colorwheelurl . "prev_tetrad.gif\" alt=\"\" width=\"41\" height=\"52\" onclick=\"selectScheme('tetrad')\">\n\t\t\t<img id=\"previmg-analog\" class='previmg' src=" . $colorwheelurl . "prev_analog.gif\" alt=\"\" width=\"41\" height=\"52\" onclick=\"selectScheme('analog')\">\n\t\t\n\t\t</div>\n\t\t\n\t\t<div id=\"scheme-slider\">\n\t\t\t<div id=\"pointer-slider\"></div>\n\t\t</div>\n\t\t\n\t\t<div id=\"scheme-addcompl\">\n\t\t\t<input type=\"checkbox\" id=\"analogCompl\" onchange=\"createScheme(false)\" onclick=\"createScheme(false)\"> <label for=\"analogCompl\">add the complement</label>\n\t\t</div>\n\t\t\n\t\t<div id=\"scheme-searchrgb\">\n\t\t\t<a href=\"#\" onclick=\"searchRGB(false)\">Enter RGB</a> (rough conversion)\n\t\t</div>\n\t\t\n\t\t<div id=\"colsample\">\n\t\t\n\t\t\t<div id=\"color0\" class=\"col\">\n\t\t\t\t<div id=\"color0-0\" class=\"col-0\" onclick=\"drawVar(0,0)\"></div>\n\t\t\t\t<div id=\"color0-1\" class=\"col-1\" onclick=\"drawVar(0,1)\"></div>\n\t\t\t\t<div id=\"color0-2\" class=\"col-2\" onclick=\"drawVar(0,2)\"></div>\n\t\t\t\t<div id=\"color0-3\" class=\"col-3\" onclick=\"drawVar(0,3)\"></div>\n\t\t\t</div>\n\t\t\n\t\t\t<div id=\"color1\" class=\"col\">\n\t\t\t\t<div id=\"color1-0\" class=\"col-0\" onclick=\"drawVar(1,0)\"></div>\n\t\t\t\t<div id=\"color1-1\" class=\"col-1\" onclick=\"drawVar(1,1)\"></div>\n\t\t\t\t<div id=\"color1-2\" class=\"col-2\" onclick=\"drawVar(1,2)\"></div>\n\t\t\t\t<div id=\"color1-3\" class=\"col-3\" onclick=\"drawVar(1,3)\"></div>\n\t\t\t</div>\n\t\t\n\t\t\t<div id=\"color2\" class=\"col\">\n\t\t\t\t<div id=\"color2-0\" class=\"col-0\" onclick=\"drawVar(2,0)\"></div>\n\t\t\t\t<div id=\"color2-1\" class=\"col-1\" onclick=\"drawVar(2,1)\"></div>\n\t\t\t\t<div id=\"color2-2\" class=\"col-2\" onclick=\"drawVar(2,2)\"></div>\n\t\t\t\t<div id=\"color2-3\" class=\"col-3\" onclick=\"drawVar(2,3)\"></div>\n\t\t\t</div>\n\t\t\n\t\t\t<div id=\"color3\" class=\"col\">\n\t\t\t\t<div id=\"color3-0\" class=\"col-0\" onclick=\"drawVar(3,0)\"></div>\n\t\t\t\t<div id=\"color3-1\" class=\"col-1\" onclick=\"drawVar(3,1)\"></div>\n\t\t\t\t<div id=\"color3-2\" class=\"col-2\" onclick=\"drawVar(3,2)\"></div>\n\t\t\t\t<div id=\"color3-3\" class=\"col-3\" onclick=\"drawVar(3,3)\"></div>\n\t\t\t</div>\n\t\t\n\t\t\n\t\t\t<div id=\"textBlack\">Lorem ipsum <strong>dolor sit amet</strong></div>\n\t\t\t<div id=\"textWhite\"><strong>Lorem ipsum</strong> dolor sit amet</div>\n\t\t</div>\n\t\t\n\t\t<div id=\"coltable\"></div>\n\t\t\n\t\t<div id=\"websnapswitch\">\n\t\t\t<input type=\"checkbox\" id=\"websnapper\" onclick=\"switchWebSnap(this.checked)\" onchange=\"switchWebSnap(this.checked)\"> <label for=\"websnapper\">Reduce to \"safe\" colors (WebColors)</label>\n\t\t</div>\n\t\t\n\t\t<div id=\"presetswitch\">\n\t\t\tVariations:\n\t\t\t<a href=\"\" id=\"preset-default\" class=\"btn\" onclick=\"switchPreset('default');return false\">Default</a>\n\t\t\t<a href=\"\" id=\"preset-pastel\" class=\"btn\" onclick=\"switchPreset('pastel');return false\">Pastel</a>\n\t\t\t<a href=\"\" id=\"preset-soft\" class=\"btn\" onclick=\"switchPreset('soft');return false\">Dark pastel</a>\n\t\t\t<a href=\"\" id=\"preset-light\" class=\"btn\" onclick=\"switchPreset('light');return false\">Light pastel</a>\n\t\t\t<a href=\"\" id=\"preset-hard\" class=\"btn\" onclick=\"switchPreset('hard');return false\">Contrast</a>\n\t\t\t<a href=\"\" id=\"preset-pale\" class=\"btn\" onclick=\"switchPreset('pale');return false\">Pale</a>\n\t\t</div>\n\t\t\n\t\t<a id=\"url\" href=\"index.html\">URL of this scheme</a>\n\t\t\n\t\t<div style='position:absolute; left:300px; top:385px; height:100; width: 450px; text-align: right;'>\n\t\t\n\t\t\n\t\t\t<select id=\"cbmodeswitcher\" onchange=\"switchBlindlessMode()\">\n\t\t\t\t<option value=\"\">Normal vision (cca 85,5 % of population)</option>\n\t\t\t\t<option value=\"1\">Protanopy (1 % of men)</option>\n\t\t\t\t<option value=\"2\">Deuteranopy (1 % of men)</option>\n\t\t\t\t<option value=\"3\">Tritanopy (cca 0,003 % of population)</option>\n\t\t\t\t<option value=\"4\">Protanomaly (1 % of men)</option>\n\t\t\t\t<option value=\"5\">Deuteranomaly (5 % of men, 0.4 % of women)</option>\n\t\t\t\t<option value=\"6\">Tritanomaly (almost 0 %)</option>\n\t\t\t\t<option value=\"7\">Full colorblindness (0,005% of population)</option>\n\t\t\t\t<option value=\"8\">Atypical monochromatism</option>\n\t\t\t</select>\n\t\t\n\t\t</div>\n\t\t<div id=\"colsamplevarsswitch\"><div class=\"bottomaligner\">\n\t\t\t<a href=\"\" class=\"btn\" id=\"cancelsamplevars\" onclick=\"drawSample();return false\">Back</a>\n\t\t</div></div>\n\t\t<div id=\"colsamplevars\"></div>\n\t\t\n\t\t<p id=\"info\">\n\t\t\t<a href=\"http://www.wellstyled.com\">Wellstyled.com</a> &rarr;\n\t\t\t<strong>Color schemes generator 2</strong> &bull;\n\t\t\tPlease read <a id=\"helptext\" href=" . $colorwheelurl . "help.html>more info &amp; help</a><br>\n\t\t\t&bull; Copyright <a href=\"http://www.pixy.cz\">pixy</a> &copy; 2002, 2004\n\t\t</p></div>";
     $m .= "<div id=\"display\">\n\t\t<input type='hidden' name='" . $name . "_colors' id='wizardColorWheelColors' value='{$value}' /></div>";
     $m .= "<div id=\"settings\">\n\t\t<input type='hidden' name='" . $name . "_settings' id='settingsdata' value='{$settings}' /></div>";
     return $m;
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:25,代码来源:WColorWheel.class.php

示例14: buildContent

 /**
  * This just adds an agent list for debugging purposes.
  * 
  * @return void
  * @access public
  * @since 11/07/06
  */
 function buildContent()
 {
     parent::buildContent();
     $defaultTextDomain = textdomain("polyphony");
     $actionRows = $this->getActionRows();
     ob_start();
     $harmoni = Harmoni::instance();
     $harmoni->request->startNamespace("polyphony-tags");
     ob_start();
     print "\n<select name='" . RequestContext::name('num_tags') . "'";
     print " onchange=\"";
     print "var url='" . $harmoni->request->quickURL(null, null, array('num_tags' => 'XXXXX')) . "'; ";
     print "window.location = url.replace(/XXXXX/, this.value).urlDecodeAmpersands(); ";
     print "\">";
     $options = array(50, 100, 200, 400, 600, 1000, 0);
     foreach ($options as $option) {
         print "\n\t<option value='" . $option . "' " . ($option == $this->getNumTags() ? " selected='selected'" : "") . ">" . ($option ? $option : _('all')) . "</option>";
     }
     print "\n</select>";
     print str_replace('%1', ob_get_clean(), _("Showing top %1 tags"));
     $actionRows->add(new Block(ob_get_clean(), STANDARD_BLOCK), "100%", null, LEFT, TOP);
     $harmoni->request->endNamespace();
     textdomain($defaultTextDomain);
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:31,代码来源:all.act.php

示例15: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     $name = RequestContext::name($fieldName);
     $m = "\n\t\t\t<textarea rows='" . $this->_rows . "' cols='" . $this->_cols . "'";
     if (isset($this->_wrapStyle) && is_string($this->_wrapStyle)) {
         $m .= " wrap='" . $this->_wrapStyle . "'";
     }
     $m .= "\n\t\t\t\tname='{$name}'";
     $m .= "\n\t\t\t\tid='{$name}'";
     $m .= !$this->isEnabled() ? " readonly='readonly'" : "";
     if ($this->_style) {
         $m .= "\n\t\t\t\tstyle=\"" . str_replace("\"", "\\\"", $this->_style) . "\"";
     }
     if ($this->_onchange) {
         $m .= "\n\t\t\t\tonchange=\"" . str_replace("\"", "\\\"", $this->_onchange) . "\"";
     }
     if ($this->_value != null && $this->_value != $this->_startingDisplay) {
         $m .= ">" . htmlspecialchars($this->_value);
     } else {
         if ($this->_startingDisplay) {
             $v = htmlspecialchars($this->_startingDisplay, ENT_QUOTES);
             $m .= "\n\t\t\t\tonfocus='if (this.value == \"{$v}\") { this.value=\"\";   this.style.color=\"#000\";}'";
             $m .= "\n\t\t\t\tonblur='if (this.value == \"\") { this.value=\"{$v}\";  this.style.color=\"#888\";}'";
             $m .= " style='color: #888'>" . $v;
         } else {
             $m .= ">" . htmlspecialchars($this->_value);
         }
     }
     $m .= "</textarea>";
     $errText = $this->getErrorText();
     $errRule = $this->getErrorRule();
     $errStyle = $this->getErrorStyle();
     if ($errText && $errRule) {
         $m .= "<span id='" . $fieldName . "_error' style=\"padding-left: 10px; {$errStyle}\">&laquo; {$errText}</span>";
         $m .= Wizard::getValidationJavascript($fieldName, $errRule, $fieldName . "_error", $this->_showError);
         $this->_showError = false;
     }
     return $m;
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:47,代码来源:WTextArea.class.php


注:本文中的RequestContext::name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。