Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Open all files with/files path except for.html and .svg`#2449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
takluyver merged 11 commits intojupyter:masterfromgnestor:issue-2404
Jun 21, 2017
Merged
Changes from1 commit
Commits
Show all changes
11 commits
Select commitHold shift + click to select a range
63bca42
Open all files with `/files` path except for `.html` and .svg`
gnestorApr 27, 2017
6871dc8
Use `is_viewable` vs. `is_not_safe`
gnestorMay 6, 2017
c43d258
Update list of editable extensions
gnestorMay 6, 2017
f43ac2f
Fix double url-encoding issue on view file
gnestorMay 30, 2017
7cb2bae
Always display "View" button and display "Edit" button for all editab…
gnestorMay 30, 2017
b51e5d5
Support "View" and "Edit" for a selection of multiple files
gnestorMay 30, 2017
abba580
Add more HTML-like variants
gnestorMay 30, 2017
5c0495d
Inspect mimetype in addition to file extension to determine if a file…
gnestorMay 31, 2017
226492d
All files are viewable by default, handle notebooks and html differently
gnestorMay 31, 2017
35a9ff7
Merge branch 'master' into issue-2404
gnestorMay 31, 2017
6a1f807
Open all editable files with `/edit` path
gnestorJun 20, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
Open all files with/files path except for.html and .svg`
  • Loading branch information
@gnestor
gnestor committedApr 27, 2017
commit63bca420670d62d69ff8d90a4d6adb63262adc37
14 changes: 12 additions & 2 deletionsnotebook/static/tree/js/notebooklist.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -543,8 +543,9 @@ define([
};

NotebookList.ipynb_extensions = ['ipynb'];
NotebookList.non_editable_extensions = 'jpeg jpeg png zip gif tif tiff bmp ico pdf doc xls xlsx'.split(' ');
NotebookList.editable_extensions = 'txt py cson json yaml html'.split(' ');
NotebookList.not_safe = ['html', 'svg'];
NotebookList.non_editable_extensions = ['jpeg', 'jpeg', 'png', 'zip', 'gif', 'tif', 'tiff', 'bmp', 'ico', 'pdf', 'doc', 'xls', 'xlsx'];
NotebookList.editable_extensions = ['txt', 'py', 'cson', 'json', 'yaml', 'html'];

NotebookList.prototype._is_editable = function(filepath){
return filepath_of_extension(filepath, NotebookList.editable_extensions);
Expand All@@ -557,6 +558,10 @@ define([
NotebookList.prototype._is_notebook = function(filepath){
return filepath_of_extension(filepath, NotebookList.ipynb_extensions)
};

NotebookList.prototype._is_not_safe = function(filepath){
return filepath_of_extension(filepath, NotebookList.not_safe)
};

/**
* Handles when any row selector checkbox is toggled.
Expand DownExpand Up@@ -731,6 +736,11 @@ define([
var uri_prefix = NotebookList.uri_prefixes[model.type];
if (model.type === 'file'
&& !this._is_editable(path))
{
uri_prefix = 'files';
}
if (model.type === 'file'
&& this._is_not_safe(path))
{
uri_prefix = 'view';
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp