Last active
January 27, 2016 18:09
-
-
Save rileydutton/78be21cd9d6163dcbf07 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
<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