merge master into interface

remotes/origin/stable
Robin Appelman 14 years ago
commit 0dad1f8ccb
  1. 2
      apps/files_imageviewer/appinfo/app.php
  2. 4
      apps/files_imageviewer/appinfo/info.xml
  3. 2
      apps/media/ajax/api.php
  4. 2
      apps/media/css/player.css
  5. BIN
      apps/media/js/Jplayer.swf
  6. 78
      apps/media/js/jquery.jplayer.min.js
  7. 1
      apps/media/js/player.js
  8. 23
      apps/media/lib_collection.php
  9. 3
      apps/media/templates/player.php
  10. 38
      core/js/js.js
  11. 12
      l10n/l10n.pl
  12. 43
      l10n/templates/admin.pot
  13. 86
      l10n/templates/core.pot
  14. 4
      l10n/templates/help.pot
  15. 2
      l10n/templates/log.pot
  16. 2
      l10n/templates/settings.pot

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

@ -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>

@ -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':

@ -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

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

@ -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;
} }
/** /**

@ -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>

@ -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;
}; };
} }

@ -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 );
} }
} }

@ -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 ""
#: ../templates/users.php:7 ../templates/users.php:47
msgid "Groups"
msgstr "" msgstr ""
#: ../templates/users.php:21 ../templates/users.php:16 #: ../templates/users.php:16
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: ../templates/users.php:30 #: ../templates/users.php:25
msgid "Create user" msgid "Create"
msgstr "" msgstr ""
#: ../templates/users.php:40 ../templates/users.php:68
#: ../templates/users.php:37 ../templates/users.php:69 #: ../templates/users.php:37 ../templates/users.php:69
msgid "remove" msgid "remove"
msgstr "" msgstr ""
#: ../templates/users.php:46 ../templates/users.php:7 #: ../templates/users.php:59
#: ../templates/users.php:47
msgid "Groups"
msgstr ""
#: ../templates/users.php:58 ../templates/users.php:59
msgid "Create group" msgid "Create group"
msgstr "" msgstr ""
#: ../templates/users.php:94 ../templates/users.php:95 #: ../templates/users.php:95
msgid "Force new password:" msgid "Force new password:"
msgstr "" msgstr ""
#: ../templates/users.php:96 ../templates/users.php:97 #: ../templates/users.php:97
msgid "Set" msgid "Set"
msgstr "" msgstr ""
#: ../templates/users.php:102 ../templates/users.php:103 #: ../templates/users.php:103
msgid "Do you really want to delete user" msgid "Do you really want to delete user"
msgstr "" msgstr ""
#: ../templates/users.php:109 ../templates/users.php:110 #: ../templates/users.php:110
msgid "Do you really want to delete group" msgid "Do you really want to delete group"
msgstr "" msgstr ""
#: ../templates/users.php:1 ../templates/users.php:2
msgid "Users"
msgstr ""
#: ../templates/users.php:25
msgid "Create"
msgstr ""

@ -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"
@ -22,23 +22,23 @@ msgid "Error 404, Cloud not found"
msgstr "" msgstr ""
#: ../templates/installation.php:6 #: ../templates/installation.php:6
msgid "Welcome to <strong>ownCloud</strong>, your personnal cloud." msgid "<strong>ownCloud</strong> is your personal web storage."
msgstr "" msgstr ""
#: ../templates/installation.php:7 #: ../templates/installation.php:7
msgid "To finish the installation, please follow the steps below." msgid "Finish the setup by following the steps below."
msgstr "" msgstr ""
#: ../templates/installation.php:26 #: ../templates/installation.php:26
msgid "Create an <strong>admin account.</strong>" msgid "Create an <strong>admin account</strong>."
msgstr "" msgstr ""
#: ../templates/installation.php:27 #: ../templates/installation.php:27
msgid "Login:" msgid "Username"
msgstr "" msgstr ""
#: ../templates/installation.php:28 #: ../templates/installation.php:28
msgid "Password:" msgid "Password"
msgstr "" msgstr ""
#: ../templates/installation.php:31 #: ../templates/installation.php:31
@ -54,11 +54,11 @@ msgid "Data directory:"
msgstr "" msgstr ""
#: ../templates/installation.php:39 #: ../templates/installation.php:39
msgid "Configure your database." msgid "Configure the database."
msgstr "" msgstr ""
#: ../templates/installation.php:43 #: ../templates/installation.php:43
msgid "I will use a SQLite 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 #: ../templates/installation.php:46
@ -66,34 +66,34 @@ msgid "SQLite"
msgstr "" msgstr ""
#: ../templates/installation.php:53 #: ../templates/installation.php:53
msgid "I will use a MySQL database." msgid "MySQL will be used for the database."
msgstr "" msgstr ""
#: ../templates/installation.php:59 ../templates/installation.php:62 #: ../templates/installation.php:59
msgid "Host:" msgid "MySQL username:"
msgstr "" msgstr ""
#: ../templates/installation.php:60 ../templates/installation.php:61 #: ../templates/installation.php:60
msgid "Database name:" msgid "MySQL password:"
msgstr "" msgstr ""
#: ../templates/installation.php:61 ../templates/installation.php:63 #: ../templates/installation.php:61
msgid "Table prefix:" msgid "Database name:"
msgstr "" msgstr ""
#: ../templates/installation.php:62 #: ../templates/installation.php:62
msgid "MySQL user login:" msgid "Host:"
msgstr "" msgstr ""
#: ../templates/installation.php:63 #: ../templates/installation.php:63
msgid "MySQL user password:" msgid "Table prefix:"
msgstr "" msgstr ""
#: ../templates/installation.php:68 ../templates/installation.php:69 #: ../templates/installation.php:69
msgid "Finish setup" msgid "Finish setup"
msgstr "" msgstr ""
#: ../templates/layout.guest.php:20 ../templates/layout.guest.php:33 #: ../templates/layout.guest.php:33
msgid "" msgid ""
"<a href=\"http://owncloud.org/\">ownCloud</a> is a personal cloud which runs " "<a href=\"http://owncloud.org/\">ownCloud</a> is a personal cloud which runs "
"on your own server.</p>" "on your own server.</p>"
@ -103,6 +103,10 @@ msgstr ""
msgid "Login failed!" msgid "Login failed!"
msgstr "" msgstr ""
#: ../templates/login.php:11 ../templates/login.php:15
msgid "Remember login"
msgstr ""
#: ../templates/logout.php:1 #: ../templates/logout.php:1
msgid "You are logged out." msgid "You are logged out."
msgstr "" msgstr ""
@ -118,47 +122,3 @@ msgstr ""
#: ../templates/part.searchbox.php:3 #: ../templates/part.searchbox.php:3
msgid "Search" msgid "Search"
msgstr "" msgstr ""
#: ../templates/installation.php:6
msgid "<strong>ownCloud</strong> is your personal web storage."
msgstr ""
#: ../templates/installation.php:7
msgid "Finish the setup by following the steps below."
msgstr ""
#: ../templates/installation.php:26
msgid "Create an <strong>admin account</strong>."
msgstr ""
#: ../templates/installation.php:27
msgid "Username"
msgstr ""
#: ../templates/installation.php:28
msgid "Password"
msgstr ""
#: ../templates/installation.php:39
msgid "Configure the database."
msgstr ""
#: ../templates/installation.php:43
msgid "SQLite will be used for the database. You have nothing to do."
msgstr ""
#: ../templates/installation.php:53
msgid "MySQL will be used for the database."
msgstr ""
#: ../templates/installation.php:59
msgid "MySQL username:"
msgstr ""
#: ../templates/installation.php:60
msgid "MySQL password:"
msgstr ""
#: ../templates/login.php:11 ../templates/login.php:15
msgid "Remember login"
msgstr ""

@ -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 ""

@ -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"

@ -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"

Loading…
Cancel
Save