diff options
-rw-r--r-- | apps/comments/css/comments.css | 2 | ||||
-rw-r--r-- | apps/dav/templates/settings-admin-caldav.php | 2 | ||||
-rw-r--r-- | apps/files/css/files.scss | 2 | ||||
-rw-r--r-- | apps/files/js/file-upload.js | 4 | ||||
-rw-r--r-- | core/css/multiselect.scss | 2 | ||||
-rw-r--r-- | core/css/styles.scss | 4 | ||||
-rw-r--r-- | settings/css/settings.scss | 76 | ||||
-rw-r--r-- | settings/js/users/groups.js | 13 | ||||
-rw-r--r-- | settings/templates/users/part.grouplist.php | 62 | ||||
-rw-r--r-- | tests/lib/DateTimeFormatterTest.php | 9 |
10 files changed, 61 insertions, 115 deletions
diff --git a/apps/comments/css/comments.css b/apps/comments/css/comments.css index 8423151cac8..d63211391f6 100644 --- a/apps/comments/css/comments.css +++ b/apps/comments/css/comments.css @@ -164,8 +164,6 @@ #commentsTabView .message.error { color: #e9322d; border-color: #e9322d; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; box-shadow: 0 0 6px #f8b9b7; } diff --git a/apps/dav/templates/settings-admin-caldav.php b/apps/dav/templates/settings-admin-caldav.php index 34d3517e8d9..8dbe5b38412 100644 --- a/apps/dav/templates/settings-admin-caldav.php +++ b/apps/dav/templates/settings-admin-caldav.php @@ -35,6 +35,6 @@ script('dav', [ <?php ($_['send_invitations'] === 'yes') ? print_unescaped('checked="checked"') : null ?>/> <label for="caldavSendInvitations"><?php p($l->t('Send invitations to attendees')); ?></label> <br> - <em><?php p($l->t('Please make sure to properly setup the email settings above.')); ?></em> + <em><?php p($l->t('Please make sure to properly set up the email settings above.')); ?></em> </p> </form> diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index 7c2d3b0bb1c..8ae8fac6c21 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -34,8 +34,6 @@ .newFileMenu .error, #fileList .error { color: $color-error; border-color: $color-error; - -webkit-box-shadow: 0 0 6px #f8b9b7; - -moz-box-shadow: 0 0 6px #f8b9b7; box-shadow: 0 0 6px #f8b9b7; } diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index b86b42bdb9a..bf8116a6e1a 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -971,7 +971,7 @@ OC.Uploader.prototype = _.extend({ $('#uploadprogressbar').progressbar({value: 0}); $('#uploadprogressbar .ui-progressbar-value'). html('<em class="label inner"><span class="desktop">' - + t('files', 'Uploading …') + + t('files', 'Uploading…') + '</span><span class="mobile">' + t('files', '…') + '</span></em>'); @@ -1023,7 +1023,7 @@ OC.Uploader.prototype = _.extend({ var h = moment.duration(smoothRemainingSeconds, "seconds").humanize(); if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) { // show "Uploading ..." for durations longer than 4 hours - h = t('files', 'Uploading …'); + h = t('files', 'Uploading…'); } $('#uploadprogressbar .label .mobile').text(h); $('#uploadprogressbar .label .desktop').text(h); diff --git a/core/css/multiselect.scss b/core/css/multiselect.scss index cf13563e772..3aa9eb639dd 100644 --- a/core/css/multiselect.scss +++ b/core/css/multiselect.scss @@ -31,8 +31,6 @@ ul.multiselectoptions { border-bottom-right-radius: 3px; width: 100%; /* do not cut off group names */ - -webkit-box-shadow: 0 1px 10px $color-box-shadow; - -moz-box-shadow: 0 1px 10px $color-box-shadow; box-shadow: 0 1px 10px $color-box-shadow; } &.up { diff --git a/core/css/styles.scss b/core/css/styles.scss index 3b621d69862..d74840fe444 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -249,6 +249,10 @@ body { left: 0; } +#app-navigation * { + box-sizing: border-box; +} + #controls { .button, button { box-sizing: border-box; diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 6798d99882f..85ca66542a3 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -417,42 +417,6 @@ table.nostyle { } /* USERS */ -#newgroup-init a span { - margin-left: 20px; - &:before { - position: absolute; - left: 12px; - top: -2px; - content: '+'; - font-weight: bold; - font-size: 150%; - } -} - -#newgroup-form { - height: 44px; -} - -#newgroupname { - margin: 0; - width: 100%; - padding: 12px 40px 12px 12px; - box-sizing: border-box; - background-color: transparent; - border: none; - border-bottom: 1px solid $color-border; - border-radius: 0; -} - -#newgroup-form .button { - position: absolute; - right: 0; - top: 0; - padding: 10px 20px; - background-color: transparent; - border: none; - opacity: .5; -} .isgroup { .groupname { @@ -466,44 +430,18 @@ table.nostyle { } } -.usercount { - float: left; - margin: 5px; -} - li.active { - span.utils .delete { - float: left; - position: relative; - opacity: 0.5; - top: -7px; - left: 7px; - width: 44px; - height: 44px; - } - .rename { - padding: 8px 14px 20px 14px; - top: 0px; - position: absolute; - width: 16px; - height: 16px; - opacity: 0.5; - display: inline-block !important; - } - span.utils .delete img { - margin: 14px; - } + .delete, .rename { - opacity: 0.5; - } - span.utils .delete:hover, .rename:hover { - opacity: 1; + display: block; } } -span.utils .delete, -.rename { - display: none; +.app-navigation-entry-utils { + .delete, + .rename { + display: none; + } } #usersearchform { diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 073551c0d8e..522291a00d7 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -227,7 +227,7 @@ GroupList = { }, isAddGroupButtonVisible: function () { - return $('#newgroup-init').is(":visible"); + return !$('#newgroup-entry').hasClass('editing'); }, toggleAddGroup: function (event) { @@ -235,14 +235,12 @@ GroupList = { if (event) { event.stopPropagation(); } - $('#newgroup-form').show(); - $('#newgroup-init').hide(); - $('#newgroupname').focus(); + $('#newgroup-entry').addClass('editing'); + $('#newgroupname').select(); GroupList.handleAddGroupInput(''); } else { - $('#newgroup-form').hide(); - $('#newgroup-init').show(); + $('#newgroup-entry').removeClass('editing'); $('#newgroupname').val(''); } }, @@ -299,7 +297,7 @@ GroupList = { } // Call function for handling delete/undo - GroupDeleteHandler.mark(GroupList.getElementGID(this)); + GroupDeleteHandler.mark(GroupList.getElementGID($(this).parent())); }; $userGroupList.on('click', '.delete', deleteAction); @@ -340,7 +338,6 @@ $(document).ready( function () { } // Display or hide of Create Group List Element - $('#newgroup-form').hide(); $('#newgroup-init').on('click', function (e) { GroupList.toggleAddGroup(e); }); diff --git a/settings/templates/users/part.grouplist.php b/settings/templates/users/part.grouplist.php index 5dfd7836f6a..469ed94adb3 100644 --- a/settings/templates/users/part.grouplist.php +++ b/settings/templates/users/part.grouplist.php @@ -1,18 +1,16 @@ <ul id="usergrouplist" data-sort-groups="<?php p($_['sortGroups']); ?>"> <!-- Add new group --> <?php if ($_['isAdmin']) { ?> - <li id="newgroup-init"> - <a href="#"> - <span><?php p($l->t('Add group'))?></span> - </a> + <li id="newgroup-entry"> + <a href="#" class="icon-add" id="newgroup-init"><?php p($l->t('Add group'))?></a> + <div class="app-navigation-entry-edit" id="newgroup-form"> + <form> + <input type="text" id="newgroupname" placeholder="<?php p($l->t('Add group'))?>"> + <input type="submit" value="" class="icon-checkmark"> + </form> + </div> </li> <?php } ?> - <li id="newgroup-form" style="display: none"> - <form> - <input type="text" id="newgroupname" placeholder="<?php p($l->t('Group name')); ?> …" /> - <input type="submit" class="button icon-add" value="" /> - </form> - </li> <!-- Everyone --> <li id="everyonegroup" data-gid="_everyone" data-usercount="" class="isgroup"> <a href="#"> @@ -20,20 +18,22 @@ <?php p($l->t('Everyone')); ?> </span> </a> - <span class="utils"> - <span class="usercount" id="everyonecount"> - - </span> - </span> + <div class="app-navigation-entry-utils"> + <ul> + <li class="usercount app-navigation-entry-utils-counter" id="everyonecount"></li> + </ul> + </div> </li> <!-- The Admin Group --> <?php foreach($_["adminGroup"] as $adminGroup): ?> <li data-gid="admin" data-usercount="<?php if($adminGroup['usercount'] > 0) { p($adminGroup['usercount']); } ?>" class="isgroup"> <a href="#"><span class="groupname"><?php p($l->t('Admins')); ?></span></a> - <span class="utils"> - <span class="usercount"><?php if($adminGroup['usercount'] > 0) { p($adminGroup['usercount']); } ?></span> - </span> + <div class="app-navigation-entry-utils"> + <ul> + <li class="app-navigation-entry-utils-counter"><?php if($adminGroup['usercount'] > 0) { p($adminGroup['usercount']); } ?></li> + </ul> + </div> </li> <?php endforeach; ?> @@ -41,9 +41,11 @@ <?php $disabledUsersGroup = $_["disabledUsersGroup"] ?> <li data-gid="_disabledUsers" data-usercount="<?php if($disabledUsersGroup['usercount'] > 0) { p($disabledUsersGroup['usercount']); } ?>" class="isgroup"> <a href="#"><span class="groupname"><?php p($l->t('Disabled')); ?></span></a> - <span class="utils"> - <span class="usercount"><?php if($disabledUsersGroup['usercount'] > 0) { p($disabledUsersGroup['usercount']); } ?></span> - </span> + <div class="app-navigation-entry-utils"> + <ul> + <li class="app-navigation-entry-utils-counter"><?php if($disabledUsersGroup['usercount'] > 0) { p($disabledUsersGroup['usercount']); } ?></li> + </ul> + </div> </li> <!--List of Groups--> @@ -52,14 +54,16 @@ <a href="#" class="dorename"> <span class="groupname"><?php p($group['name']); ?></span> </a> - <span class="utils"> - <span class="usercount"><?php if($group['usercount'] > 0) { p($group['usercount']); } ?></span> - <?php if($_['isAdmin']): ?> - <a href="#" class="action delete" original-title="<?php p($l->t('Delete'))?>"> - <img src="<?php print_unescaped(image_path('core', 'actions/delete.svg')) ?>" /> - </a> - <?php endif; ?> - </span> + <div class="app-navigation-entry-utils"> + <ul> + <li class="app-navigation-entry-utils-counter"><?php if($group['usercount'] > 0) { p($group['usercount']); } ?></li> + <?php if($_['isAdmin']): ?> + <li class="app-navigation-entry-utils-menu-button delete"> + <button class="icon-delete"></button> + </li> + <?php endif; ?> + </ul> + </div> </li> <?php endforeach; ?> </ul> diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index 85884c9bfb4..deb6a7c783c 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -46,10 +46,13 @@ class DateTimeFormatterTest extends TestCase { $deL10N = \OC::$server->getL10N('lib', 'de'); return array( array('seconds ago', $time, $time), + array('in a few seconds', $time + 5 , $time), array('1 minute ago', $this->getTimestampAgo($time, 30, 1), $time), array('15 minutes ago', $this->getTimestampAgo($time, 30, 15), $time), + array('in 15 minutes', $time, $this->getTimestampAgo($time, 30, 15)), array('1 hour ago', $this->getTimestampAgo($time, 30, 15, 1), $time), array('3 hours ago', $this->getTimestampAgo($time, 30, 15, 3), $time), + array('in 3 hours', $time, $this->getTimestampAgo($time, 30, 15, 3)), array('4 days ago', $this->getTimestampAgo($time, 30, 15, 3, 4), $time), array('seconds ago', new \DateTime('Wed, 02 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')), @@ -86,9 +89,15 @@ class DateTimeFormatterTest extends TestCase { // Normal testing array('today', $this->getTimestampAgo($time, 30, 15), $time), array('yesterday', $this->getTimestampAgo($time, 0, 0, 0, 1), $time), + array('tomorrow', $time, $this->getTimestampAgo($time, 0, 0, 0, 1)), array('4 days ago', $this->getTimestampAgo($time, 0, 0, 0, 4), $time), + array('in 4 days', $time, $this->getTimestampAgo($time, 0, 0, 0, 4)), array('5 months ago', $this->getTimestampAgo($time, 0, 0, 0, 155), $time), + array('next month', $time, $this->getTimestampAgo($time, 0, 0, 0, 32)), + array('in 5 months', $time, $this->getTimestampAgo($time, 0, 0, 0, 155)), array('2 years ago', $this->getTimestampAgo($time, 0, 0, 0, 0, 2), $time), + array('next year', $time, $this->getTimestampAgo($time, 0, 0, 0, 0, 1)), + array('in 2 years', $time, $this->getTimestampAgo($time, 0, 0, 0, 0, 2)), // Test with compare timestamp array('today', $this->getTimestampAgo($time, 0, 0, 0, 0, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)), |