mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-01 17:42:11 +09:00
26 lines
741 B
JavaScript
26 lines
741 B
JavaScript
'use strict';
|
|
|
|
$(function() {
|
|
var items = $('.dashboard>div>section>ul>li');
|
|
items.on('mouseenter focusin', function() {
|
|
$(this).addClass('hover').find('>.action').show();
|
|
});
|
|
items.on('mouseleave focusout', function() {
|
|
if(!$(this).find(':focus').length) {
|
|
$(this).removeClass('hover').find('>.action').hide();
|
|
}
|
|
});
|
|
var forms = $('.dashboard>div>section form.action');
|
|
forms.on('click', 'button', function(e) {
|
|
var title = $(this).closest('form').siblings('a').first().text();
|
|
var message;
|
|
if ($(this).val() === 'trash' || $(this).val() === 'true') {
|
|
message = xe.lang.confirm_trash;
|
|
} else {
|
|
message = xe.lang.confirm_delete;
|
|
}
|
|
if (!confirm(title + "\n" + message)) {
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
});
|