#7254: [with patch; needs review] sagenb notebook: automatic worksheet 
refreshing
and synchronization
----------------------------+-----------------------------------------------
   Reporter:  was           |       Owner:  boothby     
       Type:  enhancement   |      Status:  needs_review
   Priority:  major         |   Milestone:  sage-4.2    
  Component:  notebook      |    Keywords:              
Work_issues:                |      Author:              
   Reviewer:  Mitesh Patel  |      Merged:              
----------------------------+-----------------------------------------------
Changes (by was):

  * status:  needs_work => needs_review


Comment:

 > If these changes are worthwhile, I can make a patch

 I've made those changes and pushed the results:
 {{{
 flat:sagenb wstein$ hg diff
 diff -r 5f1705b928fc sagenb/data/sage/js/notebook_lib.js
 --- a/sagenb/data/sage/js/notebook_lib.js       Fri Oct 23 18:06:28 2009
 -0700
 +++ b/sagenb/data/sage/js/notebook_lib.js       Sat Oct 24 18:48:46 2009
 -0700
 @@ -554,7 +554,7 @@
      var X, y, z, s;
      if (status == 'success') {
           X = response_text.split(SEP);
 -         state_number = X[0];
 +        state_number = parseInt(X[0]);
           /* Now we replace the HTML for every cell *except* the active
 cell
              by the contents of X[1]. */
         //   y = get_element("worksheet_cell_list");
 @@ -1678,7 +1678,7 @@
          server_down();
      } else {
          server_up();
 -        if(state_number >= 0 && response_text != state_number) {
 +        if(state_number >= 0 && parseInt(response_text) > state_number) {
               /* force a refresh of just the cells in the body */
             refresh_cell_list();
          }
 @@ -2570,7 +2570,7 @@
          a string
      */
      if (cmd == 'eval' || cmd == 'new_cell_before') {
 -        state_number += 1;
 +        state_number = parseInt(state_number) + 1;
      }
      return ('/home/' + worksheet_filename + '/' + cmd);
  }
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7254#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to