• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FabrikHelperHTML类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: display

 /**
  * Display
  *
  * @param   string  $tmpl  Template
  *
  * @return  void
  */
 public function display($tmpl = 'default')
 {
     $srcs = FabrikHelperHTML::framework();
     $app = JFactory::getApplication();
     $input = $app->input;
     FabrikHelperHTML::script($srcs);
     $model = $this->getModel();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model->setId($input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
     $visualization = $model->getVisualization();
     $pluginParams = $model->getPluginParams();
     $pluginManager = JModelLegacy::getInstance('Pluginmanager', 'FabrikModel');
     $plugin = $pluginManager->getPlugIn($visualization->plugin, 'visualization');
     $plugin->_row = $visualization;
     if ($visualization->published == 0) {
         return JError::raiseWarning(500, FText::_('COM_FABRIK_SORRY_THIS_VISUALIZATION_IS_UNPUBLISHED'));
     }
     // Plugin is basically a model
     $pluginTask = $input->get('plugintask', 'render', 'request');
     // @FIXME cant set params directly like this, but I think plugin model setParams() is not right
     $plugin->_params = $pluginParams;
     $tmpl = $plugin->getParams()->get('calendar_layout', $tmpl);
     $plugin->{$pluginTask}($this);
     $this->plugin = $plugin;
     $viewName = $this->getName();
     $this->addTemplatePath($this->_basePath . '/plugins/' . $this->_name . '/' . $plugin->_name . '/tmpl/' . $tmpl);
     $root = $app->isAdmin() ? JPATH_ADMINISTRATOR : JPATH_SITE;
     $this->addTemplatePath($root . '/templates/' . $app->getTemplate() . '/html/com_fabrik/visualization/' . $plugin->_name . '/' . $tmpl);
     $ab_css_file = JPATH_SITE . '/plugins/fabrik_visualization/' . $plugin->_name . '/tmpl/' . $tmpl . '/template.css';
     if (JFile::exists($ab_css_file)) {
         JHTML::stylesheet('template.css', 'plugins/fabrik_visualization/' . $plugin->_name . '/tmpl/' . $tmpl . '/', true);
     }
     echo parent::display();
 }
开发者ID:ankaau,项目名称:GathBandhan,代码行数:41,代码来源:view.html.php


示例2: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 public function display($tpl = 'default')
 {
     $model = $this->getModel();
     $j3 = FabrikWorker::j3();
     $app = JFactory::getApplication();
     $input = $app->input;
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $id = $input->get('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0)));
     $model->setId($id);
     if (!$model->canView()) {
         echo FText::_('JERROR_ALERTNOAUTHOR');
         return false;
     }
     $this->id = $id;
     $this->row = $this->get('Visualization');
     $this->rows = $this->get('Rows');
     $this->containerId = $this->get('ContainerId');
     $this->calName = $this->get('VizName');
     $this->params = $model->getParams();
     $tpl = $j3 ? 'bootstrap' : $tpl;
     $this->_setPath('template', JPATH_SITE . '/plugins/fabrik_visualization/approvals/views/approvals/tmpl/' . $tpl);
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/approvals/views/approvals/tmpl/' . $tpl . '/template.css');
     $ref = $model->getJSRenderContext();
     $js = "var {$ref} = new fbVisApprovals('approvals_" . $id . "');\n";
     $js .= "Fabrik.addBlock('" . $ref . "', {$ref});\n";
     $js .= $model->getFilterJs();
     $srcs = FabrikHelperHTML::framework();
     $srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
     $srcs['Approvals'] = 'plugins/fabrik_visualization/approvals/approvals.js';
     FabrikHelperHTML::iniRequireJs($model->getShim());
     FabrikHelperHTML::script($srcs, $js);
     $text = $this->loadTemplate();
     FabrikHelperHTML::runContentPlugins($text);
     echo $text;
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:42,代码来源:view.html.php


示例3: display

    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
     *
     * @return  mixed  A string if successful, otherwise a JError object.
     */
    function display($tpl = 'default')
    {
        FabrikHelperHTML::framework();
        $app = JFactory::getApplication();
        $params = $app->getParams('com_fabrik');
        $document = JFactory::getDocument();
        $usersConfig = JComponentHelper::getParams('com_fabrik');
        $model = $this->getModel();
        $model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
        $this->row = $model->getVisualization();
        $params = $model->getParams();
        $this->assign('params', $params);
        $pluginParams = $model->getPluginParams();
        $tpl = $pluginParams->get('fb_gm_layout', $tpl);
        $tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/kaltura/views/kaltura/tmpl/' . $tpl;
        $js = <<<EOT
\t\t<script type="text/javascript" >
function entryClicked ( entry_id )
{
\twindow.location = "./player.php?entry_id=" + entry_id;
}
</script>
EOT;
        $this->assignRef('data', $this->get('Data'));
        FabrikHelperHTML::addScriptDeclaration($js);
        FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/kaltura/views/kaltura/tmpl/' . $tpl . '/template.css');
        $template = null;
        $this->assign('containerId', $this->get('ContainerId'));
        $this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
        $this->assignRef('filters', $this->get('Filters'));
        $this->_setPath('template', $tmplpath);
        echo parent::display($template);
    }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:40,代码来源:view.html.php


示例4: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 function display($tpl = 'default')
 {
     $srcs = FabrikHelperHTML::framework();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model = $this->getModel();
     $id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0)));
     $model->setId($id);
     $row = $model->getVisualization();
     if ($this->get('RequiredFiltersFound')) {
         $model->render();
     }
     $params = $model->getParams();
     $this->assign('params', $params);
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assignRef('row', $row);
     $this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
     $this->assignRef('filters', $this->get('Filters'));
     $this->assign('filterFormURL', $this->get('FilterFormURL'));
     $pluginParams = $model->getPluginParams();
     $tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/coverflow/views/coverflow/tmpl/' . $tpl;
     $this->_setPath('template', $tmplpath);
     $srcs[] = 'media/com_fabrik/js/listfilter.js';
     // Assign something to Fabrik.blocks to ensure we can clear filters
     $ref = $model->getJSRenderContext();
     $js = "{$ref} = {};";
     $js .= "\n" . "Fabrik.addBlock('{$ref}', {$ref});";
     $js .= $model->getFilterJs();
     FabrikHelperHTML::addScriptDeclaration($srcs, $js);
     echo parent::display();
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:37,代码来源:view.html.php


示例5: display

 function display($tmpl = 'default')
 {
     FabrikHelperHTML::framework();
     FabrikHelperHTML::script('media/com_fabrik/js/list.js');
     $model = $this->getModel();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
     $this->row = $model->getVisualization();
     $model->setListIds();
     if ($this->row->published == 0) {
         JError::raiseWarning(500, JText::_('JERROR_ALERTNOAUTHOR'));
         return '';
     }
     $calendar = $model->_row;
     $this->media = $model->getMedia();
     $params = $model->getParams();
     $this->assign('params', $params);
     $viewName = $this->getName();
     $pluginManager = FabrikWorker::getPluginManager();
     $plugin = $pluginManager->getPlugIn('media', 'visualization');
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
     $this->assignRef('filters', $this->get('Filters'));
     $this->assign('params', $model->getParams());
     $pluginParams = $model->getPluginParams();
     $tmpl = $pluginParams->get('media_layout', $tmpl);
     $tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/media/views/media/tmpl/' . $tmpl;
     $this->_setPath('template', $tmplpath);
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/media/views/media/tmpl/' . $tmpl . '/template.css');
     echo parent::display();
 }
开发者ID:romuland,项目名称:khparts,代码行数:31,代码来源:view.html.php


示例6: framework

 /**
  * Method to load the MooTools framework into the document head
  *
  * If debugging mode is on an uncompressed version of MooTools is included for easier debugging.
  *
  * @param   string   $extras  MooTools file to load
  * @param   boolean  $debug   Is debugging mode on? [optional]
  *
  * @return  void
  *
  * @since   11.1
  */
 public static function framework($extras = false, $debug = null)
 {
     // $$$ rob this is to stop mootools from being re-loaded when in an ajax loaded page, as that
     // resets the window events, stopping Fabriks mediator js system from working (e.g. fabrik.form.submitted will not
     // fire the events added when the url initially loads.)
     if (FabrikHelperHTML::inAjaxLoadedPage()) {
         return;
     }
     static $loaded = array();
     $type = $extras ? 'more' : 'core';
     // Only load once
     if (!empty($loaded[$type])) {
         return;
     }
     JHtml::core($debug);
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = $config->get('debug');
     }
     $uncompressed = $debug ? '-uncompressed' : '';
     if ($type != 'core' && empty($loaded['core'])) {
         self::framework(false, $debug);
     }
     JHtml::_('script', 'system/mootools-' . $type . $uncompressed . '.js', false, true, false, false);
     $loaded[$type] = true;
     return;
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:40,代码来源:behavior.php


示例7: display

 function display($tmpl = 'default')
 {
     FabrikHelperHTML::packageJS();
     $model =& $this->getModel();
     $usersConfig =& JComponentHelper::getParams('com_fabrik');
     $model->setId(array('id' => JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))), 'package_id' => JRequest::getVar('package_id')));
     $visualization =& $model->getVisualization();
     $pluginParams =& $model->getPluginParams();
     $pluginManager =& JModel::getInstance('Pluginmanager', 'FabrikModel');
     $plugin =& $pluginManager->getPlugIn($visualization->plugin, 'visualization');
     $plugin->_row = $visualization;
     if ($visualization->state == 0) {
         return JError::raiseWarning(500, JText::_('SORRY THIS VISUALIZATION IS UNPUBLISHED'));
     }
     //plugin is basically a model
     $pluginTask = JRequest::getVar('plugintask', 'render', 'request');
     $plugin->_params = $pluginParams;
     $tmpl = $plugin->getParams()->get('calendar_layout', $tmpl);
     $plugin->{$pluginTask}($this);
     $this->plugin =& $plugin;
     $viewName = $this->getName();
     $this->_setPath('template', $this->_basePath . DS . 'plugins' . DS . $this->_name . DS . $plugin->_name . DS . 'tmpl' . DS . $tmpl);
     $ab_css_file = JPATH_SITE . "/components/com_fabrik/plugins/" . $viewName . "/" . $plugin->_name . "/tmpl/{$tmpl}/template.css";
     if (file_exists($ab_css_file)) {
         JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/' . $viewName . '/' . $plugin->_name . '/tmpl/' . $tmpl . '/', true);
     }
     $model->getCustomJsAction();
     if (isset($this->_isMambot) && $this->_isMambot) {
         return $this->loadTemplate();
     } else {
         parent::display();
     }
 }
