Project

General

Profile

Feature #3617

Load javascripts at bottom

Added by Benjamin Baer about 3 years ago. Updated 6 months ago.

Status:
Some day maybe
Priority:
Normal
Assignee:
-
Target version:
Start date:
24.04.2017
Due date:
% Done:

0%

Estimated time:
Discuss:

Description

Ist Zustand:

<script>
$(function () {
    'use strict';
    QfqNS.Log.level = 0;

    var qfqPage = new QfqNS.QfqPage({
        tabsId: 'qfqTabs',
        formId: 'qfq-form-58fda8ec26d14',
        submitTo: 'typo3conf/ext/qfq/qfq/api/save.php',
        deleteUrl: '',
        refreshUrl: 'typo3conf/ext/qfq/qfq/api/load.php',
        fileUploadTo: 'typo3conf/ext/qfq/qfq/api/file.php?action=upload',
        fileDeleteUrl: 'typo3conf/ext/qfq/qfq/api/file.php?action=delete'
    });

    var qfqRecordList = new QfqNS.QfqRecordList('typo3conf/ext/qfq/qfq/api/delete.php');
})
</script>

Soll: Keine scripts mehr im HTML.

Umesetzungsvorschlag:

  • HTML Seite
    <form class="qfq-setup" data-log="0" data-tabs-id="qfqTabs" data-form-id="qfq-form-58fda8ec26d14" data-submit="typo3conf/ext/qfq/qfq/api/load.php" 
      data-delete="" data-refresh="typo3conf/ext/qfq/qfq/api/load.php" data-file-upload-to="typo3conf/ext/qfq/qfq/api/file.php?action=upload" 
      data-delete-url="typo3conf/ext/qfq/qfq/api/file.php?action=delete" data-initialize="typo3conf/ext/qfq/qfq/api/delete.php"> ... </form>
    
  • Script
    $(".qfq-setup").each(function () {
        'use strict';
        QfqNS.Log.level = $(this).data("log");
    
        var qfqPage = new QfqNS.QfqPage({
            tabsId: $(this).data("tabs-id"),
            formId: $(this).data("form-id"),
            submitTo: $(this).data("submit"),
            deleteUrl: $(this).data("delete"),
            refreshUrl: $(this).data("refresh"),
            fileUploadTo: $(this).data("upload-to"),
            fileDeleteUrl: $(this).data("delete-url")
        });
    
        var qfqRecordList = new QfqNS.QfqRecordList($(this).data("initialize"));
    });
    

History

#1 Updated by Benjamin Baer about 3 years ago

Alternative - ausfuehren nach window.onload event

<script>
window.onload = function () {
    'use strict';
    QfqNS.Log.level = 0;

    var qfqPage = new QfqNS.QfqPage({
        tabsId: 'qfqTabs',
        formId: 'qfq-form-58fda8ec26d14',
        submitTo: 'typo3conf/ext/qfq/qfq/api/save.php',
        deleteUrl: '',
        refreshUrl: 'typo3conf/ext/qfq/qfq/api/load.php',
        fileUploadTo: 'typo3conf/ext/qfq/qfq/api/file.php?action=upload',
        fileDeleteUrl: 'typo3conf/ext/qfq/qfq/api/file.php?action=delete'
    });

    var qfqRecordList = new QfqNS.QfqRecordList('typo3conf/ext/qfq/qfq/api/delete.php');
}
</script>

#2 Updated by Carsten Rose over 2 years ago

  • Target version set to next4

#3 Updated by Carsten Rose over 2 years ago

  • Tracker changed from Support to Feature

#4 Updated by Carsten Rose 6 months ago

  • Status changed from New to Some day maybe

Also available in: Atom PDF