Skip to content

Commit

Permalink
Merge branch 'MDL-36305-23' of git://github.com/FMCorz/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_23_STABLE
  • Loading branch information
Aparup Banerjee committed Nov 27, 2012
2 parents 13669ef + f54b485 commit 4505720
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions theme/mymobile/javascript/custom.js
Expand Up @@ -127,10 +127,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();
}
});
Expand Down

0 comments on commit 4505720

Please sign in to comment.