开发者ID:nikshade,项目名称:fabrik21,代码行数:33,代码来源:view.html.php


示例8: dolist

 /**
  * list of items
  *
  * @return  null
  */
 public function dolist()
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $db = FabrikWorker::getDbo(true);
     $query = $db->getQuery(true);
     $list = $input->get('list', 'form');
     $selected = $input->get('selected');
     $query->select('id, label')->from('#__fabrik_' . $list . 's');
     if ($selected != '') {
         // $query->where('id NOT IN ('.$selected.')');
     }
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     echo "<ul id=\"{$list}-additems\">";
     if (empty($rows)) {
         echo "<li>" . JText::sprintf('COM_FABRIK_NO_FREE_ITEMS_FOUND') . "</li>";
     } else {
         foreach ($rows as $row) {
             echo "<li><a href=\"#\" id=\"{$row->id}\">{$row->label}</a>";
         }
     }
     echo "</ul>";
     $script = "\$('{$list}-additems').getElements('a').addEvent('click', function(e){\n\t\t\tFabrik.fireEvent('fabrik.package.item.selected', [e]);\n\t\t});";
     FabrikHelperHTML::addScriptDeclaration($script);
 }
开发者ID:LGBGit,项目名称:tierno,代码行数:31,代码来源:package.raw.php


