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


PHP JHtml::tooltipText方法代码示例

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


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

示例1: clients

 /**
  * Display a batch widget for the client selector.
  *
  * @return  string  The necessary HTML for the widget.
  *
  * @since   2.5
  */
 public static function clients()
 {
     JHtml::_('bootstrap.tooltip');
     // Create the batch selector to change the client on a selection list.
     $lines = array('<label id="batch-client-lbl" for="batch-client" class="hasTooltip" title="' . JHtml::tooltipText('COM_BANNERS_BATCH_CLIENT_LABEL', 'COM_BANNERS_BATCH_CLIENT_LABEL_DESC') . '">', JText::_('COM_BANNERS_BATCH_CLIENT_LABEL'), '</label>', '<select name="batch[client_id]" class="inputbox" id="batch-client-id">', '<option value="">' . JText::_('COM_BANNERS_BATCH_CLIENT_NOCHANGE') . '</option>', '<option value="0">' . JText::_('COM_BANNERS_NO_CLIENT') . '</option>', JHtml::_('select.options', static::clientlist(), 'value', 'text'), '</select>');
     return implode("\n", $lines);
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:14,代码来源:banner.php

示例2: getinput

 /**
  * Method to get form input field
  *
  * @return string
  */
 protected function getinput()
 {
     $doc = JFactory::getDocument();
     $fieldName = $this->name;
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_bwpostman/tables');
     $newsletter = JTable::getInstance('newsletters', 'BwPostmanTable');
     if ($this->value) {
         $newsletter->load($this->value);
     } else {
         $newsletter->subject = JText::_('COM_BWPOSTMAN_SELECT_NEWSLETTER');
     }
     $js = "\r\n\t\tfunction SelectNewsletter(id, subject) {\r\n\t\t\tdocument.getElementById('a_id').value = id;\r\n\t\t\tdocument.getElementById('a_name').value = subject;\r\n\t\t\tvar btn = window.parent.document.getElementById('sbox-btn-close');\r\n\t\t\tbtn.fireEvent('click');\r\n\t\t}";
     $link = 'index.php?option=com_bwpostman&amp;view=newsletterelement&amp;tmpl=component';
     $doc->addScriptDeclaration($js);
     JHTML::_('behavior.modal', 'a.modal');
     // The active newsletter id field.
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     // class='required' for client side validation
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html = '<span class="input-append">';
     $html .= '<input type="text" class="input-medium" id="a_name" value="' . $newsletter->subject . '" disabled="disabled" size="35" />';
     $html .= '<a class="modal btn hasTooltip" title="' . JHtml::tooltipText('COM_BWPOSTMAN_SELECT_NEWSLETTER') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('JSELECT') . '</a>';
     $html .= "\n<input type=\"hidden\" id=\"a_id\" {$class} name=\"{$fieldName}\" value=\"{$value}\" />";
     return $html;
 }
开发者ID:RomanaBW,项目名称:BwPostman,代码行数:37,代码来源:singlenews.php

示例3: getLabel

 /**
  * Method to get the field label markup for a spacer.
  * Use the label text or name from the XML element as the spacer or
  * Use a hr="true" to automatically generate plain hr markup
  *
  * @return  string  The field label markup.
  *
  * @since   11.1
  */
 protected function getLabel()
 {
     $html = array();
     $class = !empty($this->class) ? ' class="' . $this->class . '"' : '';
     $html[] = '<span class="spacer">';
     $html[] = '<span class="before"></span>';
     $html[] = '<span' . $class . '>';
     if ((string) $this->element['hr'] == 'true') {
         $html[] = '<hr' . $class . ' />';
     } else {
         $label = '';
         // Get the label text from the XML element, defaulting to the element name.
         $text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
         $text = $this->translateLabel ? JText::_($text) : $text;
         // Build the class for the label.
         $class = !empty($this->description) ? 'hasTooltip' : '';
         $class = $this->required == true ? $class . ' required' : $class;
         // Add the opening label tag and main attributes attributes.
         $label .= '<label id="' . $this->id . '-lbl" class="' . $class . '"';
         // If a description is specified, use it to build a tooltip.
         if (!empty($this->description)) {
             JHtml::_('bootstrap.tooltip');
             $label .= ' title="' . JHtml::tooltipText(trim($text, ':'), JText::_($this->description), 0) . '"';
         }
         // Add the label text and closing tag.
         $label .= '>' . $text . '</label>';
         $html[] = $label;
     }
     $html[] = '</span>';
     $html[] = '<span class="after"></span>';
     $html[] = '</span>';
     return implode('', $html);
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:42,代码来源:spacer.php

示例4: edit

 public static function edit($weblink, $params, $attribs = array())
 {
     $uri = JUri::getInstance();
     if ($params && $params->get('popup')) {
         return;
     }
     if ($weblink->state < 0) {
         return;
     }
     JHtml::_('bootstrap.tooltip');
     $url = WeblinksHelperRoute::getFormRoute($weblink->id, base64_encode($uri));
     $icon = $weblink->state ? 'edit.png' : 'edit_unpublished.png';
     $text = JHtml::_('image', 'system/' . $icon, JText::_('JGLOBAL_EDIT'), null, true);
     if ($weblink->state == 0) {
         $overlib = JText::_('JUNPUBLISHED');
     } else {
         $overlib = JText::_('JPUBLISHED');
     }
     $date = JHtml::_('date', $weblink->created);
     $author = $weblink->created_by_alias ? $weblink->created_by_alias : $weblink->author;
     $overlib .= '&lt;br /&gt;';
     $overlib .= $date;
     $overlib .= '&lt;br /&gt;';
     $overlib .= htmlspecialchars($author, ENT_COMPAT, 'UTF-8');
     $button = JHtml::_('link', JRoute::_($url), $text);
     $output = '<span class="hasTooltip" title="' . JHtml::tooltipText('COM_WEBLINKS_EDIT') . ' :: ' . $overlib . '">' . $button . '</span>';
     return $output;
 }
开发者ID:01J,项目名称:skazkipronebo,代码行数:28,代码来源:icon.php

示例5: getInput

 protected function getInput()
 {
     // Load language
     JFactory::getLanguage()->load('com_sppagebuilder', JPATH_ADMINISTRATOR);
     // Build the script.
     $script = array();
     // Select button script
     $script[] = '	function jSelectPage_' . $this->id . '(id, title, catid, object) {';
     $script[] = '		document.getElementById("' . $this->id . '_id").value = id;';
     $script[] = '		document.getElementById("' . $this->id . '_name").value = title;';
     $script[] = '		jQuery("#modalPage' . $this->id . '").modal("hide");';
     if ($this->required) {
         $script[] = '		document.formvalidator.validate(document.getElementById("' . $this->id . '_id"));';
         $script[] = '		document.formvalidator.validate(document.getElementById("' . $this->id . '_name"));';
     }
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Setup variables for display.
     $html = array();
     $link = 'index.php?option=com_sppagebuilder&amp;view=pages&amp;layout=modal&amp;tmpl=component&amp;function=jSelectPage_' . $this->id;
     if (isset($this->element['language'])) {
         $link .= '&amp;forcedLanguage=' . $this->element['language'];
     }
     if ((int) $this->value > 0) {
         $db = JFactory::getDbo();
         $query = $db->getQuery(true)->select($db->quoteName('title'))->from($db->quoteName('#__sppagebuilder'))->where($db->quoteName('id') . ' = ' . (int) $this->value);
         $db->setQuery($query);
         try {
             $title = $db->loadResult();
         } catch (RuntimeException $e) {
             JError::raiseWarning(500, $e->getMessage());
         }
     }
     if (empty($title)) {
         $title = JText::_('COM_SPPAGEBUILDER_SELECT_AN_PAGE');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     // The active page id field.
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     $url = $link . '&amp;' . JSession::getFormToken() . '=1';
     // The current article display field.
     $html[] = '<span class="input-append">';
     $html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
     $html[] = '<a href="#modalPage' . $this->id . '" class="btn hasTooltip" role="button"  data-toggle="modal" title="' . JHtml::tooltipText('COM_SPPAGEBUILDER_CHANGE_PAGE') . '">' . '<span class="icon-file"></span> ' . JText::_('JSELECT') . '</a>';
     $html[] = '</span>';
     // The class='required' for client side validation
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
     $html[] = JHtml::_('bootstrap.renderModal', 'modalPage' . $this->id, array('url' => $url, 'title' => JText::_('COM_SPPAGEBUILDER_SELECT_AN_PAGE'), 'width' => '800px', 'height' => '400px', 'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">' . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'));
     return implode("\n", $html);
 }
开发者ID:spikart,项目名称:spikart.com.ua,代码行数:59,代码来源:page.php

示例6: getInput

 protected function getInput()
 {
     $app = JFactory::getApplication();
     JHtml::_('behavior.modal', 'a.modal');
     $script = array();
     $script[] = '	function jSelectListing_' . $this->id . '(id, title, object) {';
     $script[] = '		document.id("' . $this->id . '").value = id;';
     $script[] = '		document.id("' . $this->id . '_name").value = title;';
     $script[] = '		SqueezeBox.close();';
     $script[] = '	}';
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     $html = array();
     $link = 'index.php?option=com_judirectory&amp;view=listings&amp;layout=modal&amp;tmpl=component&amp;function=jSelectListing_' . $this->id;
     $db = JFactory::getDbo();
     $db->setQuery('SELECT title' . ' FROM #__judirectory_listings' . ' WHERE id = ' . (int) $this->value);
     $title = $db->loadResult();
     if ($error = $db->getErrorMsg()) {
         JError::raiseWarning(500, $error);
     }
     if (empty($title)) {
         $title = JText::_('COM_JUDIRECTORY_SELECT_LISTING');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     $joomla_version_arr = explode(".", JVERSION);
     $priVersion = $joomla_version_arr[0];
     $view = $app->input->get('view', '');
     if ($priVersion == 3) {
         $html[] = '<span class="' . ($view != 'modcomment' ? 'input-append' : '') . '">';
         $html[] = '<input type="text" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="' . $this->element['size'] . '"/>';
         if ($view != 'modcomment') {
             $html[] = '<a class="modal btn hasTooltip" title="' . JHtml::tooltipText('COM_JUDIRECTORY_SELECT_LISTING') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-list"></i> ' . JText::_('COM_JUDIRECTORY_SELECT') . '</a>';
         }
         $html[] = '</span>';
     } else {
         $html[] = '<div class="fltlft">';
         $html[] = '<input type="text" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="' . $this->element['size'] . '" />';
         $html[] = '</div>';
         if ($view != 'modcomment') {
             $html[] = '<div class="button2-left">';
             $html[] = '<div class="blank">';
             $html[] = '<a class="modal" title="' . JText::_('COM_JUDIRECTORY_SELECT_LISTING') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('COM_JUDIRECTORY_SELECT_LISTING') . '</a>';
             $html[] = '</div>';
             $html[] = '</div>';
         }
     }
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html[] = '<input type="hidden" id="' . $this->id . '"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
     return implode("\n", $html);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:57,代码来源:listing.php

示例7: status

 /**
  * Get the HTML code of the state switcher
  *
  * @param   int      $i          Row number
  * @param   int      $value      The state value
  * @param   boolean  $canChange  Can the user change the state?
  *
  * @return  string
  *
  * @since   3.4
  */
 public static function status($i, $value = 0, $canChange = false)
 {
     // Array of image, task, title, action.
     $states = array(-2 => array('trash', 'messages.unpublish', 'JTRASHED', 'COM_MESSAGES_MARK_AS_UNREAD'), 1 => array('publish', 'messages.unpublish', 'COM_MESSAGES_OPTION_READ', 'COM_MESSAGES_MARK_AS_UNREAD'), 0 => array('unpublish', 'messages.publish', 'COM_MESSAGES_OPTION_UNREAD', 'COM_MESSAGES_MARK_AS_READ'));
     $state = JArrayHelper::getValue($states, (int) $value, $states[0]);
     $icon = $state[0];
     if ($canChange) {
         $html = '<a href="#" onclick="return listItemTask(\'cb' . $i . '\',\'' . $state[1] . '\')" class="btn btn-micro hasTooltip' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[3]) . '"><span class="icon-' . $icon . '"></span></a>';
     }
     return $html;
 }
开发者ID:Ricardolau,项目名称:joomla-cms,代码行数:22,代码来源:messages.php

示例8: getInput

    protected function getInput()
    {
        JHtml::_('behavior.modal', 'a.modal');
        $script = array();
        $script[] = '    function jSelectTag_' . $this->id . '(id, title, object) {';
        $script[] = '        document.id("' . $this->id . '_id").value = id;';
        $script[] = '        document.id("' . $this->id . '_name").value = title;';
        $script[] = '        SqueezeBox.close();';
        $script[] = '    }';
        JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
        $html = array();
        $link = 'index.php?option=com_judownload&amp;view=tags&amp;layout=modal&amp;tmpl=component&amp;function=jSelectTag_' . $this->id . '&amp;' . JSession::getFormToken() . '=1';
        $db = JFactory::getDbo();
        $query = $db->getQuery(true);
        $query->select('title');
        $query->from('#__judownload_tags');
        $query->where('id=' . (int) $this->value);
        $db->setQuery($query);
        $title = $db->loadResult();
        if (empty($title)) {
            $title = JText::_('COM_JUDOWNLOAD_SELECT_TAG');
        }
        $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
        $joomla_version_arr = explode(".", JVERSION);
        $priVersion = $joomla_version_arr[0];
        if ($priVersion == 3) {
            $html[] = '<span class="input-append">';
            $html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
            $html[] = '<a class="modal btn hasTooltip" title="' . JHtml::tooltipText('COM_JUDOWNLOAD_CHANGE_TAG') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('COM_JUDOWNLOAD_CHANGE_TAG') . '</a>';
        } else {
            $html[] = '<div class="fltlft">';
            $html[] = '  <input type="text" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
            $html[] = '</div>';
            $html[] = '<div class="button2-left">';
            $html[] = '  <div class="blank">';
            $html[] = '	<a class="modal" title="' . JText::_('COM_JUDOWNLOAD_CHANGE_TAG') . '"  href="' . $link . '"
					rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('COM_JUDOWNLOAD_CHANGE_TAG') . '</a>';
            $html[] = '  </div>';
            $html[] = '</div>';
        }
        if (0 == (int) $this->value) {
            $value = '';
        } else {
            $value = (int) $this->value;
        }
        $class = '';
        if ($this->required) {
            $class = ' class="required modal-value"';
        }
        $html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
        return implode("\n", $html);
    }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:52,代码来源:tag.php

示例9: getversionlist

    function getversionlist()
    {
        // Check for request forgeries
        JRequest::checkToken('request') or jexit('Invalid Token');
        @ob_end_clean();
        $id = JRequest::getInt('id', 0);
        $active = JRequest::getInt('active', 0);
        if (!$id) {
            return;
        }
        $revert = JHTML::image('administrator/components/com_flexicontent/assets/images/arrow_rotate_anticlockwise.png', JText::_('FLEXI_REVERT'));
        $view = JHTML::image('administrator/components/com_flexicontent/assets/images/magnifier.png', JText::_('FLEXI_VIEW'));
        $comment = JHTML::image('administrator/components/com_flexicontent/assets/images/comment.png', JText::_('FLEXI_COMMENT'));
        $model = $this->getModel('item');
        $model->setId($id);
        $item = $model->getItem($id);
        $cparams = JComponentHelper::getParams('com_flexicontent');
        $versionsperpage = $cparams->get('versionsperpage', 10);
        $currentversion = $item->version;
        $page = JRequest::getInt('page', 0);
        $versioncount = $model->getVersionCount();
        $numpage = ceil($versioncount / $versionsperpage);
        if ($page > $numpage) {
            $page = $numpage;
        } elseif ($page < 1) {
            $page = 1;
        }
        $limitstart = ($page - 1) * $versionsperpage;
        $versions = $model->getVersionList();
        $versions = $model->getVersionList($limitstart, $versionsperpage);
        $jt_date_format = FLEXI_J16GE ? 'FLEXI_DATE_FORMAT_FLEXI_VERSIONS_J16GE' : 'FLEXI_DATE_FORMAT_FLEXI_VERSIONS';
        $df_date_format = FLEXI_J16GE ? "d/M H:i" : "%d/%m %H:%M";
        $date_format = JText::_($jt_date_format);
        $date_format = $date_format == $jt_date_format ? $df_date_format : $date_format;
        $ctrl_task = FLEXI_J16GE ? 'task=items.edit' : 'controller=items&task=edit';
        foreach ($versions as $v) {
            $class = $v->nr == $active ? ' id="active-version"' : '';
            echo '
			<tr' . $class . '>
				<td class="versions">#' . $v->nr . '</td>
				<td class="versions">' . JHTML::_('date', $v->nr == 1 ? $item->created : $v->date, $date_format) . '</td>
				<td class="versions">' . ($v->nr == 1 ? $item->creator : $v->modifier) . '</td>
				<td class="versions" align="center">
					<a href="javascript:;" class="hasTooltip" title="' . JHtml::tooltipText(JText::_('FLEXI_COMMENT'), $v->comment ? $v->comment : 'No comment written', 0, 1) . '">' . $comment . '</a>
				' . ((int) $v->nr == (int) $currentversion ? '<a onclick="javascript:return clickRestore(\'index.php?option=com_flexicontent&' . $ctrl_task . '&cid=' . $item->id . '&version=' . $v->nr . '\');" href="javascript:;">' . JText::_('FLEXI_CURRENT') . '</a>' : '<a class="modal-versions" href="index.php?option=com_flexicontent&view=itemcompare&cid[]=' . $item->id . '&version=' . $v->nr . '&tmpl=component" title="' . JText::_('FLEXI_COMPARE_WITH_CURRENT_VERSION') . '" rel="{handler: \'iframe\', size: {x:window.getSize().scrollSize.x-100, y: window.getSize().size.y-100}}">' . $view . '</a>
					<a onclick="javascript:return clickRestore(\'index.php?option=com_flexicontent&' . $ctrl_task . '&cid=' . $item->id . '&version=' . $v->nr . '&' . JSession::getFormToken() . '=1\');" href="javascript:;" title="' . JText::sprintf('FLEXI_REVERT_TO_THIS_VERSION', $v->nr) . '">' . $revert . '</a>
				') . '
				</td>
			</tr>';
        }
        exit;
    }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:52,代码来源:items.raw.php

示例10: featured

 /**
  * Show the featured/not-featured icon.
  *
  * @param   int   $value      The featured value.
  * @param   int   $i          Id of the item.
  * @param   bool  $canChange  Whether the value can be changed or not.
  *
  * @return  string	The anchor tag to toggle featured/unfeatured contacts.
  *
  * @since   1.6
  */
 public static function featured($value = 0, $i, $canChange = true)
 {
     // Array of image, task, title, action
     $states = array(0 => array('unfeatured', 'contacts.featured', 'COM_CONTACT_UNFEATURED', 'JGLOBAL_TOGGLE_FEATURED'), 1 => array('featured', 'contacts.unfeatured', 'JFEATURED', 'JGLOBAL_TOGGLE_FEATURED'));
     $state = JArrayHelper::getValue($states, (int) $value, $states[1]);
     $icon = $state[0];
     if ($canChange) {
         $html = '<a href="#" onclick="return listItemTask(\'cb' . $i . '\',\'' . $state[1] . '\')" class="btn btn-micro hasTooltip' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[3]) . '"><span class="icon-' . $icon . '"></span></a>';
     } else {
         $html = '<a class="btn btn-micro hasTooltip disabled' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[2]) . '"><span class="icon-' . $icon . '"></span></a>';
     }
     return $html;
 }
开发者ID:grlf,项目名称:eyedock,代码行数:24,代码来源:contact.php

示例11: gallery

 public static function gallery($value = 0, $i, $canChange = true)
 {
     JHtml::_('bootstrap.tooltip');
     // Array of image, task, title, action
     $states = array(0 => array('unfeatured', 'galleries.featured', 'COM_BOOKPRO_UNFEATURED', 'COM_BOOKPRO_TOGGLE_TO_FEATURE'), 1 => array('featured', 'galleries.unfeatured', 'COM_BOOKRPO_FEATURED', 'COM_BOOKPRO_TOGGLE_TO_UNFEATURE'));
     $state = JArrayHelper::getValue($states, (int) $value, $states[1]);
     $icon = $state[0];
     if ($canChange) {
         $html = '<a href="#" onclick="return listItemTask(\'cb' . $i . '\',\'' . $state[1] . '\')" class="btn btn-micro hasTooltip' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[3]) . '"><i class="icon-' . $icon . '"></i></a>';
     } else {
         $html = '<a class="btn btn-micro hasTooltip disabled' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[2]) . '"><i class="icon-' . $icon . '"></i></a>';
     }
     return $html;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:14,代码来源:categoriesadministrator.php

示例12: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     // Load the modal behavior script.
     JHtml::_('behavior.modal', 'a.modal');
     // Build the script.
     $script = array();
     $script[] = '	function jSelectVisdata_' . $this->id . '(id, title, object) {';
     $script[] = '		document.getElementById("' . $this->id . '_id").value = id;';
     $script[] = '		document.getElementById("' . $this->id . '_name").value = title;';
     $script[] = '		SqueezeBox.close();';
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Setup variables for display.
     $html = array();
     $link = 'index.php?option=com_visforms&amp;view=visforms&amp;layout=modal_data&amp;tmpl=component&amp;function=jSelectVisdata_' . $this->id;
     $db = JFactory::getDbo();
     $db->setQuery('SELECT title' . ' FROM #__visforms' . ' WHERE id = ' . (int) $this->value);
     try {
         $title = $db->loadResult();
     } catch (RuntimeException $e) {
         JError::raiseWarning(500, $e->getMessage());
     }
     if ($error = $db->getErrorMsg()) {
         JError::raiseWarning(500, $error);
     }
     if (empty($title)) {
         $title = JText::_('COM_VISFORMS_CHOOSE_FORM');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     // The active article id field.
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     // The current article display field.
     $html[] = '<span class="input-append">';
     $html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
     $html[] = '<a class="modal btn hasTooltip" title="' . JHtml::tooltipText('COM_VISFORMS_CHANGE_FORM') . '"  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('COM_VISFORMS_CHANGE_FORM_BUTTON') . '</a>';
     $html[] = '</span>';
     // class='required' for client side validation
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
     return implode("\n", $html);
 }
开发者ID:shamusdougan,项目名称:GDMCWebsite,代码行数:55,代码来源:visdata.php

示例13: create

 /**
  * Method to generate a link to the create item page for the given category
  *
  * @param   object    $category  The category information
  * @param   Registry  $params    The item parameters
  * @param   array     $attribs   Optional attributes for the link
  * @param   boolean   $legacy    True to use legacy images, false to use icomoon based graphic
  *
  * @return  string  The HTML markup for the create item link
  */
 public static function create($category, $params, $attribs = array(), $legacy = false)
 {
     $uri = JUri::getInstance();
     $url = 'index.php?option=com_content&task=article.add&return=' . base64_encode($uri) . '&a_id=0&catid=' . $category->id;
     $text = JLayoutHelper::render('joomla.content.icons.create', array('params' => $params, 'legacy' => $legacy));
     // Add the button classes to the attribs array
     if (isset($attribs['class'])) {
         $attribs['class'] = $attribs['class'] . ' btn btn-primary';
     } else {
         $attribs['class'] = 'btn btn-primary';
     }
     $button = JHtml::_('link', JRoute::_($url), $text, $attribs);
     $output = '<span class="hasTooltip" title="' . JHtml::tooltipText('COM_CONTENT_CREATE_ARTICLE') . '">' . $button . '</span>';
     return $output;
 }
开发者ID:eshiol,项目名称:joomla-cms,代码行数:25,代码来源:icon.php

示例14: published

 /**
  * Display the published or unpublished state of an item.
  *
  * @param   int      $value      The state value.
  * @param   int      $i          The ID of the item.
  * @param   boolean  $canChange  An optional prefix for the task.
  *
  * @return  string
  *
  * @since   1.6
  *
  * @throws  InvalidArgumentException
  */
 public static function published($value = 0, $i = null, $canChange = true)
 {
     // Note: $i is required but has to be an optional argument in the function call due to argument order
     if (null === $i) {
         throw new InvalidArgumentException('$i is a required argument in JHtmlRedirect::published');
     }
     // Array of image, task, title, action
     $states = array(1 => array('publish', 'links.unpublish', 'JENABLED', 'COM_REDIRECT_DISABLE_LINK'), 0 => array('unpublish', 'links.publish', 'JDISABLED', 'COM_REDIRECT_ENABLE_LINK'), 2 => array('archive', 'links.unpublish', 'JARCHIVED', 'JUNARCHIVE'), -2 => array('trash', 'links.publish', 'JTRASHED', 'COM_REDIRECT_ENABLE_LINK'));
     $state = JArrayHelper::getValue($states, (int) $value, $states[0]);
     $icon = $state[0];
     if ($canChange) {
         $html = '<a href="#" onclick="return listItemTask(\'cb' . $i . '\',\'' . $state[1] . '\')" class="btn btn-micro hasTooltip' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[3]) . '"><span class="icon-' . $icon . '"></span></a>';
     }
     return $html;
 }
开发者ID:deenison,项目名称:joomla-cms,代码行数:28,代码来源:redirect.php

示例15: thumb

 /**
  * Display the thumb for the template.
  *
  * @param   string   $template  The name of the template.
  * @param   integer  $clientId  The application client ID the template applies to
  *
  * @return  string  The html string
  *
  * @since   1.6
  */
 public static function thumb($template, $clientId = 0)
 {
     $client = JApplicationHelper::getClientInfo($clientId);
     $basePath = $client->path . '/templates/' . $template;
     $thumb = $basePath . '/template_thumbnail.png';
     $preview = $basePath . '/template_preview.png';
     $html = '';
     if (file_exists($thumb)) {
         JHtml::_('bootstrap.tooltip');
         $clientPath = $clientId == 0 ? '' : 'administrator/';
         $thumb = $clientPath . 'templates/' . $template . '/template_thumbnail.png';
         $html = JHtml::_('image', $thumb, JText::_('COM_TEMPLATES_PREVIEW'));
         if (file_exists($preview)) {
             $html = '<a href="#' . $template . '-Modal" role="button" class="thumbnail pull-left hasTooltip" data-toggle="modal" title="' . JHtml::tooltipText('COM_TEMPLATES_CLICK_TO_ENLARGE') . '">' . $html . '</a>';
         }
     }
     return $html;
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:28,代码来源:templates.php


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