Project

General

Profile

Actions

Feature #3617

open

Load javascripts at bottom

Added by Benjamin Baer about 7 years ago. Updated over 4 years ago.

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

0%

Estimated time:
Discuss:
Prio Planung:
Vote:

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"));
    });
    
Actions #1

Updated by Benjamin Baer about 7 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>
Actions #2

Updated by Carsten Rose over 6 years ago

  • Target version set to next9
Actions #3

Updated by Carsten Rose over 6 years ago

  • Tracker changed from Support to Feature
Actions #4

Updated by Carsten Rose over 4 years ago

  • Status changed from New to Some day maybe
Actions

Also available in: Atom PDF