Ejemplo n.º 1
0
 /**
  * 
  * additems toolbar
  */
 protected function addToolbar()
 {
     //$sliderTitle = $this->arrSliders[$this->sliderID]["title"];
     $arrSlider = HelperUniteRev::getSlider($this->sliderID);
     $sliderTitle = $arrSlider["title"];
     $title = JText::_('COM_UNITEREVOLUTION') . " - " . $sliderTitle . " - ";
     $title .= "<small>[" . JText::_('COM_UNITEREVOLUTION_SLIDES') . "]</small>";
     JToolBarHelper::title($title, 'generic.png');
     $numSliders = count($this->arrSliders);
     if ($numSliders > 0) {
         JUniteToolBarHelperRev::addComboButton("button_new_slide", "Add Slide", "Adding...", "Slide Added!", "icon-32-new");
         JToolBarHelper::divider();
         JUniteToolBarHelperRev::addCustomButton("button_close", "Close", "icon-32-cancel");
     }
 }
Ejemplo n.º 2
0
 /**
  * 
  * add toolbars
  */
 protected function addToolbar()
 {
     $title = JText::_('COM_UNITEREVOLUTION') . " - ";
     if ($this->isNew) {
         $title .= '<small>[ ' . JText::_('COM_UNITEREVOLUTION_NEW') . ' ]</small>';
     } else {
         $title .= $this->item->title . " <small>[" . JText::_("COM_UNITEREVOLUTION_EDIT_SETTINGS") . "]</small>";
     }
     JToolBarHelper::title($title, 'generic.png');
     /*		
     JToolBarHelper::addNew("new","new something");
     JToolBarHelper::apply();
     JToolBarHelper::cancel();
     JToolBarHelper::save();
     */
     JUniteToolBarHelperRev::addComboButton("button_save", "Save", "Saving...", "Saved!", "icon-32-apply");
     if ($this->isNew == false) {
         JUniteToolBarHelperRev::addComboButton("button_save_duplicate", "Save & Copy", "Saving...", "Saved!", "icon-32-save-copy");
     }
     JUniteToolBarHelperRev::addComboButton("button_save_close", "Save & Close", "Saving...", "Saved!", "icon-32-save");
     JUniteToolBarHelperRev::addCustomButton("button_cancel", "Cancel", "icon-32-cancel");
 }
Ejemplo n.º 3
0
 /**
  * 
  * add custom button with loading etc.
  */
 public static function addCustomButton($buttonID, $buttonText = "Update", $buttonIcon = "icon-32-apply")
 {
     if (UniteFunctionJoomlaRev::isJoomla3()) {
         $arrConvert = array();
         $buttonIcon = str_replace("icon-32", "icon", $buttonIcon);
         $html = "\n\t\t\t\t\t<button id=\"{$buttonID}\" class=\"btn btn-small\" onclick=\"Javascript:void(0)\" href=\"#\" style='xdisplay:none;' >\n\t\t\t\t\t\t<i class=\"{$buttonIcon} icon-white\"></i>\n\t\t\t\t\t\t{$buttonText}\n\t\t\t\t\t</button>\n\t\t\t\t";
     } else {
         //joomla regular
         $html = "\n\t\t\t\t<a href=\"javascript:void(0);\" id=\"{$buttonID}\" class=\"toolbar\">\n\t\t\t\t\t<span class=\"{$buttonIcon}\"></span>\n\t\t\t\t\t{$buttonText}\n\t\t\t\t</a>\n\t\t\t\t";
     }
     //add loader
     if (self::$addLoader == true) {
         $html .= self::getLoaderHtml($buttonID, self::$loaderText);
     }
     if (self::$addSuccessMessage == true) {
         $html .= self::getSuccessMessageHtml($buttonID, self::$successMessage);
     }
     $bar = JToolBar::getInstance('toolbar');
     $bar->appendButton('Custom', $html, $buttonID);
     self::$addLoader = false;
     self::$addSuccessMessage = false;
 }
Ejemplo n.º 4
0
 /**
  * 
  * add the toolbar
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = false;
     $canDo = true;
     $sliderTitle = $this->slider["title"];
     $title = JText::_('COM_UNITEREVOLUTION') . ' - ' . $sliderTitle;
     if ($isNew) {
         $title .= " - <small>[" . JText::_('COM_UNITEREVOLUTION_NEW_SLIDE') . "]</small>";
     } else {
         $title .= " <small>[" . JText::_('COM_UNITEREVOLUTION_EDIT_SLIDE') . ", ID:{$this->item->id}]</small>";
     }
     JToolBarHelper::title($title, 'generic.png');
     JUniteToolBarHelperRev::addComboButton("button_save_slide", "Save", "Saving...", "Saved!");
     JUniteToolBarHelperRev::addComboButton("button_save_slide_new", "Save & New", "Saving...", "Saved!", "icon-32-save-new");
     JUniteToolBarHelperRev::addComboButton("button_save_slide_copy", "Save & Copy", "Saving...", "Saved!", "icon-32-save-copy");
     JUniteToolBarHelperRev::addComboButton("button_save_slide_close", "Save & Close", "Saving...", "Saved!", "icon-32-save");
     JUniteToolBarHelperRev::addCustomButton("button_cancel", "Cancel", "icon-32-cancel");
 }