[sagenb] 96/157: Fix the live 3D checkbox

felix salfelder felix-guest at moszumanska.debian.org
Mon Dec 22 16:51:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository sagenb.

commit cea7eb4943efac32d9b6e36c0a4d7177b4c60154
Author: Volker Braun <vbraun.name at gmail.com>
Date:   Sun Oct 5 15:10:45 2014 +0100

    Fix the live 3D checkbox
---
 sagenb/data/sage/html/notebook/base.html | 18 ++++++++++++++----
 sagenb/data/sage/js/notebook_lib.js      |  9 +++++++++
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/sagenb/data/sage/html/notebook/base.html b/sagenb/data/sage/html/notebook/base.html
index 64b5dc8..21681ff 100644
--- a/sagenb/data/sage/html/notebook/base.html
+++ b/sagenb/data/sage/html/notebook/base.html
@@ -138,11 +138,21 @@ INPUT:
             </option>
             {% endfor %}
         </select>    
-        <input type="checkbox" title="{{ gettext('Enable/disable pretty_printing') }}"
+        <input type="checkbox" 
+               title="{{ gettext('Enable/disable pretty_printing') }}"
                onchange="pretty_print_check(this.checked);"
-               class="worksheet" value="pretty_print" {{ "checked" if worksheet.pretty_print() else "" }} /> Typeset
-        <input id="3D_check", type="checkbox" title="{{ gettext('Load 3-D Live. Not recommended for worksheets with > 2 3-D Plots.') }}"
-               class="worksheet" value="live_3D" {{ "checked" if worksheet.live_3D() else "" }} /> {{ gettext('Load 3-D Live') }}
+               class="worksheet" 
+               value="pretty_print" 
+               {{ "checked" if worksheet.pretty_print() else "" }} 
+               /> Typeset
+        <input id="3D_check", 
+               type="checkbox" 
+               onchange="live_3D_check(this.checked);"
+               title="{{ gettext('Load 3-D Live. Not recommended for worksheets with > 2 3-D Plots.') }}"
+               class="worksheet" 
+               value="live_3D" 
+               {{ "checked" if worksheet.live_3D() else "" }} 
+               /> {{ gettext('Load 3-D Live') }}
         {% endif %}
     {% endif %} 
     </div>
diff --git a/sagenb/data/sage/js/notebook_lib.js b/sagenb/data/sage/js/notebook_lib.js
index a212b20..74c7756 100644
--- a/sagenb/data/sage/js/notebook_lib.js
+++ b/sagenb/data/sage/js/notebook_lib.js
@@ -1817,6 +1817,15 @@ function pretty_print_check(s) {
     async_request(worksheet_command('pretty_print/' + s));
 }
 
+function live_3D_check(s) {
+    /*
+    Send a message back to the server either turn live 3D on or off.
+
+    INPUT:
+        s -- boolean; whether the pretty Live 3D box is now checked.
+    */
+    async_request(worksheet_command('live_3D/' + s));
+}
 
 function handle_data_menu(form) {
     /*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list