|
|
|
|
@ -21,6 +21,7 @@ var IPython = (function (IPython) {
|
|
|
|
|
SaveWidget.prototype.style = function () {
|
|
|
|
|
this.element.find('input#notebook_name').addClass('ui-widget ui-widget-content');
|
|
|
|
|
this.element.find('button#save_notebook').button();
|
|
|
|
|
this.element.find('button#publish_notebook').button();
|
|
|
|
|
var left_panel_width = $('div#left_panel').outerWidth();
|
|
|
|
|
var left_panel_splitter_width = $('div#left_panel_splitter').outerWidth();
|
|
|
|
|
$('span#save_widget').css({marginLeft:left_panel_width+left_panel_splitter_width});
|
|
|
|
|
@ -33,6 +34,10 @@ var IPython = (function (IPython) {
|
|
|
|
|
IPython.notebook.save_notebook();
|
|
|
|
|
that.set_document_title();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.element.find('button#publish_notebook').click(function () {
|
|
|
|
|
IPython.notebook.publish_notebook();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -84,20 +89,23 @@ var IPython = (function (IPython) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SaveWidget.prototype.status_save = function () {
|
|
|
|
|
this.element.find('span.ui-button-text').text('Save');
|
|
|
|
|
this.element.find('button#save_notebook').button('enable');
|
|
|
|
|
};
|
|
|
|
|
$('button#save_notebook').button('option', 'label', 'Save');
|
|
|
|
|
$('button#save_notebook').button('enable');
|
|
|
|
|
$('button#publish_notebook').button('enable');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SaveWidget.prototype.status_saving = function () {
|
|
|
|
|
this.element.find('span.ui-button-text').text('Saving');
|
|
|
|
|
this.element.find('button#save_notebook').button('disable');
|
|
|
|
|
};
|
|
|
|
|
$('button#save_notebook').button('option', 'label', 'Saving');
|
|
|
|
|
$('button#save_notebook').button('disable');
|
|
|
|
|
$('button#publish_notebook').button('disable');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SaveWidget.prototype.status_loading = function () {
|
|
|
|
|
this.element.find('span.ui-button-text').text('Loading');
|
|
|
|
|
this.element.find('button#save_notebook').button('disable');
|
|
|
|
|
$('button#save_notebook').button('option', 'label', 'Loading');
|
|
|
|
|
$('button#save_notebook').button('disable');
|
|
|
|
|
$('button#publish_notebook').button('disable');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|