fix some issues with browsers not supporting html5 localStorage
This commit is contained in:
parent
faf6c0e8e1
commit
c998bc1215
|
@ -50,7 +50,7 @@ $(document).ready(function() {
|
||||||
FileActions.setDefault('application/ogg','Play');
|
FileActions.setDefault('application/ogg','Play');
|
||||||
}
|
}
|
||||||
if(typeof PlayList==='undefined'){
|
if(typeof PlayList==='undefined'){
|
||||||
if(typeof localStorage !== 'undefined'){
|
if(typeof localStorage !== 'undefined' && localStorage){
|
||||||
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items') && localStorage.getItem(oc_current_user+'oc_playlist_items')!='[]' && localStorage.getItem(oc_current_user+'oc_playlist_active')!='true'){
|
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items') && localStorage.getItem(oc_current_user+'oc_playlist_items')!='[]' && localStorage.getItem(oc_current_user+'oc_playlist_active')!='true'){
|
||||||
loadPlayer();
|
loadPlayer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ var PlayList={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
save:function(){
|
save:function(){
|
||||||
if(typeof localStorage !== 'undefined'){
|
if(typeof localStorage !== 'undefined' && localStorage){
|
||||||
localStorage.setItem(oc_current_user+'oc_playlist_items',JSON.stringify(PlayList.items));
|
localStorage.setItem(oc_current_user+'oc_playlist_items',JSON.stringify(PlayList.items));
|
||||||
localStorage.setItem(oc_current_user+'oc_playlist_current',PlayList.current);
|
localStorage.setItem(oc_current_user+'oc_playlist_current',PlayList.current);
|
||||||
var time=Math.round(PlayList.player.data('jPlayer').status.currentTime);
|
var time=Math.round(PlayList.player.data('jPlayer').status.currentTime);
|
||||||
|
@ -156,7 +156,7 @@ var PlayList={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
load:function(){
|
load:function(){
|
||||||
if(typeof localStorage !== 'undefined'){
|
if(typeof localStorage !== 'undefined' && localStorage){
|
||||||
PlayList.active=true;
|
PlayList.active=true;
|
||||||
localStorage.setItem(oc_current_user+'oc_playlist_active','true');
|
localStorage.setItem(oc_current_user+'oc_playlist_active','true');
|
||||||
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items')){
|
if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items')){
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once('../../lib/base.php');
|
|
||||||
if( !OC_User::isLoggedIn()){
|
|
||||||
header( "Location: ".OC_Helper::linkTo( "index.php" ));
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_POST['input_identity'])){
|
|
||||||
OC_Preferences::setValue(OC_User::getUser(),'user_openid','identity',$_POST['input_identity']);
|
|
||||||
}
|
|
||||||
|
|
||||||
OC_App::setActiveNavigationEntry( "user_openid_settings" );
|
|
||||||
|
|
||||||
$identity=OC_Preferences::getValue(OC_User::getUser(),'user_openid','identity','');
|
|
||||||
|
|
||||||
$tmpl = new OC_Template( "user_openid", "settings", "admin");
|
|
||||||
$tmpl->assign('identity',$identity);
|
|
||||||
$tmpl->assign('user',OC_User::getUser());
|
|
||||||
|
|
||||||
$tmpl->printPage();
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<form id="identity" action='#' method='post'>
|
|
||||||
<fieldset>
|
|
||||||
<legend><?php echo $l->t( 'OpenID identity' );?></legend>
|
|
||||||
<label for='input_identity'>OpenID identity for <b><?php echo $_['user'];?></b></label><br/>
|
|
||||||
<input name='input_identity' id='input_identity' value="<?php echo $_['identity'];?>"/><input type='submit' value='Save'/>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
Loading…
Reference in New Issue