From b9ff2b7762ca27feb408dd41abc7546dfee2d4f4 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 27 Sep 2018 12:50:46 +0100 Subject: [PATCH] vuetify 1.2.5 --- src/vue-poc/app.vue | 5 +- src/vue-poc/components/qd-table.vue | 12 +- src/vue-poc/features/catalog/test.xq | 3 + src/vue-poc/features/edit/edit.xqm | 12 +- src/vue-poc/features/edit/tabs.vue | 17 +- .../history.vue => history/filehistory.vue} | 16 +- src/vue-poc/features/history/taskhistory.vue | 75 +++++ src/vue-poc/features/model/entity1.vue | 29 +- src/vue-poc/features/schema/dtd-default.xml | 16 + src/vue-poc/features/schema/readme.md | 1 + src/vue-poc/features/tasks/rxq-tasks.xqm | 13 +- src/vue-poc/features/tasks/task/task.vue | 11 +- src/vue-poc/features/tasks/taskdef.xml | 7 +- src/vue-poc/features/tasks/tasks.vue | 2 +- .../features/tasks/xqdoc/rxq-xqdoc.xqm | 9 +- src/vue-poc/features/tasks/xqdoc/tx-xqdoc.xq | 1 + src/vue-poc/features/tasks/xqdoc/tx-xqdoc2.xq | 90 ++---- src/vue-poc/features/tasks/xqdoc/tx-xqrest.xq | 69 +++++ src/vue-poc/features/tasks/xqdoc/xqdoc.vue | 5 +- src/vue-poc/lib/history.xqm | 2 +- src/vue-poc/lib/mimetype.xqm | 5 +- src/vue-poc/lib/store-test.xq | 7 + src/vue-poc/lib/store.xqm | 51 ++++ src/vue-poc/lib/xqdoc/xqdoc-proj.xqm | 40 +++ src/vue-poc/models/entities/taskhistory.xml | 29 ++ src/vue-poc/router.js | 20 +- src/vue-poc/static/app-gen.js | 286 ++++++++++++------ src/vue-poc/static/app.html | 6 +- src/vue-poc/static/resources/relaxng/run.bat | 5 + .../static/resources/relaxng/schema.rnc | 10 + .../static/resources/relaxng/schema.rng | 13 + src/vue-poc/static/resources/relaxng/test.xml | 4 + 32 files changed, 658 insertions(+), 213 deletions(-) create mode 100644 src/vue-poc/features/catalog/test.xq rename src/vue-poc/features/{collection/history.vue => history/filehistory.vue} (73%) create mode 100644 src/vue-poc/features/history/taskhistory.vue create mode 100644 src/vue-poc/features/schema/dtd-default.xml create mode 100644 src/vue-poc/features/schema/readme.md create mode 100644 src/vue-poc/features/tasks/xqdoc/tx-xqrest.xq create mode 100644 src/vue-poc/lib/store-test.xq create mode 100644 src/vue-poc/lib/store.xqm create mode 100644 src/vue-poc/models/entities/taskhistory.xml create mode 100644 src/vue-poc/static/resources/relaxng/run.bat create mode 100644 src/vue-poc/static/resources/relaxng/schema.rnc create mode 100644 src/vue-poc/static/resources/relaxng/schema.rng create mode 100644 src/vue-poc/static/resources/relaxng/test.xml diff --git a/src/vue-poc/app.vue b/src/vue-poc/app.vue index 57e2780..ae6a4f5 100644 --- a/src/vue-poc/app.vue +++ b/src/vue-poc/app.vue @@ -132,7 +132,8 @@ {href: '/tabs',text: 'Tabs',icon: 'switch_camera'}, {href: '/validate',text: 'Validate',icon: 'playlist_add_check'}, {href: '/transform',text: 'XSLT Transform',icon: 'forward'}, - {href: '/tasks',text: 'Tasks',icon: 'update'} + {href: '/tasks',text: 'Tasks',icon: 'update'}, + {href: '/history/tasks',text: 'history',icon: 'history'} ]}, { icon: 'folder_open', @@ -142,7 +143,7 @@ {href: '/database', text: 'Databases',icon: 'developer_mode' }, {href: '/files', text: 'File system',icon: 'folder' }, - {href: '/history',text: 'history',icon: 'history'} + {href: '/history/files',text: 'history',icon: 'history'} ]}, { icon: 'memory', diff --git a/src/vue-poc/components/qd-table.vue b/src/vue-poc/components/qd-table.vue index 04ed544..f1baeda 100644 --- a/src/vue-poc/components/qd-table.vue +++ b/src/vue-poc/components/qd-table.vue @@ -6,7 +6,7 @@ - {{ props.item.name }} - {{ props.item.permission }} + XX{{ props.item.name }} + YY{{ foo(props.item) }} + zz{{ foo(props.index) }} @@ -64,7 +65,7 @@ default: "entity" }, noDataMsg:{ - default: "No USERS found @todo" + default: "No data found." }, entity:{ default: "entity" @@ -88,6 +89,9 @@ console.log("items",r.data.items,"headers ",this.headers); this.items=r.data.items; }) + }, + foo(x){ + return 42 } }, created:function(){ diff --git a/src/vue-poc/features/catalog/test.xq b/src/vue-poc/features/catalog/test.xq new file mode 100644 index 0000000..4a7631b --- /dev/null +++ b/src/vue-poc/features/catalog/test.xq @@ -0,0 +1,3 @@ +fetch:xml("http://transpect.io/test/test.xml", +map{"catfile": "C:\Users\andy\Desktop\basex.versions\basex.91.0831\etc\mycatalog.xml"} +) \ No newline at end of file diff --git a/src/vue-poc/features/edit/edit.xqm b/src/vue-poc/features/edit/edit.xqm index d88268e..3bb079b 100644 --- a/src/vue-poc/features/edit/edit.xqm +++ b/src/vue-poc/features/edit/edit.xqm @@ -59,7 +59,7 @@ function vue-api:edit-post($url as xs:string,$data) : Returns a file content. :) declare -%rest:GET %rest:path("/vue-poc/api/get") +%rest:GET %rest:path("/vue-poc/api/get2") %rest:query-param("url", "{$url}") function vue-api:get-webfile($url as xs:string?) as element(json) @@ -79,15 +79,21 @@ as element(json) (:~ : Returns a file content. + : @param $url starts with protocol :) declare -%rest:GET %rest:path("/vue-poc/api/get2") +%rest:GET %rest:path("/vue-poc/api/get") %rest:query-param("url", "{$url}") %output:method("json") function vue-api:get-file($url as xs:string?) as element(json) { - let $path := $url + let $protocol := substring-before($url,":") + let $path:=if($protocol eq "webfile") then + substring-after($url,":") =>ufile:web() + else + $url + return if( file:exists($path))then let $type:=mt:type($path) let $fetch:=mt:fetch-fn($type("treat-as")) diff --git a/src/vue-poc/features/edit/tabs.vue b/src/vue-poc/features/edit/tabs.vue index 8684d2f..c108dfc 100644 --- a/src/vue-poc/features/edit/tabs.vue +++ b/src/vue-poc/features/edit/tabs.vue @@ -18,7 +18,7 @@ - subscriptions + Actionarrow_drop_down Actions @@ -29,7 +29,7 @@ - + *{{ nextId }} @@ -338,15 +338,14 @@ beforeRouteEnter (to, from, next) { Promise.all([settings.getItem('settings/ace'), - settings.getItem('edit/items'), - settings.getItem('edit/currentId'), + settings.getItem('edit/items') ]) .then(function(values) { next(vm => { vm.aceSettings = values[0]; vm.items = values[1]; - vm.currentId = values[2]; - //console.log("done all",values); + vm.currentId = vm.items.length+1; + console.log("nextid: ",vm.currentId); }) }) }, @@ -356,14 +355,16 @@ // be navigated away from. // has access to `this` component instance. settings.setItem('edit/items',this.items); - settings.setItem('edit/currentId',this.currentId); next(true); }, created:function(){ var url=this.$route.query.url; - if(url)this.loadItem(url); + if(url){ + this.loadItem(url); + }else{ var id=this.$route.query.id; this.currentId=id?id:null; + } } } diff --git a/src/vue-poc/features/collection/history.vue b/src/vue-poc/features/history/filehistory.vue similarity index 73% rename from src/vue-poc/features/collection/history.vue rename to src/vue-poc/features/history/filehistory.vue index 35d6031..fa493b6 100644 --- a/src/vue-poc/features/collection/history.vue +++ b/src/vue-poc/features/history/filehistory.vue @@ -1,8 +1,8 @@ -