Merge branch 'master' into sharing

Conflicts:
	core/templates/layout.user.php
This commit is contained in:
Michael Gapczynski 2011-07-29 13:58:13 -04:00
commit 5fd77084c4
9 changed files with 77 additions and 55 deletions

View File

@ -31,7 +31,7 @@ div.controls { width:100%; margin:0px; background-color:#f7f7f7; border-bottom:1
#body-login p.info { width:16em; margin:2em auto; padding:1em; background-color:#eee; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
#body-login p.info a { font-weight:bold; }
#login header { margin-top:-2em; height:10em;
#login div.header { margin-top:-2em; height:10em;
-moz-box-shadow:0 0 5px #000; -webkit-box-shadow:0 0 20px #000; box-shadow:0 0 20px #000;
background: #1d2d44; /* Old browsers */
background: -moz-linear-gradient(top, #35537a 0%, #1d2d42 100%); /* FF3.6+ */
@ -39,8 +39,8 @@ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#35537
background: -webkit-linear-gradient(top, #35537a 0%,#1d2d42 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #35537a 0%,#1d2d42 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #35537a 0%,#1d2d42 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35537a', endColorstr='#1d2d42',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #35537a 0%,#1d2d42 100%); /* W3C */ }
background: linear-gradient(top, #35537a 0%,#1d2d42 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35537a', endColorstr='#1d2d42',GradientType=0 ); /* IE6-9 */ }
#login { margin:0 auto 0 auto; padding:2em 0 0 0; border-bottom:1px solid #FFF; text-align:center; background:#eee; }
#login_form { width:20em; margin:4em auto; padding:0; }
#login_form fieldset { background-color:transparent; border:0; }
@ -89,6 +89,7 @@ input[type="search"] { font-size:1em; padding-left:2em; background:#eee url('../
#plugins a:active { outline:0; }
#plugins .subentry { background-color:#ddd; border-top:1px solid #aaa; border-bottom:1px solid #ccc; color:#000; outline:0; }
#plugins .subentry.active { background-color:#bbb; border-top:1px solid #aaa; border-bottom:1px solid #ccc; color:#000; outline:0; }
#plugins li.subentry a {padding-left:4em;}
/* CONTENT ------------------------------------------------------------------ */
#content { margin:3.5em 0 0 15.7em; }

View File

@ -103,3 +103,13 @@ if (!Array.prototype.indexOf){
function SVGSupport() {
return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") || document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.0");
}
$(document).ready(function(){
if(!SVGSupport()){//replace all svg images with png images for browser that dont support svg
$('img.svg').each(function(index,element){
element=$(element);
var src=element.attr('src');
element.attr('src',src.substr(0,src.length-3)+'png');
});
};
});

View File

@ -30,8 +30,8 @@
<div id="header">
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
<ul id="metanav">
<li><a href="<?php echo link_to('', 'index.php'); ?>" title="Back to files"><img src="<?php echo image_path('', 'actions/back.svg'); ?>"></a></li>
<li><a href="<?php echo link_to('', 'index.php?logout=true'); ?>" title="Log out"><img src="<?php echo image_path('', 'actions/logout.svg'); ?>"></a></li>
<li><a href="<?php echo link_to('', 'index.php'); ?>" title="Back to files"><img class='svg' src="<?php echo image_path('', 'actions/back.svg'); ?>"></a></li>
<li><a href="<?php echo link_to('', 'index.php?logout=true'); ?>" title="Log out"><img class='svg' src="<?php echo image_path('', 'actions/logout.svg'); ?>"></a></li>
</ul>
</div>
@ -48,12 +48,15 @@
<?php endforeach; ?>
<?php if(isset($_['adminnavigation'])):?>
<?php foreach($_['adminnavigation'] as $entry):?>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a></li>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a>
<?php if( sizeof( $entry["subnavigation"] )): ?>
<?php foreach($entry["subnavigation"] as $subentry):?>
<li><a class="subentry<?php if( $subentry['active'] ): ?> active<?php endif; ?>" href="<?php echo $subentry['href']; ?>" title=""><?php echo $subentry['name'] ?></a></li>
<?php endforeach; ?>
<ul>
<?php foreach($entry["subnavigation"] as $subentry):?>
<li class="subentry"><a class="subentry<?php if( $subentry['active'] ): ?> active<?php endif; ?>" href="<?php echo $subentry['href']; ?>" title=""><?php echo $subentry['name'] ?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>

View File

@ -31,8 +31,8 @@
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
<?php echo $_['searchbox']?>
<ul id="metanav">
<li><a href="<?php echo link_to('settings', 'index.php'); ?>" title="Settings"><img src="<?php echo image_path('', 'actions/settings.svg'); ?>"></a></li>
<li><a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title="Log out"><img src="<?php echo image_path('', 'actions/logout.svg'); ?>"></a></li>
<li><a href="<?php echo link_to('settings', 'index.php'); ?>" title="Settings"><img class='svg' src="<?php echo image_path('', 'actions/settings.svg'); ?>"></a></li>
<li><a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title="Log out"><img class='svg' src="<?php echo image_path('', 'actions/logout.svg'); ?>"></a></li>
</ul>
</div>
@ -43,12 +43,15 @@
<div id="plugins">
<ul>
<?php foreach($_['navigation'] as $entry): ?>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>><?php echo $entry['name']; ?></a></li>
<?php if( sizeof( $entry["subnavigation"] )): ?>
<?php foreach($entry["subnavigation"] as $subentry):?>
<li><a style="background-image:url(<?php echo $subentry['icon']; ?>)" href="<?php echo $subentry['href']; ?>" title="" <?php if( $subentry['active'] ): ?>class="active"<?php endif; ?>><?php echo $subentry['name'] ?></a></li>
<?php endforeach; ?>
<?php endif; ?>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>><?php echo $entry['name']; ?></a>
<?php if( sizeof( $entry["subnavigation"] )): ?>
<ul>
<?php foreach($entry["subnavigation"] as $subentry):?>
<li class="subentry"><a style="background-image:url(<?php echo $subentry['icon']; ?>)" href="<?php echo $subentry['href']; ?>" title="" <?php if( $subentry['active'] ): ?>class="active"<?php endif; ?>><?php echo $subentry['name'] ?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>

View File

@ -1,5 +1,9 @@
<div id="login">
<header><img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" /></header>
<header>
<div class='header'>
<img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" />
</div>
</header>
<form action="index.php" method="post" id="login_form">
<fieldset>
<?php if($_['error']): ?>

View File

@ -114,10 +114,10 @@ FileList={
td.children('a.name').append(form)
input.focus();
form.submit(function(event){
var newname=input.val();
tr.data('renaming',false);
event.stopPropagation();
event.preventDefault();
var newname=input.val();
tr.data('renaming',false);
tr.attr('data-file',newname);
td.children('a.name').empty();
if(newname.indexOf('.')>0){
@ -125,9 +125,11 @@ FileList={
}else{
basename=newname;
}
td.children('a.name').text(basename);
var span=$('<span class="nametext"></span>');
span.text(basename);
td.children('a.name').append(span);
if(newname.indexOf('.')>0){
td.children('a.name').append($('<span class="extention">'+newname.substr(newname.indexOf('.'))+'</span>'));
span.append($('<span class="extention">'+newname.substr(newname.indexOf('.'))+'</span>'));
}
$.ajax({
url: 'ajax/rename.php',
@ -139,17 +141,7 @@ FileList={
event.preventDefault();
});
input.blur(function(){
tr.data('renaming',false);
td.children('a.name').empty();
if(name.indexOf('.')>0){
basename=name.substr(0,name.indexOf('.'));
}else{
basename=name;
}
td.children('a.name').text(basename);
if(name.indexOf('.')>0){
td.children('a.name').append($('<span class="extention">'+name.substr(name.indexOf('.'))+'</span>'));
}
form.trigger('submit');
});
}
}

View File

@ -5,6 +5,7 @@ $(document).ready(function() {
$('#fileList tr td.filename').draggable(dragOptions);
$('#fileList tr[data-type="dir"] td.filename').droppable(folderDropOptions);
$('div.crumb').droppable(crumbDropOptions);
$('#plugins>ul>li:first-child').data('dir','');
$('#plugins>ul>li:first-child').droppable(crumbDropOptions);
// Sets the file-action buttons behaviour :

View File

@ -28,12 +28,12 @@
<input type="checkbox" id="select_all" />
<span class='name'><?php echo $l->t( 'Name' ); ?></span>
<span class='selectedActions'>
<a href="" title="Download" class="download"><img alt="Download" src="../core/img/actions/download.svg" /></a>
<a href="" title="Download" class="download"><img class='svg' alt="Download" src="../core/img/actions/download.svg" /></a>
<!--<a href="" title="" class="share">Share</a>-->
</span>
</th>
<th id='headerSize'><?php echo $l->t( 'Size MB' ); ?></th>
<th id='headerDate'><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class='selectedActions'><a href="" title="Delete" class="delete"><img alt="Delete" src="../core/img/actions/delete.svg" /></a></span></th>
<th id='headerDate'><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class='selectedActions'><a href="" title="Delete" class="delete"><img class='svg' alt="Delete" src="../core/img/actions/delete.svg" /></a></span></th>
</tr>
</thead>
<tbody id="fileList">

View File

@ -158,7 +158,10 @@ class OC_APP{
* the navigation. Lower values come first.
*/
public static function addNavigationEntry( $data ){
// TODO: write function
$data['active']=false;
if(!isset($data['icon'])){
$data['icon']='';
}
OC_APP::$navigation[] = $data;
return true;
}
@ -184,6 +187,10 @@ class OC_APP{
* the navigation. Lower values come first.
*/
public static function addNavigationSubEntry( $parent, $data ){
$data['active']=false;
if(!isset($data['icon'])){
$data['icon']='';
}
if( !array_key_exists( $parent, self::$subnavigation )){
self::$subnavigation[$parent] = array();
}
@ -310,33 +317,34 @@ class OC_APP{
/// Private foo
private static function addSubNavigation( $list ){
$found = false;
foreach( self::$subnavigation as $parent => $selection ){
foreach( $selection as $subentry ){
if( $subentry['id'] == self::$activeapp ){
if(isset(self::$subnavigation[self::$activeapp])){
$subNav=self::$subnavigation[self::$activeapp];
foreach( $list as &$naventry ){
if( $naventry['id'] == self::$activeapp ){
$naventry['active'] = true;
$naventry['subnavigation'] = $subNav;
}
}
}else{
foreach(self::$subnavigation as $parent=>$entries){
$activeParent=false;
foreach($entries as &$subNav){
$subNav['active']=$subNav['id'] == self::$activeapp;
if($subNav['active']){
$activeParent=true;
}
}
if($activeParent){
foreach( $list as &$naventry ){
if( $naventry['id'] == $parent ){
$naventry['active'] = true;
$naventry['subnavigation'] = $selection;
$naventry['subnavigation'] = $entries;
}
else{
$naventry['active'] = false;
}
} unset( $naventry );
$found = true;
}
}
}
}
// Mark subentry as active
foreach( $list as &$naventry ){
if( $naventry['active'] ){
foreach( $naventry['subnavigation'] as &$subnaventry ){
$subnaventry['active'] = $subnaventry['id'] == self::$activeapp? true : false;
} unset( $subnaventry );
}
} unset( $naventry );
return $list;
}