Interact.py and Worksheet.py

Following the release of SAGE 3.1, I have began to work on published worksheets. The first thing I wanted to add was a "delete" button, but upon reading the code found no logical place to put the code for it - the HTML code in notebook.py is undocumented and very disorganized. So, to learn my way around I decided to first reogranize a bit.

Here is the header for a worksheet that I published.

Here is the same header on my development branch.

I'm not sure if anyone else will like this new header, but at least there is a logical place for the delete button, both in the UI and in the code.

Summerland

Four more panoramas that I forgot about. These are from near Summerland campground on Mt. Rainier And one from past Glacier Basin trail North of Emmons Glacier. More pictures here.

Sliders and Selectors - HTML vs Javascript

In my earlier enhancement of sliders, I created a Javascript list of values for each slider, which would update while the slider is being manipulated. It worked very well at first, but then resulted in a problem: SAGE truncated the array when it was too big which resulted in a Javascript error and nothing worked. In this I responded to 2 patches: pruning the array of values and removing truncation, since other people were complaining about it as well.

Since removing the truncation, I was able to create selectors with a lot of values, say, 10000.

def _(a=[1..10000]):
But they loaded very slowly because the SAGE server was rendering 10000 lines of
<option value='n' >n</option>
What if the server instead returned more Javascript? Then the code would look like this:
var values=[1, 2, ..., 10000];
for(var i in values)
    //code to generate a select option
Which means a lot less text being generated by the server. Of course, the optimal return is
for(var i=1; i<=10000; i+=1)
    //code to generate a select option
But this involves detecting the range which may or may not be possible depending on the underlying structure.