client/data/custom_templates.js
author rougeronj
Tue, 22 Sep 2015 15:14:10 +0200
changeset 543 5f7bebdcfc0d
parent 484 cfe440ade6d6
permissions -rw-r--r--
Improve the way we init the view. The data loader send a "loaded" event, hooked by the scene.py and initializing the backbone.history and the view. We don't use redraw_active in save-once and full-json, because it was making the view initialization dependent of these file which are externals. Small fix to hide the "set saved view" button when there is only one view.

var custom_templates = {}

custom_templates['nodeeditor_audio'] = function(obj) {
    obj || (obj = {});
    var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
    function print() { __p += __j.call(arguments, '') }
    with (obj) {
    __p += '<h2>\n    <span class="Rk-CloseX">&times;</span>\n    ';
     if (options.show_node_tooltip_color) { ;
    __p += '\n        <span class="Rk-UserColor" style="background: ' +
    __e(node.color) +
    ';"></span>\n    ';
     } ;
    __p += '\n    <span class="Rk-Display-Title">\n        ';
     if (node.uri) { ;
    __p += '\n            <a href="' +
    __e(node.uri) +
    '" target="_blank">\n        ';
     } ;
    __p += '\n        ' +
    __e(node.title) +
    '\n        ';
     if (node.uri) { ;
    __p += '</a>';
     } ;
    __p += '\n    </span>\n</h2>\n';
     if (node.uri && options.show_node_tooltip_uri) { ;
    __p += '\n     <audio width="320" height="240" controls>\n        <source src="' +
    __e(node.uri) +
    '" type="video/mp4">\n     </video> \n';
     } ;
    __p += '\n    <a href="#?idnode=' +
    __e(node._id) +
    '">' +
    __e(renkan.translate("Link to the node")) +
    '</a>\n';

    }
    return __p
};