Permalink
Browse files

For admins only, add a 'note' signal in hose entry titles

It's not a button, just a flag.
  • Loading branch information...
1 parent 6f44367 commit a259a6ce36c3d176e84d3a544fd486c638f3e701 @scc committed Aug 21, 2008
@@ -332,7 +332,7 @@ function firehose_save_note(id) {
var $entry = $('#firehose-'+id);
var note_text = $entry.find('#note-input-'+id).val();
- $entry.find('.note-wrapper')[note_text ? 'removeClass' : 'addClass']('no-note');
+ $entry.find('.note-flag, .note-wrapper').toggleClassTo('no-note', !note_text);
ajax_update({
op: 'firehose_save_note',
@@ -899,6 +899,16 @@ function firehose_init_tagui( $new_entries ){
if ( fh_is_admin ) {
this.command_pipeline.push(firehose_handle_admin_commands);
+
+ var $note_flag = $this.find('.title h3').
+ append('<span class="note-flag">note</span>').
+ find('.note-flag').
+ attr('title', "don't click; I am not a button");
+
+ var $note_wrapper = $this.find('.note-wrapper');
+ if ( ! $note_wrapper.length || $note_wrapper.hasClass('no-note') ) {
+ $note_flag.addClass('no-note');
+ }
}
this.command_pipeline.push(
@@ -364,7 +364,7 @@ div.tag-display {
}
.tag-widget .admin-buttons {
- padding-right: 2.7em;
+ padding-right: 0.7em;
}
.tag-widget .admin-buttons .note-input {
@@ -433,3 +433,12 @@ div.article div.title div.nod-nix-reasons span.tag {
.nod-nix-reasons .tag-display:hover ul {
background-color: inherit;
}
+
+.note-flag {
+ position: absolute;
+ right: 6em;
+}
+
+.note-flag.no-note {
+ opacity: 0;
+}
@@ -49,7 +49,7 @@ __template__
[%# the note button %]
<span class="admin-note">
<a id="note-text-[% item.id %]" href="#" onclick="firehose_open_note('[% item.id %]'); return false">
- [%- IF !item.note %]N[% END -%][% item.note | strip_literal -%]
+ [%- IF !item.note %]Note[% END -%][% item.note | strip_literal -%]
</a>
</span>
</div>

0 comments on commit a259a6c

Please sign in to comment.