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


PHP FabrikHelperHTML::slideshow方法代碼示例

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


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

示例1: getManagementJS

 /**
  * Get JS objects
  *
  * @param   array $data list data
  *
  * @return  void
  */
 protected function getManagementJS($data = array())
 {
     $input = $this->app->input;
     $itemId = FabrikWorker::itemId();
     /** @var FabrikFEModelList $model */
     $model = $this->getModel();
     $params = $model->getParams();
     $item = $model->getTable();
     $listRef = $model->getRenderContext();
     $listId = $model->getId();
     $formModel = $model->getFormModel();
     $elementsNotInTable = $formModel->getElementsNotInTable();
     $toggleCols = (bool) $params->get('toggle_cols', false);
     $ajax = (int) $model->isAjax();
     $ajaxLinks = (bool) $params->get('list_ajax_links', $ajax);
     $opts = new stdClass();
     $pluginManager = FabrikWorker::getPluginManager();
     if ($ajaxLinks) {
         $modalTitle = 'test';
         $modalOpts = array('content' => '', 'id' => 'ajax_links', 'title' => JText::_($modalTitle), 'modal' => false, 'expandable' => true);
         FabrikHelperHTML::jLayoutJs('ajax_links', 'fabrik-modal', (object) $modalOpts);
     }
     // Advanced search
     if ($params->get('advanced-filter')) {
         $modalOpts = array('content' => '', 'id' => 'advanced-filter', 'title' => JText::_('COM_FABRIK_FIELD_ADVANCED_SEARCH_LABEL'), 'modal' => false, 'expandable' => true);
         FabrikHelperHTML::jLayoutJs('advanced-filter', 'fabrik-modal', (object) $modalOpts);
     }
     FabrikHelperHTML::jLayoutJs('modal-state-label', 'list.fabrik-filters-modal-state-label', $layoutData = (object) array('label' => '', 'displayValue' => '', 'key' => ''));
     $this->csvJS($opts, $model);
     if ($model->requiresSlimbox()) {
         FabrikHelperHTML::slimbox();
     }
     if ($model->requiresSlideshow()) {
         FabrikHelperHTML::slideshow();
     }
     $src = FabrikHelperHTML::framework();
     $shim = array();
     $dep = new stdClass();
     $dep->deps = array();
     $shim['fab/list'] = $dep;
     $src['FbList'] = FabrikHelperHTML::mediaFile('list.js');
     $src['FbListFilter'] = FabrikHelperHTML::mediaFile('listfilter.js');
     $src['ListPlugin'] = FabrikHelperHTML::mediaFile('list-plugin.js');
     $src = $model->getPluginJsClasses($src, $shim);
     $pluginManager->runPlugins('loadJavascriptClassName', $model, 'list');
     $pluginManager->data = array_filter($pluginManager->data, function ($v) {
         return $v !== '';
     });
     $model->getCustomJsAction($src);
     $tmpl = $model->getTmpl();
     $this->tmpl = $tmpl;
     $model->getListCss();
     // Check for a custom js file and include it if it exists
     $aJsPath = JPATH_SITE . '/components/com_fabrik/views/list/tmpl/' . $tmpl . '/javascript.js';
     if (JFile::exists($aJsPath)) {
         $src['CustomJs'] = 'components/com_fabrik/views/list/tmpl/' . $tmpl . '/javascript.js';
     }
     $origRows = $this->rows;
     $this->rows = array(array());
     $tmpItemid = !isset($itemId) ? 0 : $itemId;
     $this->_row = new stdClass();
     $script = array();
     $params = $model->getParams();
     $opts->admin = $this->app->isAdmin();
     $opts->ajax = $ajax;
     $opts->ajax_links = $ajaxLinks;
     $opts->links = array('detail' => $params->get('detailurl', ''), 'edit' => $params->get('editurl', ''), 'add' => $params->get('addurl', ''));
     $opts->filterMethod = $this->filter_action;
     $opts->advancedFilters = $model->getAdvancedFilterValues();
     $opts->resetFilters = (bool) FabrikWorker::getMenuOrRequestVar('resetfilters', 0, false, 'request');
     $opts->form = 'listform_' . $listRef;
     $this->listref = $listRef;
     $opts->headings = $model->jsonHeadings();
     $labels = $this->headings;
     foreach ($labels as &$l) {
         $l = strip_tags($l);
     }
     $opts->labels = $labels;
     $opts->primaryKey = $item->db_primary_key;
     $opts->Itemid = $tmpItemid;
     $opts->listRef = $listRef;
     $opts->formid = $model->getFormModel()->getId();
     $opts->canEdit = $model->canEdit() ? '1' : '0';
     $opts->canView = $model->canView() ? '1' : '0';
     $opts->page = JRoute::_('index.php');
     $opts->isGrouped = $this->isGrouped;
     $opts->toggleCols = $toggleCols;
     $opts->j3 = FabrikWorker::j3();
     $opts->singleOrdering = (bool) $model->singleOrdering();
     // Reset data back to original settings
     $this->rows = $origRows;
     $formEls = array();
     foreach ($elementsNotInTable as $tmpElement) {
//.........這裏部分代碼省略.........
開發者ID:glauberm,項目名稱:cinevi,代碼行數:101,代碼來源:view.base.php

示例2: getManagementJS

 /**
  * Get JS objects
  *
  * @param   array  $data  list data
  *
  * @return  void
  */
 protected function getManagementJS($data = array())
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $Itemid = FabrikWorker::itemId();
     $model = $this->getModel();
     $params = $model->getParams();
     $item = $model->getTable();
     $listref = $model->getRenderContext();
     $listid = $model->getId();
     $formModel = $model->getFormModel();
     $elementsNotInTable = $formModel->getElementsNotInTable();
     $toggleCols = (bool) $params->get('toggle_cols', false);
     if ($model->requiresSlimbox()) {
         FabrikHelperHTML::slimbox();
     }
     if ($model->requiresSlideshow()) {
         FabrikHelperHTML::slideshow();
     }
     $src = FabrikHelperHTML::framework();
     $shim = array();
     $dep = new stdClass();
     $dep->deps = array('fab/fabrik', 'fab/listfilter', 'fab/advanced-search', 'fab/encoder');
     if ($toggleCols) {
         $dep->deps[] = 'fab/list-toggle';
     }
     $shim['fab/list'] = $dep;
     $src = $model->getPluginJsClasses($src, $shim);
     FabrikHelperHTML::addToFrameWork($src, 'media/com_fabrik/js/list');
     $model->getCustomJsAction($src);
     $tmpl = $model->getTmpl();
     $this->tmpl = $tmpl;
     $model->getListCss();
     // Check for a custom js file and include it if it exists
     $aJsPath = JPATH_SITE . '/components/com_fabrik/views/list/tmpl/' . $tmpl . '/javascript.js';
     if (JFile::exists($aJsPath)) {
         $src[] = 'components/com_fabrik/views/list/tmpl/' . $tmpl . '/javascript.js';
     }
     $origRows = $this->rows;
     $this->rows = array(array());
     $tmpItemid = !isset($Itemid) ? 0 : $Itemid;
     $this->_row = new stdClass();
     $script = array();
     $params = $model->getParams();
     $opts = new stdClass();
     $opts->admin = $app->isAdmin();
     $opts->ajax = (int) $model->isAjax();
     $opts->ajax_links = (bool) $params->get('list_ajax_links', $opts->ajax);
     $opts->links = array('detail' => $params->get('detailurl', ''), 'edit' => $params->get('editurl', ''), 'add' => $params->get('addurl', ''));
     $opts->filterMethod = $this->filter_action;
     $opts->advancedFilters = $model->getAdvancedFilterValues();
     $opts->form = 'listform_' . $listref;
     $this->listref = $listref;
     $opts->headings = $model->jsonHeadings();
     $labels = $this->headings;
     foreach ($labels as &$l) {
         $l = strip_tags($l);
     }
     $opts->labels = $labels;
     $opts->primaryKey = $item->db_primary_key;
     $opts->Itemid = $tmpItemid;
     $opts->listRef = $listref;
     $opts->formid = $model->getFormModel()->getId();
     $opts->canEdit = $model->canEdit() ? "1" : "0";
     $opts->canView = $model->canView() ? "1" : "0";
     $opts->page = JRoute::_('index.php');
     $opts->isGrouped = $this->isGrouped;
     $opts->toggleCols = $toggleCols;
     $opts->j3 = FabrikWorker::j3();
     $opts->singleOrdering = (bool) $model->singleOrdering();
     $formEls = array();
     foreach ($elementsNotInTable as $tmpElement) {
         $oo = new stdClass();
         $oo->name = $tmpElement->name;
         $oo->label = $tmpElement->label;
         $formEls[] = $oo;
     }
     $opts->formels = $formEls;
     $opts->fabrik_show_in_list = $input->get('fabrik_show_in_list', array(), 'array');
     $opts->csvChoose = (bool) $params->get('csv_frontend_selection');
     $opts->popup_width = $params->get('popup_width', '');
     $opts->popup_height = $params->get('popup_height', '');
     $xOffset = $params->get('popup_offset_x', '');
     $yOffset = $params->get('popup_offset_y', '');
     if ($xOffset !== '') {
         $opts->popup_offset_x = (int) $xOffset;
     }
     if ($yOffset !== '') {
         $opts->popup_offset_y = (int) $yOffset;
     }
     $opts->popup_edit_label = $model->editLabel();
     $opts->popup_view_label = $model->viewLabel();
     $opts->popup_add_label = $model->addLabel();
//.........這裏部分代碼省略.........
開發者ID:ppantilla,項目名稱:bbninja,代碼行數:101,代碼來源:view.base.php

示例3: formJavascriptClass

 /**
  * Get the class to manage the form element
  * to ensure that the file is loaded only once
  *
  * @param   array   &$srcs   Scripts previously loaded
  * @param   string  $script  Script to load once class has loaded
  * @param   array   &$shim   Dependant class names to load before loading the class - put in requirejs.config shim
  *
  * @return void
  */
 public function formJavascriptClass(&$srcs, $script = '', &$shim = array())
 {
     $s = new stdClass();
     $s->deps = array('fab/element');
     $params = $this->getParams();
     if ($params->get('ajax_upload')) {
         $runtimes = $params->get('ajax_runtime', 'html5');
         $folder = 'element/fileupload/lib/plupload/js/';
         $plupShim = new stdClass();
         $plupShim->deps = array($folder . 'plupload');
         $s->deps[] = $folder . 'plupload';
         if (strstr($runtimes, 'html5')) {
             $s->deps[] = $folder . 'plupload.html5';
             $shim[$folder . 'plupload.html5'] = $plupShim;
         }
         if (strstr($runtimes, 'html4')) {
             $s->deps[] = $folder . 'plupload.html4';
             $shim[$folder . 'plupload.html4'] = $plupShim;
         }
         if (strstr($runtimes, 'flash')) {
             $s->deps[] = $folder . 'plupload.flash';
             $shim[$folder . 'plupload.flash'] = $plupShim;
         }
         if (strstr($runtimes, 'silverlight')) {
             $s->deps[] = $folder . 'plupload.silverlight';
             $shim[$folder . 'plupload.silverlight'] = $plupShim;
         }
         if (strstr($runtimes, 'browserplus')) {
             $s->deps[] = $folder . 'plupload.browserplus';
             $shim[$folder . 'plupload.browserplus'] = $plupShim;
         }
     }
     if (array_key_exists('element/fileupload/fileupload', $shim) && isset($shim['element/fileupload/fileupload']->deps)) {
         $shim['element/fileupload/fileupload']->deps = array_values(array_unique(array_merge($shim['element/fileupload/fileupload']->deps, $s->deps)));
     } else {
         $shim['element/fileupload/fileupload'] = $s;
     }
     if ($this->requiresSlideshow()) {
         FabrikHelperHTML::slideshow();
     }
     parent::formJavascriptClass($srcs, $script, $shim);
     // $$$ hugh - added this, and some logic in the view, so we will get called on a per-element basis
     return false;
 }
開發者ID:LGBGit,項目名稱:tierno,代碼行數:54,代碼來源:fileupload.php


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