more valid HTML, alt attributes, refactored pagenavi etc.

This commit is contained in:
Jan-Christoph Borchardt 2011-08-20 05:07:58 +02:00
parent c2f0fe51c4
commit d9aae20003
14 changed files with 71 additions and 72 deletions

View File

@ -30,6 +30,6 @@
<?php endif; ?>
<div id="contacts_cardoptions">
<a id="contacts_deletecard"><img class="svg action" src="<?php echo image_path('', 'actions/delete.svg'); ?>" /></a>
<a id="contacts_addproperty"><img class="svg action" src="<?php echo image_path('', 'actions/download.svg'); ?>" /></a>
<a id="contacts_deletecard"><img class="svg action" alt="<?php echo $l->t('Delete');?>" src="<?php echo image_path('', 'actions/delete.svg'); ?>" /></a>
<a id="contacts_addproperty"><img class="svg action" alt="<?php echo $l->t('Download');?>" src="<?php echo image_path('', 'actions/download.svg'); ?>" /></a>
</div>

View File

@ -1,11 +1,11 @@
<div id="controls">
<ul class="jp-controls">
<li><a href="#" class="jp-play action"><img class="svg" src="<?php echo image_path('core', 'actions/play-big.svg'); ?>" /></a></li>
<li><a href="#" class="jp-pause action"><img class="svg" src="<?php echo image_path('core', 'actions/pause-big.svg'); ?>" /></a></li>
<li><a href="#" class="jp-previous action"><img class="svg" src="<?php echo image_path('core', 'actions/play-previous.svg'); ?>" /></a></li>
<li><a href="#" class="jp-next action"><img class="svg" src="<?php echo image_path('core', 'actions/play-next.svg'); ?>" /></a></li>
<li><a href="#" class="jp-mute action"><img class="svg" src="<?php echo image_path('core', 'actions/sound.svg'); ?>" /></a></li>
<li><a href="#" class="jp-unmute action"><img class="svg" src="<?php echo image_path('core', 'actions/sound-off.svg'); ?>" /></a></li>
<li><a href="#" class="jp-play action"><img class="svg" alt="<?php echo $l->t('Play');?>" src="<?php echo image_path('core', 'actions/play-big.svg'); ?>" /></a></li>
<li><a href="#" class="jp-pause action"><img class="svg" alt="<?php echo $l->t('Pause');?>" src="<?php echo image_path('core', 'actions/pause-big.svg'); ?>" /></a></li>
<li><a href="#" class="jp-previous action"><img class="svg" alt="<?php echo $l->t('Previous');?>" src="<?php echo image_path('core', 'actions/play-previous.svg'); ?>" /></a></li>
<li><a href="#" class="jp-next action"><img class="svg" alt="<?php echo $l->t('Next');?>" src="<?php echo image_path('core', 'actions/play-next.svg'); ?>" /></a></li>
<li><a href="#" class="jp-mute action"><img class="svg" alt="<?php echo $l->t('Mute');?>" src="<?php echo image_path('core', 'actions/sound.svg'); ?>" /></a></li>
<li><a href="#" class="jp-unmute action"><img class="svg" alt="<?php echo $l->t('Unmute');?>" src="<?php echo image_path('core', 'actions/sound-off.svg'); ?>" /></a></li>
</ul>
<div class="jp-progress">
<div class="jp-seek-bar">
@ -26,22 +26,24 @@
<div id="rightcontent">
<div id="scan">
<p id="scancount" style="display:none"><span class="songCount">0</span> <?php echo $l->t('Songs scanned')?>
<input type="button" class="start" value="<?php echo $l->t('Rescan Collection')?>"></input>
<input type="button" class="stop" style="display:none" value="<?php echo $l->t('Pause')?>"></input></p>
<input type="button" class="start" value="<?php echo $l->t('Rescan Collection')?>" />
<input type="button" class="stop" style="display:none" value="<?php echo $l->t('Pause')?>" /></p>
<div id="scanprogressbar"></div>
</div>
<table id="collection">
<thead>
<tr>
<th><?php echo $l->t('Artist')?></th>
<th><?php echo $l->t('Album')?></th>
<th><?php echo $l->t('Title')?></th>
</tr>
</thead>
<tbody>
<tr class="template">
<td class="artist"><a/></td>
<td class="album"><a/></td>
<td class="title"><a/></td>
<td class="artist"><a></a></td>
<td class="album"><a></a></td>
<td class="title"><a></a></td>
</tr>
</tbody>
</table>

View File

