diff --git a/src/staticresources/fixedTHeader.resource b/src/staticresources/fixedTHeader.resource
index 65610a3..c5a3219 100755
--- a/src/staticresources/fixedTHeader.resource
+++ b/src/staticresources/fixedTHeader.resource
@@ -1,90 +1,90 @@
-(function($)
-{
- $.fn.freezeHeaders = function(options) {
- var index = 0;
-
- var defaults = {
- headerId : "header",
- contentId : "content"
- };
-
- var options = $.extend(defaults, options);
-
- return this.each(function() {
- var obj = $(this);
-
- var hasThead = obj.find("thead").size() > 0;
- var hasTbody = obj.find("thead").size() > 0;
-
- if(obj.is("table") && hasThead && hasTbody) {
- var widths = [];
-
- // capture widths before rearranging
- obj.find("thead td").each(function(i) {
- widths.push($(this).width());
- });
-
- var id1 = false, id2 = false;
- var attrId = obj.attr("id");
-
- if(attrId) {
- id1 = attrId + "_header";
- id2 = attrId + "_content";
- }
-
- var headerId = (id1 || options.headerId) + index;
- var contentId = (id2 || options.contentId) + index++;
-
- // insert header after the current table
- var header = $("
").attr("id",headerId).css("display","none").css("overflow","hidden").insertAfter(obj);
- // insert content after the header
- var content = $("").attr("id",contentId).css("display","none").css("overflow-y","auto").insertAfter(header);
-
- // set the options
- content.height(options.height);
- content.width(options.width);
-
- var headerTable = header.find("table");
- var contentTable = content.find("table");
-
- obj.find("thead").appendTo(headerTable);
- obj.find("tbody").appendTo(contentTable);
- header.css("display", "block");
- content.css("display", "block");
-
- headerTable.width(contentTable.width());
-
- copyAttributes(obj.get(0), headerTable, contentTable);
-
- var rowId = 0;
- // find the first possible row, which has the same number
- // of columns as the header. This step is to avoid rows containing
- // columns that span across multiple columns.
- contentTable.find("tr").each(function(i) {
- if($(this).children().size() == widths.length) {
- rowId = i;
- return false;
- }
- });
-
- headerTable.find("td").each(function(i) {
- var selector = "#" + contentId + " tr:eq(" + rowId + ") td:eq("+ i +")";
- $(selector).wrapInner("");
- $(selector + " div").width(widths[i]);
- $(this).wrapInner('');
- });
- }
- });
-
- function copyAttributes(elem, headerTable, contentTable) {
- for (var i = 0; i < elem.attributes.length; i++) {
- var attrib = elem.attributes[i];
- if (attrib.specified && attrib.name != "id") {
- headerTable.attr(attrib.name,attrib.value);
- contentTable.attr(attrib.name,attrib.value);
- }
- }
- }
- }
-
+(function($)
+{
+ $.fn.freezeHeaders = function(options) {
+ var index = 0;
+
+ var defaults = {
+ headerId : "header",
+ contentId : "content"
+ };
+
+ var options = $.extend(defaults, options);
+
+ return this.each(function() {
+ var obj = $(this);
+
+ var hasThead = obj.find("thead").size() > 0;
+ var hasTbody = obj.find("thead").size() > 0;
+
+ if(obj.is("table") && hasThead && hasTbody) {
+ var widths = [];
+
+ // capture widths before rearranging
+ obj.find("thead td").each(function(i) {
+ widths.push($(this).width());
+ });
+
+ var id1 = false, id2 = false;
+ var attrId = obj.attr("id");
+
+ if(attrId) {
+ id1 = attrId + "_header";
+ id2 = attrId + "_content";
+ }
+
+ var headerId = (id1 || options.headerId) + index;
+ var contentId = (id2 || options.contentId) + index++;
+
+ // insert header after the current table
+ var header = $("").attr("id",headerId).css("display","none").css("overflow","hidden").insertAfter(obj);
+ // insert content after the header
+ var content = $("").attr("id",contentId).css("display","none").css("overflow-y","auto").insertAfter(header);
+
+ // set the options
+ content.height(options.height);
+ content.width(options.width);
+
+ var headerTable = header.find("table");
+ var contentTable = content.find("table");
+
+ obj.find("thead").appendTo(headerTable);
+ obj.find("tbody").appendTo(contentTable);
+ header.css("display", "block");
+ content.css("display", "block");
+
+ headerTable.width(contentTable.width());
+
+ copyAttributes(obj.get(0), headerTable, contentTable);
+
+ var rowId = 0;
+ // find the first possible row, which has the same number
+ // of columns as the header. This step is to avoid rows containing
+ // columns that span across multiple columns.
+ contentTable.find("tr").each(function(i) {
+ if($(this).children().size() == widths.length) {
+ rowId = i;
+ return false;
+ }
+ });
+
+ headerTable.find("td").each(function(i) {
+ var selector = "#" + contentId + " tr:eq(" + rowId + ") td:eq("+ i +")";
+ $(selector).wrapInner("");
+ $(selector + " div").width(widths[i]);
+ $(this).wrapInner('');
+ });
+ }
+ });
+
+ function copyAttributes(elem, headerTable, contentTable) {
+ for (var i = 0; i < elem.attributes.length; i++) {
+ var attrib = elem.attributes[i];
+ if (attrib.specified && attrib.name != "id") {
+ headerTable.attr(attrib.name,attrib.value);
+ contentTable.attr(attrib.name,attrib.value);
+ }
+ }
+ }
+ }
+
})(jQuery);
\ No newline at end of file
diff --git a/src/triggers/FindNearby_2010_Account_Tidy.trigger b/src/triggers/FindNearby_2010_Account_Tidy.trigger
index a5a5469..d877c20 100755
--- a/src/triggers/FindNearby_2010_Account_Tidy.trigger
+++ b/src/triggers/FindNearby_2010_Account_Tidy.trigger
@@ -28,6 +28,13 @@ trigger FindNearby_2010_Account_Tidy on Account (before update) {
reset = true;
}
}
+ // Added else if below to make Do Not Map selection able to be saved
+ else if (Trigger.new[k].Which_Address__c == 'Do Not Map')
+ {
+ Trigger.new[k].Which_Address__c = 'Do Not Map';
+ reset=true;
+ }
+ // End edit
else{
Trigger.new[k].Which_Address__c = 'Billing';
reset = true;
diff --git a/src/triggers/FindNearby_2010_Contact_Tidy.trigger b/src/triggers/FindNearby_2010_Contact_Tidy.trigger
index b868db7..b6cc7d6 100755
--- a/src/triggers/FindNearby_2010_Contact_Tidy.trigger
+++ b/src/triggers/FindNearby_2010_Contact_Tidy.trigger
@@ -27,6 +27,13 @@ trigger FindNearby_2010_Contact_Tidy on Contact (before update) {
reset = true;
}
}
+ // Added else if below to make Do Not Map selection able to be saved
+ else if (Trigger.new[k].Mapping_Address__c == 'Do Not Map')
+ {
+ Trigger.new[k].Mapping_Address__c = 'Do Not Map';
+ reset=true;
+ }
+ // End edit
else{
Trigger.new[k].Mapping_Address__c = 'Mailing';
reset = true;
diff --git a/src/triggers/FindNearby_2010_Lead_Tidy.trigger b/src/triggers/FindNearby_2010_Lead_Tidy.trigger
index 6824f2e..4928591 100755
--- a/src/triggers/FindNearby_2010_Lead_Tidy.trigger
+++ b/src/triggers/FindNearby_2010_Lead_Tidy.trigger
@@ -18,7 +18,15 @@ trigger FindNearby_2010_Lead_Tidy on Lead (before update) {
Trigger.new[k].Lat__c = null;
Trigger.new[k].Lon__c = null;
}
-
+ // Added code to make Do Not Map checkbox work
+ if(Trigger.new[k].Do_Not_Map__c == true)
+ {
+ reset = true;
+ } else
+ {
+ Trigger.new[k].Do_Not_Map__c = false;
+ }
+ // End edit
if(reset){
Trigger.new[k].Mapping_Status__c = 'Not Located Yet';
Trigger.new[k].Lat__c = null;