mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
fixed session creation for Pixelegg or Stylite template and added extra css for a simplified sharing GUI
This commit is contained in:
parent
dfe03c8531
commit
efc14ee2dc
@ -477,7 +477,11 @@ class filemanager_ui
|
||||
'5' => 'Files from links',
|
||||
'0' => 'Files from subdirectories',
|
||||
);
|
||||
|
||||
// sharing has no divAppbox, we need to set popupMainDiv instead, to be able to drop files everywhere
|
||||
if (substr($_SERVER['SCRIPT_FILENAME'], -10) == '/share.php')
|
||||
{
|
||||
$tpl->setElementAttribute('nm[buttons][upload]', 'drop_target', 'popupMainDiv');
|
||||
}
|
||||
$tpl->exec('filemanager.filemanager_ui.index',$content,$sel_options,$readonlys,array('nm' => $content['nm']));
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,6 @@
|
||||
</hbox>
|
||||
</template>
|
||||
<template id="filemanager.index" template="" lang="" group="0" version="1.9.003">
|
||||
<description id="msg" class="message"/>
|
||||
<nextmatch id="nm" template="filemanager.index.rows" header_left="filemanager.index.header_left"/>
|
||||
<styles>
|
||||
input[type='file'] {
|
||||
width: 50ex
|
||||
}
|
||||
</styles>
|
||||
</template>
|
||||
</overlay>
|
47
filemanager/templates/default/sharing.css
Normal file
47
filemanager/templates/default/sharing.css
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* EGroupware - CSS Styles used by sharing GUI
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <rb@stylite.de>
|
||||
* @copyright (c) 2014 by Ralf Becker <rb@stylite.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
div#popupMainDiv {
|
||||
height: 100% !important;
|
||||
padding: 0 !important;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* simplify NM UI for sharing
|
||||
*/
|
||||
div#filemanager-index_buttons img, div#filemanager-index_favorite_wrapper,
|
||||
div.header_row_right, span.header_count, select#filemanager-index_filter, span.selectcols {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.filemanager_navigation label {
|
||||
/*right: 265px !important;*/
|
||||
}
|
||||
|
||||
div.search {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 215px;
|
||||
}
|
||||
|
||||
div#filemanager-index_buttons div.et2_file {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
div.et2_nextmatch div.nextmatch_header_row {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
div.nextmatch_header {
|
||||
padding-bottom: 0 !important;
|
||||
padding-top: 10px !important;
|
||||
}
|
@ -362,7 +362,12 @@ class egw extends egw_minimal
|
||||
// present a login page, if anon user has no right for an application
|
||||
if ($this->session->session_flags == 'A')
|
||||
{
|
||||
throw new egw_exception_redirect('/logout.php');
|
||||
// need to destroy a basic auth session here, because it will only be available on current url
|
||||
if (($sessionid = egw_session::get_sessionid(true)))
|
||||
{
|
||||
$GLOBALS['egw']->session->destroy($sessionid);
|
||||
}
|
||||
throw new egw_exception_redirect(egw::link('/logout.php'));
|
||||
}
|
||||
if ($currentapp == 'admin' || $GLOBALS['egw_info']['flags']['admin_only'])
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ class egw_sharing
|
||||
$path_info = $matches[1];
|
||||
}
|
||||
$path_info = substr($path_info, strlen($_SERVER['SCRIPT_NAME']));
|
||||
list(, $token/*, $path*/) = explode('/', $path_info, 3);
|
||||
list(, $token/*, $path*/) = preg_split('|[/?]|', $path_info, 3);
|
||||
|
||||
$_SERVER['PHP_AUTH_USER'] = $token;
|
||||
if (!isset($_SERVER['PHP_AUTH_PW'])) $_SERVER['PHP_AUTH_PW'] = '';
|
||||
@ -249,6 +249,9 @@ class egw_sharing
|
||||
}
|
||||
// run full eTemplate2 UI for directories
|
||||
$_GET['path'] = '/';
|
||||
$_GET['cd'] = 'no';
|
||||
$GLOBALS['egw_info']['flags']['js_link_registry'] = true;
|
||||
egw_framework::includeCSS('/filemanager/templates/default/sharing.css');
|
||||
$ui = new egw_sharing_filemanager();
|
||||
$ui->index();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user