Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Start reworking ajxp_conf layout. The occasion to clean the way objec…
Browse files Browse the repository at this point in the history
…ts are destroyed.
  • Loading branch information
cdujeu committed Oct 23, 2013
1 parent 86f63f0 commit ac33f74
Show file tree
Hide file tree
Showing 19 changed files with 239 additions and 67 deletions.
77 changes: 77 additions & 0 deletions core/src/plugins/access.ajxp_conf/ajxp_conf.css
@@ -0,0 +1,77 @@
.flat_tree_pane #tree_container > .webfx-tree-item{
display: none;
}

.flat_tree_pane .webfx-tree-item{
background-color: rgba(138, 149, 160, 0.7);
border-bottom: 1px solid white;
/* height: 44px;*/
cursor: pointer;
}

.flat_tree_pane .webfx-tree-item.selected-webfx-tree-item-inactive{
background-color: #59f !important;
color: white !important;
}

.flat_tree_pane .webfx-tree-item.selected-webfx-tree-item-inactive a{
color: #fff !important;
}

.flat_tree_pane .webfx-tree-item a{
color: white;
cursor: pointer;
}

.flat_tree_pane .webfx-tree-item a span{
/* font-size: 16px;
padding-top: 6px ;
padding-bottom: 4px ;
padding-left: 50px;
background-position: 11px 5px !important;
background-size: 24px;
line-height: 24px;*/
}

.flat_tree_pane .webfx-tree-item img{
display:none;
}

.flat_tree_pane .webfx-tree-container > .webfx-tree-container > .webfx-tree-item{
background-color: transparent;
}

.flat_tree_pane .webfx-tree-container > .webfx-tree-container > .webfx-tree-item a {
color: rgb(111, 123, 136);
}

.flat_tree_pane .webfx-tree-container > .webfx-tree-container .webfx-tree-container{
}

.flat_tree_pane .webfx-tree-container > .webfx-tree-container .webfx-tree-container .webfx-tree-item{
background-color: #ffffff;
padding-left: 30px;
}

.flat_tree_pane .webfx-tree-container > .webfx-tree-container .webfx-tree-container .webfx-tree-item:last-of-type{
border-radius: 0 0 5px 5px;
}

.flat_tree_pane .webfx-tree-container > .webfx-tree-container > .webfx-tree-item a {
color: rgb(111, 123, 136);
}

.developerDoc{
font-size: 12px !important;
line-height: 18px !important;
padding-bottom: 5px;
}
.developerApiAccess{
display: inline-block;
margin: 5px 0;
}
#pydio-go-pro_button {
background: #fa715c;
border-radius: 4px;
padding: 2px 7px 2px 3px !important;
}
4 changes: 4 additions & 0 deletions core/src/plugins/access.ajxp_conf/ajxp_confActions.xml
Expand Up @@ -403,6 +403,9 @@
<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""></rightsContext>
<processing>
<clientCallback prepareModal="false"><![CDATA[
var editorData = window.actionArguments[0];
ajaxplorer.openCurrentSelectionInEditor(editorData);
/*
var editorData = window.actionArguments[0];
if(!editorData){
var selectedMime = getAjxpMimeType(ajaxplorer.getUserSelection().getUniqueNode());
Expand All @@ -415,6 +418,7 @@
ajaxplorer.loadEditorResources(editorData.resourcesManager);
modal.openEditorDialog(editorData);
}
*/
]]></clientCallback>
<serverCallback methodName="switchAction" developerComment="Shortcut for various actions, calling edit with subaction parameter."/>
</processing>
Expand Down
Expand Up @@ -410,7 +410,18 @@ public function switchAction($action, $httpVars, $fileVars)
$bmString = '';
if(in_array($parentName.$key, $this->currentBookmarks)) $bmString = ' ajxp_bookmarked="true" overlay_icon="bookmark.png" ';
if($key == "users") $bmString .= ' remote_indexation="admin_search"';
print '<tree text="'.AJXP_Utils::xmlEntities($data["LABEL"]).'" description="'.AJXP_Utils::xmlEntities($data["DESCRIPTION"]).'" icon="'.$data["ICON"].'" filename="'.$parentName.$key.'" '.$bmString.'/>';
if(empty($data["CHILDREN"])){
print '<tree text="'.AJXP_Utils::xmlEntities($data["LABEL"]).'" description="'.AJXP_Utils::xmlEntities($data["DESCRIPTION"]).'" icon="'.$data["ICON"].'" filename="'.$parentName.$key.'" '.$bmString.'/>';
}else{
print '<tree text="'.AJXP_Utils::xmlEntities($data["LABEL"]).'" description="'.AJXP_Utils::xmlEntities($data["DESCRIPTION"]).'" icon="'.$data["ICON"].'" filename="'.$parentName.$key.'" '.$bmString.'>';
foreach($data["CHILDREN"] as $cKey => $cData){
$bmString = '';
if(in_array($parentName.$key."/".$cKey, $this->currentBookmarks)) $bmString = ' ajxp_bookmarked="true" overlay_icon="bookmark.png" ';
if($cKey == "users") $bmString .= ' remote_indexation="admin_search"';
print '<tree text="'.AJXP_Utils::xmlEntities($cData["LABEL"]).'" description="'.AJXP_Utils::xmlEntities($cData["DESCRIPTION"]).'" icon="'.$cData["ICON"].'" filename="'.$parentName.$key.'/'.$cKey.'" '.$bmString.'/>';
}
print '</tree>';
}
}
AJXP_XMLWriter::close();

