Show More
@@ -51,10 +51,10 var IPython = (function (IPython) { | |||
|
51 | 51 | }, |
|
52 | 52 | { |
|
53 | 53 | id : 'paste_b', |
|
54 | label : 'Paste Cell', | |
|
54 | label : 'Paste Cell Above', | |
|
55 | 55 | icon : 'ui-icon-clipboard', |
|
56 | 56 | callback : function () { |
|
57 | IPython.notebook.paste_cell(); | |
|
57 | IPython.notebook.paste_cell_above(); | |
|
58 | 58 | } |
|
59 | 59 | } |
|
60 | 60 | ],'cut_copy_paste'); |
@@ -142,8 +142,8 var IPython = (function (IPython) { | |||
|
142 | 142 | that.control_key_active = false; |
|
143 | 143 | return false; |
|
144 | 144 | } else if (event.which === 86 && that.control_key_active) { |
|
145 | // Paste selected cell = v | |
|
146 | that.paste_cell(); | |
|
145 | // Paste above selected cell = v | |
|
146 | that.paste_cell_above(); | |
|
147 | 147 | that.control_key_active = false; |
|
148 | 148 | return false; |
|
149 | 149 | } else if (event.which === 68 && that.control_key_active) { |
@@ -778,8 +778,8 var IPython = (function (IPython) { | |||
|
778 | 778 | Notebook.prototype.enable_paste = function () { |
|
779 | 779 | var that = this; |
|
780 | 780 | if (!this.paste_enabled) { |
|
781 | $('#paste_cell').removeClass('ui-state-disabled') | |
|
782 | .on('click', function () {that.paste_cell();}); | |
|
781 | $('#paste_cell_replace').removeClass('ui-state-disabled') | |
|
782 | .on('click', function () {that.paste_cell_replace();}); | |
|
783 | 783 | $('#paste_cell_above').removeClass('ui-state-disabled') |
|
784 | 784 | .on('click', function () {that.paste_cell_above();}); |
|
785 | 785 | $('#paste_cell_below').removeClass('ui-state-disabled') |
@@ -791,7 +791,7 var IPython = (function (IPython) { | |||
|
791 | 791 | |
|
792 | 792 | Notebook.prototype.disable_paste = function () { |
|
793 | 793 | if (this.paste_enabled) { |
|
794 | $('#paste_cell').addClass('ui-state-disabled').off('click'); | |
|
794 | $('#paste_cell_replace').addClass('ui-state-disabled').off('click'); | |
|
795 | 795 | $('#paste_cell_above').addClass('ui-state-disabled').off('click'); |
|
796 | 796 | $('#paste_cell_below').addClass('ui-state-disabled').off('click'); |
|
797 | 797 | this.paste_enabled = false; |
@@ -811,7 +811,7 var IPython = (function (IPython) { | |||
|
811 | 811 | }; |
|
812 | 812 | |
|
813 | 813 | |
|
814 | Notebook.prototype.paste_cell = function () { | |
|
814 | Notebook.prototype.paste_cell_replace = function () { | |
|
815 | 815 | if (this.clipboard !== null && this.paste_enabled) { |
|
816 | 816 | var cell_data = this.clipboard; |
|
817 | 817 | var new_cell = this.insert_cell_above(cell_data.cell_type); |
@@ -75,9 +75,9 data-notebook-id={{notebook_id}} | |||
|
75 | 75 | <ul> |
|
76 | 76 | <li id="cut_cell"><a href="#">Cut Cell</a></li> |
|
77 | 77 | <li id="copy_cell"><a href="#">Copy Cell</a></li> |
|
78 | <li id="paste_cell" class="ui-state-disabled"><a href="#">Paste Cell</a></li> | |
|
79 | 78 | <li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li> |
|
80 | 79 | <li id="paste_cell_below" class="ui-state-disabled"><a href="#">Paste Cell Below</a></li> |
|
80 | <li id="paste_cell_replace" class="ui-state-disabled"><a href="#">Paste Cell Replace</a></li> | |
|
81 | 81 | <li id="delete_cell"><a href="#">Delete</a></li> |
|
82 | 82 | <hr/> |
|
83 | 83 | <li id="split_cell"><a href="#">Split Cell</a></li> |
General Comments 0
You need to be logged in to leave comments.
Login now