示例9: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     FabrikHelperHTML::framework();
     if ($this->getLayout() == 'confirmupdate') {
         $this->confirmupdate();
         return;
     }
     require_once JPATH_COMPONENT . '/helpers/adminhtml.php';
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->pluginFields = $this->get('PluginHTML');
     $this->js = $this->get('Js');
     $this->jsevents = $this->get('JsEvents');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     //used for js part of form
     if ($this->item->id == 0) {
         $this->elements = array(JText::_('COM_FABRIK_AVAILABLE_AFTER_SAVE'));
     } else {
         $this->elements = $this->get('Elements');
     }
     $this->assign('parent', $this->get('Parent'));
     parent::display($tpl);
 }
开发者ID:juliano-hallac,项目名称:fabrik,代码行数:33,代码来源:view.html.php


示例10: elementJavascript

 /**
  * Returns javascript which creates an instance of the class defined in formJavascriptClass()
  *
  * @param   int $repeatCounter Repeat group counter
  *
  * @return  array
  */
 public function elementJavascript($repeatCounter)
 {
     if (!$this->isEditable()) {
         return array();
     }
     FabrikHelperHTML::addPath(COM_FABRIK_BASE . 'plugins/fabrik_element/colourpicker/images/', 'image', 'form', false);
     $params = $this->getParams();
     $id = $this->getHTMLId($repeatCounter);
     $data = $this->getFormModel()->data;
     $value = $this->getValue($data, $repeatCounter);
     if ($value == 'none') {
         $value = '';
     }
     $vars = explode(",", $value);
     $vars = array_pad($vars, 3, 0);
     $opts = $this->getElementJSOptions($repeatCounter);
     $c = new stdClass();
     // 14/06/2011 changed over to color param object from ind colour settings
     $c->red = (int) $vars[0];
     $c->green = (int) $vars[1];
     $c->blue = (int) $vars[2];
     $opts->colour = $c;
     $opts->value = $vars;
     $opts->showPicker = (bool) $params->get('show_picker', 1);
     $opts->swatchSizeWidth = $params->get('swatch_size_width', '10px');
     $opts->swatchSizeHeight = $params->get('swatch_size_height', '10px');
     $opts->swatchWidth = $params->get('swatch_width', '160px');
     $swatch = $params->get('colourpicker-swatch', 'default.js');
     $swatchFile = JPATH_SITE . '/plugins/fabrik_element/colourpicker/swatches/' . $swatch;
     $opts->swatch = json_decode(file_get_contents($swatchFile));
     return array('ColourPicker', $id, $opts);
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:39,代码来源:colourpicker.php


示例11: loadJavascriptClass_result

 /**
  * Get the src(s) for the list plugin js class
  *
  * @return  mixed  string or array
  */
 public function loadJavascriptClass_result()
 {
     $mediaFolder = FabrikHelperHTML::getMediaFolder();
     $src = parent::loadJavascriptClass_result();
     $src['element'] = $mediaFolder . '/element.js';
     return $src;
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:12,代码来源:order.php


示例12: display

 function display($tmpl = 'default')
 {
     JHTML::_('behavior.calendar');
     FabrikHelperHTML::script('media/com_fabrik/js/list.js', true);
     require_once COM_FABRIK_FRONTEND . DS . 'helpers' . DS . 'html.php';
     FabrikHelperHTML::mocha();
     FabrikHelperHTML::loadCalendar();
     $model =& $this->getModel();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
     $this->row =& $model->getVisualization();
     $model->setListIds();
     if ($this->row->published == 0) {
         JError::raiseWarning(500, JText::_('ALERTNOTAUTH'));
         return '';
     }
     $calendar =& $model->_row;
     $this->media = $model->getMedia();
     $viewName = $this->getName();
     $pluginManager =& JModel::getInstance('Pluginmanager', 'FabrikFEModel');
     $plugin =& $pluginManager->getPlugIn('calendar', 'visualization');
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
     $this->assignRef('filters', $this->get('Filters'));
     $pluginParams =& $model->getPluginParams();
     $tmpl = $pluginParams->get('media_layout', $tmpl);
     $tmplpath = JPATH_ROOT . DS . 'plugins' . DS . 'fabrik_visualization' . DS . 'media' . DS . 'views' . DS . 'media' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     $ab_css_file = $tmplpath . DS . "template.css";
     if (JFile::exists($ab_css_file)) {
         JHTML::stylesheet('plugins/fabrik_visualization/media/views/media/tmpl/' . $tmpl . '/template.css');
     }
     echo parent::display();
 }
开发者ID:juliano-hallac,项目名称:fabrik,代码行数:34,代码来源:view.html.php


示例13: getBottomContent

    /**
     * Sets up HTML to be injected into the form's bottom
     *
     * @param   object  $params     params
     * @param   object  $formModel  form model
     *
     * @return void
     */
    public function getBottomContent($params, $formModel)
    {
        $user = JFactory::getUser();
        if ($user->get('id') == 0) {
            $this->html = JText::_('PLG_CRON_NOTIFICATION_SIGN_IN_TO_RECEIVE_NOTIFICATIONS');
            return;
        }
        if ($params->get('send_mode') == '1') {
            return;
        }
        $opts = new stdClass();
        $opts->listid = $formModel->getListModel()->getId();
        $opts->formid = $formModel->getId();
        $opts->rowid = $formModel->_rowId;
        $opts->senderBlock = JRequest::getCmd('view') == 'form' ? 'form_' : 'details_';
        $opts->senderBlock .= $formModel->getId();
        $opts = json_encode($opts);
        $id = uniqid('fabrik_notification');
        if ($params->get('notification_ajax', 0) == 1) {
            FabrikHelperHTML::script('components/com_fabrik/plugins/form/notification/notify.js');
            $script = "head.ready(function() {\n\t\t\t\tvar notify = new Notify('{$id}', {$opts});\n \t\t\t});";
            FabrikHelperHTML::addScriptDeclaration($script);
        }
        // See if the checkbox should be checked
        $db = FabrikWorker::getDbo();
        $ref = $this->getRef($formModel->getListModel()->getId());
        $query = $db->getQuery(true);
        $query->select('COUNT(id)')->from('#__{package}_notification')->where('user_id = ' . (int) $user->get('id') . ' AND reference = ' . $ref);
        $db->setQuery($query);
        $found = $db->loadResult();
        $checked = $found ? 'checked="checked"' : '';
        $this->html = '
		<label><input id="' . $id . '" ' . $checked . ' type="checkbox" name="fabrik_notification" class="input" value="1"  />
		 ' . JText::_('PLG_CRON_NOTIFICATION_NOTIFY_ME') . '</label>';
    }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:43,代码来源:notification.php


示例14: display

 function display($tmpl = 'default')
 {
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model = $this->getModel();
     $id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0)));
     $model->setId($id);
     $row =& $model->getVisualization();
     $model->setListIds();
     if ($this->get('RequiredFiltersFound')) {
         $model->render();
     }
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assignRef('row', $row);
     $this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
     $this->assignRef('filters', $this->get('Filters'));
     $this->assign('filterFormURL', $this->get('FilterFormURL'));
     $pluginParams =& $model->getPluginParams();
     $this->assignRef('params', $pluginParams);
     $tmplpath = JPATH_ROOT . DS . 'plugins' . DS . 'fabrik_visualization' . DS . 'coverflow' . DS . 'views' . DS . 'coverflow' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     FabrikHelperHTML::script('table.js', 'media/com_fabrik/js/', true);
     //ensure we don't have an incorrect version of mootools loaded
     JHTML::stylesheet('media/com_fabrik/css/table.css');
     FabrikHelperHTML::script('media/com_fabrik/js/list.js', true);
     //assign something to Fabrik.blocks to ensure we can clear filters
     $str = "head.ready(function() {\r\n\t\t\tfabrikChart{$this->row->id} = {};";
     $str .= "\n" . "Fabrik.addBlock('vizualization_{$this->row->id}', fabrikChart{$this->row->id});\r\n\t\t});";
     FabrikHelperHTML::addScriptDeclaration($str);
     echo parent::display();
 }
