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

Commit

Permalink
Set Dashboard as default repository in ROOT_ROLE
Browse files Browse the repository at this point in the history
Fix Dashboard tweaks: "welcome, userID" , password focus in webdav pane
Fix Mobile template and Media queries CSS
User Wiget: add a "down arrow" to make more visible the access to the user menu
  • Loading branch information
cdujeu committed Jan 20, 2014
1 parent ebd921d commit 12bba9c
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 18 deletions.
3 changes: 3 additions & 0 deletions core/src/core/classes/class.AuthService.php
Expand Up @@ -415,15 +415,18 @@ public static function bootSequence(&$START_PARAMETERS)
$rootRole = new AJXP_Role("ROOT_ROLE");
$rootRole->setLabel("Root Role");
$rootRole->setAutoApplies(array("standard", "admin"));
$dashId = "";
foreach (ConfService::getRepositoriesList("all") as $repositoryId => $repoObject) {
if($repoObject->isTemplate) continue;
if($repoObject->getAccessType() == "ajxp_user") $dashId = $repositoryId;
$gp = $repoObject->getGroupPath();
if (empty($gp) || $gp == "/") {
if ($repoObject->getDefaultRight() != "") {
$rootRole->setAcl($repositoryId, $repoObject->getDefaultRight());
}
}
}
if(!empty($dashId)) $rootRole->setParameterValue("core.conf", "DEFAULT_REPOSITORY", $dashId);
$paramNodes = AJXP_PluginsService::searchAllManifests("//server_settings/param[@scope]", "node", false, false, true);
if (is_array($paramNodes) && count($paramNodes)) {
foreach ($paramNodes as $xmlNode) {
Expand Down
7 changes: 5 additions & 2 deletions core/src/core/classes/class.ConfService.php
Expand Up @@ -653,13 +653,16 @@ public function getRepositoryByIdInst($repoId)
if (iSset($this->configs["REPOSITORY"]) && $this->configs["REPOSITORY"]->getId()."" == $repoId) {
return $this->configs["REPOSITORY"];
}
$test = $this->getConfStorageImpl()->getRepositoryById($repoId);
if($test != null) {
return $test;
}
// Finally try to search in default repositories
if (isSet($this->configs["DEFAULT_REPOSITORIES"]) && isSet($this->configs["DEFAULT_REPOSITORIES"][$repoId])) {
$repo = self::createRepositoryFromArray($repoId, $this->configs["DEFAULT_REPOSITORIES"][$repoId]);
$repo->setWriteable(false);
if(!isset($this->configs["REPOSITORIES"])) $this->configs["REPOSITORIES"][$repoId] = $repo;
return $repo;
}
return $this->getConfStorageImpl()->getRepositoryById($repoId);
}

/**
Expand Down
Expand Up @@ -26,7 +26,7 @@ Class.create("UserDashboardHome", AjxpPane, {

$super(oFormObject, editorOptions);

oFormObject.down("#welcome").update( MessageHash['user_dash.40'].replace('%s', ajaxplorer.user.getPreference("USER_DISPLAY_NAME")));
oFormObject.down("#welcome").update( MessageHash['user_dash.40'].replace('%s', ajaxplorer.user.getPreference("USER_DISPLAY_NAME") || ajaxplorer.user.id));

var wsElement = oFormObject.down('#workspaces_list');
attachMobileScroll(wsElement, 'vertical');
Expand Down
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_user/class.WebDAVprefsEditor.js
Expand Up @@ -27,6 +27,8 @@ Class.create("WebDAVprefsEditor", AjxpPane, {
var cont = element.down('#webdav_repo_list');
cont.update('');
var activator = element.down("#webdav_activator");
element.down('#webdav_password').observe("focus", function(){ajaxplorer.disableAllKeyBindings()});
element.down('#webdav_password').observe("blur", function(){ajaxplorer.enableAllKeyBindings()});

var even = false;
var conn = new Connexion();
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.conf/standard_conf_actions.xml
Expand Up @@ -514,7 +514,7 @@
<div class="dialogLegend" style="margin-bottom: 2px;padding: 10px;" ajxp_message_id="404">AJXP_MESSAGE[404]</div>
<div style="padding:10px;"><input type="checkbox" id="webdav_activator" style="width:16px;" name="webdav_activator"> <label for="webdav_activator">AJXP_MESSAGE[406]</label></div>
<div class="dialogButtons" id="webdav_password_form" style="display:none;text-align: left;padding-left: 15px;height: 42px;font-size: 0.9em;padding-top: 5px;">
<div style="width: 70%; float: left; padding-right: 5px; text-align: right;">AJXP_MESSAGE[407]</div><input type="password" id="webdav_password" style="float:left;height: 24px;width: 80px;"> <input type="image" src="AJXP_THEME_FOLDER/images/actions/22/dialog_ok_apply.png" height="22" width="22" title="OK" id="webdav_pass_saver">
<div style="width: 70%; float: left; padding-right: 5px; text-align: right;">AJXP_MESSAGE[407]</div><input type="password" id="webdav_password" style="float:left;height: 24px;width: 80px !important;"> <input type="image" src="AJXP_THEME_FOLDER/images/actions/22/dialog_ok_apply.png" height="22" width="22" title="OK" id="webdav_pass_saver">
</div>
<div class="dialogLegend" style="margin: 10px;" ajxp_message_id="405">AJXP_MESSAGE[405]</div>
<input type="text" style="width: 95% !important;" id="webdav_main_access" value="AJXP_MESSAGE[466]" readonly/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -87,7 +87,7 @@ Class.create("UserWidget", {
}
label = '<i ajxp_message_title_id="189" title="'+MessageHash[189]+'">' + img + oUser.getPreference('USER_DISPLAY_NAME') + '</i>';
}
logging_string = '<div class="user_widget_label '+(img?'withImage':'')+'">'+label+'</div><div class="inlineBarButtonLeft" style="-moz-border-radius: 0pt 5px 5px 0pt;border-radius: 0pt 5px 5px 0pt;border-left-style:none; border-width:1px;"><img width="16" height="16" style="height: 6px; width: 10px; margin-top: 9px; margin-left: 3px; margin-right: 3px;" ajxp_message_title="189" title="'+MessageHash[189]+'" src="'+ajxpResourcesFolder+'/images/arrow_down.png"></div>';
logging_string = '<div class="user_widget_label '+(img?'withImage':'')+'"><span class="icon-reorder"></span> '+label+' <span class="icon-caret-down ajxp_icon_arrow"></span></div><div class="inlineBarButtonLeft" style="-moz-border-radius: 0pt 5px 5px 0pt;border-radius: 0pt 5px 5px 0pt;border-left-style:none; border-width:1px;"><img width="16" height="16" style="height: 6px; width: 10px; margin-top: 9px; margin-left: 3px; margin-right: 3px;" ajxp_message_title="189" title="'+MessageHash[189]+'" src="'+ajxpResourcesFolder+'/images/arrow_down.png"></div>';
this.element.removeClassName('disabled');
if(!oUser.lock && oUser.getPreference('lang') != null && oUser.getPreference('lang') != "" && oUser.getPreference('lang') != ajaxplorer.currentLanguage)
{
Expand Down
14 changes: 4 additions & 10 deletions core/src/plugins/gui.ajax/res/themes/vision/css/media.css
Expand Up @@ -16,9 +16,12 @@ and (max-width : 680px) {
span.actionbar_button_label,
.action_bar span.actionbar_button_label,
#get_my_feed_button_label,
#logging_string i,
#logging_string *[ajxp_message_id],
#global_toolbar span.icon-caret-down,
#search_form a
{
display: none;
display: none !important;
}
#simple_repository_label{
font-size: 16px;
Expand Down Expand Up @@ -55,15 +58,6 @@ and (max-width : 400px){
div.repository_legend{
display:none;
}
#global_toolbar {
background-color: #666;
height: 30px;
padding: 9px 0 0 5px;
background-image: url("../images/white_logo-ajxp.png");
background-repeat: no-repeat;
background-position: 10px 7px;
background-size: 35%;
}
#search_engine_cont{
width:15% !important;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/gui.mobile/manifest.xml
Expand Up @@ -66,7 +66,7 @@
]]></template>
<template name="main_vision" element="ajxp_desktop" position="top" theme="vision"><![CDATA[
<div id="toolbars">
<div id="global_toolbar">
<div id="global_toolbar" ajxpClass="LogoWidget">
<div id="logging_string" ajxpClass="UserWidget" ajxpOptions='{"menuEvent" : "over"}'></div>
<div id="top_toolbar" ajxpClass="ActionsToolbar" ajxpOptions='{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["user"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}'></div>
<div id="repo_chooser" ajxpClass="RepositorySelect" ajxpOptions='{"menuPosition": "bottom middle", "menuOffsetTop":11, "menuOffsetLeft":0, "menuMaxHeight":350, "menuEvent":"over", "simpleLabel":"<span class=\"icon-sitemap\"></span><span class=\"ws-label\" ajxp_message_id=\"455\">AJXP_MESSAGE[455]</span><span class=\"icon-caret-down\"></span>"}'></div>
Expand All @@ -82,7 +82,7 @@
<div style="clear:both;" class="skipSibling"/>
</div>
</div>
<div id="browser" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"browser"}'>
<div id="browser" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"ajxp_desktop"}'>
<div id="vertical_splitter2" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "initA": 26, "minA":26, "maxA":320, "fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"A", "startFolded":true, "invisibleBar":true}'>
<div id="topPane" ajxpClass="AjxpTabulator" ajxpOptions='{"defaultTabId": "folders","tabInfos" : [{"id":"folders","label":"130","iconClass":"icon-folder-open","element":"folder_pane"},{"id":"shared","label":"363","iconClass":"icon-share","element":"shared_elements"},{"id":"flagged","label":"147","iconClass":"icon-bookmark-empty","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>
Expand Down

0 comments on commit 12bba9c

Please sign in to comment.