1 [%# The contents of this file are subject to the Mozilla Public
2 # License Version 1.1 (the "License"); you may not use this file
3 # except in compliance with the License. You may obtain a copy of
4 # the License at http://www.mozilla.org/MPL/
6 # Software distributed under the License is distributed on an "AS
7 # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
8 # implied. See the License for the specific language governing
9 # rights and limitations under the License.
11 # The Original Code is the Bugzilla Bug Tracking System.
13 # The Initial Developer of the Original Code is Netscape Communications
14 # Corporation. Portions created by Netscape are
15 # Copyright (C) 1998 Netscape Communications Corporation. All
18 # Contributor(s): Myk Melez <myk@mozilla.org>
21 [% PROCESS global/variables.none.tmpl %]
26 <title>Rietveld review patch #[% attachment.id %] for [% terms.Bug %] #[% attachment.bug_id %]: [% bugsummary FILTER html %]</title>
27 <script type="text/javascript">
30 * Handle the postMessage response from Rietveld.
31 * The response will be the comments to combine with those left in the
34 function updateComments(e)
36 if (e.origin == 'http://wkrietveld.appspot.com') {
37 var reviewFormDoc = document.getElementById('reviewFormFrame').
39 // Add the Rietveld comments to the comments field.
41 var commentBox = reviewFormDoc.getElementById('comment');
44 commentBox.value += '\n---------------------------------\n';
45 commentBox.value += e.data;
47 reviewFormDoc.forms[0].submit();
52 * Fetch comments from Rietveld via postMessage.
54 function getComments()
56 document.getElementById('rietveldFrame').contentWindow.
57 postMessage('publish', 'http://wkrietveld.appspot.com');
60 // Listen for messages from Rietveld.
61 if (window.postMessage)
62 window.addEventListener("message", updateComments, false);
64 alert('Error: Please load this page in a browser that supports postMessage');
69 [%# We shouldn't ever hit this, since all links to this page use GoAheadAndLogIn.
70 This is just here as a safeguard if anyone directly navigates to it. %]
71 Please log in and refresh this page.
73 <frameset rows="80%,20%">
74 <frame id=rietveldFrame src="http://wkrietveld.appspot.com/[% attachment.bug_id %]?email=[% user.login %]">
75 <frame id=reviewFormFrame src="attachment.cgi?id=[% attachment.id %]&action=reviewform&rietveldreview=true">