Skip to content

Commit 2dac236

Browse files
committed
removed settings.position
1 parent 0a4c4b2 commit 2dac236

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

cms/static/cms/js/plugins/cms.toolbar.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ $(document).ready(function () {
4040
'url': null,
4141
'hidden': false,
4242
'maximized': false
43-
},
44-
'position': null
43+
}
4544
}
4645
},
4746

@@ -603,12 +602,6 @@ $(document).ready(function () {
603602
// set new classes
604603
dragitem.addClass('cms_draggable-selected');
605604
plugin.addClass('cms_plugin-active');
606-
607-
// set new position
608-
var pos = plugin.position('body').top;
609-
var bound = $(window).height();
610-
var offset = 200;
611-
// if(bound - pos <= 0) $(window).scrollTop(pos - offset);
612605
},
613606

614607
showError: function (msg) {
@@ -652,19 +645,13 @@ $(document).ready(function () {
652645
this.modes.removeClass('cms_btn-active').eq(0).addClass('cms_btn-active');
653646
this.settings.mode = 'edit';
654647

655-
// set correct position
656-
$('body').scrollTop(this.settings.position || 0);
657-
658648
// hide clipboard if in edit mode
659649
this.container.find('.cms_clipboard').hide();
660650

661651
if(!init) this.setSettings();
662652
},
663653

664654
_enableDragMode: function (speed, init) {
665-
// we need to save the position first
666-
// this.settings.position = $('body').scrollTop();
667-
668655
this.bars.fadeIn(speed);
669656
this.plugins.hide();
670657
this.placeholders.stop(true, true).fadeIn(speed);

0 commit comments

Comments
 (0)