Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions client/views/pages/elements/logs/logInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Template.logInput.onRendered(function logInputRendered (){
this.autorun(function(){
initTribute();
}.bind(this));

this.createLog= (ticketId)=>{
let logHandles = [];

Expand Down Expand Up @@ -38,13 +39,14 @@ Template.logInput.onRendered(function logInputRendered (){
});

const initTribute = function(){
let handles = Handles.find({},{sort: {callsign: 1}}).fetch().map(function(h){return {key:h.callsign,value:h.name, col:'handles'}});
let handles = Handles.find({},{sort: {callsign: 1}}).fetch().map(function(h){return {key:h.callsign, value:h.name, icon:h.icon, col:'handles',}});
let users = Meteor.users.find({},{sort:{username:1}}).fetch().map(function(u){return {key:u.username,value:u.username, col:'users'}});
if (this.tribute) {
this.tribute.detach(Template.instance().find('.log-message'));
}
this.tribute = new Tribute({
autocompleteMode: true,
// autocompleteMode: true,
trigger: '@',
values: handles.concat(users),
selectTemplate: function (item) {
if (typeof item === 'undefined') return null;
Expand All @@ -59,9 +61,10 @@ const initTribute = function(){
},
menuItemTemplate: function (item) {
if(item.original.col == 'users'){
return '<i class="fa fa-user"></i> '+item.string;
return `<i class="fa fa-user"></i> ${item.string}`;
}else{
return '<i class="fa fa-car"></i> '+ item.string;
console.log(item);
return `<i class="fa fa-${item.original.icon}"></i> ${item.string}`;
}
}
});
Expand Down
301 changes: 0 additions & 301 deletions imports/lib/tribute/TributeEvents.js

This file was deleted.

Loading