diff --git a/src/vue-poc/components/core.js b/src/vue-poc/components/core.js index ad0ec12..e8c123d 100644 --- a/src/vue-poc/components/core.js +++ b/src/vue-poc/components/core.js @@ -77,9 +77,6 @@ function debounce(func, wait, immediate) { }; }; -// used by vue-ace -var Events = new Vue({}); - const router = new VueRouter({ base:"/vue-poc/ui/", @@ -91,6 +88,8 @@ const router = new VueRouter({ { path: '/images/report', name:"image-reports",component: Report, props: true, meta:{title: "Image report"}}, { path: '/images/item/:id', name:"image",component: Image, props: true, meta:{title: "Image details"}}, { path: '/images/thumbnail', component: Thumbnail, meta:{title:"Thumbnail generator"} }, + { path: '/images/keywords', component: Keywords, meta:{title:"Thumbnail keywords"} }, + { path: '/images/dates', component: Dates, meta:{title:"Thumbnail dates"} }, { path: '/select', component: Select, meta:{title:"Select"} }, { path: '/search', component: Search, meta:{title:"Search"} }, { path: '/tabs', component: Tabs,meta:{title:"tab test",requiresAuth: true} }, @@ -181,8 +180,10 @@ const app = new Vue({ model: false, children: [ {href: '/images/item',text: 'Collection',icon: 'photo_camera'}, - {href: '/thumbnail',text: 'Thumbnail',icon: 'touch_app'}, - {href: '/images/report',text: 'Image reports',icon: 'report'} + {href: '/images/keywords',text: 'Keywords',icon: 'label'}, + {href: '/images/dates',text: 'Date taken',icon: 'date_range'}, + {href: '/images/thumbnail',text: 'Thumbnail',icon: 'touch_app'}, + {href: '/images/report',text: 'Reports',icon: 'report'} ]}, { icon: 'more_horiz', diff --git a/src/vue-poc/features/edit/edit.vue b/src/vue-poc/features/edit/edit.vue index da55982..646e793 100644 --- a/src/vue-poc/features/edit/edit.vue +++ b/src/vue-poc/features/edit/edit.vue @@ -38,12 +38,12 @@ navigate_next - + star - + vertical_align_center @@ -110,7 +110,7 @@ - @@ -126,19 +126,20 @@ v-on:annotation="annotation"> contentA: `declare function local:query($q as xs:string) { };`, - mode:'xquery', - url:'', - protocol:'webfile', - name:'', - path:[], - mimetype:"", - wrap:false, - busy:false, - clearDialog:false, - annotations:null, - dirty:false, - snackbar:false, - message:"Cant do that", + mode: 'xquery', + url: '', + protocol: 'webfile', + name: '', + path: [], + mimetype: "", + wrap: false, + busy: false, + clearDialog: false, + annotations: null, + dirty: false, + snackbar: false, + message: "Cant do that", + events: new Vue({}), mimemap:{ "text/xml":"xml", "application/xml":"xml", @@ -192,10 +193,11 @@ v-on:annotation="annotation"> }, acecmd(cmd){ - Events.$emit('eventFired',cmd); + //alert("acecmd: "+cmd) + this.events.$emit('eventFired',cmd); }, fold(){ - Events.$emit('eventFired',"foldall"); + this.events.$emit('eventFired',"foldall"); }, save(){ alert("TODO save: "+this.url); diff --git a/src/vue-poc/features/images/dates.vue b/src/vue-poc/features/images/dates.vue new file mode 100644 index 0000000..be6f8a6 --- /dev/null +++ b/src/vue-poc/features/images/dates.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/vue-poc/features/images/keywords.vue b/src/vue-poc/features/images/keywords.vue new file mode 100644 index 0000000..b483f87 --- /dev/null +++ b/src/vue-poc/features/images/keywords.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/vue-poc/features/ping/ping.vue b/src/vue-poc/features/ping/ping.vue index 072e608..f2ca14f 100644 --- a/src/vue-poc/features/ping/ping.vue +++ b/src/vue-poc/features/ping/ping.vue @@ -31,7 +31,8 @@ Get count - + + {{getValues.last}} @@ -61,7 +62,7 @@ - + {{postValues.last}} diff --git a/src/vue-poc/features/settings.vue b/src/vue-poc/features/settings.vue index 64427f7..fcdd525 100644 --- a/src/vue-poc/features/settings.vue +++ b/src/vue-poc/features/settings.vue @@ -13,7 +13,8 @@ enableSnippets - Allow snippets + Allow + snippets diff --git a/src/vue-poc/features/timeline.vue b/src/vue-poc/features/timeline.vue index 842de22..bba97d5 100644 --- a/src/vue-poc/features/timeline.vue +++ b/src/vue-poc/features/timeline.vue @@ -29,7 +29,7 @@ { id: 1, content: 'item 1', start: '2013-04-20 23:06:15.304' }, { id: 2, content: 'iso date time', start: '2013-04-14T11:11:15.304' }, { id: 3, content: '[GET] http://localhost:8984/vue-poc/ui/icon.png', start: '2013-04-18', end: '2013-04-19' }, - { id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19' }, + { id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19', className: 'green' }, { id: 5, content: '[GET] http://localhost:8984/vue-poc/ui/app.css', start: '2013-04-25' }, { id: 6, content: 'item 6', start: '2013-04-27' }] }, diff --git a/src/vue-poc/static/app-gen.js b/src/vue-poc/static/app-gen.js index 5005ea1..8c18f8b 100644 --- a/src/vue-poc/static/app-gen.js +++ b/src/vue-poc/static/app-gen.js @@ -1,4 +1,4 @@ -// generated 2017-08-27T11:38:03.302+01:00 +// generated 2017-08-27T21:21:39.471+01:00 Vue.component('qd-link',{template:` {{href}}link `, @@ -515,12 +515,12 @@ v0.0.3 navigate_next - + star - + vertical_align_center @@ -587,7 +587,7 @@ v0.0.3 - + @@ -600,19 +600,20 @@ v0.0.3 contentA: `declare function local:query($q as xs:string) { };`, - mode:'xquery', - url:'', - protocol:'webfile', - name:'', - path:[], - mimetype:"", - wrap:false, - busy:false, - clearDialog:false, - annotations:null, - dirty:false, - snackbar:false, - message:"Cant do that", + mode: 'xquery', + url: '', + protocol: 'webfile', + name: '', + path: [], + mimetype: "", + wrap: false, + busy: false, + clearDialog: false, + annotations: null, + dirty: false, + snackbar: false, + message: "Cant do that", + events: new Vue({}), mimemap:{ "text/xml":"xml", "application/xml":"xml", @@ -666,10 +667,11 @@ v0.0.3 }, acecmd(cmd){ - Events.$emit('eventFired',cmd); + //alert("acecmd: "+cmd) + this.events.$emit('eventFired',cmd); }, fold(){ - Events.$emit('eventFired',"foldall"); + this.events.$emit('eventFired',"foldall"); }, save(){ alert("TODO save: "+this.url); @@ -984,6 +986,29 @@ v0.0.3 } } + ); + const Dates=Vue.extend({template:` + + + + arrow_back + + todo + + + + + + +dates todo + + + + `, + + + } + ); const Image=Vue.extend({template:` @@ -1271,6 +1296,29 @@ body `, + } + + ); + const Keywords=Vue.extend({template:` + + + + arrow_back + + todo + + + + + + +keywords todo + + + + `, + + } ); @@ -1532,7 +1580,8 @@ body Get count - + + {{getValues.last}} @@ -1562,7 +1611,7 @@ body - + {{postValues.last}} @@ -1898,7 +1947,8 @@ body enableSnippets - Allow snippets + Allow + snippets @@ -2381,7 +2431,7 @@ body { id: 1, content: 'item 1', start: '2013-04-20 23:06:15.304' }, { id: 2, content: 'iso date time', start: '2013-04-14T11:11:15.304' }, { id: 3, content: '[GET] http://localhost:8984/vue-poc/ui/icon.png', start: '2013-04-18', end: '2013-04-19' }, - { id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19' }, + { id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19', className: 'green' }, { id: 5, content: '[GET] http://localhost:8984/vue-poc/ui/app.css', start: '2013-04-25' }, { id: 6, content: 'item 6', start: '2013-04-27' }] }, @@ -2481,9 +2531,6 @@ function debounce(func, wait, immediate) { }; }; -// used by vue-ace -var Events = new Vue({}); - const router = new VueRouter({ base:"/vue-poc/ui/", @@ -2495,6 +2542,8 @@ const router = new VueRouter({ { path: '/images/report', name:"image-reports",component: Report, props: true, meta:{title: "Image report"}}, { path: '/images/item/:id', name:"image",component: Image, props: true, meta:{title: "Image details"}}, { path: '/images/thumbnail', component: Thumbnail, meta:{title:"Thumbnail generator"} }, + { path: '/images/keywords', component: Keywords, meta:{title:"Thumbnail keywords"} }, + { path: '/images/dates', component: Dates, meta:{title:"Thumbnail dates"} }, { path: '/select', component: Select, meta:{title:"Select"} }, { path: '/search', component: Search, meta:{title:"Search"} }, { path: '/tabs', component: Tabs,meta:{title:"tab test",requiresAuth: true} }, @@ -2585,8 +2634,10 @@ const app = new Vue({ model: false, children: [ {href: '/images/item',text: 'Collection',icon: 'photo_camera'}, - {href: '/thumbnail',text: 'Thumbnail',icon: 'touch_app'}, - {href: '/images/report',text: 'Image reports',icon: 'report'} + {href: '/images/keywords',text: 'Keywords',icon: 'label'}, + {href: '/images/dates',text: 'Date taken',icon: 'date_range'}, + {href: '/images/thumbnail',text: 'Thumbnail',icon: 'touch_app'}, + {href: '/images/report',text: 'Reports',icon: 'report'} ]}, { icon: 'more_horiz', diff --git a/src/vue-poc/static/vue-ace.js b/src/vue-poc/static/vue-ace.js index 1ed462b..a3e5c1b 100644 --- a/src/vue-poc/static/vue-ace.js +++ b/src/vue-poc/static/vue-ace.js @@ -6,7 +6,8 @@ Vue.component('vue-ace', { 'mode', 'theme', 'wrap', - 'readOnly' + 'readOnly', + 'events' ], data () { return { @@ -108,8 +109,8 @@ Vue.component('vue-ace', { //console.log(this.annots) this.$emit('annotation',this.annots) }); - - Events.$on('eventFired', (cmd) => { + if(this.events){ + this.events.$on('eventFired', (cmd) => { if(cmd=="outline"){ var row = this.editor.selection.getCursor().row var toks=this.editor.session.getTokens(row).filter(function(t) { @@ -118,5 +119,6 @@ Vue.component('vue-ace', { console.log(toks); }else this.command(cmd); }); + } } })