开发者ID:juliano-hallac,项目名称:fabrik,代码行数:30,代码来源:view.html.php


示例15: display

 /**
  * Display
  *
  * @param   string  $tpl  Template
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     FabrikHelperHTML::framework();
     $app = JFactory::getApplication();
     $input = $app->input;
     $state = $this->get('State');
     $item = $this->get('Item');
     $document = JFactory::getDocument();
     $srcs = array('media/com_fabrik/js/icons.js', 'media/com_fabrik/js/icongen.js', 'media/com_fabrik/js/canvas.js', 'media/com_fabrik/js/history.js', 'media/com_fabrik/js/keynav.js', 'media/com_fabrik/js/tabs.js', 'media/com_fabrik/js/pages.js', 'media/com_fabrik/js/frontpackage.js');
     FabrikHelperHTML::script($srcs);
     FabrikHelperHTML::stylesheet('media/com_fabrik/css/package.css');
     $canvas = $item->params->get('canvas');
     // $$$ rob 08/11/2011 test if component name set but still rendering
     // in option=com_fabrik then we should use fabrik as the package
     if ($input->get('option') === 'com_fabrik') {
         $item->component_name = 'fabrik';
     }
     $opts = JArrayHelper::getvalue($canvas, 'options', array());
     $tabs = JArrayHelper::getValue($canvas, 'tabs', array('Page 1'));
     $tabs = json_encode($tabs);
     $d = new stdClass();
     $layout = JArrayHelper::getValue($canvas, 'layout', $d);
     $layout = json_encode(JArrayHelper::getValue($canvas, 'layout', $d));
     $id = $this->get('State')->get('package.id');
     $script = "window.addEvent('fabrik.loaded', function() {\n\t\t\tnew FrontPackage({\n\t\ttabs : {$tabs},\n\t\ttabelement : 'packagemenu',\n\t\tpagecontainer : 'packagepages',\n\t\tlayout: {$layout},\n\t\t'packageId': {$id},\n\t\t'package':'{$item->component_name}'\n\t});\n\t\t});";
     FabrikHelperHTML::addScriptDeclaration($script);
     // Force front end templates
     $this->_basePath = COM_FABRIK_FRONTEND . '/views';
     $tmpl = !isset($item->template) ? 'default' : $item->template;
     $this->addTemplatePath($this->_basePath . '/' . $this->_name . '/tmpl/' . $tmpl);
     $text = $this->loadTemplate();
     FabrikHelperHTML::runConentPlugins($text);
     echo $text;
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:41,代码来源:view.html.php


示例16: loadJavascriptInstance

 /**
  * return the javascript to create an instance of the class defined in formJavascriptClass
  * @param object parameters
  * @param object table model
  * @param array [0] => string table's form id to contain plugin
  * @return bool
  */
 function loadJavascriptInstance($params, $model, $args)
 {
     if (!$this->canUse()) {
         return;
     }
     $form_id = $args[0];
     FabrikHelperHTML::script('element.js', 'media/com_fabrik/js/');
     $orderEl = $model->getForm()->getElement($params->get('order_element'), true);
     $opts = new stdClass();
     $opts->enabled = count($model->orderEls) === 1 && FabrikString::safeColNameToArrayKey($model->orderEls[0]) == FabrikString::safeColNameToArrayKey($orderEl->getOrderByName()) ? true : false;
     $opts->liveSite = COM_FABRIK_LIVESITE;
     $opts->tableid = $model->_id;
     $opts->orderElementId = $params->get('order_element');
     $opts->handle = $params->get('order_element_as_handle', 1) == 1 ? '.fabrik_row___' . $orderEl->getOrderByName() : false;
     $opts->direction = $opts->enabled ? $model->orderDirs[0] : '';
     $opts->transition = '';
     $opts->duration = '';
     $opts->constrain = '';
     $opts->clone = '';
     $opts->revert = '';
     $opts->container = 'table_' . $model->getTable()->id;
     $opts = json_encode($opts);
     $lang = $this->_getLang();
     $lang = json_encode($lang);
     $this->jsInstance = "new FbTableOrder('{$form_id}', {$opts}, {$lang})";
     return true;
 }
开发者ID:nikshade,项目名称:fabrik21,代码行数:34,代码来源:order.php


示例17: loadJavascriptInstance

 /**
  * return the javascript to create an instance of the class defined in formJavascriptClass
  * @param object parameters
  * @param object table model
  * @param array [0] => string table's form id to contain plugin
  * @return bool
  */
 function loadJavascriptInstance($params, $model, $args)
 {
     $form_id = $args[0];
     $js = trim($params->get('table_js_code'));
     if ($js !== '') {
         FabrikHelperHTML::addScriptDeclaration($js);
     }
     $this->jsInstance = '';
     //script
     $script = $params->get('table_js_file');
     if ($script == '-1') {
         return;
     }
     $className = substr($script, 0, strlen($script) - 3);
     $document =& JFactory::getDocument();
     $id =& $model->getTable()->id;
     $container = 'oTable';
     if (JRequest::getVar('tmpl') != 'component') {
         FabrikHelperHTML::script($script, 'components/com_fabrik/plugins/table/tablejs/scripts/');
     } else {
         // included scripts in the head don't work in mocha window
         // read in the class and insert it into the body as an inline script
         $class = JFile::read(JPATH_BASE . "/components/com_fabrik/plugins/table/tablejs/scripts/{$script}");
         // $$$ rob dont want/need to delay the loading of the class
         //FabrikHelperHTML::addScriptDeclaration($class);
         $document =& JFactory::getDocument();
         $document->addScriptDeclaration($class);
     }
     $this->jsInstance = "new {$className}({$container}{$id})";
     return true;
 }