Expand Down
50 changes: 23 additions & 27 deletions core/src/plugins/access.ajxp_conf/manifest.xml
Expand Up @@ -9,6 +9,7 @@
<i18n namespace="ajxp_conf" path="plugins/access.ajxp_conf/i18n" />
<i18n namespace="ajxp_shared" path="plugins/access.ajxp_shared/i18n" />
<js file="plugins/access.ajxp_conf/class.ConfigEditor.js" className="ConfigEditor"/>
<css file="plugins/access.ajxp_conf/ajxp_conf.css" autoload="true"/>
</resources>
</client_settings>
<registry_contributions>
Expand Down Expand Up @@ -36,15 +37,6 @@
]]></template_part>
<template_part ajxpClass="AjxpPane" ajxpId="info_panel" ajxpOptions='{}'><![CDATA[
<style>
.webfx-tree-item:first-of-type{
display:none;
}
.webfx-tree-container>.webfx-tree-item:first-of-type{
display:block;
}
.webfx-tree-container.first_container{
margin-left: -19px;
}
.action_bar a, .menu.desktop.toolbarmenu, div.editor_header a{
background-color: rgb(78, 154, 179) !important;
}
Expand All @@ -55,23 +47,9 @@
#switch_to_settings_button {
display: none !important;
}
.developerDoc{
font-size: 12px !important;
line-height: 18px !important;
padding-bottom: 5px;
}
.developerApiAccess{
display: inline-block;
margin: 5px 0;
}
.table_rows_container td{
vertical-align:top;
}
#pydio-go-pro_button {
background: #fa715c;
border-radius: 4px;
padding: 2px 7px 2px 3px !important;
}
</style>
<script>
var splitter = $("vertical_splitter").ajxpPaneObject;
Expand All @@ -91,15 +69,33 @@
}
splitter.resizeGroup();
});
document.observeOnce("ajaxplorer:context_changed", function(){
$A($("folder_pane").ajxpPaneObject.tree.childNodes).each(function(c){c.expand();})
//$("folder_pane").ajxpPaneObject.tree.expandAll();
});
</script>
]]></template_part>
<template_part ajxpClass="AjxpTabulator" theme="vision" ajxpId="topPane" ajxpOptions='{"defaultTabId": "folders","tabInfos" : [{"id":"folders","label":"130","iconClass":"icon-folder-open","element":"folder_pane"},{"id":"flagged","label":"147","iconClass":"icon-star","element":"flagged_elements"}],"headerToolbarOptions":{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["filter"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}}'><![CDATA[
<div id="folder_pane" ajxpClass="FoldersTree" ajxpOptions='{"display":"dz","replaceScroller":true}' ></div>
<div id="folder_pane" class="flat_tree_pane" ajxpClass="FoldersTree" ajxpOptions='{"display":"dz","replaceScroller":true}' ></div>
<div id="flagged_elements" ajxpClass="FetchedResultPane" ajxpOptions='{"nodeProviderProperties":{"get_action":"get_bookmarks", "format":"node_list"},"reloadOnServerMessage":"tree/reload_bookmarks"}'></div>
]]></template_part>
<component_config className="Splitter::vertical_splitter">
<property name="resize" value="100%"/>
</component_config>
<!--
<template_part ajxpId="browser" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"ajxp_desktop", "fakeOption":"true"}' theme="vision"><![CDATA[
<div id="vertical_splitter" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "initA": "50%", "minA":26, "fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"A"}'>
<div id="topPane" ajxpClass="AjxpTabulator" ajxpOptions='{"defaultTabId": "folders","tabInfos" : [{"id":"folders","label":"165","iconClass":"icon-cog","element":"settings_pane"},{"id":"flagged","label":"147","iconClass":"icon-star","element":"flagged_elements"}],"headerToolbarOptions":{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["filter","vertical_splitter2-actions"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}}'>
<div id="settings_pane" ajxpClass="FoldersTree" ajxpOptions='{"display":"dz","replaceScroller":true}' ></div>
<div id="flagged_elements" ajxpClass="FetchedResultPane" ajxpOptions='{"nodeProviderProperties":{"get_action":"get_bookmarks", "format":"node_list"},"reloadOnServerMessage":"tree/reload_bookmarks"}'></div>
</div>
<div id="cpane_container2" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"browser"}'>
<div id="cpane_tabs" ajxpClass="AjxpTabulator" ajxpOptions='{"fit":"height", "fitParent":"browser","registerAsEditorOpener":true, "saveState":true,"events":{"ajaxplorer:context_changed":"this.switchTabulator(this.tabulatorData.first().id);"}, "defaultTabId": "files","tabInfos" : [{"id":"files","label":"","iconClass":"icon-folder-open", "element":"files_list_pane"}]}'>
<div id="files_list_pane" ajxpClass="AjxpPane">
<div id="content_pane" ajxpClass="FilesList" ajxpOptions='{"displayMode":"detail","replaceScroller":true, "fit":"height", "fitParent":"files_lit_pane", "cellPaddingCorrection":6, "iconBgPosition" : "5px 4px"}' style="border: 1px solid #bbb; border-width:0 1px;"></div>
</div>
</div>
</div>
</div>
]]></template_part>
-->
</client_configs>
<external_file filename="plugins/access.ajxp_conf/ajxp_confActions.xml" include="actions/*"/>
<external_file filename="plugins/access.ajxp_shared/manifest.xml" include='registry_contributions/actions/action[@name="clear_expired"]'/>
Expand Down
6 changes: 5 additions & 1 deletion core/src/plugins/editor.ajxp_plugin/class.PluginEditor.js
Expand Up @@ -89,7 +89,7 @@ Class.create("PluginEditor", AbstractEditor, {
open : function($super, node){
$super(node);
this.pluginId = getBaseName(node.getMetadata().get("plugin_id"));
this.element.down("span.header_label").update(node.getMetadata().get("text"));
this.updateTitle(node.getMetadata().get("text"));
var icon = resolveImageSource(node.getIcon(), "/images/mimes/64");
this.element.down("span.header_label").setStyle(
{
Expand All @@ -101,6 +101,10 @@ Class.create("PluginEditor", AbstractEditor, {
this.loadPluginConfig();
},

updateTitle: function(label){
this.element.down("span.header_label").update(label);
this.element.fire("editor:updateTitle", label);
},

loadPluginConfig : function(){
var params = new Hash();
Expand Down
Expand Up @@ -86,10 +86,10 @@ Class.create("RepositoryEditor", AbstractEditor, {
$super(node);
if(Object.isString(node)){
this.repositoryId = node;
this.element.down("span.header_label").update("New Repository");
this.updateTitle("New Repository");
}else{
this.repositoryId = getBaseName(node.getPath());
this.element.down("span.header_label").update(node.getMetadata().get("text"));
this.updateTitle(node.getMetadata().get("text"));
var icon = resolveImageSource(node.getIcon(), "/images/mimes/64");
this.element.down("span.header_label").setStyle(
{
Expand All @@ -103,6 +103,10 @@ Class.create("RepositoryEditor", AbstractEditor, {
this.loadRepository(this.repositoryId);
},

updateTitle: function(label){
this.element.down("span.header_label").update("WS: "+label);
this.element.fire("editor:updateTitle", "WS: "+label);
},

loadRepository : function(repId, metaTab){
var params = new Hash();
Expand Down
17 changes: 12 additions & 5 deletions core/src/plugins/editor.ajxp_role/class.RoleEditor.js
Expand Up @@ -130,7 +130,6 @@ Class.create("RoleEditor", AbstractEditor, {

if(this.roleData.USER){
this.roleData.USER.PROFILE = this.element.down("#account_infos").down("select[name='profile']").getValue();
this.roleData.USER.DEFAULT_REPOSITORY = this.element.down("#account_infos").down("select[name='default_repository']").getValue();
this.roleData.USER.ROLES = this.element.down("#account_infos").down("select[name='roles']").getValue();
fullPostData["USER"] = this.roleData.USER;
}else if(this.roleData.GROUP){
Expand Down Expand Up @@ -166,6 +165,15 @@ Class.create("RoleEditor", AbstractEditor, {

},

updateTitle: function(label){
var pref = '';
if(this.scope == 'role') pref = 'Role: ';
else if(this.scope == 'user') pref = 'User: ';
else if(this.scope == 'group') pref = 'Group: ';
this.element.down("span.header_label").update(pref+label);
this.element.fire("editor:updateTitle", pref+label);
},

open : function($super, node){
$super(node);
var mime = node.getAjxpMime();
Expand All @@ -178,9 +186,9 @@ Class.create("RoleEditor", AbstractEditor, {
this.roleId = "AJXP_USR_/" + getBaseName(node.getPath());
scope = "user";
}
this.element.down("span.header_label").update(getBaseName(node.getPath()));
this.node = node;
this.scope = scope;
this.updateTitle(getBaseName(node.getPath()));
this.loadRoleData(true);
},

Expand Down Expand Up @@ -277,7 +285,6 @@ Class.create("RoleEditor", AbstractEditor, {
var defs = [
$H({"name":"login",label:MessageHash["ajxp_role_editor.21"],"type":"string", default:getBaseName(node.getPath()), readonly:true}),
$H({"name":"profile",label:MessageHash["ajxp_role_editor.22"],"type":"select", choices:profilesChoices, default:this.roleData.USER.PROFILE}),
//$H({"name":"default_repository",label:MessageHash["ajxp_role_editor.23"],"type":"select", choices:repos.join(","),default:this.roleData.USER.DEFAULT_REPOSITORY}),
$H({"name":"roles",label:MessageHash["ajxp_role_editor.24"],"type":"select", multiple:true, choices:rolesChoicesString, default:this.roleData.USER.ROLES.join(",")})
];
defs = $A(defs);
Expand Down Expand Up @@ -394,7 +401,7 @@ Class.create("RoleEditor", AbstractEditor, {
defs = $A(defs);
f.createParametersInputs(this.element.down("#pane-infos").down("#account_infos"), defs, true, false, false, true);
// UPDATE MAIN HEADER
this.element.down("span.header_label").update(this.roleData.GROUP.LABEL);
this.updateTitle(this.roleData.GROUP.LABEL);

// REMOVE BUTTONS
this.element.down("#pane-infos").down("#account_actions").remove();
Expand All @@ -419,7 +426,7 @@ Class.create("RoleEditor", AbstractEditor, {
if(param.get("name").endsWith("DISPLAY_NAME") && param.get("default")){
var display = param.get("default");
if(this.roleData.USER && this.roleData.USER.LOCK) display += " ("+ MessageHash["ajxp_role_editor.36"] +")";
this.element.down("span.header_label").update(display);
this.updateTitle(display);
}
updatedDefs.push(param);
}.bind(this));
Expand Down
8 changes: 8 additions & 0 deletions core/src/plugins/editor.ajxp_role/rolesEditor.css
@@ -1,5 +1,13 @@
div.tabbed_editor{
background-color: #194172;
font-size: 13px;
border-left: 1px solid #bbbbbb;
border-right: 1px solid #bbbbbb;
line-height: initial;
}

div.tabbed_editor input, div.tabbed_editor select{
font-size: 13px;
}

.ajxp_theme_vision div.tabbed_editor{
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/manifest.xml
Expand Up @@ -132,7 +132,7 @@
<div id="browser" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"ajxp_desktop"}'>
<div id="vertical_splitter" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "initA":"70%", "minB":26,"fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"B"}'>
<div id="vertical_splitter2" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "initA": "50%", "minA":26, "maxA":450, "fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"A"}'>
<div id="topPane" ajxpClass="AjxpTabulator" ajxpOptions='{"defaultTabId": "folders","tabInfos" : [{"id":"folders","label":"130","iconClass":"icon-folder-open","element":"folder_pane"},{"id":"flagged","label":"147","iconClass":"icon-star","element":"flagged_elements"}],"headerToolbarOptions":{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["filter","vertical_splitter2-actions"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}}'>
<div id="topPane" ajxpClass="AjxpTabulator" ajxpOptions='{"defaultTabId": "folders","tabInfos" : [{"id":"folders","label":"130","iconClass":"icon-folder-close","element":"folder_pane"},{"id":"flagged","label":"147","iconClass":"icon-star","element":"flagged_elements"}],"headerToolbarOptions":{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["filter","vertical_splitter2-actions"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}}'>
<div id="folder_pane" ajxpClass="FoldersTree" ajxpOptions='{"display":"dz","replaceScroller":true}' ></div>
<div id="flagged_elements" ajxpClass="FetchedResultPane" ajxpOptions='{"nodeProviderProperties":{"get_action":"get_bookmarks", "format":"node_list"},"reloadOnServerMessage":"tree/reload_bookmarks"}'></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

0 comments on commit ac33f74

Please sign in to comment.