diff --git a/apps/comments/.bowerrc b/apps/comments/.bowerrc
new file mode 100644
index 0000000000000..faee1372545d4
--- /dev/null
+++ b/apps/comments/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "js/vendor"
+}
\ No newline at end of file
diff --git a/apps/comments/appinfo/app.php b/apps/comments/appinfo/app.php
index 067e01e47ef78..f6e022e81793f 100644
--- a/apps/comments/appinfo/app.php
+++ b/apps/comments/appinfo/app.php
@@ -27,6 +27,7 @@
function() {
\OCP\Util::addScript('oc-backbone-webdav');
\OCP\Util::addScript('comments', 'merged');
+ \OCP\Util::addStyle('comments', 'autocomplete');
\OCP\Util::addStyle('comments', 'comments');
}
);
diff --git a/apps/comments/appinfo/info.xml b/apps/comments/appinfo/info.xml
index b67def1fb9dc4..6fcfa4bd399e3 100644
--- a/apps/comments/appinfo/info.xml
+++ b/apps/comments/appinfo/info.xml
@@ -28,4 +28,10 @@
OCA\Comments\Activity\Provider
+
+
+
+ OCA\Comments\Collaboration\CommentersSorter
+
+
diff --git a/apps/comments/composer/composer/autoload_classmap.php b/apps/comments/composer/composer/autoload_classmap.php
index 299dc305641c5..0000ab9081a69 100644
--- a/apps/comments/composer/composer/autoload_classmap.php
+++ b/apps/comments/composer/composer/autoload_classmap.php
@@ -11,8 +11,10 @@
'OCA\\Comments\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php',
'OCA\\Comments\\Activity\\Setting' => $baseDir . '/../lib/Activity/Setting.php',
'OCA\\Comments\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
+ 'OCA\\Comments\\Collaboration\\CommentersSorter' => $baseDir . '/../lib/Collaboration/CommentersSorter.php',
'OCA\\Comments\\Controller\\Notifications' => $baseDir . '/../lib/Controller/Notifications.php',
'OCA\\Comments\\EventHandler' => $baseDir . '/../lib/EventHandler.php',
+ 'OCA\\Comments\\JSSettingsHelper' => $baseDir . '/../lib/JSSettingsHelper.php',
'OCA\\Comments\\Notification\\Listener' => $baseDir . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php',
);
diff --git a/apps/comments/composer/composer/autoload_static.php b/apps/comments/composer/composer/autoload_static.php
index 932a6316898a5..662f77f89dc4f 100644
--- a/apps/comments/composer/composer/autoload_static.php
+++ b/apps/comments/composer/composer/autoload_static.php
@@ -26,8 +26,10 @@ class ComposerStaticInitComments
'OCA\\Comments\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php',
'OCA\\Comments\\Activity\\Setting' => __DIR__ . '/..' . '/../lib/Activity/Setting.php',
'OCA\\Comments\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
+ 'OCA\\Comments\\Collaboration\\CommentersSorter' => __DIR__ . '/..' . '/../lib/Collaboration/CommentersSorter.php',
'OCA\\Comments\\Controller\\Notifications' => __DIR__ . '/..' . '/../lib/Controller/Notifications.php',
'OCA\\Comments\\EventHandler' => __DIR__ . '/..' . '/../lib/EventHandler.php',
+ 'OCA\\Comments\\JSSettingsHelper' => __DIR__ . '/..' . '/../lib/JSSettingsHelper.php',
'OCA\\Comments\\Notification\\Listener' => __DIR__ . '/..' . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php',
);
diff --git a/apps/comments/css/autocomplete.scss b/apps/comments/css/autocomplete.scss
new file mode 100644
index 0000000000000..10e56f154202d
--- /dev/null
+++ b/apps/comments/css/autocomplete.scss
@@ -0,0 +1,77 @@
+/**
+ * based upon apps/comments/js/vendor/At.js/dist/css/jquery.atwho.css,
+ * only changed colors and font-weight
+ */
+
+.atwho-view {
+ position:absolute;
+ top: 0;
+ left: 0;
+ display: none;
+ margin-top: 18px;
+ background: $color-main-background;
+ color: $color-main-text;
+ border: 1px solid $color-border;
+ border-radius: 3px;
+ box-shadow: 0 0 5px $color-box-shadow;
+ min-width: 120px;
+ z-index: 11110 !important;
+}
+
+.atwho-view .atwho-header {
+ padding: 5px;
+ margin: 5px;
+ cursor: pointer;
+ border-bottom: solid 1px $color-border;
+ color: $color-main-text;
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.atwho-view .atwho-header .small {
+ color: $color-main-text;
+ float: right;
+ padding-top: 2px;
+ margin-right: -5px;
+ font-size: 12px;
+ font-weight: normal;
+}
+
+.atwho-view .atwho-header:hover {
+ cursor: default;
+}
+
+.atwho-view .cur {
+ background: $color-primary;
+ color: $color-primary-text;
+}
+.atwho-view .cur small {
+ color: $color-primary-text;
+}
+.atwho-view strong {
+ color: $color-main-text;
+ font-weight: normal;
+}
+.atwho-view .cur strong {
+ color: $color-primary-text;
+ font-weight: normal;
+}
+.atwho-view ul {
+ /* width: 100px; */
+ list-style:none;
+ padding:0;
+ margin:auto;
+ max-height: 200px;
+ overflow-y: auto;
+}
+.atwho-view ul li {
+ display: block;
+ padding: 5px 10px;
+ border-bottom: 1px solid $color-border;
+ cursor: pointer;
+}
+.atwho-view small {
+ font-size: smaller;
+ color: $color-main-text;
+ font-weight: normal;
+}
diff --git a/apps/comments/css/comments.css b/apps/comments/css/comments.css
index d63211391f6b6..09771b4e9544b 100644
--- a/apps/comments/css/comments.css
+++ b/apps/comments/css/comments.css
@@ -48,22 +48,30 @@
margin-right: 6px;
}
-#commentsTabView .newCommentForm textarea {
+#commentsTabView .newCommentForm div.message {
resize: none;
}
+#commentsTabView .newCommentForm div.message:empty:before {
+ content: attr(data-placeholder);
+ color: grey;
+}
+
#commentsTabView .comment {
position: relative;
margin-bottom: 30px;
}
-#commentsTabView .comment .avatar {
+#commentsTabView .comment .avatar,
+.atwho-view-ul * .avatar{
width: 32px;
height: 32px;
line-height: 32px;
}
-#commentsTabView .comment .message .avatar {
+#commentsTabView .comment .message .avatar,
+.atwho-view-ul * .avatar
+{
display: inline-block;
}
@@ -112,11 +120,16 @@
}
#commentsTabView .comments li .message .avatar-name-wrapper,
+.atwho-view-ul * .avatar-name-wrapper,
#commentsTabView .comment .authorRow {
position: relative;
cursor: pointer;
}
+.atwho-view-ul * .avatar-name-wrapper {
+ white-space: nowrap;
+}
+
#commentsTabView .comment .author,
#commentsTabView .comment .date {
opacity: .5;
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 3a20604326b0e..7398a709421d5 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -30,7 +30,7 @@
'{{/if}}' +
' ' +
'