Commits

Miha Stajdohar  committed 42f256a

Added disqus.

  • Participants
  • Parent commits 1e28298

Comments (0)

Files changed (3)

File benchmarks/static/benchmarks/js/app.js

                 maxHeight: 200,
                 enableFiltering: true,
                 enableCaseInsensitiveFiltering: true,
-                buttonText: function (options) {
-                    if (options.length == 0) {
-                        return element.data()['placeholder'] + ' <b class="caret"></b>';
-                    } else if (options.length > 1) {
-                        return _.first(options).text
-                            + ' + ' + (options.length - 1)
-                            + ' more selected <b class="caret"></b>';
-                    } else {
-                        return _.first(options).text
-                            + ' <b class="caret"></b>';
-                    }
-                },
+
                 // Replicate the native functionality on the elements so
                 // that angular can handle the changes for us.
                 onChange: function (optionElement, checked) {

File benchmarks/static/benchmarks/js/controllers.js

             }
         }
     );
+
+    if (bookmarkId !== undefined) {
+        setTimeout(function () {
+            var disqus_shortname = 'benguru';
+            (function () {
+                var dsq = document.createElement('script');
+                dsq.type = 'text/javascript';
+                dsq.async = true;
+                dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+                (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+            })();
+        }, 2000);
+    }
 }
 
 function BookmarksCtrl($scope, $filter, ngTableParams, Bookmark) {

File benchmarks/static/benchmarks/partials/benchmarks.html

     </div>
 </div>
 
+<div class='row' style='margin-top: 50px; margin-bottom: 50px;'>
+    <div class='col-md-12'>
+        <div id="disqus_thread"></div>
+    </div>
+</div>