summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-12 11:34:17 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-12 11:34:17 -0400
commita8e6be601698622753bc948924c4ef564ffccaaa (patch)
tree85b7157bdfd8b91253aab4e15ddcc0496fd661e6
parentd78b75a0d1a8221e7855a3f2061928b5ec0471d8 (diff)
downloadnextcloud-server-a8e6be601698622753bc948924c4ef564ffccaaa.tar.gz
nextcloud-server-a8e6be601698622753bc948924c4ef564ffccaaa.zip
Change the share file action icon if the file is already shared with someone
-rw-r--r--apps/files_sharing/css/sharing.css4
-rw-r--r--apps/files_sharing/js/share.js22
2 files changed, 22 insertions, 4 deletions
diff --git a/apps/files_sharing/css/sharing.css b/apps/files_sharing/css/sharing.css
index 152f43577ac..0759af2c274 100644
--- a/apps/files_sharing/css/sharing.css
+++ b/apps/files_sharing/css/sharing.css
@@ -4,5 +4,5 @@
-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
#shared_list { padding:0.5em; list-style-type: none; }
#public { border-top:1px solid #ddd; padding-top:0.5em; }
-a.unshare { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
-a.unshare:hover { background:#fff; -moz-box-shadow:0 0 10px #fff; -webkit-box-shadow:0 0 10px #fff; box-shadow:0 0 10px #fff; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; } \ No newline at end of file
+a.unshare { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; opacity:.5; }
+a.unshare:hover { opacity:1; } \ No newline at end of file
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 83a7a68cb3a..2e284b868e5 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -1,7 +1,25 @@
$(document).ready(function() {
if (typeof FileActions !== 'undefined') {
- FileActions.register('all', 'Share', OC.imagePath('core', 'actions/share'), function(filename) {
- if (($('#dropdown').length)) {
+ FileActions.register('all', 'Share', function(filename) {
+ var icon;
+ var file = $('#dir').val()+'/'+filename;
+ $.ajax({
+ type: 'GET',
+ url: OC.linkTo('files_sharing', 'ajax/getitem.php'),
+ dataType: 'json',
+ data: 'source='+file,
+ async: false,
+ success: function(users) {
+ if (users.length > 0) {
+ icon = OC.imagePath('core', 'actions/shared');
+ } else {
+ icon = OC.imagePath('core', 'actions/share');
+ }
+ }
+ });
+ return icon;
+ }, function(filename) {
+ if (($('#dropdown').length > 0)) {
$('#dropdown').hide('blind', function() {
var dropdownFile = $('#dropdown').data('file')
var file = $('#dir').val()+'/'+filename;
#008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
#   <rcalvoi@yahoo.com>, 2012-2013.
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-02-10 00:08+0100\n"
"PO-Revision-Date: 2013-02-09 23:08+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Catalan (http://www.transifex.com/projects/p/owncloud/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: app.php:339
msgid "Help"
msgstr "Ajuda"

#: app.php:346
msgid "Personal"
msgstr "Personal"

#: app.php:351
msgid "Settings"
msgstr "Configuració"

#: app.php:356
msgid "Users"
msgstr "Usuaris"

#: app.php:363
msgid "Apps"
msgstr "Aplicacions"

#: app.php:365
msgid "Admin"
msgstr "Administració"

#: files.php:202
msgid "ZIP download is turned off."
msgstr "La baixada en ZIP està desactivada."

#: files.php:203
msgid "Files need to be downloaded one by one."
msgstr "Els fitxers s'han de baixar d'un en un."

#: files.php:203 files.php:228
msgid "Back to Files"
msgstr "Torna a Fitxers"

#: files.php:227
msgid "Selected files too large to generate zip file."
msgstr "Els fitxers seleccionats son massa grans per generar un fitxer zip."

#: helper.php:226
msgid "couldn't be determined"
msgstr "no s'ha pogut determinar"

#: json.php:28
msgid "Application is not enabled"
msgstr "L'aplicació no està habilitada"

#: json.php:39 json.php:62 json.php:73
msgid "Authentication error"
msgstr "Error d'autenticació"

#: json.php:51
msgid "Token expired. Please reload page."
msgstr "El testimoni ha expirat. Torneu a carregar la pàgina."

#: search/provider/file.php:17 search/provider/file.php:35
msgid "Files"
msgstr "Fitxers"

#: search/provider/file.php:26 search/provider/file.php:33
msgid "Text"
msgstr "Text"

#: search/provider/file.php:29
msgid "Images"
msgstr "Imatges"

#: setup.php:624
msgid ""
"Your web server is not yet properly setup to allow files synchronization "
"because the WebDAV interface seems to be broken."
msgstr ""

#: setup.php:625
#, php-format
msgid "Please double check the <a href='%s'>installation guides</a>."
msgstr ""

#: template.php:113
msgid "seconds ago"
msgstr "segons enrere"

#: template.php:114
msgid "1 minute ago"
msgstr "fa 1 minut"

#: template.php:115
#, php-format
msgid "%d minutes ago"
msgstr "fa %d minuts"

#: template.php:116
msgid "1 hour ago"
msgstr "fa 1 hora"

#: template.php:117
#, php-format
msgid "%d hours ago"
msgstr "fa %d hores"

#: template.php:118
msgid "today"
msgstr "avui"

#: template.php:119
msgid "yesterday"
msgstr "ahir"

#: template.php:120
#, php-format
msgid "%d days ago"
msgstr "fa %d dies"

#: template.php:121
msgid "last month"
msgstr "el mes passat"

#: template.php:122
#, php-format
msgid "%d months ago"
msgstr "fa %d mesos"

#: template.php:123
msgid "last year"
msgstr "l'any passat"

#: template.php:124
msgid "years ago"
msgstr "fa anys"

#: updater.php:75
#, php-format
msgid "%s is available. Get <a href=\"%s\">more information</a>"
msgstr "%s està disponible. Obtén <a href=\"%s\">més informació</a>"

#: updater.php:77
msgid "up to date"
msgstr "actualitzat"

#: updater.php:80
msgid "updates check is disabled"
msgstr "la comprovació d'actualitzacions està desactivada"

#: vcategories.php:188 vcategories.php:249
#, php-format
msgid "Could not find category \"%s\""
msgstr "No s'ha trobat la categoria \"%s\""