Skip to content

Instantly share code, notes, and snippets.

@rileydutton
Last active January 27, 2016 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rileydutton/78be21cd9d6163dcbf07 to your computer and use it in GitHub Desktop.
Save rileydutton/78be21cd9d6163dcbf07 to your computer and use it in GitHub Desktop.
<div class="compendium-drop-target">
<input type="hidden" name="attr_ImportedComponents" accept="Components" />
<input type="checkbox" value="1" name="attr_ComponentV" /> V
</div>
<script type="text/worker">
on("change:ImportedComponents", function() {
getAttrs(["ImportedComponents"], function(data) {
var splitComponents = data.ImportedComponents.split(" ");
var attrsToSet = {};
if(splitComponents.indexOf("V") !== -1) {
attrsToSet["ComponentV"] = "1";
}
setAttrs(attrsToSet);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment