Skip to content

Commit

Permalink
disallow plugins within disabled items
Browse files Browse the repository at this point in the history
  • Loading branch information
FinalAngel committed Feb 27, 2014
1 parent 4498df2 commit 30eca12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cms/static/cms/js/plugins/cms.structureboard.js
Expand Up @@ -424,6 +424,9 @@ $(document).ready(function () {
if(plugin.length) bounds = plugin.data('settings').plugin_restriction;
if(holder.length) bounds = holder.data('settings').plugin_restriction;

// if parent has class disabled, dissalow drop
if(placeholder.parent().hasClass('cms_draggable-disabled')) return false;

// if restrictions is still empty, proceed
that.state = (bounds.length <= 0 || $.inArray(type, bounds) !== -1) ? true : false;

Expand Down

0 comments on commit 30eca12

Please sign in to comment.