Am 2/22/10 4:23 PM, schrieb Manfred Rutschmann . revier.de:
Am Mon, 22 Feb 2010 13:15:11 +0100 schrieb Rainer Schleevoigt:

In meiner Klasse steht nun:
Das klappt jetzt alles. Da ich es aber ohne Doku gebaut habe, frage ich mich, wie nachhaltig die Lösung ist. Habe mir einfach nur per print_r die Struktur geben lassen …

class tx_addFieldsToFlexForm {
function addColorpicker($config,$elem) {
$name = $config['itemFormElName'];
$value = $config['itemFormElValue'];
$this->extKey= 'ras_cumulustagcloud';
$path = '../'.t3lib_extMgm::siteRelPath($this->extKey).dirname($this->scriptRelPath).'res/'; $js = '<script src="../'. $path .'jscolor/jscolor.js" type="text/javascript"><!-- //--></script>'; $ret = $js . '<input size="6" class="color" value="'. $value.'" name="'. $name . '" />'; //. print_r($config,true) ;
return $ret ;
}
/* baut einen Slider */
function addSlider($config,$elem) {
$id = rand(0,999);
$name = $config['itemFormElName'];
$min = $config['fieldConf']['config']['min'];
$max = $config['fieldConf']['config']['max'];
$value = $config['itemFormElValue'];
$handle = 'handle_' . $id;
$track = 'track_' . $id;

$this->extKey= 'ras_cumulustagcloud';
$path = '../'.t3lib_extMgm::siteRelPath($this->extKey).dirname($this->scriptRelPath).'res/'; $js = '<script src="../'. $path .'slider.js" type="text/javascript"><!-- //--></script>'; $js .= '<script type="text/javascript">new Control.Slider("'.$handle.'","'.$track.'",{minimum:'.$min.',maximum:'.$max.',range:$R('.$min.','.$max.'),sliderValue:'.$value.',onChange:function(x){$("inp_'.$id.'").value=Math.round(x);}});</script>';

$ret = '<table><tr><td><input size="2" id="inp_'.$id.'" value="'. $value.'" name="'. $name . '" /></td><td>'; $ret .= '<div style="width: 300px; margin:0.7em 0 0.7em 1em; position: relative; border: 1px inset gray;; background-color: gray; height: 2px;" id="'.$track.'">'; $ret .= '<div style="background-image: url('.$path.'handle.horizontal.png); position: relative; top: -7px; width: 32px; height: 15px; cursor: move; left: 28px;" title="Schieber" id="'.$handle.'" class="selected"></div>'; $ret .= '<p style="position: absolute; top: 2px; font-size: 7pt; color: red; left: 3px;">'.$min.'</p><p style="position: absolute; top: 2px; font-size: 7pt; color: red; right: 3px;">'.$max.'</p></div></td></tr></table> '; //. print_r($config,true) ;
return $ret . $js ;
}


}



--
Webmasterei Hamburg
Dipl.-Ing. R. Schleevoigt / TYPO3 Certified Integrator
Ust-ID:  DE239491976
mail:rai...@webmasterei-hamburg.de
http://webmasterei.com
22303 Hamburg | Novalisweg 10
+49 40 27806982 | skype:kontaktschmied

_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an