Skip to content

Commit

Permalink
catch the closer
Browse files Browse the repository at this point in the history
fixes att#899
i don't like the look of the closer on top of the comments
but it's time to get something - anything - working
seemed like it was a matter of wrapping in another div

in addition, don't change column widths on a size-changed event
  • Loading branch information
gordonwoodhull committed Oct 31, 2014
1 parent 29c9369 commit fe8e067
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
10 changes: 6 additions & 4 deletions htdocs/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,7 @@ li.jqtree-selected .notebook-commands {
}

.comment-container {
margin-bottom: .8em;
// clear: both;
margin-bottom: 0.5ex;
}

.comment-header {
Expand All @@ -669,19 +668,22 @@ li.jqtree-selected .notebook-commands {
color: #000;
display:none;
position: absolute;
right: 0.75ex
top: 0;
right: 0.75ex;
}
.comment-header-close:hover{
cursor: pointer;
}
.comment-body {
color: #555;
}

.comment-body-wrapper {
position: relative;
}

.comment-body-text {
color: #555;
float: left;
margin-bottom: .4em;
max-width: 93%;
min-width: 93%;
Expand Down
8 changes: 5 additions & 3 deletions htdocs/js/rcloud_bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,7 @@ RCloud.UI.collapsible_column = function(sel_column, sel_accordion, sel_collapser
return false;
});
collapsibles().on("size-changed", function() {
that.resize();
that.resize(true);
});
$(sel_collapser).click(function() {
if (collapsed_)
Expand Down Expand Up @@ -3780,6 +3780,8 @@ RCloud.UI.comments_frame = (function() {
.attr("class", "comment-body")
.style({"max-width":"70%"})
.append("div")
.attr("class", "comment-body-wrapper")
.append("div")
.attr("class", "comment-body-text")
.text(function(d) { return d.body; })
.each(function(d){
Expand All @@ -3795,12 +3797,12 @@ RCloud.UI.comments_frame = (function() {
};
ui_utils.editable(comment_element, $.extend({allow_edit: editable(d),inactive_text: comment_element.text(),active_text: comment_element.text()},editable_opts));
});
var text_div = d3.selectAll(".comment-body",this);
var text_div = d3.selectAll(".comment-body-wrapper",this);
text_div
.append("i")
.attr("class", "icon-remove comment-header-close")
.style({"max-width":"5%"})
.on("click", function (d) {
.on("click", function (d, e) {
if(editable(d))
result.delete_comment(d.id);
});
Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/rcloud_bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion htdocs/js/ui/column.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ RCloud.UI.collapsible_column = function(sel_column, sel_accordion, sel_collapser
return false;
});
collapsibles().on("size-changed", function() {
that.resize();
that.resize(true);
});
$(sel_collapser).click(function() {
if (collapsed_)
Expand Down
6 changes: 4 additions & 2 deletions htdocs/js/ui/comments_frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ RCloud.UI.comments_frame = (function() {
.attr("class", "comment-body")
.style({"max-width":"70%"})
.append("div")
.attr("class", "comment-body-wrapper")
.append("div")
.attr("class", "comment-body-text")
.text(function(d) { return d.body; })
.each(function(d){
Expand All @@ -54,12 +56,12 @@ RCloud.UI.comments_frame = (function() {
};
ui_utils.editable(comment_element, $.extend({allow_edit: editable(d),inactive_text: comment_element.text(),active_text: comment_element.text()},editable_opts));
});
var text_div = d3.selectAll(".comment-body",this);
var text_div = d3.selectAll(".comment-body-wrapper",this);
text_div
.append("i")
.attr("class", "icon-remove comment-header-close")
.style({"max-width":"5%"})
.on("click", function (d) {
.on("click", function (d, e) {
if(editable(d))
result.delete_comment(d.id);
});
Expand Down

0 comments on commit fe8e067

Please sign in to comment.