-
-
Save jkishner/6165299 to your computer and use it in GitHub Desktop.
for Fargo.io: adds a checkbox to a headline that has no icon; if the icon is "check-empty" it changes it to "check"; if the icon is "check" it makes the headline a child of the last headline in the outline and then collapses that parent headline
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
todo | |
var value = op.attributes.getOne ("icon"); | |
if (!value) { | |
op.attributes.setOne ("icon", "check-empty"); | |
} | |
else if (value == "check-empty") { | |
op.attributes.deleteOne ("icon"); | |
op.attributes.setOne ("icon", "check"); | |
} | |
else if (value == "check") { | |
op.reorg (down, infinity); | |
op.reorg (right, 1); | |
op.go (left, 1); | |
op.collapse (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment