Last active
October 7, 2015 22:30
-
-
Save dancinllama/8126fc1c438205525d6f to your computer and use it in GitHub Desktop.
Revisions
-
James Loghry revised this gist
Oct 7, 2015 . No changes.There are no files selected for viewing
-
James Loghry revised this gist
Oct 7, 2015 . No changes.There are no files selected for viewing
-
James Loghry revised this gist
Oct 7, 2015 . 3 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes. -
James Loghry created this gist
Oct 7, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ ({ //Method for fixing Lightning Design System Checkboxes fixLDSCheckboxes : function(component){ //Add all the checkboxes here. Note, you'll need their aura Ids this.fixLDSCheckbox(component.find("requiredCheckbox")); this.fixLDSCheckbox(component.find("showLabelCheckbox")); this.fixLDSCheckbox(component.find("showCheckbox")); return false; }, fixLDSCheckbox : function(chkbox){ var el = chkbox.getElement(); var elLabel = el.parentElement; elLabel.setAttribute("for",el.getAttribute("Id")); return false; } }) This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ <!-- LDS markup for a checkbox (https://www.lightningdesignsystem.com/components/forms/) --> <div class="slds-form-element margintop10"> <label class="slds-checkbox" for="requiredCheckbox"> <ui:inputCheckbox aura:Id="requiredCheckbox" value="{!v.selectedFormObject.Required_On_Form__c}" /> <span class="slds-checkbox--faux" /> <span class="slds-form-element__label marginleft10">Required on Form?</span> </label> </div> This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ ({ //Called from either another helper method or from the aura:initHandler call or an event, etc. doInit : function(component, event, helper) { return helper.fixLDSCheckboxes(component); } })