From 6aecc53750c48c176e2ffb41dff825aebac87f95 Mon Sep 17 00:00:00 2001 From: lian Date: Fri, 20 Mar 2015 11:52:04 +0800 Subject: [PATCH] new dir/file icon --- media/css/seahub.css | 1 + media/img/delete-orange.png | Bin 0 -> 94 bytes media/img/download-orange.png | Bin 0 -> 112 bytes media/img/share-orange.png | Bin 0 -> 209 bytes media/scripts/app/views/dirent.js | 17 +--- seahub/group/templates/group/group_info.html | 25 +----- seahub/templates/js/dir-view.html | 26 ++++++ seahub/templates/js/dirent.html | 83 ++++++++++--------- seahub/templates/myhome.html | 36 ++------ seahub/templates/pubrepo.html | 25 +----- 10 files changed, 83 insertions(+), 130 deletions(-) create mode 100644 media/img/delete-orange.png create mode 100644 media/img/download-orange.png create mode 100644 media/img/share-orange.png create mode 100644 seahub/templates/js/dir-view.html diff --git a/media/css/seahub.css b/media/css/seahub.css index 0afa75e3fc..ce846794e9 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -1877,6 +1877,7 @@ textarea:-moz-placeholder {/* for FF */ border:1px solid #eee; border-radius:5px; z-index:10; + width:100px; } .audit-select-hidden li a, .hidden-op a { diff --git a/media/img/delete-orange.png b/media/img/delete-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..a7f7f9f75b3dfbbda87a1cea05eb9a996ba2b933 GIT binary patch literal 94 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`s-7;6Ar_~T6Am!`J9q9+e~)Aa s--TS2mX-Mov3m`(4y<5oKF`4LW%4|Mg9l7hfEpM)UHx3vIVCg!0EOQi`2YX_ literal 0 HcmV?d00001 diff --git a/media/img/download-orange.png b/media/img/download-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..8206067bb2a8496797249bb2efd70b47e87a102c GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`=AJH&Ar_~T6Am!{J9q96{~?|y zO@Yj9YZx7Pc@26a3Yb;fOadNFVk75IT}7285wq#p5SZ`e)|h(1cRrm KpUXO@geCyL^&|fP literal 0 HcmV?d00001 diff --git a/media/img/share-orange.png b/media/img/share-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..cf980bacd68a1d620b7618412e81670558ab8719 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHF3h)VW1=43`rd@3a{V^l`$IP^^ zGt<7$PX9SOpueSKrXF?%6w~ zpR;^{5}uwejv*Y;$q5XMXYWovU~>4*Zga(+y=vPJmOO|PH)wv#;=#2d@2&2HB!%Vb zjH~=a79D(Q*1|ZwNt-Rxp3m4)AkD~web!P3S%%bNjXx{P=UM^{W$<+Mb6Mw<&;$US C`%M1; literal 0 HcmV?d00001 diff --git a/media/scripts/app/views/dirent.js b/media/scripts/app/views/dirent.js index 2082b28d55..28a905088a 100644 --- a/media/scripts/app/views/dirent.js +++ b/media/scripts/app/views/dirent.js @@ -138,21 +138,10 @@ define([ popup = this.$('.hidden-op'); if (popup.hasClass('hide')) { // the popup is not shown - if (icon.position().left + icon.width() + popup.outerWidth() < icon.parent().width()) { - popup.css({'left': icon.position().left + icon.width() + 5}); - if (icon.offset().top + popup.height() <= $('#main').offset().top + $('#main').height()) { - popup.css('top', 6); - } else { - popup.css('bottom', 2); - } - } else { - popup.css({'right':0}); - if (icon.offset().top + popup.height() <= $('#main').offset().top + $('#main').height()) { - popup.css('top', icon.position().top + icon.height() + 6); - } else { - popup.css('bottom', icon.position().top + icon.height() + 3); - } + if (icon.offset().top + popup.height() > $('#main').offset().top + $('#main').height()) { + popup.css('bottom', 20); } + popup.css({'left': icon.position().left}); popup.removeClass('hide'); app.globalState.noFileOpPopup = false; app.globalState.popup_tr = icon.parents('tr'); diff --git a/seahub/group/templates/group/group_info.html b/seahub/group/templates/group/group_info.html index 5f6984053b..cb0011ea19 100644 --- a/seahub/group/templates/group/group_info.html +++ b/seahub/group/templates/group/group_info.html @@ -144,30 +144,7 @@ -
-
-

-
-
- - - - - - - - - - - - - - -
- - {% trans "Name"%} {% trans "Size"%}{% trans "Last Update" %} {% trans "Operations"%}
- {% trans 'Loading...' %} -
+{% include "js/dir-view.html" %} {% endblock %} diff --git a/seahub/templates/js/dir-view.html b/seahub/templates/js/dir-view.html new file mode 100644 index 0000000000..feb971cc19 --- /dev/null +++ b/seahub/templates/js/dir-view.html @@ -0,0 +1,26 @@ +{% load i18n %} +
+
+

+
+
+ + + + + + + + + + + + + + +
+ + {% trans "Name"%} {% trans "Size"%}{% trans "Last Update" %}
+ {% trans 'Loading...' %} +
+ diff --git a/seahub/templates/js/dirent.html b/seahub/templates/js/dirent.html index 025bf1c17a..a5047c6c42 100644 --- a/seahub/templates/js/dirent.html +++ b/seahub/templates/js/dirent.html @@ -12,6 +12,27 @@ <%- dirent.obj_name %> <% } %> + +
+
+ + <% if (!repo_encrypted) { %> + + <% } %> + <% if (user_perm == 'rw') { %> + + <% } %> +
+ <% if (user_perm == 'rw') { %> + {% trans + + <% } %> +
+ <% if (dirent.last_modified) { %> @@ -20,25 +41,6 @@ <% print(""); %> <% } %> - -
-
- - <% if (!repo_encrypted) { %> - - <% } %> -
- <% if (user_perm == 'rw') { %> - {% trans - - <% } %> -
- <% } else { %> @@ -64,6 +66,28 @@ <%- dirent.obj_name %> + +
+
+ + <% if (!repo_encrypted) { %> + + <% } %> + <% if (user_perm == 'rw') { %> + + <% } %> +
+ <% if (user_perm == 'rw') { %> + {% trans + + <% } %> +
+ <%= dirent.file_size %> <% if (dirent.last_modified) { %> @@ -72,25 +96,4 @@ <% print("{% trans "Fetch failed" %}"); %> <% } %> - -
-
- - <% if (!repo_encrypted) { %> - - <% } %> -
- <% if (user_perm == 'rw') { %> - {% trans - - <% } %> -
- <% } %> diff --git a/seahub/templates/myhome.html b/seahub/templates/myhome.html index 6c86d34c63..65cacd46f2 100644 --- a/seahub/templates/myhome.html +++ b/seahub/templates/myhome.html @@ -21,7 +21,7 @@ {% endif %} /* lib view */ .repo-file-list .dirent-name { - width:260px; + width:220px; } .repo-file-list .dirent-size { width:114px; @@ -30,7 +30,12 @@ width:123px; } .repo-file-list .dirent-op { - width:110px; + width:150px; +} +.displayed-op .download, +.displayed-op .share, +.displayed-op .delete { + margin-left:5px; } /* custom select2 */ .select2-container-multi .select2-choices { @@ -205,32 +210,7 @@ {% endif %} - -
-
-

-
-
- - - - - - - - - - - - - - -
- - {% trans "Name"%} {% trans "Size"%}{% trans "Last Update" %} {% trans "Operations"%}
- {% trans 'Loading...' %} -
- +{% include "js/dir-view.html" %} {% endblock %} diff --git a/seahub/templates/pubrepo.html b/seahub/templates/pubrepo.html index ca98a22df8..19b3a2446a 100644 --- a/seahub/templates/pubrepo.html +++ b/seahub/templates/pubrepo.html @@ -61,30 +61,7 @@ -
-
-

-
-
- - - - - - - - - - - - - - -
- - {% trans "Name"%} {% trans "Size"%}{% trans "Last Update" %} {% trans "Operations"%}
- {% trans 'Loading...' %} -
+{% include "js/dir-view.html" %} {% endblock %}