示例#1
0
 /**
  * Default display listEntities
  *        	
  * @access public
  * @param string $tpl
  * @return void
  */
 public function display($tpl = null)
 {
     // Tooltip for locked record
     JHTML::_('behavior.tooltip');
     // Get main records
     $rows = $this->get('Data');
     $lists = $this->get('Filters');
     $total = $this->get('Total');
     $doc = JFactory::getDocument();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/analyzer.js');
     // Inject js translations
     $translations = array('COM_JMAP_ANALYZER_TITLE', 'COM_JMAP_ANALYZER_PROCESS_RUNNING', 'COM_JMAP_ANALYZER_STARTED_SITEMAP_GENERATION', 'COM_JMAP_ANALYZER_ERROR_STORING_FILE', 'COM_JMAP_ANALYZER_GENERATION_COMPLETE', 'COM_JMAP_ANALYZER_ANALYZING_LINKS');
     $this->injectJsTranslations($translations, $doc);
     $orders = array();
     $orders['order'] = $this->getModel()->getState('order');
     $orders['order_Dir'] = $this->getModel()->getState('order_dir');
     // Pagination view object model state populated
     $pagination = new JPagination($total, $this->getModel()->getState('limitstart'), $this->getModel()->getState('limit'));
     $this->user = JFactory::getUser();
     $this->pagination = $pagination;
     $this->link_type = $this->getModel()->getState('link_type', null);
     $this->lists = $lists;
     $this->orders = $orders;
     $this->items = $rows;
     // Aggiunta toolbar
     $this->addDisplayToolbar();
     parent::display('list');
 }
示例#2
0
 /**
  * Display the XML sitemap
  * @access public
  * @return void
  */
 function display($tpl = null)
 {
     $document = $this->document;
     $document->setMimeEncoding('application/xml');
     // Call by cache handler get no params, so recover from model state
     if (!$tpl) {
         $tpl = $this->getModel()->getState('documentformat');
     }
     $language = JFactory::getLanguage();
     $langTag = $language->getTag();
     $langCode = @array_shift(explode('-', $langTag));
     $this->sysLang = $langCode;
     $this->globalConfig = JFactory::getConfig();
     $this->data = $this->get('SitemapData');
     $this->cparams = $this->getModel()->getState('cparams');
     $this->outputtedLinksBuffer = array();
     $this->application = JFactory::getApplication();
     $this->xslt = $this->getModel()->getState('xslt');
     $uriInstance = JURI::getInstance();
     if ($this->cparams->get('append_livesite', true)) {
         $customHttpPort = trim($this->cparams->get('custom_http_port', ''));
         $getPort = $customHttpPort ? ':' . $customHttpPort : '';
         $customDomain = trim($this->cparams->get('custom_sitemap_domain', ''));
         $getDomain = $customDomain ? rtrim($customDomain, '/') : rtrim($uriInstance->getScheme() . '://' . $uriInstance->getHost(), '/');
         $this->liveSite = rtrim($getDomain . $getPort, '/');
     } else {
         $this->liveSite = null;
     }
     $this->setLayout('default');
     parent::display($tpl);
 }
