Skip to content
Snippets Groups Projects
Commit dd0eb9dd authored by Jakob Sack's avatar Jakob Sack
Browse files

Merge branch 'refactoring' of git://anongit.kde.org/owncloud into refactoring

parents f22c05de b4a74f89
No related merge requests found
Showing
with 46 additions and 15 deletions
......@@ -16,3 +16,5 @@ _darcs/*
CVS/*
.svn/*
RCS/*
.kdev
*.kdev4
......@@ -2,10 +2,10 @@
OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" ));
OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System setting", "icon" => OC_HELPER::imagePath( "admin", "administration.png" )));
OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" =>"System", "icon" => OC_HELPER::imagePath( "admin", "administration.png" )));
OC_APP::addAdminPage( array( "id" => "core_users", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users", "icon" => OC_HELPER::imagePath( "admin", "users.png" )));
OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "apps.png" )));
OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "apps.png" )));
OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "plugins.png" )));
// Add subentries for App installer
OC_APP::addNavigationSubEntry( "core_apps", array( "id" => "core_apps_installed", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php?add=some&parameters=here" ), "name" => "Installed apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" )));
......
admin/img/apps.png

217 B | W: | H:

admin/img/apps.png

216 B | W: | H:

admin/img/apps.png
admin/img/apps.png
admin/img/apps.png
admin/img/apps.png
  • 2-up
  • Swipe
  • Onion skin
admin/img/plugins.png

217 B

admin/img/users.png

765 B | W: | H:

admin/img/users.png

741 B | W: | H:

admin/img/users.png
admin/img/users.png
admin/img/users.png
admin/img/users.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -99,6 +99,9 @@ table td.download { background-image:url('../img/download.png'); }
table td.upload { background-image:url('../img/upload.png'); }
table td.create { background-image:url('../img/folder-new.png'); }
table td.delete { background-image:url('../img/delete.png'); }
#fileList tr input[type=checkbox] { display:none; }
#fileList tr input[type=checkbox]:checked { display:inline; }
#fileList tr:hover input[type=checkbox] { display:inline; }
/* NAVIGATION BAR */
p.nav { margin:1em 0 0 2em; padding:0.8em; line-height:16px; font-weight:bold; }
......
......@@ -2,7 +2,7 @@
OC_APP::register( array( "order" => 2, "id" => "files", "name" => "Files" ));
OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "navicon.png" ), "name" => "Files" ));
OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "home.png" ), "name" => "Files" ));
OC_APP::addSettingsPage( array( "id" => "files_administration", "order" => 1, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files", "icon" => OC_HELPER::imagePath( "files", "folder.png" )));
......
files/img/file.png

391 B

files/img/folder.png

436 B | W: | H:

files/img/folder.png

386 B | W: | H:

files/img/folder.png
files/img/folder.png
files/img/folder.png
files/img/folder.png
  • 2-up
  • Swipe
  • Onion skin
files/img/home.png

416 B

files/img/navicon.png

397 B

......@@ -42,6 +42,9 @@ $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
$files = array();
foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){
$i["date"] = OC_UTIL::formatDate($i["mtime"] );
if($i['directory']=='/'){
$i['directory']='';
}
$files[] = $i;
}
......
......@@ -39,6 +39,19 @@ $(document).ready(function() {
$('.browser input:checkbox').attr('checked', false);
});
// Delete current file
$('#delete_single_file').click(function() {
filename = $('#file_menu').parents('tr:first').find('.filename:first').children('a:first').text();
$.ajax({
url: 'ajax/delete.php',
data: "dir="+$('#dir').val()+"&file="+filename,
complete: function(data){
boolOperationFinished(data, true, $('#file_menu').parents('tr:first'));
}
});
return false;
});
$('#file_upload_start').click(function() {
$('#file_upload_target').load(uploadFinished);
});
......@@ -47,7 +60,7 @@ $(document).ready(function() {
$.ajax({
url: 'ajax/newfolder.php',
data: "dir="+$('#dir').val()+"&foldername="+$('#file_new_dir_name').val(),
complete: boolOpFinished
complete: function(data){boolOperationFinished(data, false);}
});
});
......@@ -98,14 +111,20 @@ function resetFileActionPanel() {
$('#file_action_panel').attr('activeAction', false);
}
function boolOpFinished(data) {
function boolOperationFinished(data, single, el) {
result = eval("("+data.responseText+");");
if(result.status == 'success'){
$.ajax({
url: 'ajax/list.php',
data: "dir="+$('#dir').val(),
complete: refreshContents
});
if(single) {
$('#file_menu').slideToggle(0);
$('body').append($('#file_menu'));
$(el).remove();
} else {
$.ajax({
url: 'ajax/list.php',
data: "dir="+$('#dir').val(),
complete: refreshContents
});
}
} else {
alert(result.data.message);
}
......@@ -117,7 +136,11 @@ function refreshContents(data) {
updateBreadcrumb(result.data.breadcrumb);
}
updateFileList(result.data.files);
$('#file_upload_button').click();
$('td.fileaction a').click(function() {
$(this).parent().append($('#file_menu'));
$('#file_menu').slideToggle(250);
return false;
});
resetFileActionPanel();
}
......
......@@ -40,6 +40,6 @@ name="file_upload_target" src=""></iframe></form>
<ul>
<li><a href="" title="">Download</a></li>
<li><a href="" title="">Share</a></li>
<li><a href="" title="">Delete</a></li>
<li><a href="" title="" id="delete_single_file">Delete</a></li>
</ul>
</div>
<a href="<?php echo link_to("files", "index.php?dir=/"); ?>"><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", "index.php?dir=".$crumb["dir"]); ?>"><?php echo $crumb["name"]; ?></a>
<a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
<?php endforeach; ?>
\ No newline at end of file
<?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", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo $file["name"]; ?></a></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", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$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="date"><?php echo $file["date"]; ?></td>
<td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td>
</tr>
<?php endforeach; ?>
\ No newline at end of file
help/img/help.png

467 B | W: | H:

help/img/help.png

483 B | W: | H:

help/img/help.png
help/img/help.png
help/img/help.png
help/img/help.png
  • 2-up
  • Swipe
  • Onion skin
img/help_about.png

1.5 KiB

img/mimetypes/application-octet-stream.png

1.81 KiB | W: | H:

img/mimetypes/application-octet-stream.png

391 B | W: | H:

img/mimetypes/application-octet-stream.png
img/mimetypes/application-octet-stream.png
img/mimetypes/application-octet-stream.png
img/mimetypes/application-octet-stream.png
  • 2-up
  • Swipe
  • Onion skin
img/places/folder.png

436 B | W: | H:

img/places/folder.png

386 B | W: | H:

img/places/folder.png
img/places/folder.png
img/places/folder.png
img/places/folder.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment