當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FabrikHelperHTML::cleanMootools方法代碼示例

本文整理匯總了PHP中FabrikHelperHTML::cleanMootools方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::cleanMootools方法的具體用法?PHP FabrikHelperHTML::cleanMootools怎麽用?PHP FabrikHelperHTML::cleanMootools使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FabrikHelperHTML的用法示例。


在下文中一共展示了FabrikHelperHTML::cleanMootools方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: display

 function display($tmpl = 'default')
 {
     $model =& $this->getModel();
     $document =& JFactory::getDocument();
     $renderOrder = JRequest::getInt('renderOrder');
     $usersConfig =& JComponentHelper::getParams('com_fabrik');
     $tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'table' . DS . 'emailtable' . DS . 'views' . DS . 'popupwin' . DS . 'tmpl';
     $this->_setPath('template', $tmplpath);
     $this->assign('fieldList', $this->get('ToField'));
     $records = $this->get('records');
     if (count($records) == 0) {
         JError::raiseNotice(500, 'None of the selected records can be emailed');
         return;
     }
     $this->assign('recordcount', count($records));
     $this->assign('renderOrder', $renderOrder);
     $this->assign('recordids', implode(',', $records));
     $this->assign('tableid', $this->get('id', 'table'));
     $this->assign('showSubject', $this->get('showSubject'));
     $this->assign('subject', $this->get('subject'));
     $this->assign('message', $this->get('message'));
     $this->assign('allowAttachment', $this->get('allowAttachment'));
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     if ($this->_isMambot) {
         return $this->loadTemplate();
     } else {
         parent::display();
     }
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:30,代碼來源:view.html.php

示例3: 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();
     $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 . 'timeline' . DS . 'views' . DS . 'timeline' . 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 . "timeline" . DS . "views" . DS . "timeline" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
     FabrikHelperHTML::cleanMootools();
     echo parent::display();
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:29,代碼來源:view.html.php

示例4: display

 function display($tmpl = 'default')
 {
     JHTML::_('behavior.calendar');
     FabrikHelperHTML::packageJS();
     FabrikHelperHTML::script('table.js', 'media/com_fabrik/js/');
     FabrikHelperHTML::script('advanced-search.js', 'media/com_fabrik/js/');
     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->setTableIds();
     if ($this->row->state == 0) {
         JError::raiseWarning(500, JText::_('ALERTNOTAUTH'));
         return '';
     }
     $calendar =& $model->_row;
     $this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
     if ($this->requiredFiltersFound) {
         $this->assign('chart', $this->get('Chart'));
     } else {
         $this->assign('chart', '');
     }
     $viewName = $this->getName();
     $pluginManager =& JModel::getInstance('Pluginmanager', 'FabrikModel');
     $plugin =& $pluginManager->getPlugIn('calendar', 'visualization');
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assignRef('filters', $this->get('Filters'));
     $this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
     $this->assign('filterFormURL', $this->get('FilterFormURL'));
     $pluginParams =& $model->getPluginParams();
     $this->assignRef('params', $pluginParams);
     JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
     $tmpl = $pluginParams->get('chart_layout', $tmpl);
     $tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'chart' . DS . 'views' . DS . 'chart' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     $ab_css_file = $tmplpath . DS . "template.css";
     if (JFile::exists($ab_css_file)) {
         JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/visualization/chart/views/chart/tmpl/' . $tmpl . '/', 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 . "chart" . DS . "views" . DS . "chart" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
     //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);
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     echo parent::display();
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:54,代碼來源:view.html.php

示例5: display

 function display($tmpl = 'default')
 {
     $this->assignRef('rows', $this->get('UserNotifications'));
     $viewName = $this->getName();
     $tmplpath = JPATH_ROOT . DS . 'fabrik_cron' . DS . 'notification' . DS . 'views' . DS . 'cronnotification' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     $ab_css_file = $tmplpath . DS . "template.css";
     if (JFile::exists($ab_css_file)) {
         JHTML::stylesheet('template.css', '/plugins/fabrik_cron/notification/views/cronnotification/tmpl/' . $tmpl . '/', true);
     }
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     echo parent::display();
 }
開發者ID:juliano-hallac,項目名稱:fabrik,代碼行數:14,代碼來源:view.html.php

示例6: display

    function display($tmpl = 'default')
    {
        $app =& JFactory::getApplication();
        FabrikHelperHTML::packageJS();
        $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();
        $this->params =& $model->getParams();
        $pluginParams =& $model->getPluginParams();
        $this->assignRef('params', $pluginParams);
        $tmpl = $pluginParams->get('fb_gm_layout', $tmpl);
        $tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'visualization' . DS . 'kaltura' . DS . 'views' . DS . 'kaltura' . DS . 'tmpl' . DS . $tmpl;
        $js = <<<EOT
\t\t<script type="text/javascript" >
function entryClicked ( entry_id )
{
\twindow.location = "./player.php?entry_id=" + entry_id;
}
</script>
EOT;
        JHTML::stylesheet('table.css', 'media/com_fabrik/css/');
        $this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
        if ($this->requiredFiltersFound) {
            $this->assignRef('data', $this->get('Data'));
        } else {
            $this->assignRef('data', '');
        }
        FabrikHelperHTML::addScriptDeclaration($js);
        $ab_css_file = $tmplpath . DS . "template.css";
        if (JFile::exists($ab_css_file)) {
            JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/visualization/googlemap/views/googlemap/tmpl/' . $tmpl . '/', 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 . "kaltura" . DS . "views" . DS . "kaltura" . DS . "tmpl" . DS . $tmpl . DS . "custom.css");
        $template = null;
        $this->assign('containerId', $this->get('ContainerId'));
        $this->assign('showFilters', JRequest::getInt('showfilters', 1) === 1 ? 1 : 0);
        $this->assignRef('filters', $this->get('Filters'));
        $this->assign('filterFormURL', $this->get('FilterFormURL'));
        $this->_setPath('template', $tmplpath);
        //ensure we don't have an incorrect version of mootools loaded
        FabrikHelperHTML::cleanMootools();
        echo parent::display($template);
    }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:49,代碼來源:view.html.php

示例7: display

 function display($tmpl = 'default')
 {
     $model =& $this->getModel();
     $this->assignRef('data', $this->get('Pivot'));
     $this->assign('heading', $this->get('Heading'));
     $tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'table' . DS . 'pivot' . DS . 'views' . DS . 'pivotpopupwin' . DS . 'tmpl';
     $this->_setPath('template', $tmplpath);
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     if ($this->_isMambot) {
         return $this->loadTemplate();
     } else {
         parent::display();
     }
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:15,代碼來源:view.html.php

示例8: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     static $fabrikelements;
     if (!isset($fabrikelements)) {
         $fabrikelements = array();
     }
     FabrikHelperHTML::script('element.js', 'administrator/components/com_fabrik/elements/', true);
     $document =& JFactory::getDocument();
     $c = ElementHelper::getRepeatCounter($this);
     $conn = $c === false || $node->attributes('connection_in_repeat') == 'false' ? $node->attributes('connection') : $node->attributes('connection') . '-' . $c;
     $table = $node->attributes('table');
     $include_calculations = (int) $node->attributes('include_calculations', 0);
     $published = (int) $node->attributes('published', 0);
     $showintable = (int) $node->attributes('showintable', 0);
     if ($include_calculations != 1) {
         $include_calculations = 0;
     }
     $cnns = array(JHTML::_('select.option', '-1', JText::_('COM_FABRIK_PLEASE_SELECT')));
     $id = ElementHelper::getId($this, $control_name, $name);
     $fullName = ElementHelper::getFullName($this, $control_name, $name);
     $repeat = ElementHelper::getRepeat($this);
     if (!array_key_exists($id, $fabrikelements)) {
         $script = "window.addEvent('domready', function() {\n";
         $opts = new stdClass();
         $opts->table = $c === false ? 'params' . $table : 'params' . $table . "-" . $c;
         $opts->published = $published;
         $opts->showintable = $showintable;
         $opts->excludejoined = (int) $node->attributes('excludejoined', 0);
         $opts->livesite = COM_FABRIK_LIVESITE;
         $opts->conn = 'params' . $conn;
         $opts->value = $value;
         $opts->include_calculations = $include_calculations;
         $opts = FastJSON::encode($opts);
         $script .= "var p = new elementElement('{$id}', {$opts});\n";
         $script .= "Fabrik.adminElements.set('{$id}', p);\n";
         $script .= "});\n";
         $document->addScriptDeclaration($script);
         $fabrikelements[$id] = true;
     }
     FabrikHelperHTML::cleanMootools();
     $return = JHTML::_('select.genericlist', $cnns, $fullName, 'class="inputbox element"', 'value', 'text', $value, $id);
     $return .= '<img style="margin-left:10px;display:none" id="' . $id . '_loader" src="components/com_fabrik/images/ajax-loader.gif" alt="' . JText::_('LOADING') . '" />';
     return $return;
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:44,代碼來源:element.php

示例9: display

 function display($tmpl = 'default')
 {
     $this->assignRef('rows', $this->get('UserNotifications'));
     $viewName = $this->getName();
     $tmplpath = COM_FABRIK_FRONTEND . DS . 'plugins' . DS . 'cron' . DS . 'cronnotification' . DS . 'views' . DS . 'cronnotification' . DS . 'tmpl' . DS . $tmpl;
     $this->_setPath('template', $tmplpath);
     $ab_css_file = $tmplpath . DS . "template.css";
     if (file_exists($ab_css_file)) {
         JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/cron/cronnotification/views/cronnotification/tmpl/' . $tmpl . '/', true);
     }
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     // $$$ hugh @TODO - _isMambot ain't defined?
     if ($this->_isMambot) {
         return $this->loadTemplate();
     } else {
         parent::display();
     }
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:19,代碼來源:view.html.php

示例10: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     static $fabriktables;
     if (!isset($fabriktables)) {
         $fabriktables = array();
     }
     FabrikHelperHTML::script('fabriktables.js', 'administrator/components/com_fabrik/elements/', true);
     $connectionDd = $node->attributes('observe', '');
     $db =& JFactory::getDBO();
     $document =& JFactory::getDocument();
     $c = ElementHelper::getRepeatCounter($this);
     $repeat = ElementHelper::getRepeat($this);
     $id = ElementHelper::getId($this, $control_name, $name);
     $fullName = ElementHelper::getFullName($this, $control_name, $name);
     if ($connectionDd == '') {
         //we are not monitoring a connection drop down so load in all tables
         $query = "SELECT id AS value, label AS `{$name}` FROM #__fabrik_tables order by label ASC";
         $db->setQuery($query);
         $rows = $db->loadObjectList();
     } else {
         $rows = array(JHTML::_('select.option', '', JText::_('SELECT A CONNECTION FIRST'), 'value', $name));
     }
     if ($connectionDd != '' && !array_key_exists($id, $fabriktables)) {
         $connectionDd = $c === false || $node->attributes('connection_in_repeat') == 'false' ? $connectionDd : $connectionDd . '-' . $c;
         $opts = new stdClass();
         $opts->livesite = COM_FABRIK_LIVESITE;
         $opts->conn = 'params' . $connectionDd;
         $opts->value = $value;
         $opts->connInRepeat = $node->attributes('connection_in_repeat');
         $opts = FastJSON::encode($opts);
         $script = "window.addEvent('domready', function() {\n";
         $script .= "var p = new fabriktablesElement('{$id}', {$opts});\n";
         $script .= "tableElements.set('{$id}', p);\n";
         $script .= "Fabrik.adminElements.set('{$id}', p);\n";
         $script .= "});\n";
         $document->addScriptDeclaration($script);
         $fabriktables[$id] = true;
     }
     FabrikHelperHTML::cleanMootools();
     $str = JHTML::_('select.genericlist', $rows, $fullName, 'class="inputbox fabriktables"', 'value', $name, $value, $id);
     $str .= "<img style=\"margin-left:10px;display:none\" id=\"" . $id . "_loader\" src=\"components/com_fabrik/images/ajax-loader.gif\" alt=\"" . JText::_('LOADING') . "\" />";
     return $str;
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:43,代碼來源:fabriktables.php

示例11: display

 function display($tmpl = 'default')
 {
     FabrikHelperHTML::debug($this, 'view');
     $records = JRequest::getVar('ids', array());
     $renderOrder = JRequest::getVar('renderOrder');
     $tableid = JRequest::getVar('id', 0);
     $this->assign('recordcount', count($records));
     $this->assign('renderOrder', $renderOrder);
     $this->assign('recordids', implode(',', $records));
     $this->assign('tableid', $tableid);
     $this->assign('fieldList', $this->get('ElementList', 'form'));
     JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/table/emailtableplus/views/emailtableplus/tmpl/', true);
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     if ($this->_isMambot) {
         return $this->loadTemplate();
     } else {
         parent::display();
     }
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:20,代碼來源:view.html.php

示例12: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     FabrikHelperHTML::script('tables.js', 'administrator/components/com_fabrik/elements/', true);
     $connectionDd = $node->attributes('observe', '');
     $db =& JFactory::getDBO();
     $document =& JFactory::getDocument();
     $repeat = ElementHelper::getRepeat($this);
     $id = ElementHelper::getId($this, $control_name, $name);
     $fullName = ElementHelper::getFullName($this, $control_name, $name);
     $c = ElementHelper::getRepeatCounter($this);
     if ($connectionDd == '') {
         //we are not monitoring a connection drop down so load in all tables
         $query = "SHOW TABLES";
         $db->setQuery($query);
         $list = $db->loadResultArray();
         foreach ($list as $l) {
             $rows[] = JHTML::_('select.option', $l, $l);
         }
     } else {
         $rows = array(JHTML::_('select.option', '', JText::_('SELECT A CONNECTION FIRST')));
     }
     if ($connectionDd != '') {
         $connectionDd = $c === false ? $connectionDd : $connectionDd . '-' . $c;
         $opts = new stdClass();
         $opts->livesite = COM_FABRIK_LIVESITE;
         $opts->conn = 'params' . $connectionDd;
         $opts->value = $value;
         $opts = FastJSON::encode($opts);
         $script = "window.addEvent('domready', function() {\n";
         $script .= "if(typeof(tableElements) === 'undefined') {\n\t\t\ttableElements = \$H();\n}\n";
         $script .= "tableElements.set('{$id}', new tablesElement('{$id}', {$opts}));\n";
         $script .= "});\n";
         if ($script != '') {
             $document->addScriptDeclaration($script);
         }
     }
     FabrikHelperHTML::cleanMootools();
     $str = JHTML::_('select.genericlist', $rows, $fullName, 'class="repeattable inputbox"', 'value', 'text', $value, $id);
     $str .= "<img style='margin-left:10px;display:none' id='" . $id . "_loader' src='components/com_fabrik/images/ajax-loader.gif' alt='" . JText::_('LOADING') . "' />";
     return $str;
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:41,代碼來源:tables.php

示例13: display

 function display($tmpl = 'default')
 {
     FabrikHelperHTML::debug($this, 'view');
     $records = JRequest::getVar('ids', array());
     $renderOrder = JRequest::getVar('renderOrder');
     $tableid = JRequest::getVar('id', 0);
     $this->assign('recordcount', count($records));
     $this->assign('renderOrder', $renderOrder);
     $this->assign('recordids', implode(',', $records));
     $this->assign('tableid', $tableid);
     $this->assign('fieldList', $this->get('ElementList', 'form'));
     $this->assign('chown_to_select', JHTML::_('select.genericlist', $this->chown_to_options, 'chown_to_val', 'class="fabrikinput inputbox" size="1"', 'value', 'text', '', 'chown_to_val'));
     JHTML::stylesheet('template.css', 'components/com_fabrik/plugins/table/chown/views/chown/tmpl/', true);
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     if ($this->_isMambot) {
         return $this->loadTemplate();
     } else {
         parent::display();
     }
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:21,代碼來源:view.html.php

示例14: edit

    /**
     * Display the form to add or edit a table
     * @param object table
     * @param array the drop down lists used on the form
     * @param array connection tables
     * @param object menus
     * @param string compoent action
     * @param int form id that the table links to?
     * @param object parameters
     * @param object plugin mangager
     * @param object table model
     */
    function edit($row, $lists, $connectionTables, $menus, $fabrikid, $params, $pluginManager, $model, $form)
    {
        JHTML::stylesheet('fabrikadmin.css', 'administrator/components/com_fabrik/views/');
        FabrikViewTable::setTableToolbar();
        JRequest::setVar('hidemainmenu', 1);
        $document =& JFactory::getDocument();
        FabrikHelperHTML::script('namespace.js', 'administrator/components/com_fabrik/views/', true);
        FabrikHelperHTML::script('pluginmanager.js', 'administrator/components/com_fabrik/views/', true);
        FabrikHelperHTML::script('admintable.js', 'administrator/components/com_fabrik/views/', true);
        JFilterOutput::objectHTMLSafe($row);
        jimport('joomla.html.editor');
        //just until joomla uses mootools 1.2
        FabrikHelperHTML::mootools();
        require_once COM_FABRIK_FRONTEND . DS . 'helpers' . DS . 'editor.php';
        jimport('joomla.html.pane');
        FabrikHelperHTML::tips();
        $editor =& FabrikHelperHTML::getEditor();
        $pane =& JPane::getInstance();
        $fbConfig =& JComponentHelper::getParams('com_fabrik');
        $opts = new stdClass();
        $opts->mooversion = FabrikWorker::getMooVersion() == 1 ? 1.2 : 1.1;
        $opts = FastJSON::encode($opts);
        $lang = new stdClass();
        $lang->action = JText::_('ACTION');
        $lang->do = JText::_('DO');
        $lang->del = JText::_('DELETE');
        $lang->in = JText::_('IN');
        $lang->on = JText::_('ON');
        $lang->options = JText::_('OPTIONS');
        $lang->please_select = JText::_('COM_FABRIK_PLEASE_SELECT');
        $lang = FastJSON::encode($lang);
        $js = "window.addEvent('domready', function() {\n  \t\tvar aPlugins = [];\n";
        $js .= $pluginManager->getAdminPluginJs('table', $row, $lists);
        $js .= "controller = new TablePluginManager(aPlugins, {$lang}, {$opts});\n";
        $usedPlugins = $params->get('plugin', '', '_default', 'array');
        $js .= $pluginManager->getAdminSelectedPluginJS('table', $row, $lists, $params);
        $js .= "});\n";
        $js .= "var connectiontables = new Array;\n";
        $i = 0;
        if (is_array($connectionTables)) {
            foreach ($connectionTables as $k => $items) {
                foreach ($items as $v) {
                    $js .= "connectiontables[" . $i++ . "] = new Array('{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "');\n\t\t";
                }
            }
        }
        $js .= "\n\t\t\tfunction submitbutton(pressbutton) {\n\t\t\t\tif (pressbutton == 'cancel') {\n\t\t\t\t\tsubmitform( pressbutton);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar err = '';";
        $js .= $editor->save('introduction');
        $js .= "if(\$('label').value == '') {\n\t\t\t\t\terr = err +'" . JText::_('PLEASE ENTER A TABLE LABEL', true) . '\\n' . "';\n\t\t\t\t}\n\n\t\t\t\tif(\$('database_name')) {\n\t\t\t\t\tif(\$('database_name').value == '') {\n\t\t\t\t\t\tif(\$('connection_id')) {\n\t\t\t\t\t\t\tif(\$('connection_id').value == '-1') {\n\t\t\t\t\t\t\t\terr = err +'" . JText::_('PLEASE SELECT A CONNECTION', true) . '\\n' . "';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(\$('tablename')) {\n\t\t\t\t\t\t\tif(\$('tablename').value == '' || \$('tablename').value == '-1') {\n\t\t\t\t\t\t\t\terr = err + '" . JText::_('PLEASE SELECT A DATABASE TABLE', true) . '\\n' . "';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (err == '') {\n\t\t\t\t\tsubmitform( pressbutton);\n\t\t\t\t}else{\n\t\t\t\t\talert (err);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar joinCounter = 0;";
        $document->addScriptDeclaration($js);
        FabrikHelperHTML::cleanMootools();
        ?>
<form action="index.php" method="post" name="adminForm">
<table style="width: 100%">
	<tr>
		<td style="width: 50%" valign="top">
		<fieldset class="adminform"><legend><?php 
        echo JText::_('DETAILS');
        ?>
</legend>
		<table class="admintable">
			<tr>
				<td class="key"><label for="label"><?php 
        echo JText::_('LABEL');
        ?>
</label></td>
				<td><input class="inputbox" type="text" id="label" name="label"
					size="50" value="<?php 
        echo $row->label;
        ?>
" /></td>
			</tr>
			<tr>
				<td class="key"><?php 
        echo JText::_('INTRODUCTION');
        ?>
</td>
				<td><?php 
        echo $editor->display('introduction', $row->introduction, '100%', '200', '45', '25', false);
        ?>
				</td>
			</tr>
		</table>
		</fieldset>

		<fieldset><legend><?php 
        echo JText::_('FILTERS');
        ?>
//.........這裏部分代碼省略.........
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:101,代碼來源:table.php

示例15: display


//.........這裏部分代碼省略.........
     $model->_lastTaskData = JRequest::getVar('taskData', '');
     // TODO: query table/forms to find out which blocks are releated to the block that has updated itself
     $model->_updateBlocks = JRequest::getVar('fbUpdateBlocks', array());
     $model->loadTables();
     $package =& $model->getPackage();
     $usedForms = array();
     if ($package->tables != '') {
         $tableids = explode(",", $package->tables);
         foreach ($tableids as $i) {
             if ($i === '') {
                 continue;
             }
             //in PHP5 objects are assigned by reference as default -
             //cloning object doesnt deep clone other oject references either??
             //this copy method might be intensive
             $tableView = clone $this->_tableView;
             $tableView->setId($i);
             $tableView->_isMambot = true;
             $tableModel =& $tableView->getModel();
             $tableModel->setId($i);
             $tableModel->_packageId = $this->_id;
             $tableModel->_postMethod = 'ajax';
             $table =& $tableModel->getTable();
             $this->blocks[$table->label] = $tableView->display();
             $table = $tableModel->getTable();
             $formModel =& $tableModel->getForm();
             $formModel->_editable = 1;
             $formView = clone $this->_formView;
             //used to buffer output
             $formView->_isMambot = true;
             $formView->setId($table->form_id);
             $formModel->_postMethod = 'ajax';
             $formModel->_packageId = $this->_id;
             $usedForms[] = $formModel->_id;
             $formView->setModel($formModel, true);
             $this->blocks['form_' . $formModel->_id] = $formView->display();
             //creating a read only view
             $formModel->_editable = 0;
             $formView->setModel($formModel, true);
             $orgiView = JRequest::getVar('view', 'form');
             $view = JRequest::setVar('view', 'details');
             $this->blocks[$table->label . ' details'] = $formView->display();
             JRequest::setVar('view', $orgiView);
         }
     }
     // see if we have any forms that dont record to the database that need to be added to blocks[]
     // can occur when redering a form in a module with use ajax turned on
     if ($package->forms != '') {
         $formids = explode(",", $package->forms);
         foreach ($formids as $fid) {
             if (!array_key_exists('form_' . $fid, $this->blocks)) {
                 $formModel->_editable = 1;
                 $formView = clone $this->_formView;
                 //used to buffer output
                 $formView->_isMambot = true;
                 $formView->setId($fid);
                 $formModel->_postMethod = 'ajax';
                 $formModel->_packageId = $this->_id;
                 $usedForms[] = $formModel->_id;
                 $formView->setModel($formModel, true);
                 $this->blocks['form_' . $formModel->_id] = $formView->display();
             }
         }
     }
     $model->render();
     $this->_basePath = COM_FABRIK_FRONTEND . DS . 'views';
     $tmpl = JRequest::getVar('layout', 'default');
     //$this->blocks = $model->_blocks;
     $this->_setPath('template', $this->_basePath . DS . 'package' . DS . 'tmpl' . DS . $tmpl);
     if (!isset($package->template)) {
         $package->template = 'default';
         $tmpl = JRequest::getVar('layout', $package->template);
     } else {
         //set by table module in ajax mode
         $tmpl = $package->template;
     }
     $this->_includeCSS($tmpl);
     $this->_basePath = COM_FABRIK_FRONTEND . DS . 'views';
     $this->_setPath('template', $this->_basePath . DS . 'package' . DS . 'tmpl' . DS . $tmpl);
     $liveTmplPath = JURI::root() . '/components/com_fabrik/views/package/tmpl/' . $tmpl . '/';
     FabrikHelperHTML::mootools();
     FabrikHelperHTML::mocha();
     // check for a custom js file and include it if it exists
     $aJsPath = JPATH_SITE . DS . "components" . DS . "com_fabrik" . DS . "views" . DS . "package" . DS . "tmpl" . DS . $tmpl . DS . "javascript.js";
     if (file_exists($aJsPath)) {
         FabrikHelperHTML::script("javascript.js", 'components/com_fabrik/views/package/tmpl/' . $tmpl . '/', true);
     }
     //ensure we don't have an incorrect version of mootools loaded
     FabrikHelperHTML::cleanMootools();
     if ($this->_isMambot) {
         $res = $this->loadTemplate();
         if (JError::isError($res)) {
             print_r(JError::getErrors());
         } else {
             return $res;
         }
     } else {
         parent::display();
     }
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:101,代碼來源:view.html.php


注:本文中的FabrikHelperHTML::cleanMootools方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。