开发者ID:nikshade,项目名称:fabrik21,代码行数:38,代码来源:tablejs.php


示例18: getBottomContent

	/**
	 * set up the html to be injected into the bottom of the form
	 *
	 * @param object $params (no repeat counter stuff needed here as the plugin manager
	 * which calls this function has already done the work for you
	 */

	function getBottomContent(&$params, &$formModel)
	{
		$user = JFactory::getUser();
		if ($user->get('id') == 0) {
			$this->html = JText::_('PLG_CRON_NOTIFICATION_SIGN_IN_TO_RECEIVE_NOTIFICATIONS');
			return;
		}
		$opts = new stdClass();
		$opts->listid = $formModel->getListModel()->_id;
		$opts->fabrik = $formModel->_id;
		$opts->rowid = $formModel->_rowId;
		$opts->senderBlock = JRequest::getCmd('view') == 'form' ? 'form_' : 'details_';
		$opts->senderBlock .= $formModel->_id;
		$opts = json_encode($opts);
		$id = uniqid('fabrik_notification');
		if ($params->get('notification_ajax', 0) == 1) {
			FabrikHelperHTML::script('components/com_fabrik/plugins/form/fabriknotification/javascript.js', true);
			$script = "head.ready(function() {
				var notify = new Notify('$id', $opts);
 			});";

			FabrikHelperHTML::addScriptDeclaration($script);
		}
		//see if the checkbox should be checked
		$db = FabrikWorker::getDbo();
		$ref =$this->getRef($formModel->getListModel()->_id);
		$db->setQuery("SELECT COUNT(id) FROM #__{package}_notification WHERE user_id = ".(int)$user->get('id') . " AND reference = $ref");
		$found = $db->loadResult();
		$checked = $found ? "checked=\"checked\"" : "";
		$this->html = "
		<label><input id=\"$id\" $checked type=\"checkbox\" name=\"fabrik_notification\" class=\"input\" value=\"1\"  />
		 ".JText::_('PLG_CRON_NOTIFICATION_NOTIFY_ME') . "</label>";
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:40,代码来源:notification.php


