diff --git a/src/vue-poc/app.vue b/src/vue-poc/app.vue
index 5655f06..f751db2 100644
--- a/src/vue-poc/app.vue
+++ b/src/vue-poc/app.vue
@@ -190,6 +190,7 @@
{href: '/select',text: 'Select',icon: 'extension'},
{href: '/puzzle',text: 'Puzzle',icon: 'extension'},
{href: '/svg',text: 'SVG',icon: 'extension'},
+ {href: '/svg2',text: 'SVG2',icon: 'extension'},
{href: '/tree',text: 'Tree',icon: 'nature'},
{href: '/tree2',text: 'Tree 2',icon: 'nature'}
]},
@@ -228,9 +229,15 @@
},
created(){
- console.log("create-----------")
+ console.log("create-----------");
+
var that=this
- this.$on("theme",this.onDark)
+ this.$on("theme",this.onDark);
+ window.addEventListener('error', function (err) {
+ var msg=JSON.stringify(err)
+ that.showAlert("vue error:\n"+msg);
+ //alert('window.onerrora-\n' + err.message);
+ });
Vue.config.errorHandler = function (err, vm, info) {
// handle error
// `info` is a Vue-specific error info, e.g. which lifecycle hook
diff --git a/src/vue-poc/components/filters.js b/src/vue-poc/components/filters.js
index f266b86..6352e2c 100644
--- a/src/vue-poc/components/filters.js
+++ b/src/vue-poc/components/filters.js
@@ -1,5 +1,9 @@
/**
- * vue filters
+ * some vue filters, requires moment
+ * formatDate
+ * fromNow
+ * readablizeBytes
+ * round
*/
//Define the date time format filter
diff --git a/src/vue-poc/core.js b/src/vue-poc/core.js
index 4b5632a..f59cb86 100644
--- a/src/vue-poc/core.js
+++ b/src/vue-poc/core.js
@@ -101,14 +101,33 @@ localforage.config({
var settings = {
debug: false,
defaults:{
+
"settings/ace": {
- theme: "github",
- keybinding: "ace",
- fontsize: 16,
- enableSnippets:true,
- enableBasicAutocompletion:true,
- enableLiveAutocompletion:true
- },
+ theme: "github",
+ keybinding: "ace",
+ fontsize: 16,
+ enableSnippets:true,
+ enableBasicAutocompletion:true,
+ enableLiveAutocompletion:true
+ },
+
+ "features/serviceworker": true,
+ "edit/items":[
+ {name:"web.txt", id:"1", mode:"text", dirty: false,
+ text:`Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
+ut aliquip ex ea commodo consequat.`},
+
+ {name:"Shopping.xq", id:"2", mode: "xquery" ,dirty: false,
+ text:`let $a:=1 to 5
+return $a `},
+
+ {name:"videos.xml", id:"3", mode:"xml",dirty: false, location: "/aaa/bca/",
+ text:`
+ hello
+`}
+ ]
},
getItem (key) {
if (this.debug) console.log('getItem',key);
@@ -215,7 +234,9 @@ const Fullscreen={
}) }
};
Vue.use(Fullscreen);
-Vue.use(VueTreeselect);
+
+Vue.component('treeselect', VueTreeselect.Treeselect);
+
//Vue.use( VueFormJsonSchema);
function install (Vue) {
Vue.component('vue-form-json-schema', VueFormJsonSchema);
diff --git a/src/vue-poc/data/vue-poc/history.xml b/src/vue-poc/data/vue-poc/history.xml
index 867a27e..c22e142 100644
--- a/src/vue-poc/data/vue-poc/history.xml
+++ b/src/vue-poc/data/vue-poc/history.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/src/vue-poc/expath-pkg.xml b/src/vue-poc/expath-pkg.xml
index eb7cffd..0ea2b02 100644
--- a/src/vue-poc/expath-pkg.xml
+++ b/src/vue-poc/expath-pkg.xml
@@ -1,15 +1,16 @@
vue-poc test of vue.js.
-
+
+
-
+
-
+
diff --git a/src/vue-poc/features/collection/files.vue b/src/vue-poc/features/collection/files.vue
index 7e3f08d..fab796e 100644
--- a/src/vue-poc/features/collection/files.vue
+++ b/src/vue-poc/features/collection/files.vue
@@ -12,7 +12,8 @@
-
+
+
{{ item.name }}
@@ -252,11 +253,11 @@
},
// array of {name:"that", path:"/this/that/"} for url
crumbs(){
- var parts=this.url.split("/").filter((a)=>a.length>0)
- var a=parts.map(
- function(v,i,a){return {name:v, path:"/"+a.slice(0,i+1).join("/")+"/"}}
- )
- return a
+ var url=this.url
+ return url.split("/").slice(0,-1).map(
+ function(v,i,a){return {name:v +"/",
+ path:a.slice(0,i+1).join("/")+"/"}}
+ )
},
selection(){
return this.items.filter(item=>{return item.selected} )
diff --git a/src/vue-poc/features/edit/tabs.vue b/src/vue-poc/features/edit/tabs.vue
index 81004af..dada2a8 100644
--- a/src/vue-poc/features/edit/tabs.vue
+++ b/src/vue-poc/features/edit/tabs.vue
@@ -109,23 +109,7 @@
a1:"",
currentItem: null, //href of current
active: null,
- items: [
- {name:"web.txt", id:"1", mode:"text", dirty: false,
- text:`Lorem ipsum dolor sit amet, consectetur adipiscing elit,
-sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
-Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
-ut aliquip ex ea commodo consequat.`},
-
- {name:"Shopping.xq", id:"2", mode: "xquery" ,dirty: false,
- text:`let $a:=1 to 5
-return $a `},
-
- {name:"videos.xml", id:"3", mode:"xml",dirty: false, location: "/aaa/bca/",
- text:`
- hello
-`},
-
- ],
+ items: [],
wrap: true,
aceSettings: {},
mimeTypes:MimeTypes
@@ -181,11 +165,13 @@ return $a `},
}
},
},
+
watch:{
currentItem: function (val) {
this.active = this.items.find(e=> val=="T"+e.id)
}
},
+
computed:{
sorted(){
return this.items.slice(0).sort((a,b) => a.name.localeCompare(b.name)) ;
@@ -200,5 +186,18 @@ return $a `},
.then( v =>{
next(vm => {vm.aceSettings = v;})
})
- },
+ settings.getItem('edit/items')
+ .then( v =>{
+ next(vm => {vm.items = v;})
+ })
+ },
+
+ beforeRouteLeave (to, from, next) {
+ // called when the route that renders this component is about to
+ // be navigated away from.
+ // has access to `this` component instance.
+ settings.setItem('edit/items',this.items);
+ next(true);
+ }
+
}
diff --git a/src/vue-poc/features/form/form-json-schema.vue b/src/vue-poc/features/form/form-json-schema.vue
index 96abf48..cde913b 100644
--- a/src/vue-poc/features/form/form-json-schema.vue
+++ b/src/vue-poc/features/form/form-json-schema.vue
@@ -2,7 +2,7 @@
- vue-form-json-schema@1.13.4
+ vue-form-json-schema@1.15.3
-
-
- Svg.
-
- Reset
-
+
+
+
+ Reset
+ Size
+
+
+ set
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Bilabial
+ Labiodental
+ Dental
+ Interdental
+ Alveolar
+ Alveopalatal
+ Palatal
+ Velar
+ Uvular
+ Pharyngeal
+ Glottal
+
+ Voiced
+ Voiceless
+
+
+
+
+
\ No newline at end of file
diff --git a/src/vue-poc/static/resources/butterfly.svg b/src/vue-poc/static/resources/svg/butterfly.svg
similarity index 100%
rename from src/vue-poc/static/resources/butterfly.svg
rename to src/vue-poc/static/resources/svg/butterfly.svg
diff --git a/src/vue-poc/static/resources/https _shkspr.mobi_svg_calendar.svg b/src/vue-poc/static/resources/svg/https _shkspr.mobi_svg_calendar.svg
similarity index 100%
rename from src/vue-poc/static/resources/https _shkspr.mobi_svg_calendar.svg
rename to src/vue-poc/static/resources/svg/https _shkspr.mobi_svg_calendar.svg
diff --git a/src/vue-poc/static/resources/svg/tiger.svg b/src/vue-poc/static/resources/svg/tiger.svg
new file mode 100644
index 0000000..28763f2
--- /dev/null
+++ b/src/vue-poc/static/resources/svg/tiger.svg
@@ -0,0 +1,726 @@
+
+
+
\ No newline at end of file
diff --git a/src/vue-poc/static/serviceworker.js b/src/vue-poc/static/serviceworker.js
index 6393aca..905c62e 100644
--- a/src/vue-poc/static/serviceworker.js
+++ b/src/vue-poc/static/serviceworker.js
@@ -5,16 +5,15 @@ console.log('WORKER: executing.');
/* A version number is useful when updating the worker logic,
allowing you to remove outdated cache entries during the update.
*/
-var version = 'v1:3:';
+var version = 'v0:4:';
/* These resources will be downloaded and cached by the service worker
during the installation process. If any resource fails to be downloaded,
then the service worker won't be installed either.
*/
var offlineFundamentals = [
- '',
'prof-stat.js',
- '//cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.js'
+ '//cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.js'
];
/* The install event fires when the service worker is first installed.
diff --git a/src/vue-poc/static/svg/d3-svg.css b/src/vue-poc/static/svg/d3-svg.css
index b1e6cea..068b322 100644
--- a/src/vue-poc/static/svg/d3-svg.css
+++ b/src/vue-poc/static/svg/d3-svg.css
@@ -7,7 +7,6 @@ html, body {
}
.canvas {
overflow: hidden;
- background-color:green;
}
.canvas .wrapper.outer > .background {
fill: #000000;
diff --git a/src/vue-poc/static/svg/d3-svg.js b/src/vue-poc/static/svg/d3-svg.js
index 2b1a333..b67b8b5 100644
--- a/src/vue-poc/static/svg/d3-svg.js
+++ b/src/vue-poc/static/svg/d3-svg.js
@@ -160,7 +160,18 @@ d3.demo.canvas = function() {
panCanvas.node().appendChild(item.node());
minimap.render();
};
-
+
+ /** SET SHAPE **/
+ canvas.setItem=function(item){
+ var tn=panCanvas.node();
+ while (tn.hasChildNodes()) {
+ tn.removeChild(tn.lastChild);
+ };
+ panCanvas.node().appendChild(item.node());
+ canvas.reset();
+ minimap.render();
+ };
+
/** RENDER **/
canvas.render = function() {
svgDefs