Exemplo n.º 1
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT
                 m.id, 
                 m.title AS name, 
                 m.title, 
                 m.parent_id AS parent, 
                 m.parent_id
             FROM #__categories m
             WHERE m.published = 1 AND (m.extension = "com_content" OR m.extension = "system")
             ORDER BY m.lft';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     $this->_xml->addChild('option', htmlspecialchars(n2_('All')))->addAttribute('value', '0');
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 1, '', array(), $children, 9999, 0, 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->treename))->addAttribute('value', $option->id);
         }
     }
     return parent::fetchElement();
 }
Exemplo n.º 2
0
 function fetchElement()
 {
     $easings = array("linear" => "Linear", "easeInQuad" => "Quad In", "easeOutQuad" => "Quad Out", "easeInOutQuad" => "Quad In Out", "easeInCubic" => "Cubic In", "easeOutCubic" => "Cubic Out", "easeInOutCubic" => "Cubic In Out", "easeInQuart" => "Quart In", "easeOutQuart" => "Quart Out", "easeInOutQuart" => "Quart In Out", "easeInQuint" => "Quint In", "easeOutQuint" => "Quint Out", "easeInOutQuint" => "Quint In Out", "easeInSine" => "Sine In", "easeOutSine" => "Sine Out", "easeInOutSine" => "Sine In Out", "easeInExpo" => "Expo In", "easeOutExpo" => "Expo Out", "easeInOutExpo" => "Expo In Out", "easeInCirc" => "Circ In", "easeOutCirc" => "Circ Out", "easeInOutCirc" => "Circ In Out", "easeInElastic" => "Elastic In", "easeOutElastic" => "Elastic Out", "easeInOutElastic" => "Elastic In Out", "easeInBack" => "Back In", "easeOutBack" => "Back Out", "easeInOutBack" => "Back In Out", "easeInBounce" => "Bounce In", "easeOutBounce" => "Bounce Out", "easeInOutBounce" => "Bounce In Out");
     foreach ($easings as $k => $easing) {
         $this->_xml->addChild('option', ucfirst($easing))->addAttribute('value', $k);
     }
     return parent::fetchElement();
 }
Exemplo n.º 3
0
 function fetchElement()
 {
     $easings = array("dojo.fx.easing.linear" => "Linear", "dojo.fx.easing.quadIn" => "Quad_In", "dojo.fx.easing.quadOut" => "Quad_Out", "dojo.fx.easing.quadInOut" => "Quad_In_Out", "dojo.fx.easing.cubicIn" => "Cubic_In", "dojo.fx.easing.cubicOut" => "Cubic_Out", "dojo.fx.easing.cubicInOut" => "Cubic_In_Out", "dojo.fx.easing.quartIn" => "Quart_In", "dojo.fx.easing.quartOut" => "Quart_Out", "dojo.fx.easing.quartInOut" => "Quart_In_Out", "dojo.fx.easing.quintIn" => "Quint_In", "dojo.fx.easing.quintOut" => "Quint_Out", "dojo.fx.easing.quintInOut" => "Quint_In_Out", "dojo.fx.easing.sineIn" => "Sine_In", "dojo.fx.easing.sineOut" => "Sine_Out", "dojo.fx.easing.sineInOut" => "Sine_In_Out", "dojo.fx.easing.expoIn" => "Expo_In", "dojo.fx.easing.expoOut" => "Expo_Out", "dojo.fx.easing.expoInOut" => "Expo_In_Out", "dojo.fx.easing.circIn" => "Circ_In", "dojo.fx.easing.circOut" => "Circ_Out", "dojo.fx.easing.circInOut" => "Circ_In_Out", "dojo.fx.easing.backIn" => "Back_In", "dojo.fx.easing.backOut" => "Back_Out", "dojo.fx.easing.backInOut" => "Back_In_Out", "dojo.fx.easing.bounceIn" => "Bounce_In", "dojo.fx.easing.bounceOut" => "Bounce_Out", "dojo.fx.easing.bounceInOut" => "Bounce_In_Out");
     foreach ($easings as $k => $easing) {
         $this->_xml->addChild('option', n2_($easing))->addAttribute('value', $k);
     }
     return parent::fetchElement();
 }
Exemplo n.º 4
0
 function fetchElement()
 {
     N2Localization::addJS('Done');
     if (N2XmlHelper::getAttribute($this->_xml, 'fixed')) {
         $this->fixedMode = true;
     }
     $html = parent::fetchElement();
     N2JS::addInline('new NextendElementSkin("' . $this->_id . '", "' . str_replace($this->_name, '', $this->_id) . '", ' . json_encode($this->skins) . ', ' . json_encode($this->fixedMode) . ');');
     return $html;
 }
Exemplo n.º 5
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT id, title FROM #__tags WHERE published = 1 ORDER BY id';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $this->_xml->addChild('option', htmlspecialchars(n2_('All')))->addAttribute('value', '0');
     if (count($menuItems)) {
         array_shift($menuItems);
         foreach ($menuItems as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->title))->addAttribute('value', $option->id);
         }
     }
     return parent::fetchElement();
 }
Exemplo n.º 6
0
 function fetchElement()
 {
     $dir = N2Platform::getPublicDir();
     $extension = N2XmlHelper::getAttribute($this->_xml, 'extension');
     $files = scandir($dir);
     $validated_files = array();
     foreach ($files as $file) {
         if (strtolower(pathinfo($file, PATHINFO_EXTENSION)) == $extension) {
             $validated_files[] = $file;
         }
     }
     $this->_xml->addChild('option', n2_('Choose a file to import'))->addAttribute('value', '');
     foreach ($validated_files as $f) {
         $this->_xml->addChild('option', $f)->addAttribute('value', $f);
     }
     return parent::fetchElement();
 }
Exemplo n.º 7
0
 function fetchElement()
 {
     $args = array('type' => 'post', 'child_of' => 0, 'parent' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'number' => '', 'taxonomy' => 'category', 'pad_counts' => false);
     $categories = get_categories($args);
     $new = array();
     foreach ($categories as $a) {
         $new[$a->category_parent][] = $a;
     }
     $list = array();
     $options = $this->createTree($list, $new, 0);
     $this->_xml->addChild('option', 'All')->addAttribute('value', 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars(' - ' . $option->treename))->addAttribute('value', $option->cat_ID);
         }
     }
     return parent::fetchElement();
 }
Exemplo n.º 8
0
 function renderSelector()
 {
     return parent::fetchElement();
 }