| @@ 203-209 (lines=7) @@ | ||
| 200 | */ |
|
| 201 | public function renderFormColorPicker(XoopsFormColorPicker $element) |
|
| 202 | { |
|
| 203 | if (isset($GLOBALS['xoTheme'])) { |
|
| 204 | $GLOBALS['xoTheme']->addScript('include/spectrum.js'); |
|
| 205 | $GLOBALS['xoTheme']->addStylesheet('include/spectrum.css'); |
|
| 206 | } else { |
|
| 207 | echo '<script type="text/javascript" src="' . XOOPS_URL . '/include/spectrum.js"></script>'; |
|
| 208 | echo '<link rel="stylesheet" type="text/css" href="' . XOOPS_URL . '/include/spectrum.css">'; |
|
| 209 | } |
|
| 210 | return '<input class="form-control" style="width: 25%;" type="color" name="' . $element->getName() |
|
| 211 | . "' title='" . $element->getTitle() . "' id='" . $element->getName() |
|
| 212 | . '" size="7" maxlength="7" value="' . $element->getValue() . '"' . $element->getExtra() . ' />'; |
|
| @@ 136-143 (lines=8) @@ | ||
| 133 | */ |
|
| 134 | public function renderFormColorPicker(XoopsFormColorPicker $element) |
|
| 135 | { |
|
| 136 | if (isset($GLOBALS['xoTheme'])) { |
|
| 137 | $GLOBALS['xoTheme']->addScript("browse.php?Frameworks/jquery/jquery.js"); |
|
| 138 | $GLOBALS['xoTheme']->addScript('include/spectrum.js'); |
|
| 139 | $GLOBALS['xoTheme']->addStylesheet('include/spectrum.css'); |
|
| 140 | } else { |
|
| 141 | echo '<script type="text/javascript" src="' . XOOPS_URL . '/include/spectrum.js"></script>'; |
|
| 142 | echo '<link rel="stylesheet" type="text/css" href="' . XOOPS_URL . '/include/spectrum.css">'; |
|
| 143 | } |
|
| 144 | return "<input type='color' name='" . $element->getName() . "' title='" . $element->getTitle() |
|
| 145 | . "' id='" . $element->getName() . "' size='" . $element->getSize() . "' maxlength='" |
|
| 146 | . $element->getMaxlength() . "' value='" . $element->getValue() . "'" . $element->getExtra() |
|