@ -101,10 +101,13 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
table tr { -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
tbody tr:hover, tr:active { background-color:#f8f8f8; }
#body-settings .personalblock { padding:.5em 1em; margin:1em; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
#body-settings .personalblock, .pager li { padding:.5em 1em; margin:1em; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
#body-settings .personalblock#quota { position:relative; margin-top:4.5em; padding:0; }
#quota div, div.jp-play-bar, div.jp-seek-bar { padding:.6em 1em; background:#e6e6e6; font-weight:normal; white-space:nowrap; -moz-border-radius-bottomleft:.4em; -webkit-border-bottom-left-radius:.4em; border-bottom-left-radius:.4em; -moz-border-radius-topleft:.4em; -webkit-border-top-left-radius:.4em; border-top-left-radius:.4em; }
div.jp-play-bar, div.jp-seek-bar { padding:0; }
.pager { list-style:none; margin:0 1em; float:right; }
.pager li { display:inline-block; margin:0; }
li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background:#ffe .8em .8em no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }

View File

@ -31,7 +31,7 @@
<form class="searchbox" action="#" method="post">
<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"><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" alt="<?php echo $l->t('Log out');?>" src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></a>
</div></header>
<nav><div id="navigation">
@ -43,7 +43,7 @@
</ul>
<ul id="settings" class="svg">
<img id="expand" class="svg" src="<?php echo image_path('', 'actions/settings.svg'); ?>" />
<img id="expand" class="svg" alt="<?php echo $l->t('Settings');?>" src="<?php echo image_path('', 'actions/settings.svg'); ?>" />
<span style="display:none"><?php echo $l->t('Settings');?></span>
<div id="expanddiv">
<?php foreach($_['settingsnavigation'] as $entry):?>

View File

@ -1,31 +1,22 @@
<center>
<table class="pager" cellspacing="0" cellpadding="0" border="0">
<tr><td width="50%"></td>
<td width="1">
<ol class="pager">
<?php if($_['page']>0):?>
<span class="pagerbutton1"><a href="<?php echo $_['url'].($_['page']-1);?>"><?php echo $l->t( 'prev' ); ?></a>&nbsp;&nbsp;</span>
<li class="pagerbutton1"><a href="<?php echo $_['url'].($_['page']-1);?>"><?php echo $l->t( 'prev' ); ?></a></li>
<?php endif; ?>
</td>
<td width="1">
<?php if ($_['pagestart']>0):?>
...
&hellip;
<?php endif;?>
<?php for ($i=$_['pagestart']; $i < $_['pagestop'];$i++):?>
<?php if ($_['page']!=$i):?>
<a href="<?php echo $_['url'].$i;?>"><?php echo $i+1;?>&nbsp;</a>
<li><a href="<?php echo $_['url'].$i;?>"><?php echo $i+1;?></a></li>
<?php else:?>
<?php echo $i+1;?>&nbsp;
<li><?php echo $i+1;?></li>
<?php endif?>
<?php endfor;?>
<?php if ($_['pagestop']<$_['pagecount']):?>
...
&hellip;
<?php endif;?>
</td>
<td width="1">
<?php if(($_['page']+1)<$_['pagecount']):?>
<span class="pagerbutton2"><a href="<?php echo $_['url'].($_['page']+1);?>"><?php echo $l->t( 'next' ); ?></a></span>
<li class="pagerbutton2"><a href="<?php echo $_['url'].($_['page']+1);?>"><?php echo $l->t( 'next' ); ?></a></li>
<?php endif; ?>
</td>
<td width="50%"></td></tr>
</table>
</center>
</ol>

View File

@ -24,7 +24,7 @@
.file_upload_form, .file_upload_wrapper, .file_upload_start, .file_upload_filename, #file_upload_submit { cursor:pointer; }
/* FILE TABLE */
span#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; }
#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:#f8f8f8; height:1em; }
tbody tr.selected { background-color:#eee; }

View File

@ -81,6 +81,7 @@ $tmpl = new OC_Template( "files", "index", "user" );
$tmpl->assign( "fileList", $list->fetchPage() );
$tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
$tmpl->assign( 'dir', $dir);
$tmpl->assign( "files", $files );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign( 'uploadMaxHumanFilesize', OC_Helper::humanFileSize($maxUploadFilesize));
$tmpl->printPage();

View File

@ -5,9 +5,9 @@
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
<input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
<div class="file_upload_wrapper" class="svg">
<div class="file_upload_wrapper svg">
<input type="submit" class="file_upload_filename" value="<?php echo $l->t('Upload'); ?>"/>
<input class="file_upload_start" class="file_upload_start" type="file" name='files[]'/>
<input class="file_upload_start" type="file" name='files[]'/>
<a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo 'max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
</div>
<iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe>
@ -21,7 +21,9 @@
</div>
<div id='notification'></div>
<table cellspacing="0">
<div id="emptyfolder" <?php if(count($_['files'])) echo 'style="display:none;"';?>><?php echo $l->t('Nothing in here. Upload something!')?></div>
<table>
<thead>
<tr>
<th id='headerName'>
@ -43,8 +45,6 @@
<div id="uploadsize-message" title="<?php echo $l->t('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.' ); ?>
<?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?>
</p>
</div>
<span id="file_menu"/>

View File

@ -1,4 +1,3 @@
<span id="emptyfolder" <?php if(count($_['files'])) echo 'style="display:none;"';?>><?php echo $l->t('Nothing in here. Upload something!')?></span>
<?php foreach($_['files'] as $file):
$simple_file_size = simple_file_size($file['size']);
$simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2

View File

@ -70,8 +70,8 @@ function human_file_size( $bytes ){
function simple_file_size($bytes) {
$mbytes = round($bytes/(1024*1024),1);
if($bytes == 0) { return '0'; }
else if($mbytes < 0.1) { return '< 0.1'; }
else if($mbytes > 1000) { return '> 1000'; }
else if($mbytes < 0.1) { return '&lt; 0.1'; }
else if($mbytes > 1000) { return '&gt; 1000'; }
else { return number_format($mbytes, 1); }
}

View File

@ -131,7 +131,7 @@ $(document).ready(function(){
}
);
var tr=$('#content table tr').first().next().clone();
var tr=$('#content table tbody tr').first().clone();
tr.attr('data-uid',username);
tr.find('td.name').text(username);
var select=$('<select multiple="multiple" data-placehoder="Groups" title="Groups">');
@ -142,10 +142,10 @@ $(document).ready(function(){
select.append($('<option value="'+group+'">'+group+'</option>'));
});
tr.find('td.groups').append(select);
if(tr.find('td.remve img').length==0){
if(tr.find('td.remove img').length==0){
tr.find('td.remove').append($('<img alt="Delete" title="'+t('settings','Delete')+'" class="svg action" src="'+OC.imagePath('core','actions/delete')+'"/>'));
}
applyMultiplySelect(select);
$('#content table tr').last().after(tr);
$('#content table tbody').last().after(tr);
});
});

View File

@ -12,5 +12,5 @@
<h3><strong><span class="name"><?php echo $l->t('Select an App');?></span></strong><span class="version"></span></h3>
<p class="description"></p>
<p class="hidden"><span class="licence"></span><?php echo $l->t('-licensed');?> <?php echo $l->t('by');?> <span class="author"></span></p>
<input class="enable hidden" type="submit"></input>
<input class="enable hidden" type="submit" />
</div>

View File

@ -1,13 +1,13 @@
<?php if(is_null($_["kbe"])):?>
<div class="personalblock">
<p><?php echo $l->t('Problems connecting to help database.');?>
<a href="http://apps.owncloud.com/kb"><?php echo $l->t('Go there manually.');?></a>
<p><?php echo $l->t('Problems connecting to help database.');?></p>
<p><a href="http://apps.owncloud.com/kb"><?php echo $l->t('Go there manually.');?></a></p>
</div>
<?php else:?>
<?php foreach($_["kbe"] as $kb): ?>
<div class="personalblock">
<?php if($kb["preview1"] <> "") { echo('<img class="preview" src="'.$kb["preview1"].'" />'); } ?>
<p><strong><?php if($kb['detailpage']<>'') echo('<p><a target="_blank" href="'.$kb['detailpage'].'"><strong>'.$kb["name"].'</strong></a></p>');?></strong></p>
<?php if($kb['detailpage']<>'') echo('<p><a target="_blank" href="'.$kb['detailpage'].'"><strong>'.$kb["name"].'</strong></a></p>');?>
<p><?php echo $kb['description'];?></p>
<?php if($kb['answer']<>'') echo('<p><strong>'.$l->t('Answer').':</strong><p>'.$kb['answer'].'</p>');?>
</div>

View File

@ -6,17 +6,20 @@ foreach($_["groups"] as $group) {
?>
<table data-groups="<?php echo implode(', ',$allGroups);?>">
<tbody>
<tr id="controls"><form id="newuser">
<th class="name"><input id="newusername" placeholder="<?php echo $l->t('Name')?>"></input></th>
<th class="password"><input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>"></input></th>
<thead id="controls">
<tr><form id="newuser">
<th class="name"><input id="newusername" placeholder="<?php echo $l->t('Name')?>" /></th>
<th class="password"><input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>" /></th>
<th class="groups"><select id="newusergroups" data-placeholder="groups" title="<?php echo $l->t('Groups')?>" multiple="multiple">
<?php foreach($_["groups"] as $group): ?>
<option value="<?php echo $group['name'];?>"><?php echo $group['name'];?></option>
<?php endforeach;?>
</select></th>
<th><input type="submit" value="<?php echo $l->t('Create')?>"></input></th>
<th class="quota"></th>
<th><input type="submit" value="<?php echo $l->t('Create')?>" /></th>
</form></tr>
</thead>
<tbody>
<?php foreach($_["users"] as $user): ?>
<tr data-uid="<?php echo $user["name"] ?>">
<td class="name"><?php echo $user["name"]; ?></td>