Version 1
[yaffs-website] / web / modules / contrib / devel / webprofiler / js / app / views / details.js
diff --git a/web/modules/contrib/devel/webprofiler/js/app/views/details.js b/web/modules/contrib/devel/webprofiler/js/app/views/details.js
new file mode 100644 (file)
index 0000000..709f17e
--- /dev/null
@@ -0,0 +1,20 @@
+(function ($, Drupal, Backbone) {
+
+  "use strict";
+
+  Drupal.webprofiler.views.DetailsView = Backbone.View.extend({
+    el: '#details',
+
+    /**
+     *
+     * @returns {Drupal.webprofiler.views.DetailsView}
+     */
+    render: function () {
+      var template = _.template($("script#" + this.model.get('name')).html());
+
+      this.$el.html(template(this.model.toJSON()));
+      return this;
+    }
+  });
+
+}(jQuery, Drupal, Backbone));