diff options
author | Jayaram R Pai | 2014-09-08 17:35:39 +0530 |
---|---|---|
committer | Jayaram R Pai | 2014-09-08 17:35:39 +0530 |
commit | d349c35d31b4ccf1bcc7c26a408cada3be38169e (patch) | |
tree | 5ba102abbc3d1f57853bf0db0fe6a039e56b16f1 /static/website/templates | |
parent | e894b2919c54a1cf577ec170cd9e6d99bedc6da9 (diff) | |
download | scilab-on-cloud-d349c35d31b4ccf1bcc7c26a408cada3be38169e.tar.gz scilab-on-cloud-d349c35d31b4ccf1bcc7c26a408cada3be38169e.tar.bz2 scilab-on-cloud-d349c35d31b4ccf1bcc7c26a408cada3be38169e.zip |
converted ajax views to dajaxice
Diffstat (limited to 'static/website/templates')
-rw-r--r-- | static/website/templates/ajax-books.html | 3 | ||||
-rw-r--r-- | static/website/templates/ajax-chapters.html | 1 | ||||
-rw-r--r-- | static/website/templates/ajax-examples.html | 1 | ||||
-rw-r--r-- | static/website/templates/ajax-execute.html | 4 | ||||
-rw-r--r-- | static/website/templates/index.html | 42 |
5 files changed, 14 insertions, 37 deletions
diff --git a/static/website/templates/ajax-books.html b/static/website/templates/ajax-books.html index a7eba3e..cf12559 100644 --- a/static/website/templates/ajax-books.html +++ b/static/website/templates/ajax-books.html @@ -3,7 +3,8 @@ <select id="books"> <option value="">Select Book</option> {% for book in books %} - <option value="{{ book.id }}">{{ book.book }}</option> + <option value="{{ book.id }}">{{ book.book }} (by {{ book.author }})</option> {% endfor %} </select> {% endif %} +<a href="#" class="extra-link" id="download-book">Download Book</a> diff --git a/static/website/templates/ajax-chapters.html b/static/website/templates/ajax-chapters.html index e9ef640..5f39ba5 100644 --- a/static/website/templates/ajax-chapters.html +++ b/static/website/templates/ajax-chapters.html @@ -7,3 +7,4 @@ {% endfor %} </select> {% endif %} +<a href="#" class="extra-link" id="download-chapter">Download Chapter</a> diff --git a/static/website/templates/ajax-examples.html b/static/website/templates/ajax-examples.html index c69e5c7..f95bf7a 100644 --- a/static/website/templates/ajax-examples.html +++ b/static/website/templates/ajax-examples.html @@ -7,3 +7,4 @@ {% endfor %} </select> {% endif %} +<a href="#" class="extra-link" id="download-example">Download Example</a> diff --git a/static/website/templates/ajax-execute.html b/static/website/templates/ajax-execute.html deleted file mode 100644 index cb7ac66..0000000 --- a/static/website/templates/ajax-execute.html +++ /dev/null @@ -1,4 +0,0 @@ -<div> - <span id="output">{{ output }}</span> - <span id="plot">{% if plot_path %}<img src="{{ plot_path }}" style="width:400px;">{% endif %}</span> -</div> diff --git a/static/website/templates/index.html b/static/website/templates/index.html index bc06ea3..50dee60 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -1,4 +1,5 @@ {% load static %} +{% load dajaxice_templatetags %} <html> <head> <title>Scilab on Cloud</title> @@ -7,6 +8,7 @@ <link href="{% static 'website/css/fullscreen.css'%}" rel="stylesheet"/> <link href="{% static 'website/css/monokai.css' %}" rel="stylesheet"/> <link href="{% static 'website/css/main.css' %}" rel="stylesheet"/> + {% dajaxice_js_import %} </head> <body> <div id="header-wrapper"> @@ -24,11 +26,11 @@ <li><a href="#">Contact Us</a></li> <img id="scilab-logo" src="{% static 'website/images/scilab-logo.png'%}" width="100px"> </ul> + <div class="clearfix"></div> </div> <!-- /#navlinks --> </div> <!-- /#topbar --> </div> <!-- /#header-inner --> </div> <!-- /#header-wrapper --> - <div id="content-wrapper"> <div id="content-inner"> <div id="selectors"> @@ -49,7 +51,8 @@ <option value="6">Signal Processing</option> <option value="4">Thermodynamics</option> <option value="13">Others</option> - </select> + </select> + <a href="#" class="extra-link" id="contributor">Contributor</a> </div> <div id="books-wrapper"></div> <div id="chapters-wrapper"></div> @@ -103,43 +106,18 @@ </div> <!-- /#content-inner --> </div> <!-- /#content-wrapper --> - <div id="lightbox-me-wrapper"> - <div id="lightbox-me"></div> - </div> <!-- /#lightbox-me-wrapper --> + <div id="lightbox-me-wrapper"> + <div id="lightbox-me"></div> + </div> <!-- /#lightbox-me-wrapper --> + <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> + <script src="{% static '/static/dajax/jquery.dajax.core.js' %}"></script> <script src="{% static 'website/js/codemirror.js'%}"></script> <script src="{% static 'website/js/javascript.js'%}"></script> <script src="{% static 'website/js/fullscreen.js'%}"></script> <script src="{% static 'website/js/placeholder.js'%}"></script> <script src="{% static 'website/js/lightbox_me.js'%}"></script> <script src="{% static 'website/js/cloud.js'%}"></script> - <script> - var editor = CodeMirror.fromTextArea(document.getElementById("code"), { - lineNumbers: true, - lineWrapping: true, - theme: "default", - extraKeys: { - "F11": function(cm) { - cm.setOption("fullScreen", !cm.getOption("fullScreen")); - }, - "Esc": function(cm) { - if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); - } - } - }); - var result = CodeMirror.fromTextArea(document.getElementById("result"), { - lineWrapping: true, - theme: "default", - extraKeys: { - "F11": function(cm) { - cm.setOption("fullScreen", !cm.getOption("fullScreen")); - }, - "Esc": function(cm) { - if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); - } - } - }); - </script> {% csrf_token %} </body> </html> |