Mailing List Archive

Mythweb Javascript issues
Hi all,

After upgrading to the latest MythTV dist, I'm getting Javascript issues
due to the age of the jquery & prototype libraries.

The fix is to grab the latest versions from googleapis.com, and moving the
recommend definitions up a bit. Eg by applying the following diff to
modules/_shared/tmpl/default/header.php -

89a90,99
> <script type="text/javascript">
> <!--
> //
-----------------------------------------------------------------------------
> // - Setup variables for use with the recommend engines
> //
-----------------------------------------------------------------------------
> var recommend_enabled = "<?php echo
setting('recommend_enabled', null); ?>";
> var recommend_server = "<?php echo setting('recommend_server',
null); ?>";
> var recommend_key = "<?php echo setting('recommend_key',
null); ?>";
> // -->
> </script>
91d100
< <script type="text/javascript" src="js/prototype.js"></script>
92a102,103
> <!--
> <script type="text/javascript" src="js/prototype.js"></script>
93a105,108
> -->
> <script src="
https://ajax.googleapis.com/ajax/libs/prototype/1.7.3.0/prototype.js
"></script>
> <script src="
https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
>
102,112d116
<
< <script type="text/javascript">
< <!--
< //
-----------------------------------------------------------------------------
< // - Setup variables for use with the recommend engines
< //
-----------------------------------------------------------------------------
< var recommend_enabled = <?php echo setting('recommend_enabled',
null); ?>;
< var recommend_server = "<?php echo setting('recommend_server',
null); ?>";
< var recommend_key = "<?php echo setting('recommend_key',
null); ?>";
< // -->
< </script>


Steve
Re: Mythweb Javascript issues [ In reply to ]
On 09/05/17 20:07, Steve Campbell wrote:
> Hi all,
>
> After upgrading to the latest MythTV dist, I'm getting Javascript issues
> due to the age of the jquery & prototype libraries.
>
> The fix is to grab the latest versions from googleapis.com
> <http://googleapis.com>, and moving the recommend definitions up a bit.
> Eg by applying the following diff to
> modules/_shared/tmpl/default/header.php -
>
> 89a90,99
>> <script type="text/javascript">
>> <!--
>> // -----------------------------------------------------------------------------
>> // - Setup variables for use with the recommend engines
>> // -----------------------------------------------------------------------------
>> var recommend_enabled = "<?php echo setting('recommend_enabled', null); ?>";
>> var recommend_server = "<?php echo setting('recommend_server', null); ?>";
>> var recommend_key = "<?php echo setting('recommend_key', null); ?>";
>> // -->
>> </script>
> 91d100
> < <script type="text/javascript" src="js/prototype.js"></script>
> 92a102,103
>> <!--
>> <script type="text/javascript" src="js/prototype.js"></script>
> 93a105,108
>> -->
>> <script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.3.0/prototype.js"></script>
>> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
>>
> 102,112d116
> <
> < <script type="text/javascript">
> < <!--
> < //
> -----------------------------------------------------------------------------
> < // - Setup variables for use with the recommend engines
> < //
> -----------------------------------------------------------------------------
> < var recommend_enabled = <?php echo
> setting('recommend_enabled', null); ?>;
> < var recommend_server = "<?php echo
> setting('recommend_server', null); ?>";
> < var recommend_key = "<?php echo setting('recommend_key',
> null); ?>";
> < // -->
> < </script>
>
>
> Steve
>

Can you create a unified diff ("diff -u" or "git diff") and create a
ticket in trac with that please?


Regards
Stuart

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org