File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,8 @@ $(document).ready(function () {
351
351
'add_plugin' : '' ,
352
352
'edit_plugin' : '' ,
353
353
'move_plugin' : '' ,
354
- 'copy_plugin' : ''
354
+ 'copy_plugin' : '' ,
355
+ 'cut_plugin' : ''
355
356
}
356
357
} ,
357
358
@@ -558,7 +559,7 @@ $(document).ready(function () {
558
559
$ ( '.cms_btn-publish' ) . addClass ( 'cms_btn-publish-active' ) . parent ( ) . show ( ) ;
559
560
} ,
560
561
561
- copyPlugin : function ( ) {
562
+ copyPlugin : function ( cut ) {
562
563
var that = this ;
563
564
var data = {
564
565
'source_placeholder_id' : this . options . placeholder_id ,
@@ -569,9 +570,12 @@ $(document).ready(function () {
569
570
'csrfmiddlewaretoken' : this . csrf
570
571
} ;
571
572
573
+ // determine if we are using copy or cut
574
+ var url = ( cut ) ? this . options . urls . cut_plugin : this . options . urls . copy_plugin ;
575
+
572
576
$ . ajax ( {
573
577
'type' : 'POST' ,
574
- 'url' : this . options . urls . copy_plugin ,
578
+ 'url' : url ,
575
579
'data' : data ,
576
580
'success' : function ( ) {
577
581
// refresh browser after success
Original file line number Diff line number Diff line change 21
21
'edit_plugin' : '{% url "admin:cms_page_edit_plugin" instance.pk %}' ,
22
22
'move_plugin' : '{% url "admin:cms_page_move_plugin" %}' ,
23
23
'copy_plugin' : '{% url "admin:cms_page_copy_plugins" %}' ,
24
+ { % comment % } 'cut_plugin ': '{% url "admin:cms_page_cut_plugins" %}' , { % endcomment % }
24
25
'stack_plugin ': ''
25
26
}
26
27
} ) ;
You can’t perform that action at this time.
0 commit comments