Merge branch 'MDL-36305-22' of git://github.com/FMCorz/moodle into MOODLE_22_STABLE

This commit is contained in:
Aparup Banerjee
2012-11-27 11:53:20 +08:00
+6 -2
View File
@@ -128,10 +128,14 @@ $(document).ready(function() {
//forum discussion page only stuff
$('div#page-mod-forum-discussPAGE, #page-mod-forum-discuss div.generalpage, div.forumtype-single, .forumtype-single div.generalpage, div#page-mod-forum-postPAGE').live('pagebeforecreate',function(event, ui){
//remove parent post because of hash remove this if has listening is fixed
// Handle the '#' in the URLs.
$('.options div.commands a').each(function(index) {
var url = $(this).attr("href");
if (url.indexOf("#") != -1) {
if (url.indexOf("post.php") != -1 && url.indexOf("reply=") != -1) {
// Remove the anchor from the reply link.
$(this).attr('href', url.replace('#mform1', ''));
} else if (url.indexOf("#") != -1) {
// Remove "Show parent" and other links which contains a '#'.
$(this).remove();
}
});