From 1fa7c8fd5ecf365230cfe0ebaf0422aa92cffac5 Mon Sep 17 00:00:00 2001 From: Daniel Pan Date: Tue, 1 Mar 2016 17:20:04 +0800 Subject: [PATCH] Add lock/unlock function and fix a bug in DirentGridView menu event binding --- media/css/seahub.css | 6 +++ seahub/templates/js/templates.html | 3 ++ static/scripts/app/models/dirent.js | 69 ++++++++++++++++++++++++- static/scripts/app/views/dirent-grid.js | 49 ++++++++++++++---- static/scripts/app/views/dirent.js | 48 ++++------------- 5 files changed, 125 insertions(+), 50 deletions(-) diff --git a/media/css/seahub.css b/media/css/seahub.css index b518cca322..e26f44b29a 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -3833,6 +3833,7 @@ img.thumbnail { position:relative; } .grid-item .img-link { + position:relative; /* for locked icon */ display:block; text-align:center; height:100px; @@ -3880,6 +3881,11 @@ img.thumbnail { border-radius:3px; margin:0; } +.grid-file-locked-icon { + position:absolute; + bottom:0px; + right:10px; +} .grid-item-op { position:fixed; } diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html index 7f51b7568a..6ae08f378d 100644 --- a/seahub/templates/js/templates.html +++ b/seahub/templates/js/templates.html @@ -348,6 +348,9 @@