summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-28 08:12:08 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-29 20:16:39 +0200
commitcbaf858dea0f2094805edb6aa223bdd6877fff5b (patch)
tree9da83c325bb6ab94160bec964b8ef64aeda745ae /core
parent3b9fac8f81b76af988ea620a207e6c65fa665589 (diff)
parent80374c7cb2f3c98e350c95f92a9785aacef5d2c4 (diff)
downloadnextcloud-server-cbaf858dea0f2094805edb6aa223bdd6877fff5b.tar.gz
nextcloud-server-cbaf858dea0f2094805edb6aa223bdd6877fff5b.zip
Merge remote-tracking branch 'gitorious/master' into routing
Conflicts: apps/files/js/fileactions.js apps/files_archive/js/archive.js
Diffstat (limited to 'core')
-rw-r--r--core/ajax/share.php130
-rw-r--r--core/css/share.css18
-rw-r--r--core/img/actions/add.pngbin488 -> 441 bytes
-rw-r--r--core/img/actions/delete.pngbin275 -> 240 bytes
-rw-r--r--core/img/actions/download.pngbin246 -> 236 bytes
-rw-r--r--core/img/actions/history.pngbin370 -> 363 bytes
-rw-r--r--core/img/actions/info.pngbin474 -> 423 bytes
-rw-r--r--core/img/actions/logout.pngbin657 -> 592 bytes
-rw-r--r--core/img/actions/mail.pngbin463 -> 405 bytes
-rw-r--r--core/img/actions/pause-big.pngbin183 -> 166 bytes
-rw-r--r--core/img/actions/pause.pngbin182 -> 170 bytes
-rw-r--r--core/img/actions/play-add.pngbin275 -> 237 bytes
-rw-r--r--core/img/actions/play-big.pngbin212 -> 210 bytes
-rw-r--r--core/img/actions/play-next.pngbin253 -> 224 bytes
-rw-r--r--core/img/actions/play-previous.pngbin260 -> 237 bytes
-rw-r--r--core/img/actions/play.pngbin220 -> 201 bytes
-rw-r--r--core/img/actions/public.pngbin459 -> 412 bytes
-rw-r--r--core/img/actions/rename.pngbin310 -> 267 bytes
-rw-r--r--core/img/actions/search.pngbin701 -> 554 bytes
-rw-r--r--core/img/actions/settings.pngbin883 -> 683 bytes
-rw-r--r--core/img/actions/share.pngbin377 -> 338 bytes
-rw-r--r--core/img/actions/shared.pngbin437 -> 364 bytes
-rw-r--r--core/img/actions/sound-off.pngbin217 -> 192 bytes
-rw-r--r--core/img/actions/sound.pngbin292 -> 254 bytes
-rw-r--r--core/img/actions/triangle-s.pngbin526 -> 515 bytes
-rw-r--r--core/img/actions/upload-white.pngbin228 -> 226 bytes
-rw-r--r--core/img/actions/upload.pngbin236 -> 235 bytes
-rw-r--r--core/img/breadcrumb-start.pngbin452 -> 311 bytes
-rw-r--r--core/img/breadcrumb.pngbin452 -> 320 bytes
-rw-r--r--core/img/favicon-touch.pngbin5703 -> 3705 bytes
-rw-r--r--core/img/favicon.pngbin1231 -> 912 bytes
-rw-r--r--core/img/filetypes/application-msword.pngbin28346 -> 789 bytes
-rw-r--r--core/img/filetypes/application-sgf.pngbin725 -> 702 bytes
-rw-r--r--core/img/filetypes/application-vnd.oasis.opendocument.formula.pngbin580 -> 479 bytes
-rw-r--r--core/img/filetypes/application-vnd.oasis.opendocument.graphics.pngbin572 -> 475 bytes
-rw-r--r--core/img/filetypes/application-vnd.oasis.opendocument.presentation.pngbin441 -> 333 bytes
-rw-r--r--core/img/filetypes/application-vnd.oasis.opendocument.spreadsheet.pngbin436 -> 344 bytes
-rw-r--r--core/img/filetypes/application-vnd.oasis.opendocument.text.pngbin420 -> 347 bytes
-rw-r--r--core/img/filetypes/application-x-7z-compressed.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-bzip-compressed-tar.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-bzip.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-compressed-tar.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-deb.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-debian-package.pngbin570 -> 548 bytes
-rw-r--r--core/img/filetypes/application-x-gzip.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-lzma-compressed-tar.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-rar.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-rpm.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-tar.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-x-tarz.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/application-zip.pngbin652 -> 650 bytes
-rw-r--r--core/img/filetypes/flash.pngbin582 -> 580 bytes
-rw-r--r--core/img/icon-error.pngbin1573 -> 1344 bytes
-rw-r--r--core/img/icon-sync.pngbin1577 -> 1271 bytes
-rw-r--r--core/img/icon.pngbin1344 -> 1109 bytes
-rw-r--r--core/img/logo-inverted.pngbin8116 -> 5938 bytes
-rw-r--r--core/img/logo-square.pngbin22792 -> 16048 bytes
-rw-r--r--core/img/logo-wide.pngbin2293 -> 1908 bytes
-rw-r--r--core/img/logo.pngbin7356 -> 5860 bytes
-rw-r--r--core/img/places/file.pngbin391 -> 364 bytes
-rw-r--r--core/img/places/folder.pngbin386 -> 339 bytes
-rw-r--r--core/img/places/home.pngbin416 -> 372 bytes
-rw-r--r--core/img/places/music.pngbin561 -> 532 bytes
-rw-r--r--core/img/places/picture.pngbin307 -> 300 bytes
-rw-r--r--core/img/remoteStorage-big.pngbin9742 -> 8997 bytes
-rw-r--r--core/js/js.js9
-rw-r--r--core/js/setup.js7
-rw-r--r--core/js/share.js431
-rw-r--r--core/l10n/de.php14
-rw-r--r--core/l10n/es.php6
-rw-r--r--core/l10n/sv.php16
-rw-r--r--core/templates/installation.php25
72 files changed, 631 insertions, 25 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
new file mode 100644
index 00000000000..806ca9fb98f
--- /dev/null
+++ b/core/ajax/share.php
@@ -0,0 +1,130 @@
+<?php
+/**
+* ownCloud
+*
+* @author Michael Gapczynski
+* @copyright 2012 Michael Gapczynski mtgap@owncloud.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*/
+require_once '../../lib/base.php';
+
+OC_JSON::checkLoggedIn();
+if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSource'])) {
+ switch ($_POST['action']) {
+ case 'share':
+ if (isset($_POST['shareType']) && isset($_POST['shareWith']) && isset($_POST['permissions'])) {
+ try {
+ OCP\Share::shareItem($_POST['itemType'], $_POST['itemSource'], (int)$_POST['shareType'], $_POST['shareWith'], $_POST['permissions']);
+ // TODO May need to return private link
+ OC_JSON::success();
+ } catch (Exception $exception) {
+ OC_JSON::error(array('data' => array('message' => $exception->getMessage())));
+ }
+ }
+ break;
+ case 'unshare':
+ if (isset($_POST['shareType']) && isset($_POST['shareWith'])) {
+ $return = OCP\Share::unshare($_POST['itemType'], $_POST['itemSource'], $_POST['shareType'], $_POST['shareWith']);
+ ($return) ? OC_JSON::success() : OC_JSON::error();
+ }
+ break;
+ case 'setPermissions':
+ if (isset($_POST['shareType']) && isset($_POST['shareWith']) && isset($_POST['permissions'])) {
+ $return = OCP\Share::setPermissions($_POST['itemType'], $_POST['itemSource'], $_POST['shareType'], $_POST['shareWith'], $_POST['permissions']);
+ ($return) ? OC_JSON::success() : OC_JSON::error();
+ }
+ break;
+ }
+} else if (isset($_GET['fetch'])) {
+ switch ($_GET['fetch']) {
+ case 'getItemsSharedStatuses':
+ if (isset($_GET['itemType'])) {
+ $return = OCP\Share::getItemsShared($_GET['itemType'], OCP\Share::FORMAT_STATUSES);
+ is_array($return) ? OC_JSON::success(array('data' => $return)) : OC_JSON::error();
+ }
+ break;
+ case 'getItem':
+ if (isset($_GET['itemType']) && isset($_GET['itemSource']) && isset($_GET['checkReshare']) && isset($_GET['checkShares'])) {
+ if ($_GET['checkReshare'] == 'true') {
+ $reshare = OCP\Share::getItemSharedWithBySource($_GET['itemType'], $_GET['itemSource'], OCP\Share::FORMAT_NONE, null, true);
+ } else {
+ $reshare = false;
+ }
+ if ($_GET['checkShares'] == 'true') {
+ $shares = OCP\Share::getItemShared($_GET['itemType'], $_GET['itemSource']);
+ } else {
+ $shares = false;
+ }
+ OC_JSON::success(array('data' => array('reshare' => $reshare, 'shares' => $shares)));
+ }
+ break;
+ case 'getShareWith':
+ if (isset($_GET['search'])) {
+ $shareWith = array();
+ if (OC_App::isEnabled('contacts')) {
+ // TODO Add function to contacts to only get the 'fullname' column to improve performance
+ $ids = OC_Contacts_Addressbook::activeIds();
+ foreach ($ids as $id) {
+ $vcards = OC_Contacts_VCard::all($id);
+ foreach ($vcards as $vcard) {
+ $contact = $vcard['fullname'];
+ if (stripos($contact, $_GET['search']) !== false
+ && (!isset($_GET['itemShares'])
+ || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT])
+ || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT])
+ || !in_array($contact, $_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]))) {
+ $shareWith[] = array('label' => $contact, 'value' => array('shareType' => 5, 'shareWith' => $vcard['id']));
+ }
+ }
+ }
+ }
+ $count = 0;
+ $users = array();
+ $limit = 0;
+ $offset = 0;
+ while ($count < 4 && count($users) == $limit) {
+ $limit = 4 - $count;
+ $users = OC_User::getUsers($_GET['search'], $limit, $offset);
+ $offset += $limit;
+ foreach ($users as $user) {
+ if ((!isset($_GET['itemShares']) || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) || !in_array($user, $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) && $user != OC_User::getUser()) {
+ $shareWith[] = array('label' => $user, 'value' => array('shareType' => OCP\Share::SHARE_TYPE_USER, 'shareWith' => $user));
+ $count++;
+ }
+ }
+ }
+ $count = 0;
+ $groups = OC_Group::getUserGroups(OC_User::getUser());
+ foreach ($groups as $group) {
+ if ($count < 4) {
+ if (stripos($group, $_GET['search']) !== false
+ && (!isset($_GET['itemShares'])
+ || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])
+ || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])
+ || !in_array($group, $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]))) {
+ $shareWith[] = array('label' => $group.' (group)', 'value' => array('shareType' => OCP\Share::SHARE_TYPE_GROUP, 'shareWith' => $group));
+ $count++;
+ }
+ } else {
+ break;
+ }
+ }
+ OC_JSON::success(array('data' => $shareWith));
+ }
+ break;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/core/css/share.css b/core/css/share.css
new file mode 100644
index 00000000000..e4b4870dd16
--- /dev/null
+++ b/core/css/share.css
@@ -0,0 +1,18 @@
+/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net
+ This file is licensed under the Affero General Public License version 3 or later.
+ See the COPYING-README file. */
+
+#dropdown { display:block; position:absolute; z-index:500; width:19em; right:0; margin-right:7em; background:#eee; padding:1em;
+-moz-box-shadow:0 1px 1px #777; -webkit-box-shadow:0 1px 1px #777; box-shadow:0 1px 1px #777;
+-moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em;
+-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
+.reshare { padding-left:0.5em; }
+#shareWithList { padding:0.5em; list-style-type: none; }
+#shareWithList li { padding-top:0.1em; }
+#dropdown label { font-weight:normal; }
+#dropdown input[type="checkbox"] { margin:0 0.2em 0 0.5em; }
+a.showCruds { display:inline; opacity:.5; }
+a.showCruds:hover { opacity:1; }
+a.unshare { float:right; display:inline; padding:.3em 0 0 .3em !important; opacity:.5; }
+a.unshare:hover { opacity:1; }
+#privateLink { border-top:1px solid #ddd; padding-top:0.5em; } \ No newline at end of file
diff --git a/core/img/actions/add.png b/core/img/actions/add.png
index db1b1970f17..25d472b2dc4 100644
--- a/core/img/actions/add.png
+++ b/core/img/actions/add.png
Binary files differ
diff --git a/core/img/actions/delete.png b/core/img/actions/delete.png
index bc0c782882d..fa8e18183ed 100644
--- a/core/img/actions/delete.png
+++ b/core/img/actions/delete.png
Binary files differ
diff --git a/core/img/actions/download.png b/core/img/actions/download.png
index 14e88e14c0f..65954f941bb 100644
--- a/core/img/actions/download.png
+++ b/core/img/actions/download.png
Binary files differ
diff --git a/core/img/actions/history.png b/core/img/actions/history.png
index b1e743651f8..1d138b8cd5a 100644
--- a/core/img/actions/history.png
+++ b/core/img/actions/history.png
Binary files differ
diff --git a/core/img/actions/info.png b/core/img/actions/info.png
index 2257d144d11..37ccb356830 100644
--- a/core/img/actions/info.png
+++ b/core/img/actions/info.png
Binary files differ
diff --git a/core/img/actions/logout.png b/core/img/actions/logout.png
index 74dcd33bee7..eb2ea766c31 100644
--- a/core/img/actions/logout.png
+++ b/core/img/actions/logout.png
Binary files differ
diff --git a/core/img/actions/mail.png b/core/img/actions/mail.png
index 4d3192ef329..8e884fbc0ea 100644
--- a/core/img/actions/mail.png
+++ b/core/img/actions/mail.png
Binary files differ
diff --git a/core/img/actions/pause-big.png b/core/img/actions/pause-big.png
index 9bcfd0406d8..1c4cf503b8d 100644
--- a/core/img/actions/pause-big.png
+++ b/core/img/actions/pause-big.png
Binary files differ
diff --git a/core/img/actions/pause.png b/core/img/actions/pause.png
index ced8c43ab34..f74ed3a8619 100644
--- a/core/img/actions/pause.png
+++ b/core/img/actions/pause.png
Binary files differ
diff --git a/core/img/actions/play-add.png b/core/img/actions/play-add.png
index 0c330d4ac44..0097f671aef 100644
--- a/core/img/actions/play-add.png
+++ b/core/img/actions/play-add.png
Binary files differ
diff --git a/core/img/actions/play-big.png b/core/img/actions/play-big.png
index 3ccd36129ec..2da2426dcfc 100644
--- a/core/img/actions/play-big.png
+++ b/core/img/actions/play-big.png
Binary files differ
diff --git a/core/img/actions/play-next.png b/core/img/actions/play-next.png
index 0c0ccc87cdc..08568b3dc0b 100644
--- a/core/img/actions/play-next.png
+++ b/core/img/actions/play-next.png
Binary files differ
diff --git a/core/img/actions/play-previous.png b/core/img/actions/play-previous.png
index d98cedaa1e8..811cde46c15 100644
--- a/core/img/actions/play-previous.png
+++ b/core/img/actions/play-previous.png
Binary files differ
diff --git a/core/img/actions/play.png b/core/img/actions/play.png
index a252a751554..adbef1e576d 100644
--- a/core/img/actions/play.png
+++ b/core/img/actions/play.png
Binary files differ
diff --git a/core/img/actions/public.png b/core/img/actions/public.png
index 75d1366326b..9e56f2919fd 100644
--- a/core/img/actions/public.png
+++ b/core/img/actions/public.png
Binary files differ
diff --git a/core/img/actions/rename.png b/core/img/actions/rename.png
index 9993a092df1..3af6840071b 100644
--- a/core/img/actions/rename.png
+++ b/core/img/actions/rename.png
Binary files differ
diff --git a/core/img/actions/search.png b/core/img/actions/search.png
index bfedb80bb57..98e1d73ee34 100644
--- a/core/img/actions/search.png
+++ b/core/img/actions/search.png
Binary files differ
diff --git a/core/img/actions/settings.png b/core/img/actions/settings.png
index 5b1607e59fc..8b3acb00a4f 100644
--- a/core/img/actions/settings.png
+++ b/core/img/actions/settings.png
Binary files differ
diff --git a/core/img/actions/share.png b/core/img/actions/share.png
index 62c4627f317..099e4d6ab35 100644
--- a/core/img/actions/share.png
+++ b/core/img/actions/share.png
Binary files differ
diff --git a/core/img/actions/shared.png b/core/img/actions/shared.png
index 073ff741685..6e112e75b44 100644
--- a/core/img/actions/shared.png
+++ b/core/img/actions/shared.png
Binary files differ
diff --git a/core/img/actions/sound-off.png b/core/img/actions/sound-off.png
index 7900e500c90..2eddb00af0f 100644
--- a/core/img/actions/sound-off.png
+++ b/core/img/actions/sound-off.png
Binary files differ
diff --git a/core/img/actions/sound.png b/core/img/actions/sound.png
index 838c9cee171..9349c94e7a4 100644
--- a/core/img/actions/sound.png
+++ b/core/img/actions/sound.png
Binary files differ
diff --git a/core/img/actions/triangle-s.png b/core/img/actions/triangle-s.png
index d77d5db2caa..53590a2197b 100644
--- a/core/img/actions/triangle-s.png
+++ b/core/img/actions/triangle-s.png
Binary files differ
diff --git a/core/img/actions/upload-white.png b/core/img/actions/upload-white.png
index 09dba9e9108..fd9bdccc240 100644
--- a/core/img/actions/upload-white.png
+++ b/core/img/actions/upload-white.png
Binary files differ
diff --git a/core/img/actions/upload.png b/core/img/actions/upload.png
index 5744aad75a8..1d90165a552 100644
--- a/core/img/actions/upload.png
+++ b/core/img/actions/upload.png
Binary files differ
diff --git a/core/img/breadcrumb-start.png b/core/img/breadcrumb-start.png
index a79d675454e..b0df5f44037 100644
--- a/core/img/breadcrumb-start.png
+++ b/core/img/breadcrumb-start.png
Binary files differ
diff --git a/core/img/breadcrumb.png b/core/img/breadcrumb.png
index b124f349f56..84992be0d93 100644
--- a/core/img/breadcrumb.png
+++ b/core/img/breadcrumb.png
Binary files differ
diff --git a/core/img/favicon-touch.png b/core/img/favicon-touch.png
index cfaaa4399ac..24770fb634f 100644
--- a/core/img/favicon-touch.png
+++ b/core/img/favicon-touch.png
Binary files differ
diff --git a/core/img/favicon.png b/core/img/favicon.png
index c1b1cb65460..79b6795f6f6 100644
--- a/core/img/favicon.png
+++ b/core/img/favicon.png
Binary files differ
diff --git a/core/img/filetypes/application-msword.png b/core/img/filetypes/application-msword.png
index 6f7bb520f25..e8b230c59cb 100644
--- a/core/img/filetypes/application-msword.png
+++ b/core/img/filetypes/application-msword.png
Binary files differ
diff --git a/core/img/filetypes/application-sgf.png b/core/img/filetypes/application-sgf.png
index f171f5579e7..48996c54394 100644
--- a/core/img/filetypes/application-sgf.png
+++ b/core/img/filetypes/application-sgf.png
Binary files differ
diff --git a/core/img/filetypes/application-vnd.oasis.opendocument.formula.png b/core/img/filetypes/application-vnd.oasis.opendocument.formula.png
index 4cefbb690d1..e0cf49542d4 100644
--- a/core/img/filetypes/application-vnd.oasis.opendocument.formula.png
+++ b/core/img/filetypes/application-vnd.oasis.opendocument.formula.png
Binary files differ
diff --git a/core/img/filetypes/application-vnd.oasis.opendocument.graphics.png b/core/img/filetypes/application-vnd.oasis.opendocument.graphics.png
index 3d66cc97eb5..b326a0543a5 100644
--- a/core/img/filetypes/application-vnd.oasis.opendocument.graphics.png
+++ b/core/img/filetypes/application-vnd.oasis.opendocument.graphics.png
Binary files differ
diff --git a/core/img/filetypes/application-vnd.oasis.opendocument.presentation.png b/core/img/filetypes/application-vnd.oasis.opendocument.presentation.png
index 46942cba285..7c6fd246840 100644
--- a/core/img/filetypes/application-vnd.oasis.opendocument.presentation.png
+++ b/core/img/filetypes/application-vnd.oasis.opendocument.presentation.png
Binary files differ
diff --git a/core/img/filetypes/application-vnd.oasis.opendocument.spreadsheet.png b/core/img/filetypes/application-vnd.oasis.opendocument.spreadsheet.png
index abc38d4310c..8b0e85b0670 100644
--- a/core/img/filetypes/application-vnd.oasis.opendocument.spreadsheet.png
+++ b/core/img/filetypes/application-vnd.oasis.opendocument.spreadsheet.png
Binary files differ
diff --git a/core/img/filetypes/application-vnd.oasis.opendocument.text.png b/core/img/filetypes/application-vnd.oasis.opendocument.text.png
index 06c1f30c8fa..48452eb3e86 100644
--- a/core/img/filetypes/application-vnd.oasis.opendocument.text.png
+++ b/core/img/filetypes/application-vnd.oasis.opendocument.text.png
Binary files differ
diff --git a/core/img/filetypes/application-x-7z-compressed.png b/core/img/filetypes/application-x-7z-compressed.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-7z-compressed.png
+++ b/core/img/filetypes/application-x-7z-compressed.png
Binary files differ
diff --git a/core/img/filetypes/application-x-bzip-compressed-tar.png b/core/img/filetypes/application-x-bzip-compressed-tar.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-bzip-compressed-tar.png
+++ b/core/img/filetypes/application-x-bzip-compressed-tar.png
Binary files differ
diff --git a/core/img/filetypes/application-x-bzip.png b/core/img/filetypes/application-x-bzip.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-bzip.png
+++ b/core/img/filetypes/application-x-bzip.png
Binary files differ
diff --git a/core/img/filetypes/application-x-compressed-tar.png b/core/img/filetypes/application-x-compressed-tar.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-compressed-tar.png
+++ b/core/img/filetypes/application-x-compressed-tar.png
Binary files differ
diff --git a/core/img/filetypes/application-x-deb.png b/core/img/filetypes/application-x-deb.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-deb.png
+++ b/core/img/filetypes/application-x-deb.png
Binary files differ
diff --git a/core/img/filetypes/application-x-debian-package.png b/core/img/filetypes/application-x-debian-package.png
index eff1b7fc8c2..b3f6b7e5cf9 100644
--- a/core/img/filetypes/application-x-debian-package.png
+++ b/core/img/filetypes/application-x-debian-package.png
Binary files differ
diff --git a/core/img/filetypes/application-x-gzip.png b/core/img/filetypes/application-x-gzip.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-gzip.png
+++ b/core/img/filetypes/application-x-gzip.png
Binary files differ
diff --git a/core/img/filetypes/application-x-lzma-compressed-tar.png b/core/img/filetypes/application-x-lzma-compressed-tar.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-lzma-compressed-tar.png
+++ b/core/img/filetypes/application-x-lzma-compressed-tar.png
Binary files differ
diff --git a/core/img/filetypes/application-x-rar.png b/core/img/filetypes/application-x-rar.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-rar.png
+++ b/core/img/filetypes/application-x-rar.png
Binary files differ
diff --git a/core/img/filetypes/application-x-rpm.png b/core/img/filetypes/application-x-rpm.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-rpm.png
+++ b/core/img/filetypes/application-x-rpm.png
Binary files differ
diff --git a/core/img/filetypes/application-x-tar.png b/core/img/filetypes/application-x-tar.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-tar.png
+++ b/core/img/filetypes/application-x-tar.png
Binary files differ
diff --git a/core/img/filetypes/application-x-tarz.png b/core/img/filetypes/application-x-tarz.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-x-tarz.png
+++ b/core/img/filetypes/application-x-tarz.png
Binary files differ
diff --git a/core/img/filetypes/application-zip.png b/core/img/filetypes/application-zip.png
index 55dd0f75366..2cd08aebf95 100644
--- a/core/img/filetypes/application-zip.png
+++ b/core/img/filetypes/application-zip.png
Binary files differ
diff --git a/core/img/filetypes/flash.png b/core/img/filetypes/flash.png
index 5769120b1b6..9f5db634a4f 100644
--- a/core/img/filetypes/flash.png
+++ b/core/img/filetypes/flash.png
Binary files differ
diff --git a/core/img/icon-error.png b/core/img/icon-error.png
index ed438a32fd8..1ce0be0fb2e 100644
--- a/core/img/icon-error.png
+++ b/core/img/icon-error.png
Binary files differ
diff --git a/core/img/icon-sync.png b/core/img/icon-sync.png
index 99a43d4c69a..a3d09704246 100644
--- a/core/img/icon-sync.png
+++ b/core/img/icon-sync.png
Binary files differ
diff --git a/core/img/icon.png b/core/img/icon.png
index 24a4b1c3e83..745b82584c6 100644
--- a/core/img/icon.png
+++ b/core/img/icon.png
Binary files differ
diff --git a/core/img/logo-inverted.png b/core/img/logo-inverted.png
index d9fd119dc18..265a8871b45 100644
--- a/core/img/logo-inverted.png
+++ b/core/img/logo-inverted.png
Binary files differ
diff --git a/core/img/logo-square.png b/core/img/logo-square.png
index 086d415db6d..b836de8f3be 100644
--- a/core/img/logo-square.png
+++ b/core/img/logo-square.png
Binary files differ
diff --git a/core/img/logo-wide.png b/core/img/logo-wide.png
index ea10828db5e..702f1d97e5b 100644
--- a/core/img/logo-wide.png
+++ b/core/img/logo-wide.png
Binary files differ
diff --git a/core/img/logo.png b/core/img/logo.png
index 8177c4cdba1..a84fe145bbd 100644
--- a/core/img/logo.png
+++ b/core/img/logo.png
Binary files differ
diff --git a/core/img/places/file.png b/core/img/places/file.png
index 49790448897..63837a1af90 100644
--- a/core/img/places/file.png
+++ b/core/img/places/file.png
Binary files differ
diff --git a/core/img/places/folder.png b/core/img/places/folder.png
index 3edbe257a34..46079e03e9e 100644
--- a/core/img/places/folder.png
+++ b/core/img/places/folder.png
Binary files differ
diff --git a/core/img/places/home.png b/core/img/places/home.png
index b3fb9bbaf6f..c3dbd3e3538 100644
--- a/core/img/places/home.png
+++ b/core/img/places/home.png
Binary files differ
diff --git a/core/img/places/music.png b/core/img/places/music.png
index 4c844425d64..85ee2474cd1 100644
--- a/core/img/places/music.png
+++ b/core/img/places/music.png
Binary files differ
diff --git a/core/img/places/picture.png b/core/img/places/picture.png
index 980a7c69813..9abcd09722c 100644
--- a/core/img/places/picture.png
+++ b/core/img/places/picture.png
Binary files differ
diff --git a/core/img/remoteStorage-big.png b/core/img/remoteStorage-big.png
index 7c429a6a738..f2254233031 100644
--- a/core/img/remoteStorage-big.png
+++ b/core/img/remoteStorage-big.png
Binary files differ
diff --git a/core/js/js.js b/core/js/js.js
index 7a50b2e7b9d..e50b407bacf 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -475,8 +475,9 @@ $(document).ready(function(){
}
}
// hide log in button etc. when form fields not filled
- checkShowCredentials();
- $('input#user, input#password').keyup(checkShowCredentials);
+ // commented out due to some browsers having issues with it
+ // checkShowCredentials();
+ // $('input#user, input#password').keyup(checkShowCredentials);
$('#settings #expand').keydown(function(event) {
if (event.which == 13 || event.which == 32) {
@@ -534,7 +535,7 @@ if (!Array.prototype.map){
}
}
- return res;
+ return res;
};
}
@@ -542,7 +543,7 @@ if (!Array.prototype.map){
* Filter Jquery selector by attribute value
**/
$.fn.filterAttr = function(attr_name, attr_value) {
- return this.filter(function() { return $(this).attr(attr_name) === attr_value; });
+ return this.filter(function() { return $(this).attr(attr_name) === attr_value; });
};
function humanFileSize(size) {
diff --git a/core/js/setup.js b/core/js/setup.js
index 6e056cc90d1..23c705a0686 100644
--- a/core/js/setup.js
+++ b/core/js/setup.js
@@ -4,6 +4,7 @@ $(document).ready(function() {
sqlite:!!$('#hasSQLite').val(),
mysql:!!$('#hasMySQL').val(),
postgresql:!!$('#hasPostgreSQL').val(),
+ oracle:!!$('#hasOracle').val(),
}
$('#selectDbType').buttonset();
@@ -34,6 +35,12 @@ $(document).ready(function() {
$('#dbhost').show(250);
$('#dbhostlabel').show(250);
});
+
+ $('#oci').click(function() {
+ $('#use_other_db').slideDown(250);
+ $('#dbhost').show(250);
+ $('#dbhostlabel').show(250);
+ });
$('input[checked]').trigger('click');
diff --git a/core/js/share.js b/core/js/share.js
new file mode 100644
index 00000000000..3db69dc6901
--- /dev/null
+++ b/core/js/share.js
@@ -0,0 +1,431 @@
+OC.Share={
+ SHARE_TYPE_USER:0,
+ SHARE_TYPE_GROUP:1,
+ SHARE_TYPE_PRIVATE_LINK:3,
+ SHARE_TYPE_EMAIL:4,
+ PERMISSION_CREATE:4,
+ PERMISSION_READ:1,
+ PERMISSION_UPDATE:2,
+ PERMISSION_DELETE:8,
+ PERMISSION_SHARE:16,
+ itemShares:[],
+ statuses:[],
+ droppedDown:false,
+ loadIcons:function(itemType) {
+ // Load all share icons
+ $.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getItemsSharedStatuses', itemType: itemType }, function(result) {
+ if (result && result.status === 'success') {
+ $.each(result.data, function(item, hasPrivateLink) {
+ // Private links override shared in terms of icon display
+ if (itemType != 'file' && itemType != 'folder') {
+ if (hasPrivateLink) {
+ var image = OC.imagePath('core', 'actions/public');
+ } else {
+ var image = OC.imagePath('core', 'actions/shared');
+ }
+ $('a.share[data-item="'+item+'"]').css('background', 'url('+image+') no-repeat center');
+ }
+ OC.Share.statuses[item] = hasPrivateLink;
+ });
+ }
+ });
+ },
+ updateIcon:function(itemType, itemSource) {
+ if (itemType == 'file' || itemType == 'folder') {
+ var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
+ if ($('#dir').val() == '/') {
+ itemSource = $('#dir').val() + filename;
+ } else {
+ itemSource = $('#dir').val() + '/' + filename;
+ }
+ }
+ var shares = false;
+ $.each(OC.Share.itemShares, function(index) {
+ if (OC.Share.itemShares[index].length > 0) {
+ shares = true;
+ return;
+ }
+ });
+ if (shares) {
+ $('a.share[data-item="'+itemSource+'"]').css('background', 'url('+OC.imagePath('core', 'actions/shared')+') no-repeat center');
+ if (typeof OC.Share.statuses[itemSource] === 'undefined') {
+ OC.Share.statuses[itemSource] = false;
+ }
+ } else {
+ if (itemType != 'file' && itemType != 'folder') {
+ $('a.share[data-item="'+itemSource+'"]').css('background', 'url('+OC.imagePath('core', 'actions/share')+') no-repeat center');
+ }
+ delete OC.Share.statuses[itemSource];
+ }
+ },
+ loadItem:function(itemType, itemSource) {
+ var data = '';
+ var checkReshare = true;
+ // Switch file sources to path to check if status is set
+ if (itemType == 'file' || itemType == 'folder') {
+ var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
+ if ($('#dir').val() == '/') {
+ var item = $('#dir').val() + filename;
+ } else {
+ var item = $('#dir').val() + '/' + filename;
+ }
+ if (item.substring(0, 8) != '/Shared/') {
+ checkReshare = false;
+ }
+ } else {
+ var item = itemSource;
+ }
+ if (typeof OC.Share.statuses[item] === 'undefined') {
+ checkShares = false;
+ } else {
+ checkShares = true;
+ }
+ $.ajax({type: 'GET', url: OC.filePath('core', 'ajax', 'share.php'), data: { fetch: 'getItem', itemType: itemType, itemSource: itemSource, checkReshare: checkReshare, checkShares: checkShares }, async: false, success: function(result) {
+ if (result && result.status === 'success') {
+ data = result.data;
+ } else {
+ data = false;
+ }
+ }});
+ return data;
+ },
+ share:function(itemType, itemSource, shareType, shareWith, permissions, callback) {
+ $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'share', itemType: itemType, itemSource: itemSource, shareType: shareType, shareWith: shareWith, permissions: permissions }, function(result) {
+ if (result && result.status === 'success') {
+ if (callback) {
+ callback(result.data);
+ }
+ } else {
+ OC.dialogs.alert(result.data.message, 'Error while sharing');
+ }
+ });
+ },
+ unshare:function(itemType, itemSource, shareType, shareWith, callback) {
+ $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'unshare', itemType: itemType, itemSource: itemSource, shareType: shareType, shareWith: shareWith }, function(result) {
+ if (result && result.status === 'success') {
+ if (callback) {
+ callback();
+ }
+ } else {
+ OC.dialogs.alert('Error', 'Error while unsharing');
+ }
+ });
+ },
+ setPermissions:function(itemType, itemSource, shareType, shareWith, permissions) {
+ $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setPermissions', itemType: itemType, itemSource: itemSource, shareType: shareType, shareWith: shareWith, permissions: permissions }, function(result) {
+ if (!result || result.status !== 'success') {
+ OC.dialogs.alert('Error', 'Error while changing permissions');
+ }
+ });
+ },
+ showDropDown:function(itemType, itemSource, appendTo, privateLink, possiblePermissions) {
+ var data = OC.Share.loadItem(itemType, itemSource);
+ var html = '<div id="dropdown" class="drop" data-item-type="'+itemType+'" data-item-source="'+itemSource+'">';
+ if (data.reshare) {
+ if (data.reshare.share_type == OC.Share.SHARE_TYPE_GROUP) {
+ html += '<span class="reshare">Shared with you and the group '+data.reshare.share_with+' by '+data.reshare.uid_owner+'</span>';
+ } else {
+ html += '<span class="reshare">Shared with you by '+data.reshare.uid_owner+'</span>';
+ }
+ html += '<br />';
+ }
+ if (possiblePermissions & OC.Share.PERMISSION_SHARE) {
+ html += '<input id="shareWith" type="text" placeholder="Share with" style="width:90%;"/>';
+ html += '<ul id="shareWithList">';
+ html += '</ul>';
+ if (privateLink) {
+ html += '<div id="privateLink">';
+ html += '<input type="checkbox" name="privateLinkCheckbox" id="privateLinkCheckbox" value="1" /><label for="privateLinkCheckbox">Share with private link</label>';
+ html += '<br />';
+ html += '<input id="privateLinkText" style="display:none; width:90%;" readonly="readonly" />';
+ html += '</div>';
+ }
+ html += '</div>';
+ $(html).appendTo(appendTo);
+ // Reset item shares
+ OC.Share.itemShares = [];
+ if (data.shares) {
+ $.each(data.shares, function(index, share) {
+ if (share.share_type == OC.Share.SHARE_TYPE_PRIVATE_LINK) {
+ OC.Share.showPrivateLink(item, share.share_with);
+ } else {
+ OC.Share.addShareWith(share.share_type, share.share_with, share.permissions, possiblePermissions);
+ }
+ });
+ }
+ $('#shareWith').autocomplete({minLength: 2, source: function(search, response) {
+ // if (cache[search.term]) {
+ // response(cache[search.term]);
+ // } else {
+ $.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getShareWith', search: search.term, itemShares: OC.Share.itemShares }, function(result) {
+ if (result.status == 'success' && result.data.length > 0) {
+ response(result.data);
+ } else {
+ // Suggest sharing via email if valid email address
+ var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i);
+ if (pattern.test(search.term)) {
+ response([{label: 'Share via email: '+search.term, value: {shareType: OC.Share.SHARE_TYPE_EMAIL, shareWith: search.term}}]);
+ } else {
+ response(['No people found']);
+ }
+ }
+ });
+ // }
+ },
+ focus: function(event, focused) {
+ event.preventDefault();
+ },
+ select: function(event, selected) {
+ var itemType = $('#dropdown').data('item-type');
+ var itemSource = $('#dropdown').data('item-source');
+ var shareType = selected.item.value.shareType;
+ var shareWith = selected.item.value.shareWith;
+ $(this).val(shareWith);
+ // Default permissions are Read and Share
+ var permissions = OC.Share.PERMISSION_READ | OC.Share.PERMISSION_SHARE;
+ OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function() {
+ OC.Share.addShareWith(shareType, shareWith, permissions, possiblePermissions);
+ $('#shareWith').val('');
+ OC.Share.updateIcon(itemType, itemSource);
+ });
+ return false;
+ }
+ });
+ } else {
+ html += '<input id="shareWith" type="text" placeholder="Resharing is not allowed" style="width:90%;" disabled="disabled"/>';
+ html += '</div>';
+ $(html).appendTo(appendTo);
+ }
+ $('#dropdown').show('blind', function() {
+ OC.Share.droppedDown = true;
+ });
+ $('#shareWith').focus();
+ },
+ hideDropDown:function(callback) {
+ $('#dropdown').hide('blind', function() {
+ OC.Share.droppedDown = false;
+ $('#dropdown').remove();
+ if (typeof FileActions !== 'undefined') {
+ $('tr').removeClass('mouseOver');
+ }
+ if (callback) {
+ callback.call();
+ }
+ });
+ },
+ addShareWith:function(shareType, shareWith, permissions, possiblePermissions) {
+ if (!OC.Share.itemShares[shareType]) {
+ OC.Share.itemShares[shareType] = [];
+ }
+ OC.Share.itemShares[shareType].push(shareWith);
+ var editChecked = createChecked = updateChecked = deleteChecked = shareChecked = '';
+ if (permissions & OC.Share.PERMISSION_CREATE) {
+ createChecked = 'checked="checked"';
+ editChecked = 'checked="checked"';
+ }
+ if (permissions & OC.Share.PERMISSION_UPDATE) {
+ updateChecked = 'checked="checked"';
+ editChecked = 'checked="checked"';
+ }
+ if (permissions & OC.Share.PERMISSION_DELETE) {
+ deleteChecked = 'checked="checked"';
+ editChecked = 'checked="checked"';
+ }
+ if (permissions & OC.Share.PERMISSION_SHARE) {
+ shareChecked = 'checked="checked"';
+ }
+ var html = '<li style="clear: both;" data-share-type="'+shareType+'" data-share-with="'+shareWith+'">';
+ html += shareWith;
+ if (possiblePermissions & OC.Share.PERMISSION_CREATE || possiblePermissions & OC.Share.PERMISSION_UPDATE || possiblePermissions & OC.Share.PERMISSION_DELETE) {
+ if (editChecked == '') {
+ html += '<label style="display:none;">';
+ } else {
+ html += '<label>';
+ }
+ html += '<input type="checkbox" name="edit" class="permissions" '+editChecked+' />can edit</label>';
+ }
+ html += '<a href="#" class="showCruds" style="display:none;"><img class="svg" alt="Unshare" src="'+OC.imagePath('core', 'actions/triangle-s')+'"/></a>';
+ html += '<a href="#" class="unshare" style="display:none;"><img class="svg" alt="Unshare" src="'+OC.imagePath('core', 'actions/delete')+'"/></a>';
+ html += '<div class="cruds" style="display:none;">';
+ if (possiblePermissions & OC.Share.PERMISSION_CREATE) {
+ html += '<label><input type="checkbox" name="create" class="permissions" '+createChecked+' data-permissions="'+OC.Share.PERMISSION_CREATE+'" />create</label>';
+ }
+ if (possiblePermissions & OC.Share.PERMISSION_UPDATE) {
+ html += '<label><input type="checkbox" name="update" class="permissions" '+updateChecked+' data-permissions="'+OC.Share.PERMISSION_UPDATE+'" />update</label>';
+ }
+ if (possiblePermissions & OC.Share.PERMISSION_DELETE) {
+ html += '<label><input type="checkbox" name="delete" class="permissions" '+deleteChecked+' data-permissions="'+OC.Share.PERMISSION_DELETE+'" />delete</label>';
+ }
+ if (possiblePermissions & OC.Share.PERMISSION_SHARE) {
+ html += '<label><input type="checkbox" name="share" class="permissions" '+shareChecked+' data-permissions="'+OC.Share.PERMISSION_SHARE+'" />share</label>';
+ }
+ html += '</div>';
+ html += '</li>';
+ $(html).appendTo('#shareWithList');
+
+ },
+ showPrivateLink:function(item, token) {
+ $('#privateLinkCheckbox').attr('checked', true);
+ var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&token='+token;
+ if (token.indexOf('&path=') == -1) {
+ link += '&file=' + encodeURIComponent(item).replace(/%2F/g, '/');
+ } else {
+ // Disable checkbox if inside a shared parent folder
+ $('#privateLinkCheckbox').attr('disabled', 'true');
+ }
+ $('#privateLinkText').val(link);
+ $('#privateLinkText').show('blind', function() {
+ $('#privateLinkText').after('<br id="emailBreak" />');
+ $('#email').show();
+ $('#emailButton').show();
+ });
+ },
+ hidePrivateLink:function() {
+ $('#privateLinkText').hide('blind');
+ $('#emailBreak').remove();
+ $('#email').hide();
+ $('#emailButton').hide();
+ },
+ emailPrivateLink:function() {
+ var link = $('#privateLinkText').val();
+ var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' ');
+ $.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: $('#email').val(), link: link, file: file } );
+ $('#email').css('font-weight', 'bold');
+ $('#email').animate({ fontWeight: 'normal' }, 2000, function() {
+ $(this).val('');
+ }).val('Email sent');
+ },
+ dirname:function(path) {
+ return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, '');
+ }
+}
+
+$(document).ready(function() {
+
+ $('a.share').live('click', function(event) {
+ event.stopPropagation();
+ if ($(this).data('item-type') !== undefined && $(this).data('item') !== undefined) {
+ var itemType = $(this).data('item-type');
+ var itemSource = $(this).data('item');
+ var appendTo = $(this).parent().parent();
+ var privateLink = false;
+ var possiblePermissions = $(this).data('possible-permissions');
+ if ($(this).data('private-link') !== undefined && $(this).data('private-link') == true) {
+ privateLink = true;
+ }
+ if (OC.Share.droppedDown) {
+ if (itemSource != $('#dropdown').data('item')) {
+ OC.Share.hideDropDown(function () {
+ OC.Share.showDropDown(itemType, itemSource, appendTo, privateLink, possiblePermissions);
+ });
+ } else {
+ OC.Share.hideDropDown();
+ }
+ } else {
+ OC.Share.showDropDown(itemType, itemSource, appendTo, privateLink, possiblePermissions);
+ }
+ }
+ });
+
+ $(this).click(function(event) {
+ if (OC.Share.droppedDown && !($(event.target).hasClass('drop')) && $('#dropdown').has(event.target).length === 0) {
+ OC.Share.hideDropDown();
+ }
+ });
+
+ $('#shareWithList li').live('mouseenter', function(event) {
+ // Show permissions and unshare button
+ $(':hidden', this).filter(':not(.cruds)').show();
+ });
+
+ $('#shareWithList li').live('mouseleave', function(event) {
+ // Hide permissions and unshare button
+ if (!$('.cruds', this).is(':visible')) {
+ $('a', this).hide();
+ if (!$('input[name="edit"]', this).is(':checked')) {
+ $('input:[type=checkbox]', this).hide();
+ $('label', this).hide();
+ }
+ } else {
+ $('a.unshare', this).hide();
+ }
+ });
+
+ $('.showCruds').live('click', function() {
+ $(this).parent().find('.cruds').toggle();
+ });
+
+ $('.unshare').live('click', function() {
+ var li = $(this).parent();
+ var itemType = $('#dropdown').data('item-type');
+ var itemSource = $('#dropdown').data('item-source');
+ var shareType = $(li).data('share-type');
+ var shareWith = $(li).data('share-with');
+ OC.Share.unshare(itemType, itemSource, shareType, shareWith, function() {
+ $(li).remove();
+ var index = OC.Share.itemShares[shareType].indexOf(shareWith);
+ OC.Share.itemShares[shareType].splice(index, 1);
+ OC.Share.updateIcon(itemType, itemSource);
+ });
+ });
+
+ $('.permissions').live('change', function() {
+ if ($(this).attr('name') == 'edit') {
+ var li = $(this).parent().parent()
+ var checkboxes = $('.permissions', li);
+ var checked = $(this).is(':checked');
+ // Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck
+ $(checkboxes).filter('input[name="create"]').attr('checked', checked);
+ $(checkboxes).filter('input[name="update"]').attr('checked', checked);
+ $(checkboxes).filter('input[name="delete"]').attr('checked', checked);
+ } else {
+ var li = $(this).parent().parent().parent();
+ var checkboxes = $('.permissions', li);
+ // Uncheck Edit if Create, Update, and Delete are not checked
+ if (!$(this).is(':checked') && !$(checkboxes).filter('input[name="create"]').is(':checked') && !$(checkboxes).filter('input[name="update"]').is(':checked') && !$(checkboxes).filter('input[name="delete"]').is(':checked')) {
+ $(checkboxes).filter('input[name="edit"]').attr('checked', false);
+ // Check Edit if Create, Update, or Delete is checked
+ } else if (($(this).attr('name') == 'create' || $(this).attr('name') == 'update' || $(this).attr('name') == 'delete')) {
+ $(checkboxes).filter('input[name="edit"]').attr('checked', true);
+ }
+ }
+ var permissions = OC.Share.PERMISSION_READ;
+ $(checkboxes).filter(':not(input[name="edit"])').filter(':checked').each(function(index, checkbox) {
+ permissions |= $(checkbox).data('permissions');
+ });
+ OC.Share.setPermissions($('#dropdown').data('item-type'), $('#dropdown').data('item-source'), $(li).data('share-type'), $(li).data('share-with'), permissions);
+ });
+
+ $('#privateLinkCheckbox').live('change', function() {
+ var itemType = $('#dropdown').data('item-type');
+ var item = $('#dropdown').data('item');
+ if (this.checked) {
+ // Create a private link
+ OC.Share.share(itemType, item, OC.Share.SHARE_TYPE_PRIVATE_LINK, 0, 0, function(token) {
+ OC.Share.showPrivateLink(item, 'foo');
+ // Change icon
+ OC.Share.icons[item] = OC.imagePath('core', 'actions/public');
+ });
+ } else {
+ // Delete private link
+ OC.Share.unshare(item, 'public', function() {
+ OC.Share.hidePrivateLink();
+ // Change icon
+ if (OC.Share.itemUsers || OC.Share.itemGroups) {
+ OC.Share.icons[item] = OC.imagePath('core', 'actions/shared');
+ } else {
+ OC.Share.icons[item] = OC.imagePath('core', 'actions/share');
+ }
+ });
+ }
+ });
+
+ $('#privateLinkText').live('click', function() {
+ $(this).focus();
+ $(this).select();
+ });
+
+ $('#emailPrivateLink').live('submit', function() {
+ OC.Share.emailPrivateLink();
+ });
+});
diff --git a/core/l10n/de.php b/core/l10n/de.php
index b0959a5412b..9ed2d617828 100644
--- a/core/l10n/de.php
+++ b/core/l10n/de.php
@@ -23,13 +23,13 @@
"No categories selected for deletion." => "Keine Kategorien zum Löschen angegeben.",
"Error" => "Fehler",
"ownCloud password reset" => "ownCloud-Passwort zurücksetzen",
-"Use the following link to reset your password: {link}" => "Nutze folgenden Link, um dein Passwort zurückzusetzen: {link}",
-"You will receive a link to reset your password via Email." => "Du erhälst einen Link, um dein Passwort per E-Mail zurückzusetzen.",
+"Use the following link to reset your password: {link}" => "Nutzen Sie den nachfolgenden Link, um Ihr Passwort zurückzusetzen: {link}",
+"You will receive a link to reset your password via Email." => "Sie erhalten einen Link, um Ihr Passwort per E-Mail zurückzusetzen.",
"Requested" => "Angefragt",
"Login failed!" => "Login fehlgeschlagen!",
"Username" => "Benutzername",
"Request reset" => "Anfrage zurückgesetzt",
-"Your password was reset" => "Dein Passwort wurde zurückgesetzt.",
+"Your password was reset" => "Ihr Passwort wurde zurückgesetzt.",
"To login page" => "Zur Login-Seite",
"New password" => "Neues Passwort",
"Reset password" => "Passwort zurücksetzen",
@@ -38,9 +38,9 @@
"Apps" => "Anwendungen",
"Admin" => "Admin",
"Help" => "Hilfe",
-"Access forbidden" => "Zugang verboten",
+"Access forbidden" => "Zugriff verboten",
"Cloud not found" => "Cloud nicht gefunden",
-"Edit categories" => "Kategorien editieren",
+"Edit categories" => "Kategorien bearbeiten",
"Add" => "Hinzufügen",
"Create an <strong>admin account</strong>" => "<strong>Administrator-Konto</strong> anlegen",
"Password" => "Passwort",
@@ -53,12 +53,12 @@
"Database name" => "Datenbank-Name",
"Database host" => "Datenbank-Host",
"Finish setup" => "Installation abschließen",
-"web services under your control" => "Web Services unter ihrer Kontrolle",
+"web services under your control" => "Web-Services unter Ihrer Kontrolle",
"Log out" => "Abmelden",
"Lost your password?" => "Passwort vergessen?",
"remember" => "merken",
"Log in" => "Einloggen",
-"You are logged out." => "Abgemeldet",
+"You are logged out." => "Sie wurden abgemeldet.",
"prev" => "Zurück",
"next" => "Weiter"
);
diff --git a/core/l10n/es.php b/core/l10n/es.php
index 31d8d792a41..8766228ba89 100644
--- a/core/l10n/es.php
+++ b/core/l10n/es.php
@@ -1,6 +1,6 @@
<?php $TRANSLATIONS = array(
"Application name not provided." => "Nombre de la aplicación no provisto.",
-"No category to add?" => "¿Ninguna categoría para agregar?",
+"No category to add?" => "¿Ninguna categoría para añadir?",
"This category already exists: " => "Esta categoría ya existe: ",
"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=",
"Settings" => "Ajustes",
@@ -19,8 +19,8 @@
"Cancel" => "Cancelar",
"No" => "No",
"Yes" => "Sí",
-"Ok" => "Vale",
-"No categories selected for deletion." => "No hay categorias seleccionadas para borrar.",
+"Ok" => "Aceptar",
+"No categories selected for deletion." => "No hay categorías seleccionadas para borrar.",
"Error" => "Fallo",
"ownCloud password reset" => "Reiniciar contraseña de ownCloud",
"Use the following link to reset your password: {link}" => "Utiliza el siguiente enlace para restablecer tu contraseña: {link}",
diff --git a/core/l10n/sv.php b/core/l10n/sv.php
index 6be057768d9..25ba95558e7 100644
--- a/core/l10n/sv.php
+++ b/core/l10n/sv.php
@@ -1,5 +1,5 @@
<?php $TRANSLATIONS = array(
-"Application name not provided." => "Programnamn har inte angetts",
+"Application name not provided." => "Programnamn har inte angetts.",
"No category to add?" => "Ingen kategori att lägga till?",
"This category already exists: " => "Denna kategori finns redan:",
"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=",
@@ -26,14 +26,14 @@
"Use the following link to reset your password: {link}" => "Använd följande länk för att återställa lösenordet: {link}",
"You will receive a link to reset your password via Email." => "Du får en länk att återställa ditt lösenord via e-post.",
"Requested" => "Begärd",
-"Login failed!" => "Inloggning misslyckades!",
+"Login failed!" => "Misslyckad inloggning!",
"Username" => "Användarnamn",
"Request reset" => "Begär återställning",
"Your password was reset" => "Ditt lösenord har återställts",
-"To login page" => "Till logga in sidan",
+"To login page" => "Till logginsidan",
"New password" => "Nytt lösenord",
"Reset password" => "Återställ lösenordet",
-"Personal" => "Personlig",
+"Personal" => "Personligt",
"Users" => "Användare",
"Apps" => "Program",
"Admin" => "Admin",
@@ -48,9 +48,9 @@
"Data folder" => "Datamapp",
"Configure the database" => "Konfigurera databasen",
"will be used" => "kommer att användas",
-"Database user" => "Databas-användare",
-"Database password" => "Lösenord för databasen",
-"Database name" => "Databasens namn",
+"Database user" => "Databasanvändare",
+"Database password" => "Lösenord till databasen",
+"Database name" => "Databasnamn",
"Database host" => "Databasserver",
"Finish setup" => "Avsluta installation",
"web services under your control" => "webbtjänster under din kontroll",
@@ -58,7 +58,7 @@
"Lost your password?" => "Glömt ditt lösenord?",
"remember" => "kom ihåg",
"Log in" => "Logga in",
-"You are logged out." => "Du är utloggad",
+"You are logged out." => "Du är utloggad.",
"prev" => "föregående",
"next" => "nästa"
);
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 4558f97bc08..1a05c3fb762 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -1,6 +1,7 @@
<input type='hidden' id='hasMySQL' value='<?php echo $_['hasMySQL'] ?>'></input>
<input type='hidden' id='hasSQLite' value='<?php echo $_['hasSQLite'] ?>'></input>
<input type='hidden' id='hasPostgreSQL' value='<?php echo $_['hasPostgreSQL'] ?>'></input>
+<input type='hidden' id='hasOracle' value='<?php echo $_['hasOracle'] ?>'></input>
<form action="index.php" method="post">
<input type="hidden" name="install" value="true" />
@@ -40,7 +41,7 @@
</fieldset>
<fieldset id='databaseField'>
- <?php if($_['hasMySQL'] or $_['hasPostgreSQL']) $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
+ <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
<legend><?php echo $l->t( 'Configure the database' ); ?></legend>
<div id="selectDbType">
<?php if($_['hasSQLite']): ?>
@@ -56,7 +57,7 @@
<?php if($_['hasMySQL']): ?>
<input type='hidden' id='hasMySQL' value='true'/>
- <?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL']): ?>
+ <?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL'] and !$_['hasOracle']): ?>
<p>MySQL <?php echo $l->t( 'will be used' ); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="mysql" />
<?php else: ?>
@@ -66,7 +67,7 @@
<?php endif; ?>
<?php if($_['hasPostgreSQL']): ?>
- <?php if(!$_['hasSQLite'] and !$_['hasMySQL']): ?>
+ <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasOracle']): ?>
<p>PostgreSQL <?php echo $l->t( 'will be used' ); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="pgsql" />
<?php else: ?>
@@ -74,6 +75,16 @@
<input type="radio" name="dbtype" value='pgsql' id="pgsql" <?php OC_Helper::init_radio('dbtype','pgsql', 'sqlite'); ?>/>
<?php endif; ?>
<?php endif; ?>
+
+ <?php if($_['hasOracle']): ?>
+ <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL']): ?>
+ <p>Oracle <?php echo $l->t( 'will be used' ); ?>.</p>
+ <input type="hidden" id="dbtype" name="dbtype" value="oci" />
+ <?php else: ?>
+ <label class="oci" for="oci">Oracle</label>
+ <input type="radio" name="dbtype" value='oci' id="oci" <?php OC_Helper::init_radio('dbtype','oci', 'sqlite'); ?>/>
+ <?php endif; ?>
+ <?php endif; ?>
</div>
<?php if($hasOtherDB): ?>
@@ -92,6 +103,14 @@
</p>
</div>
<?php endif; ?>
+ <?php if($_['hasOracle']): ?>
+ <div id="use_oracle_db">
+ <p class="infield">
+ <label for="dbtablespace" class="infield"><?php echo $l->t( 'Database tablespace' ); ?></label>
+ <input type="text" name="dbtablespace" id="dbtablespace" value="<?php print OC_Helper::init_var('dbtablespace'); ?>" autocomplete="off" />
+ </p>
+ </div>
+ <?php endif; ?>
<p class="infield">
<label for="dbhost" class="infield"><?php echo $l->t( 'Database host' ); ?></label>
<input type="text" name="dbhost" id="dbhost" value="<?php print OC_Helper::init_var('dbhost', 'localhost'); ?>" />