Commit fd7faeb3 authored by bbaer's avatar bbaer
Browse files

Added the other command buttons

parent 0bef5e32
......@@ -276,7 +276,8 @@ var QfqNS = QfqNS || {};
this.$target.val(JSON.stringify(jexport));
var that = this;
if (this.page.qfqForm) {
this.page.qfqForm.eventEmitter.emitEvent('form.changed', n.EventEmitter.makePayload(that, null));
this.page.qfqForm.eventEmitter.emitEvent('form.changed',
n.EventEmitter.makePayload(that, null));
this.page.qfqForm.changeHandler();
this.page.qfqForm.form.formChanged = true;
} else {
......
......@@ -76,16 +76,27 @@ var QfqNS = QfqNS || {};
class: "qfqCommentText",
});
$comment.html(this.comment.comment);
$comment.append(this._getCommands());
$comment.appendTo($commentWrap);
return $commentWrap;
};
n.Comment.prototype._getCommands = function () {
var $commentCommands = $("<div />", {
class: "qfqCommentCommands"
});
var $reply = $('<span />', {
class: "glyphicon glyphicon-comment qfqCommentReply"
$commentCommands.append(this._getCommand("Edit", "pencil"));
$commentCommands.append(this._getCommand("Delete", "trash"));
$commentCommands.append(this._getCommand("Reply", "comment"));
return $commentCommands;
};
n.Comment.prototype._getCommand = function(description, icon) {
var $command = $('<span />', {
class: "glyphicon glyphicon-" + icon + " qfqCommentCommand",
title: description
});
$reply.appendTo($commentCommands);
$commentCommands.appendTo($comment);
$comment.appendTo($commentWrap);
return $commentWrap;
return $command;
};
})(QfqNS);
\ No newline at end of file
......@@ -590,11 +590,12 @@ select.qfq-locked:invalid {
text-align: right;
}
.qfqCommentReply {
.qfqCommentCommand {
cursor: pointer;
margin-left: 9px;
}
.qfqCommentReply:hover {
.qfqCommentCommand:hover {
color: #9acfea;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment