Skip to content

Commit

Permalink
[fix] scroll annotations with mousewheel when their extension can't b…
Browse files Browse the repository at this point in the history
…e fitted to the sidebar

[new] compatibility with WP-Ajaxify-Comments to allow posting annotations without page reload
  • Loading branch information
htrex committed Jun 18, 2013
1 parent 66f85da commit 959f032
Show file tree
Hide file tree
Showing 7 changed files with 378 additions and 78 deletions.
5 changes: 5 additions & 0 deletions lib/jsonapi/jsonapi-emend-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ public function get_comments()
$comments[] = new JSON_API_Emend($wp_comment);
}

$current_user = is_user_logged_in() ? wp_get_current_user()->display_name : 'guest';

$response = array(
'post' => array(
'id' => $post_id,
'comments' => $comments
),
'user' => array (
'name' => $current_user
)
);
return $response;
Expand Down
2 changes: 1 addition & 1 deletion web/css/e-Mend_dist-yui.css

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion web/css/e-Mend_dist.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ WP HUM SPECIFIC STYLES
#sidebar-body #respond { display: block; }
#respond input[type="text"], #respond textarea { padding: 5px; }
#comments, ol.commentlist { display: none; }
#respond .comment-form-author label, #respond .comment-form-email label, #respond .comment-form-url label, #respond .comment-form-comment label { box-shadow: none; position: static; float: left; margin-top: 2px; width: 80px; }
#respond .comment-form-author label, #respond .comment-form-email label, #respond .comment-form-url label, #respond .comment-form-comment label { box-shadow: none; position: static; margin-top: 2px; width: 80px; }
#respond .form-allowed-tags { font-size: 10px; }
#respond textarea { max-width: 540px; }
#respond .comment-form-author .required, #respond .comment-form-email .required { position: static; float: right;}
Expand Down Expand Up @@ -368,6 +368,8 @@ NOTE
margin: 2px 2px 2px 0;
}

.noteGroup:last-child { margin-bottom: 50px; }

.noteGroup.minify img{ display: none; }
.noteGroup.minify h6 { font-weight: normal; }
.noteGroup.minify h6 em { display: none; }
Expand Down
13 changes: 7 additions & 6 deletions web/js/e-Mend_dist-yui.js

Large diffs are not rendered by default.

Loading

0 comments on commit 959f032

Please sign in to comment.