]> source.dussan.org Git - nextcloud-server.git/commitdiff
add trash button to web interface
authorBjörn Schießle <schiessle@owncloud.com>
Tue, 15 Jan 2013 19:35:15 +0000 (20:35 +0100)
committerBjörn Schießle <schiessle@owncloud.com>
Tue, 15 Jan 2013 19:35:15 +0000 (20:35 +0100)
apps/files/css/files.css
apps/files/index.php
apps/files/js/files.js
apps/files/templates/index.php

index 36a1e5c954b9ae4935c5e2ef72578e96e173a1e8..6355a8cde176a2f46ce03d2b751706984aa0a7bf 100644 (file)
@@ -23,6 +23,8 @@
 #new>ul>li>p { cursor:pointer; }
 #new>ul>li>form>input { padding:0.3em; margin:-0.3em; }
 
+#trash { height:17px;  margin:0 0 0 1em; z-index:1010; position:absolute; right:13.5em; } 
+
 #upload { 
        height:27px; padding:0; margin-left:0.2em; overflow:hidden;
 }
index b64bde44cc0def096f927d3bc586c1208525ac9e..24f58bbd071830e68c65f1e5a0e83f4ceb61d9af 100644 (file)
@@ -105,6 +105,7 @@ $tmpl->assign('dir', OC_Filesystem::normalizePath($dir));
 $tmpl->assign('isCreatable', OC_Filesystem::isCreatable($dir . '/'));
 $tmpl->assign('permissions', $permissions);
 $tmpl->assign('files', $files);
+$tmpl->assign('trash', \OCP\App::isEnabled('files_trashbin'));
 $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
 $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
 $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
index bb298431e84afe1ea6d1c965574baea96451942c..c13d7a5961b2610d906ff87a4007fdc7a1d0249a 100644 (file)
@@ -82,6 +82,11 @@ $(document).ready(function() {
                $(this).parent().children('#file_upload_start').trigger('click');
                return false;
        });
+       
+       // Show Trash bin
+       $('#trash a').live('click', function() {
+               console.log("hello");
+       });
 
        var lastChecked;
 
index 2e0772443f2f3dbd8e124f82ceffe1e07197e124..f6b4c29d5a20a27bfd351d4773bf8c0eeb21f0c7 100644 (file)
                                        <a href="#" class="svg" onclick="return false;"></a>
                                </form>
                        </div>
+                       <?php if ($_['trash'] ): ?>
+                       <div id="trash" class="button">
+                               <a><?php echo $l->t('Trash');?></a>
+                       </div>
+                       <?php endif; ?>
                        <div id="uploadprogresswrapper">
                                <div id="uploadprogressbar"></div>
                                <input type="button" class="stop" style="display:none"
@@ -42,7 +47,6 @@
                                        onclick="javascript:Files.cancelUploads();"
                                />
                        </div>
-
                </div>
                <div id="file_action_panel"></div>
        <?php else:?>