##// END OF EJS Templates
Merge pull request #2572 from dwf/paste_above_as_default...
Bussonnier Matthias -
r8787:c161745c merge
parent child Browse files
Show More
@@ -51,10 +51,10 b' var IPython = (function (IPython) {'
51 },
51 },
52 {
52 {
53 id : 'paste_b',
53 id : 'paste_b',
54 label : 'Paste Cell',
54 label : 'Paste Cell Below',
55 icon : 'ui-icon-clipboard',
55 icon : 'ui-icon-clipboard',
56 callback : function () {
56 callback : function () {
57 IPython.notebook.paste_cell();
57 IPython.notebook.paste_cell_below();
58 }
58 }
59 }
59 }
60 ],'cut_copy_paste');
60 ],'cut_copy_paste');
@@ -142,8 +142,8 b' var IPython = (function (IPython) {'
142 that.control_key_active = false;
142 that.control_key_active = false;
143 return false;
143 return false;
144 } else if (event.which === 86 && that.control_key_active) {
144 } else if (event.which === 86 && that.control_key_active) {
145 // Paste selected cell = v
145 // Paste below selected cell = v
146 that.paste_cell();
146 that.paste_cell_below();
147 that.control_key_active = false;
147 that.control_key_active = false;
148 return false;
148 return false;
149 } else if (event.which === 68 && that.control_key_active) {
149 } else if (event.which === 68 && that.control_key_active) {
@@ -778,8 +778,8 b' var IPython = (function (IPython) {'
778 Notebook.prototype.enable_paste = function () {
778 Notebook.prototype.enable_paste = function () {
779 var that = this;
779 var that = this;
780 if (!this.paste_enabled) {
780 if (!this.paste_enabled) {
781 $('#paste_cell').removeClass('ui-state-disabled')
781 $('#paste_cell_replace').removeClass('ui-state-disabled')
782 .on('click', function () {that.paste_cell();});
782 .on('click', function () {that.paste_cell_replace();});
783 $('#paste_cell_above').removeClass('ui-state-disabled')
783 $('#paste_cell_above').removeClass('ui-state-disabled')
784 .on('click', function () {that.paste_cell_above();});
784 .on('click', function () {that.paste_cell_above();});
785 $('#paste_cell_below').removeClass('ui-state-disabled')
785 $('#paste_cell_below').removeClass('ui-state-disabled')
@@ -791,7 +791,7 b' var IPython = (function (IPython) {'
791
791
792 Notebook.prototype.disable_paste = function () {
792 Notebook.prototype.disable_paste = function () {
793 if (this.paste_enabled) {
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 $('#paste_cell_above').addClass('ui-state-disabled').off('click');
795 $('#paste_cell_above').addClass('ui-state-disabled').off('click');
796 $('#paste_cell_below').addClass('ui-state-disabled').off('click');
796 $('#paste_cell_below').addClass('ui-state-disabled').off('click');
797 this.paste_enabled = false;
797 this.paste_enabled = false;
@@ -811,7 +811,7 b' var IPython = (function (IPython) {'
811 };
811 };
812
812
813
813
814 Notebook.prototype.paste_cell = function () {
814 Notebook.prototype.paste_cell_replace = function () {
815 if (this.clipboard !== null && this.paste_enabled) {
815 if (this.clipboard !== null && this.paste_enabled) {
816 var cell_data = this.clipboard;
816 var cell_data = this.clipboard;
817 var new_cell = this.insert_cell_above(cell_data.cell_type);
817 var new_cell = this.insert_cell_above(cell_data.cell_type);
@@ -75,9 +75,9 b' data-notebook-id={{notebook_id}}'
75 <ul>
75 <ul>
76 <li id="cut_cell"><a href="#">Cut Cell</a></li>
76 <li id="cut_cell"><a href="#">Cut Cell</a></li>
77 <li id="copy_cell"><a href="#">Copy Cell</a></li>
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 <li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li>
78 <li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li>
80 <li id="paste_cell_below" class="ui-state-disabled"><a href="#">Paste Cell Below</a></li>
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 &amp; Replace</a></li>
81 <li id="delete_cell"><a href="#">Delete</a></li>
81 <li id="delete_cell"><a href="#">Delete</a></li>
82 <hr/>
82 <hr/>
83 <li id="split_cell"><a href="#">Split Cell</a></li>
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