Beispiel #1
0
 /**
  * Use this selector for widgets created with jooseSnippet
  */
 protected function widgetSelector(\Psc\HTML\Tag $tag = NULL, $subSelector = NULL)
 {
     $jQuery = \Psc\JS\jQuery::getClassSelector($tag ?: $this->html);
     if (isset($subSelector)) {
         $jQuery .= sprintf(".find(%s)", \Psc\JS\Helper::convertString($subSelector));
     }
     return $this->jsExpr($jQuery);
 }
Beispiel #2
0
 /**
  * Fügt dem Tag jquery Data hinzu
  */
 public static function data(Tag $tag, $name, $data)
 {
     $js = sprintf("data(%s, %s)", JSHelper::convertString($name), JSHelper::convertValue($data));
     $tag->chain(new Code($js));
     return $tag;
 }
Beispiel #3
0
 protected function findInJSComponent($selector)
 {
     return $this->jsExpr(self::JS_COMPONENT . sprintf(".find(%s)", \Psc\JS\Helper::convertString($selector)));
 }