Commit Graph

132 Commits

Author SHA1 Message Date
Thomas Kluyver
1f2e4cc6c3 Fix passing empty list to draw_notebook_list() 2014-11-03 14:41:50 -08:00
Thomas Kluyver
a4f869aa8b Rename methods to remove _file suffix 2014-11-03 14:40:09 -08:00
Thomas Kluyver
5279418acf Make Contents.new more generic 2014-11-03 14:29:39 -08:00
Kester Tong
89df330129 Modifies Contents API to return Error objects
Modfies the Contents class to return JavaScript Error objects instead of passing on the return values from $.ajax().  This has two advantages.  First, it allows the content manager to parse errors and give more informative messages than the ajax response.  Second, it makes the Contents interface more general, since other kinds of backends might generate client-side errors.
2014-11-03 10:19:50 -08:00
Thomas Kluyver
e1cbaf3d3c Fix spelling 2014-11-03 10:18:28 -08:00
Thomas Kluyver
f8ec8d4abe Various minor fixes from review 2014-11-03 10:18:28 -08:00
Thomas Kluyver
ea314a2a86 Rename callback parameters to success/error 2014-11-03 10:18:28 -08:00
Thomas Kluyver
060dd1305c Miscellaneous JS fixes 2014-11-03 10:18:28 -08:00
Thomas Kluyver
c1c591336e Some more event cleanup 2014-11-03 10:18:28 -08:00
Thomas Kluyver
c9bd254735 Make contents JS API consistent 2014-11-03 10:18:28 -08:00
Thomas Kluyver
9538726b16 Don't do UI stuff in contents API module 2014-11-03 10:18:27 -08:00
Jeff Hemmelgarn
dab99c599f Remove unnecessary backwards compatibility code 2014-11-03 10:18:27 -08:00
Jeff Hemmelgarn
53463898eb Move contentmanager to contents 2014-11-03 10:18:27 -08:00
Jeff Hemmelgarn
09e0ff93d8 Fix a few problems with cherry-picked commits
api/notebooks => api/contents
add type to JSON model
fix a few things in notebooklist.js
2014-11-03 10:18:04 -08:00
KesterTong
3994d4d56a Adds configuration options to use Google Drive content manager
Adds the key contentmanager_js_source to webapp_settings that allows for specifying the content manager JavaScript source file.  Also adds a NotebookManager subclass, ClientSideNotebookManager, which does minimal logic.  This class is used when the JavaScript content manager doesn't use the Python notebook manager, but rather implements that logic client side, as is the case for the Google Drive based content manager.

A sample command line that uses the Google Drive content manager, and the ClientSideNotebookManager, is

ipython notebook --NotebookApp.webapp_settings="{'contentmanager_js_source': 'base/js/drive_contentmanager'}" --NotebookApp.notebook_manager_class="IPython.html.services.notebooks.clientsidenbmanager.ClientSideNotebookManager"
2014-11-03 10:18:04 -08:00
KesterTong
e3ef5d3b70 Moves list_notebooks to ContentManager 2014-11-03 10:17:12 -08:00
KesterTong
61a911fc0c Fix constructor comments
Add content_manager as a dictionary key to the options param passed in to the NotebookList and Notebook constructors.
2014-11-03 10:17:12 -08:00
KesterTong
0aada3ac5d Remove deleted notebook from notebook list
Uses events to notify the NotebookList when the content manager deletes a notebook, and remove the deleted notebook in response to such an event.
2014-11-03 10:17:12 -08:00
KesterTong
077ba397c1 Removes unnecessary parameter from ContentManager.delete_notebook 2014-11-03 10:17:12 -08:00
Jeff Hemmelgarn
728c6f005f Move deleting a notebook to contentmanager.js
Move code to handle deleting a notebook from notebooklist to
contentmanager.
2014-11-03 10:17:12 -08:00
KesterTong
993833d018 Replace other methods with ContentManager.new_notebook
Replaces Notebook.new_notebook and NotebookList.new_notebook with ContentManager.new_notebook
2014-11-03 10:17:11 -08:00
Thomas Kluyver
d32322e332 Show terminals as terminals/name
Bigger click target
2014-10-31 17:28:51 -07:00
Thomas Kluyver
4025b57ed8 Only display terminals in dashboard if terminals are available 2014-10-31 15:56:53 -07:00
Thomas Kluyver
65e664b143 Add list of available terminals in the dashboard 2014-10-31 15:42:52 -07:00
MinRK
2624f82787 set contentType='application/json'
instead of skipping straight to headers

avoids jQuery's crazy JSONP detection on `=.*??`,
which was triggered because it assumed the contentType was unspecified,
and thus should be guessed based on content.
2014-10-15 16:57:18 -07:00
Jeffrey Bush
f141a6926a File list refreshes no longer move the upload filename boxes.
The new file list is always placed after the upload filename boxes. I also removed the autorefresh guards against refreshing while having an upload box since this is no longer a problem.
2014-08-13 23:58:20 -07:00
Jeffrey Bush
1f68e22486 Fixed many edge cases in file uploads.
When there is an error reading a file, a message is shown (I could reproduce this easily by dragging a folder onto the list), added a missing "return false;" after an illegal notebook was detected, and we prevent no-name files and files starting with dots (which will not be visible in dashboard and automatically overwritten).
2014-08-13 22:55:53 -07:00
Jeffrey Bush
305c734830 Uploading a file with a name that already exists asks the user if they want to overwrite.
This is not perfect (it doesn't check against the real filesystem but the current list in the browser which may be stale) but it is better than nothing.
2014-08-13 22:07:57 -07:00
Jeffrey Bush
5fff038965 Added ESC keep to upload textbox to cancel. 2014-08-13 20:57:35 -07:00
Jeffrey Bush
defabcc772 Minor improvements to file upload.
Updated file upload so that the icon of the new upload item reflects if it is a file or notebook, added the ability to use the "Enter" key in the filename text box to cause the upload to happen, and make it so that the list of files refreshes immediately upon successful upload.
2014-08-13 17:16:05 -07:00
MinRK
3e79eea46b update contents per further review
- fix is_hidden always returning True on nonexistent files
- create hidden dir fails with 400
- don't read binary files twice
- logging improvements
- dialog on invalid notebook upload
- warn about disabled `--save`
2014-07-31 11:57:38 -07:00
MinRK
fb89646a29 various upload fixes
- recognize 201 as success (dataType must not be 'json')
- support uploading non-notebook files (b64-encoded)
2014-07-31 11:57:38 -07:00
MinRK
3c26b079f0 updates per review
- clarified docstrings and errors
- still more notebook/file renames
- configurable untitled names
- copy_from can be full path
- fix running, upload, new-tab behaviors in dashboard

Yay, review!
2014-07-31 11:57:38 -07:00
MinRK
3674958b70 teach tree view about non-notebook files 2014-07-31 11:57:36 -07:00
MinRK
0c0eb43719 teach contents service about non-notebook files 2014-07-31 11:57:36 -07:00
MinRK
6cce477e07 rename notebooks service to contents service
minimal functional changes, committing because tests are passing.
2014-07-31 11:57:36 -07:00
Matthias BUSSONNIER
70eb95d04c remove call to jquery-ui useless button() 2014-07-28 21:43:58 +02:00
Matthias BUSSONNIER
36e3f20d5e fix some font-awesoem 4 icons 2014-07-27 15:33:09 +02:00
Thomas Spura
8a9dcd219d Port to fontawesome4 2014-07-27 14:52:03 +02:00
MinRK
11193d4790 move some responsive bootstrap transitions
- `-md-` puts the transition at 970px
- `-sm-` puts the transition at 768px

I moved most of the `md` transitions to `sm`,
which seems more reasonable.
I also moved the cluster list to `xs` because
the columns will never be wider than a dozen or so characters.
2014-07-24 13:02:30 -07:00
MinRK
9ff7d264ab note loaded, unused dependencies in require 2014-07-23 11:06:01 -07:00
MinRK
4097da724b preserve backward-compatible $([IPython.events]) 2014-07-23 11:05:36 -07:00
Jason Grout
abf86d5324 Trigger app_initialized event *after* the 'global' IPython object is initialized 2014-07-23 11:05:34 -07:00
MinRK
b1291df14a return global events from require(['base/js/events']).
In master, it is impossible to load code on IPython events without setting timeouts.
2014-07-23 11:05:06 -07:00
Min RK
2fe0687097 Merge pull request #6149 from jasongrout/less-upgrade
Less upgrade
2014-07-23 10:06:42 -07:00
MinRK
d345546d15 add bootstrap shim for require
it was possible for bootstrap js to load before jquery,
causing failures in the dashboard.
2014-07-22 15:53:16 -07:00
MinRK
112c4083e9 add comments for style blocks in less
separates each component into individual line in compiled css,
reducing some churn in minified css files.
2014-07-22 14:46:59 +00:00
jon
70ffd96eb9 Added some nice comments,
so devs can easily figure out what options to pass
into the objects they want to construct.
2014-07-10 15:47:23 -05:00
jon
d9ab2d203a In person review with @ellisonbg 2014-07-10 15:47:23 -05:00
jon
1e098560b8 Revert "Google hangout review comments."
This reverts commit 4e120e76014b2630f957c01d17ba3926d4848872.
2014-07-10 15:47:22 -05:00