Commits

Sherif Mansour committed 4be7433

changed to use AJS.data rather than JS hackery to get the pageid

  • Participants
  • Parent commits bcbea9a

Comments (0)

Files changed (1)

File js/inlinereply/main.js

 	});
 }
 
-// is there a more consistent way to do this? Info link should always be visible AFAIK
-function getPageId() {
-	infoLink = jQuery('#view-page-info-link').attr('href');
-	return infoLink.substring(infoLink.indexOf('=') + 1);
-}
-
 function postComment(o) {
 	el = jQuery(o);
 	el.disable();
     commentText = el.val();
     parentId = el.attr('name')
 
-	pageId = getPageId();
+	pageId = AJS.Data.get("page-id");
 	
 	el.after('<span style="padding-left: 8px; margin-top: 4px;"><img src="https://extranet.atlassian.com/images/icons/wait.gif" text-align="absmiddle"></span>');