#7309: SageNB -- Restructure /javascript/ to have /javascript/sage/
---------------------------+------------------------------------------------
   Reporter:  timdumol     |       Owner:  boothby     
       Type:  enhancement  |      Status:  needs_review
   Priority:  minor        |   Milestone:              
  Component:  notebook     |    Keywords:              
Work_issues:               |      Author:  Tim Dumol   
   Reviewer:               |      Merged:              
---------------------------+------------------------------------------------

Comment(by mpatel):

 Version 2

  * Updates `tinymce.js`'s URL in `head.tmpl`.
  * Deletes `notebook.list_window.javascript()`.
  * Maps `sagenb/data/sage/js` to `/javascript/sage`.

 Note: All of `sagenb/data/sage` is still accessible via `/java/sage`.

 My original motivation for the admittedly unorthodox `/data/package` URLs
 for `package` in `[jsmath, jquery, sage, ...]` was that most non-trivial
 packages are a mix of HTML, CSS, images, JS, and/or Java, so it's better
 to group by package than by JS and Java, say.  But I did not realize the
 importance of the static-dynamic distinction, as you emphasized.  Two
 possibilities:

  * Serve `sagenb/data/package` as `/static/package`, since most of the
 files are static.
  * Serve a `package`'s dynamic files under `/javascript/package`,
 `/images/package`, `/css/package`, etc.
  * That is, serve
    * `main.js` from `/javascript/sage/main.js` and similarly for
 `keyboard`.
    * `main.css` from `/css/sage/main.css`.

 Or:

  * Serve `sagenb/data/package` as `/something/package`, where `something`
 could be a better name than `data`.
  * Serve the dynamic files from the ''same'' structure but overlaid
 virtually in `twist`.
  * That is, serve
    * `main.js` from `/something/sage/js/main.js` and similarly for
 `keyboard`.
    * `main.css` from `/something/sage/css/main.css`.

 In either case, we could, I think, still use a fast separate server (e.g.,
 [http://www.nginx.net/ nginx]) for the static files.  Or we could be
 explicit, e.g.,
 {{{
 #!text/html
 <script type="text/javascript" src="{% if static_server_url %}{{
 static_server_url }}{% endif %}/[...]/jquery-1.3.2.min.js"></script>
 <script type="text/javascript" src="{% if dynamic_server_url %}{{
 dynamic_server_url }}{% endif %}/[...]/main.js"></script>
 }}}
 But I'm sure there are other options.  What do you think?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7309#comment:3>
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