more fixes for Personal and Tipsy

This commit is contained in:
Jan-Christoph Borchardt 2011-08-14 16:12:27 +02:00
parent df532e3f82
commit 7bb261f810
8 changed files with 38 additions and 21 deletions

View File

@ -1,5 +1,5 @@
$(document).ready(function(){
$('#openidform input').blur(function(event){
$('#openidform #identity').blur(function(event){
event.preventDefault();
var post = $( "#openidform" ).serialize();
$.post( 'ajax/openid.php', post, function(data){
@ -9,4 +9,12 @@ $(document).ready(function(){
}
});
});
// reset value when edited, workaround because of .select() not working with disabled inputs
$('#openid').focus(function(event){
openidValue = $('#openid').val();
});
$('#openid').blur(function(event){
$('#openid').val(openidValue);
});
});

View File

@ -1,9 +1,7 @@
<form id="openidform">
<fieldset class="personalblock">
<p><strong>OpenID</strong>
<a href="<?php echo ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/?'; echo OC_User::getUser(); ?>" title="OpenID">
<?php echo ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/?'; echo OC_User::getUser(); ?></p>
</a>
<label for="openid"><strong>OpenID</strong></label>
<input type="text" id="openid" value="<?php echo ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/?'; echo OC_User::getUser(); ?>" title="you can authenticate to other sites with this address" />
<label for="identity">Authorized</label>
<input type="text" name="identity" id="identity" value="<?php echo $_['identity']; ?>" placeholder="OpenID provider" title="Wordpress, Identi.ca, Launchpad, &hellip;" />
</fieldset>

View File

@ -299,15 +299,21 @@ $(document).ready(function(){
}
});
// all the tipsy stuff needs to be here (in reverse order) to work
$('.jp-controls .jp-previous').tipsy({gravity:'nw', fade:true, live:true});
$('.jp-controls .jp-next').tipsy({gravity:'n', fade:true, live:true});
$('.remove .action').tipsy({gravity:'se', fade:true, live:true});
$('.date .action').tipsy({gravity:'se', fade:true, live:true});
$('.action').tipsy({gravity:'s', fade:true, live:true});
$('.selectedActions a.delete').tipsy({gravity: 'ne', fade:true, live:true});
$('.selectedActions a').tipsy({gravity:'n', fade:true, live:true});
$('input').each(function(i,input) {
if($(input).attr('title')) {
$(input).tipsy({gravity:'w', fade:true});
}
$('.file_upload_button_wrapper').tipsy({gravity:'e', fade:true});
$('td.filesize').tipsy({gravity:'s', fade:true, live:true});
$('td .modified').tipsy({gravity:'s', fade:true, live:true});
$('input').tipsy({gravity:'w', fade:true});
$('input[type=text]').focus(function(){
this.select();
});
});

View File

@ -31,9 +31,9 @@
<header><div id="header">
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img class="svg" src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" /></a>
<form class="searchbox" action="#" method="post">
<input id="searchbox" class="svg" type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
<input id="searchbox" class="svg" type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" autocomplete="off" />
</form>
<a id="logout" href="<?php echo link_to('', 'index.php'); ?>?logout=true" title="<?php echo $l->t('Log out');?>"><img class="svg" src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></a>
<a id="logout" href="<?php echo link_to('', 'index.php'); ?>?logout=true"><img class="svg" src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></a>
</div></header>
<nav><div id="navigation">

View File

@ -17,10 +17,6 @@ $(document).ready(function() {
$(this).parent().children('.file_upload_start').trigger('click');
return false;
});
$('.file_upload_button_wrapper').tipsy({gravity:'e', fade:true});
$('td.filesize').tipsy({gravity:'s', fade:true, live:true});
$('td .modified').tipsy({gravity:'s', fade:true, live:true});
// Sets the file-action buttons behaviour :
$('tr').live('mouseenter',function(event) {

View File

@ -1,3 +1,5 @@
input#openid, input#webdav { width:20em; }
/* PERSONAL */
#passworderror { display:none; }
#passwordchanged { display:none; }

View File

@ -32,4 +32,12 @@ $(document).ready(function(){
});
return false;
});
// reset value when edited, workaround because of .select() not working with disabled inputs
$('#webdav').focus(function(event){
openidValue = $('#webdav').val();
});
$('#webdav').blur(function(event){
$('#webdav').val(openidValue);
});
} );

View File

@ -1,5 +1,5 @@
<div id="quota" class="personalblock"><div style="width:<?php echo $_['usage_relative'] ?>%;">
<p><?php echo $l->t('You use');?> <strong><?php echo $_['usage'] ?></strong> <?php echo $l->t('of the available');?> <?php echo $_['total_space'] ?></p>
<div id="quota" class="personalblock"><div style="width:<?php echo $_['usage_relative'];?>%;">
<p><?php echo $l->t('You use');?> <strong><?php echo $_['usage'];?></strong> <?php echo $l->t('of the available');?> <strong><?php echo $_['total_space'];?></strong></p>
</div></div>
<form id="passwordform">
@ -15,7 +15,7 @@
<form>
<fieldset class="personalblock">
<strong><label for="languageinput"><?php echo $l->t('Language');?></label></strong>
<label for="languageinput"><strong><?php echo $l->t('Language');?></strong></label>
<select id="languageinput" name='lang'>
<?php foreach($_['languages'] as $language):?>
<option value="<?php echo $language['code'];?>"><?php echo $language['name'];?></option>
@ -26,9 +26,8 @@
</form>
<p class="personalblock">
<strong>WebDAV</strong> <a href="<?php echo ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/files/webdav.php'; ?>" title="webdav">
<?php echo ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/files/webdav.php'; ?>
</a>
<label for="webdav"><strong>WebDAV</strong></label>
<input id="webdav" type="text" value="<?php echo ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].OC::$WEBROOT.'/files/webdav.php'; ?>" title="use this address to connect to your ownCloud in your file manager" />
</p>
<?php foreach($_['forms'] as $form){