Opened 13 years ago

Closed 13 years ago

#6307 closed enhancement (fixed)

[with patch, positive review] Move javascript out of python-land

Reported by: Kelly Boothby Owned by: Kelly Boothby
Priority: minor Milestone: sage-4.1.1
Component: notebook Keywords:
Cc: Merged in: sage-4.1.1.alpha1
Authors: Mike Hansen, Tom Boothby, Robert Miller Reviewers: Tom Boothby, Minh Van Nguyen, John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

As Mike Hansen noted in #5564, the javascript shouldn't be in a python file in triple-quoted strings. Unfortunately, the patch he submitted to do this bitrotted.

Attachments (3)

6307bis.patch (387.7 KB) - added by Kelly Boothby 13 years ago.
trac_6307-reviewer.patch (66.9 KB) - added by Minh Van Nguyen 13 years ago.
reviewer patch; fixes typos
trac_6307-manifest.in.patch (743 bytes) - added by Robert Miller 13 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 13 years ago by Kelly Boothby

Summary: Move javascript out of python-land[with patch, needs review] Move javascript out of python-land

comment:2 Changed 13 years ago by Kelly Boothby

Component: algebranotebook
Owner: changed from tbd to Kelly Boothby

comment:3 Changed 13 years ago by Robert Miller

Summary: [with patch, needs review] Move javascript out of python-land[with patch, positive review] Move javascript out of python-land

comment:4 Changed 13 years ago by Dan Drake

In #5564, mhansen mentioned that this patch breaks history; if anyone really cares about preserving history, it's easy enough with hg cp. I made a version of this patch which does exactly the same thing with respect to file contents, but also tells Mercurial about the history: http://sage.math.washington.edu/home/drake/6307bis.patch

(It's rather bigger than the patch on this ticket because it's diffing the new .js files against js.py, instead of /dev/null.)

Changed 13 years ago by Kelly Boothby

Attachment: 6307bis.patch added

comment:5 Changed 13 years ago by Kelly Boothby

Very nice, I didn't know that functionality existed.

comment:6 Changed 13 years ago by Kelly Boothby

Summary: [with patch, positive review] Move javascript out of python-land[with patch, needs work] Move javascript out of python-land

doctest failure in psage.py

comment:7 Changed 13 years ago by Robert Miller

Milestone: sage-4.1.1sage-4.1

comment:8 Changed 13 years ago by Robert Miller

Milestone: sage-4.1sage-4.1.1

comment:9 Changed 13 years ago by Kelly Boothby

Summary: [with patch, needs work] Move javascript out of python-land[with patch, positive review] Move javascript out of python-land

I can't reproduce the error in psage.py... I'm re-marking this as a positive review.

Changed 13 years ago by Minh Van Nguyen

Attachment: trac_6307-reviewer.patch added

reviewer patch; fixes typos

comment:10 Changed 13 years ago by Minh Van Nguyen

Authors: boothby, mhansenMike Hansen
Reviewers: Tom Boothby, Minh Van Nguyen

comment:11 Changed 13 years ago by Minh Van Nguyen

Once this ticket is closed, ticket #5564 should also be closed as a consequence of the patches on this ticket. Just to let people know, this has been merged in sage-4.1.1-alpha0. I can't close this ticket because I don't have the privilege to do so. Sorry, folks :-(

comment:12 Changed 13 years ago by Minh Van Nguyen

Merged in: sage-4.1.1.alpha0
Resolution: fixed
Status: newclosed

comment:13 Changed 13 years ago by Minh Van Nguyen

Summary: [with patch, positive review] Move javascript out of python-land[with patch, needs work] Move javascript out of python-land

This ticket results in a corrupt repository. After merging this ticket in Sage 4.1.1.alpha0, I created a source distribution with sage -sdist 4.1.1.alpha0. Now compile that source distribution, then cd to SAGE_ROOT/devel/sage-main and do:

[mvngu@sage sage-main]$ hg st
! sage/server/notebook/templates/async_lib.js
! sage/server/notebook/templates/jmol_lib.js
! sage/server/notebook/templates/notebook_lib.js

I'm marking this ticket as "needs work" and reverting it in my merge tree.

comment:14 Changed 13 years ago by Minh Van Nguyen

Resolution: fixed
Status: closedreopened

comment:15 Changed 13 years ago by Robert Miller

Working on a fix for this right now...

comment:16 Changed 13 years ago by Robert Miller

Rather, I have a fix, but the sdist command is taking a long time. Once that is done I can confirm that it worked.

Changed 13 years ago by Robert Miller

Attachment: trac_6307-manifest.in.patch added

comment:17 Changed 13 years ago by Robert Miller

Summary: [with patch, needs work] Move javascript out of python-land[with patch, needs review] Move javascript out of python-land

It works!

[rlm-book templates]$ pwd
/Users/rlmill/sage-4.1.1.alpha0.6307/dist/sage-4.1.1.alpha0.fix.test/spkg/standard/sage-4.1.1.alpha0.fix.test/sage/server/notebook/templates
[rlm-book templates]$ ls
total 208K
-rw-r--r-- 1 rlmill  786 2009-07-22 10:23 account_recovery.html
-rw-r--r-- 1 rlmill 1.5K 2009-07-22 10:23 account_settings.html
-rw-r--r-- 1 rlmill  729 2009-07-22 10:23 async_lib.js
-rw-r--r-- 1 rlmill  448 2009-07-22 10:23 banner.html
-rw-r--r-- 1 rlmill  467 2009-07-22 10:23 base.html
-rw-r--r-- 1 rlmill  440 2009-07-22 10:23 base_authenticated.html
-rw-r--r-- 1 rlmill 2.8K 2009-07-22 10:23 docs.html
-rw-r--r-- 1 rlmill  324 2009-07-22 10:23 error_message.html
-rw-r--r-- 1 rlmill  534 2009-07-22 10:23 history.html
-rw-r--r-- 1 rlmill 1.2K 2009-07-22 10:23 jmol_lib.js
-rw-r--r-- 1 rlmill  385 2009-07-22 10:23 list_top.html
-rw-r--r-- 1 rlmill 2.8K 2009-07-22 10:23 login.html
-rw-r--r-- 1 rlmill 117K 2009-07-22 10:23 notebook_lib.js
-rw-r--r-- 1 rlmill 2.3K 2009-07-22 10:23 registration.html
-rw-r--r-- 1 rlmill  284 2009-07-22 10:23 search.html
-rw-r--r-- 1 rlmill  780 2009-07-22 10:23 source_code.html
-rw-r--r-- 1 rlmill  220 2009-07-22 10:23 template_error.html
-rw-r--r-- 1 rlmill 1.3K 2009-07-22 10:23 top_bar.html
-rw-r--r-- 1 rlmill 1.2K 2009-07-22 10:23 upload.html
-rw-r--r-- 1 rlmill  324 2009-07-22 10:23 user_management.html
-rw-r--r-- 1 rlmill 6.7K 2009-07-22 10:23 worksheet_listing.html
-rw-r--r-- 1 rlmill  280 2009-07-22 10:23 yes_no.html

comment:18 Changed 13 years ago by John Palmieri

Authors: Mike HansenMike Hansen, Tom Boothby, Robert Miller
Reviewers: Tom Boothby, Minh Van NguyenTom Boothby, Minh Van Nguyen, John Palmieri
Summary: [with patch, needs review] Move javascript out of python-land[with patch, positive review] Move javascript out of python-land

The new patch should fix the repository issues.

comment:19 Changed 13 years ago by Minh Van Nguyen

Merged in: sage-4.1.1.alpha0sage-4.1.1.alpha1
Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.