示例#3
0
 /**
  * Display the XML sitemap
  * @access public
  * @return void
  */
 function display($tpl = null)
 {
     $document = $this->document;
     $document->setMimeEncoding('application/xml');
     $session = JFactory::getSession();
     // Call by cache handler get no params, so recover from model state
     if (!$tpl) {
         $tpl = $this->getModel()->getState('documentformat');
     }
     $this->data = $this->get('SitemapData');
     $this->cparams = $this->getModel()->getState('cparams');
     // Transport wrapper
     $this->HTTPClient = new JMapHttp(null, $this->cparams);
     $this->outputtedLinksBuffer = array();
     // Reload $this->outputtedVideosBuffer from previous session if process_status === run, AKA an ongoing JS AJAX precaching is running
     $this->outputtedVideosBuffer = $this->app->input->get('process_status', null) === 'run' ? $session->get('com_jmap.videos_buffer') : array();
     $this->application = JFactory::getApplication();
     $this->xslt = $this->getModel()->getState('xslt');
     $this->videoApisEndpoints = array('youtube' => 'https://gdata.youtube.com/feeds/api/videos/%s?v=2&alt=json', 'vimeo' => 'http://vimeo.com/api/v2/video/%s.json', 'dailymotion' => 'https://api.dailymotion.com/video/%s?fields=title,duration,description,thumbnail_360_url');
     $uriInstance = JURI::getInstance();
     $customHttpPort = trim($this->cparams->get('custom_http_port', ''));
     $getPort = $customHttpPort ? ':' . $customHttpPort : '';
     $customDomain = trim($this->cparams->get('custom_sitemap_domain', ''));
     $getDomain = $customDomain ? rtrim($customDomain, '/') : rtrim($uriInstance->getScheme() . '://' . $uriInstance->getHost(), '/');
     if ($this->cparams->get('append_livesite', true)) {
         $this->liveSite = rtrim($getDomain . $getPort, '/');
     } else {
         $this->liveSite = null;
     }
     // Crawler live site management
     if ($this->cparams->get('sh404sef_multilanguage', 0) && JMapLanguageMultilang::isEnabled()) {
         $lang = '/' . $this->app->input->get('lang');
         // Check if sh404sef insert language code param is off, otherwise the result would be doubled language chunk in liveSiteCrawler
         $sh404SefParams = JComponentHelper::getParams('com_sh404sef');
         if ($sh404SefParams->get('shInsertLanguageCode', 0) || !$sh404SefParams->get('Enabled', 1)) {
             $lang = null;
         }
         $this->liveSiteCrawler = rtrim($getDomain . $getPort . $lang, '/');
     } else {
         $this->liveSiteCrawler = rtrim($getDomain . $getPort, '/');
     }
     // Add include path
     $this->addTemplatePath(JPATH_COMPONENT . '/views/sitemap/tmpl/videos');
     $this->setLayout('default');
     parent::display($tpl);
     // Assign $this->outputtedVideosBuffer for next session if process_status == start/run
     if (in_array($this->app->input->get('process_status', null), array('start', 'run'))) {
         $session->set('com_jmap.videos_buffer', $this->outputtedVideosBuffer);
     }
     // Delete $this->outputtedVideosBuffer session if process_status == end
     if ($this->app->input->get('process_status', null) === 'end') {
         $session->clear('com_jmap.videos_buffer');
     }
 }
