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 { 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; } #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; -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: #1d2d44; /* Old browsers */
background: -moz-linear-gradient(top, #35537a 0%, #1d2d42 100%); /* FF3.6+ */ 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: -webkit-linear-gradient(top, #35537a 0%,#1d2d42 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #35537a 0%,#1d2d42 100%); /* Opera11.10+ */ background: -o-linear-gradient(top, #35537a 0%,#1d2d42 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #35537a 0%,#1d2d42 100%); /* IE10+ */ 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 { 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 { width:20em; margin:4em auto; padding:0; }
#login_form fieldset { background-color:transparent; border: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 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 { 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 .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 ------------------------------------------------------------------ */
#content { margin:3.5em 0 0 15.7em; } #content { margin:3.5em 0 0 15.7em; }

View File

@ -103,3 +103,13 @@ if (!Array.prototype.indexOf){
function SVGSupport() { 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"); 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"> <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> <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"> <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'); ?>" 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 src="<?php echo image_path('', 'actions/logout.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> </ul>
</div> </div>
@ -48,12 +48,15 @@
<?php endforeach; ?> <?php endforeach; ?>
<?php if(isset($_['adminnavigation'])):?> <?php if(isset($_['adminnavigation'])):?>
<?php foreach($_['adminnavigation'] as $entry):?> <?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 if( sizeof( $entry["subnavigation"] )): ?>
<?php foreach($entry["subnavigation"] as $subentry):?> <ul>
<li><a class="subentry<?php if( $subentry['active'] ): ?> active<?php endif; ?>" href="<?php echo $subentry['href']; ?>" title=""><?php echo $subentry['name'] ?></a></li> <?php foreach($entry["subnavigation"] as $subentry):?>
<?php endforeach; ?> <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; ?> <?php endif; ?>
</li>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
</ul> </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> <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']?> <?php echo $_['searchbox']?>
<ul id="metanav"> <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('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 src="<?php echo image_path('', 'actions/logout.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> </ul>
</div> </div>
@ -43,12 +43,15 @@
<div id="plugins"> <div id="plugins">
<ul> <ul>
<?php foreach($_['navigation'] as $entry): ?> <?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> <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 if( sizeof( $entry["subnavigation"] )): ?>
<?php foreach($entry["subnavigation"] as $subentry):?> <ul>
<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 foreach($entry["subnavigation"] as $subentry):?>
<?php endforeach; ?> <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 endif; ?> <?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</div> </div>

View File

@ -1,5 +1,9 @@
<div id="login"> <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"> <form action="index.php" method="post" id="login_form">
<fieldset> <fieldset>
<?php if($_['error']): ?> <?php if($_['error']): ?>

View File

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

View File

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

View File

@ -28,12 +28,12 @@
<input type="checkbox" id="select_all" /> <input type="checkbox" id="select_all" />
<span class='name'><?php echo $l->t( 'Name' ); ?></span> <span class='name'><?php echo $l->t( 'Name' ); ?></span>
<span class='selectedActions'> <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>--> <!--<a href="" title="" class="share">Share</a>-->
</span> </span>
</th> </th>
<th id='headerSize'><?php echo $l->t( 'Size MB' ); ?></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> </tr>
</thead> </thead>
<tbody id="fileList"> <tbody id="fileList">

View File

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