Search

MachPanel Knowledgebase

INFO:Hide unwanted sections using Javascript from MachPanel

Mudesira Munir
MachPanel

Summary

This article provides the summary on Hide/Remove any unwanted information/section from Provider/Reseller/Customer dashboard..

Applies To
This article applies to MachPanel build v5 5.23 and above.
Prerequisites:
At Control Server location “/MachPanel Control Server/JS”, following JavaScript files are needed for such customization:
  1. custom-fixes-rcc.js          (For Provider/Reseller)
  2. custom-fixes.js                 (For Customer)

If corresponding file is not present at specified location, please create new file with extension “.js” (JavaScript file)


Steps to achieve it:

Get the identity of the section that is needed to be hidden:
(Right-Click the control and select “Inspect Element” to see the identity as shown below)

  • Write code snippet in above corresponding JS file to hide/remove the specific section as described below:
Code Snippet

$(document).ready(function () {
                $('#ctl00_CPH_Content_Div_Billing').remove();    
});

 

 

 

 

(Replace Highlighted text with the identity of any section you want to hide)

  • Save & Close the file and it is Done.
  • Perform IISRESET
  • Refresh the browser (best to close browser windows and reopen) to see the effect.

 

Sample Scenario:
Hide Billing Information in Customer Dashboard.



Steps:
  • Create/Open “custom-fixes.js” file at location “/Web/JS/”
  • Identity for the control is “ctl00_CPH_Content_Div_Billing”
  • Sample Code to hide the section:

$(document).ready(function () {
                $('#ctl00_CPH_Content_Div_Billing').remove();    
});

 

 

 

 

  

  • Save & Close the file
  • Customer dashboard is refreshed and the billing section is removed:


Note:  Similarly, client can add things in html using JS. To make changes to store you need to:

Change contents of:

/JS/custom-fixes-store.js

Details
Type: INFO
Level: Intermediate
Last Modified: 2 Years Ago
Last Modified By: mudesira.munir
Rated 4 stars based on 2 votes.
Article has been viewed 14K times.
Options
Also In This Category
Tags