示例#4
0
 /**
  * Display the sitemap
  * @access public
  * @return void
  */
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $menu = $app->getMenu();
     $document = $this->document;
     $this->menuname = $menu->getActive();
     $this->cparams = $this->getModel()->getState('cparams');
     if (isset($this->menuname)) {
         $this->menuname = $this->menuname->title;
     }
     // Call by cache handler get no params, so recover from model state
     if (!$tpl) {
         $tpl = $this->getModel()->getState('documentformat');
     }
     // Accordion della sitemap
     if ($this->getModel()->getState('cparams')->get('includejquery', 1)) {
         JHtml::_('jquery.framework');
     }
     // Check if enabled the draggable mindmap sitemap
     $draggableSitemap = $this->cparams->get('draggable_sitemap', 0);
     $mindMapSitemap = $this->cparams->get('sitemap_html_template', '') == 'mindmap';
     if ($draggableSitemap && $mindMapSitemap) {
         $this->loadJQueryUI($document);
     }
     $document->addScript(JURI::root(true) . '/components/com_jmap/js/jquery.treeview.js');
     // Manage sitemap layout
     if (!$this->cparams->get('show_icons', 1)) {
         $document->addStyleDeclaration('span.folder{cursor:pointer}');
     } else {
         $document->addStyleSheet(JURI::root(true) . '/components/com_jmap/js/jquery.treeview.css');
         if ($sitemapTemplate = $this->cparams->get('sitemap_html_template', null)) {
             $document->addStyleSheet(JURI::root(true) . '/components/com_jmap/js/jquery.treeview-' . $sitemapTemplate . '.css');
         }
     }
     // Inject JS domain vars
     $document->addScriptDeclaration("\n\t\t\t\t\tvar jmapExpandAllTree = " . $this->getModel()->getState('cparams')->get('show_expanded', 0) . ";\n\t\t\t\t\tvar jmapExpandLocation = '" . $this->getModel()->getState('cparams')->get('expand_location', 'location') . "';\n\t\t\t\t\tvar jmapAnimated = " . $this->getModel()->getState('cparams')->get('animated', 1) . ";\n\t\t\t\t\tvar jmapAnimateSpeed = " . $this->getModel()->getState('cparams')->get('animate_speed', 200) . ";\n\t\t\t\t\tvar jmapDraggableSitemap = " . $draggableSitemap . ";\n\t\t\t\t\tvar jmapLinkableCatsSources = {};\n\t\t\t\t\tjQuery(function(\$){\n\t\t\t\t\t\t\$('ul.jmap_filetree li a:empty').parent('li').css('display', 'none');\n\t\t\t\t\t});\n\t\t\t\t");
     $this->data = $this->get('SitemapData');
     $this->application = $app;
     $this->document = $document;
     $uriInstance = JURI::getInstance();
     if ($this->cparams->get('append_livesite', true)) {
         $customHttpPort = trim($this->cparams->get('custom_http_port', ''));
         $getPort = $customHttpPort ? ':' . $customHttpPort : '';
         $customDomain = trim($this->cparams->get('custom_sitemap_domain', ''));
         $getDomain = $customDomain ? rtrim($customDomain, '/') : rtrim($uriInstance->getScheme() . '://' . $uriInstance->getHost(), '/');
         $this->liveSite = rtrim($getDomain . $getPort, '/');
     } else {
         $this->liveSite = null;
     }
     // Add meta info
     $this->_prepareDocument();
     parent::display($tpl);
 }
示例#5
0
 /**
  * Default display listEntities
  *        	
  * @access public
  * @param string $tpl
  * @return void
  */
 public function display($tpl = null)
 {
     // Get main records
     $lists = $this->get('Lists');
     $googleData = $this->get('Data');
     $this->loadJQuery($this->document);
     $this->loadBootstrap($this->document);
     $this->document->addScriptDeclaration("var jmap_baseURI='" . JUri::root() . "';");
     $this->lists = $lists;
     $this->googleData = $googleData;
     $this->isLoggedIn = $this->getModel()->getToken();
     $this->option = $this->getModel()->getState('option');
     // Aggiunta toolbar
     $this->addDisplayToolbar();
     parent::display();
 }
示例#6
0
 /**
  * Edit entity view
  *
  * @access public
  * @param Object& $row the item to edit
  * @return void
  */
 public function editEntity(&$row)
 {
     // Load JS Client App dependencies
     $doc = JFactory::getDocument();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $translations = array('COM_JMAP_HTACCESS_PATH', 'COM_JMAP_HTACCESS_OLD_PATH', 'COM_JMAP_HTACCESS_DIRECTIVE_ADDED', 'COM_JMAP_HTACCESS_REQUIRED');
     $this->injectJsTranslations($translations, $doc);
     // Load specific JS App
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/htaccess.css');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/htaccess.js');
     $this->option = $this->option;
     $this->htaccessVersion = $this->getModel()->getState('htaccess_version');
     $this->record = $row;
     parent::display('edit');
 }
示例#7
0
 /**
  * Display help and instructions
  *
  * @access public
  * @param string $tpl
  * @return void
  */
 public function display($tpl = null)
 {
     $doc = $this->document;
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/help.css');
     // Aggiunta toolbar
     $this->addDisplayToolbar();
     // Manage partial view
     $partial = $this->app->input->get('partial', false);
     if ($partial) {
         $doc->addStyleDeclaration('div#accordion_help img{width:100%}');
     }
     $this->partialTpl = $partial;
     // Output del template
     parent::display();
 }
示例#8
0
 /**
  * Display the sitemap
  * @access public
  * @return void
  */
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $menu = $app->getMenu();
     $document = $this->document;
     $this->menuname = $menu->getActive();
     $this->cparams = $this->getModel()->getState('cparams');
     if (isset($this->menuname)) {
         $this->menuname = $this->menuname->title;
     }
     // Call by cache handler get no params, so recover from model state
     if (!$tpl) {
         $tpl = $this->getModel()->getState('documentformat');
     }
     // Accordion della sitemap
     if ($this->getModel()->getState('cparams')->get('includejquery', 1)) {
         JHtml::_('jQuery.framework');
     }
     $document->addScript(JURI::root(true) . '/components/com_jmap/js/jquery.treeview.js');
     // Manage sitemap layout
     if (!$this->cparams->get('show_icons', 1)) {
         $document->addStyleDeclaration('span.folder{cursor:pointer}');
     } else {
         $document->addStyleSheet(JURI::root(true) . '/components/com_jmap/js/jquery.treeview.css');
         if ($sitemapTemplate = $this->cparams->get('sitemap_html_template', null)) {
             $document->addStyleSheet(JURI::root(true) . '/components/com_jmap/js/jquery.treeview-' . $sitemapTemplate . '.css');
         }
     }
     // Inject JS domain vars
     $document->addScriptDeclaration("\n\t\t\t\t\tvar jmapExpandAllTree = " . $this->getModel()->getState('cparams')->get('show_expanded', 0) . ";\n\t\t\t\t\tvar jmapExpandLocation = '" . $this->getModel()->getState('cparams')->get('expand_location', 'location') . "';\n\t\t\t\t\tjQuery(function(\$){\n\t\t\t\t\t\t\$('ul.jmap_filetree li a:empty').parent('li').css('display', 'none');\n\t\t\t\t\t});\n\t\t\t\t");
     $this->data = $this->get('SitemapData');
     $this->application = $app;
     $this->document = $document;
     $uriInstance = JURI::getInstance();
     if ($this->cparams->get('append_livesite', true)) {
         $this->liveSite = rtrim($uriInstance->getScheme() . '://' . $uriInstance->getHost(), '/');
     } else {
         $this->liveSite = null;
     }
     // Add meta info
     $this->_prepareDocument();
     parent::display($tpl);
 }
示例#9
0
 /**
  * Configuration panel rendering for component settings
  *
  * @access public
  * @param string $tpl
  * @return void
  */
 public function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $params = $this->get('Data');
     $form = $this->get('form');
     // Bind the form to the data.
     if ($form && $params) {
         $form->bind($params);
     }
     $this->params_form = $form;
     $this->params = $params;
     $this->app = JFactory::getApplication();
     // Aggiunta toolbar
     $this->addDisplayToolbar();
     // Output del template
     parent::display();
 }
示例#10
0
 /**
  * Display the XML sitemap
  * @access public
  * @return void
  */
 function display($tpl = null)
 {
     $document = $this->document;
     $document->setMimeEncoding('application/xml');
     // Call by cache handler get no params, so recover from model state
     if (!$tpl) {
         $tpl = $this->getModel()->getState('documentformat');
     }
     $this->data = $this->get('SitemapData');
     $this->cparams = $this->getModel()->getState('cparams');
     // Transport wrapper
     $this->HTTPClient = new JMapHttp(null, $this->cparams);
     $this->outputtedLinksBuffer = array();
     $this->application = JFactory::getApplication();
     $this->xslt = $this->getModel()->getState('xslt');
     // Set regex for the images crawler
     $this->mainImagesRegex = $this->cparams->get('regex_images_crawler', 'advanced') == 'standard' ? '/(<img)([^>])*(src=["\']([^"\']+)["\'])([^>])*/i' : '/(<img)([^>])*(src=["\']?([^"\']+\\.(jpg|jpeg|gif|png))["\']?)([^>])*/i';
     $uriInstance = JURI::getInstance();
     $customHttpPort = trim($this->cparams->get('custom_http_port', ''));
     $getPort = $customHttpPort ? ':' . $customHttpPort : '';
     $customDomain = trim($this->cparams->get('custom_sitemap_domain', ''));
     $getDomain = $customDomain ? rtrim($customDomain, '/') : rtrim($uriInstance->getScheme() . '://' . $uriInstance->getHost(), '/');
     if ($this->cparams->get('append_livesite', true)) {
         $this->liveSite = rtrim($getDomain . $getPort, '/');
     } else {
         $this->liveSite = null;
     }
     // Crawler live site management
     if ($this->cparams->get('sh404sef_multilanguage', 0) && JMapLanguageMultilang::isEnabled()) {
         $lang = '/' . $this->app->input->get('lang');
         // Check if sh404sef insert language code param is off, otherwise the result would be doubled language chunk in liveSiteCrawler
         $sh404SefParams = JComponentHelper::getParams('com_sh404sef');
         if ($sh404SefParams->get('shInsertLanguageCode', 0) || !$sh404SefParams->get('Enabled', 1)) {
             $lang = null;
         }
         $this->liveSiteCrawler = rtrim($getDomain . $getPort . $lang, '/');
     } else {
         $this->liveSiteCrawler = rtrim($getDomain . $getPort, '/');
     }
     $this->setLayout('default');
     parent::display($tpl);
 }
示例#11
0
 /**
  * Default display listEntities
  *        	
  * @access public
  * @param string $tpl
  * @return void
  */
 public function display($tpl = null)
 {
     // Get main records
     $rows = $this->get('Data');
     $lists = $this->get('Filters');
     $doc = JFactory::getDocument();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/indexing.css');
     // Pagination view object model state populated
     $pagination = new JPagination($this->getModel()->getState('numpages', 10) * 10, $this->getModel()->getState('limitstart', 0), 10);
     $this->pagination = $pagination;
     $this->searchword = $this->getModel()->getState('searchword');
     $this->serpsearch = $this->getModel()->getState('serpsearch');
     $this->items = $rows;
     $this->lists = $lists;
     // Aggiunta toolbar
     $this->addDisplayToolbar();
     parent::display('list');
 }
示例#12
0
 /**
  * Display the XML sitemap
  * @access public
  * @return void
  */
 function display($tpl = null)
 {
     $document = $this->document;
     $document->setMimeEncoding('application/xml');
     // Call by cache handler get no params, so recover from model state
     if (!$tpl) {
         $tpl = $this->getModel()->getState('documentformat');
     }
     $this->data = $this->get('SitemapData');
     $this->cparams = $this->getModel()->getState('cparams');
     $this->outputtedLinksBuffer = array();
     $this->application = JFactory::getApplication();
     $this->xslt = $this->getModel()->getState('xslt');
     $uriInstance = JURI::getInstance();
     if ($this->cparams->get('append_livesite', true)) {
         $this->liveSite = rtrim($uriInstance->getScheme() . '://' . $uriInstance->getHost(), '/');
     } else {
         $this->liveSite = null;
     }
     $this->setLayout('default');
     parent::display($tpl);
 }
示例#13
0
 /**
  * Configuration panel rendering for component settings
  *
  * @access public
  * @param string $tpl
  * @return void
  */
 public function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $this->loadValidation($doc);
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/colorpicker.css');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/colorpicker.js');
     // Load specific JS App
     $doc->addScriptDeclaration("\r\n\t\t\t\t\tJoomla.submitbutton = function(pressbutton) {\r\n\t\t\t\t\t\tif(!jQuery.fn.validation) {\r\n\t\t\t\t\t\t\tjQuery.extend(jQuery.fn, jmapjQueryBackup.fn);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t\tjQuery('#adminForm').validation();\r\n\t\t\r\n\t\t\t\t\t\tif (pressbutton == 'cpanel.display') {\r\n\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\tif(jQuery('#adminForm').validate()) {\r\n\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t// Clear SEO stats and fetch new fresh data\r\n\t\t\t\t\t\t\tif( window.sessionStorage !== null ) {\r\n\t\t\t\t\t\t\t\tsessionStorage.removeItem('seostats');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar parentId = jQuery('ul.errorlist').parents('div.tab-pane').attr('id');\r\n\t\t\t\t\t\tjQuery('#tab_configuration a[data-element=' + parentId + ']').tab('show');\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t};\r\n\t\t\t\t");
     $params = $this->get('Data');
     $form = $this->get('form');
     // Bind the form to the data.
     if ($form && $params) {
         $form->bind($params);
     }
     $this->params_form = $form;
     $this->params = $params;
     // Aggiunta toolbar
     $this->addDisplayToolbar();
     // Output del template
     parent::display();
 }
示例#14
0
 /**
  * Default display that renders wizard icons control panel and inject JS APP
  *        	
  * @access public
  * @param string $tpl
  * @return void
  */
 public function display($tpl = null)
 {
     $doc = $this->document;
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $base = JURI::base();
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/wizard.css');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/wizard.js');
     $doc->addScriptDeclaration("var jmap_baseURI='{$base}';");
     // Inject js translations
     $translations = array('COM_JMAP_PROGRESSINFOTITLE1', 'COM_JMAP_PROGRESSINFOSUBTITLE1', 'COM_JMAP_PROGRESSINFOSUBTITLE1_2', 'COM_JMAP_PROGRESSINFOSUBTITLE1_2ERROR', 'COM_JMAP_PROGRESSINFOTITLE2', 'COM_JMAP_PROGRESSINFOSUBTITLE2', 'COM_JMAP_PROGRESSINFOSUBTITLE2_2');
     $this->injectJsTranslations($translations, $doc);
     // get Filter Input to mor security safe
     $filterInput = JFilterInput::getInstance();
     $discoveredExtensions = $this->getModel()->getData(JPATH_COMPONENT . '/images/wizard');
     // Buffer delle icons
     ob_start();
     if (!empty($discoveredExtensions)) {
         foreach ($discoveredExtensions as $discoveredExtension) {
             $dataSourceName = $discoveredExtension['dataSourceName'];
             $extensionName = $discoveredExtension['extensionName'];
             $dataSourceUserViewName = ucfirst(str_replace('_', ' ', $dataSourceName));
             $this->renderIcon('index.php?option=com_jmap&task=wizard.createEntity&extension=' . $filterInput->clean($dataSourceName, 'CMD'), $dataSourceName, $dataSourceUserViewName, $extensionName);
         }
     }
     $contents = ob_get_clean();
     // Assign reference variables
     $this->icons = $contents;
     $this->customIcon = $this->renderCustomDatasourceIcon();
     $this->pluginIcon = $this->renderPluginDatasourceIcon();
     // Aggiunta toolbar
     $this->addDisplayToolbar();
     // Output del template
     parent::display();
 }
示例#15
0
 /**
  * Edit entity view
  *
  * @access public
  * @param Object& $row the item to edit
  * @return void
  */
 public function editEntity(&$row)
 {
     // Sanitize HTML Object2Form
     JFilterOutput::objectHTMLSafe($row);
     $arrayExclusion = array();
     for ($wmo = 1, $maxOperators = 3; $wmo <= $maxOperators; $wmo++) {
         $arrayExclusion[] = 'where' . $wmo . '_operator_maintable';
         for ($wmojt = 1, $maxjtOperators = 3; $wmojt <= $maxjtOperators; $wmojt++) {
             $arrayExclusion[] = 'where' . $wmojt . '_operator_jointable' . $wmo;
         }
     }
     JFilterOutput::objectHTMLSafe($row->sqlquery_managed, ENT_QUOTES, $arrayExclusion);
     // Load JS Client App dependencies
     $doc = JFactory::getDocument();
     $base = JURI::root();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $this->loadJQueryUI($doc);
     // Required for draggable feature
     $this->loadValidation($doc);
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/sources.css');
     $doc->addScriptDeclaration("var jmap_baseURI='{$base}';");
     // Inject js translations
     $translations = array('COM_JMAP_SELECTFIELD', 'COM_JMAP_STORED_PRIORITY', 'COM_JMAP_ERROR_FOR_PRIORITY', 'COM_JMAP_DELETED_PRIORITY', 'COM_JMAP_PRIORITY_MAKE_SELECTIONS', 'COM_JMAP_VALIDATON_ERROR_NOPRIORITY', 'COM_JMAP_PRIORITY_CHOOSE_TO_DELETE');
     $this->injectJsTranslations($translations, $doc);
     // Load specific JS App
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/sources.js');
     $doc->addScriptDeclaration("\n\t\t\t\t\tJoomla.submitbutton = function(pressbutton) {\n\t\t\t\t\t\tjQuery('#adminForm').validation();\n\t\t\t\t\n\t\t\t\t\t\tif (pressbutton == 'sources.cancelEntity') {\n\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tif(jQuery('#adminForm').validate()) {\n\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t");
     $lists = $this->getModel()->getLists($row);
     $this->hasManifest = $this->getModel()->getHasManifest($row);
     $this->hasRouteManifest = $this->getModel()->getHasRouteManifest($row);
     $this->hasCreatedDate = $this->getModel()->getHasCreatedDate($row);
     $this->option = $this->getModel()->getState('option');
     $this->record = $row;
     $this->lists = $lists;
     // Registry sqlquery_managed object
     $this->registrySqlQueryManaged = new JRegistry();
     $this->registrySqlQueryManaged->loadObject($row->sqlquery_managed);
     // Aggiunta toolbar
     $this->addEditEntityToolbar();
     parent::display('edit');
 }
示例#16
0
 /**
  * Edit entity view
  *
  * @access public
  * @param Object& $row the item to edit
  * @return void
  */
 public function editEntity(&$row)
 {
     // Sanitize HTML Object2Form
     JFilterOutput::objectHTMLSafe($row);
     // Detect uri scheme
     $instance = JUri::getInstance();
     $this->urischeme = $instance->isSSL() ? 'https' : 'http';
     // Load JS Client App dependencies
     $doc = JFactory::getDocument();
     $base = JURI::root();
     $this->loadJQuery($doc);
     $this->loadJQueryUI($doc);
     $this->loadBootstrap($doc);
     $this->loadValidation($doc);
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/datasets.css');
     $doc->addScriptDeclaration("var jmap_baseURI='{$base}';");
     $doc->addScriptDeclaration("var jmap_urischeme='{$this->urischeme}';");
     // Inject js translations
     $translations = array('COM_JMAP_SELECTONESOURCE');
     $this->injectJsTranslations($translations, $doc);
     // Load specific JS App
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/jquery.form.min.js');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/datasets.js');
     $doc->addScriptDeclaration("\n\t\t\t\t\t\tJoomla.submitbutton = function(pressbutton) {\n\t\t\t\t\t\t\tif(!jQuery.fn.validation) {\n\t\t\t\t\t\t\t\tjQuery.extend(jQuery.fn, jmapjQueryBackup.fn);\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\tjQuery('#adminForm').validation();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (pressbutton == 'datasets.cancelEntity') {\t\n\t\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\tif(jQuery('#adminForm').validate() && JMapDatasets.validateSelectable()) {\n\t\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t");
     $lists = $this->getModel()->getLists($row);
     $this->option = $this->getModel()->getState('option');
     $this->componentParams = $this->getModel()->getComponentParams();
     $this->record = $row;
     $this->lists = $lists;
     // Aggiunta toolbar
     $this->addEditEntityToolbar();
     parent::display('edit');
 }
示例#17
0
 /**
  * Edit entity view
  *
  * @access public
  * @param Object& $row the item to edit
  * @return void
  */
 public function editEntity(&$row)
 {
     // Sanitize HTML Object2Form
     JFilterOutput::objectHTMLSafe($row);
     // Detect uri scheme
     $instance = JUri::getInstance();
     $this->urischeme = $instance->isSSL() ? 'https' : 'http';
     // Load JS Client App dependencies
     $doc = JFactory::getDocument();
     $base = JURI::root();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $this->loadValidation($doc);
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/pingomatic.css');
     $doc->addScriptDeclaration("var jmap_baseURI='{$base}';");
     $doc->addScriptDeclaration("var jmap_urischeme='{$this->urischeme}';");
     // Inject js translations
     $translations = array('COM_JMAP_SELECTFIELD', 'COM_JMAP_SELECTONESERVICE', 'COM_JMAP_PROGRESSPINGOMATICTITLE', 'COM_JMAP_PROGRESSPINGOMATICSUBTITLE', 'COM_JMAP_PROGRESSPINGOMATICSUBTITLE2SUCCESS', 'COM_JMAP_PROGRESSPINGOMATICSUBTITLE2ERROR', 'COM_JMAP_PROGRESSMODELTITLE', 'COM_JMAP_PROGRESSMODELSUBTITLE', 'COM_JMAP_PROGRESSMODELSUBTITLE2SUCCESS', 'COM_JMAP_PROGRESSMODELSUBTITLE2ERROR', 'COM_JMAP_LOADING');
     $this->injectJsTranslations($translations, $doc);
     // Load specific JS App
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/jquery.form.min.js');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/pingomatic.js');
     $doc->addScriptDeclaration("\r\n\t\t\t\t\t\tJoomla.submitbutton = function(pressbutton) {\r\n\t\t\t\t\t\t\tif(!jQuery.fn.validation) {\r\n\t\t\t\t\t\t\t\tjQuery.extend(jQuery.fn, jmapjQueryBackup.fn);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery('#adminForm').validation();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (pressbutton == 'pingomatic.cancelEntity') {\t\r\n\t\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (pressbutton == 'pingomatic.sendEntity') {\t\r\n\t\t\t\t\t\t\t\t// Start Pingomatic JS APP plugin\r\n\t\t\t\t\t\t\t\tjQuery('#adminForm').Pingomatic({});\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(jQuery('#adminForm').validate()) {\r\n\t\t\t\t\t\t\t\tJoomla.submitform( pressbutton );\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t");
     $lists = $this->getModel()->getLists($row);
     $this->option = $this->getModel()->getState('option');
     $this->record = $row;
     $this->lists = $lists;
     // Aggiunta toolbar
     $this->addEditEntityToolbar();
     parent::display('edit');
 }
示例#18
0
 /**
  * Rendering for installer APP that runs on JSitemap installation iframe
  * @access public
  * @return void
  */
 public function showInstallerApp()
 {
     $doc = JFactory::getDocument();
     $this->loadJQuery($doc);
     $this->loadBootstrap($doc);
     $doc->addStylesheet(JURI::root(true) . '/administrator/components/com_jmap/css/cpanel.css');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_jmap/js/installer.js');
     // Set layout
     $this->setLayout('default');
     // Format data
     parent::display('installer');
 }