merge master into interface

This commit is contained in:
Robin Appelman 2011-07-27 16:42:58 +02:00
commit 0dad1f8ccb
16 changed files with 152 additions and 256 deletions

View File

@ -1,6 +1,8 @@
<?php <?php
OC_UTIL::addScript( 'files_imageviewer', 'lightbox' ); if(OC_APP::getCurrentApp()=='files'){
OC_UTIL::addStyle( 'files_imageviewer', 'lightbox' ); OC_UTIL::addScript( 'files_imageviewer', 'lightbox' );
OC_UTIL::addStyle( 'files_imageviewer', 'lightbox' );
}
?> ?>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<info> <info>
<id>files_imageview</id> <id>files_imageviewer</id>
<name>Imageviewer</name> <name>Image Viewer</name>
<description>Simple image viewer for owncloud</description> <description>Simple image viewer for owncloud</description>
<version>1.0</version> <version>1.0</version>
<licence>AGPL</licence> <licence>AGPL</licence>

View File

@ -67,10 +67,12 @@ if($arguments['action']){
$artists=OC_MEDIA_COLLECTION::getArtists(); $artists=OC_MEDIA_COLLECTION::getArtists();
foreach($artists as &$artist){ foreach($artists as &$artist){
$artist['albums']=OC_MEDIA_COLLECTION::getAlbums($artist['artist_id']); $artist['albums']=OC_MEDIA_COLLECTION::getAlbums($artist['artist_id']);
$artistHasSongs=false;
foreach($artist['albums'] as &$album){ foreach($artist['albums'] as &$album){
$album['songs']=OC_MEDIA_COLLECTION::getSongs($artist['artist_id'],$album['album_id']); $album['songs']=OC_MEDIA_COLLECTION::getSongs($artist['artist_id'],$album['album_id']);
} }
} }
echo json_encode($artists); echo json_encode($artists);
break; break;
case 'scan': case 'scan':

View File

@ -1,5 +1,5 @@
#jp-interface{position:fixed;z-index:100;width:25em;left:201px;top:-20px;height:80px;border-bottom:none;} #jp-interface{position:fixed;z-index:100;width:25em;left:201px;top:-20px;height:80px;border-bottom:none;}
#jp-interface.player{display:hidden;} #jp-interface div.player{height:0px}
#jp-interface ul.jp-controls{list-style-type:none;padding:0;} #jp-interface ul.jp-controls{list-style-type:none;padding:0;}
#jp-interface ul.jp-controls li{display:inline;} #jp-interface ul.jp-controls li{display:inline;}
#jp-interface ul.jp-controls a{position:absolute;overflow:hidden;text-indent:-9999px;} #jp-interface ul.jp-controls a{position:absolute;overflow:hidden;text-indent:-9999px;}

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -62,6 +62,7 @@ var PlayList={
} }
}, },
cssSelectorAncestor:'#jp-interface', cssSelectorAncestor:'#jp-interface',
swfPath:OC.linkTo('media','js'),
}); });
}, },
add:function(song){ add:function(song){

View File

@ -123,13 +123,14 @@ class OC_MEDIA_COLLECTION{
if(!$exact and $search!='%'){ if(!$exact and $search!='%'){
$search="%$search%"; $search="%$search%";
} }
$query=OC_DB::prepare("SELECT * FROM *PREFIX*media_artists WHERE artist_name LIKE ?"); $query=OC_DB::prepare("SELECT DISTINCT *PREFIX*media_artists.artist_name AS name , *PREFIX*media_artists.artist_id AS id FROM *PREFIX*media_artists
$artists=$query->execute(array($search))->fetchAll(); INNER JOIN *PREFIX*media_songs ON *PREFIX*media_artists.artist_id=*PREFIX*media_songs.song_artist WHERE artist_name LIKE ? AND *PREFIX*media_songs.song_user=?");
if(is_array($artists)){ $artists=$query->execute(array($search,OC_USER::getUser()))->fetchAll();
return $artists; $result=array();
}else{ foreach($artists as $artist){
return array(); $result[$artist['id']]=array('artist_name'=>$artist['name'],'artist_id'=>$artist['id']);
} }
return $result;
} }
/** /**
@ -175,11 +176,13 @@ class OC_MEDIA_COLLECTION{
} }
$query=OC_DB::prepare($cmd); $query=OC_DB::prepare($cmd);
$albums=$query->execute($params)->fetchAll(); $albums=$query->execute($params)->fetchAll();
if(is_array($albums)){ $result=array();
return $albums; foreach($albums as $album){
}else{ if(count(self::getSongs($album['album_artist'],$album['album_id']))){
return array(); $result[$album['album_id']]=$album;
}
} }
return $result;
} }
/** /**

View File

@ -17,7 +17,6 @@
<div class="jp-volume-bar-value"></div> <div class="jp-volume-bar-value"></div>
</div> </div>
<div class="jp-current-time"></div> <div class="jp-current-time"></div>
<div class="jp-current-time"></div>
<div class="jp-duration"></div> <div class="jp-duration"></div>
<div class='player'></div> <div class='player' id='jp-player'></div>
</div> </div>

View File

@ -1,26 +1,27 @@
var _l10ncache = {};
function t(app,text){ function t(app,text){
if( !( app in _l10ncache )){ if( !( app in t.cache )){
$.post( oc_webroot+'/core/ajax/translations.php', {'app': app}, function(jsondata){
_l10ncache[app] = jsondata.data; $.post( OC.filePath('core','ajax','translations.php'), {'app': app}, function(jsondata){
t.cache[app] = jsondata.data;
}); });
// Bad answer ... // Bad answer ...
if( !( app in _l10ncache )){ if( !( app in t.cache )){
_l10ncache[app] = []; t.cache[app] = [];
} }
} }
if( typeof( _l10ncache[app][text] ) !== 'undefined' ){ if( typeof( t.cache[app][text] ) !== 'undefined' ){
return _l10ncache[app][text]; return t.cache[app][text];
} }
else{ else{
return text; return text;
} }
} }
t.cache={};
OC={ OC={
webroot:oc_webroot, webroot:oc_webroot,
coreApps:['files','admin','log','search','settings'], coreApps:['files','admin','log','search','settings','core'],
linkTo:function(app,file){ linkTo:function(app,file){
return OC.filePath(app,'',file); return OC.filePath(app,'',file);
}, },
@ -72,5 +73,24 @@ if (!Array.prototype.filter) {
} }
} }
return res; return res;
if (!Array.prototype.indexOf){
Array.prototype.indexOf = function(elt /*, from*/)
{
var len = this.length;
var from = Number(arguments[1]) || 0;
from = (from < 0)
? Math.ceil(from)
: Math.floor(from);
if (from < 0)
from += len;
for (; from < len; from++)
{
if (from in this &&
this[from] === elt)
return from;
}
return -1;
}; };
} }

View File

@ -3,6 +3,7 @@ use strict;
use Locale::PO; use Locale::PO;
use Cwd; use Cwd;
use Data::Dumper; use Data::Dumper;
use File::Path;
sub crawl{ sub crawl{
my( $dir ) = @_; my( $dir ) = @_;
@ -28,7 +29,7 @@ sub crawl{
my $task = shift( @ARGV ); my $task = shift( @ARGV );
my $place = '..'; my $place = '..';
die( "Usuage: l10n.pl task\ntask: read, write\n") unless $task && $place; die( "Usage: l10n.pl task\ntask: read, write\n" ) unless $task && $place;
# Our current position # Our current position
my $whereami = cwd(); my $whereami = cwd();
@ -38,6 +39,7 @@ die( "Program must be executed in a l10n-folder called 'l10n'" ) unless $wheream
my @dirs = crawl( $place ); my @dirs = crawl( $place );
# Languages # Languages
rmtree( 'templates' );
mkdir( 'templates' ) unless -d 'templates'; mkdir( 'templates' ) unless -d 'templates';
my @languages = (); my @languages = ();
@ -55,13 +57,7 @@ if( $task eq 'read' ){
my $app = pop( @temp ); my $app = pop( @temp );
chdir( $dir ); chdir( $dir );
my $output = "${whereami}/templates/$app.pot"; my $output = "${whereami}/templates/$app.pot";
`xgettext --files-from=xgettextfiles --output="$output" --keyword=t`;
if( -e $output ){
`xgettext --files-from=xgettextfiles --join-existing --output="$output" --keyword=t`
}
else{
`xgettext --files-from=xgettextfiles --output="$output" --keyword=t`
}
chdir( $whereami ); chdir( $whereami );
} }
} }

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-26 00:58+0200\n" "POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -33,8 +33,7 @@ msgstr ""
msgid "Cannot connect to apps repository" msgid "Cannot connect to apps repository"
msgstr "" msgstr ""
#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 #: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:15
#: ../templates/users.php:50 ../templates/users.php:15
#: ../templates/users.php:51 #: ../templates/users.php:51
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -51,52 +50,42 @@ msgstr ""
msgid "System Settings" msgid "System Settings"
msgstr "" msgstr ""
#: ../templates/users.php:13 #: ../templates/users.php:2
msgid "Add user" msgid "Users"
msgstr "" msgstr ""
#: ../templates/users.php:21 ../templates/users.php:16 #: ../templates/users.php:7 ../templates/users.php:47
msgid "Password"
msgstr ""
#: ../templates/users.php:30
msgid "Create user"
msgstr ""
#: ../templates/users.php:40 ../templates/users.php:68
#: ../templates/users.php:37 ../templates/users.php:69
msgid "remove"
msgstr ""
#: ../templates/users.php:46 ../templates/users.php:7
#: ../templates/users.php:47
msgid "Groups" msgid "Groups"
msgstr "" msgstr ""
#: ../templates/users.php:58 ../templates/users.php:59 #: ../templates/users.php:16
msgid "Create group" msgid "Password"
msgstr ""
#: ../templates/users.php:94 ../templates/users.php:95
msgid "Force new password:"
msgstr ""
#: ../templates/users.php:96 ../templates/users.php:97
msgid "Set"
msgstr ""
#: ../templates/users.php:102 ../templates/users.php:103
msgid "Do you really want to delete user"
msgstr ""
#: ../templates/users.php:109 ../templates/users.php:110
msgid "Do you really want to delete group"
msgstr ""
#: ../templates/users.php:1 ../templates/users.php:2
msgid "Users"
msgstr "" msgstr ""
#: ../templates/users.php:25 #: ../templates/users.php:25
msgid "Create" msgid "Create"
msgstr "" msgstr ""
#: ../templates/users.php:37 ../templates/users.php:69
msgid "remove"
msgstr ""
#: ../templates/users.php:59
msgid "Create group"
msgstr ""
#: ../templates/users.php:95
msgid "Force new password:"
msgstr ""
#: ../templates/users.php:97
msgid "Set"
msgstr ""
#: ../templates/users.php:103
msgid "Do you really want to delete user"
msgstr ""
#: ../templates/users.php:110
msgid "Do you really want to delete group"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-26 00:58+0200\n" "POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,104 +21,6 @@ msgstr ""
msgid "Error 404, Cloud not found" msgid "Error 404, Cloud not found"
msgstr "" msgstr ""
#: ../templates/installation.php:6
msgid "Welcome to <strong>ownCloud</strong>, your personnal cloud."
msgstr ""
#: ../templates/installation.php:7
msgid "To finish the installation, please follow the steps below."
msgstr ""
#: ../templates/installation.php:26
msgid "Create an <strong>admin account.</strong>"
msgstr ""
#: ../templates/installation.php:27
msgid "Login:"
msgstr ""
#: ../templates/installation.php:28
msgid "Password:"
msgstr ""
#: ../templates/installation.php:31
msgid "Advanced"
msgstr ""
#: ../templates/installation.php:34
msgid "Set where to store the data."
msgstr ""
#: ../templates/installation.php:35
msgid "Data directory:"
msgstr ""
#: ../templates/installation.php:39
msgid "Configure your database."
msgstr ""
#: ../templates/installation.php:43
msgid "I will use a SQLite database. You have nothing to do!"
msgstr ""
#: ../templates/installation.php:46
msgid "SQLite"
msgstr ""
#: ../templates/installation.php:53
msgid "I will use a MySQL database."
msgstr ""
#: ../templates/installation.php:59 ../templates/installation.php:62
msgid "Host:"
msgstr ""
#: ../templates/installation.php:60 ../templates/installation.php:61
msgid "Database name:"
msgstr ""
#: ../templates/installation.php:61 ../templates/installation.php:63
msgid "Table prefix:"
msgstr ""
#: ../templates/installation.php:62
msgid "MySQL user login:"
msgstr ""
#: ../templates/installation.php:63
msgid "MySQL user password:"
msgstr ""
#: ../templates/installation.php:68 ../templates/installation.php:69
msgid "Finish setup"
msgstr ""
#: ../templates/layout.guest.php:20 ../templates/layout.guest.php:33
msgid ""
"<a href=\"http://owncloud.org/\">ownCloud</a> is a personal cloud which runs "
"on your own server.</p>"
msgstr ""
#: ../templates/login.php:6
msgid "Login failed!"
msgstr ""
#: ../templates/logout.php:1
msgid "You are logged out."
msgstr ""
#: ../templates/part.pagenavi.php:6
msgid "prev"
msgstr ""
#: ../templates/part.pagenavi.php:26
msgid "next"
msgstr ""
#: ../templates/part.searchbox.php:3
msgid "Search"
msgstr ""
#: ../templates/installation.php:6 #: ../templates/installation.php:6
msgid "<strong>ownCloud</strong> is your personal web storage." msgid "<strong>ownCloud</strong> is your personal web storage."
msgstr "" msgstr ""
@ -139,6 +41,18 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: ../templates/installation.php:31
msgid "Advanced"
msgstr ""
#: ../templates/installation.php:34
msgid "Set where to store the data."
msgstr ""
#: ../templates/installation.php:35
msgid "Data directory:"
msgstr ""
#: ../templates/installation.php:39 #: ../templates/installation.php:39
msgid "Configure the database." msgid "Configure the database."
msgstr "" msgstr ""
@ -147,6 +61,10 @@ msgstr ""
msgid "SQLite will be used for the database. You have nothing to do." msgid "SQLite will be used for the database. You have nothing to do."
msgstr "" msgstr ""
#: ../templates/installation.php:46
msgid "SQLite"
msgstr ""
#: ../templates/installation.php:53 #: ../templates/installation.php:53
msgid "MySQL will be used for the database." msgid "MySQL will be used for the database."
msgstr "" msgstr ""
@ -159,6 +77,48 @@ msgstr ""
msgid "MySQL password:" msgid "MySQL password:"
msgstr "" msgstr ""
#: ../templates/installation.php:61
msgid "Database name:"
msgstr ""
#: ../templates/installation.php:62
msgid "Host:"
msgstr ""
#: ../templates/installation.php:63
msgid "Table prefix:"
msgstr ""
#: ../templates/installation.php:69
msgid "Finish setup"
msgstr ""
#: ../templates/layout.guest.php:33
msgid ""
"<a href=\"http://owncloud.org/\">ownCloud</a> is a personal cloud which runs "
"on your own server.</p>"
msgstr ""
#: ../templates/login.php:6
msgid "Login failed!"
msgstr ""
#: ../templates/login.php:11 ../templates/login.php:15 #: ../templates/login.php:11 ../templates/login.php:15
msgid "Remember login" msgid "Remember login"
msgstr "" msgstr ""
#: ../templates/logout.php:1
msgid "You are logged out."
msgstr ""
#: ../templates/part.pagenavi.php:6
msgid "prev"
msgstr ""
#: ../templates/part.pagenavi.php:26
msgid "next"
msgstr ""
#: ../templates/part.searchbox.php:3
msgid "Search"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-26 00:58+0200\n" "POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,6 +21,6 @@ msgstr ""
msgid "Questions and Answers" msgid "Questions and Answers"
msgstr "" msgstr ""
#: ../templates/index.php:21 ../templates/index.php:24 #: ../templates/index.php:24
msgid "ASK A QUESTION" msgid "ASK A QUESTION"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-26 00:58+0200\n" "POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-26 00:58+0200\n" "POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"