]>
git.argeo.org Git - gpl/argeo-slc.git/blob - server/org.argeo.slc.ria/src/argeo-ria-lib/jcr/class/org/argeo/jcr/ria/JcrBrowser.js
48191b259bf422ed0798467c4143deb640aa6ceb
2 * IPerspective Implementation : Horizontal split pane defining two panes, "list" and "applet".
5 /* ************************************************************************
7 ************************************************************************ */
8 qx
.Class
.define("org.argeo.jcr.ria.JcrBrowser",
10 extend
: qx
.core
.Object
,
11 implement
: [org
.argeo
.ria
.components
.IPerspective
],
13 construct : function(){
15 org
.argeo
.ria
.util
.Element
.DEFAULT_NAMESPACE_MAP
= {slc
:"http://argeo.org/projects/slc/schemas"};
19 LABEL
: "JCR Browser",
20 ICON
: "org.argeo.slc.ria/utilities-terminal.png"
21 //ROLES_RESTRICTION : ["ROLE_ADMIN"]
27 initViewPanes : function(viewsManager
){
29 this._tBar
= new org
.argeo
.ria
.components
.ViewPane("toolbar", "");
30 this._tBar
.header
.setVisibility("excluded");
31 viewsManager
.getViewPanesContainer().add(this._tBar
);
33 this._splitPane
= new qx
.ui
.splitpane
.Pane("horizontal");
34 var leftPane
= new org
.argeo
.ria
.components
.ViewPane("treeview", "Tree View");
35 this._splitPane
.add(leftPane
, 1);
36 var mainPane
= new org
.argeo
.ria
.components
.ViewPane("fulltree", "Editor View");
37 this._splitPane
.add(mainPane
, 2);
38 viewsManager
.registerViewPane(this._tBar
);
39 viewsManager
.registerViewPane(mainPane
);
40 viewsManager
.registerViewPane(leftPane
);
41 viewsManager
.getViewPanesContainer().add(this._splitPane
, {flex
:1});
45 initViews : function(viewsManager
){
46 var nodeProvider
= new org
.argeo
.jcr
.ria
.provider
.XmlNodeProvider();
47 nodeProvider
.initProvider({
48 xmlSrc
: "/org.argeo.slc.webapp/getJcrItem.jcr?",
52 var rootNode
= new org
.argeo
.jcr
.ria
.model
.Node("Root", nodeProvider
, true);
53 rootNode
.setPath('/slc');
54 var dataModel
= new org
.argeo
.jcr
.ria
.model
.DataModel(rootNode
);
56 var inputView
= viewsManager
.initIViewClass(org
.argeo
.jcr
.ria
.views
.ContextNodeInputView
, "toolbar", dataModel
);
59 var testView
= viewsManager
.initIViewClass(org
.argeo
.jcr
.ria
.views
.PlainXmlViewer
, "fulltree", dataModel
);
62 var treeView
= viewsManager
.initIViewClass(org
.argeo
.jcr
.ria
.views
.TreeView
, "treeview", dataModel
);
66 remove : function(viewsManager
){
67 viewsManager
.getViewPanesContainer().remove(this._splitPane
);
68 viewsManager
.getViewPanesContainer().remove(this._tBar
);