client/test/test-readonly-custom-templates-youtube.html
author ymh <ymh.work@gmail.com>
Sun, 14 Jul 2024 22:00:08 +0200
changeset 666 9d6550026232
parent 647 eaaa1efce396
permissions -rw-r--r--
Added tag V00.13.04 for changeset 69d13e7dd286
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
647
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<!DOCTYPE html>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
<html lang="fr">
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
    <head>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
        <meta charset="utf-8" />
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
        <title>RENKAN test in read-only mode : body 100%</title>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
        <meta name="description" content="" />
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
        <meta name="author" content="Institut de Recherche et d'Innovation" />
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
        <script src="../lib/jquery/jquery.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
        <script src="../lib/jquery-mousewheel/jquery.mousewheel.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
        <script src="../lib/lodash/lodash.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
        <script src="../lib/backbone/backbone.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
        <script src="../lib/backbone-relational/backbone-relational.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
        <script src="../lib/paper/paper-full.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
        <script src="../js/main.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
        <script src="../js/dataloader.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
        <script src="../js/router.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
        <script src="../js/models.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
        <script src="../js/defaults.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
        <script src="../js/i18n.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        <script src="../dist/js/templates.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
        <script src="../js/full-json.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
        <script src="../js/ldtjson-bin.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
        <script src="../js/list-bin.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
        <script src="../js/wikipedia-bin.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
        <script type="text/javascript">
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
        function get_youtube_id(url) {
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
            var regExp = /^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
            var match = url.match(regExp);
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
            if (match && match[2].length == 11) {
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
                return match[2];
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
            } else {
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
                return false;
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
            }
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
        }
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
        </script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
        <script src="../data/templates/youtube_template.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
        <script data-main="../js/main-renderer.js" src="../lib/requirejs/require.js"></script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
        <script type="text/javascript">
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
            var custom_templates = {
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
                'nodeeditor_youtube': this["renkanJSTTest"]["test/templates/youtube_template.html"]
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
            };
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
            function startRenkan(){
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
            	var _renkan = new Rkns.Renkan({
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
                    editor_mode: false,
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
                    show_bins: false,
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
                    static_url: "../",
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
                    templates: custom_templates,
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
                    node_editor_templates: {
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
                        "youtube": "nodeeditor_youtube"
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
                    }
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
                });
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
                Rkns.jsonIO(_renkan, {
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
                    url: "../data/json/example-cinema-youtube.json"
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
                });
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
            };
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
        </script>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
        <link rel="stylesheet" href="../css/renkan.css" />
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
        <style type="text/css">
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
        </style>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
    </head>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
    <body>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
        <div id="renkan"></div>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
    </body>
eaaa1efce396 add examples for youtube node types, add a way to open node urls with a single click
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
</html>