protected function getInput() { $app = JFactory::getApplication(); $product_id = $app->input->get('cid'); $html = ''; $html .= '<table class="adminlist table table-striped table-bordered">'; if (isset($product_id)) { $html .= '<tr><td>'; $html .= '<label class="k2store_product_id">'; $html .= '<strong>' . JText::_('PLG_K2STORE_PRODUCT_ID_LABEL'); $html .= '</strong>: '; $html .= $product_id; $html .= '</label>'; $html .= '</td></tr><tr><td>'; $html .= "<strong>" . JText::_('PLG_K2STORE_PRODUCT_SHORT_TAG') . "</strong>: {k2storecart {$product_id}}"; $html .= ' '; $html .= JHtml::tooltip(JText::_('PLG_K2STORE_PRODUCT_SHORT_TAG_HELP'), JText::_('PLG_K2STORE_PRODUCT_SHORT_TAG'), 'tooltip.png', '', '', false); $html .= '</td></tr>'; } else { $html .= '<div class="alert alert-info">'; $html .= JText::_('PLG_K2STORE_PRODUCT_ID_DESC'); $html .= '</div>'; } $html .= '</table>'; return $html; }
<tr> <td class="key"> <?php echo ADMIN_CFG_FONDY_SECRET_KEY; ?> : </td> <td> <input type="text" name="pm_params[fondy_secret_key]" class="inputbox" value="<?php echo $params['fondy_secret_key']; ?> "> </td> <td> <?php echo JHtml::tooltip(ADMIN_CFG_FONDY_SECRET_KEY_DESCRIPTION); ?> </td> </tr> <tr> <td class="key"> <?php echo _JSHOP_TRANSACTION_END; ?> : </td> <td> <?php print JHTML::_('select.genericlist', $orders->getAllOrderStatus(), 'pm_params[transaction_end_status]', 'class = "inputbox" size = "1"', 'status_id', 'name', $params['transaction_end_status']); ?> </td>
/** * Tests the tooltip method * * @return void * * @since 3.1 */ public function testTooltip() { if (!is_array($_SERVER)) { $_SERVER = array(); } // We save the state of $_SERVER for later and set it to appropriate values $http_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null; $script_name = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : null; $_SERVER['HTTP_HOST'] = 'example.com'; $_SERVER['SCRIPT_NAME'] = '/index.php'; // We generate a random template name so that we don't collide or hit anything $template = 'mytemplate' . rand(1, 10000); // We create a stub (not a mock because we don't enforce whether it is called or not) // to return a value from getTemplate $mock = $this->getMock('myMockObject', array('getTemplate')); $mock->expects($this->any())->method('getTemplate')->will($this->returnValue($template)); JFactory::$application = $mock; // Testing classical cases $this->assertThat(JHtml::tooltip('Content'), $this->equalTo('<span class="hasTooltip" title="Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>'), 'Basic tooltip failed'); $this->assertThat(JHtml::tooltip('Content', 'Title'), $this->equalTo('<span class="hasTooltip" title="' . '<strong>Title</strong><br />Content' . '"><img src="/media/system/images/tooltip.png" alt="Tooltip" /></span>'), 'Tooltip with title and content failed'); $this->assertThat(JHtml::tooltip('Content', 'Title', null, 'Text'), $this->equalTo('<span class="hasTooltip" title="<strong>Title</strong><br />Content">Text</span>'), 'Tooltip with title and content and text failed'); $this->assertThat(JHtml::tooltip('Content', 'Title', null, 'Text', 'http://www.monsite.com'), $this->equalTo('<span class="hasTooltip" title="<strong>Title</strong><br />Content"><a href="http://www.monsite.com">Text</a></span>'), 'Tooltip with title and content and text and href failed'); $this->assertThat(JHtml::tooltip('Content', 'Title', 'tooltip.png', null, null, 'MyAlt'), $this->equalTo('<span class="hasTooltip" title="' . '<strong>Title</strong><br />Content' . '"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="MyAlt" /></span>'), 'Tooltip with title and content and alt failed'); $this->assertThat(JHtml::tooltip('Content', 'Title', 'tooltip.png', null, null, 'MyAlt', 'hasTooltip2'), $this->equalTo('<span class="hasTooltip2" title="' . '<strong>Title</strong><br />Content' . '"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="MyAlt" /></span>'), 'Tooltip with title and content and alt and class failed'); $this->assertThat(JHtml::tooltip('Content', 'Title', null, 'Text', null, null, 'hasTip'), $this->equalTo('<span class="hasTip" title="Title::Content">Text</span>'), 'Tooltip with hasTip class failed'); // Testing where title is an array $this->assertThat(JHtml::tooltip('Content', array('title' => 'Title')), $this->equalTo('<span class="hasTooltip" title="<strong>Title</strong><br />Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>'), 'Tooltip with title and content failed'); $this->assertThat(JHtml::tooltip('Content', array('title' => 'Title', 'text' => 'Text')), $this->equalTo('<span class="hasTooltip" title="<strong>Title</strong><br />Content">Text</span>'), 'Tooltip with title and content and text failed'); $this->assertThat(JHtml::tooltip('Content', array('title' => 'Title', 'text' => 'Text', 'href' => 'http://www.monsite.com')), $this->equalTo('<span class="hasTooltip" title="<strong>Title</strong><br />Content"><a href="http://www.monsite.com">Text</a></span>'), 'Tooltip with title and content and text and href failed'); $this->assertThat(JHtml::tooltip('Content', array('title' => 'Title', 'alt' => 'MyAlt')), $this->equalTo('<span class="hasTooltip" title="<strong>Title</strong><br />Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="MyAlt" /></span>'), 'Tooltip with title and content and alt failed'); $this->assertThat(JHtml::tooltip('Content', array('title' => 'Title', 'class' => 'hasTooltip2')), $this->equalTo('<span class="hasTooltip2" title="<strong>Title</strong><br />Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>'), 'Tooltip with title and content and class failed'); $this->assertThat(JHtml::tooltip('Content', array()), $this->equalTo('<span class="hasTooltip" title="Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>'), 'Basic tooltip (array version) failed'); }
} // add mime file pic $size = 0; $files_pic = ''; $number = ''; if ($view_pics) { $size = (int) $view_pics_size; $files_pic = '<img src="' . JURI::base() . 'images/jdownloads/fileimages/' . $files[$i]->file_pic . '" style="text-align:top;border:0px;" width="' . $size . '" height="' . $size . '" alt="" /> '; } if ($view_numerical_list) { $num = $i + 1; $number = "{$num}. "; } // add description in tooltip if ($view_tooltip && $files[$i]->description != '') { $link_text = '<a href="' . $link . '">' . JHtml::tooltip(strip_tags(substr($files[$i]->description, 0, $view_tooltip_length)) . $short_char, JText::_('MOD_JDOWNLOADS_RELATED_DESCRIPTION_TITLE'), $files[$i]->file_title . ' ' . $version . $files[$i]->release, $files[$i]->file_title . ' ' . $version . $files[$i]->release) . '</a>'; } else { $link_text = '<a href="' . $link . '">' . $files[$i]->file_title . ' ' . $version . $files[$i]->release . '</a>'; } $html .= '<tr style="vertical-align:top;"><td style="text-align:' . $alignment . '">' . $number . $files_pic . $link_text . '</td>'; // add the hits if ($view_hits) { if ($files[$i]->downloads) { if ($view_hits_same_line) { $html .= '<td style="text-align:' . $hits_alignment . ';">' . $hits_label . ' ' . modJdownloadsRelatedHelper::strToNumber($files[$i]->downloads) . '</td>'; } else { $html .= '<tr style="vertical-align:top;"><td style="text-align:' . $hits_alignment . ';">' . $hits_label . ' ' . modJdownloadsRelatedHelper::strToNumber($files[$i]->downloads) . '</td>'; } } } // add the hits
if ($socialads_config['select_campaign'] == 0) { ?> <th align="center"><?php echo JHtml::tooltip(JText::_('DESC_PAYMENT_STATUS'), JText::_('PAYMENT_STATUS'), '', JText::_('PAYMENT_STATUS')); ?> </th> <?php } ?> <th class="hidden-tablet hidden-phone"><?php echo JHtml::tooltip(JText::_('DESC_IGNORENO'), JText::_('IGNORENO'), '', JText::_('IGNORENO')); ?> </th> <th><?php echo JHtml::tooltip(JText::_('DESC_ACTIONS'), JText::_('ACTIONS'), '', JText::_('ACTIONS')); ?> </th> </tr> </thead> <?php $k = $j = 0; if (count($this->myads)) { foreach ($this->myads as $ads) { if ($ads->ad_approved == '1') { $tr_class = "class=''"; } else { if ($ads->ad_approved == '0') { $tr_class = "class='warning'"; } else { if ($ads->ad_approved == '2') {
/** * Method to get the field input markup for a media selector. * Use attributes to identify specific created_by and asset_id fields * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { $assetField = $this->element['asset_field'] ? (string) $this->element['asset_field'] : 'asset_id'; $authorField = $this->element['created_by_field'] ? (string) $this->element['created_by_field'] : 'created_by'; $asset = $this->form->getValue($assetField) ? $this->form->getValue($assetField) : (string) $this->element['asset_id']; if ($asset == '') { $asset = JFactory::getApplication()->input->get('option'); } $link = (string) $this->element['link']; if (!self::$initialised) { // Load the modal behavior script. JHtml::_('behavior.modal'); // Build the script. $script = array(); $script[] = ' function jInsertFieldValue(value, id) {'; $script[] = ' var old_value = document.id(id).value;'; $script[] = ' if (old_value != value) {'; $script[] = ' var elem = document.id(id);'; $script[] = ' elem.value = value;'; $script[] = ' elem.fireEvent("change");'; $script[] = ' if (typeof(elem.onchange) === "function") {'; $script[] = ' elem.onchange();'; $script[] = ' }'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' }'; $script[] = ' }'; $script[] = ' function jMediaRefreshPreview(id) {'; $script[] = ' var value = document.id(id).value;'; $script[] = ' var img = document.id(id + "_preview");'; $script[] = ' if (img) {'; $script[] = ' if (value) {'; $script[] = ' img.src = "' . JURI::root() . '" + value;'; $script[] = ' document.id(id + "_preview_empty").setStyle("display", "none");'; $script[] = ' document.id(id + "_preview_img").setStyle("display", "");'; $script[] = ' } else { '; $script[] = ' img.src = ""'; $script[] = ' document.id(id + "_preview_empty").setStyle("display", "");'; $script[] = ' document.id(id + "_preview_img").setStyle("display", "none");'; $script[] = ' } '; $script[] = ' } '; $script[] = ' }'; $script[] = ' function jMediaRefreshPreviewTip(tip)'; $script[] = ' {'; $script[] = ' var img = tip.getElement("img.media-preview");'; $script[] = ' tip.getElement("div.tip").setStyle("max-width", "none");'; $script[] = ' var id = img.getProperty("id");'; $script[] = ' id = id.substring(0, id.length - "_preview".length);'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' tip.setStyle("display", "block");'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); self::$initialised = true; } $html = array(); $attr = ''; // Initialize some field attributes. $attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; // The text field. $html[] = '<div class="input-prepend input-append">'; // The Preview. $preview = (string) $this->element['preview']; $showPreview = true; $showAsTooltip = false; switch ($preview) { case 'no': // Deprecated parameter value // Deprecated parameter value case 'false': case 'none': $showPreview = false; break; case 'yes': // Deprecated parameter value // Deprecated parameter value case 'true': case 'show': break; case 'tooltip': default: $showAsTooltip = true; $options = array('onShow' => 'jMediaRefreshPreviewTip'); JHtml::_('behavior.tooltip', '.hasTipPreview', $options); break; } if ($showPreview) { if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $src = JURI::root() . $this->value; } else { $src = ''; } $width = isset($this->element['preview_width']) ? (int) $this->element['preview_width'] : 300; $height = isset($this->element['preview_height']) ? (int) $this->element['preview_height'] : 200; $style = ''; $style .= $width > 0 ? 'max-width:' . $width . 'px;' : ''; $style .= $height > 0 ? 'max-height:' . $height . 'px;' : ''; $imgattr = array('id' => $this->id . '_preview', 'class' => 'media-preview', 'style' => $style); $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr); $previewImg = '<div id="' . $this->id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>'; $previewImgEmpty = '<div id="' . $this->id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>'; $html[] = '<div class="media-preview add-on">'; if ($showAsTooltip) { $tooltip = $previewImgEmpty . $previewImg; $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => '<i class="icon-eye"></i>', 'class' => 'hasTipPreview'); $html[] = JHtml::tooltip($tooltip, $options); } else { $html[] = ' ' . $previewImgEmpty; $html[] = ' ' . $previewImg; } $html[] = '</div>'; } $html[] = ' <input type="text" class="input-small" name="' . $this->name . '" id="' . $this->id . '"' . ' value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . ' readonly="readonly"' . $attr . ' />'; $directory = (string) $this->element['directory']; if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $folder = explode('/', $this->value); array_diff_assoc($folder, explode('/', JComponentHelper::getParams('com_media')->get('image_path', 'images'))); array_pop($folder); $folder = implode('/', $folder); } elseif (file_exists(JPATH_ROOT . '/' . JComponentHelper::getParams('com_media')->get('image_path', 'images') . '/' . $directory)) { $folder = $directory; } else { $folder = ''; } // The button. if ($this->element['disabled'] != true) { JHtml::_('bootstrap.tooltip'); $html[] = '<a class="modal btn" title="' . JText::_('JLIB_FORM_BUTTON_SELECT') . '"' . ' href="' . ($this->element['readonly'] ? '' : ($link ? $link : 'index.php?option=com_media&view=images&tmpl=component&asset=' . $asset . '&author=' . $this->form->getValue($authorField)) . '&fieldid=' . $this->id . '&folder=' . $folder) . '"' . ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">'; $html[] = JText::_('JLIB_FORM_BUTTON_SELECT') . '</a><a class="btn hasTooltip" title="' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '"' . ' href="#" onclick="'; $html[] = 'jInsertFieldValue(\'\', \'' . $this->id . '\');'; $html[] = 'return false;'; $html[] = '">'; $html[] = '<i class="icon-remove"></i></a>'; } $html[] = '</div>'; return implode("\n", $html); }
//OSP http://forum.virtuemart.net/index.php?topic=99320.0 ?> <div class="product-field product-field-type-<?php echo $field->field_type; ?> "> <?php if (!$customTitle and $field->custom_title != $custom_title and $field->show_title) { ?> <span class="product-fields-title-wrapper"><span class="product-fields-title"><strong><?php echo vmText::_($field->custom_title); ?> </strong></span> <?php if ($field->custom_tip) { echo JHtml::tooltip(vmText::_($field->custom_tip), vmText::_($field->custom_title), 'tooltip.png'); } ?> </span> <?php } if (!empty($field->display)) { ?> <div class="product-field-display"><?php echo $field->display; ?> </div><?php } if (!empty($field->custom_desc)) { ?> <div class="product-field-desc"><?php
echo JHtml::tooltip(JText::_('COM_QUICK2CART_COUPON_DESCRIPTION_TOOLTIP'), JText::_('COM_QUICK2CART_COUPON_DESCRIPTION'), '', JText::_('COM_QUICK2CART_COUPON_DESCRIPTION')); ?> </label> <div class="controls"> <textarea size="28" rows="3" name="description" id="description" class="inputbox" ><?php if ($this->item) { echo trim($this->item->description); } ?> </textarea> </div> </div> <div class="control-group"> <label for="params" class="control-label"><?php echo JHtml::tooltip(JText::_('COM_QUICK2CART_COUPON_PARAMETERS_TOOLTIP'), JText::_('COM_QUICK2CART_COUPON_PARAMETERS'), '', JText::_('COM_QUICK2CART_COUPON_PARAMETERS')); ?> </label> <div class="controls"> <textarea size="28" rows="3" name="params" id="params" class="inputbox" ><?php if ($this->item) { echo trim($this->item->extra_params); } ?> </textarea> </div> </div> </div> <!--sj change -->
<!-- download count--> <?php if ($eProdUExpiryMode == 'epMaxDownload' || $eProdUExpiryMode == 'epboth') { $downcount = -1; if (!empty($mediaDetail[$m]['download_limit'])) { $downcount = $mediaDetail[$m]['download_limit']; } ?> <div class="control-group" style="<?php echo $hideExpirationFields; ?> "> <label class="control-label" for="qtcDownCount"> <?php echo JHtml::tooltip(JText::_('COM_QUICK2CART_PROD_DOWN_COUNT_DES'), JText::_('COM_QUICK2CART_PROD_DOWN_COUNT'), '', JText::_('COM_QUICK2CART_PROD_DOWN_COUNT')); ?> </label> <div class="controls"> <input type="text" name="prodMedia[<?php echo $m; ?> ][downCount]" value="<?php echo $downcount; ?> " class='input-mini qtcMediaDownCount' id="" placeholder=""> </div> </div> <?php } ?>
$sep = ','; $exploded = explode(',', $alerta); $i = 0; foreach ($alerts as $a) { if ($style == ' sa-row1 ') { $style = ' sa-row0 '; } else { $style = ' sa-row1 '; } $expl = explode('_', $exploded[$i]); //print_r($expl); //echo '<br />'; echo '<tr class="sa_table_row ' . $style . '">'; echo '<td class="sa_table_cell">'; //start creare tabel echo JHtml::tooltip($a->descriere, $a->nume_alerta, '', $a->nume_alerta); echo '</td>'; echo '<td class="sa_table_cell" align="right" width="100">'; echo '<form action="' . $link_form . '" method="post" name="set_alert_' . $a->id . '" id="set_alert_' . $a->id . '">'; // echo '<input type="hidden" name="old_value" value="s-' . $a->id . '_' . $expl[1] . '" />'; if ($expl[1] == 0) { $new_v = 1; } else { $new_v = 0; } echo '<input type="hidden" name="new_value" value="s-' . $a->id . '_' . $new_v . '" />'; echo '</form>'; echo '<div style="display:inline;">'; echo '<div style="float:left;" class="sa_alert_box sa_hover '; // sa_alert_selected
?> </th> <th><?php echo JHtml::tooltip(JText::_('NO_IMPRESSIONS'), '', '', JText::_('IMPRESSIONS')); ?> </th> <th class="hidden-tablet hidden-phone"><?php echo JHtml::tooltip(JText::_('DESC_CLICK_THROUGH_RATIO'), JText::_('CLICK_THROUGH_RATIO'), '', JText::_('CLICK_THROUGH_RATIO')); ?> </th> <th><?php echo JHtml::_('grid.sort', JText::_('DAILY_BUDGET'), 'c.daily_budget', $this->lists['order_Dir'], $this->lists['order']); ?> </th> <th><?php echo JHtml::tooltip(JText::_('ACTION'), '', '', JText::_('ACTION')); ?> </th> </tr> </thead> <?php $i = 0; //print_r($this->list); die('adasd'); foreach ($this->list as $key) { $i++; //$v=JText::_('START'); ?>
$trans = JText::_('SAUTO_TRANSMISIE_MANUALA'); } elseif ($l->transmisie == 2) { $trans = JText::_('SAUTO_TRANSMISIE_AUTOMATA'); } else { $trans = JText::_('SAUTO_TRANSMISIE_NECOMPLECTATA'); } echo '<tr class="sa_table_row ' . $style . '">'; echo '<td valign="top" class="sa_table_cell">'; echo '<img src="' . $img_path . 'blue-car.png" />'; echo '</td>'; echo '<td align="center" class="sa_table_cell">'; $info_auto = JText::_('SAUTO_INFO_AUTO'); $detail_auto = JText::_('SAUTO_ANUL_FABR') . ' ' . $l->an_fabricatie . '<br /> ' . JText::_('SAUTO_TIP_TRANSMISIE') . ' ' . $trans . '<br />' . $l->cilindree . ' cm<sup>3</sup> :: ' . $l->carburant . '<br /> ' . $l->caroserie; echo JHtml::tooltip($detail_auto, $info_auto, '', $l->marca_auto . ' ' . $l->model_auto); echo '<br />' . $l->serie_caroserie; echo '</td>'; echo '<td align="center" class="sa_table_cell" width="100">'; $link_edit = JRoute::_('index.php?option=com_sauto&view=garaj&task=edit&id=' . $l->id); $link_delete = JRoute::_('index.php?option=com_sauto&view=garaj&task=delete&id=' . $l->id); echo '<a href="' . $link_edit . '"><img src="' . $img_path . 'edit_garaj.png" /></a>'; echo ' '; echo '<a href="' . $link_delete . '"><img src="' . $img_path . 'delete_garaj.png" /></a>'; echo '</td>'; echo '</tr>'; echo '<tr class="sa_table_row ' . $style . '">'; echo '<td valign="top" class="sa_table_cell" colspan="3">'; if ($l->exp_itp == '0000-00-00') { $exp_itp = JText::_('SA_NECOMPLETAT'); } else {
$src = ''; } $width = $previewWidth; $height = $previewHeight; $style = ''; $style .= $width > 0 ? 'max-width:' . $width . 'px;' : ''; $style .= $height > 0 ? 'max-height:' . $height . 'px;' : ''; $imgattr = array('id' => $id . '_preview', 'class' => 'media-preview', 'style' => $style); $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr); $previewImg = '<div id="' . $id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>'; $previewImgEmpty = '<div id="' . $id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>'; if ($showAsTooltip) { echo '<div class="media-preview add-on">'; $tooltip = $previewImgEmpty . $previewImg; $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => '<i class="icon-eye"></i>', 'class' => 'hasTipPreview'); echo JHtml::tooltip($tooltip, $options); echo '</div>'; } else { echo '<div class="media-preview add-on" style="height:auto">'; echo ' ' . $previewImgEmpty; echo ' ' . $previewImg; echo '</div>'; } } echo ' <input type="text" name="' . $name . '" id="' . $id . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '" readonly="readonly"' . $attr . ' data-basepath="' . JUri::root() . '"/>'; ?> <a class="modal btn" title="<?php echo JText::_('JLIB_FORM_BUTTON_SELECT'); ?> " href=" <?php
</label> </td> <td> <input type="file" name="property_sub_img[]" id="property_sub_img" value="" size="75"/> <input type="button" name="addvalue" id="addvalue" class="button" value="<?php echo JText::_('COM_REDSHOP_ADD'); ?> " onclick="addNewRowOfProp('admintable');" /> <?php echo JHtml::tooltip(JText::_('COM_REDSHOP_TOOLTIP_PROPERTY_SUB_IMAGE'), JText::_('COM_REDSHOP_PROPERTY_SUB_IMAGE'), 'tooltip.png', '', '', false); ?> </td> </tr> </table> </fieldset> <div class="clr"></div> <input type="hidden" name="cid" value="<?php echo $product_id; ?> "/> <input type="hidden" name="option" value="com_redshop"/> <input type="hidden" name="fsec" value="<?php
--> <th width="5%" valign="top"> <?php echo JHtml::tooltip(JText::_('COM_JDOWNLOADS_USERGROUPS_VIEW_REPORT_FORM_DESC'), JText::_('COM_JDOWNLOADS_USERGROUPS_VIEW_REPORT_FORM'), '', JText::_('COM_JDOWNLOADS_USERGROUPS_VIEW_REPORT_FORM')); ?> </th> <th width="5%" valign="top"> <?php echo JHtml::tooltip(JText::_('COM_JDOWNLOADS_USERGROUPS_VIEW_COUNTDOWN_DESC'), JText::_('COM_JDOWNLOADS_USERGROUPS_VIEW_COUNTDOWN'), '', JText::_('COM_JDOWNLOADS_USERGROUPS_VIEW_COUNTDOWN')); ?> </th> <th width="2%" valign="top"> <?php echo JHtml::tooltip(JText::_('COM_JDOWNLOADS_USERGROUP_LIST_COL_ID_DESC'), JText::_('JGRID_HEADING_ID'), '', JText::_('JGRID_HEADING_ID')); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="21"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php
echo $weightUniteDetail['title']; ?> <input type='hidden' name="weigth_class_id" value="<?php echo $weightUniteDetail['id']; ?> "/> </span> </div> </div> </div> <!-- END for Legth & weigth class option --> <!-- Shipping Profile--> <div class="control-group"> <label class="control-label" for="qtc_shipProfileSelList"> <?php echo JHtml::tooltip(JText::_('COM_QUICK2CART_S_SEL_SHIPPROFILE_TOOLTIP'), JText::_('COM_QUICK2CART_S_SEL_SHIPPROFILE'), '', JText::_('COM_QUICK2CART_S_SEL_SHIPPROFILE')); ?> </label> <div class="controls qtc_shipProfileList"> <span id="qtc_shipProfileSelListWrapper"> <?php // Here default_store_id - before saving the item, value =first store id // While edit default_store_id- item's store id $defaultProfile = !empty($this->itemDetail['shipProfileId']) ? $this->itemDetail['shipProfileId'] : ''; $shipDefaultStore = !empty($this->itemDetail['store_id']) ? $this->itemDetail['store_id'] : $this->store_id; // Get qtc_shipProfileSelList echo $shipProfileSelectList = $qtcshiphelper->qtcLoadShipProfileSelectList($shipDefaultStore, $defaultProfile); ?> </span> </div>
function drawTree($home_link, $moduleclass_sfx, $params) { $catid = intval(JArrayHelper::getValue($_REQUEST, 'catid', 0)); echo '<div id="jdtree" class="moduletable' . $moduleclass_sfx . '">'; echo "<ul id=\"jdtreetopNodes\" class=\"j7dctree\">"; echo '<img height="18" width="18" src="modules/mod_jdownloads_tree/jdtree/images/base.gif" /> ' . $home_link; for ($no = 0; $no < count($this->elementArray[0]); $no++) { $urlAdd = ""; $amount_items = ''; $amount_sub_cats = ''; $downloads = $this->elementArray[0][$no][5]; $subcats = $this->elementArray[0][$no][6]; // If the number of files to be displayed? if ($params->get('view_amount_items')) { if ($downloads || $params->get('view_zero_values')) { if ($params->get('view_tooltip')) { if ($downloads) { $amount_items = '<span class="jdmnumber">[' . JHtml::tooltip(JText::sprintf(JText::_("MOD_JDOWNLOADS_TREE_AMOUNT_OF_DOWNLOADS_TOOLTIP"), $downloads), '', '', $downloads, '', '') . ']</span>'; } else { $amount_items = '<span class="jdmnumber">[' . JHtml::tooltip(JText::sprintf(JText::_("MOD_JDOWNLOADS_TREE_AMOUNT_OF_DOWNLOADS_TOOLTIP"), $downloads), '', '', $downloads, '', '0') . ']</span>'; } } else { $amount_items = '<span class="jdmnumber">[' . $downloads . ']</span>'; } } } // If the number of subcategories to be displayed? if ($params->get('view_amount_cat_items')) { if ($subcats || $params->get('view_zero_values')) { if ($params->get('view_tooltip')) { if ($subcats) { $amount_sub_cats = '<span class="jdmnumber">(' . JHtml::tooltip(JText::sprintf(JText::_("MOD_JDOWNLOADS_TREE_AMOUNT_OF_CATEGORIES_TOOLTIP"), $subcats), '', '', $subcats, '', '') . ')</span>'; } else { $amount_sub_cats = '<span class="jdmnumber">(' . JHtml::tooltip(JText::sprintf(JText::_("MOD_JDOWNLOADS_TREE_AMOUNT_OF_CATEGORIES_TOOLTIP"), $subcats), '', '', $subcats, '', '0') . ')</span>'; } } else { $amount_sub_cats = '<span class="jdmnumber">(' . $subcats . ')</span>'; } } } if ($this->elementArray[0][$no][0] != $catid) { if ($this->elementArray[0][$no][2]) { $urlAdd = " href=\"" . $this->elementArray[0][$no][2] . "\""; if ($this->elementArray[0][$no][3]) { $urlAdd .= " target=\"" . $this->elementArray[0][$no][3] . "\""; } } echo "<li onmouseover=\"this.className='jdmroothov'\" onmouseout=\"this.className='j7dctree_node'\" class=\"j7dctree_node\" id=\"node_" . $this->elementArray[0][$no][0] . "\"><img height=\"18\" width= \"18\" id=\"plusMinus" . $this->elementArray[0][$no][0] . "\" class=\"tree_plusminus\" src=\"modules/mod_jdownloads_tree/jdtree/images/plus.gif\"><img height=\"16\" width= \"16\" src=\"" . $this->elementArray[0][$no][4] . "\"><a class=\"j7dctree_link\"{$urlAdd}>" . $this->elementArray[0][$no][1] . $amount_sub_cats . $amount_items . "</a>"; } else { echo "<li onmouseover=\"this.className='jdmroothov'\" onmouseout=\"this.className='j7dctree_node'\" class=\"j7dctree_node\" id=\"node_" . $this->elementArray[0][$no][0] . "\"><img height=\"18\" width= \"18\" id=\"plusMinus" . $this->elementArray[0][$no][0] . "\" class=\"tree_plusminus\" src=\"modules/mod_jdownloads_tree/jdtree/images/plus.gif\"><img height=\"16\" width= \"16\" src=\"" . $this->elementArray[0][$no][4] . "\">" . $this->elementArray[0][$no][1] . $amount_sub_cats . $amount_items; } //numlinks to be appended above, if required in future $this->drawSubNode($this->elementArray[0][$no][0], $params); echo "</li>"; } echo "</ul></div>"; }
} } else { echo JText::_('COM_QUICK2CART_VEN_U_NEED_TO_SETUP_TAXPROFILE_FIRST'); } ?> </span> </div> </div> <?php if ($isShippingEnabled) { ?> <!-- Default tax and shipping profile --> <div class="control-group"> <label class="control-label" for="qtc_shipProfileSelList"> <?php echo JHtml::tooltip(JText::_('COM_QUICK2CART_VEN_SHIPPROFILE_DESC'), JText::_('COM_QUICK2CART_VEN_SHIPPROFILE'), '', JText::_('COM_QUICK2CART_VEN_SHIPPROFILE')); ?> </label> <div class="controls qtc_shipProfileList"> <span id="qtc_shipProfileSelListWrapper"> <?php if (!empty($this->storeinfo[0]->id)) { // Here default_store_id - before saving the item, value =first store id // While edit default_store_id- item's store id $defaultProfile = !empty($this->storeinfo[0]->shipprofile_id) ? $this->storeinfo[0]->shipprofile_id : ''; // Get qtc_shipProfileSelList echo $shipProfileSelectList = $qtcshiphelper->qtcLoadShipProfileSelectList($this->storeinfo[0]->id, $defaultProfile); } else { echo JText::_('COM_QUICK2CART_VEN_U_NEED_TO_SETUP_SHIPPROFILE_FIRST'); }
// if user hadn't explicitely typed in a 0 list limited number or all events if ($tooltips_max_events !== '0') { $count = 0; foreach ($title as $t) { if (($tooltips_max_events > 0) && (++$count > $tooltips_max_events)) { $tip .= '...'; break; // foreach } $tip .= trim($t) . '<br />'; } } // J! version < 3.3: title already within $tip to ensure always '::' is pesent // But with J! 3.3+ is a bug in script so we need to use the bad 'hasTooltip' // which is default of class parameter. $calendar .= JHtml::tooltip($tip, $tipTitle, 'tooltip.png', $space.$day, $link); } $calendar .= '</td>'; } else { $calendar .= '<td class="'.$tdbaseclass.'link">'.($link ? '<a href="'.$link.'">'.$space.$day.'</a>' : $space.$day).'</td>'; // Remove htmlspecialchars from link otherwise it changes &'s to & in the URL } } else { $calendar .= '<td class="'.$tdbaseclass.'"><span class="nolink">'.$space.$day.'</span></td>'; } } for ($counti = $weekday; $counti < 7; $counti++) { $calendar .= '<td class="mod_jemcalq"> </td>'; #remaining 'empty' days }
/** * Method to get the field input markup for a media selector. * Use attributes to identify specific created_by and asset_id fields * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $assetField = $this->element['asset_field'] ? (string) $this->element['asset_field'] : 'asset_id'; $authorField = $this->element['created_by_field'] ? (string) $this->element['created_by_field'] : 'created_by'; $asset = $this->form->getValue($assetField) ? $this->form->getValue($assetField) : (string) $this->element['asset_id']; if ($asset == '') { $asset = JRequest::getCmd('option'); } $link = (string) $this->element['link']; if (!self::$initialised) { // Load the modal behavior script. JHtml::_('behavior.modal'); // Build the script. $script = array(); $script[] = ' function jInsertFieldValue(value, id) {'; $script[] = ' var old_value = $("#" + id).val();'; $script[] = ' if (old_value != value) {'; $script[] = ' var elem = $("#" + id);'; $script[] = ' elem.val(value);'; $script[] = ' elem.trigger("change");'; $script[] = ' if (typeof(elem.onchange) === "function") {'; $script[] = ' elem.onchange();'; $script[] = ' }'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' }'; $script[] = ' }'; $script[] = ' function jMediaRefreshPreview(id) {'; $script[] = ' id = "#" + id;'; $script[] = ' var value = $(id).val();'; $script[] = ' var img = $(id + "_preview");'; $script[] = ' if (img) {'; $script[] = ' if (value) {'; $script[] = ' img.src = "' . JURI::root() . '" + value;'; $script[] = ' $(id + "_preview_empty").css("display", "none");'; $script[] = ' $(id + "_preview_img").css("display", "");'; $script[] = ' } else { '; $script[] = ' img.src = ""'; $script[] = ' $(id + "_preview_empty").css("display", "");'; $script[] = ' $(id + "_preview_img").css("display", "none");'; $script[] = ' } '; $script[] = ' } '; $script[] = ' }'; $script[] = ' function jMediaRefreshPreviewTip(tip)'; $script[] = ' {'; $script[] = ' $(tip).css("display", "block");'; $script[] = ' var img = tip.find("img.media-preview");'; $script[] = ' var id = $(img).attr("id");'; $script[] = ' id = id.substring(0, id.length - "_preview".length);'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); self::$initialised = true; } // Initialize variables. $html = array(); $attr = ''; // Initialize some field attributes. $attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; // The text field. $html[] = '<div class="input-modal">'; $html[] = ' <span class="input-cell">'; $html[] = ' <input type="text" name="' . $this->name . '" id="' . $this->id . '"' . ' value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . ' readonly="readonly"' . $attr . ' />'; $html[] = ' </span>'; $directory = (string) $this->element['directory']; if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $folder = explode('/', $this->value); array_shift($folder); array_pop($folder); $folder = implode('/', $folder); } elseif (file_exists(JPATH_ROOT . '/' . JComponentHelper::getParams('com_media')->get('image_path', 'images') . '/' . $directory)) { $folder = $directory; } else { $folder = ''; } // The button. $html[] = ' <span class="input-cell">'; $html[] = ' <a class="button modal" title="' . JText::_('JLIB_FORM_BUTTON_SELECT') . '"' . ' href="' . ($this->element['readonly'] ? '' : ($link ? $link : 'index.php?option=com_media&view=images&tmpl=component&asset=' . $asset . '&author=' . $this->form->getValue($authorField)) . '&fieldid=' . $this->id . '&folder=' . $folder) . '"' . ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">'; $html[] = JText::_('JLIB_FORM_BUTTON_SELECT') . '</a>'; $html[] = ' </span>'; $html[] = ' <span class="input-cell">'; $html[] = ' <a class="button" title="' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '"' . ' href="#" onclick="'; $html[] = 'jInsertFieldValue(\'\', \'' . $this->id . '\');'; $html[] = 'return false;'; $html[] = '">'; $html[] = JText::_('JLIB_FORM_BUTTON_CLEAR') . '</a>'; $html[] = ' </span>'; $html[] = '</div>'; // The Preview. $preview = (string) $this->element['preview']; $showPreview = true; $showAsTooltip = false; switch ($preview) { case 'false': case 'none': $showPreview = false; break; case 'true': case 'show': break; case 'tooltip': default: $showAsTooltip = true; $options = array('onShow' => 'jMediaRefreshPreviewTip'); JHtml::_('behavior.tooltip', '.hasTipPreview', $options); break; } if ($showPreview) { if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $src = JURI::root() . $this->value; } else { $src = ''; } $attr = array('id' => $this->id . '_preview', 'class' => 'media-preview', 'style' => 'max-width:160px; max-height:100px;'); $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $attr); $previewImg = '<div id="' . $this->id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>'; $previewImgEmpty = '<div id="' . $this->id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>'; //$html[] = '<div class="media-preview fltlft">'; if ($showAsTooltip) { $tooltip = $previewImgEmpty . $previewImg; $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => JText::_('JLIB_FORM_MEDIA_PREVIEW_TIP_TITLE'), 'class' => 'hasTipPreview'); $html[] = JHtml::tooltip($tooltip, $options); } else { $html[] = ' ' . $previewImgEmpty; $html[] = ' ' . $previewImg; } //$html[] = '</div>'; } return implode("\n", $html); }
/** * Method to get the field input markup for a media selector. * Use attributes to identify specific created_by and asset_id fields * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { $asset = $this->asset; if ($asset == '') { $asset = JFactory::getApplication()->input->get('option'); } if (!self::$initialised) { // Load the modal behavior script. JHtml::_('behavior.modal'); // Include jQuery JHtml::_('jquery.framework'); // Build the script. $script = array(); $script[] = ' function jInsertFieldValue(value, id) {'; $script[] = ' var $ = jQuery.noConflict();'; $script[] = ' var old_value = $("#" + id).val();'; $script[] = ' if (old_value != value) {'; $script[] = ' var $elem = $("#" + id);'; $script[] = ' $elem.val(value);'; $script[] = ' $elem.trigger("change");'; $script[] = ' if (typeof($elem.get(0).onchange) === "function") {'; $script[] = ' $elem.get(0).onchange();'; $script[] = ' }'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' }'; $script[] = ' }'; $script[] = ' function jMediaRefreshPreview(id) {'; $script[] = ' var $ = jQuery.noConflict();'; $script[] = ' var value = $("#" + id).val();'; $script[] = ' var $img = $("#" + id + "_preview");'; $script[] = ' if ($img.length) {'; $script[] = ' if (value) {'; $script[] = ' $img.attr("src", "' . JUri::root() . '" + value);'; $script[] = ' $("#" + id + "_preview_empty").hide();'; $script[] = ' $("#" + id + "_preview_img").show()'; $script[] = ' } else { '; $script[] = ' $img.attr("src", "");'; $script[] = ' $("#" + id + "_preview_empty").show();'; $script[] = ' $("#" + id + "_preview_img").hide();'; $script[] = ' } '; $script[] = ' } '; $script[] = ' }'; $script[] = ' function jMediaRefreshPreviewTip(tip)'; $script[] = ' {'; $script[] = ' var $ = jQuery.noConflict();'; $script[] = ' var $tip = $(tip);'; $script[] = ' var $img = $tip.find("img.media-preview");'; $script[] = ' $tip.find("div.tip").css("max-width", "none");'; $script[] = ' var id = $img.attr("id");'; $script[] = ' id = id.substring(0, id.length - "_preview".length);'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' $tip.show();'; $script[] = ' }'; // JQuery for tooltip for INPUT showing whole image path $script[] = ' function jMediaRefreshImgpathTip(tip)'; $script[] = ' {'; $script[] = ' var $ = jQuery.noConflict();'; $script[] = ' var $tip = $(tip);'; $script[] = ' $tip.css("max-width", "none");'; $script[] = ' var $imgpath = $("#" + "' . $this->id . '").val();'; $script[] = ' $("#TipImgpath").html($imgpath);'; $script[] = ' if ($imgpath.length) {'; $script[] = ' $tip.show();'; $script[] = ' } else {'; $script[] = ' $tip.hide();'; $script[] = ' }'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); self::$initialised = true; } $html = array(); $attr = ''; // Tooltip for INPUT showing whole image path $options = array('onShow' => 'jMediaRefreshImgpathTip'); JHtml::_('behavior.tooltip', '.hasTipImgpath', $options); if (!empty($this->class)) { $this->class .= ' hasTipImgpath'; } else { $this->class = 'hasTipImgpath'; } $attr .= ' title="' . htmlspecialchars('<span id="TipImgpath"></span>', ENT_COMPAT, 'UTF-8') . '"'; // Initialize some field attributes. $attr .= !empty($this->class) ? ' class="input-small ' . $this->class . '"' : ' class="input-small"'; $attr .= !empty($this->size) ? ' size="' . $this->size . '"' : ''; // Initialize JavaScript field attributes. $attr .= !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : ''; // The text field. $html[] = '<div class="input-prepend input-append">'; // The Preview. $showPreview = true; $showAsTooltip = false; switch ($this->preview) { case 'no': // Deprecated parameter value // Deprecated parameter value case 'false': case 'none': $showPreview = false; break; case 'yes': // Deprecated parameter value // Deprecated parameter value case 'true': case 'show': break; case 'tooltip': default: $showAsTooltip = true; $options = array('onShow' => 'jMediaRefreshPreviewTip'); JHtml::_('behavior.tooltip', '.hasTipPreview', $options); break; } if ($showPreview) { if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $src = JUri::root() . $this->value; } else { $src = ''; } $width = $this->previewWidth; $height = $this->previewHeight; $style = ''; $style .= $width > 0 ? 'max-width:' . $width . 'px;' : ''; $style .= $height > 0 ? 'max-height:' . $height . 'px;' : ''; $imgattr = array('id' => $this->id . '_preview', 'class' => 'media-preview', 'style' => $style); $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr); $previewImg = '<div id="' . $this->id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>'; $previewImgEmpty = '<div id="' . $this->id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>'; if ($showAsTooltip) { $html[] = '<div class="media-preview add-on">'; $tooltip = $previewImgEmpty . $previewImg; $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => '<span class="icon-eye"></span>', 'class' => 'hasTipPreview'); $html[] = JHtml::tooltip($tooltip, $options); $html[] = '</div>'; } else { $html[] = '<div class="media-preview add-on" style="height:auto">'; $html[] = ' ' . $previewImgEmpty; $html[] = ' ' . $previewImg; $html[] = '</div>'; } } $html[] = ' <input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '" readonly="readonly"' . $attr . ' />'; if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $folder = explode('/', $this->value); $folder = array_diff_assoc($folder, explode('/', JComponentHelper::getParams('com_media')->get('image_path', 'images'))); array_pop($folder); $folder = implode('/', $folder); } elseif (file_exists(JPATH_ROOT . '/' . JComponentHelper::getParams('com_media')->get('image_path', 'images') . '/' . $this->directory)) { $folder = $this->directory; } else { $folder = ''; } // The button. if ($this->disabled != true) { JHtml::_('bootstrap.tooltip'); $html[] = '<a class="modal btn" title="' . JText::_('JLIB_FORM_BUTTON_SELECT') . '" href="' . ($this->readonly ? '' : ($this->link ? $this->link : 'index.php?option=com_media&view=images&tmpl=component&asset=' . $asset . '&author=' . $this->form->getValue($this->authorField)) . '&fieldid=' . $this->id . '&folder=' . $folder) . '"' . ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">'; $html[] = JText::_('JLIB_FORM_BUTTON_SELECT') . '</a><a class="btn hasTooltip" title="' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '" href="#" onclick="'; $html[] = 'jInsertFieldValue(\'\', \'' . $this->id . '\');'; $html[] = 'return false;'; $html[] = '">'; $html[] = '<span class="icon-remove"></span></a>'; } $html[] = '</div>'; return implode("\n", $html); }
} echo '<select name="k2import' . $k2field['extra'] . 'fields[' . $k2field['id'] . $additional_num . ']" class="k2importfield" size="0">'; echo '<option value="" label="empty">take standard value or leave empty</option>'; $already_selected = false; for ($csv_header_num = 0; $csv_header_num < count($this->csv_headers); $csv_header_num++) { echo '<option value="' . $csv_header_num . '" label="' . $this->csv_headers[$csv_header_num] . '"'; $header_to_lower = strtolower($this->csv_headers[$csv_header_num]); if ((strtolower($k2field['title']) == $header_to_lower || $k2field['id'] == 'attachment' && preg_match("/attachment\\s?\\d+\$/", $header_to_lower) || $k2field['id'] == 'attachment_title' && preg_match("/attachment\\s?title\\s?\\d+\$/", $header_to_lower) || $k2field['id'] == 'attachment_title_attribute' && preg_match("/attachment\\s?title\\s?attribute\\s?\\d+\$/", $header_to_lower)) && $already_selected == false) { echo " selected "; $already_selected = true; } echo '>' . $this->csv_headers[$csv_header_num] . '</option>'; } echo '</select>'; if (isset($k2field['tooltip'])) { echo JHtml::tooltip($k2field['tooltip']); } echo '</div> </div> '; if ($k2field['id'] == 'attachment' || $k2field['id'] == 'attachment_title' || $k2field['id'] == 'attachment_title_attribute') { echo '</div>'; } } ?> <script type="text/javascript"> var count_attachments=1; </script> <input type="hidden" name="option" value="com_k2import" />
<a href="<?php echo $item->actionlink; ?> "> <?php if ($item->tooltips) { echo JHtml::tooltip($item->tooltips, $item->title, 'tooltip.png', $item->title, '', false); } else { echo $item->title; } ?> </a> <?php } else { if ($item->tooltips) { echo JHtml::tooltip($item->tooltips, $item->title, 'tooltip.png', $item->title, '', false); } else { echo $item->title; } } ?> </td> <td class="center"> <?php if ($criteriagroupCandoManage) { ?> <a href="<?php echo 'index.php?option=com_judirectory&task=criteriagroup.edit&id=' . $item->group_id; ?> "><?php echo $item->group_name;
/** * Get Preview Image. * * @return string Preview image html. */ public function getPreview() { // The Preview. $preview = (string) $this->element['preview']; $showPreview = true; $showAsTooltip = false; switch ($preview) { case 'no': // Deprecated parameter value // Deprecated parameter value case 'false': case 'none': $showPreview = false; break; case 'yes': // Deprecated parameter value // Deprecated parameter value case 'true': case 'show': break; case 'tooltip': default: $this->showAsTooltip = $showAsTooltip = true; $options = array('onShow' => 'AKFinderRefreshPreviewTip(this)'); JHtmlBehavior::tooltip('.hasTipPreview', $options); break; } if ($showPreview) { if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $src = JURI::root() . $this->value; } else { $src = ''; } $width = (int) XmlHelper::get($this->element, 'preview_width', 300); $height = (int) XmlHelper::get($this->element, 'preview_height', 200); $style = ''; $style .= $width > 0 ? 'max-width:' . $width . 'px;' : ''; $style .= $height > 0 ? 'max-height:' . $height . 'px;' : ''; $style .= !$showAsTooltip ? 'margin: 10px 0;' : ''; $imgattr = array('id' => $this->id . '_preview', 'class' => 'media-preview', 'style' => $style); $imgattr['class'] = $showAsTooltip ? $imgattr['class'] : $imgattr['class'] . ' img-polaroid'; $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr); $previewImg = '<div id="' . $this->id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>'; $previewImgEmpty = '<div id="' . $this->id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>'; $html[] = '<div class="media-preview add-on fltlft">'; if ($showAsTooltip) { $tooltip = $previewImgEmpty . $previewImg; $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => '<i class="icon-eye"></i>', 'class' => 'hasTipPreview'); $options['text'] = JVERSION >= 3 ? $options['text'] : JText::_('JLIB_FORM_MEDIA_PREVIEW_TIP_TITLE'); $html[] = JHtml::tooltip($tooltip, $options); } else { $html[] = ' ' . $previewImgEmpty; $html[] = ' ' . $previewImg; $html[] = '<script type="text/javascript">AKFinderRefreshPreview("' . $this->id . '");</script>'; } $html[] = '</div>'; } return implode("\n", $html); }
<?php } ?> <tr> <td class="key"> <label for="product_preview_back_image"> <?php echo JText::_('COM_REDSHOP_PRODUCT_PREVIEW_BACK_IMAGE'); ?> </label> </td> <td> <input type="file" name="product_preview_back_image" id="product_preview_back_image" size="25" /> <?php echo JHtml::tooltip(JText::_('COM_REDSHOP_TOOLTIP_PRODUCT_PREVIEW_BACK_IMAGE'), JText::_('COM_REDSHOP_PRODUCT_PREVIEW_BACK_IMAGE'), 'tooltip.png', '', '', false); ?> </td> </tr> <tr> <td class="key"> </td> <td> <?php $product_preview_back_image = 'product/' . trim($this->detail->product_preview_back_image); ?> <?php if (file_exists(REDSHOP_FRONT_IMAGES_RELPATH . $product_preview_back_image) && trim($this->detail->product_preview_back_image) != "") { ?> <div id="image_dis">
?> </th> <!--th><?php echo JText::_('TOTAL_SPENT'); ?> </th--> <th><?php echo JHtml::tooltip(JText::_('TOTAL_SPENT'), '', '', JText::sprintf('TOTAL_SPENT', $socialads_config['currency'])); ?> </th> <!--th><?php echo JText::_('AMOUNT_DUE'); ?> </th--> <th><?php echo JHtml::tooltip(JText::_('AMOUNT_DUE_REMAINING'), '', '', JText::sprintf('AMOUNT_DUE', $socialads_config['currency'])); ?> </th> </tr> </thead> <?php $balance = 0; foreach ($stat_info as $key) { $comment = explode('|', $key->comment); ?> <tr> <td style="width:15%"> <?php
/** * Tests the tooltip method * * @return void * * @since 3.1 */ public function testTooltip() { // We generate a random template name so that we don't collide or hit anything $template = 'mytemplate' . rand(1, 10000); // We create a stub (not a mock because we don't enforce whether it is called or not) // to return a value from getTemplate JFactory::$application->expects($this->any())->method('getTemplate')->will($this->returnValue($template)); // Testing classical cases $this->assertEquals(JHtml::tooltip('Content'), '<span class="hasTooltip" title="Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>', 'Basic tooltip failed'); $this->assertEquals(JHtml::tooltip('Content', 'Title'), '<span class="hasTooltip" title="' . '<strong>Title</strong><br />Content' . '"><img src="/media/system/images/tooltip.png" alt="Tooltip" /></span>', 'Tooltip with title and content failed'); $this->assertEquals(JHtml::tooltip('Content', 'Title', null, 'Text'), '<span class="hasTooltip" title="<strong>Title</strong><br />Content">Text</span>', 'Tooltip with title and content and text failed'); $this->assertEquals(JHtml::tooltip('Content', 'Title', null, 'Text', 'http://www.monsite.com'), '<span class="hasTooltip" title="<strong>Title</strong><br />Content"><a href="http://www.monsite.com">Text</a></span>', 'Tooltip with title and content and text and href failed'); $this->assertEquals(JHtml::tooltip('Content', 'Title', 'tooltip.png', null, null, 'MyAlt'), '<span class="hasTooltip" title="' . '<strong>Title</strong><br />Content' . '"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="MyAlt" /></span>', 'Tooltip with title and content and alt failed'); $this->assertEquals(JHtml::tooltip('Content', 'Title', 'tooltip.png', null, null, 'MyAlt', 'hasTooltip2'), '<span class="hasTooltip2" title="' . '<strong>Title</strong><br />Content' . '"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="MyAlt" /></span>', 'Tooltip with title and content and alt and class failed'); $this->assertEquals(JHtml::tooltip('Content', 'Title', null, 'Text', null, null, 'hasTip'), '<span class="hasTip" title="Title::Content">Text</span>', 'Tooltip with hasTip class failed'); // Testing where title is an array $this->assertEquals(JHtml::tooltip('Content', array('title' => 'Title')), '<span class="hasTooltip" title="<strong>Title</strong><br />Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>', 'Tooltip with title and content failed'); $this->assertEquals(JHtml::tooltip('Content', array('title' => 'Title', 'text' => 'Text')), '<span class="hasTooltip" title="<strong>Title</strong><br />Content">Text</span>', 'Tooltip with title and content and text failed'); $this->assertEquals(JHtml::tooltip('Content', array('title' => 'Title', 'text' => 'Text', 'href' => 'http://www.monsite.com')), '<span class="hasTooltip" title="<strong>Title</strong><br />Content"><a href="http://www.monsite.com">Text</a></span>', 'Tooltip with title and content and text and href failed'); $this->assertEquals(JHtml::tooltip('Content', array('title' => 'Title', 'alt' => 'MyAlt')), '<span class="hasTooltip" title="<strong>Title</strong><br />Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="MyAlt" /></span>', 'Tooltip with title and content and alt failed'); $this->assertEquals(JHtml::tooltip('Content', array('title' => 'Title', 'class' => 'hasTooltip2')), '<span class="hasTooltip2" title="<strong>Title</strong><br />Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>', 'Tooltip with title and content and class failed'); $this->assertEquals(JHtml::tooltip('Content', array()), '<span class="hasTooltip" title="Content"><img src="' . JUri::base(true) . '/media/system/images/tooltip.png" alt="Tooltip" /></span>', 'Basic tooltip (array version) failed'); }
</textarea> </td> <td> <?php echo JHtml::tooltip(JText::_('COM_REDSHOP_TOOLTIP_META_LANG_SETTING'), JText::_('COM_REDSHOP_META_LANG_SETTING'), 'tooltip.png', '', '', false); ?> </td> </tr> <tr> <td class="key"> <label for="metarobot_info"> <?php echo JText::_('COM_REDSHOP_META_ROBOT_INFO'); ?> </label> </td> <td> <textarea class="text_area" name="metarobot_info" id="metarobot_info" rows="4" cols="40"><?php echo $this->detail->metarobot_info; ?> </textarea> </td> <td> <?php echo JHtml::tooltip(JText::_('COM_REDSHOP_TOOLTIP_META_ROBOT_INFO'), JText::_('COM_REDSHOP_META_ROBOT_INFO'), 'tooltip.png', '', '', false); ?> </td> </tr> </table>
<label for="description" class="control-label"><?php echo JHtml::tooltip(JText::_('DESCRIPTION_TOOLTIP'), JText::_('DESCRIPTION'), '', JText::_('DESCRIPTION')); ?> </label> <div class="controls"> <textarea size="28" rows="3" name="description" id="description" class="inputbox" ><?php if ($this->coupons) { echo trim($this->coupons[0]->description); } ?> </textarea> </div> </div> <div class="control-group"> <label for="params" class="control-label"><?php echo JHtml::tooltip(JText::_('PARAMETERS_TOOLTIP'), JText::_('PARAMETERS'), '', JText::_('PARAMETERS')); ?> </label> <div class="controls"> <textarea size="28" rows="3" name="params" id="params" class="inputbox" ><?php if ($this->coupons) { echo trim($this->coupons[0]->params); } ?> </textarea> </div> </div> </div> <!--sj change -->
if (isset($this->id)) { $max_images = $max_images - $this->imgcount; if ($max_images <= 0) { $max_images = 0; } } // Accept jpg,png,gif $accept = $this->cfg->type; $accept = explode(",", $accept); $tt = JText::sprintf('COM_JTG_ALLOWED_FILETYPES', implode(", ", $accept)) . ' ' . JText::_('COM_JTG_MAXIMAL') . ' ' . $max_images; ?> <td><?php echo JText::_('COM_JTG_IMAGES'); ?> <?php echo JHtml::tooltip($tt, JText::_('COM_JTG_TT_HEADER'), 'tooltip.png'); ?> </td> <td><input <?php echo $max_images <= 0 ? 'disabled="disabled" ' : ''; ?> type="file" name="images[]" class="multi" maxlength="<?php echo $max_images; ?> " accept="<?php echo implode("|", $accept); ?> "><br clear="all" /> <?php