Merge branch 'sharing' of git://anongit.kde.org/owncloud into sharing
Conflicts: apps/files_sharing/js/share.js
This commit is contained in:
commit
2af0269eb9
|
@ -28,6 +28,9 @@ if( in_array( $username, OC_User::getUsers())){
|
||||||
// Return Success story
|
// Return Success story
|
||||||
if( OC_User::createUser( $username, $password )){
|
if( OC_User::createUser( $username, $password )){
|
||||||
foreach( $groups as $i ){
|
foreach( $groups as $i ){
|
||||||
|
if(!OC_Group::groupExists($i)){
|
||||||
|
OC_Group::createGroup($i);
|
||||||
|
}
|
||||||
OC_Group::addToGroup( $username, $i );
|
OC_Group::addToGroup( $username, $i );
|
||||||
}
|
}
|
||||||
echo json_encode( array( "status" => "success", "data" => array( "username" => $username, "groups" => implode( ", ", OC_Group::getUserGroups( $username )))));
|
echo json_encode( array( "status" => "success", "data" => array( "username" => $username, "groups" => implode( ", ", OC_Group::getUserGroups( $username )))));
|
||||||
|
|
|
@ -19,11 +19,19 @@ $action = "add";
|
||||||
$username = $_POST["username"];
|
$username = $_POST["username"];
|
||||||
$group = $_POST["group"];
|
$group = $_POST["group"];
|
||||||
|
|
||||||
|
if(!OC_Group::groupExists($group)){
|
||||||
|
OC_Group::createGroup($group);
|
||||||
|
}
|
||||||
|
|
||||||
// Toggle group
|
// Toggle group
|
||||||
if( OC_Group::inGroup( $username, $group )){
|
if( OC_Group::inGroup( $username, $group )){
|
||||||
$action = "remove";
|
$action = "remove";
|
||||||
$error = "remove user from";
|
$error = "remove user from";
|
||||||
$success = OC_Group::removeFromGroup( $username, $group );
|
$success = OC_Group::removeFromGroup( $username, $group );
|
||||||
|
$usersInGroup=OC_Group::usersInGroup($group);
|
||||||
|
if(count($usersInGroup)==0){
|
||||||
|
OC_Group::deleteGroup($group);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$success = OC_Group::addToGroup( $username, $group );
|
$success = OC_Group::addToGroup( $username, $group );
|
||||||
|
|
|
@ -33,12 +33,17 @@ OC_Util::addScript( "admin", "apps" );
|
||||||
|
|
||||||
$registeredApps=OC_App::getAllApps();
|
$registeredApps=OC_App::getAllApps();
|
||||||
$apps=array();
|
$apps=array();
|
||||||
|
|
||||||
|
$blacklist=array('files_imageviewer','files_textviewer');//we dont want to show configuration for these
|
||||||
|
|
||||||
foreach($registeredApps as $app){
|
foreach($registeredApps as $app){
|
||||||
|
if(array_search($app,$blacklist)===false){
|
||||||
$info=OC_App::getAppInfo($app);
|
$info=OC_App::getAppInfo($app);
|
||||||
$active=(OC_Appconfig::getValue($app,'enabled','no')=='yes')?true:false;
|
$active=(OC_Appconfig::getValue($app,'enabled','no')=='yes')?true:false;
|
||||||
$info['active']=$active;
|
$info['active']=$active;
|
||||||
$apps[]=$info;
|
$apps[]=$info;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$categories=OC_OCSClient::getCategories();
|
$categories=OC_OCSClient::getCategories();
|
||||||
// print_r($categories);
|
// print_r($categories);
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
form {display:inline}
|
form { display:inline; }
|
||||||
td.remove>img,td.select>input{display:none;cursor:pointer}
|
td.password>img, td.remove>img{ display:none;cursor:pointer; }
|
||||||
td.select,td.remove{width:1em}
|
td.password>span { margin-right:1.2em; }
|
||||||
tr:hover>td.remove>img{display:inline}
|
td.password { width:12em; }
|
||||||
li.selected{background-color:#ddd}
|
td.password>img { float:right; }
|
||||||
|
|
||||||
|
td.remove { width:1em }
|
||||||
|
tr:hover>td.password>span{ margin:0; }
|
||||||
|
tr:hover>td.remove>img, tr:hover>td.password>img { display:inline; }
|
||||||
|
li.selected { background-color:#ddd; }
|
||||||
|
#content>table { margin-top:6.5em; }
|
||||||
|
table { width:100%; }
|
||||||
|
|
|
@ -1,5 +1,37 @@
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('select[multiple]').chosen();
|
function applyMultiplySelect(element){
|
||||||
|
var checked=[];
|
||||||
|
var user=element.data('username')
|
||||||
|
if(element.data('userGroups')){
|
||||||
|
checked=element.data('userGroups').split(', ');
|
||||||
|
}
|
||||||
|
if(user){
|
||||||
|
var checkHandeler=function(group){
|
||||||
|
if(user==OC.currentUser && group=='admin'){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.post(
|
||||||
|
OC.filePath('admin','ajax','togglegroups.php'),
|
||||||
|
{
|
||||||
|
username:user,
|
||||||
|
group:group
|
||||||
|
},
|
||||||
|
function(){}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
checkHandeler=false;
|
||||||
|
}
|
||||||
|
element.multiSelect({
|
||||||
|
createText:'add group',
|
||||||
|
checked:checked,
|
||||||
|
oncheck:checkHandeler,
|
||||||
|
onuncheck:checkHandeler
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$('select[multiple]').each(function(index,element){
|
||||||
|
applyMultiplySelect($(element));
|
||||||
|
});
|
||||||
|
|
||||||
$('td.remove>img').live('click',function(event){
|
$('td.remove>img').live('click',function(event){
|
||||||
var uid=$(this).parent().parent().data('uid');
|
var uid=$(this).parent().parent().data('uid');
|
||||||
|
@ -13,11 +45,38 @@ $(document).ready(function(){
|
||||||
$(this).parent().parent().remove();
|
$(this).parent().parent().remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('td.password>img').live('click',function(event){
|
||||||
|
var img=$(this);
|
||||||
|
var uid=img.parent().parent().data('uid');
|
||||||
|
var input=$('<input type="password">');
|
||||||
|
img.css('display','none');
|
||||||
|
img.parent().children('span').replaceWith(input);
|
||||||
|
input.focus();
|
||||||
|
input.keypress(function(event) {
|
||||||
|
if(event.keyCode == 13) {
|
||||||
|
if($(this).val().length>0){
|
||||||
|
$.post(
|
||||||
|
OC.filePath('admin','ajax','changepassword.php'),
|
||||||
|
{username:uid,password:$(this).val()},
|
||||||
|
function(result){}
|
||||||
|
);
|
||||||
|
input.blur();
|
||||||
|
}else{
|
||||||
|
input.blur();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
input.blur(function(){
|
||||||
|
$(this).replaceWith($('<span>●●●●●●●</span>'));
|
||||||
|
img.css('display','');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$('#newuser').submit(function(event){
|
$('#newuser').submit(function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var username=$('#newusername').val();
|
var username=$('#newusername').val();
|
||||||
var password=$('#newuserpassword').val();
|
var password=$('#newuserpassword').val();
|
||||||
var groups=$('#newusergroups').val();
|
var groups=$('#newusergroups').prev().children('div').data('settings').checked;
|
||||||
$.post(
|
$.post(
|
||||||
OC.filePath('admin','ajax','createuser.php'),
|
OC.filePath('admin','ajax','createuser.php'),
|
||||||
{
|
{
|
||||||
|
@ -29,72 +88,21 @@ $(document).ready(function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
var tr=$('#rightcontent tr').first().clone();
|
var tr=$('#content table tr').first().clone();
|
||||||
tr.attr('data-uid',username);
|
tr.attr('data-uid',username);
|
||||||
tr.find('td.name').text(username);
|
tr.find('td.name').text(username);
|
||||||
tr.find('td.groups').text(groups.join(', '));
|
var select=$('<select multiple="multiple" data-placehoder="Groups" title="Groups">');
|
||||||
$('#rightcontent tr').first().after(tr);
|
select.data('username',username);
|
||||||
if(groups.indexOf($('#leftcontent li.selected').text().trim())!=-1){
|
select.data('userGroups',groups.join(', '));
|
||||||
tr.find('td.select input').attr('checked','checked');
|
tr.find('td.groups').empty();
|
||||||
}
|
$.each($('#content table').data('groups').split(', '),function(i,group){
|
||||||
|
select.append($('<option value="'+group+'">'+group+'</option>'));
|
||||||
});
|
});
|
||||||
|
tr.find('td.groups').append(select);
|
||||||
$('#newgroup').submit(function(event){
|
if(tr.find('td.remve img').length==0){
|
||||||
event.preventDefault();
|
tr.find('td.remove').append($('<img alt="Remove" title="'+t('admin','Remove')+'" class="svg" src="'+OC.imagePath('core','actions/delete')+'"/>'));
|
||||||
var name=$('#newgroupname').val();
|
|
||||||
$.post(
|
|
||||||
OC.filePath('admin','ajax','creategroup.php'),
|
|
||||||
{groupname:name},
|
|
||||||
function(result){
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$('#newusergroups').append('<option value="'+name+'">'+name+'</option>');
|
|
||||||
$('select[multiple]').trigger("liszt:updated");
|
|
||||||
var li=$('#leftcontent li').first().next().clone();
|
|
||||||
li.text(name);
|
|
||||||
$('#leftcontent li').first().after(li);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#leftcontent li').live('click',function(event){
|
|
||||||
$('#leftcontent li').removeClass('selected');
|
|
||||||
$(this).addClass('selected');
|
|
||||||
$('#rightcontent tr td.select input').show();
|
|
||||||
$('#rightcontent tr td.select input').removeAttr('checked');
|
|
||||||
var group=$(this).text().trim();
|
|
||||||
var rows=$('#rightcontent tr').filter(function(i,tr){
|
|
||||||
return ($(tr).children('td.groups').text().split(', ').indexOf(group)>-1);
|
|
||||||
});
|
|
||||||
rows.find('td.select input').attr('checked','checked');
|
|
||||||
});
|
|
||||||
$('#rightcontent tr td.select input').live('change',function(event){
|
|
||||||
var group=$('#leftcontent li.selected').text().trim();
|
|
||||||
var user=$(this).parent().parent().children('td.name').text().trim();
|
|
||||||
if(group=='admin' && user==OC.currentUser){
|
|
||||||
event.preventDefault();
|
|
||||||
$(this).attr('checked','checked');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(group){
|
|
||||||
$.post(
|
|
||||||
OC.filePath('admin','ajax','togglegroups.php'),
|
|
||||||
{
|
|
||||||
username:user,
|
|
||||||
group:group
|
|
||||||
},
|
|
||||||
function(result){
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
var groups=$(this).parent().parent().children('td.groups').text().trim().split(', ');
|
|
||||||
if(groups[0]=='') groups.pop();
|
|
||||||
var index=groups.indexOf(group);
|
|
||||||
if(index==-1){
|
|
||||||
groups.push(group);
|
|
||||||
}else{
|
|
||||||
groups.splice(index,1);
|
|
||||||
}
|
|
||||||
$(this).parent().parent().children('td.groups').text(groups.join(', '));
|
|
||||||
}
|
}
|
||||||
|
applyMultiplySelect(select);
|
||||||
|
$('#content table tr').last().after(tr);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
<div id="controls">
|
<div id="controls">
|
||||||
<form id="newgroup">
|
|
||||||
<input id="newgroupname" placeholder="<?php echo $l->t('Name')?>"></input>
|
|
||||||
<input type="submit" value="<?php echo $l->t('Create')?>"></input>
|
|
||||||
</form>
|
|
||||||
<form id="newuser">
|
<form id="newuser">
|
||||||
<input id="newusername" placeholder="<?php echo $l->t('Name')?>"></input>
|
<input id="newusername" placeholder="<?php echo $l->t('Name')?>"></input>
|
||||||
<input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>"></input>
|
<input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>"></input>
|
||||||
|
@ -14,20 +10,27 @@
|
||||||
<input type="submit" value="<?php echo $l->t('Create')?>"></input>
|
<input type="submit" value="<?php echo $l->t('Create')?>"></input>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<ul id="leftcontent">
|
<?php
|
||||||
<?php foreach($_["groups"] as $group): ?>
|
$allGroups=array();
|
||||||
<li data-gid="<?php echo $group["name"]; ?>">
|
foreach($_["groups"] as $group){
|
||||||
<?php echo $group["name"] ?>
|
$allGroups[]=$group['name'];
|
||||||
</li>
|
}
|
||||||
<?php endforeach; ?>
|
?>
|
||||||
</ul>
|
<table data-groups="<?php echo implode(', ',$allGroups);?>">
|
||||||
<div id="rightcontent">
|
|
||||||
<table>
|
|
||||||
<?php foreach($_["users"] as $user): ?>
|
<?php foreach($_["users"] as $user): ?>
|
||||||
<tr data-uid="<?php echo $user["name"] ?>">
|
<tr data-uid="<?php echo $user["name"] ?>">
|
||||||
<td class="select"><input type="checkbox"></input></td>
|
|
||||||
<td class="name"><?php echo $user["name"]; ?></td>
|
<td class="name"><?php echo $user["name"]; ?></td>
|
||||||
<td class="groups"><?php if( $user["groups"] ){ echo $user["groups"]; }else{echo " ";} ?></td>
|
<td class="password">
|
||||||
|
<span>●●●●●●●</span>
|
||||||
|
<img class="svg" src="<?php echo image_path('core','actions/rename.svg')?>"/>
|
||||||
|
</td>
|
||||||
|
<td class="groups">
|
||||||
|
<select data-username="<?php echo $user['name'] ;?>" data-user-groups="<?php echo $user['groups'] ;?>" 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>
|
||||||
|
</td>
|
||||||
<td class="remove">
|
<td class="remove">
|
||||||
<?php if($user['name']!=OC_User::getUser()):?>
|
<?php if($user['name']!=OC_User::getUser()):?>
|
||||||
<img alt="Remove" title="<?php echo $l->t('Remove')?>" class='svg' src='<?php echo image_path('core','actions/delete.svg') ?>'/>
|
<img alt="Remove" title="<?php echo $l->t('Remove')?>" class='svg' src='<?php echo image_path('core','actions/delete.svg') ?>'/>
|
||||||
|
@ -36,7 +39,3 @@
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
<div id="#selecteduser">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -38,12 +38,7 @@ $users = array();
|
||||||
$groups = array();
|
$groups = array();
|
||||||
|
|
||||||
foreach( OC_User::getUsers() as $i ){
|
foreach( OC_User::getUsers() as $i ){
|
||||||
// Do some more work here soon
|
$users[] = array( "name" => $i, "groups" => join( ", ", OC_Group::getUserGroups( $i ) ));
|
||||||
$ingroups = array();
|
|
||||||
foreach( OC_Group::getUserGroups( $i ) as $userGroup ){
|
|
||||||
$ingroups[] = $userGroup;
|
|
||||||
}
|
|
||||||
$users[] = array( "name" => $i, "groups" => join( ", ", $ingroups ));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach( OC_Group::getGroups() as $i ){
|
foreach( OC_Group::getGroups() as $i ){
|
||||||
|
|
|
@ -4,12 +4,12 @@ $(document).ready(function(){
|
||||||
return false;
|
return false;
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
$('#contacts_contacts li').live('click',function(){
|
$('#leftcontent li').live('click',function(){
|
||||||
var id = $(this).data('id');
|
var id = $(this).data('id');
|
||||||
$.getJSON('ajax/getdetails.php',{'id':id},function(jsondata){
|
$.getJSON('ajax/getdetails.php',{'id':id},function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
$('#contacts_details').data('id',jsondata.data.id);
|
$('#rightcontent').data('id',jsondata.data.id);
|
||||||
$('#contacts_details').html(jsondata.data.page);
|
$('#rightcontent').html(jsondata.data.page);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert(jsondata.data.message);
|
alert(jsondata.data.message);
|
||||||
|
@ -19,12 +19,12 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#contacts_deletecard').live('click',function(){
|
$('#contacts_deletecard').live('click',function(){
|
||||||
var id = $('#contacts_details').data('id');
|
var id = $('#rightcontent').data('id');
|
||||||
$.getJSON('ajax/deletecard.php',{'id':id},function(jsondata){
|
$.getJSON('ajax/deletecard.php',{'id':id},function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
$('#contacts_contacts [data-id="'+jsondata.data.id+'"]').remove();
|
$('#leftcontent [data-id="'+jsondata.data.id+'"]').remove();
|
||||||
$('#contacts_details').data('id','');
|
$('#rightcontent').data('id','');
|
||||||
$('#contacts_details').html('');
|
$('#rightcontent').html('');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert(jsondata.data.message);
|
alert(jsondata.data.message);
|
||||||
|
@ -34,10 +34,10 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#contacts_addproperty').live('click',function(){
|
$('#contacts_addproperty').live('click',function(){
|
||||||
var id = $('#contacts_details').data('id');
|
var id = $('#rightcontent').data('id');
|
||||||
$.getJSON('ajax/showaddproperty.php',{'id':id},function(jsondata){
|
$.getJSON('ajax/showaddproperty.php',{'id':id},function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
$('#contacts_details').append(jsondata.data.page);
|
$('#rightcontent').append(jsondata.data.page);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert(jsondata.data.message);
|
alert(jsondata.data.message);
|
||||||
|
@ -79,8 +79,8 @@ $(document).ready(function(){
|
||||||
$('#contacts_newcontact').click(function(){
|
$('#contacts_newcontact').click(function(){
|
||||||
$.getJSON('ajax/showaddcard.php',{},function(jsondata){
|
$.getJSON('ajax/showaddcard.php',{},function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
$('#contacts_details').data('id','');
|
$('#rightcontent').data('id','');
|
||||||
$('#contacts_details').html(jsondata.data.page);
|
$('#rightcontent').html(jsondata.data.page);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert(jsondata.data.message);
|
alert(jsondata.data.message);
|
||||||
|
@ -92,8 +92,8 @@ $(document).ready(function(){
|
||||||
$('#contacts_addcardform input[type="submit"]').live('click',function(){
|
$('#contacts_addcardform input[type="submit"]').live('click',function(){
|
||||||
$.post('ajax/addcard.php',$('#contacts_addcardform').serialize(),function(jsondata){
|
$.post('ajax/addcard.php',$('#contacts_addcardform').serialize(),function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
$('#contacts_details').data('id',jsondata.data.id);
|
$('#rightcontent').data('id',jsondata.data.id);
|
||||||
$('#contacts_details').html(jsondata.data.page);
|
$('#rightcontent').html(jsondata.data.page);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert(jsondata.data.message);
|
alert(jsondata.data.message);
|
||||||
|
@ -103,7 +103,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.contacts_property [data-use="edit"]').live('click',function(){
|
$('.contacts_property [data-use="edit"]').live('click',function(){
|
||||||
var id = $('#contacts_details').data('id');
|
var id = $('#rightcontent').data('id');
|
||||||
var checksum = $(this).parent().parent().data('checksum');
|
var checksum = $(this).parent().parent().data('checksum');
|
||||||
$.getJSON('ajax/showsetproperty.php',{'id': id, 'checksum': checksum },function(jsondata){
|
$.getJSON('ajax/showsetproperty.php',{'id': id, 'checksum': checksum },function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
|
@ -129,7 +129,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.contacts_property [data-use="delete"]').live('click',function(){
|
$('.contacts_property [data-use="delete"]').live('click',function(){
|
||||||
var id = $('#contacts_details').data('id');
|
var id = $('#rightcontent').data('id');
|
||||||
var checksum = $(this).parent().parent().data('checksum');
|
var checksum = $(this).parent().parent().data('checksum');
|
||||||
$.getJSON('ajax/deleteproperty.php',{'id': id, 'checksum': checksum },function(jsondata){
|
$.getJSON('ajax/deleteproperty.php',{'id': id, 'checksum': checksum },function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
|
|
|
@ -120,10 +120,10 @@ class OC_Contacts_Addressbook{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function deleteAddressbook($id){
|
public static function deleteAddressbook($id){
|
||||||
$stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_cards WHERE id = ?' );
|
$stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_addressbooks WHERE id = ?' );
|
||||||
$stmt->execute(array($id));
|
$stmt->execute(array($id));
|
||||||
|
|
||||||
$stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_addressbooks WHERE addressbookid = ?' );
|
$stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*contacts_cards WHERE addressbookid = ?' );
|
||||||
$stmt->execute(array($id));
|
$stmt->execute(array($id));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -3,15 +3,15 @@ OC_Util::addScript('contacts','interface');
|
||||||
OC_Util::addStyle('contacts','styles');
|
OC_Util::addStyle('contacts','styles');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="contacts_contacts" class="leftcontent">
|
<div id="leftcontent" class="leftcontent">
|
||||||
<ul>
|
<ul>
|
||||||
<?php echo $this->inc("part.contacts"); ?>
|
<?php echo $this->inc("part.contacts"); ?>
|
||||||
</ul>
|
</ul>
|
||||||
<a id="contacts_newcontact"><?php echo $l->t('Add Contact'); ?></a>
|
<a id="contacts_newcontact"><?php echo $l->t('Add Contact'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="contacts_details" class="rightcontent" data-id="<?php echo $_['id']; ?>">
|
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
|
||||||
<?php echo $this->inc("part.details"); ?>
|
<?php echo $this->inc("part.details"); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if(count($_['addressbooks']) == 1 ): ?>
|
<?php if(count($_['addressbooks']) == 1 ): ?>
|
||||||
<?php echo $l->t('The path to this addressbook is %s', array(OC::$WEBROOT.'/apps/contacts/carddav.php/addressbooks/'.$_['addressbooks'][0]['uri'])); ?>
|
<?php echo $l->t('The path to this addressbook is %s', array(OC::$WEBROOT.'/apps/contacts/carddav.php/addressbooks/'.OC_User::getUser().'/'.$_['addressbooks'][0]['uri'])); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -31,11 +31,13 @@ $(document).ready(function() {
|
||||||
if(token){
|
if(token){
|
||||||
var html="<tr class='link' id='"+token+"'>";
|
var html="<tr class='link' id='"+token+"'>";
|
||||||
html+="<td class='path'>"+path+"</td>";
|
html+="<td class='path'>"+path+"</td>";
|
||||||
html+="<td class='link'><a href='get.php?token="+token+"'>"+$('#baseUrl').val()+"?token="+token+"</a></td>"
|
html+="<td class='link'><input type='text' value='"+$('#baseUrl').val()+"?token="+token+"' /></td>"
|
||||||
html+="<td><input type='submit' class='delete' data-token='"+token+" value='Delete' /></td>"
|
html+="<td><input type='submit' class='delete' data-token='"+token+" value='Delete' /></td>"
|
||||||
html+="</tr>"
|
html+="</tr>"
|
||||||
$(html).insertAfter($('#newlink_row'));
|
$(html).insertAfter($('#newlink_row'));
|
||||||
$('#path').val('');
|
$('#path').val('');
|
||||||
|
$('#'+token+' input').focus();
|
||||||
|
$('#'+token+' input').select();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
<input type="hidden" id="baseUrl" value="<?php echo $_['baseUrl'];?>"/>
|
<input type="hidden" id="baseUrl" value="<?php echo $_['baseUrl'];?>"/>
|
||||||
<table id="linklist">
|
<table id="linklist">
|
||||||
<tbody>
|
<thead id="controls">
|
||||||
<tr id="newlink_row">
|
<tr id="newlink_row">
|
||||||
<form action="#" id="newlink">
|
<form action="#" id="newlink">
|
||||||
<td class="path"><input placeholder="Path" id="path"/></td>
|
<td class="path"><input placeholder="Path" id="path"/></td>
|
||||||
<td><input type="submit" value="Share" /></td>
|
<td><input type="submit" value="Share" /></td>
|
||||||
</form>
|
</form>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<?php foreach($_['links'] as $link):?>
|
<?php foreach($_['links'] as $link):?>
|
||||||
<tr class="link" id="<?php echo $link['token'];?>">
|
<tr class="link" id="<?php echo $link['token'];?>">
|
||||||
<td class="path"><?php echo $link['path'];?></td>
|
<td class="path"><?php echo $link['path'];?></td>
|
||||||
<td class="link"><a href="get.php?token=<?php echo $link['token'];?>"><?php echo $_['baseUrl'];?>?token=<?php echo $link['token'];?></a></td>
|
<td class="link"><input type="text" value="<?php echo $_['baseUrl'];?>?token=<?php echo $link['token'];?>" /></td>
|
||||||
<td><input type="submit" class="delete" data-token="<?php echo $link['token'];?>" value="<?php echo $l->t( 'Delete' ); ?>" /></td>
|
<td><input type="submit" class="delete" data-token="<?php echo $link['token'];?>" value="<?php echo $l->t( 'Delete' ); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<a href="<?php echo link_to("files_publiclink", "get.php?token=".$_['token']); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a>
|
|
||||||
<?php foreach($_["breadcrumb"] as $crumb): ?>
|
|
||||||
<a href="<?php echo link_to("files_publiclink", "get.php?token=".$_['token']."&path=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
|
|
||||||
<?php endforeach; ?>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?php foreach($_["files"] as $file): ?>
|
|
||||||
<tr>
|
|
||||||
<td class="selection"><input type="checkbox" /></td>
|
|
||||||
<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_publiclink", "get.php?token=".$_['token']."&path=".$file["directory"]."/".$file["name"]); else echo link_to("files_publiclink", "get.php?token=".$_['token']."&path=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo htmlspecialchars($file["name"]); ?></a></td>
|
|
||||||
<td class="filesize"><?php echo human_file_size($file["size"]); ?></td>
|
|
||||||
<td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td>
|
|
||||||
<td class="fileaction"><a href="" title="">▾</a></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<p class="nav">
|
|
||||||
<?php echo($_['breadcrumb']); ?>
|
|
||||||
</p>
|
|
||||||
<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' ); ?></th>
|
|
||||||
<th><?php echo $l->t( 'Modified' ); ?></th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody id="fileList">
|
|
||||||
<?php echo($_['fileList']); ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
|
@ -1,7 +1,9 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
if (typeof FileActions !== 'undefined') {
|
||||||
FileActions.register('all', 'Share', OC.imagePath('core', 'actions/share'), function(filename) {
|
FileActions.register('all', 'Share', OC.imagePath('core', 'actions/share'), function(filename) {
|
||||||
createDropdown(filename, $('#dir').val()+'/'+filename);
|
createDropdown(filename, $('#dir').val()+'/'+filename);
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$('.share').click(function(event) {
|
$('.share').click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -25,6 +27,17 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(this).click(function(event) {
|
||||||
|
if ($(event.target).parents().index($('#dropdown')) == -1) {
|
||||||
|
if ($('#dropdown').is(':visible')) {
|
||||||
|
$('#dropdown').hide('blind', function() {
|
||||||
|
$('#dropdown').remove();
|
||||||
|
$('tr').removeClass('mouseOver');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('#share_with').live('change', function() {
|
$('#share_with').live('change', function() {
|
||||||
var source = $('#dropdown').data('file');
|
var source = $('#dropdown').data('file');
|
||||||
var uid_shared_with = $(this).val();
|
var uid_shared_with = $(this).val();
|
||||||
|
@ -182,6 +195,6 @@ function addUser(uid_shared_with, permissions, parentFolder) {
|
||||||
user += "<a href='' title='Unshare' class='unshare' style='display:none;'><img class='svg' src='"+OC.imagePath('core','actions/delete')+"'/></a></li>";
|
user += "<a href='' title='Unshare' class='unshare' style='display:none;'><img class='svg' src='"+OC.imagePath('core','actions/delete')+"'/></a></li>";
|
||||||
}
|
}
|
||||||
$('#share_with option[value="'+uid_shared_with+'"]').remove();
|
$('#share_with option[value="'+uid_shared_with+'"]').remove();
|
||||||
$('share_with').trigger('liszt:updated');
|
$('#share_with').trigger('liszt:updated');
|
||||||
$(user).appendTo('#shared_list');
|
$(user).appendTo('#shared_list');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Your Shared Files</legend>
|
<legend>Your Shared Files</legend>
|
||||||
<table id='itemlist'>
|
<table id="itemlist">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Item</th>
|
<th>Item</th>
|
||||||
|
@ -10,19 +10,19 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach($_['shared_items'] as $item):?>
|
<?php foreach($_['shared_items'] as $item):?>
|
||||||
<tr class='item'>
|
<tr class="item">
|
||||||
<td class='source'><?php echo substr($item['source'], strlen("/".$_SESSION['user_id']."/files/"));?></td>
|
<td class="source"><?php echo substr($item['source'], strlen("/".$_SESSION['user_id']."/files/"));?></td>
|
||||||
<td class='uid_shared_with'><?php echo $item['uid_shared_with'];?></td>
|
<td class="uid_shared_with"><?php echo $item['uid_shared_with'];?></td>
|
||||||
<td class='permissions'><?php echo "Read"; echo($item['permissions'] & OC_SHARE::WRITE ? ", Edit" : ""); echo($item['permissions'] & OC_SHARE::DELETE ? ", Delete" : "");?></td>
|
<td class="permissions"><?php echo "Read"; echo($item['permissions'] & OC_SHARE::WRITE ? ", Edit" : ""); echo($item['permissions'] & OC_SHARE::DELETE ? ", Delete" : "");?></td>
|
||||||
<td><button class='delete fancybutton' data-source='<?php echo $item['source'];?>' data-uid_shared_with='<?php echo $item['uid_shared_with'];?>'>Delete</button></td>
|
<td><button class="delete" data-source="<?php echo $item['source'];?>" data-uid_shared_with="<?php echo $item['uid_shared_with'];?>">Delete</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
<tr id='share_item_row'>
|
<tr id="share_item_row">
|
||||||
<form action='#' id='share_item'>
|
<form action="#" id="share_item">
|
||||||
<td class='source'><input placeholder='Item' id='source'/></td>
|
<td class="source"><input placeholder="Item" id="source" /></td>
|
||||||
<td class='uid_shared_with'><input placeholder='Share With' id='uid_shared_with'/></td>
|
<td class="uid_shared_with"><input placeholder="Share With" id="uid_shared_with" /></td>
|
||||||
<td class='permissions'><input placeholder='Permissions' id='permissions'/></td>
|
<td class="permissions"><input placeholder="Permissions" id="permissions" /></td>
|
||||||
<td><input type='submit' value='Share'/></td>
|
<td><input type="submit" value="Share" /></td>
|
||||||
</form>
|
</form>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -3,17 +3,13 @@
|
||||||
li button.right.prettybutton{font-size:1em;}
|
li button.right.prettybutton{font-size:1em;}
|
||||||
#collection{padding-top:1em;position:relative;width:70ex;float:left;}
|
#collection{padding-top:1em;position:relative;width:70ex;float:left;}
|
||||||
#collection li.album,#collection li.song{margin-left:3ex;}
|
#collection li.album,#collection li.song{margin-left:3ex;}
|
||||||
#playlist{border-spacing:0;}
|
#leftcontent img.remove { display:none; float:right; cursor:pointer; }
|
||||||
#playlist th{background-color:#ccc; text-align:left; font-size:1.2em; padding:0.2em}
|
#leftcontent li:hover img.remove { display:inline; }
|
||||||
#playlist tr.selected{background-color:#eee;}
|
|
||||||
#playlist tr.current{background-color:#ccc;}
|
|
||||||
#playlist td.time, #playlist th.time{text-align:right; padding-right:1em;}
|
|
||||||
#collection li button{float:right;}
|
#collection li button{float:right;}
|
||||||
#collection li,#playlist li{list-style-type:none;}
|
#collection li,#playlist li{list-style-type:none;}
|
||||||
.template{display:none}
|
.template{display:none}
|
||||||
|
|
||||||
#collection li{padding-right:10px;}
|
#collection li{padding-right:10px;}
|
||||||
img.remove{float:right;}
|
|
||||||
#searchresults input.play, #searchresults input.add{float:right; height:16px; width:16px;}
|
#searchresults input.play, #searchresults input.add{float:right; height:16px; width:16px;}
|
||||||
#collection tr.collapsed td.album, #collection tr.collapsed td.title{color:#ddd}
|
#collection tr.collapsed td.album, #collection tr.collapsed td.title{color:#ddd}
|
||||||
a.expander{float:right;display:block}
|
a.expander{float:right;display:block}
|
||||||
|
|
|
@ -30,7 +30,7 @@ var PlayList={
|
||||||
if(PlayList.player){
|
if(PlayList.player){
|
||||||
if(PlayList.player.data('jPlayer').options.supplied!=PlayList.items[index].type){//the the audio type changes we need to reinitialize jplayer
|
if(PlayList.player.data('jPlayer').options.supplied!=PlayList.items[index].type){//the the audio type changes we need to reinitialize jplayer
|
||||||
PlayList.player.jPlayer("destroy");
|
PlayList.player.jPlayer("destroy");
|
||||||
PlayList.init(PlayList.items[index].type,function(){PlayList.play(null,time,eady)});
|
PlayList.init(PlayList.items[index].type,function(){PlayList.play(null,time,ready)});
|
||||||
}else{
|
}else{
|
||||||
PlayList.player.jPlayer("setMedia", PlayList.items[PlayList.current]);
|
PlayList.player.jPlayer("setMedia", PlayList.items[PlayList.current]);
|
||||||
PlayList.items[index].playcount++;
|
PlayList.items[index].playcount++;
|
||||||
|
@ -73,7 +73,7 @@ var PlayList={
|
||||||
PlayList.render();
|
PlayList.render();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
PlayList.player=$('#jp-interface div.player');
|
PlayList.player=$('#controls div.player');
|
||||||
}
|
}
|
||||||
$(PlayList.player).jPlayer({
|
$(PlayList.player).jPlayer({
|
||||||
ended:PlayList.next,
|
ended:PlayList.next,
|
||||||
|
@ -91,7 +91,7 @@ var PlayList={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
volume:PlayList.volume,
|
volume:PlayList.volume,
|
||||||
cssSelectorAncestor:'#jp-interface',
|
cssSelectorAncestor:'#controls',
|
||||||
swfPath:OC.linkTo('media','js'),
|
swfPath:OC.linkTo('media','js'),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,49 +2,21 @@ PlayList.render=function(){
|
||||||
$('#playlist').show();
|
$('#playlist').show();
|
||||||
PlayList.parent.empty();
|
PlayList.parent.empty();
|
||||||
for(var i=0;i<PlayList.items.length;i++){
|
for(var i=0;i<PlayList.items.length;i++){
|
||||||
var tr=PlayList.template.clone();
|
|
||||||
var item=PlayList.items[i];
|
var item=PlayList.items[i];
|
||||||
if(i==PlayList.current){
|
var li=$('<li/>');
|
||||||
tr.addClass('current');
|
li.append(item.name);
|
||||||
}
|
var img=$('<img class="remove" src="'+OC.imagePath('core','actions/delete')+'"/>');
|
||||||
tr.removeClass('template');
|
img.click(function(event){
|
||||||
tr.data('name',item.name);
|
event.stopPropagation();
|
||||||
tr.data('artist',item.artist);
|
PlayList.remove($(this).parent().data('index'));
|
||||||
tr.children('td.name').children('span').text(item.name);
|
});
|
||||||
tr.children('td.artist').text(item.artist);
|
li.click(function(event){
|
||||||
tr.children('td.album').text(item.album);
|
|
||||||
tr.data('index',i);
|
|
||||||
tr.click(function(){
|
|
||||||
PlayList.play($(this).data('index'));
|
PlayList.play($(this).data('index'));
|
||||||
PlayList.render();
|
|
||||||
});
|
});
|
||||||
tr.hover(function(){
|
li.append(img)
|
||||||
var button=$('<img class="remove" title="'+t('media','Remove')+'"/>');
|
li.data('index',i);
|
||||||
button.attr('src',OC.imagePath('core','actions/delete'));
|
li.addClass('song');
|
||||||
$(this).children().last().append(button);
|
PlayList.parent.append(li);
|
||||||
button.click(function(event){
|
|
||||||
event.stopPropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
var index=$(this).parent().parent().data('index');
|
|
||||||
PlayList.remove(index);
|
|
||||||
});
|
|
||||||
},function(){
|
|
||||||
$(this).children().last().children('img.remove').remove();
|
|
||||||
});
|
|
||||||
tr.children('td.name').children('input').click(function(event){
|
|
||||||
event.stopPropagation();
|
|
||||||
if($(this).attr('checked')){
|
|
||||||
$(this).parent().parent().addClass('selected');
|
|
||||||
if($('tbody td.name input:checkbox').length==$('tbody td.name input:checkbox:checked').length){
|
|
||||||
$('#selectAll').attr('checked',true);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$(this).parent().parent().removeClass('selected');
|
|
||||||
$('#selectAll').attr('checked',false);
|
|
||||||
}
|
|
||||||
procesSelection();
|
|
||||||
});
|
|
||||||
PlayList.parent.append(tr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlayList.getSelected=function(){
|
PlayList.getSelected=function(){
|
||||||
|
@ -55,78 +27,16 @@ PlayList.hide=function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
PlayList.parent=$('#playlist tbody');
|
PlayList.parent=$('#leftcontent');
|
||||||
PlayList.template=$('#playlist tr.template');
|
|
||||||
$('#selectAll').click(function(){
|
$('#selectAll').click(function(){
|
||||||
if($(this).attr('checked')){
|
if($(this).attr('checked')){
|
||||||
// Check all
|
// Check all
|
||||||
$('tbody td.name input:checkbox').attr('checked', true);
|
$('#leftcontent li.song input:checkbox').attr('checked', true);
|
||||||
$('tbody td.name input:checkbox').parent().parent().addClass('selected');
|
$('#leftcontent li.song input:checkbox').parent().addClass('selected');
|
||||||
}else{
|
}else{
|
||||||
// Uncheck all
|
// Uncheck all
|
||||||
$('tbody td.name input:checkbox').attr('checked', false);
|
$('#leftcontent li.song input:checkbox').attr('checked', false);
|
||||||
$('tbody td.name input:checkbox').parent().parent().removeClass('selected');
|
$('#leftcontent li.song input:checkbox').parent().removeClass('selected');
|
||||||
}
|
}
|
||||||
procesSelection();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function procesSelection(){
|
|
||||||
var selected=PlayList.getSelected();
|
|
||||||
if(selected.length==0){
|
|
||||||
$('th.name span').text(t('media','Name'));
|
|
||||||
$('th.artist').text(t('media','Artist'));
|
|
||||||
$('th.album').text(t('media','Album'));
|
|
||||||
$('th.time').text(t('media','Time'));
|
|
||||||
$('th.plays').empty();
|
|
||||||
$('th.plays').text(t('media','Plays'));
|
|
||||||
}else{
|
|
||||||
var name=selected.length+' '+t('media','selected');
|
|
||||||
var artist=$(selected[0]).data('artist');
|
|
||||||
var album=$(selected[0]).data('album');
|
|
||||||
var time=$(selected[0]).data('time');
|
|
||||||
var plays=$(selected[0]).data('plays');
|
|
||||||
for(var i=1;i<selected.length;i++){
|
|
||||||
var item=$(selected[i]);
|
|
||||||
if(artist!='mixed' && item.data('artist')!==artist){
|
|
||||||
artist='mixed'
|
|
||||||
}
|
|
||||||
if(album!='mixed' && item.data('album')!==album){
|
|
||||||
album='mixed'
|
|
||||||
}
|
|
||||||
if(time!='mixed' && item.data('time')!==time){
|
|
||||||
time='mixed'
|
|
||||||
}
|
|
||||||
if(plays!='mixed' && item.data('plays')!==plays){
|
|
||||||
plays='mixed'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$('th.name span').text(name);
|
|
||||||
$('th.artist').text(artist);
|
|
||||||
$('th.album').text(album);
|
|
||||||
if(time!='mixed'){
|
|
||||||
var secconds=(time%60);
|
|
||||||
if(secconds<10){
|
|
||||||
secconds='0'+secconds;
|
|
||||||
}
|
|
||||||
var time=Math.floor(time/60)+':'+secconds;
|
|
||||||
}
|
|
||||||
$('th.time').text(time);
|
|
||||||
$('th.plays').text(plays);
|
|
||||||
var button=$('<img class="remove" title="Remove"/>');
|
|
||||||
button.attr('src',OC.imagePath('core','actions/delete'));
|
|
||||||
$('th.plays').append(button);
|
|
||||||
button.click(function(event){
|
|
||||||
event.stopPropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
PlayList.getSelected().each(function(index,element){
|
|
||||||
var index=$(element).data('index');
|
|
||||||
PlayList.items[index]=null;
|
|
||||||
});
|
|
||||||
PlayList.items=PlayList.items.filter(function(item){return item!==null});
|
|
||||||
PlayList.render();
|
|
||||||
PlayList.save();
|
|
||||||
procesSelection();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -20,32 +20,7 @@
|
||||||
<div class="player" id="jp-player"></div>
|
<div class="player" id="jp-player"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="leftcontent">
|
<ul id="leftcontent"></ul>
|
||||||
<table id="playlist">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="name"><input id="selectAll" type="checkbox"><?php echo $l->t('Name')?></th>
|
|
||||||
<th class="artist"><?php echo $l->t('Artist')?></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<?php echo $l->t('The playlist is empty')?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr class="template">
|
|
||||||
<td class="name">
|
|
||||||
<input type="checkbox">
|
|
||||||
<span></span>
|
|
||||||
</td>
|
|
||||||
<td class="artist"></td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="rightcontent">
|
<div id="rightcontent">
|
||||||
<div id="scan">
|
<div id="scan">
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
ul.multiselectoptions { z-index:49; position:absolute; background-color:#fff; padding-top:.5em; border-bottom-left-radius:.5em; border-bottom-right-radius:.5em; border:1px solid #ddd; border-top:none; }
|
||||||
|
div.multiselect { padding-right:.6em; display:inline; position:relative; display:inline-block }
|
||||||
|
div.multiselect.active { background-color:#fff; border-bottom:none; border-bottom-left-radius:0; border-bottom-right-radius:0; z-index:50; position:relative }
|
||||||
|
div.multiselect>span:first-child { margin-right:2em; }
|
||||||
|
div.multiselect>span:last-child { float:right; position:relative }
|
||||||
|
ul.multiselectoptions input.new{ margin:0; padding-bottom:0.2em; padding-top:0.2em; border-top-left-radius:0; border-top-right-radius:0; }
|
|
@ -15,7 +15,7 @@ body { background:#fefefe; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana
|
||||||
|
|
||||||
|
|
||||||
/* HEADERS */
|
/* HEADERS */
|
||||||
#body-user #header, #body-settings #header { position:fixed; top:0; z-index:300; width:100%; height:2.5em; padding:.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-user #header, #body-settings #header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:.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-login #header { margin:-2em auto 0; text-align:center; height:10em;
|
#body-login #header { margin:-2em auto 0; text-align:center; height:10em;
|
||||||
-moz-box-shadow:0 0 1em #000; -webkit-box-shadow:0 0 1em #000; box-shadow:0 0 1em #000;
|
-moz-box-shadow:0 0 1em #000; -webkit-box-shadow:0 0 1em #000; box-shadow:0 0 1em #000;
|
||||||
background: #1d2d44; /* Old browsers */
|
background: #1d2d44; /* Old browsers */
|
||||||
|
@ -33,12 +33,12 @@ h1 { margin:1em 3em 1em 0; border-bottom:1px solid #666; text-transform:uppercas
|
||||||
|
|
||||||
/* INPUTS */
|
/* INPUTS */
|
||||||
input[type="text"], input[type="password"] { cursor:text; }
|
input[type="text"], input[type="password"] { cursor:text; }
|
||||||
input, select { font-size:1em; width:10em; margin:.3em; padding:.6em .5em .4em; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
|
input, select, .button { font-size:1em; width:10em; margin:.3em; padding:.6em .5em .4em; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
|
||||||
input[type="text"], input[type="password"] { background:#f8f8f8; color:#555; cursor:text; }
|
input[type="text"], input[type="password"] { background:#f8f8f8; color:#555; cursor:text; }
|
||||||
input[type="text"]:hover, input[type="text"]:focus, input[type="password"]:hover, input[type="password"]:focus { background:#fff; color:#333; }
|
input[type="text"]:hover, input[type="text"]:focus, input[type="password"]:hover, input[type="password"]:focus { background:#fff; color:#333; }
|
||||||
|
|
||||||
input[type="submit"], input[type="button"] { width:auto; padding:.4em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
|
input[type="submit"], input[type="button"], .button { width:auto; padding:.4em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
|
||||||
input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, input[type="button"]:focus { background:#fff; color:#333; }
|
input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, input[type="button"]:focus, .button:hover { background:#fff; color:#333; }
|
||||||
input[type="checkbox"] { width:auto; }
|
input[type="checkbox"] { width:auto; }
|
||||||
|
|
||||||
#body-login input { font-size:1.5em; }
|
#body-login input { font-size:1.5em; }
|
||||||
|
@ -49,12 +49,6 @@ radius:1em; border-radius:1em; }
|
||||||
input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; }
|
input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; }
|
||||||
input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-shadow:#ffeedd 0 1px 0; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; }
|
input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-shadow:#ffeedd 0 1px 0; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
form#user_settings { max-width:600px; }
|
|
||||||
form#user_settings p label { display:block; float:left; width:35%; padding:.4em .5em 0 0; text-align:right; }
|
|
||||||
form p { padding:.5em 4em .5em .5em; text-align:left; }
|
|
||||||
form p.form_footer { margin:1em 0 0 0; text-align:right; }
|
|
||||||
form label { cursor:pointer; }
|
form label { cursor:pointer; }
|
||||||
#body-settings fieldset { padding:1em; width:40em; margin:1em;
|
#body-settings fieldset { padding:1em; width:40em; margin:1em;
|
||||||
border:1px solid #ddd; font-weight:bold; background:#f2f2f2; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em;}
|
border:1px solid #ddd; font-weight:bold; background:#f2f2f2; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em;}
|
||||||
|
@ -62,10 +56,10 @@ legend { padding:.2em; font-size:1.2em; }
|
||||||
.template{display:none;}
|
.template{display:none;}
|
||||||
|
|
||||||
/* CONTENT ------------------------------------------------------------------ */
|
/* CONTENT ------------------------------------------------------------------ */
|
||||||
#controls { width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:200; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }
|
#controls { width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }
|
||||||
#content { margin:3.5em 0 0 12.5em; padding-bottom:10em; }
|
#content { margin:3.5em 0 0 12.5em; padding-bottom:10em; }
|
||||||
#leftcontent { position:absolute; top:6.5em; width:20em; background:#f8f8f8; height:100%; border-right:1px solid #ddd; }
|
#leftcontent { position:absolute; top:6.4em; width:20em; background:#f8f8f8; height:100%; border-right:1px solid #ddd; }
|
||||||
#rightcontent { position:absolute; top:6.5em; left:33em; }
|
#rightcontent { position:absolute; top:6.4em; left:33em; }
|
||||||
|
|
||||||
/* LOG IN & INSTALLATION ------------------------------------------------------------ */
|
/* LOG IN & INSTALLATION ------------------------------------------------------------ */
|
||||||
#body-login { background:#ddd; }
|
#body-login { background:#ddd; }
|
||||||
|
@ -78,26 +72,19 @@ legend { padding:.2em; font-size:1.2em; }
|
||||||
#login form fieldset legend { font-weight:bold; }
|
#login form fieldset legend { font-weight:bold; }
|
||||||
#login form label { position:absolute; margin:.8em .8em; font-size:1.5em; color:#666; }
|
#login form label { position:absolute; margin:.8em .8em; font-size:1.5em; color:#666; }
|
||||||
#login form label#directorylabel { display:block; margin:.95em 0 .8em -5.5em; }
|
#login form label#directorylabel { display:block; margin:.95em 0 .8em -5.5em; }
|
||||||
|
|
||||||
#login form input[type="checkbox"]+label { position:relative; margin:0; font-size:1em; text-shadow:#fff 0 1px 0; }
|
#login form input[type="checkbox"]+label { position:relative; margin:0; font-size:1em; text-shadow:#fff 0 1px 0; }
|
||||||
|
|
||||||
#login form ul.errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 4em 0; padding:1em 1em 1em 5em; }
|
#login form ul.errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 4em 0; padding:1em 1em 1em 5em; }
|
||||||
|
|
||||||
/* META NAVIGATION (Settings, Log out) ---------------------------------------------------------------- */
|
|
||||||
#metanav { float:right; position:relative; top:.5em; right:1em; margin:0; padding:0; }
|
|
||||||
#metanav li { display:inline; }
|
|
||||||
#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; }
|
|
||||||
|
|
||||||
/* NAVIGATION ------------------------------------------------------------- */
|
/* NAVIGATION ------------------------------------------------------------- */
|
||||||
#navigation { position:fixed; top:3.5em; float:left; width:12.5em; padding:0; z-index:250; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; } }
|
#navigation { position:fixed; top:3.5em; float:left; width:12.5em; padding:0; z-index:75; height:100%; background:#eee; border-right: 1px #ccc solid; -moz-box-shadow: -3px 0 7px #000; -webkit-box-shadow: -3px 0 7px #000; box-shadow: -3px 0 7px #000; }
|
||||||
#navigation ul { border-top:1px solid #ccc; }
|
#navigation a { display:block; padding:.6em .5em .4em 2.5em; background:#eee 1em center no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; }
|
||||||
#navigation a { display:block; padding:.6em .5em .4em 2.5em; background:1em center no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; }
|
#navigation a.active, #navigation a:hover, #navigation a:focus { background-color:#dbdbdb; border-top:1px solid #d4d4d4; border-bottom:1px solid #ccc; color:#333; }
|
||||||
#navigation a.active, #navigation a:hover, #navigation a:focus, #navigation a.selected { background-color:#ccc; border-top:1px solid #c8c8c8; border-bottom:1px solid #ccc; color:#000; }
|
#navigation a.active { background-color:#ddd; }
|
||||||
#navigation #settings { position:absolute; bottom:3.5em; width:100%; }
|
#navigation #settings { position:absolute; bottom:3.5em; width:100%; }
|
||||||
#expand { margin:0 0 .2em 1.2em; cursor:pointer; }
|
#expand { margin:0 0 .2em 1.2em; cursor:pointer; }
|
||||||
#expand+span { position:relative; bottom:.4em; left:.2em; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; }
|
#expand+span { position:relative; bottom:.4em; left:.2em; font-size:1.2em; color:#666; text-shadow:#f8f8f8 0 1px 0; }
|
||||||
|
#logout { position:absolute; right:0; top:0; padding:1.2em 2em .55em 1.2em; }
|
||||||
|
#logout:hover, #logout:focus { background:rgba(0,0,0,.5); }
|
||||||
|
|
||||||
/* USER SETTINGS ------------------------------------------------------------ */
|
/* USER SETTINGS ------------------------------------------------------------ */
|
||||||
#quota_indicator { margin:0 4em 1em 0; padding:0; border:1px solid #ccc; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; }
|
#quota_indicator { margin:0 4em 1em 0; padding:0; border:1px solid #ccc; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; }
|
||||||
|
@ -105,3 +92,6 @@ legend { padding:.2em; font-size:1.2em; }
|
||||||
|
|
||||||
li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background:#fee url('../img/task-attention.png') .8em .8em no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
|
li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background:#fee url('../img/task-attention.png') .8em .8em no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
|
||||||
.hidden{ display:none; }
|
.hidden{ display:none; }
|
||||||
|
#notification{ z-index:101; background-color:#fc4; border:0; padding:0 .7em .3em; display:block; position:fixed; left:50%; top:0;
|
||||||
|
-moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em;
|
||||||
|
-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 495 B |
Binary file not shown.
Before Width: | Height: | Size: 1012 B |
Binary file not shown.
After Width: | Height: | Size: 452 B |
|
@ -0,0 +1,71 @@
|
||||||
|
<?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="11"
|
||||||
|
height="36"
|
||||||
|
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="18.657977"
|
||||||
|
inkscape:cx="2.6788772"
|
||||||
|
inkscape:cy="16.807262"
|
||||||
|
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="grid3760"
|
||||||
|
empspacing="5"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="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,-1016.3622)">
|
||||||
|
<path
|
||||||
|
transform="translate(0,1016.3622)"
|
||||||
|
style="fill:#dddddd;fill-opacity:1;stroke:none"
|
||||||
|
d="M 0,0 11,18 0,36 z"
|
||||||
|
id="rect3757"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 452 B |
|
@ -0,0 +1,77 @@
|
||||||
|
<?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="11"
|
||||||
|
height="36"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.1 r9760"
|
||||||
|
sodipodi:docname="breadcrumb.svg"
|
||||||
|
inkscape:export-filename="/home/jancborchardt/breadcrumb.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="26.386364"
|
||||||
|
inkscape:cx="1.7139473"
|
||||||
|
inkscape:cy="25.655289"
|
||||||
|
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="grid3760"
|
||||||
|
empspacing="5"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="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,-1016.3622)">
|
||||||
|
<path
|
||||||
|
transform="translate(0,1016.3622)"
|
||||||
|
style="fill:#dddddd;fill-opacity:1;stroke:#dddddd;stroke-width:0.89999998000000003;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:31.20000076000000178;stroke-opacity:1;stroke-dasharray:none;marker-start:none"
|
||||||
|
d="m 0.5,0 10,18 -10,18 10,-18 z"
|
||||||
|
id="rect3757"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc"
|
||||||
|
inkscape:export-filename="/home/jancborchardt/breadcrumb-start.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
|
@ -275,7 +275,29 @@ $(document).ready(function(){
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!Array.prototype.map){
|
||||||
|
Array.prototype.map = function(fun /*, thisp */){
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
if (this === void 0 || this === null)
|
||||||
|
throw new TypeError();
|
||||||
|
|
||||||
|
var t = Object(this);
|
||||||
|
var len = t.length >>> 0;
|
||||||
|
if (typeof fun !== "function")
|
||||||
|
throw new TypeError();
|
||||||
|
|
||||||
|
var res = new Array(len);
|
||||||
|
var thisp = arguments[1];
|
||||||
|
for (var i = 0; i < len; i++){
|
||||||
|
if (i in t){
|
||||||
|
res[i] = fun.call(thisp, t[i], i, t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -0,0 +1,160 @@
|
||||||
|
(function( $ ){
|
||||||
|
var multiSelectId=-1;
|
||||||
|
$.fn.multiSelect=function(options){
|
||||||
|
multiSelectId++;
|
||||||
|
var settings = {
|
||||||
|
'createCallback':false,
|
||||||
|
'createText':false,
|
||||||
|
'title':this.attr('title'),
|
||||||
|
'checked':[],
|
||||||
|
'oncheck':false,
|
||||||
|
'onuncheck':false,
|
||||||
|
};
|
||||||
|
$.extend(settings,options);
|
||||||
|
var button=$('<div class="multiselect button"><span>'+settings.title+'</span><span>▾</span></div>');
|
||||||
|
if(settings.checked.length>0){
|
||||||
|
button.children('span').first().text(settings.checked.join(', '));
|
||||||
|
}
|
||||||
|
var span=$('<span/>');
|
||||||
|
span.append(button);
|
||||||
|
button.data('id',multiSelectId);
|
||||||
|
button.selectedItems=[];
|
||||||
|
this.hide();
|
||||||
|
this.before(span);
|
||||||
|
settings.minWidth=button.width();
|
||||||
|
button.css('min-width',settings.minWidth);
|
||||||
|
settings.minOuterWidth=button.outerWidth()-2;
|
||||||
|
button.data('settings',settings);
|
||||||
|
|
||||||
|
button.click(function(event){
|
||||||
|
var button=$(this);
|
||||||
|
if(button.parent().children('ul').length>0){
|
||||||
|
button.parent().children('ul').slideUp(400,function(){
|
||||||
|
button.parent().children('ul').remove();
|
||||||
|
button.removeClass('active');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var lists=$('ul.multiselectoptions');
|
||||||
|
lists.slideUp(400,function(){
|
||||||
|
lists.remove();
|
||||||
|
$('div.multiselect').removeClass('active');
|
||||||
|
button.addClass('active');
|
||||||
|
});
|
||||||
|
button.addClass('active');
|
||||||
|
event.stopPropagation();
|
||||||
|
var options=$(this).parent().next().children().map(function(){return $(this).val()});
|
||||||
|
var list=$('<ul class="multiselectoptions"/>').hide().appendTo($(this).parent());
|
||||||
|
function createItem(item,checked){
|
||||||
|
var id='ms'+multiSelectId+'-option-'+item;
|
||||||
|
var input=$('<input id="'+id+'" type="checkbox"/>');
|
||||||
|
var label=$('<label for="'+id+'">'+item+'</label>');
|
||||||
|
if(settings.checked.indexOf(item)!=-1 || checked){
|
||||||
|
input.attr('checked','checked');
|
||||||
|
}
|
||||||
|
if(checked){
|
||||||
|
settings.checked.push(item);
|
||||||
|
}
|
||||||
|
input.change(function(){
|
||||||
|
var groupname=$(this).next().text();
|
||||||
|
if($(this).attr('checked')){
|
||||||
|
settings.checked.push(groupname);
|
||||||
|
if(settings.oncheck){
|
||||||
|
if(settings.oncheck(groupname)===false){
|
||||||
|
$(this).removeAttr('checked');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
var index=settings.checked.indexOf(groupname);
|
||||||
|
settings.checked.splice(index,1);
|
||||||
|
if(settings.onuncheck){
|
||||||
|
if(settings.onuncheck(groupname)===false){
|
||||||
|
$(this).attr('checked','checked');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var oldWidth=button.width();
|
||||||
|
if(settings.checked.length>0){
|
||||||
|
button.children('span').first().text(settings.checked.join(', '));
|
||||||
|
}else{
|
||||||
|
button.children('span').first().text(settings.title);
|
||||||
|
}
|
||||||
|
var newOuterWidth=Math.max((button.outerWidth()-2),settings.minOuterWidth)+'px'
|
||||||
|
var newWidth=Math.max(button.width(),settings.minWidth);
|
||||||
|
button.css('height',button.height());
|
||||||
|
button.css('white-space','nowrap');
|
||||||
|
button.css('width',oldWidth);
|
||||||
|
button.animate({'width':newWidth},undefined,undefined,function(){
|
||||||
|
button.css('width','');
|
||||||
|
});
|
||||||
|
list.animate({'width':newOuterWidth});
|
||||||
|
});
|
||||||
|
var li=$('<li></li>');
|
||||||
|
li.append(input).append(label);
|
||||||
|
return li;
|
||||||
|
}
|
||||||
|
$.each(options,function(index,item){
|
||||||
|
list.append(createItem(item));
|
||||||
|
});
|
||||||
|
button.parent().data('preventHide',false);
|
||||||
|
if(settings.createText){
|
||||||
|
var li=$('<li>+ <em>'+settings.createText+'<em></li>');
|
||||||
|
li.click(function(event){
|
||||||
|
li.empty();
|
||||||
|
var input=$('<input class="new">');
|
||||||
|
li.append(input);
|
||||||
|
input.focus();
|
||||||
|
input.css('width',button.width());
|
||||||
|
button.parent().data('preventHide',true);
|
||||||
|
input.keypress(function(event) {
|
||||||
|
if(event.keyCode == 13) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
var li=$(this).parent();
|
||||||
|
$(this).remove();
|
||||||
|
li.text('+ '+settings.createText);
|
||||||
|
li.before(createItem($(this).val()));
|
||||||
|
li.prev().children('input').trigger('click');
|
||||||
|
button.parent().data('preventHide',false);
|
||||||
|
var select=button.parent().next();
|
||||||
|
select.append($('<option value="'+$(this).val()+'">'+$(this).val()+'</option>'));
|
||||||
|
if(settings.createCallback){
|
||||||
|
settings.createCallback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
input.blur(function(){
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
$(this).remove();
|
||||||
|
li.text('+ '+settings.createText);
|
||||||
|
setTimeout(function(){
|
||||||
|
button.parent().data('preventHide',false);
|
||||||
|
},100);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
list.append(li);
|
||||||
|
}
|
||||||
|
var pos=button.position();
|
||||||
|
list.css('top',pos.top+button.outerHeight()-5);
|
||||||
|
list.css('left',pos.left+3);
|
||||||
|
list.css('width',(button.outerWidth()-2)+'px');
|
||||||
|
list.slideDown();
|
||||||
|
list.click(function(event){
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$(window).click(function(){
|
||||||
|
if(!button.parent().data('preventHide')){
|
||||||
|
button.parent().children('ul').slideUp(400,function(){
|
||||||
|
button.parent().children('ul').remove();
|
||||||
|
button.removeClass('active');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return span;
|
||||||
|
};
|
||||||
|
})( jQuery );
|
|
@ -30,10 +30,10 @@
|
||||||
<body id="<?php echo $_['bodyid'];?>">
|
<body id="<?php echo $_['bodyid'];?>">
|
||||||
<header><div id="header">
|
<header><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>
|
<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']?>
|
<form class="searchbox" action="#" method="post">
|
||||||
<ul id="metanav">
|
<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
|
||||||
<li><a 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></li>
|
</form>
|
||||||
</ul>
|
<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>
|
||||||
</div></header>
|
</div></header>
|
||||||
|
|
||||||
<nav><div id="navigation">
|
<nav><div id="navigation">
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<form class="searchbox" action="#" method="post">
|
|
||||||
<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
|
|
||||||
</form>
|
|
|
@ -1,19 +1,25 @@
|
||||||
|
/* Copyright (c) 2011, Jan-Christoph Borchardt
|
||||||
|
This file is licensed under the Affero General Public License version 3 or later.
|
||||||
|
See the COPYING-README file. */
|
||||||
|
|
||||||
/* FILE MENU */
|
/* FILE MENU */
|
||||||
.actions { padding:.6em; float:right; margin-right:13em; }
|
.actions { padding:.6em; float:right; margin-right:13em; }
|
||||||
.actions input { margin:0; padding:.3em; }
|
.actions input { margin:0; padding:.3em; }
|
||||||
#file_menu { right:0; position:absolute; top:0; }
|
#file_menu { right:0; position:absolute; top:0; }
|
||||||
#file_menu a { display:block; float:left; background-image:none; text-decoration:none; }
|
#file_menu a { display:block; float:left; background-image:none; text-decoration:none; }
|
||||||
.file_upload_form, #file_newfolder_form { display:inline; }
|
.file_upload_form, #file_newfolder_form { display:inline; float: left;}
|
||||||
#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; }
|
#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; }
|
||||||
.file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .3em; padding-left:2em; }
|
.file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .3em; padding-left:2em; }
|
||||||
.file_upload_wrapper { background:url("../img/file.png"); font-weight:bold; position:relative; top:-1.2em; left:-2em; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; width:8em; }
|
.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin-right:1.5em;}
|
||||||
.file_upload_start { opacity:0; filter:alpha(opacity=0); }
|
|
||||||
|
|
||||||
#file_newfolder_name { background-image:url("../img/folder.png"); font-weight:bold; width:8em; }
|
#file_newfolder_name { background-image:url("../img/folder.png"); font-weight:bold; width:8em; }
|
||||||
.file_upload_start, .file_upload_filename { position:absolute; top:0; left:0; font-size:1em; }
|
.file_upload_start, .file_upload_filename { font-size:1em; }
|
||||||
#file_newfolder_submit, #file_upload_submit { width:3em; }
|
#file_newfolder_submit, #file_upload_submit { width:3em; }
|
||||||
.file_upload_target { display:none; }
|
.file_upload_target { display:none; }
|
||||||
|
|
||||||
|
.file_upload_start { opacity:0; filter:alpha(opacity=0); z-index:1; position:absolute; left:0; top:0; width:100%; cursor:pointer;}
|
||||||
|
.file_upload_filename { z-index:100; cursor:pointer;}
|
||||||
|
|
||||||
/* FILE TABLE */
|
/* 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; }
|
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%; }
|
table { position:relative; top:37px; width:100%; }
|
||||||
|
@ -39,8 +45,7 @@ table td.filename a, table td.login, table td.logout, table td.download, table t
|
||||||
table td.filename .nametext, .modified { float:left; padding:.3em 0; }
|
table td.filename .nametext, .modified { float:left; padding:.3em 0; }
|
||||||
table td.filename .nametext { width:60%; }
|
table td.filename .nametext { width:60%; }
|
||||||
table td.filename form { float:left; font-size:.85em; }
|
table td.filename form { float:left; font-size:.85em; }
|
||||||
/* #fileList tr.selected td.filename a, #fileList tr:hover td.filename a { background-image:none !important } */
|
table thead.fixed tr{position:fixed; top:6.3em; z-index:49; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000;}
|
||||||
table thead.fixed tr{position:fixed; top:6.4em;z-index:100;}
|
|
||||||
table thead.fixed {height:2em}
|
table thead.fixed {height:2em}
|
||||||
#fileList tr td.filename>input[type=checkbox]:first-child { 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 td.filename>input[type=checkbox]:first-child { 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 td.filename>input[type=checkbox]:checked:first-child, #fileList tr:hover td.filename>input[type=checkbox]:first-child { display:inline; }
|
#fileList tr td.filename>input[type=checkbox]:checked:first-child, #fileList tr:hover td.filename>input[type=checkbox]:first-child { display:inline; }
|
||||||
|
@ -52,7 +57,4 @@ table thead.fixed {height:2em}
|
||||||
.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; }
|
.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 */
|
/* add breadcrumb divider to the File item in navigation panel */
|
||||||
#navigation>ul>li:first-child { background:url('../../core/img/breadcrumb-divider-start.png') no-repeat 12.5em 0px; width:12.5em; padding-right:1em; }
|
#navigation>ul>li:first-child { background:url('../../core/img/breadcrumb-start.png') no-repeat 12.5em 0px; width:12.5em; padding-right:1em; }
|
||||||
#notification{ z-index:150; background-color:#fc4; border:0; padding:0 .7em .3em; display:block; position:fixed; left:50%; top:0;
|
|
||||||
-moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em;
|
|
||||||
-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php foreach($_["breadcrumb"] as $crumb): ?>
|
<?php foreach($_["breadcrumb"] as $crumb): ?>
|
||||||
<div class='crumb' data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb-divider.png');?>")'>
|
<div class="crumb svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'>
|
||||||
<a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
|
<a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
|
@ -149,9 +149,11 @@ OC_Group::setBackend( OC_Config::getValue( "groupbackend", "database" ));
|
||||||
OC_Util::addScript( "jquery-1.6.2.min" );
|
OC_Util::addScript( "jquery-1.6.2.min" );
|
||||||
OC_Util::addScript( "jquery-ui-1.8.14.custom.min" );
|
OC_Util::addScript( "jquery-ui-1.8.14.custom.min" );
|
||||||
OC_Util::addScript( "js" );
|
OC_Util::addScript( "js" );
|
||||||
|
OC_Util::addScript( "multiselect" );
|
||||||
OC_Util::addScript('search','result');
|
OC_Util::addScript('search','result');
|
||||||
OC_Util::addStyle( "jquery-ui-1.8.14.custom" );
|
OC_Util::addStyle( "jquery-ui-1.8.14.custom" );
|
||||||
OC_Util::addStyle( "styles" );
|
OC_Util::addStyle( "styles" );
|
||||||
|
OC_Util::addStyle( "multiselect" );
|
||||||
|
|
||||||
// Load Apps
|
// Load Apps
|
||||||
// This includes plugins for users and filesystems as well
|
// This includes plugins for users and filesystems as well
|
||||||
|
|
|
@ -171,11 +171,11 @@ class OC_Group {
|
||||||
*/
|
*/
|
||||||
public static function addToGroup( $uid, $gid ){
|
public static function addToGroup( $uid, $gid ){
|
||||||
// Does the user exist?
|
// Does the user exist?
|
||||||
if( !in_array( $uid, OC_User::getUsers())){
|
if( !OC_User::userExists($uid)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Does the group exist?
|
// Does the group exist?
|
||||||
if( !in_array( $gid, self::getGroups())){
|
if( !OC_Group::groupExists($gid)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,4 +234,21 @@ class OC_Group {
|
||||||
public static function getGroups(){
|
public static function getGroups(){
|
||||||
return self::$_backend->getGroups();
|
return self::$_backend->getGroups();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if a group exists
|
||||||
|
* @param string $gid
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function groupExists($gid){
|
||||||
|
return in_array( $gid, self::getGroups());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief get a list of all users in a group
|
||||||
|
* @returns array with user ids
|
||||||
|
*/
|
||||||
|
public static function usersInGroup($gid){
|
||||||
|
return self::$_backend->usersInGroup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,4 +93,10 @@ abstract class OC_Group_Backend {
|
||||||
* Returns a list with all groups
|
* Returns a list with all groups
|
||||||
*/
|
*/
|
||||||
public static function getGroups(){}
|
public static function getGroups(){}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief get a list of all users in a group
|
||||||
|
* @returns array with user ids
|
||||||
|
*/
|
||||||
|
public static function usersInGroup($gid){}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ class OC_Group_Database extends OC_Group_Backend {
|
||||||
*/
|
*/
|
||||||
public static function createGroup( $gid ){
|
public static function createGroup( $gid ){
|
||||||
// Check for existence
|
// Check for existence
|
||||||
$query = OC_DB::prepare( "SELECT * FROM `*PREFIX*groups` WHERE gid = ?" );
|
$query = OC_DB::prepare( "SELECT gid FROM `*PREFIX*groups` WHERE gid = ?" );
|
||||||
$result = $query->execute( array( $gid ));
|
$result = $query->execute( array( $gid ));
|
||||||
|
|
||||||
if( $result->numRows() > 0 ){
|
if( $result->numRows() > 0 ){
|
||||||
|
@ -98,7 +98,7 @@ class OC_Group_Database extends OC_Group_Backend {
|
||||||
*/
|
*/
|
||||||
public static function inGroup( $uid, $gid ){
|
public static function inGroup( $uid, $gid ){
|
||||||
// check
|
// check
|
||||||
$query = OC_DB::prepare( "SELECT * FROM `*PREFIX*group_user` WHERE gid = ? AND uid = ?" );
|
$query = OC_DB::prepare( "SELECT uid FROM `*PREFIX*group_user` WHERE gid = ? AND uid = ?" );
|
||||||
$result = $query->execute( array( $gid, $uid ));
|
$result = $query->execute( array( $gid, $uid ));
|
||||||
|
|
||||||
return $result->numRows() > 0 ? true : false;
|
return $result->numRows() > 0 ? true : false;
|
||||||
|
@ -146,7 +146,7 @@ class OC_Group_Database extends OC_Group_Backend {
|
||||||
*/
|
*/
|
||||||
public static function getUserGroups( $uid ){
|
public static function getUserGroups( $uid ){
|
||||||
// No magic!
|
// No magic!
|
||||||
$query = OC_DB::prepare( "SELECT * FROM `*PREFIX*group_user` WHERE uid = ?" );
|
$query = OC_DB::prepare( "SELECT gid FROM `*PREFIX*group_user` WHERE uid = ?" );
|
||||||
$result = $query->execute( array( $uid ));
|
$result = $query->execute( array( $uid ));
|
||||||
|
|
||||||
$groups = array();
|
$groups = array();
|
||||||
|
@ -164,7 +164,7 @@ class OC_Group_Database extends OC_Group_Backend {
|
||||||
* Returns a list with all groups
|
* Returns a list with all groups
|
||||||
*/
|
*/
|
||||||
public static function getGroups(){
|
public static function getGroups(){
|
||||||
$query = OC_DB::prepare( "SELECT * FROM `*PREFIX*groups`" );
|
$query = OC_DB::prepare( "SELECT gid FROM `*PREFIX*groups`" );
|
||||||
$result = $query->execute();
|
$result = $query->execute();
|
||||||
|
|
||||||
$groups = array();
|
$groups = array();
|
||||||
|
@ -174,4 +174,18 @@ class OC_Group_Database extends OC_Group_Backend {
|
||||||
|
|
||||||
return $groups;
|
return $groups;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief get a list of all users in a group
|
||||||
|
* @returns array with user ids
|
||||||
|
*/
|
||||||
|
public static function usersInGroup($gid){
|
||||||
|
$query=OC_DB::prepare('SELECT uid FROM *PREFIX*group_user WHERE gid=?');
|
||||||
|
$users=array();
|
||||||
|
$result=$query->execute(array($gid));
|
||||||
|
while($row=$result->fetchRow()){
|
||||||
|
$users[]=$row['uid'];
|
||||||
|
}
|
||||||
|
return $users;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,9 +230,7 @@ class OC_Template{
|
||||||
// Decide which page we show
|
// Decide which page we show
|
||||||
if( $this->renderas == "user" ){
|
if( $this->renderas == "user" ){
|
||||||
$page = new OC_Template( "core", "layout.user" );
|
$page = new OC_Template( "core", "layout.user" );
|
||||||
$search=new OC_Template( 'core', 'part.searchbox');
|
$page->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ));
|
||||||
$search->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ));
|
|
||||||
$page->assign('searchbox', $search->fetchPage());
|
|
||||||
if(array_search(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false){
|
if(array_search(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false){
|
||||||
$page->assign('bodyid','body-settings');
|
$page->assign('bodyid','body-settings');
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#searchresults { list-style:none; position:fixed; top:3.5em; right:0; z-index:100; background-color:#fff; overflow:hidden; text-overflow:ellipsis; max-height:80%; width:26.5em; padding-bottom:1em; -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; box-shadow:0 0 10px #000; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; }
|
#searchresults { list-style:none; position:fixed; top:3.5em; right:0; z-index:75; background-color:#fff; overflow:hidden; text-overflow:ellipsis; max-height:80%; width:26.5em; padding-bottom:1em; -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; box-shadow:0 0 10px #000; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; }
|
||||||
#searchresults li.resultHeader { font-size:1.2em; font-weight:bold; border-bottom:solid 1px #CCC; padding:.2em; background-color:#eee; }
|
#searchresults li.resultHeader { font-size:1.2em; font-weight:bold; border-bottom:solid 1px #CCC; padding:.2em; background-color:#eee; }
|
||||||
#searchresults li.result { margin-left:2em; }
|
#searchresults li.result { margin-left:2em; }
|
||||||
#searchresults table { width:100%; table-layout:fixed; top:0; border-spacing:0; }
|
#searchresults table { width:100%; table-layout:fixed; top:0; border-spacing:0; }
|
||||||
|
|
Loading…
Reference in New Issue