This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This page has functionality to compare code from two different orgs. | |
Here following libraries are used. | |
Select2 : Gibhub: http://select2.github.io/ | |
Mergely : An Awesome code comparison javascript library by jamie.peabody@gmail.com | |
Github: https://github.com/wickedest/Mergely | |
JQuery and Bootstrap | |
--> | |
<apex:page sidebar="false" controller="SFCompareController" showHeader="false" standardStylesheets="false"> | |
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
import java.io.OutputStreamWriter; | |
import java.net.HttpURLConnection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class Logger { | |
public static List<LogInfo> logs {get;set;} //This will hold all the logs in each transaction | |
//Wrapper class to hold log content | |
//Used wrapper so as to leave space for further improvments | |
public class LogInfo{ | |
private String logBody = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PushTopic pushTopic = new PushTopic(); | |
pushTopic.Name = 'Log'; | |
pushTopic.Query = 'SELECT Id, Name, Log_Type__c From Log__c'; | |
pushTopic.ApiVersion = 29.0; | |
pushTopic.NotifyForOperationCreate = true; | |
pushTopic.NotifyForOperationUpdate = true; | |
pushTopic.NotifyForOperationUndelete = true; | |
pushTopic.NotifyForOperationDelete = true; | |
pushTopic.NotifyForFields = 'Referenced'; | |
insert pushTopic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public without sharing class ConsoleController{ | |
public List<Log__c> logList {set;get;} | |
public ConsoleController(){ | |
logList = new List<Log__c>(); | |
} | |
public PageReference refreshLogs(){ | |
String logId = ApexPages.currentPage().getParameters().get('logid'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="ConsoleController" sidebar="false" showHeader="false"> | |
<apex:includeScript value="{!$Resource.cometd}"/> | |
<apex:includeScript value="{!$Resource.jquery}"/> | |
<apex:includeScript value="{!$Resource.json2}"/> | |
<apex:includeScript value="{!$Resource.jquery_cometd}"/> | |
<style> | |
.AssertException{ | |
background-color: yellow; | |
} | |
.Exception { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page sidebar="false" showHeader="false"> | |
<script> | |
window.open('/apex/ChildPage','name','height=450,width=1000,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); | |
function reloadPage(url){ | |
window.location=url; | |
} | |
</script> | |
</apex:page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page > | |
<script> | |
if(confirm('Do you want to reload parent window by closing this child window?')){ | |
top.window.opener.reloadPage('/home/home.jsp'); | |
top.window.close(); | |
} | |
</script> | |
</apex:page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardController="<Your custom/standard object api name>"> | |
<apex:detail subject="{!<Your custom/standard object api name>.Id}" relatedList="true" title="true"/> | |
</apex:page> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:component > | |
<style> | |
body.wait, body.wait *{ | |
cursor: wait !important; | |
} | |
</style> | |
<script> | |
//overriding the default send function of XMLHttpRequest | |
function addXMLRequestCallback() { | |