mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-19118, now comments overlay works without yui3 hacks
This commit is contained in:
parent
392d5fd41e
commit
7deb5107da
@ -55,7 +55,7 @@ M.core_comment = {
|
||||
return false;
|
||||
}, this);
|
||||
CommentHelper.confirmoverlay = new Y.Overlay({
|
||||
bodyContent: '<a href="#" id="confirmdelete-'+this.client_id+'">'+M.str.moodle.yes+'</a> <a href="#" id="canceldelete-'+this.client_id+'">'+M.str.moodle.no+'</a>',
|
||||
bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-'+this.client_id+'">'+M.str.moodle.yes+'</a> <a href="#" id="canceldelete-'+this.client_id+'">'+M.str.moodle.no+'</a></div>',
|
||||
visible: false
|
||||
});
|
||||
CommentHelper.confirmoverlay.render(document.body);
|
||||
@ -212,7 +212,7 @@ bodyContent: '<a href="#" id="confirmdelete-'+this.client_id+'">'+M.str.moodle.y
|
||||
var scope = this;
|
||||
var params = {'commentid': id};
|
||||
scope.cancel_delete();
|
||||
function remove_dom(type, anmi, cmt) {
|
||||
function remove_dom(type, anim, cmt) {
|
||||
cmt.remove();
|
||||
}
|
||||
this.request({
|
||||
@ -273,8 +273,6 @@ bodyContent: '<a href="#" id="confirmdelete-'+this.client_id+'">'+M.str.moodle.y
|
||||
}
|
||||
CommentHelper.confirmoverlay.set('xy', [e.pageX-(width/2), e.pageY+10]);
|
||||
CommentHelper.confirmoverlay.set('visible', true);
|
||||
// XXX: YUI3 bug, a temp workaround in firefox, still have problem on webkit
|
||||
CommentHelper.confirmoverlay.bodyNode.setStyle('visibility', 'visible');
|
||||
Y.one('#canceldelete-'+scope.client_id).on('click', function(e) {
|
||||
e.preventDefault();
|
||||
scope.cancel_delete();
|
||||
@ -292,8 +290,6 @@ bodyContent: '<a href="#" id="confirmdelete-'+this.client_id+'">'+M.str.moodle.y
|
||||
},
|
||||
cancel_delete: function() {
|
||||
CommentHelper.confirmoverlay.set('visible', false);
|
||||
// XXX: YUI3 bug, a temp workaround in firefox, still have problem on webkit
|
||||
CommentHelper.confirmoverlay.bodyNode.setStyle('visibility', 'hidden');
|
||||
},
|
||||
register_pagination: function() {
|
||||
var scope = this;
|
||||
|
@ -321,6 +321,7 @@ table.mod_index {width:100%;}
|
||||
.comment-content div {margin:0;padding:0;}
|
||||
.comment-content p {padding:0;margin:0 18px 0 0;}
|
||||
.comment-delete {float:right;text-align:right;}
|
||||
.comment-delete-confirm {background: #89B31F; padding: 2px;}
|
||||
.comment-container {float:left;width: 305px;margin: 4px;}
|
||||
.comment-report-selectall{display:none}
|
||||
.jsenabled .comment-report-selectall{display:inline}
|
||||
|
Loading…
x
Reference in New Issue
Block a user