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


PHP FabrikHelperHTML::jLayoutJs方法代碼示例

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


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

示例1: jLayouts

 /**
  * Create JS JLayout data
  *
  * @return void
  */
 private function jLayouts()
 {
     FabrikHelperHTML::jLayoutJs('fabrik-visualization-fullcalendar-viewbuttons', 'fabrik-visualization-fullcalendar-viewbuttons', (object) array(), array(JPATH_PLUGINS . '/fabrik_visualization/fullcalendar/layouts/'));
     FabrikHelperHTML::jLayoutJs('fabrik-visualization-fullcalendar-event-popup', 'fabrik-visualization-fullcalendar-event-popup', (object) array(), array(JPATH_PLUGINS . '/fabrik_visualization/fullcalendar/layouts/'));
     FabrikHelperHTML::jLayoutJs('fabrik-visualization-fullcalendar-viewevent', 'fabrik-visualization-fullcalendar-viewevent', (object) array(), array(JPATH_PLUGINS . '/fabrik_visualization/fullcalendar/layouts/'));
     $modalOpts = array('content' => '', 'id' => 'fullcalendar_addeventwin', 'title' => FText::_('PLG_VISUALIZATION_FULLCALENDAR_ADD_EVENT'), 'modal' => false, 'expandable' => true);
     FabrikHelperHTML::jLayoutJs('fullcalendar_addeventwin', 'fabrik-modal', (object) $modalOpts);
     $modalOpts = array('content' => '', 'id' => 'fullcalendar_chooseeventwin', 'title' => FText::_('PLG_VISUALIZATION_FULLCALENDAR_PLEASE_SELECT'), 'modal' => false, 'expandable' => true);
     FabrikHelperHTML::jLayoutJs('fullcalendar_chooseeventwin', 'fabrik-modal', (object) $modalOpts);
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:15,代碼來源:view.html.php

示例2: modalJLayouts

 /**
  * Add the js jLayout objects for rendering the modal
  *
  * @return void
  */
 public static function modalJLayouts()
 {
     FabrikHelperHTML::jLayoutJs('modal-close', 'modal.fabrik-close');
     FabrikHelperHTML::jLayoutJs('icon-expand', 'fabrik-icon', (object) array('icon' => 'icon-expand'));
     FabrikHelperHTML::jLayoutJs('icon-full-screen', 'fabrik-icon', (object) array('icon' => 'icon-out-2 icon-fullscreen'));
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:11,代碼來源:html.php

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

示例4: plupload

 /**
  * Create the html for Ajax upload widget
  *
  * @param   array  $str            Current html output
  * @param   int    $repeatCounter  Repeat group counter
  * @param   array  $values         Existing files
  *
  * @return	array	Modified file-upload html
  */
 protected function plupload($str, $repeatCounter, $values)
 {
     FabrikHelperHTML::stylesheet(COM_FABRIK_LIVESITE . 'media/com_fabrik/css/slider.css');
     $params = $this->getParams();
     $w = (int) $params->get('ajax_dropbox_width', 0);
     $h = (int) $params->get('ajax_dropbox_height', 200);
     $dropBoxStyle = 'height:' . $h . 'px;';
     if ($w !== 0) {
         $dropBoxStyle .= 'width:' . $w . 'px;';
     }
     $layout = $this->getLayout('widget');
     $displayData = new stdClass();
     $displayData->id = $this->getHTMLId($repeatCounter);
     $displayData->winWidth = $params->get('win_width', 400);
     $displayData->winHeight = $params->get('win_height', 400);
     $displayData->canCrop = $this->canCrop();
     $displayData->canvasSupport = FabrikHelperHTML::canvasSupport();
     $displayData->dropBoxStyle = $dropBoxStyle;
     $displayData->field = implode("\n", $str);
     $displayData->j3 = FabrikWorker::j3();
     $str = (array) $layout->render($displayData);
     FabrikHelperHTML::jLayoutJs('fabrik-progress-bar', 'fabrik-progress-bar', (object) array('context' => '', 'animated' => true));
     FabrikHelperHTML::jLayoutJs('fabrik-progress-bar-success', 'fabrik-progress-bar', (object) array('context' => 'success', 'value' => 100));
     FabrikHelperHTML::jLayoutJs('fabrik-icon-delete', 'fabrik-icon', (object) array('icon' => 'delete'), array('debug' => true));
     return $str;
 }
開發者ID:LGBGit,項目名稱:tierno,代碼行數:35,代碼來源:fileupload.php

示例5: pluploadModal

 /**
  * Create the upload modal and its content
  * Needs to be a unique $modalId to ensure that multiple modals can be created
  * each with unique content
  *
  * @param   int $repeatCounter
  */
 protected function pluploadModal($repeatCounter)
 {
     $params = $this->getParams();
     $modalContentLayout = $this->getLayout('modal-content');
     $modalData = (object) array('id' => $this->getHTMLId($repeatCounter), 'canCrop' => $this->canCrop(), 'canvasSupport' => FabrikHelperHTML::canvasSupport(), 'width' => $params->get('win_width', 400), 'height' => $params->get('win_height', 400));
     $modalContent = $modalContentLayout->render($modalData);
     $modalTitle = $this->canCrop() ? 'PLG_ELEMENT_FILEUPLOAD_CROP_AND_SCALE' : 'PLG_ELEMENT_FILEUPLOAD_PREVIEW';
     $modalId = $this->modalId($repeatCounter);
     $modalOpts = array('content' => $modalContent, 'id' => $modalId, 'title' => JText::_($modalTitle), 'modal' => true);
     FabrikHelperHTML::jLayoutJs($modalId, 'fabrik-modal', (object) $modalOpts);
 }
開發者ID:bauer-git,項目名稱:fabrik-1,代碼行數:18,代碼來源:fileupload.php

示例6: renderCheckBoxList

 /**
  * Render checkbox list in form
  *
  * @param   array  $data           Form data
  * @param   int    $repeatCounter  Repeat group counter
  * @param   array  &$html          HTML to assign output to
  * @param   array  $tmp            List of value/label objects
  * @param   array  $default        Default values - the lookup table's primary key values
  *
  * @since   3.0.7
  *
  * @return  void
  */
 protected function renderCheckBoxList($data, $repeatCounter, &$html, $tmp, $default)
 {
     $id = $this->getHTMLId($repeatCounter);
     $name = $this->getHTMLName($repeatCounter);
     $params = $this->getParams();
     $html[] = '<div class="fabrikSubElementContainer" id="' . $id . '">';
     $attributes = 'class="fabrikinput inputbox" id="' . $id . '"';
     $name = FabrikString::rtrimword($name, '[]');
     if (!$this->getFormModel()->isNewRecord()) {
         // If its a new record we don't want to look up defaults in the look up table as they will not exist
         $targetIds = $this->multiOptionTargetIds($data, $repeatCounter);
         if ($targetIds !== false) {
             $default = $targetIds;
         }
     }
     $this->renderReadOnlyTrimOptions($tmp, $default);
     $layout = $this->getLayout('form-checkboxlist');
     $displayData = new stdClass();
     $displayData->options = $tmp;
     $displayData->default = (array) $default;
     $displayData->optsPerRow = (int) $params->get('dbjoin_options_per_row', 1);
     $displayData->name = $name;
     $displayData->editable = $this->isEditable();
     $displayData->optionLayout = $this->getLayout('form-checkbox');
     $html[] = '<div class="fabrikSubElementContainer" id="' . $id . '">';
     $singleLayout = 'fabrik-element-' . $this->getPluginName() . '-form-checkbox';
     FabrikHelperHTML::jLayoutJs($singleLayout, $singleLayout, $displayData, array($this->layoutBasePath()));
     if (FabrikWorker::j3()) {
         $html[] = $layout->render($displayData);
     } else {
         $html[] = FabrikHelperHTML::aList('checkbox', $tmp, $name, $attributes, $default, 'value', 'text', $displayData->optsPerRow, $displayData->editable);
     }
     if (empty($tmp) && !FabrikWorker::j3()) {
         $tmpIds = array();
         $o = new stdClass();
         $o->text = 'dummy';
         $o->value = 'dummy';
         $tmpIds[] = $o;
         $tmp = $tmpIds;
         $dummy = FabrikHelperHTML::aList('checkbox', $tmp, $name, $attributes, $default, 'value', 'text', 1, true);
         $html[] = '<div class="chxTmplNode">' . $dummy . '</div>';
     }
     $html[] = '</div>';
 }
開發者ID:LGBGit,項目名稱:tierno,代碼行數:57,代碼來源:databasejoin.php

示例7: jsJLayouts

 /**
  * Add any jsJLayout templates to Fabrik.jLayouts js object.
  *
  * @return void
  */
 public function jsJLayouts()
 {
     $opts = $this->elementJavascriptOpts();
     $params = $this->getParams();
     if ($opts->allowadd) {
         $modalOpts = array('content' => '', 'id' => $opts->modalId, 'title' => '', 'modal' => false, 'expandable' => true);
         FabrikHelperHTML::jLayoutJs($opts->modalId, 'fabrik-modal', (object) $modalOpts);
     }
     if ($params->get('fabrikdatabasejoin_frontend_select')) {
         $modalOpts = array('content' => '', 'id' => 'db_join_select', 'title' => '', 'modal' => false, 'expandable' => true);
         FabrikHelperHTML::jLayoutJs('db_join_select', 'fabrik-modal', (object) $modalOpts);
     }
 }
開發者ID:glauberm,項目名稱:cinevi,代碼行數:18,代碼來源:databasejoin.php


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