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

Add save as menu option#3289

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 7 commits intojupyter:masterfromMadhu94:add-save-as-menu-option
Jun 20, 2018
Merged
Changes from1 commit
Commits
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
PrevPrevious commit
Remove ES6 syntax from save_notebook_as
ES6 syntax is not available to us
  • Loading branch information
@minrk
minrk committedJun 20, 2018
commit0c81fc3f066403428cba2bd337d2baf74cc7b923
21 changes: 12 additions & 9 deletionsnotebook/static/notebook/js/notebook.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2885,20 +2885,23 @@ define([
'type': 'notebook',
'content': that.toJSON(),
'name': nb_name
};
};
return that.contents.save(nb_path, model)
.then(function(data) {
d.modal('hide');
that.notebook_name = data.name;
that.notebook_path = data.path;
that.session.rename_notebook(data.path);
that.events.trigger('notebook_renamed.Notebook', data);

},function(error) {
const msg = i18n.msg._(error.message || 'Unknown error saving notebook');
$('.save-message').html(`<span style='color:red;'>${msg}</span>`);
}, function(error) {
var msg = i18n.msg._(error.message || 'Unknown error saving notebook');
$(".save-message").html(
$("<span>")
.attr("style", "color:red;")
.text(msg)
);
});
}
};
that.contents.get(nb_path, {type: 'notebook', content: false}).then(function(data) {
var warning_body = $('<div/>').append(
$("<p/>").text(i18n.msg._('Notebook with that name exists.')));
Expand All@@ -2916,7 +2919,7 @@ define([
});
}, function(err) {
return save_thunk();
})
});
return false;
}
},
Expand All@@ -2931,7 +2934,7 @@ define([
d.find('input[type="text"]').val(current_dir).focus();
}
});
}
};

/**
* Update the autosave interval based on the duration of the last save.
Expand DownExpand Up@@ -3473,4 +3476,4 @@ define([
};

return {Notebook: Notebook};
});
});

[8]ページ先頭

©2009-2025 Movatter.jp