diff --git a/ajax/userController.php b/ajax/userController.php
index 09c0c935..4387e9c3 100644
--- a/ajax/userController.php
+++ b/ajax/userController.php
@@ -14,33 +14,6 @@ namespace OCA\Documents;
class UserController extends Controller{
- /**
- * Search users according to the pattern
- */
- public static function search(){
- $uid = self::preDispatch();
- if (@$_GET['search']){
- $found = array();
- $users = array();
- $count = 0;
- $limit = 0;
- $offset = 0;
- while ($count < 15 && count($users) == $limit) {
- $limit = 15 - $count;
- $users = \OC_User::getDisplayNames($_GET['search'], $limit, $offset);
- $offset += $limit;
- foreach ($users as $userid => $displayName) {
- $found[] = array(
- 'label' => $displayName,
- 'value' => $userid
- );
- $count++;
- }
- }
- \OCP\JSON::success(array('data'=>$found));
- }
- }
-
/**
* Invite users to the editing session
*/
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 94a14350..2d884d2a 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -83,8 +83,3 @@ $this->create('documents_user_invite', 'ajax/user/invite')
->post()
->action('\OCA\Documents\UserController', 'invite')
;
-
-$this->create('documents_user_search', 'ajax/user/search')
- ->get()
- ->action('\OCA\Documents\UserController', 'search')
-;
diff --git a/css/style.css b/css/style.css
index 2136f4be..be0539df 100755
--- a/css/style.css
+++ b/css/style.css
@@ -92,6 +92,10 @@
z-index: 500;
}
+#odf-toolbar #dropdown{
+ right:auto;
+}
+
#document-title{
position: absolute;
top: 9px;
diff --git a/js/documents.js b/js/documents.js
index efa3b88d..4f97e633 100644
--- a/js/documents.js
+++ b/js/documents.js
@@ -15,20 +15,13 @@ var documentsMain = {
' ' +
- '
' +
+ '
' +
- '
' +
+ ' ' +
- ' ' +
- '
' +
- '
' +
- '
' +
- '
' +
- ' ' +
+ ' ' +
'',
/* Editor wrapper HTML */
@@ -68,6 +61,8 @@ var documentsMain = {
$(document.body).prepend(documentsMain.UI.toolbar.replace(/%title%/g, title));
if (!canShare){
$('#odf-invite,#invite-block').remove();
+ } else {
+ //TODO: fill in with users
}
$(document.body).addClass("claro");
$(document.body).prepend(documentsMain.UI.container);
@@ -189,38 +184,11 @@ var documentsMain = {
onInvite: function(event) {
event.preventDefault();
- $('#invite-block').toggle();
- $('#inivite-input').autocomplete({
- minLength: 1,
- source: function(search, response) {
- $.get(
- OC.Router.generate('documents_user_search'),
- {search: $('#inivite-input').val()},
- function(result) {
- if (result.status === 'success' && result.data.length > 0) {
- response(result.data);
- } else {
- response([t('core', 'No people found')]);
- }
- }
- );
- },
- select: function(event, el) {
- event.preventDefault();
- var item = $(
- ''
- + el.item.label
- + ''
- + ''
- );
- $('#inivite-input').val('');
- $('#invitee-list').prepend(item);
- }
- });
+ if (OC.Share.droppedDown) {
+ OC.Share.hideDropDown();
+ } else {
+ OC.Share.showDropDown('file', 118, $("#odf-toolbar"), true, OC.PERMISSION_READ | OC.PERMISSION_SHARE | OC.PERMISSION_UPDATE);
+ }
},
sendInvite: function() {
@@ -344,11 +312,7 @@ $(document).ready(function() {
$(document.body).on('click', '#odf-close', documentsMain.onClose);
$(document.body).on('click', '#odf-invite', documentsMain.onInvite);
- $(document.body).on('click', '#invite-send', documentsMain.sendInvite);
- $(document.body).on('click', '#invitee-list li', function(){
- $(this).remove();
- });
-
+
$('.add-document').on('click', '.add', documentsMain.onCreate);
var file_upload_start = $('#file_upload_start');