Remove type= from script tags

This commit is contained in:
Laurent Destailleur 2020-08-16 22:03:11 +02:00
parent fadadc992f
commit c407a19563
14 changed files with 25 additions and 29 deletions

View File

@ -40,7 +40,7 @@ $langs->load("modulebuilder");
?>
<!-- BEGIN PHP TEMPLATE admin_extrafields_add.tpl.php -->
<script type="text/javascript">
<script>
jQuery(document).ready(function() {
function init_typeoffields(type)
{

View File

@ -39,7 +39,7 @@ $langs->load("modulebuilder");
?>
<!-- BEGIN PHP TEMPLATE admin_extrafields_edit.tpl.php -->
<script type="text/javascript">
<script>
jQuery(document).ready(function() {
function init_typeoffields(type)
{

View File

@ -19,7 +19,7 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
}
print '<script type="text/javascript" language="javascript">
print '<script>
$(document).ready(function() {
// Click Function

View File

@ -25,7 +25,7 @@ if (empty($conf) || !is_object($conf))
?>
<!-- START TEMPLATE FILE UPLOAD MAIN -->
<script type="text/javascript">
<script>
window.locale = {
"fileupload": {
"errors": {

View File

@ -31,7 +31,7 @@ if ($object->element == 'propal')
?>
<!-- START TEMPLATE IMPORT OBJECT LINKED LINES -->
<script type="text/javascript">
<script>
$(document).ready(function(){
$('.objectlinked_importbtn').click(function (e) {

View File

@ -32,7 +32,7 @@ if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object->
<!-- BEGIN PHP TEMPLATE bloc_showhide.tpl.php -->
<?php
print '<script type="text/javascript">'."\n";
print '<script>'."\n";
print '$(document).ready(function() {'."\n";
print '$("#hide-'.$blocname.'").click(function(){'."\n";
print ' setShowHide(0);'."\n";

View File

@ -207,7 +207,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
{
print "\n";
print '
<script type="text/javascript">
<script>
jQuery(document).ready(function() {
function showOptions(child_list, parent_list)
{

View File

@ -101,7 +101,7 @@ if ((!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
if ((empty($section) || $section == -1) && ($module != 'medias'))
{
?>
<script type="text/javascript">
<script>
jQuery(document).ready(function() {
jQuery('#<?php echo $nameforformuserfile ?>').hide();
});

View File

@ -79,7 +79,7 @@ if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
?>
<?php if (empty($conf->dol_use_jmobile)) { ?>
<script type="text/javascript">
<script>
$(document).ready(function () {
/* Set focus on correct field */
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
@ -356,23 +356,22 @@ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
}
}
// Google Adsense
// TODO Replace this with a hook
// Google Adsense (need Google module)
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT))
{
if (empty($conf->dol_use_jmobile))
{
?>
<div class="center"><br>
<script type="text/javascript"><!--
<script><!--
google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<?php
}

View File

@ -224,7 +224,7 @@ if ($nolinesbefore) {
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_CUSTOMER_PRODUCTS))
{
?>
<script type="text/javascript">
<script>
$(document).ready(function(){
// On first focus on a select2 combo, auto open the menu (this allow to use the keyboard only)
$(document).on('focus', '.select2-selection.select2-selection--single', function (e) {
@ -259,7 +259,7 @@ if ($nolinesbefore) {
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS))
{
?>
<script type="text/javascript">
<script>
$(document).ready(function(){
// On first focus on a select2 combo, auto open the menu (this allow to use the keyboard only)
$(document).on('focus', '.select2-selection.select2-selection--single', function (e) {

View File

@ -272,7 +272,7 @@ if (!empty($extrafields))
print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start ? 0 : 1, "updateline", 1, 0);
print ' '.$langs->trans('to').' ';
print $form->selectDate($line->date_end, 'date_end', $hourmin, $hourmin, $line->date_end ? 0 : 1, "updateline", 1, 0);
print '<script type="text/javascript">';
print '<script>';
if (!$line->date_start) {
if (isset($conf->global->MAIN_DEFAULT_DATE_START_HOUR)) {
print 'jQuery("#date_starthour").val("'.$conf->global->MAIN_DEFAULT_DATE_START_HOUR.'");';
@ -297,7 +297,7 @@ if (!empty($extrafields))
?>
<script type="text/javascript">
<script>
jQuery(document).ready(function()
{

View File

@ -148,7 +148,7 @@ if (!empty($conf->don->enabled))
if (!empty($conf->use_javascript_ajax))
{
print "\n".'<script type="text/javascript">';
print "\n".'<script>';
print '$(document).ready(function () {
$("#generate_token").click(function() {
$.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", {

View File

@ -58,7 +58,7 @@ $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode('logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
<?php if (empty($conf->dol_use_jmobile)) { ?>
<script type="text/javascript">
<script>
$(document).ready(function () {
// Set focus on correct field
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
@ -246,23 +246,22 @@ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID))
}
}
// Google Adsense
// TODO Replace this with a hook
// Google Adsense (need Google module)
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT))
{
if (empty($conf->dol_use_jmobile))
{
?>
<div class="center"><br>
<script type="text/javascript"><!--
<script><!--
google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<?php
}

View File

@ -417,16 +417,14 @@ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIEN
if (empty($conf->dol_use_jmobile))
{
print '<div align="center">'."\n";
print '<script type="text/javascript"><!--'."\n";
print '<script><!--'."\n";
print 'google_ad_client = "'.$conf->global->MAIN_GOOGLE_AD_CLIENT.'";'."\n";
print 'google_ad_slot = "'.$conf->global->MAIN_GOOGLE_AD_SLOT.'";'."\n";
print 'google_ad_width = '.$conf->global->MAIN_GOOGLE_AD_WIDTH.';'."\n";
print 'google_ad_height = '.$conf->global->MAIN_GOOGLE_AD_HEIGHT.';'."\n";
print '//-->'."\n";
print '</script>'."\n";
print '<script type="text/javascript"'."\n";
print 'src="http://pagead2.googlesyndication.com/pagead/show_ads.js">'."\n";
print '</script>'."\n";
print '<script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>'."\n";
print '</div>'."\n";
} else {
print '<!-- google js advert tag disabled with jmobile -->'."\n";