diff --git a/src/vue-poc/components/core.js b/src/vue-poc/components/core.js index 1d170ce..ebed939 100644 --- a/src/vue-poc/components/core.js +++ b/src/vue-poc/components/core.js @@ -1,7 +1,5 @@ // base ----------------------- -localforage.config({ - name: 'vuepoc' -}); + const AXIOS_CONFIG={ baseURL: "/vue-poc/api/", headers: { @@ -19,6 +17,7 @@ const HTTP = axios.create(AXIOS_CONFIG); const HTTPNE = axios.create(AXIOS_CONFIG); const axios_json={ headers: {accept: 'application/json'}}; +// Authorization Object const Auth={ user:"guest", permission:null, @@ -29,7 +28,23 @@ const Auth={ }; Vue.use(Auth); -// read and write settings +// Mimetype info +const MimeTypes={ + "text/xml":"xml", + "application/xml":"xml", + "application/xquery":"xquery", + "text/ecmascript":"javascript", + "application/sparql-query":"sparql", + "text/html":"html", + "text/turtle":"turtle", + "text/css":"css", + "image/svg+xml":"svg" +}; + +// Settings read and write list clear +localforage.config({ + name: 'vuepoc' +}); // https://vuejs.org/v2/guide/state-management.html var settings = { debug: false, @@ -125,5 +140,6 @@ const Fullscreen={ }) } }; Vue.use(Fullscreen); + Vue.use(Vuetify); new Vuepoc().$mount('#app') diff --git a/src/vue-poc/components/qd-confirm.vue b/src/vue-poc/components/qd-confirm.vue new file mode 100644 index 0000000..7a623b4 --- /dev/null +++ b/src/vue-poc/components/qd-confirm.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/src/vue-poc/data/vue-poc/namespaces.xml b/src/vue-poc/data/vue-poc/namespaces.xml index 8b9248d..bc4f2b2 100644 --- a/src/vue-poc/data/vue-poc/namespaces.xml +++ b/src/vue-poc/data/vue-poc/namespaces.xml @@ -42,4 +42,24 @@ Scalable Vector Graphics namespace + + + Docbook + + + + + Math ML + + + + + Visual Resources Association + + + + + Schematron + + \ No newline at end of file diff --git a/src/vue-poc/features/collection/files.vue b/src/vue-poc/features/collection/files.vue index 753daa1..d5576e5 100644 --- a/src/vue-poc/features/collection/files.vue +++ b/src/vue-poc/features/collection/files.vue @@ -10,7 +10,8 @@ - + {{ item.name }} diff --git a/src/vue-poc/features/edit/edit.vue b/src/vue-poc/features/edit/edit.vue index 5f5af6f..3311631 100644 --- a/src/vue-poc/features/edit/edit.vue +++ b/src/vue-poc/features/edit/edit.vue @@ -5,9 +5,9 @@ {{ message }} highlight_off + - - + {{icon}} @@ -22,12 +22,20 @@ {{ name }} - + * . - {{ mode }} + + {{ mode }} + + + + + + + @@ -87,24 +95,15 @@ more_vert - - - unused + + + - - - - Clear? - clear text. - - Cancel - Ok - - - + + @@ -118,7 +117,19 @@ v-on:annotation="annotation"> - + + + + Confirm action + + Delete all edit text? + + + Cancel + Ok + + + @@ -143,18 +154,8 @@ v-on:annotation="annotation"> message: "Cant do that", events: new Vue({}), folded: false, // toggle fold/unfold action - mimemap:{ - "text/xml":"xml", - "application/xml":"xml", - "application/xquery":"xquery", - "text/ecmascript":"javascript", - "application/sparql-query":"sparql", - "text/html":"html", - "text/turtle":"turtle", - "text/css":"css", - "image/svg+xml":"svg" - }, - aceSettings: { } + aceSettings: { }, + mimeTypes:MimeTypes } }, methods: { @@ -181,8 +182,7 @@ v-on:annotation="annotation"> HTTP.get("edit",{params: {url:url,protocol:this.protocol}}) .then(r=>{ //console.log(r) - this.mimetype=r.data.mimetype - this.mode=this.acetype(r.data.mimetype) + this.setMode(r.data.mimetype) this.contentA=r.data.data this.busy=false @@ -250,9 +250,10 @@ v-on:annotation="annotation"> this.annotations=counts //console.log("annotations: ",counts) }, - acetype(mime){ - var r=this.mimemap[mime] - return r?r:"text" + setMode(mimetype){ + this.mimetype=mimetype + var r=MimeTypes[mimetype] + this.mode=r?r:"text" }, onResize(){ var h=window.innerHeight diff --git a/src/vue-poc/static/app-gen.js b/src/vue-poc/static/app-gen.js index 8d7ee46..5d139de 100644 --- a/src/vue-poc/static/app-gen.js +++ b/src/vue-poc/static/app-gen.js @@ -1,5 +1,27 @@ -// generated 2017-09-17T22:10:03.752+01:00 - Vue.component('qd-fullscreen',{template:` +// generated 2017-09-23T23:02:27.92+01:00 + Vue.component('qd-confirm',{template:` + + + + Confirm action + + Delete all edit text? + + + Cancel + Ok + + + + `, + + data(){ + return {showDialog:false} + }, +} + + ); + Vue.component('qd-fullscreen',{template:` {{ fullscreenIcon }} @@ -437,7 +459,7 @@ Vue.filter('round', function(value, decimals) { - + {{ item.name }} @@ -721,9 +743,9 @@ Vue.filter('round', function(value, decimals) { {{ message }} highlight_off + - - + {{icon}} @@ -738,12 +760,20 @@ Vue.filter('round', function(value, decimals) { {{ name }} - + * . - {{ mode }} + + {{ mode }} + + + + + + + {{annotations && annotations.info}} {{annotations && annotations.warning}} @@ -801,24 +831,15 @@ Vue.filter('round', function(value, decimals) { more_vert - - - unused + + + - - - - Clear? - clear text. - - Cancel - Ok - - - + + @@ -829,7 +850,19 @@ Vue.filter('round', function(value, decimals) { - + + + + Confirm action + + Delete all edit text? + + + Cancel + Ok + + + `, @@ -853,18 +886,8 @@ Vue.filter('round', function(value, decimals) { message: "Cant do that", events: new Vue({}), folded: false, // toggle fold/unfold action - mimemap:{ - "text/xml":"xml", - "application/xml":"xml", - "application/xquery":"xquery", - "text/ecmascript":"javascript", - "application/sparql-query":"sparql", - "text/html":"html", - "text/turtle":"turtle", - "text/css":"css", - "image/svg+xml":"svg" - }, - aceSettings: { } + aceSettings: { }, + mimeTypes:MimeTypes } }, methods: { @@ -891,8 +914,7 @@ Vue.filter('round', function(value, decimals) { HTTP.get("edit",{params: {url:url,protocol:this.protocol}}) .then(r=>{ //console.log(r) - this.mimetype=r.data.mimetype - this.mode=this.acetype(r.data.mimetype) + this.setMode(r.data.mimetype) this.contentA=r.data.data this.busy=false @@ -960,9 +982,10 @@ Vue.filter('round', function(value, decimals) { this.annotations=counts //console.log("annotations: ",counts) }, - acetype(mime){ - var r=this.mimemap[mime] - return r?r:"text" + setMode(mimetype){ + this.mimetype=mimetype + var r=MimeTypes[mimetype] + this.mode=r?r:"text" }, onResize(){ var h=window.innerHeight @@ -3145,7 +3168,6 @@ router.beforeEach((to, from, next) => { children: [ {href: '/database', text: 'Databases',icon: 'developer_mode' }, {href: '/files', text: 'File system',icon: 'folder' }, - {href: '/edit',text: 'Edit',icon: 'mode_edit'}, {href: '/history',text: 'history',icon: 'history'} ]}, { @@ -3153,7 +3175,8 @@ router.beforeEach((to, from, next) => { text: 'Actions' , model: false, children: [ - {href: '/eval',text: 'Query',icon: 'play_circle_outline'}, + {href: '/eval',text: 'Query',icon: 'play_circle_outline'}, + {href: '/edit',text: 'Edit',icon: 'mode_edit'}, {href: '/tasks',text: 'Tasks',icon: 'history'} ]}, { @@ -3257,9 +3280,7 @@ router.beforeEach((to, from, next) => { ); // base ----------------------- -localforage.config({ - name: 'vuepoc' -}); + const AXIOS_CONFIG={ baseURL: "/vue-poc/api/", headers: { @@ -3277,6 +3298,7 @@ const HTTP = axios.create(AXIOS_CONFIG); const HTTPNE = axios.create(AXIOS_CONFIG); const axios_json={ headers: {accept: 'application/json'}}; +// Authorization Object const Auth={ user:"guest", permission:null, @@ -3287,7 +3309,23 @@ const Auth={ }; Vue.use(Auth); -// read and write settings +// Mimetype info +const MimeTypes={ + "text/xml":"xml", + "application/xml":"xml", + "application/xquery":"xquery", + "text/ecmascript":"javascript", + "application/sparql-query":"sparql", + "text/html":"html", + "text/turtle":"turtle", + "text/css":"css", + "image/svg+xml":"svg" +}; + +// Settings read and write list clear +localforage.config({ + name: 'vuepoc' +}); // https://vuejs.org/v2/guide/state-management.html var settings = { debug: false, @@ -3383,5 +3421,6 @@ const Fullscreen={ }) } }; Vue.use(Fullscreen); + Vue.use(Vuetify); new Vuepoc().$mount('#app') diff --git a/src/vue-poc/vue-poc.vue b/src/vue-poc/vue-poc.vue index f18fe33..9c3d9b6 100644 --- a/src/vue-poc/vue-poc.vue +++ b/src/vue-poc/vue-poc.vue @@ -78,7 +78,6 @@ children: [ {href: '/database', text: 'Databases',icon: 'developer_mode' }, {href: '/files', text: 'File system',icon: 'folder' }, - {href: '/edit',text: 'Edit',icon: 'mode_edit'}, {href: '/history',text: 'history',icon: 'history'} ]}, { @@ -86,7 +85,8 @@ text: 'Actions' , model: false, children: [ - {href: '/eval',text: 'Query',icon: 'play_circle_outline'}, + {href: '/eval',text: 'Query',icon: 'play_circle_outline'}, + {href: '/edit',text: 'Edit',icon: 'mode_edit'}, {href: '/tasks',text: 'Tasks',icon: 'history'} ]}, {