From b0362c180e775de6feffef35115348fffcd8c94a Mon Sep 17 00:00:00 2001 From: Kesav Kolla <kesavkolla+github@gmail.com> Date: Mon, 9 Jan 2017 09:50:21 -0800 Subject: [PATCH 1/3] Update index.html Added support for collaboration using Togetherjs --- src/main/resources/ui/sqlfiddle/www/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/ui/sqlfiddle/www/index.html b/src/main/resources/ui/sqlfiddle/www/index.html index 690c78b..f005699 100644 --- a/src/main/resources/ui/sqlfiddle/www/index.html +++ b/src/main/resources/ui/sqlfiddle/www/index.html @@ -91,6 +91,8 @@ <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a> </li> + <li> + <a id="collaborate" href="#"><i class="icon-usr"></i>Collaborate</a> <li class="optional"> <a href="about.html"><i class="icon-info-sign"></i>About</a> @@ -322,5 +324,6 @@ <h3>Formatted Text Table to DDL</h3> var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> + <script src="https://togetherjs.com/togetherjs-min.js"></script> </body> -</html> \ No newline at end of file +</html> From e6ea7769652171eb821738b57910856c2ebde5d5 Mon Sep 17 00:00:00 2001 From: Kesav Kolla <kesavkolla+github@gmail.com> Date: Mon, 9 Jan 2017 09:53:20 -0800 Subject: [PATCH 2/3] Update main.js Added support for launching collaboration using TogetherJS --- src/main/resources/ui/sqlfiddle/www/javascript/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/ui/sqlfiddle/www/javascript/main.js b/src/main/resources/ui/sqlfiddle/www/javascript/main.js index 2f9b065..58f89a5 100644 --- a/src/main/resources/ui/sqlfiddle/www/javascript/main.js +++ b/src/main/resources/ui/sqlfiddle/www/javascript/main.js @@ -158,7 +158,12 @@ require([ $('#fiddleFormDDL .CodeMirror, .ddl_actions').css('display', 'block'); $('#browser, .browser_actions').css('display', 'none'); - }) + }); + $("#collaborate").on('click', function(e) { + e.preventDefault(); + TogetherJS(this); + return false; + }); /* RESIZING UI*/ From 1e61f015d1fe074486816ecd21ca3bef3a40466f Mon Sep 17 00:00:00 2001 From: Kesav Kolla <kesavkolla+github@gmail.com> Date: Mon, 9 Jan 2017 09:54:31 -0800 Subject: [PATCH 3/3] Update index.html --- src/main/resources/ui/sqlfiddle/www/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/ui/sqlfiddle/www/index.html b/src/main/resources/ui/sqlfiddle/www/index.html index f005699..ff97e6f 100644 --- a/src/main/resources/ui/sqlfiddle/www/index.html +++ b/src/main/resources/ui/sqlfiddle/www/index.html @@ -92,7 +92,7 @@ </li> <li> - <a id="collaborate" href="#"><i class="icon-usr"></i>Collaborate</a> + <a id="collaborate" href="#"><i class="icon-user"></i>Collaborate</a> <li class="optional"> <a href="about.html"><i class="icon-info-sign"></i>About</a>