[sagenb] 81/157: Make insert new cells work with new jquery

felix salfelder felix-guest at moszumanska.debian.org
Mon Dec 22 16:51:54 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 8fe8371b93112d29a4096307d5807d736c41e415
Author: gutow <gutow at uwosh.edu>
Date:   Fri Apr 4 20:54:07 2014 -0500

    Make insert new cells work with new jquery
    
    Make insert new cells work with new jquery.  Gave them icons to so that
    people do not need to remember which combination of keys + clicks give
    what.
---
 sagenb/data/sage/css/main.css            |  6 +++---
 sagenb/data/sage/html/notebook/cell.html | 10 ++++++++--
 sass/src/main.scss                       |  7 +++----
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/sagenb/data/sage/css/main.css b/sagenb/data/sage/css/main.css
index 6726a03..58bb16d 100644
--- a/sagenb/data/sage/css/main.css
+++ b/sagenb/data/sage/css/main.css
@@ -482,9 +482,9 @@ pre.cell_output_hidden, pre.cell_output_hide { display: none; }
 a.file_link { text-decoration: underline; }
 
 /* line 968, ../../../../sass/src/main.scss */
-div.insert_new_cell { height: 6px; display: block; margin: 3px; }
-/* line 972, ../../../../sass/src/main.scss */
-div.insert_new_cell:hover { background-color: #8888fe; margin: 3px; }
+div.insert_new_cell { height: 16px; display: block; margin: 3px; }
+/* line 974 */
+div.wksht-icon_button {display:inline-block;}
 
 /* line 977, ../../../../sass/src/main.scss */
 a.worksheetname { text-decoration: none; font-weight: bold; font-size: 14px; color: #222222; }
diff --git a/sagenb/data/sage/html/notebook/cell.html b/sagenb/data/sage/html/notebook/cell.html
index 0027932..5433b2d 100644
--- a/sagenb/data/sage/html/notebook/cell.html
+++ b/sagenb/data/sage/html/notebook/cell.html
@@ -30,13 +30,19 @@ INPUT:
         {# input #}
         {% if not do_print and not publish %}
             <div class="insert_new_cell" id="insert_new_cell_before{{ cell.id() }}">
+              <div class="ui-icon ui-icon-circle-plus wksht-icon_button" 
+                id="insert_new_compute_cell_before{{ cell.id() }}" 
+                title="{{ gettext('Click to insert new compute cell.') }}"></div>
+              <div class="ui-icon ui-icon-comment wksht-icon_button" 
+                id="insert_new_text_cell_before{{ cell.id() }}"
+                 title="{{ gettext('Click to insert new rich-text cell.') }}"></div>
             </div>
             <script type="text/javascript">
-                $("#insert_new_cell_before{{ cell.id() }}").bind("plainclick",function (e) {
+                $("#insert_new_compute_cell_before{{ cell.id() }}").bind("click",function (e) {
                     insert_new_cell_before({{ '%r'|format(cell.id()) }});
                 });
                 {% if not cell.worksheet().docbrowser() %}
-                $("#insert_new_cell_before{{ cell.id() }}").bind("shiftclick",function (e) {
+                $("#insert_new_text_cell_before{{ cell.id() }}").bind("click",function (e) {
                    insert_new_text_cell_before({{ '%r'|format(cell.id()) }});
                 });
                 {% endif %}
diff --git a/sass/src/main.scss b/sass/src/main.scss
index 49ff075..a86814b 100644
--- a/sass/src/main.scss
+++ b/sass/src/main.scss
@@ -966,12 +966,11 @@ a.file_link {
 
 div {
   &.insert_new_cell {
-    height: 6px;
+    height: 16px;
     display: block;
     margin: 3px;
-    &:hover {
-      background-color: #8888fe;
-      margin: 3px; } } }
+  &.wksht-icon_button {
+    display:inline-block;}}
 
 a {
   &.worksheetname {

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