mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 18:11:40 -05:00
removed autocomplete, fixed bugs with dropdown
This commit is contained in:
parent
57487e5abf
commit
b6e26f634e
7 changed files with 6 additions and 52 deletions
17
client/js/jquery-ui-autocomplete.js
vendored
17
client/js/jquery-ui-autocomplete.js
vendored
File diff suppressed because one or more lines are too long
26
client/js/jquery.select-to-autocomplete.min.js
vendored
26
client/js/jquery.select-to-autocomplete.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -56,9 +56,5 @@ Deps.autorun(function() {
|
|||
// userId() can be changed before user(), because loading profile takes time
|
||||
if(Meteor.userId()) {
|
||||
Meteor.subscribe('notifications');
|
||||
if(isAdmin(Meteor.user())){
|
||||
// Subscribe to all users for now to make user selection autocomplete work
|
||||
Meteor.subscribe('allUsersAdmin');
|
||||
}
|
||||
}
|
||||
});
|
|
@ -41,7 +41,7 @@
|
|||
<div class="controls">
|
||||
<select id="postUser">
|
||||
{{#each users}}
|
||||
<option {{isSelected}} value="{{_id}}">{{userName}}</option>
|
||||
<option {{isSelected this}} value="{{_id}}">{{userName}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -11,9 +11,8 @@ Template.post_submit.helpers({
|
|||
userName: function(){
|
||||
return getDisplayName(this);
|
||||
},
|
||||
isSelected: function(){
|
||||
var post=Posts.findOne(Session.get('selectedPostId'));
|
||||
return (post && this._id == post.userId) ? 'selected' : '';
|
||||
isSelected: function(user){
|
||||
return user._id == Meteor.userId() ? "selected" : "";
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ RSS
|
|||
|
||||
preloadSubscriptions.push('settings');
|
||||
preloadSubscriptions.push('currentUser');
|
||||
preloadSubscriptions.push('allUsersAdmin');
|
||||
|
||||
Router.configure({
|
||||
layoutTemplate: 'layout',
|
||||
|
|
|
@ -93,8 +93,9 @@ Meteor.publish('allUsers', function(filterBy, sortBy, limit) {
|
|||
// TODO: find a better way
|
||||
|
||||
Meteor.publish('allUsersAdmin', function() {
|
||||
var selector = getSetting('requirePostInvite') ? {isInvited: true} : {};
|
||||
if (isAdminById(this.userId)) {
|
||||
return Meteor.users.find({isInvited: true});
|
||||
return Meteor.users.find(selector);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue