Commits

Lynn Rees committed 088b83b

- up

  • Participants
  • Parent commits 62b86c8

Comments (0)

Files changed (4)

File scripts/AttrsToChildren.groovy

-// @CacheScriptContent(true)
-// @ExecutionModes({ON_SINGLE_NODE})
-c.selecteds.each {
-	it.attributes.names.eachWithIndex { an, idx ->
-		def child = it.createChild(idx)
-		if (an == 'note')
-			child.note = it[an]
-		else
-			child.object = an
-		child.details = it[an]
-	}
-	it.attributes.clear()
-}

File scripts/ChildrenToAttrs.groovy

-// @CacheScriptContent(true)
-// @ExecutionModes({ON_SINGLE_NODE})
-c.selecteds.each {
-	it.children.eachWithIndex { nc, idx ->
-		if (nc.details)
-			it.attributes.add(nc.plainText, nc.details)
-		else if (nc.link)
-			it.attributes.add(nc.plainText, nc.link)
-		if (nc.note)
-			it['note'] = nc.note
-		nc.delete()
-	}
-}
-

File scripts/LocalLinkBack.groovy

-// @CacheScriptContent(true)
-// @ExecutionModes({ON_SINGLE_NODE})
-c.selecteds.every { it.text = it.plainText.toLowerCase() }

File scripts/SyncStyleWithIcons.groovy

-// @CacheScriptContent(true)
-// @ExecutionModes({ON_SINGLE_NODE})
-def thisStyle = node?.style?.style
-def thisIcons = node?.icons?.icons
-def styleIcons = thisStyle ? node?.style?.styleNode?.icons?.icons : null
-c.selecteds.findAll { it?.id != node?.id }.each {
-   if (thisStyle)
-      it?.style?.style = thisStyle
-    // sync any local icons
-    if (thisIcons)
-      thisIcons?.every { icon -> it?.icons?.add(icon) }
-    // sync any style icons
-     if (styleIcons)
-       styleIcons?.every { icon -> it?.icons?.add(icon) }
-}
-