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
function readRows () { | |
let oo = Application('OmniOutliner') | |
let doc = oo.documents[0] | |
let rows = doc.children | |
let idList = rows.id() | |
let nameList = rows.name() | |
let hasChildrenList = rows.hasSubtopics() | |
return idList.map((id, i) => { | |
return {id, name: nameList[i], hasChildren: hasChildrenList[i]} | |
}) |
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
async function getChildren (id = 0) { | |
let childRows = await runJxa(readChildren, [id]) | |
let result = await Promise.all(childRows.map(async child => { | |
let {hasChildren, ...resultChild} = child | |
if (!child.hasChildren) return resultChild | |
return {...resultChild, children: await getChildren(child.id)} | |
})) | |
return result |
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
const runJxa = require('run-jxa') | |
let resultPromise = getRows() | |
resultPromise.then(rows => { | |
console.log(rows) | |
}) | |
async function getRows () { | |
let rows = await runJxa(readChildren) | |
return rows |
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
GetHttpHeader ( headers; searchHdr ) = | |
Let ( | |
[ | |
$hdrCount = ValueCount ( headers ); | |
$nextValue = GetValue ( headers ; 1 ); | |
$nextHdr = Left ( $nextValue ; Length ( searchHdr ) ) | |
]; | |
If ( $nextHdr = searchHdr ; |
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
<template> | |
<div class='Component1'> | |
<form> | |
<div class="form-group"> | |
<label for="inputName">Your name (2)</label> | |
<input v-model="localPerson.name" type="text" class="form-control" id="inputName" placeholder="Name"> | |
</div> | |
<div class="form-group"> | |
<label for="inputProfession">Your profession (2)</label> | |
<input v-model="localPerson.profession" type="text" class="form-control" id="inputProfession" placeholder="Profession"> |
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
<template> | |
<div class='Component1'> | |
<form> | |
<div class="form-group"> | |
<label for="inputName">Your name (1)</label> | |
<input v-model="person.name" type="text" class="form-control" id="inputName" placeholder="Name"> | |
</div> | |
<div class="form-group"> | |
<label for="inputProfession">Your profession (1)</label> | |
<input v-model="person.profession" type="text" class="form-control" id="inputProfession" placeholder="Profession"> |
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
<template> | |
<div id="app"> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-xs-2 menu-pane"> <!-- Section 1 --> | |
<ul class="nav nav-stacked"> | |
<li><router-link :to="teamLink">Teams</router-link></li> | |
<li><router-link to="/about">About</router-link></li> | |
</ul> | |
</div> |
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
import Vue from 'vue' | |
import Router from 'vue-router' | |
import TeamList from '../components/TeamList.vue' | |
import TeamDetailWrapper from '../components/TeamDetailWrapper.vue' | |
import About from '../components/About.vue' | |
import Home from '../components/Home.vue' | |
import NotFoundComponent from '../components/NotFoundComponent.vue' | |
Vue.use(Router) |
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
<template> | |
<div id="app"> | |
<div> | |
<button @click="showModal = true">Show it</button> | |
</div> | |
<modal :showModal="showModal" :closeAction="closeDialog"> | |
<h1 slot="header">Simple Dialog</h1> | |
<span slot="body"> | |
Hello <strong>simple!</strong> | |
</span> |
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
<template> | |
<div :class="containerClass"> | |
<div :class="{modal: true, in: showModal}" :style="{ display: showModal ? 'block' : 'none' }"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div v-if="this.$slots.header || closeAction" class="modal-header"> | |
<button class="close" @click="closeAction">x</button> | |
<slot name="header"></slot> | |
</div> | |
<div v-if="this.$slots.body" class="modal-body"> |
NewerOlder