[dw-free] Page title should not change to just "Post comment" on the post comment (?mode=r
[commit: http://hg.dwscoalition.org/dw-free/rev/0f5715b82c54]
http://bugs.dwscoalition.org/show_bug.cgi?id=2840
Include the entry subject in the window title when replying, for easier
identification of tabs.
Patch by
tyggerdev.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2840
Include the entry subject in the window title when replying, for easier
identification of tabs.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/s2layers/core2.s2
- htdocs/talkpost.bml
- htdocs/talkpost.bml.text
-------------------------------------------------------------------------------- diff -r 069e4004c565 -r 0f5715b82c54 bin/upgrading/s2layers/core2.s2 --- a/bin/upgrading/s2layers/core2.s2 Wed Oct 13 11:26:44 2010 +0800 +++ b/bin/upgrading/s2layers/core2.s2 Wed Oct 13 12:17:23 2010 +0800 @@ -3395,7 +3395,7 @@ function EntryPage::view_title() : strin return $.entry.subject ? $.entry->get_plain_subject() : $*text_nosubject; } function ReplyPage::view_title() : string { - return $*text_comment_reply; + return $.entry->get_plain_subject() + " (" + $*text_comment_reply + ")"; } function Page::title() [notags] : string { return $this->view_title(); diff -r 069e4004c565 -r 0f5715b82c54 htdocs/talkpost.bml --- a/htdocs/talkpost.bml Wed Oct 13 11:26:44 2010 +0800 +++ b/htdocs/talkpost.bml Wed Oct 13 12:17:23 2010 +0800 @@ -17,7 +17,7 @@ body<= <?_code { use strict; - use vars qw($head %FORM %ML %GET); + use vars qw($head %FORM %ML %GET $title_user $title_subject); $head = ""; # not local, used to build <link> tags @@ -69,6 +69,8 @@ body<= my $u = $init->{'journalu'}; return $ML{'talk.error.nojournal'} unless $u; + + $title_user = $u->user; $r->notes->{journalid} = $u->{'userid'}; return $LJ::MSG_READONLY_USER if $u->is_readonly; @@ -318,6 +320,7 @@ body<= BML::ebml(\$cleansubject); } $ret .= "<div id='entrysubj'>$cleansubject</div><br />\n"; + $title_subject = LJ::strip_html($cleansubject); } $ret .= $event; @@ -396,5 +399,5 @@ head<= <?_code return $head _code?> <?_code return (! $LJ::REQ_HEAD_HAS{'chalresp_js'}++) ? $LJ::COMMON_CODE{'chalresp_js'} : ""; _code?> <=head -windowtitle=><?_ml /talkpost.bml.title _ml?> +windowtitle=> <?_code "$title_user : $title_subject $ML{'.title'}" _code?> page?> diff -r 069e4004c565 -r 0f5715b82c54 htdocs/talkpost.bml.text --- a/htdocs/talkpost.bml.text Wed Oct 13 11:26:44 2010 +0800 +++ b/htdocs/talkpost.bml.text Wed Oct 13 12:17:23 2010 +0800 @@ -93,7 +93,7 @@ .postresponse=Post a comment in response: -.title=Post Comment +.title=(Reply) .usermismatch<< You have entered a username, but you have deselected the 'LiveJournal user' option. --------------------------------------------------------------------------------