diff --git a/src/plugins/oer/assorted/css/image.css b/src/plugins/oer/assorted/css/image.css
index 84bde9a848..fad5bcc341 100644
--- a/src/plugins/oer/assorted/css/image.css
+++ b/src/plugins/oer/assorted/css/image.css
@@ -57,13 +57,14 @@ figure.aloha-oer-block .image-wrapper {
figure.aloha-oer-block .image-wrapper .image-edit {
position: absolute;
cursor: pointer;
- left: 100%;
- padding: 2px 10px 2px 5px;
- border-radius: 0 4px 4px 0;
- width: 20em;
- top: -8px;
+ top: 0;
+ left: -30px; /* Left padding + icon width + half icon margin */
+ padding: 5px 10px;
+ border: 1px solid transparent;
+ border-radius: 4px;
word-wrap: break-word;
line-height: 16px;
+ z-index: 400;
}
figure.aloha-oer-block .image-wrapper .image-edit:hover {
@@ -73,45 +74,34 @@ figure.aloha-oer-block .image-wrapper .image-edit:hover {
figure.aloha-oer-block .image-wrapper .image-edit:not(.passive):hover {
border: 1px dotted #1B86D2;
background-color: #D9E7F1;
- z-index: 400;
word-wrap: break-word;
-}
-
-/* Taken from "sandeep" at
- http://stackoverflow.com/questions/9450733/css-triangle-custom-border-color
- adds clever sidewise triangle to the warning rectangle
-*/
-figure.aloha-oer-block .image-wrapper .image-edit:not(.passive):hover:before {
- content: '';
- display: block;
- position: absolute;
- z-index: 401;
- left: -9px;
- top: 10px;
- width: 14px;
- height: 14px;
- background: #d9e7f1;
- border-left: 1px dotted #1b86d2;
- border-bottom: 1px dotted #1b86d2;
- -moz-transform:rotate(45deg);
- -webkit-transform:rotate(45deg);
+ width: 20em;
}
figure.aloha-oer-block .image-wrapper .image-edit .warning-text{
- color: #555;
+ color: #fff;
+ text-shadow: 1px 1px 3px #000;
font-style: italic;
- background-color: #fff;
}
figure.aloha-oer-block .image-wrapper .image-edit:hover .warning-text{
color: black;
font-style: normal;
- font-size: .85em;
+ text-shadow: none;
background-color: transparent;
}
figure.aloha-oer-block .image-wrapper .image-edit.passive {
display: none;
+ left: 0;
+ border-top-left-radius: 0;
+ background-color: #fff;
+}
+
+figure.aloha-oer-block .image-wrapper .image-edit.thank-you{
+ background-color: #C5DAE9;
+ border: 1px solid #1B86D2;
+ left: 0;
}
.semantic-container.focused figure.aloha-oer-block .image-wrapper .image-edit {
@@ -123,15 +113,8 @@ i.icon-warning {
background-image: url(../img/warning-01.png);
background-position: 0 bottom;
background-repeat: no-repeat;
- margin-right: 4px;
- margin-left: 4px;
+ margin-right: 8px;
width: 16px;
height: 16px;
vertical-align: bottom;
}
-
-.warning-text {
- background-color: #FFFFFF;
- color: #555555;
- font-style: italic;
-}
diff --git a/src/plugins/oer/assorted/lib/image.coffee b/src/plugins/oer/assorted/lib/image.coffee
index 63e4b479d6..d19bc33d3e 100644
--- a/src/plugins/oer/assorted/lib/image.coffee
+++ b/src/plugins/oer/assorted/lib/image.coffee
@@ -450,12 +450,12 @@ define [
setThankYou = (wrapper) ->
editDiv = wrapper.children('.image-edit')
editDiv.html(' Thank You!').removeClass('passive')
- editDiv.css('background', 'lightgreen')
- editDiv.animate({backgroundColor: 'white', opacity: 0}, 2000, 'swing', -> setEditText wrapper)
+ editDiv.addClass('thank-you')
+ editDiv.animate({opacity: 0}, 2000, 'swing', -> setEditText wrapper)
setEditText = (wrapper) ->
alt = wrapper.children('img').attr('alt')
- editDiv = wrapper.children('.image-edit').css('opacity', 1)
+ editDiv = wrapper.children('.image-edit').removeClass('thank-you').css('opacity', 1)
if alt
editDiv.html('').addClass('passive')
else
diff --git a/src/plugins/oer/assorted/lib/image.js b/src/plugins/oer/assorted/lib/image.js
index 2c3d5cc93c..2cbc7d65c8 100644
--- a/src/plugins/oer/assorted/lib/image.js
+++ b/src/plugins/oer/assorted/lib/image.js
@@ -1,6 +1,5 @@
-// Generated by CoffeeScript 1.5.0
+// Generated by CoffeeScript 1.6.3
(function() {
-
define(['aloha', 'jquery', 'aloha/plugin', 'image/image-plugin', 'ui/ui', 'semanticblock/semanticblock-plugin', 'css!assorted/css/image.css'], function(Aloha, jQuery, AlohaPlugin, Image, UI, semanticBlock) {
var DIALOG_HTML, DIALOG_HTML2, DIALOG_HTML_CONTAINER, WARNING_IMAGE_PATH, activate, deactivate, getWidth, insertImage, setEditText, setThankYou, setWidth, showModalDialog, showModalDialog2;
WARNING_IMAGE_PATH = '/../plugins/oer/image/img/warning.png';
@@ -345,9 +344,8 @@
var editDiv;
editDiv = wrapper.children('.image-edit');
editDiv.html(' Thank You!').removeClass('passive');
- editDiv.css('background', 'lightgreen');
+ editDiv.addClass('thank-you');
return editDiv.animate({
- backgroundColor: 'white',
opacity: 0
}, 2000, 'swing', function() {
return setEditText(wrapper);
@@ -356,7 +354,7 @@
setEditText = function(wrapper) {
var alt, editDiv;
alt = wrapper.children('img').attr('alt');
- editDiv = wrapper.children('.image-edit').css('opacity', 1);
+ editDiv = wrapper.children('.image-edit').removeClass('thank-you').css('opacity', 1);
if (alt) {
return editDiv.html('').addClass('passive');
} else {
diff --git a/src/plugins/oer/math/lib/math-plugin.coffee b/src/plugins/oer/math/lib/math-plugin.coffee
index fe4f912034..606bb7dedc 100644
--- a/src/plugins/oer/math/lib/math-plugin.coffee
+++ b/src/plugins/oer/math/lib/math-plugin.coffee
@@ -438,6 +438,11 @@ define [ 'aloha', 'aloha/plugin', 'jquery', 'overlay/overlay-plugin', 'ui/ui', '
$closer = $el.find '.math-element-destroy'
if not $closer[0]?
$closer = jQuery(' ')
+ # The hidden event on the closeIcon should not propagate, otherwise it
+ # triggers cleanupFormula repeatedly on an empty math element, causing
+ # infinite recursion.
+ $closer.on 'hidden', (e) -> e.stopPropagation()
+
if jQuery.ui and jQuery.ui.tooltip
$closer.tooltip()
else
diff --git a/src/plugins/oer/math/lib/math-plugin.js b/src/plugins/oer/math/lib/math-plugin.js
index 475cfd9de9..328db08ed3 100644
--- a/src/plugins/oer/math/lib/math-plugin.js
+++ b/src/plugins/oer/math/lib/math-plugin.js
@@ -348,6 +348,9 @@
$closer = $el.find('.math-element-destroy');
if ($closer[0] == null) {
$closer = jQuery(' ');
+ $closer.on('hidden', function(e) {
+ return e.stopPropagation();
+ });
if (jQuery.ui && jQuery.ui.tooltip) {
$closer.tooltip();
} else {
diff --git a/src/plugins/oer/semanticblock/lib/semanticblock-plugin.coffee b/src/plugins/oer/semanticblock/lib/semanticblock-plugin.coffee
index ab97ac3ee8..8bd907e89c 100644
--- a/src/plugins/oer/semanticblock/lib/semanticblock-plugin.coffee
+++ b/src/plugins/oer/semanticblock/lib/semanticblock-plugin.coffee
@@ -349,7 +349,7 @@ define ['aloha', 'block/blockmanager', 'aloha/plugin', 'aloha/pluginmanager', 'j
elementLabel = (element.data('type') or element.attr('class')).split(' ')[0]
element.draggable
connectToSortable: $root
- appendTo: jQuery('body')
+ appendTo: jQuery('#content')
revert: 'invalid'
helper: ->
helper = jQuery(blockDragHelper).clone()
diff --git a/src/plugins/oer/semanticblock/lib/semanticblock-plugin.js b/src/plugins/oer/semanticblock/lib/semanticblock-plugin.js
index 3a7d03f71f..3021e2eda9 100644
--- a/src/plugins/oer/semanticblock/lib/semanticblock-plugin.js
+++ b/src/plugins/oer/semanticblock/lib/semanticblock-plugin.js
@@ -366,7 +366,7 @@
elementLabel = (element.data('type') || element.attr('class')).split(' ')[0];
return element.draggable({
connectToSortable: $root,
- appendTo: jQuery('body'),
+ appendTo: jQuery('#content'),
revert: 'invalid',
helper: function() {
var helper;