Last active
August 9, 2017 03:31
-
-
Save JitendraZaa/a4bbd76ccaf34fc8b56fe9ac85d9c93e to your computer and use it in GitHub Desktop.
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 characters
| <aura:application > | |
| <c:CollapsiblePanel header="CollapsiblePanel Demo"> | |
| <aura:set attribute="body"> | |
| <ui:message title="Confirmation" severity="confirm" closable="true"> | |
| This is an example of confirmation message. | |
| </ui:message> | |
| <ui:message title="Information" severity="info" closable="true"> | |
| This is an example of message. | |
| </ui:message> | |
| <ui:message title="Warning" severity="warning" closable="true"> | |
| This is an example of warning. | |
| </ui:message> | |
| <ui:message title="Error" severity="error" closable="true"> | |
| This is an example of error message. | |
| </ui:message> | |
| </aura:set> | |
| </c:CollapsiblePanel> | |
| </aura:application> |
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 characters
| .THIS div.Message { | |
| color: #FFFFFF; | |
| font-weight : bold; | |
| background-color: #000000; | |
| width : 95% ; | |
| padding : 25px; | |
| margin : 10px auto 10px auto ; | |
| border-radius: 5px; | |
| } | |
| .THIS div.container { | |
| margin: 0px 20px 0px 40px; | |
| } | |
| .THIS div.expandCollapse{ | |
| cursor : pointer; | |
| width:10%; | |
| float:right ; | |
| } | |
| .THIS div.show{ | |
| display:block; | |
| } | |
| .THIS div.hide{ | |
| display:none; | |
| } |
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 characters
| ({ | |
| ToggleCollapse : function(component, event, helper) { | |
| helper.ToggleCollapseHandler(component, event); | |
| } | |
| }) |
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 characters
| ({ | |
| ToggleCollapseHandler : function(component, event) { | |
| var existingText = component.get("v.collpaseText"); | |
| var container = component.find("containerCollapsable") ; | |
| if(existingText === "[ - ]"){ | |
| component.set("v.collpaseText","[ + ]"); | |
| $A.util.toggleClass(container, 'hide'); | |
| }else{ | |
| component.set("v.collpaseText","[ - ]"); | |
| $A.util.toggleClass(container, 'hide'); | |
| } | |
| } | |
| }) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment