Created
October 11, 2012 16:29
-
-
Save GEverding/3873622 to your computer and use it in GitHub Desktop.
Custom Control for Editing a Single Link
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
form | |
input.add_link.imput-mini(type="text", autofocus="autofocus", placeholder="Enter URL..") | |
select.link-select(data-placeholder="Select a Store") | |
each site in sites | |
option(value=site)= site | |
button.btn.save-new-link(type="button", style="margin-top: 5px;") Done |
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
.use(Mixins.bq.editable | |
click: ".edit-link" | |
update: (newVal) -> | |
render: (finish, cb) -> | |
template = Views.templates.get("link-edit") | |
template { | |
sites: ["", "Amazon", "Bandcamp"] | |
}, (data) => | |
$edit = @$('div') | |
$edit.html(data) | |
@$('.link-select').chosen() | |
finish() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is built using @jb55's bQuery