diff options
Diffstat (limited to 'core')
29 files changed, 453 insertions, 187 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 648f0a71bd4..1166ea3198a 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -23,6 +23,8 @@ OC_JSON::checkLoggedIn(); OCP\JSON::callCheck(); OC_App::loadApps(); +$defaults = new \OCP\Defaults(); + if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSource'])) { switch ($_POST['action']) { case 'share': @@ -33,7 +35,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo if ($shareType === OCP\Share::SHARE_TYPE_LINK && $shareWith == '') { $shareWith = null; } - + $token = OCP\Share::shareItem( $_POST['itemType'], $_POST['itemSource'], @@ -41,7 +43,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo $shareWith, $_POST['permissions'] ); - + if (is_string($token)) { OC_JSON::success(array('data' => array('token' => $token))); } else { @@ -81,6 +83,104 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo ($return) ? OC_JSON::success() : OC_JSON::error(); } break; + case 'informRecipients': + + $l = OC_L10N::get('core'); + + $shareType = (int) $_POST['shareType']; + $itemType = $_POST['itemType']; + $itemSource = $_POST['itemSource']; + $recipient = $_POST['recipient']; + $ownerDisplayName = \OCP\User::getDisplayName(); + $from = \OCP\Util::getDefaultEmailAddress('sharing-noreply'); + + $noMail = array(); + $recipientList = array(); + + if($shareType === \OCP\Share::SHARE_TYPE_USER) { + $recipientList[] = $recipient; + } elseif ($shareType === \OCP\Share::SHARE_TYPE_GROUP) { + $recipientList = \OC_Group::usersInGroup($recipient); + } + + // don't send a mail to the user who shared the file + $recipientList = array_diff($recipientList, array(\OCP\User::getUser())); + + // send mail to all recipients with an email address + foreach ($recipientList as $recipient) { + //get correct target folder name + $email = OC_Preferences::getValue($recipient, 'settings', 'email', ''); + + if ($email !== '') { + $displayName = \OCP\User::getDisplayName($recipient); + $items = \OCP\Share::getItemSharedWithUser($itemType, $itemSource, $recipient); + $filename = trim($items[0]['file_target'], '/'); + $subject = (string)$l->t('%s shared »%s« with you', array($ownerDisplayName, $filename)); + $expiration = null; + if (isset($items[0]['expiration'])) { + $date = new DateTime($items[0]['expiration']); + $expiration = $date->format('Y-m-d'); + } + + if ($itemType === 'folder') { + $foldername = "/Shared/" . $filename; + } else { + // if it is a file we can just link to the Shared folder, + // that's the place where the user will find the file + $foldername = "/Shared"; + } + + $link = \OCP\Util::linkToAbsolute('files', 'index.php', array("dir" => $foldername)); + + $content = new OC_Template("core", "mail", ""); + $content->assign('link', $link); + $content->assign('user_displayname', $ownerDisplayName); + $content->assign('filename', $filename); + $content->assign('expiration', $expiration); + $text = $content->fetchPage(); + + $content = new OC_Template("core", "altmail", ""); + $content->assign('link', $link); + $content->assign('user_displayname', $ownerDisplayName); + $content->assign('filename', $filename); + $content->assign('expiration', $expiration); + $alttext = $content->fetchPage(); + + $default_from = OCP\Util::getDefaultEmailAddress('sharing-noreply'); + $from = OCP\Config::getUserValue(\OCP\User::getUser(), 'settings', 'email', $default_from); + + // send it out now + try { + OCP\Util::sendMail($email, $displayName, $subject, $text, $from, $ownerDisplayName, 1, $alttext); + } catch (Exception $exception) { + $noMail[] = \OCP\User::getDisplayName($recipient); + } + } + } + + \OCP\Share::setSendMailStatus($itemType, $itemSource, $shareType, true); + + if (empty($noMail)) { + OCP\JSON::success(); + } else { + OCP\JSON::error(array( + 'data' => array( + 'message' => $l->t("Couldn't send mail to following users: %s ", + implode(', ', $noMail) + ) + ) + )); + } + break; + case 'informRecipientsDisabled': + $itemSource = $_POST['itemSource']; + $shareType = $_POST['shareType']; + $itemType = $_POST['itemType']; + $recipient = $_POST['recipient']; + \OCP\Share::setSendMailStatus($itemType, $itemSource, $shareType, false); + OCP\JSON::success(); + break; + case 'email': // read post variables $user = OCP\USER::getUser(); @@ -213,10 +313,10 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo } } $count = 0; - + // enable l10n support $l = OC_L10N::get('core'); - + foreach ($groups as $group) { if ($count < 15) { if (!isset($_GET['itemShares']) diff --git a/core/css/apps.css b/core/css/apps.css index f6c20e6cc6a..49fb189f384 100644 --- a/core/css/apps.css +++ b/core/css/apps.css @@ -27,13 +27,11 @@ position: relative; width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; - text-shadow: 0 1px 0 rgba(255,255,255,.9); } #app-navigation .active, #app-navigation .active a, #app-navigation li:hover > a { background-color: #ddd; - text-shadow: 0 1px 0 rgba(255,255,255,.7); } /* special rules for first-level entries and folders */ @@ -119,7 +117,7 @@ } #app-navigation > ul .open:hover { - -moz-box-shadow: inset 0 0 3px #ccc; -webkit-box-shadow: inset 0 0 3px #ccc; box-shadow: inset 0 0 3px #ccc; + box-shadow: inset 0 0 3px #ccc; } #app-navigation > ul .open ul { @@ -203,9 +201,14 @@ border: 0; border-radius: 0; } -.settings-button:hover { +.settings-button:hover, +.settings-button:focus { background-color: #ddd; } +.settings-button.opened:hover, +.settings-button.opened:focus { + background-color: transparent; +} /* icons */ .folder-icon, .delete-icon, .edit-icon, .progress-icon { diff --git a/core/css/share.css b/core/css/share.css index 2d6849b4bb1..2a21dc6edf6 100644 --- a/core/css/share.css +++ b/core/css/share.css @@ -2,95 +2,97 @@ This file is licensed under the Affero General Public License version 3 or later. See the COPYING-README file. */ - #dropdown { - background:#eee; - border-bottom-left-radius:1em; - border-bottom-right-radius:1em; - box-shadow:0 1px 1px #777; - display:block; - margin-right:7em; - position:absolute; - right:0; - width:19em; - z-index:500; - padding:1em; - } - - #shareWithList { - list-style-type:none; - padding:.5em; - } - - #shareWithList li { - padding-top:.1em; - } - - #shareWithList li:first-child { - white-space:normal; - } - - #shareWithList .cruds { - margin-left:-10px; - } +#dropdown { + background:#eee; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + box-shadow:0 1px 1px #777; + display:block; + margin-right:7em; + position:absolute; + right:0; + width:25em; + z-index:500; + padding:1em; +} + +#shareWithList { + list-style-type:none; + padding:.5em; +} + +#shareWithList li { + padding-top:.1em; +} + +#shareWithList li:first-child { + white-space:normal; +} + +#shareWithList .cruds { + margin-left:-10px; +} #shareWithList .unshare img, #shareWithList .showCruds img { vertical-align:text-bottom; /* properly align icons */ } - #dropdown label { - font-weight:400; - } +#dropdown label { + font-weight:400; +} - #dropdown input[type="checkbox"] { - margin:0 .2em 0 .5em; - } +#dropdown input[type="checkbox"] { + margin:0 .2em 0 .5em; +} - a.showCruds { - display:inline; - opacity:.5; - } +a.showCruds { + display:inline; + opacity:.5; +} - a.unshare { - display:inline; - float:right; - opacity:.5; - padding:.3em 0 0 .3em !important; +a.unshare { + display:inline; + float:right; + opacity:.5; + padding:.3em 0 0 .3em !important; margin-top:-5px; - } +} - #link { - border-top:1px solid #ddd; - padding-top:.5em; - } +#link { + border-top:1px solid #ddd; + padding-top:.5em; +} #dropdown input[type="text"],#dropdown input[type="password"] { - width:90%; + width:90%; } #dropdown form { - font-size: 100%; - margin-left: 0; - margin-right: 0; + font-size: 100%; + margin-left: 0; + margin-right: 0; } #linkText,#linkPass,#expiration { - display:none; - } + display:none; +} - #link #showPassword img { - padding-left:.3em; - width:12px; - } +#link #showPassword img { + padding-left:.3em; + width:12px; +} - .reshare,#link label,#expiration label { - padding-left:.5em; - } +.reshare,#link label,#expiration label { + padding-left:.5em; +} - a.showCruds:hover,a.unshare:hover { - opacity:1; - } +a.showCruds:hover,a.unshare:hover { + opacity:1; +} -.reshare { white-space:normal; } /* fix shared by text going out of box */ +.reshare { /* fix shared by text going out of box */ + white-space:normal; +} .ui-autocomplete { /* limit dropdown height to 4 1/2 entries */ max-height:103px; diff --git a/core/css/styles.css b/core/css/styles.css index dcdeda8a9c9..6406bcd7e63 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -19,9 +19,6 @@ body { background:#fefefe; font:normal .8em/1.6em "Helvetica Neue",Helvetica,Ari #body-user #header, #body-settings #header { position:fixed; top:0; left:0; right:0; z-index:100; height:45px; line-height:2.5em; background:#1d2d44 url('../img/noise.png') repeat; - -moz-box-shadow:0 0 10px rgba(0, 0, 0, .5); - -webkit-box-shadow:0 0 10px rgba(0, 0, 0, .5); - box-shadow:0 0 10px rgba(0, 0, 0, .5); } #body-login { @@ -41,11 +38,14 @@ body { background:#fefefe; font:normal .8em/1.6em "Helvetica Neue",Helvetica,Ari .header-right > * { vertical-align:middle; } #header .avatardiv { - text-shadow: none; float: left; display: inline-block; } +#header .avatardiv img { + opacity: 1; +} + /* INPUTS */ input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="email"], input[type="url"], textarea, select, @@ -54,8 +54,7 @@ button, .button, width:10em; margin:.3em; padding:.6em .5em .4em; font-size:1em; background:#fff; color:#333; border:1px solid #ddd; outline:none; - -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; - -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; + border-radius: 3px; } input[type="hidden"] { height:0; width:0; } input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="email"], input[type="url"], textarea { @@ -78,7 +77,10 @@ textarea:hover, textarea:focus, textarea:active { } input[type="checkbox"] { margin:0; padding:0; height:auto; width:auto; } input[type="checkbox"]:hover+label, input[type="checkbox"]:focus+label { color:#111 !important; } -#quota { cursor:default; } +#quota { + cursor: default; + margin: 30px; +} /* SCROLLING */ @@ -91,10 +93,14 @@ input[type="checkbox"]:hover+label, input[type="checkbox"]:focus+label { color:# input[type="submit"], input[type="button"], button, .button, #quota, select, .pager li a { - width:auto; padding:.4em; - background-color:rgba(240,240,240,.9); font-weight:bold; color:#555; text-shadow:rgba(255,255,255,.9) 0 1px 0; border:1px solid rgba(190,190,190,.9); cursor:pointer; - -moz-box-shadow:0 1px 1px rgba(255,255,255,.9), 0 1px 1px rgba(255,255,255,.9) inset; -webkit-box-shadow:0 1px 1px rgba(255,255,255,.9), 0 1px 1px rgba(255,255,255,.9) inset; box-shadow:0 1px 1px rgba(255,255,255,.9), 0 1px 1px rgba(255,255,255,.9) inset; - -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; + width: auto; + padding: .4em; + background-color: rgba(240,240,240,.9); + font-weight: bold; + color: #555; + border: 1px solid rgba(190,190,190,.9); + cursor: pointer; + border-radius: 3px; } input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, input[type="button"]:focus, @@ -105,14 +111,17 @@ select:hover, select:focus, select:active { color:#333; } input[type="submit"] img, input[type="button"] img, button img, .button img { cursor:pointer; } -#header .button { border:none; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } +#header .button { + border: none; + box-shadow: none; +} /* disabled input fields and buttons */ input:disabled, input:disabled:hover, input:disabled:focus, button:disabled, button:disabled:hover, button:disabled:focus, .button:disabled, .button:disabled:hover, .button:disabled:focus, a.disabled, a.disabled:hover, a.disabled:focus { - background: rgba(230,230,230,.9); + background-color: rgba(230,230,230,.9); color: #999; cursor: default; } @@ -122,56 +131,70 @@ a.disabled, a.disabled:hover, a.disabled:focus { border: 1px solid #1d2d44; background: #35537a; color: #ddd; - text-shadow: #000 0 -1px 0; - -moz-box-shadow: 0 0 1px #000, 0 1px 0 #6d7d94 inset; - -webkit-box-shadow: 0 0 1px #000, 0 1px 0 #6d7d94 inset; - box-shadow: 0 0 1px #000, 0 1px 0 #6d7d94 inset; } .primary:hover, input[type="submit"].primary:hover, input[type="button"].primary:hover, button.primary:hover, .button.primary:hover, .primary:focus, input[type="submit"].primary:focus, input[type="button"].primary:focus, button.primary:focus, .button.primary:focus { border: 1px solid #1d2d44; background: #304d76; color: #fff; - text-shadow: #000 0 -1px 0; - -moz-box-shadow: 0 0 1px #000, 0 1px 0 #4d5d74 inset; - -webkit-box-shadow: 0 0 1px #000, 0 1px 0 #4d5d74 inset; - box-shadow: 0 0 1px #000, 0 1px 0 #4d5d74 inset; } .primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active { border: 1px solid #1d2d44; background: #1d2d44; color: #bbb; - text-shadow: #000 0 -1px 0; - -moz-box-shadow: 0 1px 1px #3d4d64, 0 1px 1px 0 rgba(0,0,0,.2) inset; - -webkit-box-shadow: 0 1px 1px #3d4d64, 0 1px 1px 0 rgba(0,0,0,.2) inset; - box-shadow: 0 1px 1px #3d4d64, 0 1px 1px 0 rgba(0,0,0,.2) inset; } -.searchbox input[type="search"] { font-size:1.2em; padding:.2em .5em .2em 1.5em; background:#fff url('../img/actions/search.svg') no-repeat .5em center; border:0; -moz-border-radius:1em; -webkit-border-radius:1em; border-radius:1em; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70);opacity:.7; -webkit-transition:opacity 300ms; -moz-transition:opacity 300ms; -o-transition:opacity 300ms; transition:opacity 300ms; margin-top:10px; float:right; } -input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #cfc inset; } +.searchbox input[type="search"] { + font-size: 1.2em; + padding: .2em .5em .2em 1.5em; + background: #fff url('../img/actions/search.svg') no-repeat .5em center; + border: 0; + border-radius: 1em; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70); opacity: .7; + margin-top: 10px; + float: right; +} +input[type="submit"].enabled { + background: #66f866; + border: 1px solid #5e5; +} /* CONTENT ------------------------------------------------------------------ */ #controls { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; position: fixed; - height: 36px; + height: 44px; width: 100%; - padding: 0 75px 0 6px; + padding-right: 75px; margin: 0; background: #eee; border-bottom: 1px solid #e7e7e7; z-index: 50; - -moz-box-sizing: border-box; box-sizing: border-box; - -moz-box-shadow: 0 -3px 7px #000; -webkit-box-shadow: 0 -3px 7px #000; box-shadow: 0 -3px 7px #000; } -#controls .button { +#controls .button, +#controls button, +#controls input[type='submit'], +#controls input[type='text'], +#controls input[type='password'], +#controls select { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; display: inline-block; + height: 36px; + padding: 7px 10px } #content { position:relative; height:100%; width:100%; } -#content .hascontrols { position: relative; top: 2.9em; } +#content .hascontrols { + position: relative; + top: 45px; +} #content-wrapper { position:absolute; height:100%; width:100%; padding-top:3.5em; padding-left:80px; -moz-box-sizing:border-box; box-sizing:border-box; @@ -189,8 +212,9 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b #rightcontent, .rightcontent { position:fixed; top:6.4em; left:24.5em; overflow:auto } #emptycontent { - font-size:1.5em; font-weight:bold; - color:#888; text-shadow:#fff 0 1px 0; + font-size: 1.5em; + font-weight: bold; + color: #888; position: absolute; text-align: center; top: 50%; @@ -216,11 +240,9 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b #body-login form input[type="checkbox"]+label { text-align: center; color: #ccc; - text-shadow: 0 1px 0 rgba(255,255,255,.1); -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter: alpha(opacity=60); opacity: .6; - text-shadow: 0 -1px 0 rgba(0,0,0,.5); } #body-login div.buttons { text-align:center; } @@ -274,9 +296,10 @@ input[name="adminpass-clone"] { padding-left:1.8em; width:11.7em !important; } #body-login input[type="password"], #body-login input[type="email"] { border: 1px solid #323233; - -moz-box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.25) inset; - -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.25) inset; - box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.25) inset; + border-radius: 5px; +} +#body-login input[type='submit'] { + border-radius: 5px; } /* Nicely grouping input field sets */ @@ -292,18 +315,14 @@ input[name="adminpass-clone"] { padding-left:1.8em; width:11.7em !important; } border-top: 0; border-bottom: 0; border-radius: 0; - -moz-box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(0,0,0,.1) inset !important; - -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(0,0,0,.1) inset !important; - box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(0,0,0,.1) inset !important; + box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important; } #body-login .groupbottom input { margin-top: 0; border-top: 0; border-top-right-radius: 0; border-top-left-radius: 0; - -moz-box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(0,0,0,.1) inset !important; - -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(0,0,0,.1) inset !important; - box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(0,0,0,.1) inset !important; + box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important; } /* In field labels. No, HTML placeholder does not work as well. */ @@ -401,8 +420,7 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } #body-login form #selectDbType label { position:static; margin:0 -3px 5px; padding:.4em; font-size:12px; font-weight:bold; background:#f8f8f8; color:#888; cursor:pointer; - border:1px solid #ddd; text-shadow:#eee 0 1px 0; - -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; + border: 1px solid #ddd; } #body-login form #selectDbType label.ui-state-hover, #body-login form #selectDbType label.ui-state-active { color:#000; background-color:#e8e8e8; } @@ -411,29 +429,24 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } #body-login .warning, #body-login .update, #body-login .error { display: block; padding: 10px; - color: #dd3b3b; - text-shadow: 0 -1px 0 rgba(0,0,0,.3); + color: #d2322d; background-color: rgba(0,0,0,.3); text-align: center; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; + border-radius: 3px; cursor: default; } #body-user .warning, #body-settings .warning { - margin-top: 8px; - padding: 5px; - background: #fdd; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; + margin-top: 8px; + padding: 5px; + background: #fdd; + border-radius: 3px; } .warning legend, .warning a, .error a { - color: #dd3b3b !important; + color: #d2322d !important; font-weight: bold; } .error pre { @@ -456,7 +469,6 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } font-weight: bold; } #body-login .warning legend { - text-shadow: none; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter: alpha(opacity=100); opacity: 1; @@ -512,7 +524,6 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } z-index: 75; height: 100%; background:#383c43 url('../img/noise.png') repeat; - -moz-box-shadow:0 0 7px #000; -webkit-box-shadow:0 0 7px #000; box-shadow:0 0 7px #000; overflow:hidden; box-sizing:border-box; -moz-box-sizing:border-box; /* prevent ugly selection effect on accidental selection */ -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; @@ -529,7 +540,6 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } font-size: 11px; text-align: center; color: #fff; - text-shadow: #000 0 -1px 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; /* ellipsize long app names */ padding-bottom: 10px; } @@ -593,7 +603,6 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } margin-top: 7px; margin-left: 10px; color: #bbb; - text-shadow: 0 -1px 0 #000; } #expand { padding: 15px 15px 15px 5px; @@ -607,7 +616,7 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } position:absolute; right:0; top:45px; z-index:76; display:none; background:#383c43 url('../img/noise.png') repeat; border-bottom-left-radius:7px; border-bottom:1px #333 solid; border-left:1px #333 solid; - -moz-box-shadow:0 0 7px rgb(29,45,68); -webkit-box-shadow:0 0 7px rgb(29,45,68); box-shadow:0 0 7px rgb(29,45,68); + box-shadow:0 0 7px rgb(29,45,68); -moz-box-sizing: border-box; box-sizing: border-box; /* prevent ugly selection effect on accidental selection */ -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; @@ -616,7 +625,6 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } display: block; height: 40px; color: #fff; - text-shadow: 0 -1px 0 #000; padding: 4px 12px 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter: alpha(opacity=70); @@ -642,7 +650,17 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } .inlineblock { display: inline-block; } #notification-container { position: fixed; top: 0px; width: 100%; text-align: center; z-index: 101; line-height: 1.2;} -#notification, #update-notification { z-index:101; background-color:#fc4; border:0; padding:0 .7em .3em; display:none; position: relative; top:0; -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; } +#notification, #update-notification { + z-index: 101; + background-color: #fc4; + border: 0; + padding: 0 .7em .3em; + display: none; + position: relative; + top: 0; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} #notification span, #update-notification span { cursor:pointer; font-weight:bold; margin-left:1em; } tr .action:not(.permanent), .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; } @@ -652,13 +670,15 @@ tr .action { width:16px; height:16px; } tr:hover .action:hover, .selectedActions a:hover, .header-action:hover { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } tbody tr:hover, tr:active { background-color:#f8f8f8; } +#body-settings h2 { + font-size: 20px; + font-weight: normal; + margin-bottom: 7px; +} #body-settings .personalblock, #body-settings .helpblock { - padding: .5em 1em; - margin: 1em; - background-color: rgb(240,240,240); + padding: 30px; color: #555; - text-shadow: #fff 0 1px 0; - -moz-border-radius: .5em; -webkit-border-radius: .5em; border-radius: .5em; + border-top: 1px solid #ddd; } #body-settings .personalblock#quota { position:relative; padding:0; } #body-settings #controls+.helpblock { position:relative; margin-top:3em; } @@ -671,8 +691,8 @@ code { font-family:"Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono background-color: rgb(220,220,220); font-weight: normal; white-space: nowrap; - -moz-border-radius-bottomleft: .4em; -webkit-border-bottom-left-radius: .4em; border-bottom-left-radius:.4em; - -moz-border-radius-topleft: .4em; -webkit-border-top-left-radius: .4em; border-top-left-radius: .4em; } + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } #quotatext {padding:.6em 1em;} .pager { list-style:none; float:right; display:inline; margin:.7em 13em 0 0; } @@ -751,15 +771,38 @@ span.ui-icon {float: left; margin: 3px 7px 30px 0;} .arrow.left { left:-13px; bottom:1.2em; -webkit-transform:rotate(270deg); -moz-transform:rotate(270deg); -o-transform:rotate(270deg); -ms-transform:rotate(270deg); transform:rotate(270deg); } .arrow.up { top:-8px; right:2em; } .arrow.down { -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -o-transform:rotate(180deg); -ms-transform:rotate(180deg); transform:rotate(180deg); } -.help-includes {overflow: hidden; width: 100%; height: 100%; -moz-box-sizing: border-box; box-sizing: border-box; padding-top: 2.8em; } +.help-includes { + overflow: hidden; + width: 100%; + height: 100%; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding-top: 44px; +} .help-iframe {width: 100%; height: 100%; margin: 0;padding: 0; border: 0; overflow: auto;} /* ---- BREADCRUMB ---- */ -div.crumb { float:left; display:block; background:url('../img/breadcrumb.svg') no-repeat right 0; padding:.75em 1.5em 0 1em; height:2.9em; -moz-box-sizing:border-box; box-sizing:border-box; } -div.crumb:first-child { padding:10px 20px 10px 5px; } -div.crumb.last { font-weight:bold; background:none; padding-right:10px; } -div.crumb a{ padding: 0.9em 0 0.7em 0; } +div.crumb { + float: left; + display: block; + background: url('../img/breadcrumb.svg') no-repeat right center; + height: 44px; +} +div.crumb a { + position: relative; + top: 12px; + padding: 14px 24px 14px 17px; + color: #555; +} +div.crumb:first-child a { + position: relative; + top: 13px; +} +div.crumb.last { + font-weight: bold; + margin-right: 10px; +} /* some feedback for hover/tap on breadcrumbs */ div.crumb:hover, diff --git a/core/img/actions/checkmark.png b/core/img/actions/checkmark.png Binary files differnew file mode 100644 index 00000000000..99a4019c69e --- /dev/null +++ b/core/img/actions/checkmark.png diff --git a/core/img/actions/checkmark.svg b/core/img/actions/checkmark.svg new file mode 100644 index 00000000000..f70a407c2ed --- /dev/null +++ b/core/img/actions/checkmark.svg @@ -0,0 +1,4 @@ +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" height="16px" viewBox="-0.5 -0.5 16 16" width="16px" enable-background="new -0.5 -0.5 16 16" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" overflow="visible"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs> +</defs> +<path fill="#000" d="M12.438,3.6875c-0.363,0-0.726,0.1314-1,0.4063l-4.5005,4.5-1.9687-2c-0.5498-0.5484-1.4489-0.5498-2,0l-0.5,0.5c-0.5512,0.5496-0.5512,1.4502,0,2l2.9687,2.9682c0.0063,0.007-0.0065,0.025,0,0.032l0.5,0.5c0.5497,0.55,1.4503,0.55,2,0l0.5-0.5,0.1875-0.219,5.313-5.2812c0.549-0.5498,0.549-1.4503,0-2l-0.5-0.5c-0.275-0.2749-0.638-0.4063-1-0.4063z" transform="translate(-0.5,-0.5)"/> +</svg> diff --git a/core/img/actions/star.png b/core/img/actions/star.png Binary files differnew file mode 100644 index 00000000000..124ce495af6 --- /dev/null +++ b/core/img/actions/star.png diff --git a/core/img/actions/star.svg b/core/img/actions/star.svg new file mode 100644 index 00000000000..7bcd8dc0598 --- /dev/null +++ b/core/img/actions/star.svg @@ -0,0 +1,14 @@ +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="22" width="22" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g transform="matrix(0.06832234,0,0,0.06832234,-10.114234,-50.901693)"> + <path fill="#CCC" transform="translate(-21.071,-112.5)" d="m330.36,858.43,43.111,108.06,117.64,9.2572-89.445,74.392,27.55,114.75-98.391-62.079-100.62,61.66,28.637-112.76-89.734-76.638,116.09-7.6094z"/> + </g> +</svg> diff --git a/core/img/actions/starred.png b/core/img/actions/starred.png Binary files differnew file mode 100644 index 00000000000..5185d0f5381 --- /dev/null +++ b/core/img/actions/starred.png diff --git a/core/img/actions/starred.svg b/core/img/actions/starred.svg new file mode 100644 index 00000000000..c7a5a7dac12 --- /dev/null +++ b/core/img/actions/starred.svg @@ -0,0 +1,14 @@ +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="22" width="22" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g transform="matrix(0.06832234,0,0,0.06832234,-10.114235,-50.901693)"> + <path fill="#FC0" transform="translate(-21.071,-112.5)" d="m330.36,858.43,43.111,108.06,117.64,9.2572-89.445,74.392,27.55,114.75-98.391-62.079-100.62,61.66,28.637-112.76-89.734-76.638,116.09-7.6094z"/> + </g> +</svg> diff --git a/core/img/appstore.png b/core/img/appstore.png Binary files differindex 234aa0bb6be..2b90216f797 100644 --- a/core/img/appstore.png +++ b/core/img/appstore.png diff --git a/core/img/breadcrumb-start.png b/core/img/breadcrumb-start.png Binary files differdeleted file mode 100644 index b0df5f44037..00000000000 --- a/core/img/breadcrumb-start.png +++ /dev/null diff --git a/core/img/breadcrumb-start.svg b/core/img/breadcrumb-start.svg deleted file mode 100644 index 7f36231cdf8..00000000000 --- a/core/img/breadcrumb-start.svg +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="36" width="11" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> - <g transform="translate(0 -1016.4)"> - <path d="m0 0 11 18-11 18z" transform="translate(0 1016.4)" fill="#ddd"/> - </g> -</svg> diff --git a/core/img/breadcrumb.png b/core/img/breadcrumb.png Binary files differindex 84992be0d93..7e9593a36bf 100644 --- a/core/img/breadcrumb.png +++ b/core/img/breadcrumb.png diff --git a/core/img/breadcrumb.svg b/core/img/breadcrumb.svg index 05a216e50a9..f0b5c9218d5 100644 --- a/core/img/breadcrumb.svg +++ b/core/img/breadcrumb.svg @@ -1,6 +1,12 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="36" width="11" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> - <g transform="translate(0 -1016.4)"> - <path d="m0.5 0 10 18-10 18 10-18z" transform="translate(0 1016.4)" stroke="#ddd" stroke-linecap="round" stroke-miterlimit="31.2" stroke-width="0.9" fill="#ddd"/> - </g> +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="44" width="14" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <path d="M0.54879,0.047777,12.744,22,0.54879,43.951,12.744,22z" stroke="#d7d7d7" stroke-linecap="round" stroke-miterlimit="31.20000076000000178" stroke-width="1.09758711000000009" fill="#F00"/> </svg> diff --git a/core/img/desktopapp.png b/core/img/desktopapp.png Binary files differindex 25dae6f197a..272397c949e 100644 --- a/core/img/desktopapp.png +++ b/core/img/desktopapp.png diff --git a/core/img/desktopapp.svg b/core/img/desktopapp.svg index a983e6f9598..c2cfb016299 100644 --- a/core/img/desktopapp.svg +++ b/core/img/desktopapp.svg @@ -1,5 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 792 612" xml:space="preserve" height="60" viewBox="0 0 1346.4 475.2" width="170" version="1.1" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> -<rect rx="50" ry="50" height="475.2" width="1346.4" y="-3.5527e-15" x="-2.8405e-15" fill="#1a1a1a"/><path fill="#fff" d="m150.48 126.72c-11.88 0-23.76 11.88-23.76 23.76v166.32l-47.52 23.76v11.88s0 11.88 11.88 11.88h356.4c11.88 0 11.88-11.88 11.88-11.88v-11.88l-47.52-23.76v-166.32c0-11.88-11.88-23.76-23.76-23.76zm0 23.667h237.6v142.65h-237.6z"/><text style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" font-size="316.8px" y="239.58" x="451.44" font-family="Sans" line-height="125%" fill="#ffffff"><tspan font-weight="600" font-size="126.72px" y="239.58" x="451.44" font-family="FreeSans" fill="#ffffff">Desktop app</tspan></text> -<text style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" font-size="316.8px" y="342.54001" x="493.01996" font-family="Sans" line-height="125%" fill="#ffffff"><tspan font-size="71.28px" y="342.54001" x="493.01996" font-family="FreeSans" fill="#ffffff">Windows, OS X, Linux</tspan></text> +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" height="60" width="170" enable-background="new 0 0 792 612" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 1346.4 475.2"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata> +<rect rx="50" ry="50" height="475.2" width="1346.4" y="-3.5527E-15" x="-2.8405E-15" fill="#000"/><path d="m150.48,126.72c-11.88,0-23.76,11.88-23.76,23.76v166.32l-47.52,23.76v11.88s0,11.88,11.88,11.88h356.4c11.88,0,11.88-11.88,11.88-11.88v-11.88l-47.52-23.76v-166.32c0-11.88-11.88-23.76-23.76-23.76zm0,23.667h237.6v142.65h-237.6z" fill="#fff"/><text style="word-spacing:0px;letter-spacing:0px;" xml:space="preserve" font-size="316.8px" y="239.58" x="451.44" font-family="Sans" line-height="125%" fill="#ffffff"><tspan font-size="126.72px" font-family="FreeSans" y="239.58" x="451.44" font-weight="600" fill="#ffffff">Desktop app</tspan></text> +<text style="word-spacing:0px;letter-spacing:0px;" xml:space="preserve" font-size="316.8px" y="342.54001" x="493.01996" font-family="Sans" line-height="125%" fill="#ffffff"><tspan font-size="71.28px" y="342.54001" x="493.01996" font-family="FreeSans" fill="#ffffff">Windows, OS X, Linux</tspan></text> </svg> diff --git a/core/img/googleplay.png b/core/img/googleplay.png Binary files differindex 1470518272e..9b33dab692b 100644 --- a/core/img/googleplay.png +++ b/core/img/googleplay.png diff --git a/core/img/places/link.png b/core/img/places/link.png Binary files differnew file mode 100644 index 00000000000..44b7e199a72 --- /dev/null +++ b/core/img/places/link.png diff --git a/core/img/places/link.svg b/core/img/places/link.svg new file mode 100644 index 00000000000..8784ebc1456 --- /dev/null +++ b/core/img/places/link.svg @@ -0,0 +1,12 @@ +<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <path fill="#333" d="M16,4c-6.6274,0-12,5.3726-12,12,0,6.627,5.3726,12,12,12,6.627,0,12-5.373,12-12,0-6.6274-5.373-12-12-12zm1.375,1.5313c2.059,0.0457,3.879,1.2826,5.719,2.0938l2.9691,4.1093-0.46971,1.7657,0.90686,0.56246-0.01543,2.0937c-0.02074,0.59892,0.0086,1.1986-0.0156,1.7969-0.28517,1.1355-0.94394,2.1713-1.5,3.2031-0.37695,0.18585,0.03437-1.2317-0.20313-1.6719,0.05486-1.0173-0.80743-0.97029-1.3903-0.40526-0.72172,0.42068-2.3074,0.54754-2.3589-0.59383-0.40972-1.3716-0.06-2.833,0.49886-4.1093l-0.921-1.125,0.327-2.891-1.469-1.4839,0.345-1.6252-1.719-0.9687c-0.339-0.2661-0.984-0.3713-1.125-0.7344,0.13954-0.00789,0.28457-0.018686,0.42189-0.0156zm-4.2187,0.015634c0.0539,0.00789,0.11999,0.045309,0.21874,0.125,0.57943,0.31834-0.14143,0.67954-0.31251,1.0157-0.92537,0.62589,0.28457,1.1385,0.68743,1.6406,0.64577-0.18549,1.2917-1.1086,2.2344-0.828,1.2058-0.37629,1.0137,1.0099,1.7031,1.625,0.08948,0.28954,1.5086,1.2317,0.65623,0.92177-0.702-0.54411-1.4827-0.50314-1.9845,0.28131-1.355,0.735-0.552-1.4144-1.202-1.9373-0.982-1.0957-0.57,0.8186-0.687,1.3907-0.639-0.0139-1.831-0.4913-2.485,0.2816l0.64046,1.0467,0.76577-1.1719c0.186-0.42411,0.41949,0.32966,0.62486,0.46886,0.24531,0.47297,1.4109,1.2744,0.53126,1.5-1.3039,0.72326-2.3295,1.8202-3.4375,2.7969-0.37371,0.78857-1.1366,0.6984-1.6094,0.0468-1.1438-0.70372-1.0589,1.1256-0.99994,1.8125l1.0013-0.626v1.0312c-0.028286,0.19509-0.00411,0.39806-0.0156,0.59383-0.70063,0.732-1.4069-1.0277-2.0157-1.422l-0.0468-2.5781c0.022114-0.72429-0.1308-1.4659,0.0156-2.1718,1.3779-1.4789,2.7775-3.0107,3.5935-4.891h1.3437c0.93909,0.45497,0.40406-1.0082,0.7812-0.95314zm-1.984,13.406c0.16303-0.01739,0.34848,0.01984,0.54688,0.12501,1.265,0.18106,2.2109,1.0987,3.2187,1.7969,0.80352,0.79632,2.5419,0.54134,2.7345,1.8907-0.29248,1.4636-1.7323,2.2495-3,2.7657-0.31646,0.17657-0.65657,0.31714-1.0157,0.37543-1.1753,0.29314-1.6834-0.912-1.9219-1.8137-0.53212-1.1143-1.8621-1.9577-1.6718-3.3274,0.0312-0.68057,0.40286-1.7373,1.1093-1.8125z"/> +</svg> diff --git a/core/js/avatar.js b/core/js/avatar.js index 57e6daa0930..c54c4068768 100644 --- a/core/js/avatar.js +++ b/core/js/avatar.js @@ -1,6 +1,6 @@ $(document).ready(function(){ if (OC.currentUser) { - $('#header .avatardiv').avatar(OC.currentUser, 32); + $('#header .avatardiv').avatar(OC.currentUser, 32, undefined, true); // Personal settings $('#avatar .avatardiv').avatar(OC.currentUser, 128); } diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js index 88a4c25d1ee..00068101726 100644 --- a/core/js/jquery.avatar.js +++ b/core/js/jquery.avatar.js @@ -15,7 +15,7 @@ * You may use this on any <div></div> * Here I'm using <div class="avatardiv"></div> as an example. * - * There are 4 ways to call this: + * There are 5 ways to call this: * * 1. $('.avatardiv').avatar('jdoe', 128); * This will make the div to jdoe's fitting avatar, with a size of 128px. @@ -34,10 +34,15 @@ * 4. $('.avatardiv').avatar('jdoe', 128, true); * This will behave like the first example, except it will also append random * hashes to the custom avatar images, to force image reloading in IE8. + * + * 5. $('.avatardiv').avatar('jdoe', 128, undefined, true); + * This will behave like the first example, but it will hide the avatardiv, if + * it will display the default placeholder. undefined is the ie8fix from + * example 4 and can be either true, or false/undefined, to be ignored. */ (function ($) { - $.fn.avatar = function(user, size, ie8fix) { + $.fn.avatar = function(user, size, ie8fix, hidedefault) { if (typeof(size) === 'undefined') { if (this.height() > 0) { size = this.height(); @@ -69,12 +74,17 @@ var url = OC.Router.generate('core_avatar_get', {user: user, size: size})+'?requesttoken='+oc_requesttoken; $.get(url, function(result) { if (typeof(result) === 'object') { - if (result.data && result.data.displayname) { - $div.placeholder(user, result.data.displayname); + if (!hidedefault) { + if (result.data && result.data.displayname) { + $div.placeholder(user, result.data.displayname); + } else { + $div.placeholder(user); + } } else { - $div.placeholder(user); + $div.hide(); } } else { + $div.show(); if (ie8fix === true) { $div.html('<img src="'+url+'#'+Math.floor(Math.random()*1000)+'">'); } else { diff --git a/core/js/setup.js b/core/js/setup.js index c0df1ed96b0..62f313fc501 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -54,7 +54,7 @@ $(document).ready(function() { var post = $(this).serializeArray(); // Disable inputs - $(':submit', this).attr('disabled','disabled').val('Finishing …'); + $(':submit', this).attr('disabled','disabled').val($(':submit', this).data('finishing')); $('input', this).addClass('ui-state-disabled').attr('disabled','disabled'); $('#selectDbType').buttonset('disable'); diff --git a/core/js/share.js b/core/js/share.js index 82f5da0baea..8d14520cd74 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -114,6 +114,7 @@ OC.Share={ data = false; } }}); + return data; }, share:function(itemType, itemSource, shareType, shareWith, permissions, callback) { @@ -217,9 +218,9 @@ OC.Share={ OC.Share.showLink(share.token, share.share_with, itemSource); } else { if (share.collection) { - OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.collection); + OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.mail_send, share.collection); } else { - OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, false); + OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.mail_send, false); } } if (share.expiration != null) { @@ -301,7 +302,7 @@ OC.Share={ } }); }, - addShareWith:function(shareType, shareWith, shareWithDisplayName, permissions, possiblePermissions, collection) { + addShareWith:function(shareType, shareWith, shareWithDisplayName, permissions, possiblePermissions, mailSend, collection) { if (!OC.Share.itemShares[shareType]) { OC.Share.itemShares[shareType] = []; } @@ -343,6 +344,14 @@ OC.Share={ }else{ html += escapeHTML(shareWithDisplayName); } + var mailNotificationEnabled = $('input:hidden[name=mailNotificationEnabled]').val(); + if (mailNotificationEnabled === 'yes') { + var checked = ''; + if (mailSend === '1') { + checked = 'checked'; + } + html += '<input type="checkbox" name="mailNotification" class="mailNotification" ' + checked + ' />'+t('core', 'notify user by email')+'</label>'; + } if (possiblePermissions & OC.PERMISSION_CREATE || possiblePermissions & OC.PERMISSION_UPDATE || possiblePermissions & OC.PERMISSION_DELETE) { if (editChecked == '') { html += '<label style="display:none;">'; @@ -699,5 +708,27 @@ $(document).ready(function() { } }); + $(document).on('click', '#dropdown input[name=mailNotification]', function() { + var li = $(this).parent(); + var itemType = $('#dropdown').data('item-type'); + var itemSource = $('#dropdown').data('item-source'); + var action = ''; + if (this.checked) { + action = 'informRecipients'; + } else { + action = 'informRecipientsDisabled'; + } + + var shareType = $(li).data('share-type'); + var shareWith = $(li).data('share-with'); + + $.post(OC.filePath('core', 'ajax', 'share.php'), {action: action, recipient: shareWith, shareType: shareType, itemSource: itemSource, itemType: itemType}, function(result) { + if (result.status !== 'success') { + OC.dialogs.alert(t('core', result.data.message), t('core', 'Warning')); + } + }); + +}); + }); diff --git a/core/setup.php b/core/setup.php index 4758c23b045..4026a748453 100644 --- a/core/setup.php +++ b/core/setup.php @@ -5,9 +5,18 @@ $autosetup_file = OC::$SERVERROOT."/config/autoconfig.php"; if( file_exists( $autosetup_file )) { OC_Log::write('core', 'Autoconfig file found, setting up owncloud...', OC_Log::INFO); include $autosetup_file; - $_POST['install'] = 'true'; $_POST = array_merge ($_POST, $AUTOCONFIG); - unlink($autosetup_file); +} + +$dbIsSet = isset($_POST['dbtype']); +$directoryIsSet = isset($_POST['directory']); +$adminAccountIsSet = isset($_POST['adminlogin']); + +if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) { + $_POST['install'] = 'true'; + if( file_exists( $autosetup_file )) { + unlink($autosetup_file); + } } OC_Util::addScript('setup'); @@ -21,7 +30,7 @@ $datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data'); $vulnerableToNullByte = false; if(@file_exists(__FILE__."\0Nullbyte")) { // Check if the used PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243) $vulnerableToNullByte = true; -} +} // Protect data directory here, so we can test if the protection is working OC_Setup::protectDataDirectory(); @@ -37,6 +46,8 @@ $opts = array( 'htaccessWorking' => OC_Util::isHtAccessWorking(), 'vulnerableToNullByte' => $vulnerableToNullByte, 'errors' => array(), + 'dbIsSet' => $dbIsSet, + 'directoryIsSet' => $directoryIsSet, ); if(isset($_POST['install']) AND $_POST['install']=='true') { diff --git a/core/skeleton/welcome.txt b/core/skeleton/welcome.txt new file mode 100644 index 00000000000..c86eaf91bbe --- /dev/null +++ b/core/skeleton/welcome.txt @@ -0,0 +1,5 @@ +Welcome to your ownCloud account! + +This is just an example file for developers and git users. +The packaged and released versions will come with better examples. + diff --git a/core/templates/altmail.php b/core/templates/altmail.php index 2551473c6f0..00b67bee456 100644 --- a/core/templates/altmail.php +++ b/core/templates/altmail.php @@ -1,5 +1,9 @@ <?php -print_unescaped($l->t("Hey there,\n\njust letting you know that %s shared %s with you.\nView it: %s\n\nCheers!", array($_['user_displayname'], $_['filename'], $_['link']))); +print_unescaped($l->t("Hey there,\n\njust letting you know that %s shared %s with you.\nView it: %s\n\n", array($_['user_displayname'], $_['filename'], $_['link']))); +if ( isset($_['expiration']) ) { + print_unescaped($l->t("The share will expire on %s.\n\n", array($_['expiration']))); +} +p($l->t("Cheers!")); ?> -- diff --git a/core/templates/installation.php b/core/templates/installation.php index 8b087706801..5a103762269 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -61,8 +61,14 @@ </p> </fieldset> - <fieldset id="datadirField"> + <?php if(!$_['directoryIsSet'] OR !$_['dbIsSet']): ?> + <fieldset id="advancedHeader"> <legend><a id="showAdvanced"><?php p($l->t( 'Advanced' )); ?> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend> + </fieldset> + <?php endif; ?> + + <?php if(!$_['directoryIsSet']): ?> + <fieldset id="datadirField"> <div id="datadirContent"> <label for="directory"><?php p($l->t( 'Data folder' )); ?></label> <input type="text" name="directory" id="directory" @@ -70,7 +76,9 @@ value="<?php p(OC_Helper::init_var('directory', $_['directory'])); ?>" /> </div> </fieldset> + <?php endif; ?> + <?php if(!$_['dbIsSet']): ?> <fieldset id='databaseField'> <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'] or $_['hasMSSQL']) $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?> @@ -171,6 +179,7 @@ </div> <?php endif; ?> </fieldset> + <?php endif; ?> - <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" /></div> + <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" data-finishing="<?php p($l->t( 'Finishing …' )); ?>" /></div> </form> diff --git a/core/templates/mail.php b/core/templates/mail.php index de72b136b13..40092f5491f 100644 --- a/core/templates/mail.php +++ b/core/templates/mail.php @@ -12,7 +12,11 @@ <td bgcolor="#f8f8f8" width="20px"> </td> <td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;"> <?php -print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared »%s« with you.<br><a href="%s">View it!</a><br><br>Cheers!', array($_['user_displayname'], $_['filename'], $_['link']))); +print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared »%s« with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link']))); +if ( isset($_['expiration']) ) { + print_unescaped($l->t("The share will expire on %s.<br><br>", array($_['expiration']))); +} +p($l->t('Cheers!')); ?> </td> </tr> @@ -22,7 +26,8 @@ print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared » <td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> <?php p($theme->getName()); ?> - <?php p($theme->getSlogan()); ?> -<br><a href="<?php print_unescaped($theme->getBaseUrl()); ?>"><?php print_unescaped($theme->getBaseUrl());?></a></td> +<br><a href="<?php print_unescaped($theme->getBaseUrl()); ?>"><?php print_unescaped($theme->getBaseUrl());?></a> +</td> </tr> <tr> <td bgcolor="#f8f8f8" colspan="2"> </td> |