Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into copy-paste-math-v2
Browse files Browse the repository at this point in the history
Conflicts:
	src/plugins/oer/assorted/css/image.css
  • Loading branch information
izak committed Oct 18, 2013
2 parents 278e6c6 + eda55c3 commit 2594a26
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 47 deletions.
57 changes: 20 additions & 37 deletions src/plugins/oer/assorted/css/image.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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;
}
6 changes: 3 additions & 3 deletions src/plugins/oer/assorted/lib/image.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ define [
setThankYou = (wrapper) ->
editDiv = wrapper.children('.image-edit')
editDiv.html('<i class="icon-edit"></i> 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('<i class="icon-edit"></i>').addClass('passive')
else
Expand Down
8 changes: 3 additions & 5 deletions src/plugins/oer/assorted/lib/image.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/plugins/oer/math/lib/math-plugin.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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('<span class="math-element-destroy aloha-ephemera" title="Delete\u00A0math">&nbsp;</span>')
# 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
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/oer/math/lib/math-plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/oer/semanticblock/lib/semanticblock-plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2594a26

Please sign in to comment.