[sagenb] 99/157: Add option to use java for 3D

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 cdf455664ca64e6d3a6fe8b18e3e691ede7d8723
Author: gutow <gutow at uwosh.edu>
Date:   Wed Oct 15 20:09:36 2014 -0500

    Add option to use java for 3D
    
    Add a checkbox allowing the user to choose to use the java applet for
    3-.  Also added some gettext calls for translation.
---
 sagenb/data/sage/html/notebook/base.html | 22 ++++++++--------------
 sagenb/data/sage/js/jmol_lib.js          |  2 ++
 2 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/sagenb/data/sage/html/notebook/base.html b/sagenb/data/sage/html/notebook/base.html
index 21681ff..4333acf 100644
--- a/sagenb/data/sage/html/notebook/base.html
+++ b/sagenb/data/sage/html/notebook/base.html
@@ -138,22 +138,16 @@ 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" 
+               class="worksheet" value="pretty_print" {{ "checked" if worksheet.pretty_print() else "" }} /> {{ gettext('Typeset') }}
+        <input id="3D_check", type="checkbox" title="{{ gettext('Load 3-D Live. Not recommended for worksheets with > 2 3-D Plots.') }}"
                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 %}
+               class="worksheet" value="live_3D" {{ "checked" if worksheet.live_3D() else "" }} /> {{ gettext('Load 3-D Live') }}
+        <input id="3D_use_java", type="checkbox" title="{{ gettext('Use java for 3-D. Only applies to this running of worksheet.') }}"
+               onchange="3D_use_java_check(this.checked);"
+               class="worksheet" value="3D_use_java"/> {{ gettext('Use java for 3-D') }}
+         {% endif %}
     {% endif %} 
     </div>
     <div id="share-publish-buttons">
diff --git a/sagenb/data/sage/js/jmol_lib.js b/sagenb/data/sage/js/jmol_lib.js
index e5f62e2..34c913d 100644
--- a/sagenb/data/sage/js/jmol_lib.js
+++ b/sagenb/data/sage/js/jmol_lib.js
@@ -105,6 +105,8 @@ SageJmolManager.prototype.add_applet =
     var live_3d = jQuery('#3D_check').prop('checked');
     info.deferUncover = !live_3d;
     info.deferApplet = !live_3d;
+    var use_java=$('#3D_use_java').prop('checked');
+    if (use_java) {info.use='JAVA';}
 
     // append container to dom
     jQuery('#sage_jmol_' + cell_num).append(

-- 
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