Merge branch 'master' of git://anongit.kde.org/owncloud
This commit is contained in:
commit
7d49e8285c
|
@ -53,6 +53,7 @@ if(!isset($arguments['search'])){
|
|||
$arguments['search']='';
|
||||
}
|
||||
OC_MEDIA_COLLECTION::$uid=OC_User::getUser();
|
||||
unset($_SESSION['collection']);
|
||||
if($arguments['action']){
|
||||
switch($arguments['action']){
|
||||
case 'delete':
|
||||
|
@ -83,13 +84,6 @@ if($arguments['action']){
|
|||
OC_DB::beginTransaction();
|
||||
set_time_limit(0); //recursive scan can take a while
|
||||
$path=$arguments['path'];
|
||||
if(OC_Filesystem::is_dir($path)){
|
||||
$paths=explode(PATH_SEPARATOR,OC_Preferences::getValue(OC_User::getUser(),'media','paths',''));
|
||||
if(array_search($path,$paths)===false){
|
||||
$paths[]=$path;
|
||||
OC_Preferences::setValue(OC_User::getUser(),'media','paths',implode(PATH_SEPARATOR,$paths));
|
||||
}
|
||||
}
|
||||
echo OC_MEDIA_SCANNER::scanFolder($path);
|
||||
OC_DB::commit();
|
||||
flush();
|
||||
|
@ -108,16 +102,18 @@ if($arguments['action']){
|
|||
echo json_encode(OC_MEDIA_COLLECTION::getSongs($arguments['artist'],$arguments['album'],$arguments['search']));
|
||||
break;
|
||||
case 'get_path_info':
|
||||
$songId=OC_MEDIA_COLLECTION::getSongByPath($arguments['path']);
|
||||
if($songId==0){
|
||||
unset($_SESSION['collection']);
|
||||
$songId= OC_MEDIA_SCANNER::scanFile($arguments['path']);
|
||||
}
|
||||
if($songId>0){
|
||||
$song=OC_MEDIA_COLLECTION::getSong($songId);
|
||||
$song['artist']=OC_MEDIA_COLLECTION::getArtistName($song['song_artist']);
|
||||
$song['album']=OC_MEDIA_COLLECTION::getAlbumName($song['song_album']);
|
||||
echo json_encode($song);
|
||||
if(OC_Filesystem::file_exists($arguments['path'])){
|
||||
$songId=OC_MEDIA_COLLECTION::getSongByPath($arguments['path']);
|
||||
if($songId==0){
|
||||
unset($_SESSION['collection']);
|
||||
$songId= OC_MEDIA_SCANNER::scanFile($arguments['path']);
|
||||
}
|
||||
if($songId>0){
|
||||
$song=OC_MEDIA_COLLECTION::getSong($songId);
|
||||
$song['artist']=OC_MEDIA_COLLECTION::getArtistName($song['song_artist']);
|
||||
$song['album']=OC_MEDIA_COLLECTION::getAlbumName($song['song_album']);
|
||||
echo json_encode($song);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'play':
|
||||
|
@ -129,14 +125,46 @@ if($arguments['action']){
|
|||
OC_MEDIA_COLLECTION::registerPlay($songId);
|
||||
|
||||
header('Content-Type:'.$ftype);
|
||||
// calc an offset of 24 hours
|
||||
$offset = 3600 * 24;
|
||||
// calc the string in GMT not localtime and add the offset
|
||||
$expire = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
|
||||
//output the HTTP header
|
||||
Header($expire);
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Cache-Control: max-age=3600, must-revalidate');
|
||||
header('Pragma: public');
|
||||
header('Accept-Ranges: bytes');
|
||||
header('Content-Length: '.OC_Filesystem::filesize($arguments['path']));
|
||||
$gmt_mtime = gmdate('D, d M Y H:i:s', OC_Filesystem::filemtime($arguments['path']) ) . ' GMT';
|
||||
header("Last-Modified: " . $gmt_mtime );
|
||||
|
||||
OC_Filesystem::readfile($arguments['path']);
|
||||
exit;
|
||||
case 'find_music':
|
||||
echo json_encode(findMusic());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
function findMusic($path='/'){
|
||||
$music=array();
|
||||
$dh=OC_Filesystem::opendir($path);
|
||||
if($dh){
|
||||
while($filename=readdir($dh)){
|
||||
if($filename[0]!='.'){
|
||||
$file=$path.'/'.$filename;
|
||||
if(OC_Filesystem::is_dir($file)){
|
||||
$music=array_merge($music,findMusic($file));
|
||||
}else{
|
||||
if(OC_MEDIA_SCANNER::isMusic($filename)){
|
||||
$music[]=$file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $music;
|
||||
}
|
||||
|
||||
?>
|
|
@ -26,8 +26,7 @@ OC_Util::addScript('media','loader');
|
|||
|
||||
OC_App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' ));
|
||||
|
||||
OC_App::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo( 'media', 'index.php' ), 'icon' => OC_Helper::imagePath( 'media', 'media.png' ), 'name' => 'Media' ));
|
||||
OC_App::addSettingsPage( array( 'id' => 'media_settings', 'order' => 5, 'href' => OC_Helper::linkTo( 'media', 'settings.php' ), 'name' => 'Media', 'icon' => OC_Helper::imagePath( 'media', 'media.png' )));
|
||||
OC_App::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo( 'media', 'index.php' ), 'icon' => OC_Helper::imagePath( 'media', 'media.png' ), 'name' => 'Music' ));
|
||||
|
||||
// add subnavigations
|
||||
$entry = array(
|
||||
|
|
|
@ -37,6 +37,7 @@ OC_Util::addScript('media','player');
|
|||
OC_Util::addScript('media','music');
|
||||
OC_Util::addScript('media','playlist');
|
||||
OC_Util::addScript('media','collection');
|
||||
OC_Util::addScript('media','scanner');
|
||||
OC_Util::addScript('media','jquery.jplayer.min');
|
||||
OC_Util::addStyle('media','player');
|
||||
OC_Util::addStyle('media','music');
|
||||
|
|
|
@ -32,6 +32,10 @@ Collection={
|
|||
for(var i=0;i<Collection.loadedListeners.length;i++){
|
||||
Collection.loadedListeners[i]();
|
||||
}
|
||||
if(collection.length==0){
|
||||
$('#scan input.start').val('Scan');
|
||||
$('#plugins a[href="#collection"]').trigger('click');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -159,6 +163,35 @@ Collection={
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
addSong:function(song){
|
||||
var artist=false
|
||||
var album=false;
|
||||
for(var i=0;i<Collection.artists.length;i++){
|
||||
if(Collection.artists[i].artist_id==song.song_artist){
|
||||
artist=Collection.artists[i];
|
||||
for(var j=0;j<artist.albums.length;j++){
|
||||
if(artist.albums[j].album_id==song.song_album){
|
||||
album=artist.albums[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!artist){
|
||||
artist={artist_id:song.song_artist,artist_name:song.artist,albums:[]};
|
||||
Collection.artists.push(artist);
|
||||
if(!Collection.parent || Collection.parent.is(":visible")){
|
||||
Collection.display();
|
||||
}
|
||||
|
||||
}
|
||||
if(!album){
|
||||
album={album_id:song.song_album,album_name:song.album,album_artist:song.song_artist,songs:[]};
|
||||
artist.albums.push(album)
|
||||
}
|
||||
album.songs.push(song)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,4 +206,13 @@ $(document).ready(function(){
|
|||
$(this).parent().toggleClass('active');
|
||||
Collection.showSongs($(this).parent());
|
||||
});
|
||||
Collection.parent.hide();
|
||||
$('#scan input.start').click(function(){
|
||||
$('#scan input.start').hide();
|
||||
$('#scan input.stop').show();
|
||||
$('#scan input.stop').click(function(){
|
||||
Scanner.toggle();
|
||||
});
|
||||
Scanner.scanCollection();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
$(document).ready(function(){
|
||||
//load the collection
|
||||
$('#plugins a[href="#collection"]').click(function(){
|
||||
$('#plugins li.subentry a.active').removeClass('active');
|
||||
$('#navigation a[href="#collection"]').click(function(){
|
||||
$('#navigation li.subentry a.active').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
PlayList.hide();
|
||||
Collection.display();
|
||||
});
|
||||
$('#plugins a[href="#playlist"]').click(function(){
|
||||
$('#plugins li.subentry a.active').removeClass('active');
|
||||
$('#navigation a[href="#playlist"]').click(function(){
|
||||
$('#navigation li.subentry a.active').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
PlayList.render();
|
||||
Collection.hide();
|
||||
|
@ -15,7 +15,7 @@ $(document).ready(function(){
|
|||
var tab=window.location.href.slice(window.location.href.indexOf('#') + 1);
|
||||
PlayList.init('mp3',function(){
|
||||
if(tab=='collection'){
|
||||
$('#plugins a[href="#collection"]').trigger('click');
|
||||
$('#navigation a[href="#collection"]').trigger('click');
|
||||
}
|
||||
});
|
||||
OC.search.customResults.Music=function(row,item){
|
||||
|
|
|
@ -3,6 +3,7 @@ var PlayList={
|
|||
current:-1,
|
||||
items:[],
|
||||
player:null,
|
||||
volume:0.8,
|
||||
next:function(){
|
||||
var next=PlayList.current+1;
|
||||
if(next>=PlayList.items.length){
|
||||
|
@ -19,7 +20,7 @@ var PlayList={
|
|||
PlayList.play(next);
|
||||
PlayList.render();
|
||||
},
|
||||
play:function(index,ready){
|
||||
play:function(index,time,ready){
|
||||
if(index==null){
|
||||
index=PlayList.current;
|
||||
}
|
||||
|
@ -28,11 +29,11 @@ var PlayList={
|
|||
if(PlayList.player){
|
||||
if(PlayList.player.data('jPlayer').options.supplied!=PlayList.items[index].type){//the the audio type changes we need to reinitialize jplayer
|
||||
PlayList.player.jPlayer("destroy");
|
||||
PlayList.init(PlayList.items[index].type,function(){PlayList.play(null,ready)});
|
||||
PlayList.init(PlayList.items[index].type,function(){PlayList.play(null,time,eady)});
|
||||
}else{
|
||||
PlayList.player.jPlayer("setMedia", PlayList.items[PlayList.current]);
|
||||
PlayList.items[index].playcount++;
|
||||
PlayList.player.jPlayer("play");
|
||||
PlayList.player.jPlayer("play",time);
|
||||
localStorage.setItem(oc_current_user+'oc_playlist_current',index);
|
||||
if(index>0){
|
||||
var previous=index-1;
|
||||
|
@ -82,6 +83,14 @@ var PlayList={
|
|||
play:function(){
|
||||
localStorage.setItem(oc_current_user+'oc_playlist_playing','true');
|
||||
},
|
||||
timeupdate:function(){
|
||||
var time=Math.round(PlayList.player.data('jPlayer').status.currentTime);
|
||||
localStorage.setItem(oc_current_user+'oc_playlist_time',time);
|
||||
},
|
||||
volumechange:function(){
|
||||
var volume=PlayList.player.data('jPlayer').options.volume*100;
|
||||
localStorage.setItem(oc_current_user+'oc_playlist_volume',volume);
|
||||
},
|
||||
supplied:type,
|
||||
ready:function(){
|
||||
PlayList.load();
|
||||
|
@ -89,6 +98,7 @@ var PlayList={
|
|||
ready();
|
||||
}
|
||||
},
|
||||
volume:PlayList.volume,
|
||||
cssSelectorAncestor:'#jp-interface',
|
||||
swfPath:OC.linkTo('media','js'),
|
||||
});
|
||||
|
@ -150,11 +160,20 @@ var PlayList={
|
|||
if(typeof localStorage !== 'undefined'){
|
||||
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items')){
|
||||
PlayList.items=JSON.parse(localStorage.getItem(oc_current_user+'oc_playlist_items'));
|
||||
PlayList.current=parseInt((localStorage.getItem(oc_current_user+'oc_playlist_current')));
|
||||
PlayList.current=parseInt(localStorage.getItem(oc_current_user+'oc_playlist_current'));
|
||||
var time=parseInt(localStorage.getItem(oc_current_user+'oc_playlist_time'));
|
||||
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_volume')){
|
||||
var volume=localStorage.getItem(oc_current_user+'oc_playlist_volume');
|
||||
PlayList.volume=volume/100;
|
||||
$('.jp-volume-bar-value').css('width',volume+'%');
|
||||
if(PlayList.player.data('jPlayer')){
|
||||
PlayList.player.jPlayer("option",'volume',volume/100);
|
||||
}
|
||||
}
|
||||
if(JSON.parse(localStorage.getItem(oc_current_user+'oc_playlist_playing'))){
|
||||
PlayList.play();
|
||||
PlayList.play(null,time);
|
||||
}else{
|
||||
PlayList.play(null,function(){
|
||||
PlayList.play(null,time,function(){
|
||||
PlayList.player.jPlayer("pause");
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
Scanner={
|
||||
songsFound:0,
|
||||
songsScanned:0,
|
||||
songsChecked:0,
|
||||
startTime:null,
|
||||
endTime:null,
|
||||
stopScanning:false,
|
||||
currentIndex:-1,
|
||||
songs:[],
|
||||
findSongs:function(ready){
|
||||
$.getJSON(OC.linkTo('media','ajax/api.php')+'?action=find_music',function(songs){
|
||||
Scanner.songsFound=songs.length;
|
||||
Scanner.currentIndex=-1
|
||||
if(ready){
|
||||
ready(songs)
|
||||
}
|
||||
});
|
||||
},
|
||||
scanFile:function(path,ready){
|
||||
path=encodeURIComponent(path);
|
||||
$.getJSON(OC.linkTo('media','ajax/api.php')+'?action=get_path_info&path='+path,function(song){
|
||||
Scanner.songsChecked++;
|
||||
if(ready){
|
||||
ready(song);
|
||||
}
|
||||
if(song){//do this after the ready call so we dont hold up the next ajax call
|
||||
var artistId=song.song_artist;
|
||||
Scanner.songsScanned++;
|
||||
$('#scan span.songCount').text(Scanner.songsScanned);
|
||||
var progress=(Scanner.songsChecked/Scanner.songsFound)*100;
|
||||
$('#scanprogressbar').progressbar('value',progress)
|
||||
Collection.addSong(song);
|
||||
}
|
||||
});
|
||||
},
|
||||
scanCollection:function(ready){
|
||||
$('#scanprogressbar').progressbar({
|
||||
value:0,
|
||||
});
|
||||
Scanner.songsChecked=0;
|
||||
Scanner.songsScanned=0;
|
||||
Scanner.startTime=new Date().getTime()/1000;
|
||||
Scanner.findSongs(function(songs){
|
||||
Scanner.songs=songs;
|
||||
Scanner.start();
|
||||
});
|
||||
},
|
||||
stop:function(){
|
||||
Scanner.stopScanning=true;
|
||||
},
|
||||
start:function(ready){
|
||||
Scanner.stopScanning=false;
|
||||
var scanSong=function(){
|
||||
Scanner.currentIndex++;
|
||||
if(!Scanner.stopScanning && Scanner.currentIndex<Scanner.songs.length){
|
||||
Scanner.scanFile(Scanner.songs[Scanner.currentIndex],scanSong)
|
||||
}else{
|
||||
Scanner.endTime=new Date().getTime()/1000;
|
||||
if(ready){
|
||||
ready();
|
||||
}
|
||||
}
|
||||
}
|
||||
scanSong();
|
||||
},
|
||||
toggle:function(){
|
||||
if(Scanner.stopScanning){
|
||||
Scanner.start();
|
||||
$('#scan input.stop').val('Pause');
|
||||
}else{
|
||||
Scanner.stop();
|
||||
$('#scan input.stop').val('Resume');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -88,8 +88,7 @@ class OC_MEDIA_SCANNER{
|
|||
return; //invalid mp3 file
|
||||
}
|
||||
}else{
|
||||
$mimetype=OC_Filesystem::getMimeType($path);
|
||||
if(substr($mimetype,0,4)!=='audio'){
|
||||
if(!self::isMusic($path)){
|
||||
return;
|
||||
}
|
||||
if(!self::$getID3){
|
||||
|
@ -141,4 +140,14 @@ class OC_MEDIA_SCANNER{
|
|||
$songId=OC_MEDIA_COLLECTION::addSong($title,$path,$artistId,$albumId,$length,$track,$size);
|
||||
return (!($title=='unkown' && $artist=='unkown' && $album=='unkown'))?$songId:0;
|
||||
}
|
||||
|
||||
/**
|
||||
* quick check if a song is a music file by checking the extention, not as good as a proper mimetype check but way faster
|
||||
* @param string $filename
|
||||
* @return bool
|
||||
*/
|
||||
public static function isMusic($filename){
|
||||
$ext=substr($filename,strrpos($filename,'.')+1);
|
||||
return $ext=='mp3' || $ext=='flac' || $ext=='m4a' || $ext=='ogg' || $ext=='oga';
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - media plugin
|
||||
*
|
||||
* @author Robin Appelman
|
||||
* @copyright 2010 Robin Appelman icewind1991@gmail.com
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
require_once('../../lib/base.php');
|
||||
|
||||
if( !OC_User::isLoggedIn()){
|
||||
header( "Location: ".OC_Helper::linkTo( "index.php" ));
|
||||
exit();
|
||||
}
|
||||
|
||||
require( 'lib_collection.php' );
|
||||
|
||||
OC_Util::addStyle('media','style');
|
||||
OC_Util::addScript('media','settings');
|
||||
|
||||
OC_App::setActiveNavigationEntry( 'media_settings' );
|
||||
|
||||
$folderNames=explode(PATH_SEPARATOR,OC_Preferences::getValue($_SESSION['user_id'],'media','paths',''));
|
||||
$folders=array();
|
||||
foreach($folderNames as $folder){
|
||||
if($folder){
|
||||
$folders[]=array('name'=>$folder,'songs'=>OC_MEDIA_COLLECTION::getSongCountByPath($folder));
|
||||
}
|
||||
}
|
||||
|
||||
$tmpl = new OC_Template( 'media', 'settings', 'admin' );
|
||||
$tmpl->assign('folders',$folders);
|
||||
$tmpl->assign('autoupdate',OC_Preferences::getValue($_SESSION['user_id'],'media','autoupdate',false));
|
||||
$tmpl->printPage();
|
||||
?>
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
<div id='scan'>
|
||||
<p><span class='songCount'>0</span> Songs scanned</p>
|
||||
<div id="scanprogressbar"></div>
|
||||
<input type='button' class='start' value='Recan'></input>
|
||||
<input type='button' class='stop' style='display:none' value='Pause'></input>
|
||||
</div>
|
||||
<ul id='collection'>
|
||||
<li class='artist'>
|
||||
<img src="<?php echo image_path('files','loading.gif') ?>" alt='loading'/>Loading Collection...
|
||||
|
@ -8,3 +14,4 @@
|
|||
<button class='play'>Play</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
* { margin:0; padding:0; border:0; cursor:default; }
|
||||
body { background:#fefefe; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana, sans-serif; color:#000; }
|
||||
#header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:0.5em 1.5em; background:#1d2d44; -moz-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; box-shadow:0 0 10px #000, inset 0 -2px 10px #222; }
|
||||
#header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:.5em; background:#1d2d44; -moz-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; box-shadow:0 0 10px #000, inset 0 -2px 10px #222; }
|
||||
#body-settings #header { background:#313131; }
|
||||
#owncloud { float:left; }
|
||||
h1 { margin:1em 3em 1em 0; border-bottom:1px solid #666; text-transform:uppercase; font-weight:normal; font-style:italic; color:#666; }
|
||||
|
@ -72,7 +72,7 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35537a', end
|
|||
.prettybutton:hover, .prettybutton:focus { background-color:#ccc; outline:0; }
|
||||
|
||||
/* META NAVIGATION (Settings, Log out) ---------------------------------------------------------------- */
|
||||
#metanav { float:right; position:relative; top:0.5em; right:2.5em; list-style:none; margin:0; padding:0; }
|
||||
#metanav { float:right; position:relative; top:.5em; right:1em; list-style:none; margin:0; padding:0; }
|
||||
#metanav li { display:inline; }
|
||||
#metanav li a { margin:.2em; padding:.7em; }
|
||||
#metanav li a:hover, #metanav li a:focus { background:rgba(0,0,0,.5); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:#555 0 1px 0; -moz-box-shadow:#555 0 1px 0; -webkit-box-shadow:#555 0 1px 0; }
|
||||
|
@ -83,17 +83,16 @@ form.searchbox { display:inline; position:fixed; top:.9em; right:9em; margin:0;
|
|||
input[type="search"] { font-size:1em; padding-left:2em; background:#eee url('../img/actions/search.png') .5em center no-repeat; }
|
||||
|
||||
/* NAVIGATION ------------------------------------------------------------- */
|
||||
#plugins { position:fixed; top:3.5em; float:left; width:15.7em; padding:0; z-index:50; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; } }
|
||||
#plugins ul { list-style-type:none; border-top:1px solid #ccc; }
|
||||
#plugins a { display:block; padding:0.5em 0.5em 0.5em 3em; background-position:1.5em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; }
|
||||
#plugins a.active, #plugins a:hover, #plugins a:focus, #plugins a.selected { background-color:#ccc; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; outline:0; }
|
||||
#plugins a:active { outline:0; }
|
||||
#plugins .subentry { background-color:#ddd; border-top:1px solid #aaa; color:#000; outline:0; }
|
||||
#plugins .subentry.active { background-color:#bbb; border-top:1px solid #aaa; color:#000; outline:0; }
|
||||
#plugins li.subentry a { padding-left:3.7em; font-size:1em; }
|
||||
#navigation { position:fixed; top:3.5em; float:left; width:12.5em; padding:0; z-index:50; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; } }
|
||||
#navigation ul { list-style-type:none; border-top:1px solid #ccc; }
|
||||
#navigation a { display:block; padding:.5em .5em .5em 2.5em; background-position:1em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; }
|
||||
#navigation a.active, #navigation a:hover, #navigation a:focus, #navigation a.selected { background-color:#ccc; border-top:1px solid #c8c8c8; border-bottom:1px solid #ccc; color:#000; outline:0; }
|
||||
#navigation .subentry { background-color:#ddd; border-top:1px solid #aaa; color:#555; outline:0; }
|
||||
#navigation .subentry.active { background-color:#bbb; border-top:1px solid #888; border-bottom:1px solid #bbb; outline:0; }
|
||||
#navigation li.subentry a { padding-left:3.1em; font-size:1em; }
|
||||
|
||||
/* CONTENT ------------------------------------------------------------------ */
|
||||
#content { margin:3.5em 0 0 15.7em; }
|
||||
#content { margin:3.5em 0 0 12.5em; }
|
||||
|
||||
/* USER SETTINGS ------------------------------------------------------------ */
|
||||
#quota_indicator { margin:0 4em 1em 0; padding:0; border:1px solid #ddd; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; }
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
|
||||
<div id="main">
|
||||
<div id="plugins">
|
||||
<div id="navigation">
|
||||
<ul>
|
||||
<?php foreach($_['settingsnavigation'] 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>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div id="content">
|
||||
<?php echo $_['content']; ?>
|
||||
</div>
|
||||
<div id="plugins">
|
||||
<div id="navigation">
|
||||
<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>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<form class="searchbox" action="#" method="post">
|
||||
<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" />
|
||||
<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
|
||||
</form>
|
||||
|
|
|
@ -21,22 +21,23 @@ tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#eee; heig
|
|||
tbody a { color:#000; }
|
||||
span.extention, td.date { color:#999; }
|
||||
div.crumb { float:left; display:block; background:no-repeat right 0; padding:8px 1.5em 0 1em; height:28px; /*36-8*/ }
|
||||
div.crumb:first-child { padding-left:1.5em; }
|
||||
div.crumb:last-child { font-weight:bold; }
|
||||
table tr.mouseOver td { background-color:#eee; }
|
||||
table th { height:2em; padding:0 .5em; color:#999; }
|
||||
table th .name { float:left; margin-left:.5em; }
|
||||
table th.multiselect { background:#ddd; color:#000; font-weight:bold; }
|
||||
table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; }
|
||||
table td { border-bottom:1px solid #eee; font-style:normal; }
|
||||
table td { border-bottom:1px solid #eee; font-style:normal; background-position:1em .5em; background-repeat:no-repeat; }
|
||||
table th#headerSize, table td.filesize { width:5em; padding:0 1em; text-align:right; }
|
||||
table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-align:left; }
|
||||
table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; }
|
||||
table td.filename a.name { display:block; background-image:url('../img/file.png'); height:1.5em; vertical-align:middle; }
|
||||
table td.filename a.name { display:block; height:1.5em; vertical-align:middle; margin-left:3em; }
|
||||
table tr[data-type="dir"] td.filename a.name {font-weight:bold; }
|
||||
table td.filename a.name input, table td.filename a.name form { width:100%; cursor:text }
|
||||
table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 3em; background-position:1em .5em; background-repeat:no-repeat; }
|
||||
table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 0; }
|
||||
table td.filename .nametext, .modified { float:left; padding:.3em 0; }
|
||||
table td.filename .nametext { width:80%; }
|
||||
table td.filename .nametext { width:60%; }
|
||||
table td.filename form { float:left; font-size:.85em; }
|
||||
#fileList tr input[type=checkbox] { display:none; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ }
|
||||
#fileList tr input[type=checkbox]:checked, #fileList tr:hover input[type=checkbox] { display:inline; }
|
||||
|
@ -48,4 +49,4 @@ table td.filename form { float:left; font-size:.85em; }
|
|||
.selectedActions a:hover, a.file_action:hover { background:#fff; -moz-box-shadow:0 0 10px #fff; -webkit-box-shadow:0 0 10px #fff; box-shadow:0 0 10px #fff; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
|
||||
|
||||
/* add breadcrumb divider to the File item in navigation panel */
|
||||
#plugins>ul>li:first-child { background-position:15.7em 0px; background-repeat:no-repeat; background-image:url("/owncloud/core/img/breadcrumb-divider-start.png"); width:15.7em; padding-right:11px; }
|
||||
#navigation>ul>li:first-child { background:url('../../core/img/breadcrumb-divider-start.png') no-repeat 12.5em 0px; width:12.5em; padding-right:1em; }
|
||||
|
|
|
@ -12,8 +12,8 @@ FileList={
|
|||
var basename=name;
|
||||
var extention=false;
|
||||
}
|
||||
html+='<td class="filename"><input type="checkbox" />';
|
||||
html+='<a class="name" style="background-image:url('+img+')" href="download.php?file='+$('#dir').val()+'/'+name+'"><span class="nametext">'+basename
|
||||
html+='<td class="filename" style="background-image:url('+img+')"><input type="checkbox" />';
|
||||
html+='<a class="name" href="download.php?file='+$('#dir').val()+'/'+name+'"><span class="nametext">'+basename
|
||||
if(extention){
|
||||
html+='<span class="extention">'+extention+'</span>';
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ FileList={
|
|||
},
|
||||
addDir:function(name,size,lastModified){
|
||||
var html='<tr data-file="'+name+'" data-type="dir" data-size="'+size+'">';
|
||||
html+='<td class="filename"><input type="checkbox" /><a class="name" style="background-image:url(img/folder.png)" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>';
|
||||
html+='<td class="filename" style="background-image:url(img/folder.png)"><input type="checkbox" /><a class="name" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>';
|
||||
if(size!='Pending'){
|
||||
simpleSize=simpleFileSize(size);
|
||||
}else{
|
||||
|
@ -103,7 +103,7 @@ FileList={
|
|||
loadingDone:function(name){
|
||||
$('tr[data-file="'+name+'"]').data('loading',false);
|
||||
var mime=$('tr[data-file="'+name+'"]').data('mime');
|
||||
$('tr[data-file="'+name+'"] td.filename a').attr('style','background-image:url('+getMimeIcon(mime)+')');
|
||||
$('tr[data-file="'+name+'"] td.filename').attr('style','background-image:url('+getMimeIcon(mime)+')');
|
||||
$('tr[data-file="'+name+'"] td.filename').draggable(dragOptions);
|
||||
},
|
||||
isLoading:function(name){
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
|
||||
if($relative_date_color>200) $relative_date_color = 200; ?>
|
||||
<tr data-file="<?php echo $file['name'];?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'>
|
||||
<td class="filename">
|
||||
<td class="filename" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)">
|
||||
<input type="checkbox" />
|
||||
<a class="name" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)" href="<?php if($file['type'] == 'dir') echo link_to('files', 'index.php?dir='.$file['directory'].'/'.$file['name']); else echo link_to('files', 'download.php?file='.$file['directory'].'/'.$file['name']); ?>" title="">
|
||||
<a class="name" href="<?php if($file['type'] == 'dir') echo link_to('files', 'index.php?dir='.$file['directory'].'/'.$file['name']); else echo link_to('files', 'download.php?file='.$file['directory'].'/'.$file['name']); ?>" title="">
|
||||
<span class="nametext">
|
||||
<?php if($file['type'] == 'dir'):?>
|
||||
<?php echo htmlspecialchars($file['name']);?>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
<?php /*
|
||||
|
||||
OC_App::register( array( "order" => 1, "id" => "log", "name" => "Log" ));
|
||||
OC_App::addSettingsPage( array( "id" => "log", "order" => 999, "href" => OC_Helper::linkTo( "log", "index.php" ), "name" => "Log", "icon" => OC_Helper::imagePath( "log", "logs.png" )));
|
||||
|
||||
?>
|
||||
*/ ?>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
//require_once('../../config/config.php');
|
||||
/*
|
||||
require_once('../lib/base.php');
|
||||
|
||||
if( !OC_User::isLoggedIn()){
|
||||
|
@ -103,4 +104,4 @@ $tmpl->assign( 'size', $pageSize );
|
|||
$tmpl->assign( 'showActions', $showActions );
|
||||
$tmpl->printPage();
|
||||
|
||||
?>
|
||||
*/ ?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="controls">
|
||||
<?php /*<div class="controls">
|
||||
<form id="logs_options" method='post'>
|
||||
<p>
|
||||
<span><?php echo $l->t( 'Filter:' ); ?></span>
|
||||
|
@ -50,5 +50,4 @@
|
|||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
*/ ?>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#searchresults { position:fixed; top:3.3em; right:0; z-index:50; background-color:white; border:1px solid black; margin-bottom:3em; overflow:auto; max-height:80%; width:40em; }
|
||||
#searchresults table{ width:100%; table-layout:fixed; top:1em;border-spacing:0}
|
||||
#searchresults td{padding-right:0.3em;padding-left:0.3em;vertical-align:top}
|
||||
#searchresults td.result div.text{padding-left:1em;}
|
||||
#searchresults div.text,div.name{width:30em; white-space:normal}
|
||||
#searchresults td.result{width:30em;}
|
||||
#searchresults td.result *{cursor:pointer}
|
||||
#searchresults td.type{width:7em;text-align:right; border-right:1px solid #aaa;border-bottom:none}
|
||||
#searchresults tr.current{background-color:#ddd}
|
||||
#searchresults { list-style:none; position:fixed; top:3.5em; right:0; z-index:100; background-color:#fff; overflow:hidden; text-overflow:ellipsis; max-height:80%; width:26.5em; padding-bottom:1em; -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; box-shadow:0 0 10px #000; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; }
|
||||
#searchresults li.resultHeader { font-size:1.2em; font-weight:bold; border-bottom:solid 1px #CCC; padding:.2em; background-color:#eee; }
|
||||
#searchresults li.result { margin-left:2em; }
|
||||
#searchresults table { width:100%; table-layout:fixed; top:0; border-spacing:0; }
|
||||
#searchresults td { padding:0 .3em; vertical-align:top; }
|
||||
#searchresults td.result div.text { padding-left:1em; white-space:nowrap; }
|
||||
#searchresults td.result * { cursor:pointer; }
|
||||
#searchresults td.type { width:3.5em; text-align:right; border-right:1px solid #aaa; border-bottom:none; font-weight:bold; }
|
||||
#searchresults tr.current { background-color:#ddd; }
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#searchresults{
|
||||
margin: 2em;
|
||||
list-style:none;
|
||||
border: solid 1px #CCC;
|
||||
}
|
||||
|
||||
#searchresults li.resultHeader{
|
||||
font-size:1.2em;
|
||||
font-weight:bold;
|
||||
border-bottom: solid 1px #CCC;
|
||||
padding:0.2em;
|
||||
background-color:#eee;
|
||||
}
|
||||
|
||||
#searchresults li.result{
|
||||
margin-left:2em;
|
||||
}
|
Loading…
Reference in New Issue