diff --git plugins/context_reaction_block.css plugins/context_reaction_block.css
index ce7d8ef..42b6f8e 100644
--- plugins/context_reaction_block.css
+++ plugins/context_reaction_block.css
@@ -88,9 +88,9 @@ body.context-editing div.context-block-region-empty a.context-block-region {
white-space:nowrap;
}
-body.context-editing .ui-sortable div.block { opacity:.25; }
+body.context-editing .ui-sortable .block { opacity:.25; }
-body.context-editing .ui-sortable div.draggable {
+body.context-editing .ui-sortable .draggable {
position:relative;
opacity:1;
}
@@ -104,8 +104,8 @@ body.context-editing div.draggable-placeholder {
opacity:.2;
}
-body.context-editing div.draggable:hover a.context-block-remove,
-body.context-editing div.draggable:hover a.context-block-handle {
+body.context-editing .draggable:hover a.context-block-remove,
+body.context-editing .draggable:hover a.context-block-handle {
background:url(context_reaction_block.png) no-repeat;
cursor:move;
display:block;
@@ -117,7 +117,7 @@ body.context-editing div.draggable:hover a.context-block-handle {
z-index:100;
}
-body.context-editing div.draggable:hover a.context-block-remove {
+body.context-editing .draggable:hover a.context-block-remove {
background-position:-40px 0px;
cursor:pointer;
right:-5px;
@@ -125,7 +125,7 @@ body.context-editing div.draggable:hover a.context-block-remove {
div.context-block-hidden { display:none !important; }
-div.block div.context-block-empty {
+.block div.context-block-empty {
text-align:center;
padding:10px;
opacity:.5;
diff --git plugins/context_reaction_block.js plugins/context_reaction_block.js
index 56d2cfc..6026437 100644
--- plugins/context_reaction_block.js
+++ plugins/context_reaction_block.js
@@ -157,7 +157,7 @@ DrupalContextBlockEditor.prototype.initBlocks = function(blocks) {
$(this).addClass('draggable');
$(this).prepend($(''));
$(this).prepend($('').click(function() {
- $(this).parents('div.block').eq(0).fadeOut('medium', function() {
+ $(this).parents('.block').eq(0).fadeOut('medium', function() {
$(this).remove();
self.updateBlocks();
});
@@ -177,7 +177,7 @@ DrupalContextBlockEditor.prototype.updateBlocks = function() {
var browser = $('div.context-block-browser');
// For all enabled blocks, mark corresponding addables as having been added.
- $('div.block, div.admin-block').each(function() {
+ $('.block, .admin-block').each(function() {
var bid = $(this).attr('id').split('block-')[1]; // Ugh.
$('#context-block-addable-'+bid, browser).draggable('disable').addClass('context-block-added').removeClass('context-block-addable');
});
@@ -191,7 +191,7 @@ DrupalContextBlockEditor.prototype.updateBlocks = function() {
// Mark empty regions.
$(this.regions).each(function() {
- if ($('div.block:has(a.context-block)', this).size() > 0) {
+ if ($('.block:has(a.context-block)', this).size() > 0) {
$(this).removeClass('context-block-region-empty');
}
else {
@@ -211,8 +211,8 @@ DrupalContextBlockEditor.prototype.updateRegion = function(event, ui, region, op
case 'out':
if (
$('div.draggable-placeholder', region).size() === 0 &&
- $('div.block:has(a.context-block)', region).size() == 1 &&
- $('div.block:has(a.context-block)', region).attr('id') == ui.item.attr('id')
+ $('.block:has(a.context-block)', region).size() == 1 &&
+ $('.block:has(a.context-block)', region).attr('id') == ui.item.attr('id')
) {
$(region).addClass('context-block-region-empty');
}
@@ -309,13 +309,13 @@ DrupalContextBlockEditor.prototype.setState = function() {
*/
DrupalContextBlockEditor.prototype.disableTextSelect = function() {
if ($.browser.safari) {
- $('div.block:has(a.context-block):not(:has(input,textarea))').css('WebkitUserSelect','none');
+ $('.block:has(a.context-block):not(:has(input,textarea))').css('WebkitUserSelect','none');
}
else if ($.browser.mozilla) {
- $('div.block:has(a.context-block):not(:has(input,textarea))').css('MozUserSelect','none');
+ $('.block:has(a.context-block):not(:has(input,textarea))').css('MozUserSelect','none');
}
else if ($.browser.msie) {
- $('div.block:has(a.context-block):not(:has(input,textarea))').bind('selectstart.contextBlockEditor', function() { return false; });
+ $('.block:has(a.context-block):not(:has(input,textarea))').bind('selectstart.contextBlockEditor', function() { return false; });
}
else {
$(this).bind('mousedown.contextBlockEditor', function() { return false; });
@@ -353,7 +353,7 @@ DrupalContextBlockEditor.prototype.editStart = function(editor, context) {
this.editor.addClass('context-editing');
this.disableTextSelect();
- this.initBlocks($('div.block:has(a.context-block.edit-'+context+')'));
+ this.initBlocks($('.block:has(a.context-block.edit-'+context+')'));
this.initRegions($('a.context-block-region').parent());
this.updateBlocks();
@@ -366,7 +366,7 @@ DrupalContextBlockEditor.prototype.editStart = function(editor, context) {
dropOnEmpty: true,
placeholder: 'draggable-placeholder',
forcePlaceholderSize: true,
- items: '> div.block:has(a.context-block.editable)',
+ items: '> .block:has(a.context-block.editable)',
handle: 'a.context-block-handle',
start: function(event, ui) { self.scriptFix(event, ui, editor, context); },
stop: function(event, ui) { self.addBlock(event, ui, editor, context); },