summaryrefslogtreecommitdiffstats
path: root/apps/files_publiclink
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-08-11 13:29:22 +0200
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-08-11 13:29:22 +0200
commitb4e89871dd845ecff3d7207ecbf1132fb1cde23b (patch)
tree6ac74dbb87fbbd811aefd48afbf83234b792a05d /apps/files_publiclink
parente1bde1a78eac82f981358e68af031d974ca81639 (diff)
parent592eacf37d7b845499ddce65b15fa86791cb3eae (diff)
downloadnextcloud-server-b4e89871dd845ecff3d7207ecbf1132fb1cde23b.tar.gz
nextcloud-server-b4e89871dd845ecff3d7207ecbf1132fb1cde23b.zip
merged master into sharing
Diffstat (limited to 'apps/files_publiclink')
-rw-r--r--apps/files_publiclink/js/admin.js4
-rw-r--r--apps/files_publiclink/templates/admin.php14
-rw-r--r--apps/files_publiclink/templates/breadcrumb.php4
-rw-r--r--apps/files_publiclink/templates/files.php9
-rw-r--r--apps/files_publiclink/templates/index.php17
5 files changed, 11 insertions, 37 deletions
diff --git a/apps/files_publiclink/js/admin.js b/apps/files_publiclink/js/admin.js
index 20eae19c5d8..91ee58beda8 100644
--- a/apps/files_publiclink/js/admin.js
+++ b/apps/files_publiclink/js/admin.js
@@ -31,11 +31,13 @@ $(document).ready(function() {
if(token){
var html="<tr class='link' id='"+token+"'>";
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+="</tr>"
$(html).insertAfter($('#newlink_row'));
$('#path').val('');
+ $('#'+token+' input').focus();
+ $('#'+token+' input').select();
}
}
});
diff --git a/apps/files_publiclink/templates/admin.php b/apps/files_publiclink/templates/admin.php
index 4608877e5b8..f6c92d5cb17 100644
--- a/apps/files_publiclink/templates/admin.php
+++ b/apps/files_publiclink/templates/admin.php
@@ -1,18 +1,20 @@
<input type="hidden" id="baseUrl" value="<?php echo $_['baseUrl'];?>"/>
<table id="linklist">
- <tbody>
+ <thead id="controls">
<tr id="newlink_row">
<form action="#" id="newlink">
<td class="path"><input placeholder="Path" id="path"/></td>
<td><input type="submit" value="Share" /></td>
</form>
</tr>
+ </thead>
+ <tbody>
<?php foreach($_['links'] as $link):?>
- <tr class="link" id="<?php echo $link['token'];?>">
- <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><input type="submit" class="delete" data-token="<?php echo $link['token'];?>" value="<?php echo $l->t( 'Delete' ); ?>" /></td>
- </tr>
+ <tr class="link" id="<?php echo $link['token'];?>">
+ <td class="path"><?php echo $link['path'];?></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>
+ </tr>
<?php endforeach;?>
</tbody>
</table>
diff --git a/apps/files_publiclink/templates/breadcrumb.php b/apps/files_publiclink/templates/breadcrumb.php
deleted file mode 100644
index 733531d9e10..00000000000
--- a/apps/files_publiclink/templates/breadcrumb.php
+++ /dev/null
@@ -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; ?> \ No newline at end of file
diff --git a/apps/files_publiclink/templates/files.php b/apps/files_publiclink/templates/files.php
deleted file mode 100644
index 41ff0a1e765..00000000000
--- a/apps/files_publiclink/templates/files.php
+++ /dev/null
@@ -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; ?>
diff --git a/apps/files_publiclink/templates/index.php b/apps/files_publiclink/templates/index.php
deleted file mode 100644
index 759f3ad8772..00000000000
--- a/apps/files_publiclink/templates/index.php
+++ /dev/null
@@ -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> \ No newline at end of file