当前位置: 首页>>代码示例>>PHP>>正文


PHP JEVHelper::script方法代码示例

本文整理汇总了PHP中JEVHelper::script方法的典型用法代码示例。如果您正苦于以下问题:PHP JEVHelper::script方法的具体用法?PHP JEVHelper::script怎么用?PHP JEVHelper::script使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JEVHelper的用法示例。


在下文中一共展示了JEVHelper::script方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DefaultViewDatecellAddEvent

function DefaultViewDatecellAddEvent($view, $year, $month, $day)
{
    if (JEVHelper::isEventCreator()) {
        JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
        // no events on Saturday or Sunday!
        //if (date("N",mktime(0,0,0,$month,$day, $year))>5) return;
        $editLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icalevent.edit' . '&year=' . $year . '&month=' . $month . '&day=' . $day . '&Itemid=' . $view->Itemid, true);
        $eventlinkadd = $view->popup ? "javascript:jevEditPopup('" . $editLink . "',{$view->popupw}, {$view->popuph});" : $editLink;
        $transparentGif = JURI::root() . "components/" . JEV_COM_COMPONENT . "/views/" . $view->getViewName() . "/assets/images/transp.gif";
        ?>
    	<a href="<?php 
        echo $eventlinkadd;
        ?>
" title="<?php 
        echo JText::_('JEV_ADDEVENT');
        ?>
" class="addjevent">
        	<img src="<?php 
        echo $transparentGif;
        ?>
" alt="<?php 
        echo JText::_('JEV_ADDEVENT');
        ?>
"/>
    	</a>
    	<?php 
    }
}
开发者ID:madcsaba,项目名称:li-de,代码行数:28,代码来源:defaultviewdatecelladdevent.php

示例2: edit

 function edit($tpl = null)
 {
     $document =& JFactory::getDocument();
     include JEV_LIBS . "editStrings.php";
     $document->addScriptDeclaration($editStrings);
     // WHY THE HELL DO THEY BREAK PUBLIC FUNCTIONS !!!
     if (JVersion::isCompatible("1.6.0")) {
         JEVHelper::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     JEVHelper::script('editical.js', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_REPEAT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_REPEAT'), 'jevents');
     $this->addSaveToolBarButton();
     JToolBarHelper::apply('icalrepeat.apply', "Apply");
     //$this->addCancelToolBarButton();
     JToolBarHelper::cancel('icalrepeat.list');
     //JToolBarHelper::help( 'screen.icalrepeat.edit', true);
     $this->_hideSubmenu();
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$section = $params->getValue("section",0);
     JHTML::_('behavior.tooltip');
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:26,代码来源:view.html.php

示例3: edit

 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editical.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFields.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_REPEAT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_REPEAT'), 'jevents');
     JToolBarHelper::apply('icalrepeat.apply', "JEV_SAVE");
     $this->addSaveToolBarButton();
     //$this->addCancelToolBarButton();
     JToolBarHelper::cancel('icalrepeat.list');
     //JToolBarHelper::help( 'screen.icalrepeat.edit', true);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$section = $params->get("section",0);
     JHTML::_('behavior.tooltip');
     if (JevJoomlaVersion::isCompatible("3.0")) {
         $this->setLayout("edit");
     } else {
         $this->setLayout("edit16");
     }
     $this->setupEditForm();
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:26,代码来源:view.html.php

示例4: chosen

 /**
  * Method to load the Chosen JavaScript framework and supporting CSS into the document head
  *
  * If debugging mode is on an uncompressed version of Chosen is included for easier debugging.
  *
  * @param   string  $selector  Class for Chosen elements.
  * @param   mixed   $debug     Is debugging mode on? [optional]
  * @param   array   $options   the possible Chosen options as name => value [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function chosen($selector = '.advancedSelect', $debug = null, $options = array())
 {
     if (isset(static::$loaded[__METHOD__][$selector])) {
         return;
     }
     // Include jQuery
     //JHtml::_('jquery.framework');
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = (bool) $config->get('debug');
     }
     // Default settings
     $options['disable_search_threshold'] = isset($options['disable_search_threshold']) ? $options['disable_search_threshold'] : 10;
     $options['allow_single_deselect'] = isset($options['allow_single_deselect']) ? $options['allow_single_deselect'] : true;
     $options['placeholder_text_multiple'] = isset($options['placeholder_text_multiple']) ? $options['placeholder_text_multiple'] : JText::_('JGLOBAL_SELECT_SOME_OPTIONS');
     $options['placeholder_text_single'] = isset($options['placeholder_text_single']) ? $options['placeholder_text_single'] : JText::_('JGLOBAL_SELECT_AN_OPTION');
     $options['no_results_text'] = isset($options['no_results_text']) ? $options['no_results_text'] : JText::_('JGLOBAL_SELECT_NO_RESULTS_MATCH');
     // Options array to json options string
     $options_str = json_encode($options, $debug && defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : false);
     JEVHelper::script("components/com_jevents/assets/js/chosen.jquery.js");
     JHTML::stylesheet("components/com_jevents/assets/css/chosen.css");
     //JHtml::_('script', 'jui/chosen.jquery.min.js', false, true, false, false, $debug);
     //JHtml::_('stylesheet', 'jui/chosen.css', false, true);
     JFactory::getDocument()->addScriptDeclaration("\n\t\t\t\tjQuery(document).ready(function (){\n\t\t\t\t\tjQuery('" . $selector . "').chosen(" . $options_str . ");\n\t\t\t\t});\n\t\t\t");
     static::$loaded[__METHOD__][$selector] = true;
     return;
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:41,代码来源:formbehavior.php

示例5: edit

 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editicalJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('view_detailJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFieldsJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_REPEAT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_REPEAT'), 'jevents');
     JToolBarHelper::apply('icalrepeat.apply', "JEV_SAVE");
     JToolBarHelper::apply('icalrepeat.save', "JEV_SAVE_CLOSE");
     // We will need this when we offer to change one or more repeats on save!
     //$this->addSaveToolBarButton();
     JToolBarHelper::cancel('icalrepeat.list');
     //JToolBarHelper::help( 'screen.icalrepeat.edit', true);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$section = $params->get("section",0);
     JHTML::_('behavior.tooltip');
     // load Joomla javascript classes
     JHTML::_('behavior.core');
     $this->setLayout("edit");
     $this->setupEditForm();
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:25,代码来源:view.html.php

示例6: edit

 function edit($tpl = null)
 {
     $document =& JFactory::getDocument();
     include JEV_ADMINLIBS . "/editStrings.php";
     $document->addScriptDeclaration($editStrings);
     // WHY THE HELL DO THEY BREAK PUBLIC FUNCTIONS !!!
     if (JVersion::isCompatible("1.6.0")) {
         JEVHelper::stylesheet('eventsadmin16.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     JEVHelper::script('editical.js', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/js/');
     //JEVHelper::script('toolbarfix.js','components/'.JEV_COM_COMPONENT.'/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_EVENT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_EVENT'), 'jevents');
     $bar =& JToolBar::getInstance('toolbar');
     if ($this->id > 0) {
         if ($this->editCopy) {
             $this->toolbarConfirmButton("icalevent.save", JText::_("save_copy_warning"), 'save', 'save', 'Save', false);
             if (JEVHelper::isEventEditor()) {
                 $this->toolbarConfirmButton("icalevent.apply", JText::_("save_copy_warning"), 'apply', 'apply', 'Apply', false);
             }
         } else {
             $this->toolbarConfirmButton("icalevent.save", JText::_("save_icalevent_warning"), 'save', 'save', 'Save', false);
             if (JEVHelper::isEventEditor()) {
                 $this->toolbarConfirmButton("icalevent.apply", JText::_("save_icalevent_warning"), 'apply', 'apply', 'Apply', false);
             }
         }
     } else {
         $this->toolbarButton("icalevent.save", 'save', 'save', 'Save', false);
         if (JEVHelper::isEventEditor()) {
             $this->toolbarButton("icalevent.apply", 'apply', 'apply', 'Apply', false);
         }
     }
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     if ($params->get("editpopup", 0)) {
         $document->addStyleDeclaration("div#toolbar-box{margin:10px 10px 0px 10px;} div#jevents {margin:0px 10px 10px 10px;} ");
         $this->toolbarButton("icalevent.close", 'cancel', 'cancel', 'Cancel', false);
         JRequest::setVar('tmpl', 'component');
         //force the component template
     } else {
         if ($this->id > 0) {
             $this->toolbarButton("icalevent.detail", 'cancel', 'cancel', 'Cancel', false);
         } else {
             $this->toolbarLinkButton("day.listevents", 'cancel', 'cancel', 'Cancel', false);
         }
     }
     JHTML::_('behavior.tooltip');
     // I pass in the rp_id so that I can return to the repeat I was viewing before editing
     $this->assign("rp_id", JRequest::getInt("rp_id", 0));
     $this->setCreatorLookup();
     $this->_adminStart();
     parent::displaytemplate($tpl);
     $this->_adminEnd();
 }
开发者ID:madseller,项目名称:coperio,代码行数:56,代码来源:view.html.php

示例7: edit

 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "/editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editical.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFields.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_REPEAT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_REPEAT'), 'jevents');
     $bar = JToolBar::getInstance('toolbar');
     $this->toolbarConfirmButton("icalrepeat.save", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'save', 'save', 'Save', false);
     if (JEVHelper::isEventEditor()) {
         $this->toolbarConfirmButton("icalrepeat.apply", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'apply', 'apply', 'jev_Apply', false);
     }
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
         $document->addStyleDeclaration("div#toolbar-box{margin:10px 10px 0px 10px;} div#jevents {margin:0px 10px 10px 10px;} ");
         $this->toolbarButton("icalevent.close", 'cancel', 'cancel', 'Cancel', false);
         JRequest::setVar('tmpl', 'component');
         //force the component template
     } else {
         $this->toolbarButton("icalevent.detail", 'cancel', 'cancel', 'Cancel', false);
     }
     //JToolBarHelper::help( 'screen.icalrepeat.edit', true);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     JHTML::_('behavior.tooltip');
     $this->_adminStart();
     if (JevJoomlaVersion::isCompatible("3.0")) {
         // load Joomla javascript classes
         JHTML::_('behavior.core');
         $this->setLayout("edit");
     } else {
         $this->setLayout("edit16");
     }
     $this->setupEditForm();
     JEVHelper::componentStylesheet($this, "editextra.css");
     jimport('joomla.filesystem.file');
     // Lets check if we have editted before! if not... rename the custom file.
     if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
         // It is definitely now created, lets load it!
         JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     parent::displaytemplate($tpl);
     $this->_adminEnd();
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:47,代码来源:view.html.php

示例8: DefaultEventManagementButton

function DefaultEventManagementButton($view, $row)
{
    JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
    ?>
	<a href="#my-modal" data-toggle="modal"  data-target="#action_dialogJQ<?php 
    echo $row->rp_id();
    ?>
"  title="<?php 
    echo JText::_('JEV_E_EDIT', true);
    ?>
">
		<?php 
    echo JEVHelper::imagesite('edit.png', JText::_('JEV_E_EDIT'));
    ?>
	</a>
	<?php 
}
开发者ID:pguilford,项目名称:vcomcc,代码行数:17,代码来源:defaulteventmanagementbutton.php

示例9: edit

 function edit($tpl = null)
 {
     $this->_hideSubmenu();
     include_once JPATH_ADMINISTRATOR . DS . "includes" . DS . "toolbar.php";
     // TODO find the active admin template
     if (!JVersion::isCompatible("1.6.0")) {
         JEVHelper::stylesheet("template.css", JURI::root() . "administrator/templates/khepri/css/");
     }
     // WHY THE HELL DO THEY BREAK PUBLIC FUNCTIONS !!!
     if (JVersion::isCompatible("1.6.0")) {
         JEVHelper::stylesheet('eventsadmin16.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     JEVHelper::script('editdefaults.js', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('JEV_LAYOUT_DEFAULT_EDIT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('JEV_LAYOUT_DEFAULT_EDIT'), 'jevents');
     JToolBarHelper::save("defaults.save");
     JToolBarHelper::cancel("defaults.cancel");
     JSubMenuHelper::addEntry(JText::_('DEFAULTS'), 'index.php?option=' . JEV_COM_COMPONENT, true);
     JHTML::_('behavior.tooltip');
     $db =& JFactory::getDBO();
     $uri =& JFactory::getURI();
     // Get data from the model
     $model =& $this->getModel();
     $item =& $this->get('Data');
     if (strpos($item->name, "com_") === 0) {
         $parts = explode(".", $item->name);
         // special numbered case e.g. managed people
         if (count($parts) == 4) {
             $iname = str_replace(".{$parts['2']}.", ".", $item->name);
         } else {
             $iname = $item->name;
         }
         $this->_addPath('template', JPATH_ADMINISTRATOR . "/components/" . $parts[0] . "/views/defaults/tmpl");
         if ($item->value == "" && file_exists(JPATH_ADMINISTRATOR . "/components/" . $parts[0] . "/views/defaults/tmpl/" . $iname . ".html")) {
             $item->value = file_get_contents(JPATH_ADMINISTRATOR . "/components/" . $parts[0] . "/views/defaults/tmpl/" . $iname . ".html");
         }
     }
     $this->assignRef('item', $item);
     parent::displaytemplate($tpl);
 }
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:44,代码来源:view.html.php

示例10: ical

 function ical($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document = JFactory::getDocument();
     // TODO do this properly
     //$document->setTitle(JText::_( 'BROWSER_TITLE' ));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$this->assign("introduction", $params->get("intro",""));
     $this->data = $this->datamodel->getCalendarData($this->year, $this->month, $this->day);
     // for adding events in day cell
     $this->popup = false;
     if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
         JevHtmlBootstrap::modal();
         JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
         $this->popup = true;
         $this->popupw = $params->get("popupw", 800);
         $this->popuph = $params->get("popuph", 600);
     }
     $this->is_event_creator = JEVHelper::isEventCreator();
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:20,代码来源:view.html.php

示例11: DefaultEventIcalButton

function DefaultEventIcalButton($view, $row)
{
    JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
    ?>
	<a href="#myical-modal" data-target="#ical_dialogJQ<?php 
    echo $row->rp_id();
    ?>
" data-toggle="modal" title="<?php 
    echo JText::_('JEV_SAVEICAL');
    ?>
">
		<img src="<?php 
    echo JURI::root() . 'components/' . JEV_COM_COMPONENT . '/assets/images/jevents_event_sml.png';
    ?>
" align="middle" name="image"  alt="<?php 
    echo JText::_('JEV_SAVEICAL');
    ?>
" class="h24px jev_ev_sml nothumb"/>
	</a>
	<?php 
}
开发者ID:pguilford,项目名称:vcomcc,代码行数:21,代码来源:defaulteventicalbutton.php

示例12: DefaultViewEventRowAdmin

function DefaultViewEventRowAdmin($view, $row, $manage = false)
{
    $popup = false;
    $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
    if ($params->get("editpopup", 0)) {
        JHTML::_('behavior.modal');
        JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
        $popup = true;
        $popupw = $params->get("popupw", 800);
        $popuph = $params->get("popuph", 600);
    }
    $editLink = $row->editLink(true);
    $editLink = $popup ? "javascript:jevEditPopup('" . $editLink . "',{$popupw}, {$popuph});" : $editLink;
    $modifylink = "";
    if (!$manage && JEVHelper::canEditEvent($row)) {
        $modifylink = '<a href="' . $row->editlink(true) . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n";
        $modifylink = '<a href="' . $editLink . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n";
    }
    $deletelink = "";
    if (!$manage && JEVHelper::canDeleteEvent($row)) {
        $deletelink = '<a href="' . $row->deletelink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('JEV_DELETE') . '"><b>' . JText::_('JEV_DELETE') . "</b></a>\n";
    }
    if (!$manage && JEVHelper::canPublishEvent($row)) {
        if ($row->published()) {
            $publishlink = '<a href="' . $row->unpublishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('UNPUBLISH') . '"><b>' . JText::_('UNPUBLISH') . "</b></a>\n";
        } else {
            $publishlink = '<a href="' . $row->publishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('PUBLISH') . '"><b>' . JText::_('PUBLISH') . "</b></a>\n";
        }
    } else {
        $publishlink = "";
    }
    $eventlink = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), false);
    $eventlink = JRoute::_($eventlink . $view->datamodel->getCatidsOutLink());
    $border = "border-color:" . $row->bgcolor() . ";";
    ?>
		
		<li class="ev_td_li" style="<?php 
    echo $border;
    ?>
">
			<a class="<?php 
    echo $row->state() ? 'ev_link_row' : 'ev_link_unpublished';
    ?>
" href="<?php 
    echo $eventlink;
    ?>
" title="<?php 
    echo JEventsHTML::special($row->title()) . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED'));
    ?>
"><?php 
    echo $row->title() . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED'));
    ?>
</a>
			&nbsp;<?php 
    echo JText::_('JEV_BY');
    ?>
			&nbsp;<i><?php 
    echo $row->contactlink('', true);
    ?>
</i>
			&nbsp;&nbsp;<?php 
    echo $deletelink;
    ?>
			&nbsp;&nbsp;<?php 
    echo $modifylink;
    ?>
			&nbsp;&nbsp;<?php 
    echo $publishlink;
    ?>
		</li>
		<?php 
}
开发者ID:madcsaba,项目名称:li-de,代码行数:72,代码来源:defaultvieweventrowadmin.php

示例13: edit

 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "/editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editicalJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFieldsJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     if ($this->row->title() <= "") {
         // Set toolbar items for the page
         JToolBarHelper::title(JText::_('CREATE_ICAL_EVENT'), 'jevents');
         $document->setTitle(JText::_('CREATE_ICAL_EVENT'));
     } else {
         // Set toolbar items for the page
         JToolBarHelper::title(JText::_('EDIT_ICAL_EVENT'), 'jevents');
         $document->setTitle(JText::_('EDIT_ICAL_EVENT'));
     }
     $bar = JToolBar::getInstance('toolbar');
     if ($this->id > 0) {
         if ($this->editCopy) {
             if (JEVHelper::isEventEditor() || JEVHelper::canEditEvent($this->row)) {
                 $this->toolbarConfirmButton("icalevent.apply", JText::_("JEV_SAVE_COPY_WARNING"), 'apply', 'apply', 'JEV_SAVE', false);
             }
             //$this->toolbarConfirmButton("icalevent.savenew", JText::_("JEV_SAVE_COPY_WARNING"), 'save', 'save', 'JEV_SAVE_NEW', false);
             $this->toolbarConfirmButton("icalevent.save", JText::_("JEV_SAVE_COPY_WARNING"), 'save', 'save', 'JEV_SAVE_CLOSE', false);
         } else {
             if (JEVHelper::isEventEditor() || JEVHelper::canEditEvent($this->row)) {
                 $this->toolbarConfirmButton("icalevent.apply", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'apply', 'apply', 'JEV_SAVE', false);
             }
             //$this->toolbarConfirmButton("icalevent.savenew", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'save', 'save', 'JEV_SAVE_NEW', false);
             $this->toolbarConfirmButton("icalevent.save", JText::_("JEV_SAVE_ICALEVENT_WARNING"), 'save', 'save', 'JEV_SAVE_CLOSE', false);
         }
     } else {
         $canEditOwn = false;
         $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
         if (!$params->get("authorisedonly", 0)) {
             $juser = JFactory::getUser();
             $canEditOwn = $juser->authorise('core.edit.own', 'com_jevents');
         }
         if (JEVHelper::isEventEditor() || $canEditOwn) {
             $this->toolbarButton("icalevent.apply", 'apply', 'apply', 'JEV_SAVE', false);
         }
         //JToolBarHelper::save('icalevent.savenew', "JEV_Save_New");
         $this->toolbarButton("icalevent.save", 'save', 'save', 'JEV_SAVE_CLOSE', false);
     }
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $evedrd = $params->get("editreturnto", "day.listevents");
     if ($params->get("editpopup", 0)) {
         $document->addStyleDeclaration("div#toolbar-box{margin:10px 10px 0px 10px;} div#jevents {margin:0px 10px 10px 10px;} ");
         $this->toolbarButton("icalevent.close", 'cancel', 'cancel', 'Cancel', false);
         JRequest::setVar('tmpl', 'component');
         //force the component template
     } else {
         if ($this->id > 0) {
             $this->toolbarButton("icalrepeat.detail", 'cancel', 'cancel', 'Cancel', false);
         } else {
             $this->toolbarButton($evedrd, 'cancel', 'cancel', 'Cancel', false);
         }
     }
     // I pass in the rp_id so that I can return to the repeat I was viewing before editing
     $this->assign("rp_id", JRequest::getInt("rp_id", 0));
     $this->_adminStart();
     // load Joomla javascript classes
     JHTML::_('behavior.core');
     $this->setLayout("edit");
     JEVHelper::componentStylesheet($this, "editextra.css");
     jimport('joomla.filesystem.file');
     // Lets check if we have editted before! if not... rename the custom file.
     if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
         // It is definitely now created, lets load it!
         JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $this->setupEditForm();
     parent::displaytemplate($tpl);
     $this->_adminEnd();
 }
开发者ID:hriggs,项目名称:cs-website,代码行数:75,代码来源:view.html.php

示例14: loadCalendar

    /**
     * Loads all necessary files for and creats popup calendar link
     *
     * @static
     */
    public static function loadCalendar($fieldname, $fieldid, $value, $minyear, $maxyear, $onhidestart = "", $onchange = "", $format = 'Y-m-d')
    {
        $document = JFactory::getDocument();
        $component = "com_jevents";
        $params = JComponentHelper::getParams($component);
        $forcepopupcalendar = $params->get("forcepopupcalendar", 1);
        $offset = $params->get("com_starday", 1);
        list($yearpart, $monthpart, $daypart) = explode("-", $value);
        $value = str_replace(array("Y", "m", "d"), array($yearpart, $monthpart, $daypart), $format);
        $calendar = JevJoomlaVersion::isCompatible("3.0") ? 'calendar14.js' : 'calendar12.js';
        JEVHelper::script($calendar, "components/" . $component . "/assets/js/", true);
        JEVHelper::stylesheet("dashboard.css", "components/" . $component . "/assets/css/", true);
        $script = '
				var field' . $fieldid . '=false;
				window.addEvent(\'domready\', function() {
				if (field' . $fieldid . ') return;
				field' . $fieldid . '=true;
				new NewCalendar(
					{ ' . $fieldid . ' :  "' . $format . '"},
					{
					direction:0,
					classes: ["dashboard"],
					draggable:true,
					navigation:2,
					tweak:{x:0,y:-75},
					offset:' . $offset . ',
					range:{min:' . $minyear . ',max:' . $maxyear . '},
					readonly:' . $forcepopupcalendar . ',
					months:["' . JText::_("JEV_JANUARY") . '",
					"' . JText::_("JEV_FEBRUARY") . '",
					"' . JText::_("JEV_MARCH") . '",
					"' . JText::_("JEV_APRIL") . '",
					"' . JText::_("JEV_MAY") . '",
					"' . JText::_("JEV_JUNE") . '",
					"' . JText::_("JEV_JULY") . '",
					"' . JText::_("JEV_AUGUST") . '",
					"' . JText::_("JEV_SEPTEMBER") . '",
					"' . JText::_("JEV_OCTOBER") . '",
					"' . JText::_("JEV_NOVEMBER") . '",
					"' . JText::_("JEV_DECEMBER") . '"
					],
					days :["' . JText::_("JEV_SUNDAY") . '",
					"' . JText::_("JEV_MONDAY") . '",
					"' . JText::_("JEV_TUESDAY") . '",
					"' . JText::_("JEV_WEDNESDAY") . '",
					"' . JText::_("JEV_THURSDAY") . '",
					"' . JText::_("JEV_FRIDAY") . '",
					"' . JText::_("JEV_SATURDAY") . '"
					]
					';
        if ($onhidestart != "") {
            $script .= ',
					onHideStart : function () { ' . $onhidestart . '; },
					onHideComplete :function () { ' . $onchange . '; }';
        }
        $script .= '}
				);
			});';
        // stop same field script being loaded multiple times
        static $processedfields = array();
        if (!in_array($fieldname, $processedfields)) {
            $document->addScriptDeclaration($script);
        }
        $processedfields[] = $fieldname;
        if ($onchange != "") {
            $onchange = 'onchange="' . $onchange . '"';
        }
        echo '<input type="text" name="' . $fieldname . '" id="' . $fieldid . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '" maxlength="10" ' . $onchange . ' size="12"  />';
    }
开发者ID:madcsaba,项目名称:li-de,代码行数:74,代码来源:helper.php

示例15: translationLinks

    protected function translationLinks($row)
    {
        if ($this->languages) {
            JevHtmlBootstrap::modal();
            JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
            // Any existing translations ?
            $db = JFactory::getDbo();
            $db->setQuery("SELECT language FROM #__jevents_translation where evdet_id= " . $row->evdet_id);
            $translations = $db->loadColumn();
            // test styling for existing translation
            //$translations[] = "cy-GB";
            ?>
			<ul class="item-associations">
			<?php 
            foreach ($this->languages as $id => $item) {
                $text = strtoupper($item->sef);
                $url = JRoute::_('index.php?option=com_jevents&task=icalevent.translate&evdet_id=' . $row->evdet_id . '&ev_id=' . $row->ev_id . '&pop=1&tmpl=component&lang=' . $item->lang_code);
                $img = JHtml::_('image', 'mod_languages/' . $item->image . '.gif', $item->title, array('title' => $item->title), true);
                $url = "javascript:jevEditTranslation('" . $url . "', '" . JText::sprintf("JEV_TRANSLATE_EVENT_TO", addslashes($item->title), array('jsSafe' => true)) . "'); ";
                $tooltipParts = array($img, $item->title);
                $item->link = JHtml::_('tooltip', implode(' ', $tooltipParts), null, null, $text, $url, null, 'hasTooltip label label-association label-' . $item->sef . (in_array($item->lang_code, $translations) ? " hastranslation" : ""));
                ?>
				<li>
				<?php 
                echo $item->link;
                ?>
				</li>
			<?php 
            }
            ?>
			</ul>
		<?php 
        }
    }
开发者ID:poorgeek,项目名称:JEvents,代码行数:34,代码来源:view.html.php


注:本文中的JEVHelper::script方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。