Added GUID to selected views, and started updating JCB accordingly.

This commit is contained in:
2020-01-03 03:41:55 +02:00
parent a317ba855f
commit 46e52db097
122 changed files with 7142 additions and 6262 deletions

View File

@ -35,6 +35,7 @@ JHtml::_('behavior.keepalive');
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
<div id="snippets-github" class="bulk-updater-toggler">
<br /><br /><br />
<center><h1> <?php echo JText::_('COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES'); ?> <br /><?php echo JText::_('COM_COMPONENTBUILDER_LOADING'); ?>.<span class="loading-dots">.</span></h1></center>
@ -233,7 +234,7 @@ jQuery(document).ready( function($) {
?>
function JRouter(link) {
<?php
if ($app->isSite())
if ($app->isClient('site'))
{
echo 'var url = "'.JURI::root().'";';
}

View File

@ -128,6 +128,7 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
$local_snippets[$path] = $item;
}
}
// Add the JavaScript for JStore
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jquery.json.min.js');
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jstorage.min.js');
@ -161,6 +162,8 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
// set to use no storage
$expire = 30000; // only 30 seconds
}
// Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
// set snippet path
$this->document->addScriptDeclaration("var snippetPath = '". ComponentbuilderHelper::$snippetPath ."';");
$this->document->addScriptDeclaration("var snippetsPath = '". ComponentbuilderHelper::$snippetsPath ."';");
@ -230,8 +233,6 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
}
}
");
// Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
// load the local snippets
if (ComponentbuilderHelper::checkArray($this->items))
{