Page 1 of 1
[invalid] cms_jquery tag output and documentation
Posted: Wed Mar 15, 2017 9:22 am
by deactivated010521
While testing the cms_jquery tag I found out the output starts with:
this can break a cms page.
Code: Select all
{cms_jquery cdn='true' include_css=0}
output:
Code: Select all
</__script>
<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></__script>
<__script__ type="text/javascript" src="//cmsms.biesheuvel.lan/lib/jquery/js/jquery.mjs.nestedSortable.js"></__script>
<__script__ type="text/javascript" src="//cmsms.biesheuvel.lan/lib/jquery/js/jquery.json-2.4.min.js"></__script>
<__script__ type="text/javascript" src="//cmsms.biesheuvel.lan/lib/jquery/js/jquery-migrate-1.2.1.min.js"></__script>
documentation:
Also the documentation is not in sync with the output, the tag help file reads:
Code: Select all
>Known Scripts:
jQuery(1.11.1)
jQuery-UI(1.8.21)
nestedSortable(1.3.4)
json(2.3)
migrate(2.3)
Re: cms_jquery tag output and documentation
Posted: Wed Mar 15, 2017 3:47 pm
by calguy1000
I could not reproduce this issue.
When I used the tag you specified, I got this in my html output:
Code: Select all
<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></__script>
<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></__script>
<__script__ type="text/javascript" src="//calguy1000.dynu.com/cms2_adodb/lib/jquery/js/jquery.mjs.nestedSortable.js"></__script>
<__script__ type="text/javascript" src="//calguy1000.dynu.com/cms2_adodb/lib/jquery/js/jquery.json-2.4.min.js"></__script>
<__script__ type="text/javascript" src="//calguy1000.dynu.com/cms2_adodb/lib/jquery/js/jquery-migrate-1.2.1.min.js"></__script>
Re: cms_jquery tag output and documentation
Posted: Wed Mar 15, 2017 4:49 pm
by Rolf
I added in template:
Code: Select all
<!-- ========================================================= -->
{cms_jquery cdn='true' include_css=0}
<!-- ========================================================= -->
Code: Select all
<!-- ========================================================= -->
<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></__script>
<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></__script>
<__script__ type="text/javascript" src="//localhost/trunk/lib/jquery/js/jquery.mjs.nestedSortable.js"></__script>
<__script__ type="text/javascript" src="//localhost/trunk/lib/jquery/js/jquery.json-2.4.min.js"></__script>
<__script__ type="text/javascript" src="//localhost/trunk/lib/jquery/js/jquery-migrate-1.2.1.min.js"></__script>
<!-- ========================================================= -->
Re: cms_jquery tag output and documentation
Posted: Wed Mar 15, 2017 4:54 pm
by Rolf
function cms_get_jquery:
Code: Select all
// Scripts to include
$scripts['jquery'] = array('cdn'=>'https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js',
'local'=>$basePath.'/lib/jquery/js/jquery-1.11.1.min.js',
'aliases'=>array('jquery.min.js','jquery',));
$scripts['jquery-ui'] = array('cdn'=>'https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js',
'local'=>$basePath.'/lib/jquery/js/jquery-ui-1.10.4.custom.min.js',
'aliases'=>array('jquery-ui.min.js','ui'),
'css'=>$basePath.'/lib/jquery/css/smoothness/jquery-ui-1.10.4.custom.min.css');
$scripts['nestedSortable'] = array('local'=>$basePath.'/lib/jquery/js/jquery.mjs.nestedSortable.js');
$scripts['json'] = array('local'=>$basePath.'/lib/jquery/js/jquery.json-2.4.min.js');
$scripts['migrate'] = array('local'=>$basePath.'/lib/jquery/js/jquery-migrate-1.2.1.min.js');
Help text
>Known Scripts:
jQuery(1.11.1)
jQuery-UI(1.8.21)
nestedSortable(1.3.4)
json(2.3)
migrate(2.3)
Re: cms_jquery tag output and documentation
Posted: Wed Mar 15, 2017 5:01 pm
by deactivated010521
Excuse me, don't know what happened cleared the cache and added the tag again. Everything looks fine so mark as [false].
Re: [invalid] cms_jquery tag output and documentation
Posted: Wed Mar 15, 2017 5:58 pm
by Rolf
Help text updated.