Merge remote-tracking branch 'origin/master' into error-info
This commit is contained in:
@ -182,6 +182,7 @@ configureEditors: function () {
|
||||
},
|
||||
|
||||
initializeEditors: function () {
|
||||
this.editors = [];
|
||||
$('.editor').each(function (index, element) {
|
||||
|
||||
// Resize frame on load
|
||||
|
@ -196,6 +196,7 @@ CodeOceanEditorSubmissions = {
|
||||
unloadAutoSave: function() {
|
||||
if(this.autosaveTimer != null){
|
||||
this.autosave();
|
||||
clearTimeout(this.autosaveTimer);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
@ -1,3 +1,5 @@
|
||||
#flash.fixed_error_messages.clickthrough data-message-failure=t('shared.message_failure')
|
||||
#flash.fixed_error_messages data-message-failure=t('shared.message_failure')
|
||||
- %w[alert danger info notice success warning].each do |severity|
|
||||
p.alert.flash class="alert-#{{'alert' => 'warning', 'notice' => 'success'}.fetch(severity, severity)}" id="flash-#{severity}" = flash[severity]
|
||||
div.alert.flash class="alert-#{{'alert' => 'warning', 'notice' => 'success'}.fetch(severity, severity)}" id="flash-#{severity}"
|
||||
p = flash[severity]
|
||||
span.fa.fa-times
|
@ -24,11 +24,25 @@
|
||||
|
||||
var showFlashes = function() {
|
||||
$('.flash').each(function() {
|
||||
if ($(this).html() !== '') {
|
||||
$(this).slideDown().delay(DURATION).slideUp(function() {
|
||||
$(this).html('');
|
||||
var container = $(this);
|
||||
var message = container.children().first();
|
||||
var button = container.children().last();
|
||||
|
||||
var hide = function() {
|
||||
container.slideUp(function () {
|
||||
message.html('');
|
||||
});
|
||||
};
|
||||
|
||||
if (message.html() !== '') {
|
||||
container.slideDown();
|
||||
container.animation = setTimeout(hide, DURATION);
|
||||
}
|
||||
|
||||
button.on('click', function () {
|
||||
clearTimeout(container.animation);
|
||||
hide();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
.flash {
|
||||
display: none;
|
||||
|
||||
span.fa-times {
|
||||
position: relative;
|
||||
top: -1.2em;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.fixed_error_messages {
|
||||
@ -13,14 +20,4 @@
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.clickthrough {
|
||||
pointer-events: none;
|
||||
|
||||
/* fixes for IE */
|
||||
/*
|
||||
background:white;
|
||||
opacity:0;
|
||||
filter:Alpha(opacity=0);
|
||||
*/
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user