示例19: getInput

 /**
  * Get the input
  *
  * @return  string  HTML output
  */
 protected function getInput()
 {
     $from = $this->id . '-from';
     $add = $this->id . '-add';
     $remove = $this->id . '-remove';
     $up = $this->id . '-up';
     $down = $this->id . '-down';
     $script = "swaplist = new SwapList('{$from}', '{$this->id}','{$add}', '{$remove}', '{$up}', '{$down}');";
     FabrikHelperHTML::script('administrator/components/com_fabrik/models/fields/swaplist.js', $script);
     list($this->currentGroups, $this->currentGroupList) = $this->getCurrentGroupList();
     list($this->groups, $this->groupList) = $this->getGroupList();
     $str = '';
     $checked = empty($this->current_groups) ? 'checked="checked"' : '';
     if (empty($this->groups) && empty($this->currentGroups)) {
         return JText::_('COM_FABRIK_NO_GROUPS_AVAILABLE');
     } else {
         $str .= '<input type="text" readonly="readonly" class="readonly" style="clear:left" size="44" value="' . JText::_('COM_FABRIK_AVAILABLE_GROUPS') . ':" />';
         $str .= $this->groupList;
         $str .= '<input class="button" type="button" id="' . $this->id . '-add" value="' . JText::_('COM_FABRIK_ADD') . '" />';
         $str .= '<input type="text" readonly="readonly" class="readonly" style="clear:left" size="44" value="' . JText::_('COM_FABRIK_CURRENT_GROUPS') . ':" />';
         $str .= $this->currentGroupList;
         $str .= '<input class="button" type="button" value="' . JText::_('COM_FABRIK_UP') . '" id="' . $this->id . '-up" />';
         $str .= '<input class="button" type="button" value="' . JText::_('COM_FABRIK_DOWN') . '" id="' . $this->id . '-down" />';
         $str .= '<input class="button" type="button" value="' . JText::_('COM_FABRIK_REMOVE') . '" id="' . $this->id . '-remove"/>';
         return $str;
     }
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:32,代码来源:swaplist.php


示例20: display

 function display($tmpl = 'default')
 {
     FabrikHelperHTML::packageJS();
     $usersConfig =& JComponentHelper::getParams('com_fabrik');
     $model = $this->getModel();
     $id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0)));
     $model->setId($id);
     $row =& $model->getVisualization();
     $model->setTableIds();
     if ($this->get('RequiredFiltersFound')) {
         $model->render();
     }
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assignRef('row', $row);
     $this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
     $this->assignRef('filters', $this->get('Filters'));
     $this->assign('filterFormURL', $this->get('FilterFormURL'));
     $pluginParams =& $model->getPluginParams();
     $this->assignRef('params', $pluginParams);
     $tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'coverflow' . DS . 'views' . DS . 'coverflow' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     //ensure we don't have an incorrect version of mootools loaded
     JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
     FabrikHelperHTML::script('table.js', 'media/com_fabrik/js/', true);
     //check and add a general fabrik custom css file overrides template css and generic table css
     FabrikHelperHTML::stylesheetFromPath("media" . DS . "com_fabrik" . DS . "css" . DS . "custom.css");
     //check and add a specific biz  template css file overrides template css generic table css and generic custom css
     FabrikHelperHTML::stylesheetFromPath("components" . DS . "com_fabrik" . DS . "plugins" . DS . "visualization" . DS . "coverflow" . DS . "views" . DS . "coverflow" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
     FabrikHelperHTML::cleanMootools();
     //assign something to oPackage to ensure we can clear filters
     $str = "window.addEvent('domready', function(){\n\t\t\tfabrikChart{$this->row->id} = {};";
     $str .= "\n" . "oPackage.addBlock('vizualization_{$this->row->id}', fabrikChart{$this->row->id});\n\t\t});";
     FabrikHelperHTML::addScriptDeclaration($str);
     echo parent::display();
 }
开发者ID:nikshade,项目名称:fabrik21,代码行数:35,代码来源:view.html.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FabrikString类代码示例发布时间:2022-05-23
下一篇:
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap