summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/appinfo/app.php2
-rw-r--r--apps/files_imageviewer/js/lightbox.js2
-rw-r--r--apps/files_publiclink/templates/admin.php2
-rw-r--r--apps/media/ajax/api.php3
-rw-r--r--apps/media/appinfo/app.php2
-rw-r--r--apps/media/appinfo/database.xml18
-rw-r--r--apps/media/css/player.css6
-rw-r--r--apps/media/img/media.pngbin0 -> 562 bytes
-rw-r--r--apps/media/js/Jplayer.swfbin7679 -> 7679 bytes
-rw-r--r--apps/media/js/files.js8
-rw-r--r--apps/media/js/jquery.jplayer.min.js78
-rw-r--r--apps/media/js/player.js1
-rw-r--r--apps/media/lib_collection.php28
-rw-r--r--apps/media/lib_scanner.php99
-rw-r--r--apps/media/templates/player.php3
-rw-r--r--apps/user_openid/phpmyid.php14
-rw-r--r--core/css/styles.css283
-rw-r--r--core/img/actions/back.png (renamed from core/img/layout/back.png)bin396 -> 396 bytes
-rw-r--r--core/img/actions/back.svg121
-rw-r--r--core/img/actions/delete.pngbin0 -> 330 bytes
-rw-r--r--core/img/actions/delete.svg70
-rw-r--r--core/img/actions/download.pngbin0 -> 264 bytes
-rw-r--r--core/img/actions/download.svg73
-rw-r--r--core/img/actions/logout.png (renamed from core/img/layout/logout.png)bin657 -> 657 bytes
-rw-r--r--core/img/actions/logout.svg95
-rw-r--r--core/img/actions/rename.pngbin0 -> 339 bytes
-rw-r--r--core/img/actions/rename.svg80
-rw-r--r--core/img/actions/search.pngbin0 -> 701 bytes
-rw-r--r--core/img/actions/settings.png (renamed from core/img/layout/settings.png)bin695 -> 695 bytes
-rw-r--r--core/img/actions/settings.svg221
-rw-r--r--core/img/actions/share.pngbin0 -> 478 bytes
-rw-r--r--core/img/actions/share.svg70
-rw-r--r--core/img/breadcrumb-divider-start.pngbin0 -> 495 bytes
-rw-r--r--core/img/breadcrumb-divider.pngbin0 -> 1012 bytes
-rw-r--r--core/img/drop-arrow.pngbin2899 -> 0 bytes
-rw-r--r--core/img/header-a.pngbin2951 -> 0 bytes
-rw-r--r--core/img/header-login.pngbin2402 -> 0 bytes
-rw-r--r--core/img/header-settings-a.pngbin2885 -> 0 bytes
-rw-r--r--core/img/header-settings.pngbin2887 -> 0 bytes
-rw-r--r--core/img/header.pngbin2953 -> 0 bytes
-rw-r--r--core/img/mimetypes/audio.pngbin0 -> 562 bytes
-rw-r--r--core/img/mimetypes/image.pngbin0 -> 303 bytes
-rw-r--r--core/img/owncloud-logo-small-white.pngbin5444 -> 3550 bytes
-rw-r--r--core/js/js.js76
-rw-r--r--core/templates/installation.php2
-rw-r--r--core/templates/layout.admin.php15
-rw-r--r--core/templates/layout.user.php21
-rw-r--r--core/templates/login.php6
-rw-r--r--core/templates/part.searchbox.php3
-rw-r--r--files/ajax/rename.php2
-rw-r--r--files/css/files.css159
-rw-r--r--files/img/drop-arrow.pngbin2899 -> 0 bytes
-rw-r--r--files/js/fileactions.js100
-rw-r--r--files/js/filelist.js92
-rw-r--r--files/js/files.js339
-rw-r--r--files/templates/admin.php8
-rw-r--r--files/templates/index.php39
-rw-r--r--files/templates/part.breadcrumb.php5
-rw-r--r--files/templates/part.list.php22
-rw-r--r--l10n/l10n.pl12
-rw-r--r--l10n/templates/admin.pot2
-rw-r--r--l10n/templates/core.pot2
-rw-r--r--l10n/templates/help.pot2
-rw-r--r--l10n/templates/log.pot2
-rw-r--r--l10n/templates/settings.pot2
-rw-r--r--lib/app.php48
-rw-r--r--lib/base.php3
-rw-r--r--lib/filestorage.php2
-rw-r--r--lib/filestorage/local.php59
-rwxr-xr-xlib/helper.php50
-rw-r--r--lib/log.php8
-rw-r--r--lib/ocs.php76
-rw-r--r--lib/setup.php1
-rw-r--r--lib/template.php23
-rw-r--r--lib/util.php3
75 files changed, 1635 insertions, 828 deletions
diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php
index b78d698e50c..7ce784cfb98 100644
--- a/admin/appinfo/app.php
+++ b/admin/appinfo/app.php
@@ -2,7 +2,7 @@
OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" ));
-OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" =>"System", "icon" => OC_HELPER::imagePath( "admin", "administration.png" )));
+// OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" =>"System", "icon" => OC_HELPER::imagePath( "admin", "administration.png" )));
OC_APP::addAdminPage( array( "id" => "core_users", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users", "icon" => OC_HELPER::imagePath( "admin", "users.png" )));
OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "apps.php?installed" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "apps.png" )));
diff --git a/apps/files_imageviewer/js/lightbox.js b/apps/files_imageviewer/js/lightbox.js
index 6e45547ebb4..318c764458e 100644
--- a/apps/files_imageviewer/js/lightbox.js
+++ b/apps/files_imageviewer/js/lightbox.js
@@ -7,7 +7,7 @@ $(document).ready(function() {
$( 'body' ).append(overlay);
var container=$('<div id="lightbox"/>');
$( 'body' ).append(container);
- FileActions.register('image','View',function(filename){
+ FileActions.register('image','View','',function(filename){
var location='ajax/download.php?files='+filename+'&dir='+$('#dir').val();
overlay.show();
if(!images[location]){
diff --git a/apps/files_publiclink/templates/admin.php b/apps/files_publiclink/templates/admin.php
index da4586cb3df..04aaf5c4302 100644
--- a/apps/files_publiclink/templates/admin.php
+++ b/apps/files_publiclink/templates/admin.php
@@ -25,4 +25,4 @@
</form>
</tr>
</tbody>
-</table> \ No newline at end of file
+</table>
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index 0ccfb63f418..84d5dd17882 100644
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -105,6 +105,9 @@ if($arguments['action']){
$ftype=OC_FILESYSTEM::getMimeType( $arguments['path'] );
+ $songId=OC_MEDIA_COLLECTION::getSongByPath($arguments['path']);
+ OC_MEDIA_COLLECTION::registerPlay($songId);
+
header('Content-Type:'.$ftype);
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
diff --git a/apps/media/appinfo/app.php b/apps/media/appinfo/app.php
index 22cb10d7897..a41e228be4a 100644
--- a/apps/media/appinfo/app.php
+++ b/apps/media/appinfo/app.php
@@ -29,5 +29,5 @@ if(OC_APP::getCurrentApp()=='files'){
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( 'files', 'media.png' )));
+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' )));
?>
diff --git a/apps/media/appinfo/database.xml b/apps/media/appinfo/database.xml
index 91fa1f9e2a1..223682fcfcd 100644
--- a/apps/media/appinfo/database.xml
+++ b/apps/media/appinfo/database.xml
@@ -206,6 +206,24 @@
<length>4</length>
</field>
+ <field>
+ <name>song_playcount</name>
+ <type>integer</type>
+ <default>
+ </default>
+ <notnull>true</notnull>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>song_lastplayed</name>
+ <type>integer</type>
+ <default>
+ </default>
+ <notnull>true</notnull>
+ <length>4</length>
+ </field>
+
</declaration>
</table>
diff --git a/apps/media/css/player.css b/apps/media/css/player.css
index bf404f515fd..7acb9f34c1b 100644
--- a/apps/media/css/player.css
+++ b/apps/media/css/player.css
@@ -1,5 +1,5 @@
-#jp-interface{position:fixed;z-index:100;width:25em;left:201px;top:-10px;height:80px;border-bottom:none;}
-#jp-interface.player{display:hidden;}
+#jp-interface{position:fixed;z-index:100;width:25em;left:201px;top:-20px;height:80px;border-bottom:none;}
+#jp-interface div.player{height:0px}
#jp-interface ul.jp-controls{list-style-type:none;padding:0;}
#jp-interface ul.jp-controls li{display:inline;}
#jp-interface ul.jp-controls a{position:absolute;overflow:hidden;text-indent:-9999px;}
@@ -25,5 +25,5 @@ a.jp-unmute{background:url("../img/jplayer.blue.monday.png") 0 -170px no-repeat;
a.jp-unmute:hover{background:url("../img/jplayer.blue.monday.png") -19px -186px no-repeat;}
div.jp-volume-bar{position:absolute;overflow:hidden;background:url("../img/jplayer.blue.monday.png") 0 -250px repeat-x;width:46px;height:5px;cursor:pointer;top:37px;left:324px;}
div.jp-volume-bar-value{background:url("../img/jplayer.blue.monday.png") 0 -256px repeat-x;width:0;height:5px;}
-div.jp-current-time,div.jp-duration{position:absolute;font-size:.64em;font-style:oblique;top:49px;left:164px;width:122px;}
+div.jp-current-time,div.jp-duration{position:absolute;font-size:.64em;font-style:oblique;top:45px;left:164px;width:122px;}
div.jp-duration{text-align:right;}
diff --git a/apps/media/img/media.png b/apps/media/img/media.png
new file mode 100644
index 00000000000..6333b947f07
--- /dev/null
+++ b/apps/media/img/media.png
Binary files differ
diff --git a/apps/media/js/Jplayer.swf b/apps/media/js/Jplayer.swf
index 9487f49b5a6..c213fd578e5 100644
--- a/apps/media/js/Jplayer.swf
+++ b/apps/media/js/Jplayer.swf
Binary files differ
diff --git a/apps/media/js/files.js b/apps/media/js/files.js
index d699a96db7e..307c6012a26 100644
--- a/apps/media/js/files.js
+++ b/apps/media/js/files.js
@@ -40,11 +40,11 @@ function loadPlayer(type,ready){
$(document).ready(function() {
loadPlayer.done=false
- FileActions.register('audio','Add to playlist',addAudio);
- FileActions.register('application/ogg','Add to playlist',addAudio);
+// FileActions.register('audio','Add to playlist','',addAudio);
+// FileActions.register('application/ogg','Add to playlist','',addAudio);
- FileActions.register('audio','Play',playAudio);
- FileActions.register('application/ogg','Play',playAudio);
+ FileActions.register('audio','Play','',playAudio);
+ FileActions.register('application/ogg','','Play',playAudio);
FileActions.setDefault('audio','Play');
FileActions.setDefault('application/ogg','Play');
}); \ No newline at end of file
diff --git a/apps/media/js/jquery.jplayer.min.js b/apps/media/js/jquery.jplayer.min.js
index 1bcbb530d96..9ba8b0c45c7 100644
--- a/apps/media/js/jquery.jplayer.min.js
+++ b/apps/media/js/jquery.jplayer.min.js
@@ -1,78 +1,2 @@
-/*
- * jPlayer Plugin for jQuery JavaScript Library
- * http://www.happyworm.com/jquery/jplayer
- *
- * Copyright (c) 2009 - 2010 Happyworm Ltd
- * Dual licensed under the MIT and GPL licenses.
- * - http://www.opensource.org/licenses/mit-license.php
- * - http://www.gnu.org/copyleft/gpl.html
- *
- * Author: Mark J Panaghiston
- * Version: 2.0.0
- * Date: 20th December 2010
- */
-(function(c,h){c.fn.jPlayer=function(a){var b=typeof a==="string",d=Array.prototype.slice.call(arguments,1),f=this;a=!b&&d.length?c.extend.apply(null,[true,a].concat(d)):a;if(b&&a.charAt(0)==="_")return f;b?this.each(function(){var e=c.data(this,"jPlayer"),g=e&&c.isFunction(e[a])?e[a].apply(e,d):e;if(g!==e&&g!==h){f=g;return false}}):this.each(function(){var e=c.data(this,"jPlayer");if(e){e.option(a||{})._init();e.option(a||{})}else c.data(this,"jPlayer",new c.jPlayer(a,this))});return f};c.jPlayer=
-function(a,b){if(arguments.length){this.element=c(b);this.options=c.extend(true,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};c.jPlayer.event={ready:"jPlayer_ready",resize:"jPlayer_resize",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",
-loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};c.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","loadeddata","canplaythrough","ratechange"];c.jPlayer.pause=
-function(){c.each(c.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})};c.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};c.jPlayer.convertTime=function(a){a=new Date(a*1E3);var b=a.getUTCHours(),d=a.getUTCMinutes();a=a.getUTCSeconds();b=c.jPlayer.timeFormat.padHour&&b<10?"0"+b:b;d=c.jPlayer.timeFormat.padMin&&d<10?"0"+d:d;a=c.jPlayer.timeFormat.padSec&&a<10?"0"+a:a;return(c.jPlayer.timeFormat.showHour?
-b+c.jPlayer.timeFormat.sepHour:"")+(c.jPlayer.timeFormat.showMin?d+c.jPlayer.timeFormat.sepMin:"")+(c.jPlayer.timeFormat.showSec?a+c.jPlayer.timeFormat.sepSec:"")};c.jPlayer.uaMatch=function(a){a=a.toLowerCase();var b=/(opera)(?:.*version)?[ \/]([\w.]+)/,d=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||b.exec(a)||d.exec(a)||a.indexOf("compatible")<0&&f.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};c.jPlayer.browser={};var m=c.jPlayer.uaMatch(navigator.userAgent);
-if(m.browser){c.jPlayer.browser[m.browser]=true;c.jPlayer.browser.version=m.version}c.jPlayer.prototype={count:0,version:{script:"2.0.0",needFlash:"2.0.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:0.8,muted:false,backgroundColor:"#000000",cssSelectorAncestor:"#jp_interface_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",
-volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",currentTime:".jp-current-time",duration:".jp-duration"},idPrefix:"jp",errorAlerts:false,warningAlerts:false},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0},_status:{volume:h,muted:false,width:0,height:0},internal:{ready:false,instance:h,htmlDlyCmdId:h},solution:{html:true,
-flash:true},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:true,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:false,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',
-flashCanPlay:false,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=c.extend({},this.status,this._status);this.internal=c.extend({},this.internal);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.status.volume=this._limitValue(this.options.volume,0,1);this.status.muted=
-this.options.muted;this.status.width=this.element.css("width");this.status.height=this.element.css("height");this.element.css({"background-color":this.options.backgroundColor});c.each(this.options.supplied.toLowerCase().split(","),function(e,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.format[i]){var j=false;c.each(a.formats,function(n,k){if(i===k){j=true;return false}});j||a.formats.push(i)}});c.each(this.options.solution.toLowerCase().split(","),function(e,g){var i=g.replace(/^\s+|\s+$/g,"");if(a.solution[i]){var j=
-false;c.each(a.solutions,function(n,k){if(i===k){j=true;return false}});j||a.solutions.push(i)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")===""&&this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=c.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=c.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:h});this.internal.video=c.extend({},{id:this.options.idPrefix+
-"_video_"+this.count,jq:h});this.internal.flash=c.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:h,swf:this.options.swfPath+(this.options.swfPath!==""&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf"});this.internal.poster=c.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:h});c.each(c.jPlayer.event,function(e,g){if(a.options[e]!==h){a.element.bind(g+".jPlayer",a.options[e]);a.options[e]=h}});this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=
-this.internal.poster.id;this.htmlElement.poster.onload=function(){if(!a.status.video||a.status.waitForPlay)a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=c("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.require.audio=false;this.require.video=false;c.each(this.formats,function(e,g){a.require[a.format[g].media]=true});this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=
-document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType}this.flash.available=this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};c.each(this.formats,function(e,g){a.html.canPlay[g]=
-a.html[a.format[g].media].available&&""!==a.htmlElement[a.format[g].media].canPlayType(a.format[g].codec);a.flash.canPlay[g]=a.format[g].flashCanPlay&&a.flash.available});this.html.desired=false;this.flash.desired=false;c.each(this.solutions,function(e,g){if(e===0)a[g].desired=true;else{var i=false,j=false;c.each(a.formats,function(n,k){if(a[a.solutions[0]].canPlay[k])if(a.format[k].media==="video")j=true;else i=true});a[g].desired=a.require.audio&&!i||a.require.video&&!j}});this.html.support={};
-this.flash.support={};c.each(this.formats,function(e,g){a.html.support[g]=a.html.canPlay[g]&&a.html.desired;a.flash.support[g]=a.flash.canPlay[g]&&a.flash.desired});this.html.used=false;this.flash.used=false;c.each(this.solutions,function(e,g){c.each(a.formats,function(i,j){if(a[g].support[j]){a[g].used=true;return false}})});this.html.used||this.flash.used||this._error({type:c.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SOLUTION,
-hint:c.jPlayer.errorHint.NO_SOLUTION});this.html.active=false;this.html.audio.gate=false;this.html.video.gate=false;this.flash.active=false;this.flash.gate=false;if(this.flash.used){var b="id="+escape(this.internal.self.id)+"&vol="+this.status.volume+"&muted="+this.status.muted;if(c.browser.msie&&Number(c.browser.version)<=8){var d='<object id="'+this.internal.flash.id+'"';d+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';d+=' codebase="'+document.URL.substring(0,document.URL.indexOf(":"))+
-'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';d+=' type="application/x-shockwave-flash"';d+=' width="0" height="0">';d+="</object>";var f=[];f[0]='<param name="movie" value="'+this.internal.flash.swf+'" />';f[1]='<param name="quality" value="high" />';f[2]='<param name="FlashVars" value="'+b+'" />';f[3]='<param name="allowScriptAccess" value="always" />';f[4]='<param name="bgcolor" value="'+this.options.backgroundColor+'" />';b=document.createElement(d);for(d=0;d<f.length;d++)b.appendChild(document.createElement(f[d]));
-this.element.append(b)}else{f='<embed name="'+this.internal.flash.id+'" id="'+this.internal.flash.id+'" src="'+this.internal.flash.swf+'"';f+=' width="0" height="0" bgcolor="'+this.options.backgroundColor+'"';f+=' quality="high" FlashVars="'+b+'"';f+=' allowScriptAccess="always"';f+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';this.element.append(f)}this.internal.flash.jq=c("#"+this.internal.flash.id);this.internal.flash.jq.css({width:"0px",
-height:"0px"})}if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=c("#"+this.internal.audio.id)}if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=c("#"+this.internal.video.id);this.internal.video.jq.css({width:"0px",height:"0px"})}}this.html.used&&!this.flash.used&&
-window.setTimeout(function(){a.internal.ready=true;a.version.flash="n/a";a._trigger(c.jPlayer.event.ready)},100);c.each(this.options.cssSelector,function(e,g){a._cssSelector(e,g)});this._updateInterface();this._updateButtons(false);this._updateVolume(this.status.volume);this._updateMute(this.status.muted);this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();c.jPlayer.prototype.count++},destroy:function(){this._resetStatus();this._updateInterface();this._seeked();this.css.jq.currentTime.length&&
-this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");this.status.srcSet&&this.pause();c.each(this.css.jq,function(a,b){b.unbind(".jPlayer")});this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();this.instances[this.internal.instance]=h},enable:function(){},disable:function(){},_addHtmlEventListeners:function(a,b){var d=this;a.preload=this.options.preload;a.muted=this.options.muted;a.addEventListener("progress",function(){if(b.gate&&
-!d.status.waitForLoad){d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.progress)}},false);a.addEventListener("timeupdate",function(){if(b.gate&&!d.status.waitForLoad){d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.timeupdate)}},false);a.addEventListener("durationchange",function(){if(b.gate&&!d.status.waitForLoad){d.status.duration=this.duration;d._getHtmlStatus(a);d._updateInterface();d._trigger(c.jPlayer.event.durationchange)}},false);a.addEventListener("play",
-function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(true);d._trigger(c.jPlayer.event.play)}},false);a.addEventListener("playing",function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(true);d._seeked();d._trigger(c.jPlayer.event.playing)}},false);a.addEventListener("pause",function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(false);d._trigger(c.jPlayer.event.pause)}},false);a.addEventListener("waiting",function(){if(b.gate&&!d.status.waitForLoad){d._seeking();d._trigger(c.jPlayer.event.waiting)}},
-false);a.addEventListener("canplay",function(){if(b.gate&&!d.status.waitForLoad){a.volume=d._volumeFix(d.status.volume);d._trigger(c.jPlayer.event.canplay)}},false);a.addEventListener("seeking",function(){if(b.gate&&!d.status.waitForLoad){d._seeking();d._trigger(c.jPlayer.event.seeking)}},false);a.addEventListener("seeked",function(){if(b.gate&&!d.status.waitForLoad){d._seeked();d._trigger(c.jPlayer.event.seeked)}},false);a.addEventListener("suspend",function(){if(b.gate&&!d.status.waitForLoad){d._seeked();
-d._trigger(c.jPlayer.event.suspend)}},false);a.addEventListener("ended",function(){if(b.gate&&!d.status.waitForLoad){if(!c.jPlayer.browser.webkit)d.htmlElement.media.currentTime=0;d.htmlElement.media.pause();d._updateButtons(false);d._getHtmlStatus(a,true);d._updateInterface();d._trigger(c.jPlayer.event.ended)}},false);a.addEventListener("error",function(){if(b.gate&&!d.status.waitForLoad){d._updateButtons(false);d._seeked();if(d.status.srcSet){d.status.waitForLoad=true;d.status.waitForPlay=true;
-d.status.video&&d.internal.video.jq.css({width:"0px",height:"0px"});d._validString(d.status.media.poster)&&d.internal.poster.jq.show();d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show();d._error({type:c.jPlayer.error.URL,context:d.status.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL})}}},false);c.each(c.jPlayer.htmlEvent,function(f,e){a.addEventListener(this,function(){b.gate&&!d.status.waitForLoad&&d._trigger(c.jPlayer.event[e])},false)})},_getHtmlStatus:function(a,b){var d=0,
-f=0,e=0,g=0;d=a.currentTime;f=this.status.duration>0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;g=100*a.currentTime/a.seekable.end(a.seekable.length-1)}else{e=100;g=f}if(b)f=g=d=0;this.status.seekPercent=e;this.status.currentPercentRelative=g;this.status.currentPercentAbsolute=f;this.status.currentTime=d},_resetStatus:function(){this.status=c.extend({},this.status,c.jPlayer.prototype.status)},
-_trigger:function(a,b,d){a=c.Event(a);a.jPlayer={};a.jPlayer.version=c.extend({},this.version);a.jPlayer.status=c.extend(true,{},this.status);a.jPlayer.html=c.extend(true,{},this.html);a.jPlayer.flash=c.extend(true,{},this.flash);if(b)a.jPlayer.error=c.extend({},b);if(d)a.jPlayer.warning=c.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,b){if(a===c.jPlayer.event.ready&&!this.internal.ready){this.internal.ready=true;this.version.flash=b.version;this.version.needFlash!==this.version.flash&&
-this._error({type:c.jPlayer.error.VERSION,context:this.version.flash,message:c.jPlayer.errorMsg.VERSION+this.version.flash,hint:c.jPlayer.errorHint.VERSION});this._trigger(a)}if(this.flash.gate)switch(a){case c.jPlayer.event.progress:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.timeupdate:this._getFlashStatus(b);this._updateInterface();this._trigger(a);break;case c.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(a);break;case c.jPlayer.event.pause:this._updateButtons(false);
-this._trigger(a);break;case c.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case c.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._error({type:c.jPlayer.error.URL,
-context:b.src,message:c.jPlayer.errorMsg.URL,hint:c.jPlayer.errorHint.URL});break;case c.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case c.jPlayer.event.seeked:this._seeked();this._trigger(a);break;default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration},
-_updateButtons:function(a){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(c.jPlayer.convertTime(this.status.currentTime));
-this.css.jq.duration.length&&this.css.jq.duration.text(c.jPlayer.convertTime(this.status.duration))},_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},setMedia:function(a){var b=this;this._seeked();clearTimeout(this.internal.htmlDlyCmdId);var d=this.html.audio.gate,f=this.html.video.gate,e=false;c.each(this.formats,function(g,i){var j=b.format[i].media==="video";
-c.each(b.solutions,function(n,k){if(b[k].support[i]&&b._validString(a[i])){var l=k==="html";if(j)if(l){b.html.audio.gate=false;b.html.video.gate=true;b.flash.gate=false}else{b.html.audio.gate=false;b.html.video.gate=false;b.flash.gate=true}else if(l){b.html.audio.gate=true;b.html.video.gate=false;b.flash.gate=false}else{b.html.audio.gate=false;b.html.video.gate=false;b.flash.gate=true}if(b.flash.active||b.html.active&&b.flash.gate||d===b.html.audio.gate&&f===b.html.video.gate)b.clearMedia();else if(d!==
-b.html.audio.gate&&f!==b.html.video.gate){b._html_pause();b.status.video&&b.internal.video.jq.css({width:"0px",height:"0px"});b._resetStatus()}if(j){if(l){b._html_setVideo(a);b.html.active=true;b.flash.active=false}else{b._flash_setVideo(a);b.html.active=false;b.flash.active=true}b.css.jq.videoPlay.length&&b.css.jq.videoPlay.show();b.status.video=true}else{if(l){b._html_setAudio(a);b.html.active=true;b.flash.active=false}else{b._flash_setAudio(a);b.html.active=false;b.flash.active=true}b.css.jq.videoPlay.length&&
-b.css.jq.videoPlay.hide();b.status.video=false}e=true;return false}});if(e)return false});if(e){if(this._validString(a.poster))if(this.htmlElement.poster.src!==a.poster)this.htmlElement.poster.src=a.poster;else this.internal.poster.jq.show();else this.internal.poster.jq.hide();this.status.srcSet=true;this.status.media=c.extend({},a);this._updateButtons(false);this._updateInterface()}else{this.status.srcSet&&!this.status.waitForPlay&&this.pause();this.html.audio.gate=false;this.html.video.gate=false;
-this.flash.gate=false;this.html.active=false;this.flash.active=false;this._resetStatus();this._updateInterface();this._updateButtons(false);this.internal.poster.jq.hide();this.html.used&&this.require.video&&this.internal.video.jq.css({width:"0px",height:"0px"});this.flash.used&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._error({type:c.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:c.jPlayer.errorMsg.NO_SUPPORT,hint:c.jPlayer.errorHint.NO_SUPPORT})}},
-clearMedia:function(){this._resetStatus();this._updateButtons(false);this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active)this._html_clearMedia();else this.flash.active&&this._flash_clearMedia()},load:function(){if(this.status.srcSet)if(this.html.active)this._html_load();else this.flash.active&&this._flash_load();else this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_play(a);else this.flash.active&&
-this._flash_play(a);else this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_pause(a);else this.flash.active&&this._flash_pause(a);else this._urlNotSetError("pause")},pauseOthers:function(){var a=this;c.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){if(this.status.srcSet)if(this.html.active)this._html_pause(0);else this.flash.active&&
-this._flash_pause(0);else this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);if(this.status.srcSet)if(this.html.active)this._html_playHead(a);else this.flash.active&&this._flash_playHead(a);else this._urlNotSetError("playHead")},mute:function(){this.status.muted=true;this.html.used&&this._html_mute(true);this.flash.used&&this._flash_mute(true);this._updateMute(true);this._updateVolume(0);this._trigger(c.jPlayer.event.volumechange)},unmute:function(){this.status.muted=false;
-this.html.used&&this._html_mute(false);this.flash.used&&this._flash_mute(false);this._updateMute(false);this._updateVolume(this.status.volume);this._trigger(c.jPlayer.event.volumechange)},_updateMute:function(a){if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(a){this.css.jq.mute.hide();this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){a=this._limitValue(a,0,1);this.status.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);
-this.status.muted||this._updateVolume(a);this._trigger(c.jPlayer.event.volumechange)},volumeBar:function(a){if(!this.status.muted&&this.css.jq.volumeBar){var b=this.css.jq.volumeBar.offset();a=a.pageX-b.left;b=this.css.jq.volumeBar.width();this.volume(a/b)}},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.width(a*100+"%")},_volumeFix:function(a){var b=0.0010*Math.random();return a+(a<0.5?b:-b)},_cssSelectorAncestor:function(a,
-b){this.options.cssSelectorAncestor=a;b&&c.each(this.options.cssSelector,function(d,f){self._cssSelector(d,f)})},_cssSelector:function(a,b){var d=this;if(typeof b==="string")if(c.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=b;this.css.cs[a]=this.options.cssSelectorAncestor+" "+b;this.css.jq[a]=b?c(this.css.cs[a]):[];this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(f){d[a](f);c(this).blur();
-return false});b&&this.css.jq[a].length!==1&&this._warning({type:c.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:c.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:c.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:c.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:c.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:c.jPlayer.warning.CSS_SELECTOR_STRING,
-context:b,message:c.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:c.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset();a=a.pageX-b.left;b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},currentTime:function(){},duration:function(){},option:function(a,b){var d=a;if(arguments.length===0)return c.extend(true,{},this.options);if(typeof a==="string"){var f=a.split(".");if(b===h){for(var e=c.extend(true,
-{},this.options),g=0;g<f.length;g++)if(e[f[g]]!==h)e=e[f[g]];else{this._warning({type:c.jPlayer.warning.OPTION_KEY,context:a,message:c.jPlayer.warningMsg.OPTION_KEY,hint:c.jPlayer.warningHint.OPTION_KEY});return h}return e}e=d={};for(g=0;g<f.length;g++)if(g<f.length-1){e[f[g]]={};e=e[f[g]]}else e[f[g]]=b}this._setOptions(d);return this},_setOptions:function(a){var b=this;c.each(a,function(d,f){b._setOption(d,f)});return this},_setOption:function(a,b){var d=this;switch(a){case "cssSelectorAncestor":this.options[a]=
-b;c.each(d.options.cssSelector,function(f,e){d._cssSelector(f,e)});break;case "cssSelector":c.each(b,function(f,e){d._cssSelector(f,e)})}return this},resize:function(a){this.html.active&&this._resizeHtml(a);this.flash.active&&this._resizeFlash(a);this._trigger(c.jPlayer.event.resize)},_resizePoster:function(){},_resizeHtml:function(){},_resizeFlash:function(a){this.internal.flash.jq.css({width:a.width,height:a.height})},_html_initMedia:function(){this.status.srcSet&&!this.status.waitForPlay&&this.htmlElement.media.pause();
-this.options.preload!=="none"&&this._html_load();this._trigger(c.jPlayer.event.timeupdate)},_html_setAudio:function(a){var b=this;c.each(this.formats,function(d,f){if(b.html.support[f]&&a[f]){b.status.src=a[f];b.status.format[f]=true;b.status.formatType=f;return false}});this.htmlElement.media=this.htmlElement.audio;this._html_initMedia()},_html_setVideo:function(a){var b=this;c.each(this.formats,function(d,f){if(b.html.support[f]&&a[f]){b.status.src=a[f];b.status.format[f]=true;b.status.formatType=
-f;return false}});this.htmlElement.media=this.htmlElement.video;this._html_initMedia()},_html_clearMedia:function(){if(this.htmlElement.media){this.htmlElement.media.id===this.internal.video.id&&this.internal.video.jq.css({width:"0px",height:"0px"});this.htmlElement.media.pause();this.htmlElement.media.src="";c.browser.msie&&Number(c.browser.version)>=9||this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.htmlElement.media.src=this.status.src;
-try{this.htmlElement.media.load()}catch(a){}}clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this;this._html_load();this.htmlElement.media.play();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},100);return}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this;a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=
-a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=
-a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=
-a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var b=this;try{c.each(this.formats,function(f,e){if(b.flash.support[e]&&a[e]){switch(e){case "m4a":b._getMovie().fl_setAudio_m4a(a[e]);break;case "mp3":b._getMovie().fl_setAudio_mp3(a[e])}b.status.src=a[e];b.status.format[e]=true;b.status.formatType=e;return false}});
-if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var b=this;try{c.each(this.formats,function(f,e){if(b.flash.support[e]&&a[e]){switch(e){case "m4v":b._getMovie().fl_setVideo_m4v(a[e])}b.status.src=a[e];b.status.format[e]=true;b.status.formatType=e;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_clearMedia:function(){this.internal.flash.jq.css({width:"0px",
-height:"0px"});try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},
-_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},
-_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(f){}else if(navigator.plugins&&navigator.mimeTypes.length>0)if(d=navigator.plugins["Shockwave Flash"])if(navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a)b=true;return c.browser.msie&&
-Number(c.browser.version)>=9?false:b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_urlNotSetError:function(a){this._error({type:c.jPlayer.error.URL_NOT_SET,context:a,message:c.jPlayer.errorMsg.URL_NOT_SET,hint:c.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){this._error({type:c.jPlayer.error.FLASH,context:this.internal.flash.swf,message:c.jPlayer.errorMsg.FLASH+a.message,hint:c.jPlayer.errorHint.FLASH})},_error:function(a){this._trigger(c.jPlayer.event.error,
-a);if(this.options.errorAlerts)this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(c.jPlayer.event.warning,h,a);if(this.options.errorAlerts)this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)}};c.jPlayer.error={FLASH:"e_flash",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",
-URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};c.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",
-VERSION:"jPlayer "+c.jPlayer.prototype.version.script+" needs Jplayer.swf version "+c.jPlayer.prototype.version.needFlash+" but found "};c.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};c.jPlayer.warning=
-{CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};c.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of methodCssSelectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};
-c.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery); \ No newline at end of file
+(function($,undefined){$.fn.jPlayer=function(options){var name="jPlayer",isMethodCall=typeof options==="string",args=Array.prototype.slice.call(arguments,1),returnValue=this;options=!isMethodCall&&args.length?$.extend.apply(null,[true,options].concat(args)):options;if(isMethodCall&&options.charAt(0)==="_")return returnValue;if(isMethodCall){this.each(function(){var instance=$.data(this,name),methodValue=instance&&$.isFunction(instance[options])?instance[options].apply(instance,args):instance;if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue;return false}})}else this.each(function(){var instance=$.data(this,name);if(instance){instance.option(options||{})}else $.data(this,name,new $.jPlayer(options,this))});return returnValue};$.jPlayer=function(options,element){if(arguments.length){this.element=$(element);this.options=$.extend(true,{},this.options,options);var self=this;this.element.bind("remove.jPlayer",function(){self.destroy()});this._init()}};$.jPlayer.emulateMethods="load play pause";$.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";$.jPlayer.emulateOptions="muted volume";$.jPlayer.reservedEvent="ready flashreset resize repeat error warning";$.jPlayer.event={ready:"jPlayer_ready",flashreset:"jPlayer_flashreset",resize:"jPlayer_resize",repeat:"jPlayer_repeat",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};$.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","ratechange"];$.jPlayer.pause=function(){$.each($.jPlayer.prototype.instances,function(i,element){if(element.data("jPlayer").status.srcSet)element.jPlayer("pause")})};$.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};$.jPlayer.convertTime=function(s){var myTime=new Date(s*1e3),hour=myTime.getUTCHours(),min=myTime.getUTCMinutes(),sec=myTime.getUTCSeconds(),strHour=($.jPlayer.timeFormat.padHour&&hour<10)?"0"+hour:hour,strMin=($.jPlayer.timeFormat.padMin&&min<10)?"0"+min:min,strSec=($.jPlayer.timeFormat.padSec&&sec<10)?"0"+sec:sec;return(($.jPlayer.timeFormat.showHour)?strHour+$.jPlayer.timeFormat.sepHour:"")+(($.jPlayer.timeFormat.showMin)?strMin+$.jPlayer.timeFormat.sepMin:"")+(($.jPlayer.timeFormat.showSec)?strSec+$.jPlayer.timeFormat.sepSec:"")};$.jPlayer.uaBrowser=function(userAgent){var ua=userAgent.toLowerCase(),rwebkit=/(webkit)[ \/]([\w.]+)/,ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/,rmsie=/(msie) ([\w.]+)/,rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/,match=rwebkit.exec(ua)||ropera.exec(ua)||rmsie.exec(ua)||ua.indexOf("compatible")<0&&rmozilla.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}};$.jPlayer.uaPlatform=function(userAgent){var ua=userAgent.toLowerCase(),rplatform=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/,rtablet=/(ipad|playbook)/,randroid=/(android)/,rmobile=/(mobile)/,platform=rplatform.exec(ua)||[],tablet=rtablet.exec(ua)||!rmobile.exec(ua)&&randroid.exec(ua)||[];return{platform:platform[1]||"",tablet:tablet[1]||""}};$.jPlayer.browser={};$.jPlayer.platform={};var browserMatch=$.jPlayer.uaBrowser(navigator.userAgent);if(browserMatch.browser){$.jPlayer.browser[browserMatch.browser]=true;$.jPlayer.browser.version=browserMatch.version};var platformMatch=$.jPlayer.uaPlatform(navigator.userAgent);if(platformMatch.platform){$.jPlayer.platform[platformMatch.platform]=true;$.jPlayer.platform.mobile=!platformMatch.tablet;$.jPlayer.platform.tablet=!!platformMatch.tablet};$.jPlayer.prototype={count:0,version:{script:"2.0.23",needFlash:"2.0.9",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:'metadata',volume:0.8,muted:false,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui"},fullScreen:false,autohide:{restored:false,full:true,fadeIn:200,fadeOut:600,hold:1e3},loop:false,repeat:function(event){if(event.jPlayer.options.loop){$(this).unbind(".jPlayerRepeat").bind($.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){$(this).jPlayer("play")})}else $(this).unbind(".jPlayerRepeat")},idPrefix:"jp",noConflict:"jQuery",emulateHtml:false,errorAlerts:false,warningAlerts:false},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:false},solution:{html:true,flash:true},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:true,media:'audio'},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:'audio'},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:false,media:'audio'},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:'audio'},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:'audio'},fla:{codec:'audio/x-flv',flashCanPlay:true,media:'audio'},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:'video'},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:false,media:'video'},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:'video'},flv:{codec:'video/x-flv',flashCanPlay:true,media:'video'}},_init:function(){var self=this;this.element.empty();this.status=$.extend({},this.status);this.internal=$.extend({},this.internal);this.internal.domNode=this.element.get(0);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);$.each(this.options.supplied.toLowerCase().split(","),function(index1,value1){var format=value1.replace(/^\s+|\s+$/g,"");if(self.format[format]){var dupFound=false;$.each(self.formats,function(index2,value2){if(format===value2){dupFound=true;return false}});if(!dupFound)self.formats.push(format)}});$.each(this.options.solution.toLowerCase().split(","),function(index1,value1){var solution=value1.replace(/^\s+|\s+$/g,"");if(self.solution[solution]){var dupFound=false;$.each(self.solutions,function(index2,value2){if(solution===value2){dupFound=true;return false}});if(!dupFound)self.solutions.push(solution)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;if(!this.element.attr("id"))this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=$.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=$.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:undefined});this.internal.video=$.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:undefined});this.internal.flash=$.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:undefined,swf:this.options.swfPath+((this.options.swfPath!==""&&this.options.swfPath.slice(-1)!=="/")?"/":"")+"Jplayer.swf"});this.internal.poster=$.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:undefined});$.each($.jPlayer.event,function(eventName,eventType){if(self.options[eventName]!==undefined){self.element.bind(eventType+".jPlayer",self.options[eventName]);self.options[eventName]=undefined}});this.require.audio=false;this.require.video=false;$.each(this.formats,function(priority,format){self.require[self.format[format].media]=true});if(this.require.video){this.options=$.extend(true,{},this.optionsVideo,this.options)}else this.options=$.extend(true,{},this.optionsAudio,this.options);this._setSize();this.htmlElement.poster=document.createElement('img');this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){if(!self.status.video||self.status.waitForPlay)self.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=$("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement('audio');this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType};this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement('video');this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType};this.flash.available=this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};$.each(this.formats,function(priority,format){self.html.canPlay[format]=self.html[self.format[format].media].available&&""!==self.htmlElement[self.format[format].media].canPlayType(self.format[format].codec);self.flash.canPlay[format]=self.format[format].flashCanPlay&&self.flash.available});this.html.desired=false;this.flash.desired=false;$.each(this.solutions,function(solutionPriority,solution){if(solutionPriority===0){self[solution].desired=true}else{var audioCanPlay=false,videoCanPlay=false;$.each(self.formats,function(formatPriority,format){if(self[self.solutions[0]].canPlay[format])if(self.format[format].media==='video'){videoCanPlay=true}else audioCanPlay=true});self[solution].desired=(self.require.audio&&!audioCanPlay)||(self.require.video&&!videoCanPlay)}});this.html.support={};this.flash.support={};$.each(this.formats,function(priority,format){self.html.support[format]=self.html.canPlay[format]&&self.html.desired;self.flash.support[format]=self.flash.canPlay[format]&&self.flash.desired});this.html.used=false;this.flash.used=false;$.each(this.solutions,function(solutionPriority,solution){$.each(self.formats,function(formatPriority,format){if(self[solution].support[format]){self[solution].used=true;return false}})});this.html.active=false;this.html.audio.gate=false;this.html.video.gate=false;this.flash.active=false;this.flash.gate=false;this._cssSelectorAncestor(this.options.cssSelectorAncestor);if(!(this.html.used||this.flash.used))this._error({type:$.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:$.jPlayer.errorMsg.NO_SOLUTION,hint:$.jPlayer.errorHint.NO_SOLUTION});if(this.flash.used){var htmlObj,flashVars='jQuery='+encodeURI(this.options.noConflict)+'&id='+encodeURI(this.internal.self.id)+'&vol='+this.options.volume+'&muted='+this.options.muted;if($.browser.msie&&Number($.browser.version)<=8){var objStr='<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0"></object>',paramStr=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+flashVars+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];htmlObj=document.createElement(objStr);for(var i=0;i<paramStr.length;i++)htmlObj.appendChild(document.createElement(paramStr[i]))}else{var createParam=function(el,n,v){var p=document.createElement("param");p.setAttribute("name",n);p.setAttribute("value",v);el.appendChild(p)};htmlObj=document.createElement("object");htmlObj.setAttribute("id",this.internal.flash.id);htmlObj.setAttribute("data",this.internal.flash.swf);htmlObj.setAttribute("type","application/x-shockwave-flash");htmlObj.setAttribute("width","1");htmlObj.setAttribute("height","1");createParam(htmlObj,"flashvars",flashVars);createParam(htmlObj,"allowscriptaccess","always");createParam(htmlObj,"bgcolor",this.options.backgroundColor);createParam(htmlObj,"wmode",this.options.wmode)};this.element.append(htmlObj);this.internal.flash.jq=$(htmlObj)};if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=$("#"+this.internal.audio.id)};if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=$("#"+this.internal.video.id);this.internal.video.jq.css({width:'0px',height:'0px'})}};if(this.options.emulateHtml)this._emulateHtmlBridge();if(this.html.used&&!this.flash.used)setTimeout(function(){self.internal.ready=true;self.version.flash="n/a";self._trigger($.jPlayer.event.repeat);self._trigger($.jPlayer.event.ready)},100);this._updateInterface();this._updateButtons(false);this._updateAutohide();this._updateVolume(this.options.volume);this._updateMute(this.options.muted);if(this.css.jq.videoPlay.length)this.css.jq.videoPlay.hide();$.jPlayer.prototype.count++},destroy:function(){this._resetStatus();this._updateInterface();this._seeked();if(this.css.jq.currentTime.length)this.css.jq.currentTime.text("");if(this.css.jq.duration.length)this.css.jq.duration.text("");if(this.status.srcSet)this.pause();$.each(this.css.jq,function(fn,jq){if(jq.length)jq.unbind(".jPlayer")});if(this.options.emulateHtml)this._destroyHtmlBridge();this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();delete this.instances[this.internal.instance]},enable:function(){},disable:function(){},_addHtmlEventListeners:function(mediaElement,entity){var self=this;mediaElement.preload=this.options.preload;mediaElement.muted=this.options.muted;mediaElement.volume=this.options.volume;mediaElement.addEventListener("progress",function(){if(entity.gate&&!self.status.waitForLoad){self._getHtmlStatus(mediaElement);self._updateInterface();self._trigger($.jPlayer.event.progress)}},false);mediaElement.addEventListener("timeupdate",function(){if(entity.gate&&!self.status.waitForLoad){self._getHtmlStatus(mediaElement);self._updateInterface();self._trigger($.jPlayer.event.timeupdate)}},false);mediaElement.addEventListener("durationchange",function(){if(entity.gate&&!self.status.waitForLoad){self.status.duration=this.duration;self._getHtmlStatus(mediaElement);self._updateInterface();self._trigger($.jPlayer.event.durationchange)}},false);mediaElement.addEventListener("play",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(true);self._trigger($.jPlayer.event.play)}},false);mediaElement.addEventListener("playing",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(true);self._seeked();self._trigger($.jPlayer.event.playing)}},false);mediaElement.addEventListener("pause",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(false);self._trigger($.jPlayer.event.pause)}},false);mediaElement.addEventListener("waiting",function(){if(entity.gate&&!self.status.waitForLoad){self._seeking();self._trigger($.jPlayer.event.waiting)}},false);mediaElement.addEventListener("seeking",function(){if(entity.gate&&!self.status.waitForLoad){self._seeking();self._trigger($.jPlayer.event.seeking)}},false);mediaElement.addEventListener("seeked",function(){if(entity.gate&&!self.status.waitForLoad){self._seeked();self._trigger($.jPlayer.event.seeked)}},false);mediaElement.addEventListener("volumechange",function(){if(entity.gate&&!self.status.waitForLoad){self.options.volume=mediaElement.volume;self.options.muted=mediaElement.muted;self._updateMute();self._updateVolume();self._trigger($.jPlayer.event.volumechange)}},false);mediaElement.addEventListener("suspend",function(){if(entity.gate&&!self.status.waitForLoad){self._seeked();self._trigger($.jPlayer.event.suspend)}},false);mediaElement.addEventListener("ended",function(){if(entity.gate&&!self.status.waitForLoad){if(!$.jPlayer.browser.webkit)self.htmlElement.media.currentTime=0;self.htmlElement.media.pause();self._updateButtons(false);self._getHtmlStatus(mediaElement,true);self._updateInterface();self._trigger($.jPlayer.event.ended)}},false);mediaElement.addEventListener("error",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(false);self._seeked();if(self.status.srcSet){clearTimeout(self.internal.htmlDlyCmdId);self.status.waitForLoad=true;self.status.waitForPlay=true;if(self.status.video)self.internal.video.jq.css({width:'0px',height:'0px'});if(self._validString(self.status.media.poster))self.internal.poster.jq.show();if(self.css.jq.videoPlay.length)self.css.jq.videoPlay.show();self._error({type:$.jPlayer.error.URL,context:self.status.src,message:$.jPlayer.errorMsg.URL,hint:$.jPlayer.errorHint.URL})}}},false);$.each($.jPlayer.htmlEvent,function(i,eventType){mediaElement.addEventListener(this,function(){if(entity.gate&&!self.status.waitForLoad)self._trigger($.jPlayer.event[eventType])},false)})},_getHtmlStatus:function(media,override){var ct=0,d=0,cpa=0,sp=0,cpr=0;if(media.duration)this.status.duration=media.duration;ct=media.currentTime;cpa=(this.status.duration>0)?100*ct/this.status.duration:0;if((typeof media.seekable==="object")&&(media.seekable.length>0)){sp=(this.status.duration>0)?100*media.seekable.end(media.seekable.length-1)/this.status.duration:100;cpr=100*media.currentTime/media.seekable.end(media.seekable.length-1)}else{sp=100;cpr=cpa};if(override){ct=0;cpr=0;cpa=0};this.status.seekPercent=sp;this.status.currentPercentRelative=cpr;this.status.currentPercentAbsolute=cpa;this.status.currentTime=ct;this.status.readyState=media.readyState;this.status.networkState=media.networkState;this.status.playbackRate=media.playbackRate;this.status.ended=media.ended},_resetStatus:function(){this.status=$.extend({},this.status,$.jPlayer.prototype.status)},_trigger:function(eventType,error,warning){var event=$.Event(eventType);event.jPlayer={};event.jPlayer.version=$.extend({},this.version);event.jPlayer.options=$.extend(true,{},this.options);event.jPlayer.status=$.extend(true,{},this.status);event.jPlayer.html=$.extend(true,{},this.html);event.jPlayer.flash=$.extend(true,{},this.flash);if(error)event.jPlayer.error=$.extend({},error);if(warning)event.jPlayer.warning=$.extend({},warning);this.element.trigger(event)},jPlayerFlashEvent:function(eventType,status){if(eventType===$.jPlayer.event.ready)if(!this.internal.ready){this.internal.ready=true;this.internal.flash.jq.css({width:'0px',height:'0px'});this.version.flash=status.version;if(this.version.needFlash!==this.version.flash)this._error({type:$.jPlayer.error.VERSION,context:this.version.flash,message:$.jPlayer.errorMsg.VERSION+this.version.flash,hint:$.jPlayer.errorHint.VERSION});this._trigger($.jPlayer.event.repeat);this._trigger(eventType)}else if(this.flash.gate){if(this.status.srcSet){var currentTime=this.status.currentTime,paused=this.status.paused;this.setMedia(this.status.media);if(currentTime>0)if(paused){this.pause(currentTime)}else this.play(currentTime)};this._trigger($.jPlayer.event.flashreset)};if(this.flash.gate)switch(eventType){case $.jPlayer.event.progress:this._getFlashStatus(status);this._updateInterface();this._trigger(eventType);break;case $.jPlayer.event.timeupdate:this._getFlashStatus(status);this._updateInterface();this._trigger(eventType);break;case $.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(eventType);break;case $.jPlayer.event.pause:this._updateButtons(false);this._trigger(eventType);break;case $.jPlayer.event.ended:this._updateButtons(false);this._trigger(eventType);break;case $.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;if(this.status.video)this.internal.flash.jq.css({width:'0px',height:'0px'});if(this._validString(this.status.media.poster))this.internal.poster.jq.show();if(this.css.jq.videoPlay.length)this.css.jq.videoPlay.show();if(this.status.video){this._flash_setVideo(this.status.media)}else this._flash_setAudio(this.status.media);this._error({type:$.jPlayer.error.URL,context:status.src,message:$.jPlayer.errorMsg.URL,hint:$.jPlayer.errorHint.URL});break;case $.jPlayer.event.seeking:this._seeking();this._trigger(eventType);break;case $.jPlayer.event.seeked:this._seeked();this._trigger(eventType);break;case $.jPlayer.event.ready:break;default:this._trigger(eventType)};return false},_getFlashStatus:function(status){this.status.seekPercent=status.seekPercent;this.status.currentPercentRelative=status.currentPercentRelative;this.status.currentPercentAbsolute=status.currentPercentAbsolute;this.status.currentTime=status.currentTime;this.status.duration=status.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false},_updateButtons:function(playing){if(playing!==undefined){this.status.paused=!playing;if(this.css.jq.play.length&&this.css.jq.pause.length)if(playing){this.css.jq.play.hide();this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}};if(this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length)if(this.options.fullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.show()}else{this.css.jq.fullScreen.show();this.css.jq.restoreScreen.hide()};if(this.css.jq.repeat.length&&this.css.jq.repeatOff.length)if(this.options.loop){this.css.jq.repeat.hide();this.css.jq.repeatOff.show()}else{this.css.jq.repeat.show();this.css.jq.repeatOff.hide()}},_updateInterface:function(){if(this.css.jq.seekBar.length)this.css.jq.seekBar.width(this.status.seekPercent+"%");if(this.css.jq.playBar.length)this.css.jq.playBar.width(this.status.currentPercentRelative+"%");if(this.css.jq.currentTime.length)this.css.jq.currentTime.text($.jPlayer.convertTime(this.status.currentTime));if(this.css.jq.duration.length)this.css.jq.duration.text($.jPlayer.convertTime(this.status.duration))},_seeking:function(){if(this.css.jq.seekBar.length)this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){if(this.css.jq.seekBar.length)this.css.jq.seekBar.removeClass("jp-seeking-bg")},setMedia:function(media){var self=this;this._seeked();clearTimeout(this.internal.htmlDlyCmdId);var audioGate=this.html.audio.gate,videoGate=this.html.video.gate,supported=false;$.each(this.formats,function(formatPriority,format){var isVideo=self.format[format].media==='video';$.each(self.solutions,function(solutionPriority,solution){if(self[solution].support[format]&&self._validString(media[format])){var isHtml=solution==='html';if(isVideo){if(isHtml){self.html.audio.gate=false;self.html.video.gate=true;self.flash.gate=false}else{self.html.audio.gate=false;self.html.video.gate=false;self.flash.gate=true}}else if(isHtml){self.html.audio.gate=true;self.html.video.gate=false;self.flash.gate=false}else{self.html.audio.gate=false;self.html.video.gate=false;self.flash.gate=true};if(self.flash.active||(self.html.active&&self.flash.gate)||(audioGate===self.html.audio.gate&&videoGate===self.html.video.gate)){self.clearMedia()}else if(audioGate!==self.html.audio.gate&&videoGate!==self.html.video.gate){self._html_pause();if(self.status.video)self.internal.video.jq.css({width:'0px',height:'0px'});self._resetStatus()};if(isVideo){if(isHtml){self._html_setVideo(media);self.html.active=true;self.flash.active=false}else{self._flash_setVideo(media);self.html.active=false;self.flash.active=true};if(self.css.jq.videoPlay.length)self.css.jq.videoPlay.show();self.status.video=true}else{if(isHtml){self._html_setAudio(media);self.html.active=true;self.flash.active=false}else{self._flash_setAudio(media);self.html.active=false;self.flash.active=true};if(self.css.jq.videoPlay.length)self.css.jq.videoPlay.hide();self.status.video=false};supported=true;return false}});if(supported)return false});if(supported){if(this._validString(media.poster)){if(this.htmlElement.poster.src!==media.poster){this.htmlElement.poster.src=media.poster}else this.internal.poster.jq.show()}else this.internal.poster.jq.hide();this.status.srcSet=true;this.status.media=$.extend({},media);this._updateButtons(false);this._updateInterface()}else{if(this.status.srcSet&&!this.status.waitForPlay)this.pause();this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false;this.html.active=false;this.flash.active=false;this._resetStatus();this._updateInterface();this._updateButtons(false);this.internal.poster.jq.hide();if(this.html.used&&this.require.video)this.internal.video.jq.css({width:'0px',height:'0px'});if(this.flash.used)this.internal.flash.jq.css({width:'0px',height:'0px'});this._error({type:$.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:$.jPlayer.errorMsg.NO_SUPPORT,hint:$.jPlayer.errorHint.NO_SUPPORT})}},clearMedia:function(){this._resetStatus();this._updateButtons(false);this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active){this._html_clearMedia()}else if(this.flash.active)this._flash_clearMedia()},load:function(){if(this.status.srcSet){if(this.html.active){this._html_load()}else if(this.flash.active)this._flash_load()}else this._urlNotSetError("load")},play:function(time){time=(typeof time==="number")?time:NaN;if(this.status.srcSet){if(this.html.active){this._html_play(time)}else if(this.flash.active)this._flash_play(time)}else this._urlNotSetError("play")},videoPlay:function(e){this.play()},pause:function(time){time=(typeof time==="number")?time:NaN;if(this.status.srcSet){if(this.html.active){this._html_pause(time)}else if(this.flash.active)this._flash_pause(time)}else this._urlNotSetError("pause")},pauseOthers:function(){var self=this;$.each(this.instances,function(i,element){if(self.element!==element)if(element.data("jPlayer").status.srcSet)element.jPlayer("pause")})},stop:function(){if(this.status.srcSet){if(this.html.active){this._html_pause(0)}else if(this.flash.active)this._flash_pause(0)}else this._urlNotSetError("stop")},playHead:function(p){p=this._limitValue(p,0,100);if(this.status.srcSet){if(this.html.active){this._html_playHead(p)}else if(this.flash.active)this._flash_playHead(p)}else this._urlNotSetError("playHead")},_muted:function(muted){this.options.muted=muted;if(this.html.used)this._html_mute(muted);if(this.flash.used)this._flash_mute(muted);if(this.flash.gate){this._updateMute(muted);this._updateVolume(this.options.volume);this._trigger($.jPlayer.event.volumechange)}},mute:function(mute){mute=mute===undefined?true:!!mute;this._muted(mute)},unmute:function(unmute){unmute=unmute===undefined?true:!!unmute;this._muted(!unmute)},_updateMute:function(mute){if(mute===undefined)mute=this.options.muted;if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(mute){this.css.jq.mute.hide();this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(v){v=this._limitValue(v,0,1);this.options.volume=v;if(this.html.used)this._html_volume(v);if(this.flash.used)this._flash_volume(v);if(this.flash.gate){this._updateVolume(v);this._trigger($.jPlayer.event.volumechange)}},volumeBar:function(e){if(this.css.jq.volumeBar.length){var offset=this.css.jq.volumeBar.offset(),x=e.pageX-offset.left,w=this.css.jq.volumeBar.width(),v=x/w;this.volume(v)};if(this.options.muted)this._muted(false)},volumeBarValue:function(e){this.volumeBar(e)},_updateVolume:function(v){if(v===undefined)v=this.options.volume;v=this.options.muted?0:v;if(this.css.jq.volumeBarValue.length)this.css.jq.volumeBarValue.width((v*100)+"%")},volumeMax:function(){this.volume(1);if(this.options.muted)this._muted(false)},_cssSelectorAncestor:function(ancestor){var self=this;this.options.cssSelectorAncestor=ancestor;this._removeUiClass();this.ancestorJq=ancestor?$(ancestor):[];if(ancestor&&this.ancestorJq.length!==1)this._warning({type:$.jPlayer.warning.CSS_SELECTOR_COUNT,context:ancestor,message:$.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:$.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();$.each(this.options.cssSelector,function(fn,cssSel){self._cssSelector(fn,cssSel)})},_cssSelector:function(fn,cssSel){var self=this;if(typeof cssSel==='string'){if($.jPlayer.prototype.options.cssSelector[fn]){if(this.css.jq[fn]&&this.css.jq[fn].length)this.css.jq[fn].unbind(".jPlayer");this.options.cssSelector[fn]=cssSel;this.css.cs[fn]=this.options.cssSelectorAncestor+" "+cssSel;if(cssSel){this.css.jq[fn]=$(this.css.cs[fn])}else this.css.jq[fn]=[];if(this.css.jq[fn].length){var handler=function(e){self[fn](e);$(this).blur();return false};this.css.jq[fn].bind("click.jPlayer",handler)};if(cssSel&&this.css.jq[fn].length!==1)this._warning({type:$.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[fn],message:$.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[fn].length+" found for "+fn+" method.",hint:$.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:$.jPlayer.warning.CSS_SELECTOR_METHOD,context:fn,message:$.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:$.jPlayer.warningHint.CSS_SELECTOR_METHOD})}else this._warning({type:$.jPlayer.warning.CSS_SELECTOR_STRING,context:cssSel,message:$.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:$.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(e){if(this.css.jq.seekBar){var offset=this.css.jq.seekBar.offset(),x=e.pageX-offset.left,w=this.css.jq.seekBar.width(),p=100*x/w;this.playHead(p)}},playBar:function(e){this.seekBar(e)},repeat:function(){this._loop(true)},repeatOff:function(){this._loop(false)},_loop:function(loop){if(this.options.loop!==loop){this.options.loop=loop;this._updateButtons();this._trigger($.jPlayer.event.repeat)}},currentTime:function(e){},duration:function(e){},gui:function(e){},option:function(key,value){var options=key;if(arguments.length===0)return $.extend(true,{},this.options);if(typeof key==="string"){var keys=key.split(".");if(value===undefined){var opt=$.extend(true,{},this.options);for(var i=0;i<keys.length;i++)if(opt[keys[i]]!==undefined){opt=opt[keys[i]]}else{this._warning({type:$.jPlayer.warning.OPTION_KEY,context:key,message:$.jPlayer.warningMsg.OPTION_KEY,hint:$.jPlayer.warningHint.OPTION_KEY});return undefined};return opt};options={};var opts=options;for(var j=0;j<keys.length;j++)if(j<keys.length-1){opts[keys[j]]={};opts=opts[keys[j]]}else opts[keys[j]]=value};this._setOptions(options);return this},_setOptions:function(options){var self=this;$.each(options,function(key,value){self._setOption(key,value)});return this},_setOption:function(key,value){var self=this;switch(key){case"volume":this.volume(value);break;case"muted":this._muted(value);break;case"cssSelectorAncestor":this._cssSelectorAncestor(value);break;case"cssSelector":$.each(value,function(fn,cssSel){self._cssSelector(fn,cssSel)});break;case"fullScreen":if(this.options[key]!==value){this._removeUiClass();this.options[key]=value;this._refreshSize()};break;case"size":if(!this.options.fullScreen&&this.options[key].cssClass!==value.cssClass)this._removeUiClass();this.options[key]=$.extend({},this.options[key],value);this._refreshSize();break;case"sizeFull":if(this.options.fullScreen&&this.options[key].cssClass!==value.cssClass)this._removeUiClass();this.options[key]=$.extend({},this.options[key],value);this._refreshSize();break;case"autohide":this.options[key]=$.extend({},this.options[key],value);this._updateAutohide();break;case"loop":this._loop(value);break;case"emulateHtml":if(this.options[key]!==value){this.options[key]=value;if(value){this._emulateHtmlBridge()}else this._destroyHtmlBridge()};break};return this},_refreshSize:function(){this._setSize();this._addUiClass();this._updateSize();this._updateButtons();this._updateAutohide();this._trigger($.jPlayer.event.resize)},_setSize:function(){if(this.options.fullScreen){this.status.width=this.options.sizeFull.width;this.status.height=this.options.sizeFull.height;this.status.cssClass=this.options.sizeFull.cssClass}else{this.status.width=this.options.size.width;this.status.height=this.options.size.height;this.status.cssClass=this.options.size.cssClass};this.element.css({width:this.status.width,height:this.status.height})},_addUiClass:function(){if(this.ancestorJq.length)this.ancestorJq.addClass(this.status.cssClass)},_removeUiClass:function(){if(this.ancestorJq.length)this.ancestorJq.removeClass(this.status.cssClass)},_updateSize:function(){this.internal.poster.jq.css({width:this.status.width,height:this.status.height});if(!this.status.waitForPlay)if(this.html.active&&this.status.video){this.internal.video.jq.css({width:this.status.width,height:this.status.height})}else if(this.flash.active)this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},_updateAutohide:function(){var self=this,event="mousemove.jPlayer",namespace=".jPlayerAutohide",eventType=event+namespace,handler=function(){self.css.jq.gui.fadeIn(self.options.autohide.fadeIn,function(){clearTimeout(self.internal.autohideId);self.internal.autohideId=setTimeout(function(){self.css.jq.gui.fadeOut(self.options.autohide.fadeOut)},self.options.autohide.hold)})};clearTimeout(this.internal.autohideId);this.element.unbind(namespace);if(this.css.jq.gui.length){this.css.jq.gui.unbind(namespace);if(this.options.fullScreen&&this.options.autohide.full||!this.options.fullScreen&&this.options.autohide.restored){this.element.bind(eventType,handler);this.css.jq.gui.bind(eventType,handler);this.css.jq.gui.hide()}else this.css.jq.gui.stop(true,true).show()}},fullScreen:function(){this._setOption("fullScreen",true)},restoreScreen:function(){this._setOption("fullScreen",false)},_html_initMedia:function(){if(this.status.srcSet&&!this.status.waitForPlay)this.htmlElement.media.pause();if(this.options.preload!=='none')this._html_load();this._trigger($.jPlayer.event.timeupdate)},_html_setAudio:function(media){var self=this;$.each(this.formats,function(priority,format){if(self.html.support[format]&&media[format]){self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false}});this.htmlElement.media=this.htmlElement.audio;this._html_initMedia()},_html_setVideo:function(media){var self=this;$.each(this.formats,function(priority,format){if(self.html.support[format]&&media[format]){self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false}});this.htmlElement.media=this.htmlElement.video;this._html_initMedia()},_html_clearMedia:function(){if(this.htmlElement.media){if(this.htmlElement.media.id===this.internal.video.id)this.internal.video.jq.css({width:'0px',height:'0px'});this.htmlElement.media.pause();this.htmlElement.media.src="";this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.htmlElement.media.src=this.status.src;this.htmlElement.media.load()};clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(time){var self=this;this._html_load();this.htmlElement.media.play();if(!isNaN(time))try{this.htmlElement.media.currentTime=time}catch(err){this.internal.htmlDlyCmdId=setTimeout(function(){self.play(time)},100);return};this._html_checkWaitForPlay()},_html_pause:function(time){var self=this;if(time>0){this._html_load()}else clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(time))try{this.htmlElement.media.currentTime=time}catch(err){this.internal.htmlDlyCmdId=setTimeout(function(){self.pause(time)},100);return};if(time>0)this._html_checkWaitForPlay()},_html_playHead:function(percent){var self=this;this._html_load();try{if((typeof this.htmlElement.media.seekable==="object")&&(this.htmlElement.media.seekable.length>0)){this.htmlElement.media.currentTime=percent*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100}else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration)){this.htmlElement.media.currentTime=percent*this.htmlElement.media.duration/100}else throw"e"}catch(err){this.internal.htmlDlyCmdId=setTimeout(function(){self.playHead(percent)},100);return};if(!this.status.waitForLoad)this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;if(this.css.jq.videoPlay.length)this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(v){if(this.html.audio.available)this.htmlElement.audio.volume=v;if(this.html.video.available)this.htmlElement.video.volume=v},_html_mute:function(m){if(this.html.audio.available)this.htmlElement.audio.muted=m;if(this.html.video.available)this.htmlElement.video.muted=m},_flash_setAudio:function(media){var self=this;try{$.each(this.formats,function(priority,format){if(self.flash.support[format]&&media[format]){switch(format){case"m4a":case"fla":self._getMovie().fl_setAudio_m4a(media[format]);break;case"mp3":self._getMovie().fl_setAudio_mp3(media[format]);break};self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false}});if(this.options.preload==='auto'){this._flash_load();this.status.waitForLoad=false}}catch(err){this._flashError(err)}},_flash_setVideo:function(media){var self=this;try{$.each(this.formats,function(priority,format){if(self.flash.support[format]&&media[format]){switch(format){case"m4v":case"flv":self._getMovie().fl_setVideo_m4v(media[format]);break};self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false}});if(this.options.preload==='auto'){this._flash_load();this.status.waitForLoad=false}}catch(err){this._flashError(err)}},_flash_clearMedia:function(){this.internal.flash.jq.css({width:'0px',height:'0px'});try{this._getMovie().fl_clearMedia()}catch(err){this._flashError(err)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(err){this._flashError(err)};this.status.waitForLoad=false},_flash_play:function(time){try{this._getMovie().fl_play(time)}catch(err){this._flashError(err)};this.status.waitForLoad=false;this._flash_checkWaitForPlay()},_flash_pause:function(time){try{this._getMovie().fl_pause(time)}catch(err){this._flashError(err)};if(time>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(p){try{this._getMovie().fl_play_head(p)}catch(err){this._flashError(err)};if(!this.status.waitForLoad)this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;if(this.css.jq.videoPlay.length)this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(v){try{this._getMovie().fl_volume(v)}catch(err){this._flashError(err)}},_flash_mute:function(m){try{this._getMovie().fl_mute(m)}catch(err){this._flashError(err)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(version){var flashIsInstalled=false,flash;if(window.ActiveXObject){try{flash=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+version));flashIsInstalled=true}catch(e){}}else if(navigator.plugins&&navigator.mimeTypes.length>0){flash=navigator.plugins["Shockwave Flash"];if(flash){var flashVersion=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(flashVersion>=version)flashIsInstalled=true}};return flashIsInstalled},_validString:function(url){return(url&&typeof url==="string")},_limitValue:function(value,min,max){return(value<min)?min:((value>max)?max:value)},_urlNotSetError:function(context){this._error({type:$.jPlayer.error.URL_NOT_SET,context:context,message:$.jPlayer.errorMsg.URL_NOT_SET,hint:$.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(error){var errorType;if(!this.internal.ready){errorType="FLASH"}else errorType="FLASH_DISABLED";this._error({type:$.jPlayer.error[errorType],context:this.internal.flash.swf,message:$.jPlayer.errorMsg[errorType]+error.message,hint:$.jPlayer.errorHint[errorType]})},_error:function(error){this._trigger($.jPlayer.event.error,error);if(this.options.errorAlerts)this._alert("Error!"+(error.message?"\n\n"+error.message:"")+(error.hint?"\n\n"+error.hint:"")+"\n\nContext: "+error.context)},_warning:function(warning){this._trigger($.jPlayer.event.warning,undefined,warning);if(this.options.warningAlerts)this._alert("Warning!"+(warning.message?"\n\n"+warning.message:"")+(warning.hint?"\n\n"+warning.hint:"")+"\n\nContext: "+warning.context)},_alert:function(message){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+message)},_emulateHtmlBridge:function(){var self=this,methods=$.jPlayer.emulateMethods;$.each($.jPlayer.emulateMethods.split(/\s+/g),function(i,name){self.internal.domNode[name]=function(arg){self[name](arg)}});$.each($.jPlayer.event,function(eventName,eventType){var nativeEvent=true;$.each($.jPlayer.reservedEvent.split(/\s+/g),function(i,name){if(name===eventName){nativeEvent=false;return false}});if(nativeEvent)self.element.bind(eventType+".jPlayer.jPlayerHtml",function(){self._emulateHtmlUpdate();var domEvent=document.createEvent("Event");domEvent.initEvent(eventName,false,true);self.internal.domNode.dispatchEvent(domEvent)})})},_emulateHtmlUpdate:function(){var self=this;$.each($.jPlayer.emulateStatus.split(/\s+/g),function(i,name){self.internal.domNode[name]=self.status[name]});$.each($.jPlayer.emulateOptions.split(/\s+/g),function(i,name){self.internal.domNode[name]=self.options[name]})},_destroyHtmlBridge:function(){var self=this;this.element.unbind(".jPlayerHtml");var emulated=$.jPlayer.emulateMethods+" "+$.jPlayer.emulateStatus+" "+$.jPlayer.emulateOptions;$.each(emulated.split(/\s+/g),function(i,name){delete self.internal.domNode[name]})}};$.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};$.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+$.jPlayer.prototype.version.script+" needs Jplayer.swf version "+$.jPlayer.prototype.version.needFlash+" but found "};$.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};$.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};$.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};$.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery)
diff --git a/apps/media/js/player.js b/apps/media/js/player.js
index f638b86e192..f76628110a8 100644
--- a/apps/media/js/player.js
+++ b/apps/media/js/player.js
@@ -62,6 +62,7 @@ var PlayList={
}
},
cssSelectorAncestor:'#jp-interface',
+ swfPath:OC.linkTo('media','js'),
});
},
add:function(song){
diff --git a/apps/media/lib_collection.php b/apps/media/lib_collection.php
index 6e2011675ad..278e450b778 100644
--- a/apps/media/lib_collection.php
+++ b/apps/media/lib_collection.php
@@ -270,7 +270,8 @@ class OC_MEDIA_COLLECTION{
if($songId!=0){
return $songId;
}else{
- $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_songs` (`song_id` ,`song_name` ,`song_artist` ,`song_album` ,`song_path` ,`song_user`,`song_length`,`song_track`,`song_size`) VALUES (NULL , ?, ?, ?, ?,?,?,?,?)");
+ $query=OC_DB::prepare("INSERT INTO `*PREFIX*media_songs` (`song_id` ,`song_name` ,`song_artist` ,`song_album` ,`song_path` ,`song_user`,`song_length`,`song_track`,`song_size`,`song_playcount`,`song_lastplayed`)
+ VALUES (NULL , ?, ?, ?, ?,?,?,?,?,0,0)");
$query->execute(array($name,$artist,$album,$path,$uid,$length,$track,$size));
$songId=OC_DB::insertid();
// self::setLastUpdated();
@@ -346,6 +347,31 @@ class OC_MEDIA_COLLECTION{
$query=OC_DB::prepare("DELETE FROM *PREFIX*media_songs WHERE song_path LIKE ?");
$query->execute(array("$path%"));
}
+
+ /**
+ * increase the play count of a song
+ * @param int songId
+ */
+ public static function registerPlay($songId){
+ $now=time();
+ $query=OC_DB::prepare('UPDATE *PREFIX*media_songs SET song_playcount=song_playcount+1, song_lastplayed=? WHERE song_id=? AND song_lastplayed<?');
+ $query->execute(array($now,$songId,$now-60));
+ }
+
+ /**
+ * get the id of the song by path
+ * @param string $path
+ * @return int
+ */
+ public static function getSongByPath($path){
+ $query=OC_DB::prepare("SELECT song_id FROM *PREFIX*media_songs WHERE song_path = ?");
+ $result=$query->execute(array($path))->fetchAll();
+ if(count($result)>0){
+ return $result[0]['song_id'];
+ }else{
+ return 0;
+ }
+ }
}
?> \ No newline at end of file
diff --git a/apps/media/lib_scanner.php b/apps/media/lib_scanner.php
index aa0ca94a43d..6ad04e7a1be 100644
--- a/apps/media/lib_scanner.php
+++ b/apps/media/lib_scanner.php
@@ -68,40 +68,79 @@ class OC_MEDIA_SCANNER{
* @return boolean
*/
public static function scanFile($path){
- if(!self::$getID3){
- self::$getID3=@new getID3();
- }
$file=OC_FILESYSTEM::getLocalFile($path);
- $data=@self::$getID3->analyze($file);
- getid3_lib::CopyTagsToComments($data);
- if(!isset($data['comments'])){
- error_log("error reading id3 tags in '$file'");
- return;
- }
- if(!isset($data['comments']['artist'])){
- error_log("error reading artist tag in '$file'");
- $artist='unknown';
- }else{
- $artist=stripslashes($data['comments']['artist'][0]);
- $artist=utf8_encode($artist);
- }
- if(!isset($data['comments']['album'])){
- error_log("error reading album tag in '$file'");
- $album='unknown';
- }else{
- $album=stripslashes($data['comments']['album'][0]);
- $album=utf8_encode($album);
- }
- if(!isset($data['comments']['title'])){
- error_log("error reading title tag in '$file'");
+ if(substr($path,-3)=='mp3' and OC_HELPER::canExecute("id3info") and OC_HELPER::canExecute("mp3info")){//use the command line tool id3info if possible
+ $output=array();
+ $size=filesize($file);
+ $length=0;
$title='unknown';
+ $album='unknown';
+ $artist='unknown';
+ $track=0;
+ exec('id3info "'.$file.'"',$output);
+ $data=array();
+ foreach($output as $line) {
+ switch(substr($line,0,3)){
+ case '***'://comments
+ break;
+ case '==='://tag information
+ $key=substr($line,4,4);
+ $value=substr($line,strpos($line,':')+2);
+ switch(strtolower($key)){
+ case 'tit1':
+ case 'tit2':
+ $title=$value;
+ break;
+ case 'tpe1':
+ case 'tpe2':
+ $artist=$value;
+ break;
+ case 'talb':
+ $album=$value;
+ break;
+ case 'trck':
+ $track=$value;
+ break;
+ }
+ break;
+ }
+ }
+ $length=exec('mp3info -p "%S" "'.$file.'"');
}else{
- $title=stripslashes($data['comments']['title'][0]);
- $title=utf8_encode($title);
+ if(!self::$getID3){
+ self::$getID3=@new getID3();
+ }
+ $data=@self::$getID3->analyze($file);
+ getid3_lib::CopyTagsToComments($data);
+ if(!isset($data['comments'])){
+ error_log("error reading id3 tags in '$file'");
+ return;
+ }
+ if(!isset($data['comments']['artist'])){
+ error_log("error reading artist tag in '$file'");
+ $artist='unknown';
+ }else{
+ $artist=stripslashes($data['comments']['artist'][0]);
+ $artist=utf8_encode($artist);
+ }
+ if(!isset($data['comments']['album'])){
+ error_log("error reading album tag in '$file'");
+ $album='unknown';
+ }else{
+ $album=stripslashes($data['comments']['album'][0]);
+ $album=utf8_encode($album);
+ }
+ if(!isset($data['comments']['title'])){
+ error_log("error reading title tag in '$file'");
+ $title='unknown';
+ }else{
+ $title=stripslashes($data['comments']['title'][0]);
+ $title=utf8_encode($title);
+ }
+ $size=$data['filesize'];
+ $track=(isset($data['comments']['track']))?$data['comments']['track'][0]:0;
+ $length=isset($data['playtime_seconds'])?round($data['playtime_seconds']):0;
}
- $size=$data['filesize'];
- $track=(isset($data['comments']['track']))?$data['comments']['track'][0]:0;
- $length=round($data['playtime_seconds']);
if(!isset(self::$artists[$artist])){
$artistId=OC_MEDIA_COLLECTION::addArtist($artist);
self::$artists[$artist]=$artistId;
diff --git a/apps/media/templates/player.php b/apps/media/templates/player.php
index abba806510e..b307f984734 100644
--- a/apps/media/templates/player.php
+++ b/apps/media/templates/player.php
@@ -17,7 +17,6 @@
<div class="jp-volume-bar-value"></div>
</div>
<div class="jp-current-time"></div>
- <div class="jp-current-time"></div>
<div class="jp-duration"></div>
- <div class='player'></div>
+ <div class='player' id='jp-player'></div>
</div> \ No newline at end of file
diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php
index f35e6811b84..5726ca99948 100644
--- a/apps/user_openid/phpmyid.php
+++ b/apps/user_openid/phpmyid.php
@@ -326,27 +326,27 @@ function checkid ( $wait ) {
user_session();
// Get the options, use defaults as necessary
- $return_to = @strlen($_REQUEST['openid_return_to'])
+ $return_to = isset($_REQUEST['openid_return_to'])
? $_REQUEST['openid_return_to']
- : error_400('Missing return1_to');
+ : error_400('Missing return_to');
- $identity = @strlen($_REQUEST['openid_identity'])
+ $identity = isset($_REQUEST['openid_identity'])
? $_REQUEST['openid_identity']
: error_get($return_to, 'Missing identity');
- $assoc_handle = @strlen($_REQUEST['openid_assoc_handle'])
+ $assoc_handle = isset($_REQUEST['openid_assoc_handle'])
? $_REQUEST['openid_assoc_handle']
: null;
- $trust_root = @strlen($_REQUEST['openid_trust_root'])
+ $trust_root = isset($_REQUEST['openid_trust_root'])
? $_REQUEST['openid_trust_root']
: $return_to;
- $sreg_required = @strlen($_REQUEST['openid_sreg_required'])
+ $sreg_required = isset($_REQUEST['openid_sreg_required'])
? $_REQUEST['openid_sreg.required']
: '';
- $sreg_optional = @strlen($_REQUEST['openid_sreg_optional'])
+ $sreg_optional = isset($_REQUEST['openid_sreg_optional'])
? $_REQUEST['openid_sreg.optional']
: '';
diff --git a/core/css/styles.css b/core/css/styles.css
index f9b536a2b04..00433979d24 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -1,11 +1,15 @@
-* { margin:0; padding:0; border:0; }
+* { margin:0; padding:0; border:0; cursor:default; }
body { background:#fefefe url('../img/body_background.jpg') repeat-y left top; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana, sans-serif; color:#000; }
-#header { position:fixed; top:0; z-index:100; width:100%; height:5.5em; padding:0.5em 1.5em; background:url('../img/header-a.png') repeat-x left top; }
-#body-settings #header { background-image:url('../img/header-settings-a.png'); }
-#owncloud { float:left; margin:0 0 0 2em; }
+#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; }
+#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; }
p.center { text-align:center; }
-a { color:#000; text-decoration:none; }
+a { color:#000; text-decoration:none; outline:0; }
+table { white-space:nowrap; }
+input, select { background:#fff; color:#333; }
+a, a img, a strong, a span, input, button, select, li { cursor:pointer; }
+input[type="text"], input[type="password"] { cursor:text; }
form#user_settings { max-width:600px; }
form#user_settings p label { display:block; float:left; width:35%; padding:0.4em 0.5em 0 0; text-align:right; }
@@ -16,252 +20,79 @@ form input { padding:0.2em; border:1px solid #ddd; font-size:1.2em; }
form input[type="submit"] { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; }
form input[type="submit"]:hover, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; outline:0; }
form input[type="submit"]:active { outline:0; }
-form input[type="button"], form input[type="text"] { font-size: 0.9em; }
+form input[type="button"], form input[type="text"] { font-size:0.9em; }
fieldset { padding:1em; background-color:#f7f7f7; border:1px solid #ddd; max-width:600px; margin:2em 2em 2em 3em; }
-legend { padding: 0.5em; font-size:1.2em; }
+legend { padding:0.5em; font-size:1.2em; }
-div.controls { width:91%; margin:1em 1em 1em 2em; padding:0.5em 0; background-color:#f7f7f7; border:1px solid #eee; }
+div.controls { width:100%; margin:0px; background-color:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:2; }
/* LOG IN & INSTALLATION ------------------------------------------------------------ */
#body-login { width:100%; background-image:none; background-color:#ddd; }
-#body-login p.info { width:16em; margin:4em auto; padding:1em; background-color:#eee; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
-
-#login
-{
- margin: 0 auto 0 auto;
- padding: 2em 0 0 0;
- background-image: url(../img/header-login.png);
- background-position: left 0;
- background-repeat: repeat-x;
- background-color: #EEE;
- border-bottom: 1px solid #FFF;
- text-align: center;
-}
-
-#login_form
-{
- width: 20em;
- margin: 4em auto;
- padding: 0;
-}
-
-#login_form fieldset
-{
- background-color: transparent;
- border: 0;
-}
-
-#login_form fieldset p
-{
- margin: 0.5em 0 0 0;
- padding: 0;
- text-align: left;
-}
-
-#login_form fieldset p.submit
-{
- margin: 2em 0 0 0;
- padding: 1em 0 0 0;
- border-top: 1px solid #DDD;
- text-align: right;
-}
-
-#login_form label
-{
- font-size: 1em;
- color: #666;
-}
-
-#login_form input
-{
- width: 100%;
- margin: 0 0 0.5em 0;
- padding: 0.5em;
- border: 1px solid #DDD;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
- border-radius: 15px;
- font-size: 1.5em;
- color: #333;
- text-align: center;
-}
-
-#login_form input[type=submit]
-{
- width: auto;
- margin: 1em 0 0 0.5em;
- text-align: center;
- border: 1px solid #DDD;
- background-color: #FFF;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
- border-radius: 15px;
- font-size: 1.5em
-}
-
-#login_form input[type=submit]:hover
-{
- border: 1px solid #666;
- background-color: #666;
- color: #FFF;
-}
-#login_form input[type="checkbox"]
-{
- width:15px;
-}
-
-#setup_form {
- margin: 3em auto;
- text-align: left;
- width: 720px;
-}
-
-#setup_form #use_mysql {
- font-size: 0.9em;
- margin: 0 0 0 1em;
-}
-
-#setup_form p.intro {
- color: #666;
- font-size: 1.3em;
- margin: 4em 0 3em 0;
- padding: 0;
- text-align: center;
-}
-
-#setup_form ul.errors {
- background-image: url(images/no.png);
- background-position: 1em 1em;
- background-repeat: no-repeat;
- background-color: #FED7D7;
- border: 1px solid #F00;
- font-size: 1.2em;
- list-style-indent: inside;
- margin: 0 0 4em 0;
- padding: 1em 1em 1em 5em;
-}
-
-#setup_form fieldset {
- margin: 0 0 3em 0;
-}
-
-#setup_form p {
- line-height: 1.8em;
-}
-
-#setup_form legend {
- font-weight: normal;
-}
-
-#setup_form label {
- cursor: pointer;
- display: block;
- float: left;
- margin: 0 0 0.2em 0;
- text-align: right;
- width: 40%;
-}
-
+#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 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+ */
+background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#35537a), color-stop(100%,#1d2d42)); /* Chrome,Safari4+ */
+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+ */
+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; }
+#login_form fieldset p { margin:0.5em 0 0 0; padding:0; text-align:left; }
+#login_form fieldset p.submit { margin:2em 0 0 0; padding:1em 0 0 0; border-top:1px solid #DDD; text-align:right; }
+#login_form label { font-size:1em; color:#666; }
+#login_form input { width:100%; margin:0 0 0.5em 0; padding:0.5em; border:1px solid #DDD; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:1.5em; color:#333; text-align:center; }
+#login_form input[type=submit] { width:auto; margin:1em 0 0 0.5em; text-align:center; border:1px solid #DDD; background-color:#FFF; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:1.5em }
+#login_form input[type=submit]:hover { border:1px solid #666; background-color:#666; color:#FFF; }
+#login_form input[type="checkbox"] { width:15px; }
+#setup_form { margin:3em auto; text-align:left; width:720px; }
+#setup_form #use_mysql { font-size:0.9em; margin:0 0 0 1em; }
+#setup_form p.intro { color:#666; font-size:1.3em; margin:4em 0 3em 0; padding:0; text-align:center; }
+#setup_form ul.errors { background-image:url(images/no.png); background-position:1em 1em; background-repeat:no-repeat; background-color:#FED7D7; border:1px solid #F00; font-size:1.2em; list-style-indent:inside; margin:0 0 4em 0; padding:1em 1em 1em 5em; }
+#setup_form fieldset { margin:0 0 3em 0; }
+#setup_form p { line-height:1.8em; }
+#setup_form legend { font-weight:normal; }
+#setup_form label { cursor:pointer; display:block; float:left; margin:0 0 0.2em 0; text-align:right; width:40%; }
#setup_form input[type='text'],
-#setup_form input[type='password'] {
- font-size: 1em;
- margin: 0 0 0 0.5em;
- padding: 0.3em;
-}
-
-#setup_form input[type='radio'] {
- margin: 0 0 0 1em;
-}
-
-#setup_form input[type='submit'] {
- background-color: #DDD;
- border: 1px solid #999;
- color: #666;
- font-size: 1.2em;
-}
-
-#setup_form input[type='submit']:hover {
- border-color: #000;
- color: #000;
-}
-
-#setup_form p.submit {
- padding: 0 0 1em 0;
- text-align: center;
-}
-
+#setup_form input[type='password'] { font-size:1em; margin:0 0 0 0.5em; padding:0.3em; }
+#setup_form input[type='radio'] { margin:0 0 0 1em; }
+#setup_form input[type='submit'] { background-color:#DDD; border:1px solid #999; color:#666; font-size:1.2em; }
+#setup_form input[type='submit']:hover { border-color:#000; color:#000; }
+#setup_form p.submit { padding:0 0 1em 0; text-align:center; }
.prettybutton { margin:0.1em; padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:1.5em; text-decoration:none; color:#666; background-color:#fff; }
.prettybutton:hover, .prettybutton:focus { background-color:#ccc; outline:0; }
/* META NAVIGATION (Settings, Log out) ---------------------------------------------------------------- */
-#metanav { float:right; position:relative; top:1.5em; right:2.5em; list-style:none; margin:0; padding:0; }
+#metanav { float:right; position:relative; top:0.5em; right:2.5em; list-style:none; margin:0; padding:0; }
#metanav li { display:inline; }
-#metanav li a { margin:.1em; padding:1em; }
-#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; outline:0; box-shadow:#555 0 1px 0; -moz-box-shadow:#555 0 1px 0; -webkit-box-shadow:#555 0 1px 0; }
+#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; }
#metanav li a img { vertical-align:middle; }
/* SEARCH --------------------------------------------------------------------- */
-form.searchbox { display:inline; position:fixed; top:2em; right:10em; margin:0; padding:0; }
+form.searchbox { display:inline; position:fixed; top:.9em; right:9em; margin:0; padding: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:7em; float:left; width:15.7em; padding:0; }
+#plugins { position:fixed; top:3.5em; float:left; width:15.7em; padding:0; z-index:50; }
#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; 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:7em 0 0 16em; }
-table { margin:1em 5em 2em 3em; }
-table tr.mouseOver td { background-color:#eee; }
-table th, table td { padding:0; border-bottom:1px solid #ddd; text-align:left; font-style:italic; }
-table th { padding:0.5em; }
-table td { border-bottom:1px solid #eee; font-style:normal; }
-table td.filesize, table td.date { width:5em; padding:0.5em 1em; text-align:right; }
-table td.date { width:11em; }
-table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; }
-table td.filename a { display:block; background-image:url('../img/file.png'); text-decoration:none; }
-table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; }
-table td.filename a:hover, table td.filename a:focus { outline:0; }
-table td.filename a:active { outline:0; }
-table em { font-weight:bold; }
-table td.filename a.folder-up { background-image:url('../img/back.png'); font-style:italic; }
-table td.filename a.folder { background-image:url('../img/folder.png'); }
-table td.filename a.folder-home { background-image:url('../img/home.png'); }
-table td.filename a.folder-music { background-image:url('../img/folder-music.png'); }
-table td.filename a.folder-videos { background-image:url('../img/folder-video.png'); }
-table td.filename a.folder-shared { background-image:url('../img/folder-shared.png'); }
-table td.filename a.folder-images { background-image:url('../img/folder-image.png'); }
-table td.filename a.file-txt { background-image:url('../img/file-txt.png'); }
-table td.filename a.file-python { background-image:url('../img/file-python.png'); }
-table td.filename a.file-php { background-image:url('../img/file.png'); }
-table td.login { background-image:url('../img/login.png'); }
-table td.logout { background-image:url('../img/logout.png'); }
-table td.download { background-image:url('../img/download.png'); }
-table td.upload { background-image:url('../img/upload.png'); }
-table td.create { background-image:url('../img/folder-new.png'); }
-table td.delete { background-image:url('../img/delete.png'); }
-#fileList tr input[type=checkbox] { display:none; }
-#fileList tr input[type=checkbox]:checked { display:inline; }
-#fileList tr:hover input[type=checkbox] { display:inline; }
-
-/* NAVIGATION BAR */
-span.nav { margin:1em 0 0 2em; padding:0.8em; line-height:16px; font-weight:bold; display:block}
-span.nav a { padding:0.5em 1.5em 0.5em 0.5em; background-position:right center; background-repeat:no-repeat; background-image:url('../img/arrow.png'); text-decoration:none; }
-span.nav a img { height:16px; vertical-align:text-top; }
-
-/* ACTIONS BAR */
-p.actions, div.actions { padding:0; }
-p.actions a, div.actions a { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; background-image:url('../img/action.png'); border-right:1px solid #eee; text-decoration:none; color:#333; }
-p.actions a:hover, p.actions a:focus, div.actions a:hover, div.actions a:focus { background-color:#eee; color:#000; outline:0; }
-p.actions a:active, div.actions a:active { outline:0; }
-p.actions a.new-dir, div.actions a.new-dir { background-image:url('../img/folder-new.png'); }
-p.actions a.download, div.actions a.download { background-image:url('../img/download.png'); }
-p.actions a.delete, div.actions a.delete { background-image:url('../img/delete.png'); }
+#content { margin:3.5em 0 0 15.7em; }
/* 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; }
@@ -279,4 +110,4 @@ p.actions a.delete, div.actions a.delete { background-image:url('../img/delete.p
#logs_options input[type="submit"] { float:right; margin:0 2em 0 0; }
#logs_options input[type="submit"].nofloat { float:none; margin:0 2em 0 0; }
#logs_options input[type="text"] { margin:0; padding:0; border:1px solid #ccc; text-align:right; }
-li.error{ list-style:none; width:640px; margin:4em auto; padding:1em 1em 1em 4em; background-color:#fee; background-image:url('../img/task-attention.png'); background-position:0.8em 0.8em; background-repeat:no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
+li.error { list-style:none; width:640px; margin:4em auto; padding:1em 1em 1em 4em; background-color:#fee; background-image:url('../img/task-attention.png'); background-position:0.8em 0.8em; background-repeat:no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
diff --git a/core/img/layout/back.png b/core/img/actions/back.png
index 86abbe0cabe..86abbe0cabe 100644
--- a/core/img/layout/back.png
+++ b/core/img/actions/back.png
Binary files differ
diff --git a/core/img/actions/back.svg b/core/img/actions/back.svg
new file mode 100644
index 00000000000..2bdf50c7334
--- /dev/null
+++ b/core/img/actions/back.svg
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="22"
+ height="22"
+ id="svg2423"
+ sodipodi:version="0.32"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="steadyflow-panel.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/jancborchardt/SparkleShare/playground/ownCloud/elementaryicons/elementary-icon-theme/elementary-mono-dark/panel/22/steadyflow-panel.png"
+ inkscape:export-xdpi="205.86"
+ inkscape:export-ydpi="205.86">
+ <metadata
+ id="metadata12">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ inkscape:window-height="776"
+ inkscape:window-width="1280"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="false"
+ inkscape:zoom="18.409653"
+ inkscape:cx="3.1144877"
+ inkscape:cy="10.453039"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:current-layer="svg2423"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2989"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <defs
+ id="defs2425">
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3678"
+ id="linearGradient3805"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,0.51263812,0.51263812,0,0.912685,4.921543)"
+ x1="0.98925388"
+ y1="20.108774"
+ x2="26.631666"
+ y2="20.093433" />
+ <linearGradient
+ id="linearGradient3678">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3680" />
+ <stop
+ style="stop-color:#e6e6e6;stop-opacity:1;"
+ offset="1"
+ id="stop3682" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(-0.4100229,0,0,0.5447147,78.029995,-3.8459034)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3678"
+ id="linearGradient2388-7"
+ y2="38.279892"
+ x2="159.68553"
+ y1="14.403693"
+ x1="159.68553" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3678"
+ id="linearGradient3793"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.4100229,0,0,0.5447147,47.235507,-11.911988)"
+ x1="159.68553"
+ y1="14.403693"
+ x2="159.68553"
+ y2="38.279892" />
+ </defs>
+ <path
+ inkscape:connector-curvature="0"
+ d="m 11.5,19.5 -8,-7 8,-7 0,4 7,0 0,6 -7,0 z"
+ id="path4348-1-1"
+ style="opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:nodetypes="cccccccc" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m 11.5,18.5 -8,-7 8,-7 0,4 7,0 0,6 -7,0 z"
+ id="path4348-1"
+ style="fill:url(#linearGradient3805);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:nodetypes="cccccccc" />
+</svg>
diff --git a/core/img/actions/delete.png b/core/img/actions/delete.png
new file mode 100644
index 00000000000..97f089524b2
--- /dev/null
+++ b/core/img/actions/delete.png
Binary files differ
diff --git a/core/img/actions/delete.svg b/core/img/actions/delete.svg
new file mode 100644
index 00000000000..e542b6fed3a
--- /dev/null
+++ b/core/img/actions/delete.svg
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg3875"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="drawing.svg">
+ <defs
+ id="defs3877" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="25.345359"
+ inkscape:cx="8.8403833"
+ inkscape:cy="8.3505321"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1280"
+ inkscape:window-height="776"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3883"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3880">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="fill:#808080;fill-opacity:1;stroke:none"
+ d="m 3,1040.3622 1,-1 4,3 4,-3 1,1 -3,4 3,4 -1,1 -4,-3 -4,3 -1,-1 3,-4 z"
+ id="path3086"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccc" />
+ </g>
+</svg>
diff --git a/core/img/actions/download.png b/core/img/actions/download.png
new file mode 100644
index 00000000000..783ad448449
--- /dev/null
+++ b/core/img/actions/download.png
Binary files differ
diff --git a/core/img/actions/download.svg b/core/img/actions/download.svg
new file mode 100644
index 00000000000..67277b87e3e
--- /dev/null
+++ b/core/img/actions/download.svg
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg3875"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="drawing.svg"
+ inkscape:export-filename="/home/jancborchardt/delete.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs3877" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="8.9609375"
+ inkscape:cx="4.5772403"
+ inkscape:cy="10.15018"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1280"
+ inkscape:window-height="776"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3883"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3880">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="fill:#808080;fill-opacity:1;stroke:none"
+ d="m 6,1037.3622 4,0 1,7 4,0 -7,7 -7,-7 4,0 z"
+ id="path3086"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccc" />
+ </g>
+</svg>
diff --git a/core/img/layout/logout.png b/core/img/actions/logout.png
index 74dcd33bee7..74dcd33bee7 100644
--- a/core/img/layout/logout.png
+++ b/core/img/actions/logout.png
Binary files differ
diff --git a/core/img/actions/logout.svg b/core/img/actions/logout.svg
new file mode 100644
index 00000000000..d95ac959778
--- /dev/null
+++ b/core/img/actions/logout.svg
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="18"
+ height="16"
+ id="svg2403"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="system-shutdown-panel2.svg">
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1280"
+ inkscape:window-height="776"
+ id="namedview3047"
+ showgrid="false"
+ inkscape:zoom="17.875"
+ inkscape:cx="9"
+ inkscape:cy="8"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2403" />
+ <metadata
+ id="metadata15">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs2405">
+ <linearGradient
+ x1="11.644068"
+ y1="2.4988678"
+ x2="11.644068"
+ y2="15.00281"
+ id="linearGradient2392"
+ xlink:href="#linearGradient3678"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(1.0000001,1.1920928e-8)" />
+ <linearGradient
+ x1="8.4964771"
+ y1="-0.061573759"
+ x2="8.4964771"
+ y2="8.083209"
+ id="linearGradient2395"
+ xlink:href="#linearGradient3678"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0526316,0,0,0.9843625,0.5789474,0.06024281)" />
+ <linearGradient
+ id="linearGradient3678">
+ <stop
+ id="stop3680"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3682"
+ style="stop-color:#e6e6e6;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ </defs>
+ <path
+ d="M 5.8427514,4.45 C 0.60889,7.192151 2.9756281,15.05 8.959192,15.05 c 5.921233,0 8.575036,-7.449605 3.11644,-10.6 M 9,8 9,1.9996319"
+ id="path3341-5"
+ style="opacity:0.5;fill:none;stroke:#000000;stroke-width:1.89999998;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="M 9,7 9,0.99963191"
+ id="path3716"
+ style="fill:none;stroke:url(#linearGradient2395);stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="M 5.8427514,3.45 C 0.60889,6.1921513 2.9756281,14.05 8.959192,14.05 c 5.921233,0 8.575036,-7.4496051 3.11644,-10.6"
+ id="path3341"
+ style="fill:none;stroke:url(#linearGradient2392);stroke-width:1.89999998;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+</svg>
diff --git a/core/img/actions/rename.png b/core/img/actions/rename.png
new file mode 100644
index 00000000000..9a86919df5a
--- /dev/null
+++ b/core/img/actions/rename.png
Binary files differ
diff --git a/core/img/actions/rename.svg b/core/img/actions/rename.svg
new file mode 100644
index 00000000000..adda394ddf9
--- /dev/null
+++ b/core/img/actions/rename.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg3875"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="drawing.svg"
+ inkscape:export-filename="/home/jancborchardt/rename.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs3877" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="25.345359"
+ inkscape:cx="10.704484"
+ inkscape:cy="9.4345147"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1280"
+ inkscape:window-height="776"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3883"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata3880">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="fill:#808080;fill-opacity:1;stroke:none"
+ d="m 10,3 -7,7 -2,5 5,-2 7,-7 z m -6.5,7.5 2,2 L 3,14 2,13 z"
+ transform="translate(0,1036.3622)"
+ id="path3086"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccc" />
+ <path
+ style="fill:#808080;fill-opacity:1;stroke:none"
+ d="m 14,1041.3622 -3,-3 c 2,-2 5,1 3,3 z"
+ id="path3086-3"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+</svg>
diff --git a/core/img/actions/search.png b/core/img/actions/search.png
new file mode 100644
index 00000000000..bfedb80bb57
--- /dev/null
+++ b/core/img/actions/search.png
Binary files differ
diff --git a/core/img/layout/settings.png b/core/img/actions/settings.png
index ff650ecb0b0..ff650ecb0b0 100644
--- a/core/img/layout/settings.png
+++ b/core/img/actions/settings.png
Binary files differ
diff --git a/core/img/actions/settings.svg b/core/img/actions/settings.svg
new file mode 100644
index 00000000000..67473520af6
--- /dev/null
+++ b/core/img/actions/settings.svg
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="16"
+ height="16"
+ id="svg2457"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="bonobo-component-browser.svg"
+ inkscape:export-filename="/home/jancborchardt/SparkleShare/playground/ownCloud/elementaryicons/elementary-icon-theme/elementary/actions/16/bonobo-component-browser.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <metadata
+ id="metadata23">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1280"
+ inkscape:window-height="776"
+ id="namedview21"
+ showgrid="false"
+ inkscape:zoom="17.875"
+ inkscape:cx="-2.3776224"
+ inkscape:cy="1.2867133"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2457" />
+ <defs
+ id="defs2459">
+ <linearGradient
+ id="linearGradient5128">
+ <stop
+ id="stop5130"
+ style="stop-color:#e5e5e5;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop5132"
+ style="stop-color:#ababab;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="86.132919"
+ y1="105.105"
+ x2="84.63858"
+ y2="20.895"
+ id="linearGradient3260"
+ xlink:href="#linearGradient5128"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(9.6142312e-2,0,0,9.6142312e-2,1.8468935,1.9430362)" />
+ <linearGradient
+ id="linearGradient3397">
+ <stop
+ id="stop3399"
+ style="stop-color:#aaaaaa;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3401"
+ style="stop-color:#8c8c8c;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="21"
+ y1="0"
+ x2="21"
+ y2="16.004715"
+ id="linearGradient3264"
+ xlink:href="#linearGradient3397"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-17.058189,0)" />
+ <linearGradient
+ x1="63.9995"
+ y1="3.1001"
+ x2="63.9995"
+ y2="122.8994"
+ id="linearGradient3309"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ id="stop3311"
+ style="stop-color:#f6f6f6;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3313"
+ style="stop-color:#cccccc;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="25"
+ y1="0"
+ x2="25"
+ y2="16.000105"
+ id="linearGradient3262"
+ xlink:href="#linearGradient3309"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-17.058189,0)" />
+ <linearGradient
+ id="linearGradient3678">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3680" />
+ <stop
+ style="stop-color:#e6e6e6;stop-opacity:1;"
+ offset="1"
+ id="stop3682" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3309-5"
+ id="linearGradient3066-2"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-17.058189,0)"
+ x1="25"
+ y1="0"
+ x2="25"
+ y2="16.000105" />
+ <linearGradient
+ x1="63.9995"
+ y1="3.1001"
+ x2="63.9995"
+ y2="122.8994"
+ id="linearGradient3309-5"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ id="stop3311-3"
+ style="stop-color:#f6f6f6;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3313-3"
+ style="stop-color:#cccccc;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3678"
+ id="linearGradient3920"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-17.058189,-0.444)"
+ x1="25"
+ y1="0"
+ x2="25"
+ y2="16.000105" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3678-0"
+ id="linearGradient3920-6"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-17.058189,-0.444)"
+ x1="25"
+ y1="0"
+ x2="25"
+ y2="16.000105" />
+ <linearGradient
+ id="linearGradient3678-0">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3680-5" />
+ <stop
+ style="stop-color:#e6e6e6;stop-opacity:1;"
+ offset="1"
+ id="stop3682-7" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3678"
+ id="linearGradient3959"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-17.058189,-0.444)"
+ x1="25"
+ y1="0"
+ x2="25"
+ y2="16.000105" />
+ </defs>
+ <g
+ transform="translate(0.027972,0.944)"
+ id="g2479-3"
+ style="opacity:0.5;fill:#000000;fill-opacity:1">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
+ id="path2426-2"
+ d="M 6.9375,0.056 C 6.6890831,0.056 6.5,0.245082 6.5,0.4935 l 0,1.25 C 5.9460971,1.885701 5.448836,2.115378 4.96875,2.39975 L 4.0625,1.4935 c -0.1756569,-0.175658 -0.449342,-0.175658 -0.625,0 l -1.5,1.5 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 L 2.84375,4.52475 C 2.5593789,5.004836 2.329701,5.502097 2.1875,6.056 l -1.25,0 C 0.68908301,6.056 0.5,6.245082 0.5,6.4935 l 0,2.125 c 1e-8,0.248418 0.189083,0.4375 0.4375,0.4375 l 1.25,0 c 0.1422009,0.553903 0.371879,1.051164 0.65625,1.53125 L 1.9375,11.4935 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 l 1.5,1.5 c 0.1756579,0.175658 0.449342,0.175658 0.625,0 L 4.96875,12.71225 C 5.4488361,12.996622 5.946097,13.2263 6.5,13.3685 l 0,1.25 c 1e-7,0.248418 0.189083,0.4375 0.4375,0.4375 l 2.125,0 C 9.3109176,15.056 9.5,14.866918 9.5,14.6185 l 0,-1.25 c 0.553903,-0.1422 1.051164,-0.371878 1.53125,-0.65625 l 0.90625,0.90625 c 0.175658,0.175658 0.449342,0.175658 0.625,0 l 1.5,-1.5 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 L 13.15625,10.58725 C 13.440622,10.107164 13.6703,9.609903 13.8125,9.056 l 1.25,0 C 15.310918,9.056 15.5,8.866917 15.5,8.6185 l 0,-2.125 C 15.5,6.245082 15.310917,6.056 15.0625,6.056 l -1.25,0 C 13.6703,5.502097 13.440622,5.004836 13.15625,4.52475 L 14.0625,3.6185 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 l -1.5,-1.5 c -0.175658,-0.175658 -0.449342,-0.175658 -0.625,0 L 11.03125,2.39975 C 10.551164,2.115378 10.053903,1.885701 9.5,1.7435 l 0,-1.25 C 9.4999996,0.245082 9.310918,0.056 9.0625,0.056 z M 8,4.2133427 c 1.8451469,0 3.342657,1.4975104 3.342657,3.3426573 0,1.8451469 -1.4975101,3.342657 -3.342657,3.342657 C 6.1548531,10.898657 4.6573427,9.4011469 4.6573427,7.556 4.6573427,5.7108531 6.1548531,4.2133427 8,4.2133427 z"
+ sodipodi:nodetypes="ssccssssccssssccssssccssssccssssccssssccssssccssssssss" />
+ </g>
+ <g
+ id="g2479"
+ transform="translate(0,-0.056)">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient3959);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
+ id="path2426"
+ d="M 6.9375,0.056 C 6.6890831,0.056 6.5,0.245082 6.5,0.4935 l 0,1.25 C 5.9460971,1.885701 5.448836,2.115378 4.96875,2.39975 L 4.0625,1.4935 c -0.1756569,-0.175658 -0.449342,-0.175658 -0.625,0 l -1.5,1.5 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 L 2.84375,4.52475 C 2.5593789,5.004836 2.329701,5.502097 2.1875,6.056 l -1.25,0 C 0.68908301,6.056 0.5,6.245082 0.5,6.4935 l 0,2.125 c 1e-8,0.248418 0.189083,0.4375 0.4375,0.4375 l 1.25,0 c 0.1422009,0.553903 0.371879,1.051164 0.65625,1.53125 L 1.9375,11.4935 c -0.175657,0.175658 -0.175657,0.449342 0,0.625 l 1.5,1.5 c 0.1756579,0.175658 0.449342,0.175658 0.625,0 L 4.96875,12.71225 C 5.4488361,12.996622 5.946097,13.2263 6.5,13.3685 l 0,1.25 c 1e-7,0.248418 0.189083,0.4375 0.4375,0.4375 l 2.125,0 C 9.3109176,15.056 9.5,14.866918 9.5,14.6185 l 0,-1.25 c 0.553903,-0.1422 1.051164,-0.371878 1.53125,-0.65625 l 0.90625,0.90625 c 0.175658,0.175658 0.449342,0.175658 0.625,0 l 1.5,-1.5 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 L 13.15625,10.58725 C 13.440622,10.107164 13.6703,9.609903 13.8125,9.056 l 1.25,0 C 15.310918,9.056 15.5,8.866917 15.5,8.6185 l 0,-2.125 C 15.5,6.245082 15.310917,6.056 15.0625,6.056 l -1.25,0 C 13.6703,5.502097 13.440622,5.004836 13.15625,4.52475 L 14.0625,3.6185 c 0.175658,-0.175658 0.175658,-0.449342 0,-0.625 l -1.5,-1.5 c -0.175658,-0.175658 -0.449342,-0.175658 -0.625,0 L 11.03125,2.39975 C 10.551164,2.115378 10.053903,1.885701 9.5,1.7435 l 0,-1.25 C 9.4999996,0.245082 9.310918,0.056 9.0625,0.056 z M 8,4.2133427 c 1.8451469,0 3.342657,1.4975104 3.342657,3.3426573 0,1.8451469 -1.4975101,3.342657 -3.342657,3.342657 C 6.1548531,10.898657 4.6573427,9.4011469 4.6573427,7.556 4.6573427,5.7108531 6.1548531,4.2133427 8,4.2133427 z"
+ sodipodi:nodetypes="ssccssssccssssccssssccssssccssssccssssccssssccssssssss" />
+ </g>
+</svg>
diff --git a/core/img/actions/share.png b/core/img/actions/share.png
new file mode 100644
index 00000000000..300ce57544d
--- /dev/null
+++ b/core/img/actions/share.png
Binary files differ
diff --git a/core/img/actions/share.svg b/core/img/actions/share.svg
new file mode 100644
index 00000000000..7812971e387
--- /dev/null
+++ b/core/img/actions/share.svg
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="New document 1">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="3.959798"
+ inkscape:cx="32.116036"
+ inkscape:cy="-10.661938"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1280"
+ inkscape:window-height="776"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2985"
+ empspacing="8"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ dotted="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="fill:#808080;fill-opacity:1;overflow:visible"
+ d="m 12.227825,1037.3622 c -1.356528,0 -2.45919,1.0977 -2.45919,2.4542 0,0.075 0.0084,0.1504 0.0149,0.2236 l -4.734564,2.4145 c -0.429101,-0.3667 -0.986112,-0.5863 -1.594748,-0.5863 -1.356527,0 -2.454223,1.0977 -2.454223,2.4543 0,1.3565 1.097696,2.4542 2.454223,2.4542 0.546067,0 1.052763,-0.1755 1.46061,-0.477 l 4.863734,2.4741 c -0.0024,0.044 -0.0099,0.089 -0.0099,0.1342 0,1.3565 1.102663,2.4542 2.45919,2.4542 1.356527,0 2.454223,-1.0977 2.454223,-2.4542 0,-1.3565 -1.097696,-2.4592 -2.454223,-2.4592 -0.636532,0 -1.218019,0.2437 -1.654365,0.6409 L 5.878678,1044.7 c 0.01892,-0.1228 0.03478,-0.2494 0.03478,-0.3775 0,-0.072 -0.0089,-0.1437 -0.0149,-0.2137 l 4.73953,-2.4145 c 0.428025,0.3627 0.984876,0.5813 1.58978,0.5813 1.356527,0 2.454223,-1.1027 2.454223,-2.4592 0,-1.3565 -1.097696,-2.4542 -2.454223,-2.4542 z"
+ id="circle54"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/core/img/breadcrumb-divider-start.png b/core/img/breadcrumb-divider-start.png
new file mode 100644
index 00000000000..24d1eb40857
--- /dev/null
+++ b/core/img/breadcrumb-divider-start.png
Binary files differ
diff --git a/core/img/breadcrumb-divider.png b/core/img/breadcrumb-divider.png
new file mode 100644
index 00000000000..52742e37238
--- /dev/null
+++ b/core/img/breadcrumb-divider.png
Binary files differ
diff --git a/core/img/drop-arrow.png b/core/img/drop-arrow.png
deleted file mode 100644
index 315395d5d42..00000000000
--- a/core/img/drop-arrow.png
+++ /dev/null
Binary files differ
diff --git a/core/img/header-a.png b/core/img/header-a.png
deleted file mode 100644
index 46fb0977ee2..00000000000
--- a/core/img/header-a.png
+++ /dev/null
Binary files differ
diff --git a/core/img/header-login.png b/core/img/header-login.png
deleted file mode 100644
index b0160e02d1f..00000000000
--- a/core/img/header-login.png
+++ /dev/null
Binary files differ
diff --git a/core/img/header-settings-a.png b/core/img/header-settings-a.png
deleted file mode 100644
index a72271be6a4..00000000000
--- a/core/img/header-settings-a.png
+++ /dev/null
Binary files differ
diff --git a/core/img/header-settings.png b/core/img/header-settings.png
deleted file mode 100644
index 7e6b70b5903..00000000000
--- a/core/img/header-settings.png
+++ /dev/null
Binary files differ
diff --git a/core/img/header.png b/core/img/header.png
deleted file mode 100644
index d377f65186d..00000000000
--- a/core/img/header.png
+++ /dev/null
Binary files differ
diff --git a/core/img/mimetypes/audio.png b/core/img/mimetypes/audio.png
new file mode 100644
index 00000000000..6333b947f07
--- /dev/null
+++ b/core/img/mimetypes/audio.png
Binary files differ
diff --git a/core/img/mimetypes/image.png b/core/img/mimetypes/image.png
new file mode 100644
index 00000000000..3dda2729bc9
--- /dev/null
+++ b/core/img/mimetypes/image.png
Binary files differ
diff --git a/core/img/owncloud-logo-small-white.png b/core/img/owncloud-logo-small-white.png
index 397ddf91341..c0d8a92d833 100644
--- a/core/img/owncloud-logo-small-white.png
+++ b/core/img/owncloud-logo-small-white.png
Binary files differ
diff --git a/core/js/js.js b/core/js/js.js
index 9117f08349a..db96a1adb3e 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1,26 +1,27 @@
-var _l10ncache = {};
function t(app,text){
- if( !( app in _l10ncache )){
- $.post( oc_webroot+'/core/ajax/translations.php', {'app': app}, function(jsondata){
- _l10ncache[app] = jsondata.data;
+ if( !( app in t.cache )){
+
+ $.post( OC.filePath('core','ajax','translations.php'), {'app': app}, function(jsondata){
+ t.cache[app] = jsondata.data;
});
// Bad answer ...
- if( !( app in _l10ncache )){
- _l10ncache[app] = [];
+ if( !( app in t.cache )){
+ t.cache[app] = [];
}
}
- if( typeof( _l10ncache[app][text] ) !== 'undefined' ){
- return _l10ncache[app][text];
+ if( typeof( t.cache[app][text] ) !== 'undefined' ){
+ return t.cache[app][text];
}
else{
return text;
}
}
+t.cache={};
OC={
webroot:oc_webroot,
- coreApps:['files','admin','log','search','settings'],
+ coreApps:['files','admin','log','search','settings','core'],
linkTo:function(app,file){
return OC.filePath(app,'',file);
},
@@ -39,6 +40,9 @@ OC={
return link;
},
imagePath:function(app,file){
+ if(file.indexOf('.')==-1){//if no extention is given, use png or svg depending on browser support
+ file+=(SVGSupport())?'.svg':'.png'
+ }
return OC.filePath(app,'img',file);
},
addScript:function(app,script,ready){
@@ -55,3 +59,57 @@ OC={
$('head').append(style);
}
}
+
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function(fun /*, thisp*/) {
+ var len = this.length >>> 0;
+ if (typeof fun != "function")
+ throw new TypeError();
+
+ var res = [];
+ var thisp = arguments[1];
+ for (var i = 0; i < len; i++) {
+ if (i in this) {
+ var val = this[i]; // in case fun mutates this
+ if (fun.call(thisp, val, i, this))
+ res.push(val);
+ }
+ }
+ 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;
+ };
+}
+
+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');
+ });
+ };
+});
diff --git a/core/templates/installation.php b/core/templates/installation.php
index c3bbe692c1c..0a6dacad955 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -1,5 +1,5 @@
<div id="login">
- <img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" />
+ <header><img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" /></header>
<form action="index.php" method="post" id="setup_form">
<input type="hidden" name="install" value="true" />
<p class="intro">
diff --git a/core/templates/layout.admin.php b/core/templates/layout.admin.php
index e83cf6861bf..3aac4c98ac5 100644
--- a/core/templates/layout.admin.php
+++ b/core/templates/layout.admin.php
@@ -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('', 'layout/back.png'); ?>"></a></li>
- <li><a href="<?php echo link_to('', 'index.php?logout=true'); ?>" title="Log out"><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></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>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 2f528c9e624..8f073914a1f 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -31,23 +31,30 @@
<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('', 'layout/settings.png'); ?>"></a></li>
- <li><a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title="Log out"><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></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>
<div id="main">
+ <div id="content">
+ <?php echo $_['content']; ?>
+ </div>
<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>
+ <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>
-
- <div id="content">
- <?php echo $_['content']; ?>
- </div>
</div>
</body>
</html>
diff --git a/core/templates/login.php b/core/templates/login.php
index 19830a24993..c3095047f48 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -1,5 +1,9 @@
<div id="login">
- <img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" />
+ <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']): ?>
diff --git a/core/templates/part.searchbox.php b/core/templates/part.searchbox.php
index 19b089ef84f..efce47ecd24 100644
--- a/core/templates/part.searchbox.php
+++ b/core/templates/part.searchbox.php
@@ -1,4 +1,3 @@
<form class="searchbox" action="<?php echo $_['searchurl']?>" method="post">
- <input type="text" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" />
- <input type="submit" value="<?php echo $l->t( 'Search' ); ?>" class="prettybutton" />
+ <input type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" />
</form>
diff --git a/files/ajax/rename.php b/files/ajax/rename.php
index 65763fceb94..7554aa0dd62 100644
--- a/files/ajax/rename.php
+++ b/files/ajax/rename.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../lib/base.php');
+require_once('../../lib/base.php');
// We send json data
header( "Content-Type: application/jsonrequest" );
diff --git a/files/css/files.css b/files/css/files.css
index f4da6fae98c..50b61a488d1 100644
--- a/files/css/files.css
+++ b/files/css/files.css
@@ -1,121 +1,48 @@
/* FILE MENU */
-
-#file_menu
-{
- display: none;
- position: absolute;
- right:0px;
- background-color: #EEE;
-}
-
-#file_menu ul
-{
- list-style-type: none;
-}
-
-#file_menu li a
-{
- display: block;
- padding: 0.5em 5em 0.5em 2em;
- text-decoration: none;
-}
-
-.file_upload_form, #file_newfolder_form {
- display: inline;
- margin-left:3em;
-}
-
-#fileSelector, #file_upload_submit, #file_newfolder_submit {
- display: none;
-}
-
-.file_upload_filename, #file_newfolder_name {
- background-repeat: no-repeat;
- background-position: 0.5em 0;
- padding-left: 2em;
-}
-
-.file_upload_filename {
- background-image:url(../img/file.png); font-weight:bold;
-}
-.file_upload_start {opacity:0;filter: alpha(opacity = 0);}
-
-#file_newfolder_name {
- background-image:url(../img/folder.png); font-weight:bold;
- width: 14em;
-}
-
-.file_upload_start, .file_upload_filename{
- position:absolute;
- top:0px;
- left:0px;
- width:30ex;
- font-size: 0.9em;
-}
-
-.file_upload_wrapper{
- position:relative;
- top:-1.2em;
- left:-2em;
- display: -moz-inline-box; /* fallback for older firefox versions*/
- display: inline-block;
- width:30ex;
-}
-
-#file_newfolder_submit, #file_upload_submit {
- width: 3em;
-}
-
-.file_upload_target {
- display: none;
-}
+.actions { padding:.6em; float:right; margin-right:16em; }
+#file_menu { right:0px; position:absolute; top:0; }
+#file_menu a { display:block; float:left; background-image:none; text-decoration:none; }
+.file_upload_form, #file_newfolder_form { display:inline; }
+#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; }
+.file_upload_filename, #file_newfolder_name { background-repeat:no-repeat; background-position:0.5em 0; padding-left:2em; }
+.file_upload_filename { background-image:url("../img/file.png"); font-weight:bold; }.file_upload_start { opacity:0;filter:alpha(opacity = 0); }
+
+#file_newfolder_name { background-image:url("../img/folder.png"); font-weight:bold; width:11em; }
+.file_upload_start, .file_upload_filename { position:absolute; top:0px; left:0px; width:11em; font-size:0.9em; }
+.file_upload_wrapper { position:relative; top:-1.2em; left:-2em; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; width:12em; }
+#file_newfolder_submit, #file_upload_submit { width:3em; }
+.file_upload_target { display:none; }
/* FILE TABLE */
-
-table {
- width: 90%;
-}
-
+span#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; }
+table { position:relative; top:37px; width:100%; }
tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#eee; }
tbody a { color:#000; }
-
-table td.filesize, table td.date
-{
- width: 5em;
- padding: 0.5em 1em;
- text-align: right;
-}
-
-table td.date
-{
- width: 11em;
-}
-
-table td.selection, table th.selection, table td.fileaction
-{
- width: 2em;
- text-align: center;
-}
-
-table td.filename a
-{
- display: block;
- background-image: url(../img/file.png);
- text-decoration: none;
-}
-
-.dropArrow{
- height:16px;
- width:16px;
- display: -moz-inline-box; /* fallback for older firefox versions*/
- display: inline-block;
- background-image:url('../img/drop-arrow.png');
-}
-
-span.extention{
- color:#999;
-}
-
-div.crumb{
- float:left;
-} \ No newline at end of file
+span.extention, td.date { color:#999; }
+div.crumb { float:left; display:block; background:no-repeat right 0; font-weight:bold; padding:8px 1.5em 0 1em; height:28px; /*36-8*/ }
+table tr.mouseOver td { background-color:#eee; }
+table th { padding:.5em; height:2em; }
+table th .name { float:left; margin-left:.5em; }
+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 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 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 .nametext, .modified { float:left; padding:.3em 0; }
+table td.filename .nametext { width:80%; }
+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; }
+#fileList tr.selected td.filename a, #fileList tr:hover td.filename a { background-image:none !important }
+#select_all { float:left; margin:0.2em; margin-left:0.6em; }
+#uploadsize-message,#delete-confirm { display:none; }
+.selectedActions a, a.file_action { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
+.selectedActions { display:none; }
+.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 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; }
diff --git a/files/img/drop-arrow.png b/files/img/drop-arrow.png
deleted file mode 100644
index 315395d5d42..00000000000
--- a/files/img/drop-arrow.png
+++ /dev/null
Binary files differ
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index b683dc0cd3a..359e54dda3c 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -1,11 +1,14 @@
FileActions={
actions:{},
defaults:{},
- register:function(mime,name,action){
+ icons:{},
+ currentFile:null,
+ register:function(mime,name,icon,action){
if(!FileActions.actions[mime]){
FileActions.actions[mime]={};
}
FileActions.actions[mime][name]=action;
+ FileActions.icons[name]=icon;
},
setDefault:function(mime,name){
FileActions.defaults[mime]=name;
@@ -49,56 +52,105 @@ FileActions={
return actions[name];
},
display:function(parent){
- $('#file_menu ul').empty();
- parent.append($('#file_menu'));
+ FileActions.currentFile=parent;
var actions=FileActions.get(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
+ var file=FileActions.getCurrentFile();
+ if($('tr[data-file="'+file+'"]').data('renaming')){
+ return;
+ }
+ var defaultAction=FileActions.getDefault(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
for(name in actions){
- var html='<li><a href="" alt="'+name+'">'+name+'</a></li>';
+ if((name=='Download' || actions[name]!=defaultAction) && name!='Delete'){
+ var img=FileActions.icons[name];
+ var html='<a href="#" title="'+name+'" class="file_action"/>';
+ var element=$(html);
+ if(img){
+ element.append($('<img src="'+img+'"/>'));
+ }
+ element.data('action',name);
+ element.click(function(event){
+ event.stopPropagation();
+ event.preventDefault();
+ var action=actions[$(this).data('action')];
+ var currentFile=FileActions.getCurrentFile();
+ FileActions.hide();
+ action(currentFile);
+ });
+ parent.children('a.name').append(element);
+ }
+ }
+ if(actions['Delete']){
+ var img=FileActions.icons['Delete'];
+ var html='<a href="#" title="Delete" class="file_action"/>';
var element=$(html);
- element.data('action',name);
+ if(img){
+ element.append($('<img src="'+img+'"/>'));
+ }
+ element.data('action','Delete');
element.click(function(event){
+ event.stopPropagation();
event.preventDefault();
- $('#file_menu').slideToggle(250);
var action=actions[$(this).data('action')];
- $('#file_menu ul').empty();
- action(FileActions.getCurrentFile());
+ var currentFile=FileActions.getCurrentFile();
+ FileActions.hide();
+ action(currentFile);
});
- $('#file_menu>ul').append(element);
+ parent.parent().children().last().append(element);
}
- $('#file_menu').slideToggle(250);
return false;
},
+ hide:function(){
+ $('.file_action').remove();
+ },
getCurrentFile:function(){
- return $('#file_menu').parents('tr:first').attr('data-file');
+ return FileActions.currentFile.parent().attr('data-file');
},
getCurrentMimeType:function(){
- return $('#file_menu').parents('tr:first').attr('data-mime');
+ return FileActions.currentFile.parent().attr('data-mime');
},
getCurrentType:function(){
- return $('#file_menu').parents('tr:first').attr('data-type');
+ return FileActions.currentFile.parent().attr('data-type');
}
}
-FileActions.register('all','Download',function(filename){
+FileActions.register('all','Download',OC.imagePath('core','actions/download'),function(filename){
window.location='ajax/download.php?files='+filename+'&dir='+$('#dir').val();
});
-FileActions.register('all','Delete',function(filename){
- $.ajax({
- url: 'ajax/delete.php',
- data: "dir="+encodeURIComponent($('#dir').val())+"&file="+encodeURIComponent(filename),
- complete: function(data){
- boolOperationFinished(data, function(){
- FileList.remove(filename);
- });
+FileActions.register('all','Delete',OC.imagePath('core','actions/delete'),function(filename){
+ $( "#delete-confirm" ).dialog({
+ resizable: false,
+ height:200,
+ title:"Delete "+filename,
+ modal: true,
+ buttons: {
+ "Delete": function() {
+ $( this ).dialog( "close" );
+ $.ajax({
+ url: 'ajax/delete.php',
+ data: "dir="+encodeURIComponent($('#dir').val())+"&file="+encodeURIComponent(filename),
+ complete: function(data){
+ boolOperationFinished(data, function(){
+ FileList.remove(filename);
+ });
+ }
+ });
+ },
+ Cancel: function() {
+ $( this ).dialog( "close" );
+ }
}
});
});
+FileActions.register('all','Rename',OC.imagePath('core','actions/rename'),function(filename){
+ FileList.rename(filename);
+});
+
FileActions.setDefault('all','Download');
-FileActions.register('dir','Open',function(filename){
+FileActions.register('dir','Open','',function(filename){
window.location='index.php?dir='+$('#dir').val()+'/'+filename;
});
-FileActions.setDefault('dir','Open'); \ No newline at end of file
+FileActions.setDefault('dir','Open');
diff --git a/files/js/filelist.js b/files/js/filelist.js
index 467168df95d..c3a2522fb6a 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -4,12 +4,30 @@ FileList={
},
addFile:function(name,size,lastModified,loading){
var img=(loading)?'img/loading.gif':'img/file.png';
- var html='<tr data-file="'+name+'" data-type="file">';
- html+='<td class="selection"><input type="checkbox" /></td>';
- html+='<td class="filename"><a style="background-image:url('+img+')" href="download.php?file='+$('#dir').val()+'/'+name+'">'+name+'</a></td>';
- html+='<td class="filesize">'+size+'</td>';
- html+='<td class="date">'+lastModified+'</td>';
- html+='<td class="fileaction"><a href="" title="+" class="dropArrow"></a></td>';
+ var html='<tr data-file="'+name+'" data-type="file" data-size="'+size+'">';
+ if(name.indexOf('.')!=-1){
+ var basename=name.substr(0,name.indexOf('.'));
+ var extention=name.substr(name.indexOf('.'));
+ }else{
+ 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
+ if(extention){
+ html+='<span class="extention">'+extention+'</span>';
+ }
+ html+='</span></a></td>';
+ if(size!='Pending'){
+ simpleSize=simpleFileSize(size);
+ }else{
+ simpleSize='Pending';
+ }
+ sizeColor = Math.round(200-Math.pow((size/(1024*1024)),2));
+ lastModifiedTime=Math.round(lastModified.getTime() / 1000);
+ modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*5);
+ html+='<td class="filesize" title="'+humanFileSize(size)+'" style="color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')">'+simpleSize+'</td>';
+ html+='<td class="date" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</td>';
html+='</tr>';
FileList.insertElement(name,'file',$(html));
if(loading){
@@ -19,12 +37,18 @@ FileList={
}
},
addDir:function(name,size,lastModified){
- var html='<tr data-file="'+name+'" data-type="dir">';
- html+='<td class="selection"><input type="checkbox" /></td>';
- html+='<td class="filename"><a style="background-image:url(img/folder.png)" href="index.php?dir='+$('#dir').val()+'/'+name+'"><strong>'+name+'</strong></a></td>';
- html+='<td class="filesize">'+size+'</td>';
- html+='<td class="date">'+lastModified+'</td>';
- html+='<td class="fileaction"><a href="" title="+" class="dropArrow"></a></td>';
+ 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>';
+ if(size!='Pending'){
+ simpleSize=simpleFileSize(size);
+ }else{
+ simpleSize='Pending';
+ }
+ sizeColor = Math.round(200-Math.pow((size/(1024*1024)),2));
+ lastModifiedTime=Math.round(lastModified.getTime() / 1000);
+ modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*5);
+ html+='<td class="filesize" title="'+humanFileSize(size)+'" style="color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')">'+simpleSize+'</td>';
+ html+='<td class="date" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</td>';
html+='</tr>';
FileList.insertElement(name,'dir',$(html));
@@ -72,10 +96,52 @@ FileList={
},
loadingDone:function(name){
$('tr[data-file="'+name+'"]').data('loading',false);
- $('tr[data-file="'+name+'"] td.filename a').attr('style','background-image:url(img/file.png');
+ 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').draggable(dragOptions);
},
isLoading:function(name){
return $('tr[data-file="'+name+'"]').data('loading');
+ },
+ rename:function(name){
+ var tr=$('tr[data-file="'+name+'"]');
+ tr.data('renaming',true);
+ var td=tr.children('td.filename');
+ var input=$('<input value='+name+' class="filename"></input>');
+ var form=$('<form action="#"></form>')
+ form.append(input);
+ td.children('a.name').text('');
+ td.children('a.name').append(form)
+ input.focus();
+ form.submit(function(event){
+ 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){
+ basename=newname.substr(0,newname.indexOf('.'));
+ }else{
+ basename=newname;
+ }
+ var span=$('<span class="nametext"></span>');
+ span.text(basename);
+ td.children('a.name').append(span);
+ if(newname.indexOf('.')>0){
+ span.append($('<span class="extention">'+newname.substr(newname.indexOf('.'))+'</span>'));
+ }
+ $.ajax({
+ url: 'ajax/rename.php',
+ data: "dir="+$('#dir').val()+"&newname="+encodeURIComponent(newname)+"&file="+encodeURIComponent(name)
+ });
+ });
+ form.click(function(event){
+ event.stopPropagation();
+ event.preventDefault();
+ });
+ input.blur(function(){
+ form.trigger('submit');
+ });
}
}
diff --git a/files/js/files.js b/files/js/files.js
index 7750842dd5a..be7e48aeeeb 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -4,45 +4,25 @@ $(document).ready(function() {
//drag/drop of files
$('#fileList tr td.filename').draggable(dragOptions);
$('#fileList tr[data-type="dir"] td.filename').droppable(folderDropOptions);
- $('div.crumb').droppable({
- drop: function( event, ui ) {
- var file=ui.draggable.text().trim();
- var target=$(this).attr('data-dir');
- var dir=$('#dir').val();
- while(dir.substr(0,1)=='/'){//remove extra leading /'s
- dir=dir.substr(1);
- }
- dir='/'+dir;
- if(dir.substr(-1,1)!='/'){
- dir=dir+'/';
- }
- if(target==dir){
- return;
- }
- $.ajax({
- url: 'ajax/move.php',
- data: "dir="+dir+"&file="+file+'&target='+target,
- complete: function(data){boolOperationFinished(data, function(){
- FileList.remove(file);
- });}
- });
- },
- tolerance: 'pointer'
- });
+ $('div.crumb').droppable(crumbDropOptions);
+ $('#plugins>ul>li:first-child').data('dir','');
+ $('#plugins>ul>li:first-child').droppable(crumbDropOptions);
// Sets the file-action buttons behaviour :
- $('td.fileaction a').live('click',function(event) {
- event.preventDefault();
- FileActions.display($(this).parent());
+ $('tr').live('mouseenter',function(event) {
+ FileActions.display($(this).children('td.filename'));
});
-
+ $('tr').live('mouseleave',function(event) {
+ FileActions.hide();
+ });
+
// Sets the file link behaviour :
$('td.filename a').live('click',function(event) {
event.preventDefault();
- var filename=$(this).parent().parent().attr('data-file');
+ var filename=$(this).parent().parent().data('file');
if(!FileList.isLoading(filename)){
- var mime=$(this).parent().parent().attr('data-mime');
- var type=$(this).parent().parent().attr('data-type');
+ var mime=$(this).parent().parent().data('mime');
+ var type=$(this).parent().parent().data('type');
var action=FileActions.getDefault(mime,type);
if(action){
action(filename);
@@ -54,24 +34,27 @@ $(document).ready(function() {
$('#select_all').click(function() {
if($(this).attr('checked')){
// Check all
- $('td.selection input:checkbox').attr('checked', true);
- $('td.selection input:checkbox').parent().parent().addClass('selected');
+ $('td.filename input:checkbox').attr('checked', true);
+ $('td.filename input:checkbox').parent().parent().addClass('selected');
}else{
// Uncheck all
- $('td.selection input:checkbox').attr('checked', false);
- $('td.selection input:checkbox').parent().parent().removeClass('selected');
+ $('td.filename input:checkbox').attr('checked', false);
+ $('td.filename input:checkbox').parent().parent().removeClass('selected');
}
+ procesSelection();
});
- $('td.selection input:checkbox').live('click',function() {
+ $('td.filename input:checkbox').live('click',function() {
+ var selectedCount=$('td.filename input:checkbox:checked').length;
$(this).parent().parent().toggleClass('selected');
if(!$(this).attr('checked')){
$('#select_all').attr('checked',false);
}else{
- if($('td.selection input:checkbox:checked').length==$('td.selection input:checkbox').length){
+ if(selectedCount==$('td.filename input:checkbox').length){
$('#select_all').attr('checked',true);
}
}
+ procesSelection();
});
$('#file_newfolder_form').submit(function(event) {
@@ -80,11 +63,12 @@ $(document).ready(function() {
url: 'ajax/newfolder.php',
data: "dir="+$('#dir').val()+"&foldername="+$('#file_newfolder_name').val(),
complete: function(data){boolOperationFinished(data, function(){
- var date=formatDate(new Date());
- FileList.addDir($('#file_newfolder_name').val(),'0 B',date)
+ var date=new Date();
+ FileList.addDir($('#file_newfolder_name').val(),0,date);
+ $('#file_newfolder_name').val('New Folder');
+ $('#file_newfolder_name').blur();
});}
});
- $('#file_newfolder_submit').fadeOut(250).trigger('vanish');
});
$('#file_newfolder_name').click(function(){
@@ -93,21 +77,7 @@ $(document).ready(function() {
}
});
- $('#file_newfolder_name').bind('keyup', adjustNewFolderSize);
-
- $('#file_newfolder_submit').bind('vanish', function() {
- $('#file_newfolder_name').bind('keyup', adjustNewFolderSize);
- unsplitSize($('#file_newfolder_name'),$('#file_newfolder_submit'));
- });
-
- $('#file_newfolder_name').focusout(function(){
- if($('#file_newfolder_name').val() == '') {
- $('#file_newfolder_form')[0].reset();
- $('#file_newfolder_submit').fadeOut(250).trigger('vanish');
- }
- });
-
- $('.download').live('click',function(event) {
+ $('.download').click('click',function(event) {
var files=getSelectedFiles('name').join(';');
//send the browser to the download location
@@ -117,18 +87,41 @@ $(document).ready(function() {
return false;
});
- $('.delete').live('click',function(event) {
- var files=getSelectedFiles('name').join(';');
-
- $.ajax({
- url: 'ajax/delete.php',
- data: "dir="+$('#dir').val()+"&files="+encodeURIComponent(files),
- complete: function(data){
- boolOperationFinished(data, function(){
- $('td.selection input:checkbox:checked').parent().parent().each(function(i,element){
- FileList.remove($(element).attr('data-file'));
+ $('.delete').click(function(event) {
+ var fileNames=getSelectedFiles('name');
+ var files=fileNames.join(';');
+ var lastFileName=fileNames.pop();
+ if(fileNames.length>0){
+ fileNames=fileNames.join(', ')+' and '+lastFileName;
+ }else{
+ fileNames=lastFileName;
+ }
+
+ $( "#delete-confirm" ).dialog({
+ resizable: false,
+ height:200,
+ modal: true,
+ title:"Delete "+fileNames,
+ buttons: {
+ "Delete": function() {
+ $( this ).dialog( "close" );
+ $.ajax({
+ url: 'ajax/delete.php',
+ data: "dir="+$('#dir').val()+"&files="+encodeURIComponent(files),
+ complete: function(data){
+ boolOperationFinished(data, function(){
+ var files=getSelectedFiles('name');
+ for(var i=0;i<files.length;i++){
+ FileList.remove(files[i]);
+ }
+ procesSelection();
+ });
+ }
});
- });
+ },
+ Cancel: function() {
+ $( this ).dialog( "close" );
+ }
}
});
@@ -140,46 +133,82 @@ $(document).ready(function() {
var uploadId=form.attr('data-upload-id');
var files=this.files;
var target=form.children('iframe');
- target.load(function(){
- var response=jQuery.parseJSON(target.contents().find('body').text());
- //set mimetype and if needed filesize
- if(response){
- for(var i=0;i<response.length;i++){
- var file=response[i];
- $('tr[data-file="'+file.name+'"]').attr('data-mime',file.mime);
- if(size=='Pending'){
- $('tr[data-file='+file.name+'] td.filesize').text(file.size);
+ var totalSize=0;
+ for(var i=0;i<files.length;i++){
+ totalSize+=files[i].size;
+ }
+ if(totalSize>$('#max_upload').val()){
+ $( "#uploadsize-message" ).dialog({
+ modal: true,
+ buttons: {
+ Close: function() {
+ $( this ).dialog( "close" );
}
- FileList.loadingDone(file.name);
}
+ });
+ }else{
+ target.load(function(){
+ var response=jQuery.parseJSON(target.contents().find('body').text());
+ //set mimetype and if needed filesize
+ if(response){
+ for(var i=0;i<response.length;i++){
+ var file=response[i];
+ $('tr[data-file="'+file.name+'"]').data('mime',file.mime);
+ if(size=='Pending'){
+ $('tr[data-file='+file.name+'] td.filesize').text(file.size);
+ }
+ FileList.loadingDone(file.name);
+ }
+ }
+ });
+ form.submit();
+ var date=new Date();
+ for(var i=0;i<files.length;i++){
+ if(files[i].size>0){
+ var size=files[i].size;
+ }else{
+ var size='Pending';
+ }
+ FileList.addFile(files[i].name,size,date,true);
}
- });
- form.submit();
- var date=new Date();
- var uploadTime=formatDate(date);
- for(var i=0;i<files.length;i++){
- if(files[i].size>0){
- var size=simpleFileSize(files[i].size);
- }else{
- var size='Pending';
- }
- FileList.addFile(files[i].name,size,uploadTime,true);
+
+ //clone the upload form and hide the new one to allow users to start a new upload while the old one is still uploading
+ var clone=form.clone();
+ uploadId++;
+ clone.attr('data-upload-id',uploadId);
+ clone.attr('target','file_upload_target_'+uploadId);
+ clone.children('iframe').attr('name','file_upload_target_'+uploadId)
+ clone.insertBefore(form);
+ form.hide();
}
-
- //clone the upload form and hide the new one to allow users to start a new upload while the old one is still uploading
- var clone=form.clone();
- uploadId++;
- clone.attr('data-upload-id',uploadId);
- clone.attr('target','file_upload_target_'+uploadId);
- clone.children('iframe').attr('name','file_upload_target_'+uploadId)
- clone.insertBefore(form);
- form.hide();
});
//add multiply file upload attribute to all browsers except konqueror (which crashes when it's used)
if(navigator.userAgent.search(/konqueror/i)==-1){
$('.file_upload_start').attr('multiple','multiple')
}
+
+ //if the breadcrumb is to long, start by replacing foldernames with '...' except for the current folder
+ var crumb=$('div.crumb').first();
+ while($('div.controls').height()>40 && crumb.next('div.crumb').length>0){
+ crumb.children('a').text('...');
+ crumb=crumb.next('div.crumb');
+ }
+ //if that isn't enough, start removing items from the breacrumb except for the current folder and it's parent
+ var crumb=$('div.crumb').first();
+ var next=crumb.next('div.crumb');
+ while($('div.controls').height()>40 && next.next('div.crumb').length>0){
+ crumb.remove();
+ crumb=next;
+ next=crumb.next('div.crumb');
+ }
+ //still not enough, start shorting down the current folder name
+ var crumb=$('div.crumb>a').last();
+ while($('div.controls').height()>40 && crumb.text().length>6){
+ var text=crumb.text()
+ text=text.substr(0,text.length-6)+'...';
+ crumb.text(text);
+ }
});
var adjustNewFolderSize = function() {
@@ -238,7 +267,7 @@ function humanFileSize(bytes){
}
function simpleFileSize(bytes) {
- mbytes = Math.round(bytes/(1024*1024),1);
+ mbytes = Math.round(bytes/(1024*1024/10))/10;
if(bytes == 0) { return '0'; }
else if(mbytes < 0.1) { return '< 0.1'; }
else if(mbytes > 1000) { return '> 1000'; }
@@ -275,29 +304,133 @@ var folderDropOptions={
});
}
}
+var crumbDropOptions={
+ drop: function( event, ui ) {
+ var file=ui.draggable.text().trim();
+ var target=$(this).data('dir');
+ var dir=$('#dir').val();
+ while(dir.substr(0,1)=='/'){//remove extra leading /'s
+ dir=dir.substr(1);
+ }
+ dir='/'+dir;
+ if(dir.substr(-1,1)!='/'){
+ dir=dir+'/';
+ }
+ if(target==dir){
+ return;
+ }
+ $.ajax({
+ url: 'ajax/move.php',
+ data: "dir="+dir+"&file="+file+'&target='+target,
+ complete: function(data){boolOperationFinished(data, function(){
+ FileList.remove(file);
+ });}
+ });
+ },
+ tolerance: 'pointer'
+}
+
+function procesSelection(){
+ var selected=getSelectedFiles();
+ var selectedFiles=selected.filter(function(el){return el.type=='file'});
+ var selectedFolders=selected.filter(function(el){return el.type=='dir'});
+ if(selectedFiles.length==0 && selectedFolders.length==0){
+ $('#headerName>span.name').text('Name');
+ $('#headerSize').text('Size MB');
+ $('#modified').text('Modified');
+ $('th').css({background:'#fff',fontWeight:'normal'});
+ $('.selectedActions').hide();
+ }else{
+ $('.selectedActions').show();
+ var totalSize=0;
+ for(var i=0;i<selectedFiles.length;i++){
+ totalSize+=selectedFiles[i].size;
+ };
+ for(var i=0;i<selectedFolders.length;i++){
+ totalSize+=selectedFolders[i].size;
+ };
+ simpleSize=simpleFileSize(totalSize);
+ $('#headerSize').text(simpleSize+' MB');
+ $('#headerSize').attr('title',humanFileSize(totalSize));
+ var selection='';
+ if(selectedFolders.length>0){
+ if(selectedFolders.length==1){
+ selection+='1 folder';
+ }else{
+ selection+=selectedFolders.length+' folders';
+ }
+ if(selectedFiles.length>0){
+ selection+=' & ';
+ }
+ }
+ if(selectedFiles.length>0){
+ if(selectedFiles.length==1){
+ selection+='1 file';
+ }else{
+ selection+=selectedFiles.length+' files';
+ }
+ }
+ $('#headerName>span.name').text(selection);
+ $('#modified').text('');
+ $('th').css({background:'#ddd', fontWeight:'bold'});
+ }
+}
/**
* @brief get a list of selected files
* @param string property (option) the property of the file requested
* @return array
*
- * possible values for property: name, mime
+ * possible values for property: name, mime, size and type
* if property is set, an array with that property for each file is returnd
* if it's ommited an array of objects with all properties is returned
*/
function getSelectedFiles(property){
- var elements=$('td.selection input:checkbox:checked').parent().parent();
+ var elements=$('td.filename input:checkbox:checked').parent().parent();
var files=[];
elements.each(function(i,element){
var file={
- name:$(element).attr('data-file'),
- mime:$(element).attr('data-mime')
+ name:$(element).data('file'),
+ mime:$(element).data('mime'),
+ type:$(element).data('type'),
+ size:$(element).data('size'),
};
if(property){
files.push(file[property]);
}else{
- files.push();
+ files.push(file);
}
});
return files;
+}
+
+function relative_modified_date(timestamp) {
+ var timediff = Math.round((new Date()).getTime() / 1000) - timestamp;
+ var diffminutes = Math.round(timediff/60);
+ var diffhours = Math.round(diffminutes/60);
+ var diffdays = Math.round(diffhours/24);
+ var diffmonths = Math.round(diffdays/31);
+ var diffyears = Math.round(diffdays/365);
+ if(timediff < 60) { return 'seconds ago'; }
+ else if(timediff < 120) { return '1 minute ago'; }
+ else if(timediff < 3600) { return diffminutes+' minutes ago'; }
+ //else if($timediff < 7200) { return '1 hour ago'; }
+ //else if($timediff < 86400) { return $diffhours.' hours ago'; }
+ else if(timediff < 86400) { return 'today'; }
+ else if(timediff < 172800) { return 'yesterday'; }
+ else if(timediff < 2678400) { return diffdays+' days ago'; }
+ else if(timediff < 5184000) { return 'last month'; }
+ //else if($timediff < 31556926) { return $diffmonths.' months ago'; }
+ else if(timediff < 31556926) { return 'months ago'; }
+ else if(timediff < 63113852) { return 'last year'; }
+ else { return diffyears+' years ago'; }
+}
+
+function getMimeIcon(mime){
+ mime=mime.substr(0,mime.indexOf('/'));
+ var knownMimes=['image','audio'];
+ if(knownMimes.indexOf(mime)==-1){
+ mime='file';
+ }
+ return OC.imagePath('core','mimetypes/'+mime+'.png');
} \ No newline at end of file
diff --git a/files/templates/admin.php b/files/templates/admin.php
index ff331f860e6..40880d34911 100644
--- a/files/templates/admin.php
+++ b/files/templates/admin.php
@@ -3,8 +3,11 @@
<form name="filesForm" action='#' method='post'>
<?php if($_['htaccessWorking']):?>
<label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/><br/>
+ <input type='submit' value='Save'/>
+ <?php else:?>
+ No settings currently available.
<?php endif;?>
- <input type="checkbox" name="publicEnable" id="publicEnable" /><label for="publicEnable"> <?php echo $l->t( 'Allow public folders' ); ?></label><br>
+<!-- <input type="checkbox" name="publicEnable" id="publicEnable" /><label for="publicEnable"> <?php echo $l->t( 'Allow public folders' ); ?></label><br>
<div style="padding-left: 20px">
<input type="radio" name="sharingaim" id="separated" /><label for="separated"> <?php echo $l->t( 'separated from webdav storage' ); ?></label><br>
@@ -13,6 +16,5 @@
</div>
<input type="checkbox" id="downloadShared" /><label for="downloadShared"> <?php echo $l->t( 'Allow downloading shared files' ); ?></label><br>
- <input type="checkbox" id="uploadShared" /><label for="uploadShared"> <?php echo $l->t( 'Allow uploading in shared directory' ); ?></label><br>
- <input type='submit' value='Save'/>
+ <input type="checkbox" id="uploadShared" /><label for="uploadShared"> <?php echo $l->t( 'Allow uploading in shared directory' ); ?></label><br>-->
</form>
diff --git a/files/templates/index.php b/files/templates/index.php
index efc92900637..df78cf0bb2d 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -1,4 +1,7 @@
<div class="controls">
+ <span class="nav">
+ <?php echo($_['breadcrumb']); ?>
+ </span>
<div class="actions">
<form data-upload-id='1' class="file_upload_form" action="ajax/upload.php" method="post" enctype="multipart/form-data" target="file_upload_target_1">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_["uploadMaxFilesize"] ?>" id="max_upload">
@@ -12,28 +15,25 @@
</form>
<form id="file_newfolder_form">
<input type="text" class="prettybutton" name="file_newfolder_name" id="file_newfolder_name" value="New Folder" />&nbsp;
- <input class="prettybutton" type="submit" id="file_newfolder_submit" name="file_newfolder_submit" value="OK" />
</form>
- <a href="" title="" class="download"><?php echo $l->t( 'Download' ); ?></a>
- <!--<a href="" title="" class="share"><?php echo $l->t( 'Share' ); ?></a>-->
- <a href="" title="" class="delete"><?php echo $l->t( 'Delete' ); ?></a>
</div>
<div id="file_action_panel">
</div>
</div>
-<span class="nav">
- <?php echo($_['breadcrumb']); ?>
-</span>
-
<table cellspacing="0">
<thead>
<tr>
- <th><input type="checkbox" id="select_all" /></th>
- <th><?php echo $l->t( 'Name' ); ?></th>
- <th><?php echo $l->t( 'Size (MB)' ); ?></th>
- <th><?php echo $l->t( 'Modified' ); ?></th>
- <th></th>
+ <th id='headerName'>
+ <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 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 class='svg' alt="Delete" src="../core/img/actions/delete.svg" /></a></span></th>
</tr>
</thead>
<tbody id="fileList">
@@ -41,7 +41,14 @@
</tbody>
</table>
-<div id="file_menu">
- <ul>
- </ul>
+<div id="uploadsize-message" title="Upload too large">
+ <p>
+ <?php echo $l->t( 'The files you are trying to upload exceed the maximum size for file uploads on this server.' ); ?>
+ </p>
+</div>
+
+<div id="delete-confirm" title="">
+ <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p>
</div>
+
+<span id="file_menu"/>
diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php
index 64e0a474728..20c436926c6 100644
--- a/files/templates/part.breadcrumb.php
+++ b/files/templates/part.breadcrumb.php
@@ -1,8 +1,5 @@
- <div class='crumb' data-dir='/'>
- <a href="<?php echo link_to("files", "index.php"); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root"/></a>
- </div>
<?php foreach($_["breadcrumb"] as $crumb): ?>
- <div class='crumb' data-dir='<?php echo $crumb["dir"];?>'>
+ <div class='crumb' data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb-divider.png');?>")'>
<a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
</div>
<?php endforeach; ?> \ No newline at end of file
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index d717f288851..d249455c55c 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -1,19 +1,25 @@
- <?php foreach($_['files'] as $file):
+ <?php if(!$_['files']) echo '<span id="emptyfolder">Nothing in here. Upload something!</span><style>.file_upload_filename { background-color:#ffc100; border:#dda600 1px solid; }</style>';
+ foreach($_['files'] as $file):
$simple_file_size = simple_file_size($file['size']);
- $simple_size_color = 200-intval(pow(($file['size']/(1024*1024)),2)); ?>
- <tr data-file="<?php echo $file['name'];?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>">
- <td class="selection"><input type="checkbox" /></td>
+ $simple_size_color = 200-intval($file['size']/(1024*1024)*5);
+ if($simple_size_color<0) $simple_size_color = 0;
+ $relative_modified_date = relative_modified_date($file['mtime']);
+ $relative_date_color = round((time()-$file['mtime'])/60/60/24*7); //days ago
+ 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">
- <a 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="">
+ <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="">
+ <span class="nametext">
<?php if($file['type'] == 'dir'):?>
- <strong><?php echo htmlspecialchars($file['name']);?></strong>
+ <?php echo htmlspecialchars($file['name']);?>
<?php else:?>
<?php echo htmlspecialchars($file['basename']);?><span class='extention'><?php echo $file['extention'];?></span>
<?php endif;?>
+ </span>
</a>
</td>
<td class="filesize" title="<?php echo human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td>
- <td class="date"><?php echo $file['date']; ?></td>
- <td class="fileaction"><a href="" title="+" class="dropArrow"></a></td>
+ <td class="date"><span class="modified" title="<?php echo $file['date']; ?>" style="color:rgb(<?php echo $relative_date_color.','.$relative_date_color.','.$relative_date_color ?>)"><?php echo $relative_modified_date; ?></span></td>
</tr>
<?php endforeach; ?>
diff --git a/l10n/l10n.pl b/l10n/l10n.pl
index 0ad33d2116b..b993727e8f1 100644
--- a/l10n/l10n.pl
+++ b/l10n/l10n.pl
@@ -3,6 +3,7 @@ use strict;
use Locale::PO;
use Cwd;
use Data::Dumper;
+use File::Path;
sub crawl{
my( $dir ) = @_;
@@ -28,7 +29,7 @@ sub crawl{
my $task = shift( @ARGV );
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
my $whereami = cwd();
@@ -38,6 +39,7 @@ die( "Program must be executed in a l10n-folder called 'l10n'" ) unless $wheream
my @dirs = crawl( $place );
# Languages
+rmtree( 'templates' );
mkdir( 'templates' ) unless -d 'templates';
my @languages = ();
@@ -55,13 +57,7 @@ if( $task eq 'read' ){
my $app = pop( @temp );
chdir( $dir );
my $output = "${whereami}/templates/$app.pot";
-
- if( -e $output ){
- `xgettext --files-from=xgettextfiles --join-existing --output="$output" --keyword=t`
- }
- else{
- `xgettext --files-from=xgettextfiles --output="$output" --keyword=t`
- }
+ `xgettext --files-from=xgettextfiles --output="$output" --keyword=t`;
chdir( $whereami );
}
}
diff --git a/l10n/templates/admin.pot b/l10n/templates/admin.pot
index 411ecacce97..d6233365185 100644
--- a/l10n/templates/admin.pot
+++ b/l10n/templates/admin.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-27 08:52+0200\n"
+"POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot
index 8b73bf7ef10..6bcadf8cfc7 100644
--- a/l10n/templates/core.pot
+++ b/l10n/templates/core.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-27 08:52+0200\n"
+"POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/help.pot b/l10n/templates/help.pot
index 362fdf123d7..e5ffb5a4cf5 100644
--- a/l10n/templates/help.pot
+++ b/l10n/templates/help.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-27 08:52+0200\n"
+"POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/log.pot b/l10n/templates/log.pot
index 54b633c2f1b..ea98e5c2b14 100644
--- a/l10n/templates/log.pot
+++ b/l10n/templates/log.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-27 08:52+0200\n"
+"POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot
index 8c077f56889..24e255fa259 100644
--- a/l10n/templates/settings.pot
+++ b/l10n/templates/settings.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-27 08:52+0200\n"
+"POT-Creation-Date: 2011-07-27 12:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/lib/app.php b/lib/app.php
index 475015f6779..b6c2512e79a 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -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;
- }
- else{
- $naventry['active'] = false;
+ $naventry['subnavigation'] = $entries;
}
- } 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;
}
diff --git a/lib/base.php b/lib/base.php
index 0c0921ca8b1..4e1b9bd0064 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -110,6 +110,3 @@ OC_UTIL::addStyle( "styles" );
if(!$error and !$RUNTIME_NOAPPS ){
OC_APP::loadApps();
}
-
-
-?>
diff --git a/lib/filestorage.php b/lib/filestorage.php
index ada85f1a50d..ba1a4b295aa 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -58,5 +58,3 @@ class OC_FILESTORAGE{
public function search($query){}
public function getLocalFile($path){}// get a path to a local version of the file, whether the original file is local or remote
}
-
-?> \ No newline at end of file
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 81a00dd8f4d..fd3f043de3b 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -138,7 +138,7 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
} else if (function_exists("mime_content_type")) {
// use mime magic extension if available
$mime_type = mime_content_type($this->datadir.$fspath);
- } else if (self::canExecute("file")) {
+ } else if (OC_HELPER::canExecute("file")) {
// it looks like we have a 'file' command,
// lets see it it does have mime support
$fp = popen("file -i -b '{$this->datadir}$fspath' 2>/dev/null", "r");
@@ -161,62 +161,6 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
}
}
- /**
- * detect if a given program is found in the search PATH
- *
- * helper function used by _mimetype() to detect if the
- * external 'file' utility is available
- *
- * @param string program name
- * @param string optional search path, defaults to $PATH
- * @return bool true if executable program found in path
- */
- private function canExecute($name, $path = false)
- {
- // path defaults to PATH from environment if not set
- if ($path === false) {
- $path = getenv("PATH");
- }
-
- // check method depends on operating system
- if (!strncmp(PHP_OS, "WIN", 3)) {
- // on Windows an appropriate COM or EXE file needs to exist
- $exts = array(".exe", ".com");
- $check_fn = "file_exists";
- } else {
- // anywhere else we look for an executable file of that name
- $exts = array("");
- $check_fn = "is_executable";
- }
-
- // Default check will be done with $path directories :
- $dirs = explode(PATH_SEPARATOR, $path);
-
- // WARNING : We have to check if open_basedir is enabled :
- $obd = ini_get('open_basedir');
-
- if($obd != "none")
- $obd_values = explode(PATH_SEPARATOR, $obd);
-
- if(count($obd_values) > 0)
- {
- // open_basedir is in effect !
- // We need to check if the program is in one of these dirs :
- $dirs = $obd_values;
- }
-
- foreach($dirs as $dir)
- {
- foreach($exts as $ext)
- {
- if($check_fn("$dir/$name".$ext))
- return true;
- }
- }
-
- return false;
- }
-
public function toTmpFile($path){
$tmpFolder=sys_get_temp_dir();
$filename=tempnam($tmpFolder,'OC_TEMP_FILE_'.substr($path,strrpos($path,'.')));
@@ -411,4 +355,3 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
}
}
}
-
diff --git a/lib/helper.php b/lib/helper.php
index 96d5bfad826..ffb25877433 100755
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -110,6 +110,11 @@ class OC_HELPER {
if( file_exists( "$SERVERROOT/core/img/mimetypes/$mimetype.png" )){
return "$WEBROOT/core/img/mimetypes/$mimetype.png";
}
+ //try only the first part of the mimetype
+ $mimetype=substr($mimetype,0,strpos($mimetype,'-'));
+ if( file_exists( "$SERVERROOT/core/img/mimetypes/$mimetype.png" )){
+ return "$WEBROOT/core/img/mimetypes/$mimetype.png";
+ }
else{
return "$WEBROOT/core/img/mimetypes/file.png";
}
@@ -267,6 +272,51 @@ class OC_HELPER {
if((isset($_REQUEST[$s]) && $_REQUEST[$s]==$v) || $v == $d)
print "checked=\"checked\" ";
}
+
+ /**
+ * detect if a given program is found in the search PATH
+ *
+ * @param string program name
+ * @param string optional search path, defaults to $PATH
+ * @return bool true if executable program found in path
+ */
+ public static function canExecute($name, $path = false){
+ // path defaults to PATH from environment if not set
+ if ($path === false) {
+ $path = getenv("PATH");
+ }
+ // check method depends on operating system
+ if (!strncmp(PHP_OS, "WIN", 3)) {
+ // on Windows an appropriate COM or EXE file needs to exist
+ $exts = array(".exe", ".com");
+ $check_fn = "file_exists";
+ } else {
+ // anywhere else we look for an executable file of that name
+ $exts = array("");
+ $check_fn = "is_executable";
+ }
+ // Default check will be done with $path directories :
+ $dirs = explode(PATH_SEPARATOR, $path);
+ // WARNING : We have to check if open_basedir is enabled :
+ $obd = ini_get('open_basedir');
+ if($obd != "none")
+ $obd_values = explode(PATH_SEPARATOR, $obd);
+ if(count($obd_values) > 0 and $obd_values[0])
+ {
+ // open_basedir is in effect !
+ // We need to check if the program is in one of these dirs :
+ $dirs = $obd_values;
+ }
+ foreach($dirs as $dir)
+ {
+ foreach($exts as $ext)
+ {
+ if($check_fn("$dir/$name".$ext))
+ return true;
+ }
+ }
+ return false;
+ }
}
?>
diff --git a/lib/log.php b/lib/log.php
index 894575ef059..764c094c919 100644
--- a/lib/log.php
+++ b/lib/log.php
@@ -51,7 +51,7 @@ class OC_LOG {
* This function adds another entry to the log database
*/
public static function add( $appid, $subject, $predicate, $object = ' ' ){
- $query=OC_DB::prepare("INSERT INTO *PREFIX*log(moment,appid,user,action,info) VALUES(NOW(),?,?,?,?)");
+ $query=OC_DB::prepare("INSERT INTO `*PREFIX*log`(moment,appid,user,action,info) VALUES(NOW(),?,?,?,?)");
$result=$query->execute(array($appid,$subject,$predicate,$object));
// Die if we have an error
if( PEAR::isError($result)) {
@@ -79,7 +79,7 @@ class OC_LOG {
* - app: only entries for this app
*/
public static function get( $filter = array()){
- $queryString='SELECT * FROM *PREFIX*log WHERE 1=1 ORDER BY moment DESC';
+ $queryString='SELECT * FROM `*PREFIX*log` WHERE 1=1 ORDER BY moment DESC';
$params=array();
if(isset($filter['from'])){
$queryString.='AND moment>? ';
@@ -116,7 +116,7 @@ class OC_LOG {
* This function deletes all entries that are older than $date.
*/
public static function deleteBefore( $date ){
- $query=OC_DB::prepare("DELETE FROM *PREFIX*log WHERE moment<?");
+ $query=OC_DB::prepare("DELETE FROM `*PREFIX*log` WHERE moment<?");
$query->execute(array($date));
return true;
}
@@ -128,7 +128,7 @@ class OC_LOG {
* This function deletes all log entries.
*/
public static function deleteAll(){
- $query=OC_DB::prepare("DELETE FROM *PREFIX*log");
+ $query=OC_DB::prepare("DELETE FROM `*PREFIX*log`");
$query->execute();
return true;
}
diff --git a/lib/ocs.php b/lib/ocs.php
index 4e9e6522e8b..b1be2cb11cf 100644
--- a/lib/ocs.php
+++ b/lib/ocs.php
@@ -463,7 +463,6 @@ class OC_OCS {
$xml[$i]['key']=$log['key'];
$xml[$i]['app']=$log['app'];
$xml[$i]['value']=$log['value'];
- $xml[$i]['timestamp']=$log['timestamp'];
}
@@ -511,28 +510,26 @@ class OC_OCS {
* @param bool $like use LIKE instead of = when comparing keys
* @return array
*/
- public static function getData($user,$app="",$key="",$like=false) {
- $key="$user::$key";//ugly hack for the sake of keeping database scheme compatibiliy, needs to be replaced with a seperate user field the next time we break db compatibiliy
- $compareFunction=($like)?'LIKE':'=';
-
+ public static function getData($user,$app="",$key="") {
if($app){
- if (!trim($key)) {
- $query = OC_DB::prepare('select app, `key`,value,`timestamp` from *PREFIX*privatedata where app=? order by `timestamp` desc');
- $result=$query->execute(array($app))->fetchAll();
- } else {
- $query = OC_DB::prepare("select app, `key`,value,`timestamp` from *PREFIX*privatedata where app=? and `key` $compareFunction ? order by `timestamp` desc");
- $result=$query->execute(array($app,$key))->fetchAll();
- }
+ $apps=array($app);
+ }else{
+ $apps=OC_PREFERENCES::getApps($user);
+ }
+ if($key){
+ $keys=array($key);
}else{
- if (!trim($key)) {
- $query = OC_DB::prepare('select app, `key`,value,`timestamp` from *PREFIX*privatedata order by `timestamp` desc');
- $result=$query->execute()->fetchAll();
- } else {
- $query = OC_DB::prepare("select app, `key`,value,`timestamp` from *PREFIX*privatedata where `key` $compareFunction ? order by `timestamp` desc");
- $result=$query->execute(array($key))->fetchAll();
+ foreach($apps as $app){
+ $keys=OC_PREFERENCES::getKeys($user,$app);
+ }
+ }
+ $result=array();
+ foreach($apps as $app){
+ foreach($keys as $key){
+ $value=OC_PREFERENCES::getValue($user,$app,$key);
+ $result[]=array('app'=>$app,'key'=>$key,'value'=>$value);
}
}
- $result=self::trimKeys($result,$user);
return $result;
}
@@ -545,25 +542,7 @@ class OC_OCS {
* @return bool
*/
public static function setData($user, $app, $key, $value) {
- $key="$user::$key";//ugly hack for the sake of keeping database scheme compatibiliy
- //TODO: locking tables, fancy stuff, error checking/handling
- $query=OC_DB::prepare("select count(*) as co from *PREFIX*privatedata where `key` = ? and app = ?");
- $result=$query->execute(array($key,$app))->fetchAll();
- $totalcount=$result[0]['co'];
- if ($totalcount != 0) {
- $query=OC_DB::prepare("update *PREFIX*privatedata set value=?, `timestamp` = now() where `key` = ? and app = ?");
-
- } else {
- $result = OC_DB::prepare("insert into *PREFIX*privatedata(value, `key`, app, `timestamp`) values(?, ?, ?, now())");
- }
- $result = $query->execute(array($value,$key,$app));
- if (PEAR::isError($result)){
- $entry='DB Error: "'.$result->getMessage().'"<br />';
- error_log($entry);
- return false;
- }else{
- return true;
- }
+ return OC_PREFERENCES::setValue($user,$app,$key,$value);
}
/**
@@ -574,26 +553,7 @@ class OC_OCS {
* @return string xml/json
*/
public static function deleteData($user, $app, $key) {
- $key="$user::$key";//ugly hack for the sake of keeping database scheme compatibiliy
- //TODO: prepared statements, locking tables, fancy stuff, error checking/handling
- $query=OC_DB::prepare("delete from *PREFIX*privatedata where `key` = ? and app = ?");
- $result = $query->execute(array($key,$app));
- if (PEAR::isError($result)){
- $entry='DB Error: "'.$result->getMessage().'"<br />';
- error_log($entry);
- return false;
- }else{
- return true;
- }
- }
-
- //trim username prefixes from $array
- private static function trimKeys($array,$user){
- $length=strlen("$user::");
- foreach($array as &$item){
- $item['key']=substr($item['key'],$length);
- }
- return $array;
+ return OC_PREFERENCES::deleteKey($user,$app,$key);
}
}
diff --git a/lib/setup.php b/lib/setup.php
index 63ba4daab54..f9bc6fd1bdd 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -76,6 +76,7 @@ class OC_SETUP {
//write the config file
OC_CONFIG::setValue('datadirectory', $datadir);
OC_CONFIG::setValue('dbtype', $dbtype);
+ OC_CONFIG::setValue('version',implode('.',OC_UTIL::getVersion()));
if($dbtype == 'mysql') {
$dbuser = $options['dbuser'];
$dbpass = $options['dbpass'];
diff --git a/lib/template.php b/lib/template.php
index 3c0cdf7e161..99099d49d0f 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -75,6 +75,29 @@ function simple_file_size($bytes) {
else { return number_format($mbytes, 1); }
}
+function relative_modified_date($timestamp) {
+ $timediff = time() - $timestamp;
+ $diffminutes = round($timediff/60);
+ $diffhours = round($diffminutes/60);
+ $diffdays = round($diffhours/24);
+ $diffmonths = round($diffdays/31);
+ $diffyears = round($diffdays/365);
+ if($timediff < 60) { return 'seconds ago'; }
+ else if($timediff < 120) { return '1 minute ago'; }
+ else if($timediff < 3600) { return $diffminutes.' minutes ago'; }
+ //else if($timediff < 7200) { return '1 hour ago'; }
+ //else if($timediff < 86400) { return $diffhours.' hours ago'; }
+ else if($timediff < 86400) { return 'today'; }
+ else if($timediff < 172800) { return 'yesterday'; }
+ else if($timediff < 2678400) { return $diffdays.' days ago'; }
+ else if($timediff < 5184000) { return 'last month'; }
+ //else if($timediff < 31556926) { return $diffmonths.' months ago'; }
+ else if($timediff < 31556926) { return 'months ago'; }
+ else if($timediff < 63113852) { return 'last year'; }
+ else { return $diffyears.' years ago'; }
+}
+
+
/**
* This class provides the templates for owncloud.
*/
diff --git a/lib/util.php b/lib/util.php
index 8beb4a884bc..2a50114b053 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -82,7 +82,7 @@ class OC_UTIL {
* @return array
*/
public static function getVersion(){
- return array(1,60,0);
+ return array(1,90,0);
}
/**
@@ -242,4 +242,3 @@ class OC_UTIL {
return $errors;
}
}
-