X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=server%2Forg.argeo.slc.ria%2Fsrc%2Fargeo-ria-lib%2Fjcr%2Fclass%2Forg%2Fargeo%2Fjcr%2Fria%2Fviews%2FTreeView.js;fp=server%2Forg.argeo.slc.ria%2Fsrc%2Fargeo-ria-lib%2Fjcr%2Fclass%2Forg%2Fargeo%2Fjcr%2Fria%2Fviews%2FTreeView.js;h=0000000000000000000000000000000000000000;hb=f5619266b1acabf1cc375487818c3d6a6e0614dc;hp=5b949b75ee5a22f92a0da873843373d5a7c4d646;hpb=1973d521367cdfe1d467da2bb8a539284996bcf6;p=gpl%2Fargeo-slc.git diff --git a/server/org.argeo.slc.ria/src/argeo-ria-lib/jcr/class/org/argeo/jcr/ria/views/TreeView.js b/server/org.argeo.slc.ria/src/argeo-ria-lib/jcr/class/org/argeo/jcr/ria/views/TreeView.js deleted file mode 100644 index 5b949b75e..000000000 --- a/server/org.argeo.slc.ria/src/argeo-ria-lib/jcr/class/org/argeo/jcr/ria/views/TreeView.js +++ /dev/null @@ -1,250 +0,0 @@ -qx.Class.define("org.argeo.jcr.ria.views.TreeView", { - extend : qx.ui.container.Composite, - implement : [org.argeo.ria.components.IView], - - properties : { - /** - * The commands definition Map that will be automatically added and wired to the menubar and toolbar. - * See {@link org.argeo.ria.event.CommandsManager#definitions} for the keys to use for defining commands. - */ - commands : { - init : { - "zoom_in" : { - label : "Zoom To Node", - icon : "org.argeo.jcr.ria/zoom-in.png", - shortcut : null, - enabled : true, - menu : "Zoom", - toolbar : null, - callback : function(e) { - var selection = this.tree.getSelection(); - if(!selection.length) return; - var path = selection[0].getJcrNode().getPath(); - this.getDataModel().requireContextChange(path); - }, - selectionChange : function(viewId, selection){ - if(viewId != "treeview") return; - if(!selection || !selection.length) return; - var treeNode = selection[0]; - if(treeNode.getParent()!=null){ - this.setEnabled(true); - }else{ - this.setEnabled(false); - } - } - }, - "zoom_out" : { - label : "Zoom Out", - icon : "org/argeo/jcr/ria/zoom-out.png", - shortcut : null, - enabled : true, - menu : "Zoom", - toolbar : null, - submenu : [], - callback : function(e) { - }, - submenuCallback : function(commandId){ - this.getDataModel().requireContextChange(commandId); - }, - selectionChange : function(viewId, selection){ - if(viewId != "treeview") return; - if(!selection || !selection.length) return; - var treeNode = selection[0]; - if(treeNode.getParent()!=null || treeNode.getJcrNode().itemIsRoot()){ - this.setEnabled(false); - return; - } - this.setEnabled(true); - var nodePath = treeNode.getJcrNode().getPath(); - var parts = nodePath.split("\/"); - var pathes = []; - parts.pop(); - if(parts.length > 1){ - var initLength = parts.length; - for(var i=0;i