Created
March 12, 2015 05:44
-
-
Save ChihChengLiang/c38d59af638e2ed89af1 to your computer and use it in GitHub Desktop.
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
["#copy-user-button","#copy-password-button"].map (id)-> | |
copybtn = new ZeroClipboard $(id) | |
copybtn.on 'ready', (readyEvent) -> | |
$(id).attr("data-original-title", "click to copy") | |
.tooltip() | |
copybtn.on 'aftercopy', (event) -> | |
$(id) | |
.attr("data-original-title", "copied") | |
.tooltip "show" | |
.attr("data-original-title", "click to copy") | |
button#copy-user-button(type="button" data-clipboard-text="{{user}}").btn.btn-primary.btn-xs copy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment