Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 4 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 26 additions and 8 deletions.
  1. +22 −1 assets/js/views/views.js
  2. +4 −7 lib/irc.js
View
23 assets/js/views/views.js
@@ -24,6 +24,7 @@ app.Views.SkUserView = Backbone.View.extend({
"click .showJournal": "showJournal"
},
addUsers: function(data) {
+ console.log("data : ", data);
var loopCount = data.length;
for (var i = 0; i < loopCount; i++) {
skuser = new app.Models.SkUser();
@@ -168,10 +169,30 @@ app.Views.SkUserView = Backbone.View.extend({
//console.log("skuser : ", skuser);
test = skuser;
var currentIssue = skuser.get('current') || 'init';
+ var issue = app.collections.issueList.get(skuser.get('issueId'));
+ var priority = '';
+ if (issue) {
+ priority = issue.get('priority').name;
+ //console.log("priority : ", priority);
+ //currentIdClass = currentIdClass + ' badge';
+ }
+ console.groupCollapsed(skuser.get('name'), skuser);
+ console.log("skuser.get('id') : ", skuser.get('id'));
+ console.log("skuser.get('issueId') : ", skuser.get('issueId'));
+ console.log("skuser.get('issueName') : ", skuser.get('issueName'));
+ console.log("skuser.get('issueStatus') : ", skuser.get('issueStatus'));
+ console.log("priority : ", priority);
+ console.log("skuser.get('issueTime') : ", skuser.get('issueTime'));
+ console.groupEnd();
var html = ich.skuser({
name: skuser.get('name'),
id: skuser.get('id'),
- current: currentIssue,
+ //current: currentIssue,
+ currentId: skuser.get('issueId'),
+ currentName: skuser.get('issueName'),
+ currentStatus: skuser.get('issueStatus'),
+ currentPriority: priority,
+ currentTime: skuser.get('issueTime'),
count: skuser.get('redmine').issues.length,
issuesId: 'issues-' + skuser.get('id'),
issuesIdTarget: '#issues-' + skuser.get('id')
View
11 lib/irc.js
@@ -38,7 +38,7 @@ irc.start = function(callback) {
};
irc.join = function( chan, callback ) {
- console.log(new Date(), '!!!!! ' + config.irc.nedmineBot + ' => sk !!!!!');
+ console.log(new Date(), '!!!!! ' + config.irc.redmineBot + ' => sk !!!!!');
irc.client.say(config.irc.redmineBot, config.irc.passPhrase);
irc.client.say(config.irc.redmineBot, "sk");
@@ -87,12 +87,9 @@ var storeCurrentIssue = function(from, message, callback) {
var SkUser = mongoose.model('SkUser');
var majJSON = parseMess( message );
- if (!!majJSON.user) {
- SkUser.find({login:majJSON.login}).update({current:majJSON.issueId}, callback);
- }
- var socket = global.socket || false;
- if (socket) {
- //socket.emit('updateCurrentIssue::response', majJSON);
+ //console.log("majJSON : ", majJSON);
+ if (!!majJSON.login) {
+ SkUser.find({login:majJSON.login}).update(majJSON, callback);
emitter.emit('updateCurrentIssue::response', majJSON);
}
};

No commit comments for this range

Something went wrong with that request. Please try again.