Topic Text   Topic Comments (4)   Topic Properties   Topic Information a@a.c...
Topic title: This is a test Tuesday November 17, 2009 18:04:19

Download topic text | View in variable-width font | Tab width set to 8 (change to 4)

Files in topic:  
[Jump to] trunk/reviewboard/htdocs/scripts/rb/widgets.js   {+0,-1}
[Jump to] trunk/reviewboard/htdocs/scripts/reviews.js   {+26,-0}
[Jump to] trunk/reviewboard/reviews/templatetags/reviewtags.py   {+7,-0}
[Jump to] trunk/reviewboard/scmtools/models.py   {+1,-0}
[Jump to] trunk/reviewboard/templates/reviews/review_detail.html   {+2,-1}
[Jump to] trunk/reviewboard/templates/reviews/review_request_box.html   {+3,-1}

[Add General Comment] to topic.

File trunk/reviewboard/htdocs/scripts/rb/widgets.js (Revision 0.1) [Add File Comment] [Top] [>>]
 
Line 331 Line 331
331 } 331 }
332 }); 332 });
333 333
334
335 RB.widgets.AutosizeTextArea = function(el, config) { 334 RB.widgets.AutosizeTextArea = function(el, config) {
336 YAHOO.ext.util.Config.apply(this, config); 335 YAHOO.ext.util.Config.apply(this, config);
337 336
 
File trunk/reviewboard/htdocs/scripts/reviews.js (Revision 0.1) [Add File Comment] [<<] [Top] [>>]
 
Line 54 Line 54
54 this, true); 54 this, true);
55 } 55 }
56 56
57 function registerLinkEditor(field, onComplete) {
58 var editor = new RB.widgets.InlineEditor({
59 el: field,
60 cls: field + '-editor',
61 showEditIcon: true,
62 stripTags: true,
63 notifyUnchangedCompletion: true
64 });
65
66 editor.on('complete',
67 function(editor, value) {
68 onEditComplete(field, value, onComplete);
69 });
70 }
71
57 function registerCommaListEditor(field, onComplete) { 72 function registerCommaListEditor(field, onComplete) {
58 var editor = new RB.widgets.InlineCommaListEditor({ 73 var editor = new RB.widgets.InlineCommaListEditor({
59 el: field, 74 el: field,
 
 
Line 87 Line 102
87 el.dom.innerHTML = str; 102 el.dom.innerHTML = str;
88 } 103 }
89 104
105 function onBranchChanged(el, val) {
106 var str = "";
107 if (gSourceViewerURL != "") {
108 var url = gSourceViewerURL.replace("%s", val);
109 str = '<a href="' + url + '">' + val + '</a>';
110 } else {
111 str = val;
112 }
113 el.dom.innerHTML = str;
114 }
115
90 function onTargetPeopleChanged(el, list) { 116 function onTargetPeopleChanged(el, list) {
91 var str = ""; 117 var str = "";
92 118
 
File trunk/reviewboard/reviews/templatetags/reviewtags.py (Revision 0.1) [Add File Comment] [<<] [Top] [>>]
 
Line 403 Line 403
403 return review_request.repository.bug_tracker % bug_id 403 return review_request.repository.bug_tracker % bug_id
404 404
405 return None 405 return None
406
407 @register.filter
408 def source_url(path, review_request):
409 if review_request.repository.source_viewer:
410 return review_request.repository.source_viewer % path
411
412 return None
 
File trunk/reviewboard/scmtools/models.py (Revision 0.1) [Add File Comment] [<<] [Top] [>>]
 
Line 19 Line 19
19 password = models.CharField(maxlength=128, blank=True) 19 password = models.CharField(maxlength=128, blank=True)
20 tool = models.ForeignKey(Tool) 20 tool = models.ForeignKey(Tool)
21 bug_tracker = models.URLField(verify_exists=False, blank=True) 21 bug_tracker = models.URLField(verify_exists=False, blank=True)
22 source_viewer = models.URLField(verify_exists=False, blank=True)
22 23
23 24
24 def get_scmtool(self): 25 def get_scmtool(self):
 
File trunk/reviewboard/templates/reviews/review_detail.html (Revision 0.1) [Add File Comment] [<<] [Top] [>>]
 
Line 24 Line 24
24 var gUserFullName = "{% firstof user.get_full_name user.username %}"; 24 var gUserFullName = "{% firstof user.get_full_name user.username %}";
25 var gReviewRequestId = "{{review_request.id}}"; 25 var gReviewRequestId = "{{review_request.id}}";
26 var gBugTrackerURL = "{{review_request.repository.bug_tracker}}"; 26 var gBugTrackerURL = "{{review_request.repository.bug_tracker}}";
27 var gSourceViewerURL = "{{review_request.repository.source_viewer}}";
27 </script> 28 </script>
28 {% endblock %} 29 {% endblock %}
29 30
 
 
Line 120 Line 121
120 {% ifequal request.user review_request.submitter %} 121 {% ifequal request.user review_request.submitter %}
121 <script type="text/javascript"> 122 <script type="text/javascript">
122 registerEditor('summary', true); 123 registerEditor('summary', true);
123 registerEditor('branch', false);
124 registerEditor('description', true); 124 registerEditor('description', true);
125 registerEditor('testing_done', true); 125 registerEditor('testing_done', true);
126 registerLinkEditor('branch', onBranchChanged);
126 registerCommaListEditor('bugs_closed', onBugsChanged); 127 registerCommaListEditor('bugs_closed', onBugsChanged);
127 registerCommaListEditor('target_groups', onTargetGroupsChanged); 128 registerCommaListEditor('target_groups', onTargetGroupsChanged);
128 registerCommaListEditor('target_people', onTargetPeopleChanged); 129 registerCommaListEditor('target_people', onTargetPeopleChanged);
 
File trunk/reviewboard/templates/reviews/review_request_box.html (Revision 0.1) [Add File Comment] [<<] [Top]
 
Line 24 Line 24
24 </tr> 24 </tr>
25 <tr> 25 <tr>
26 <td class="label"><label for="branch">Branch:</label></td> 26 <td class="label"><label for="branch">Branch:</label></td>
27 <td class="value"><span id="branch">{{review_request_details.branch}}</span></td> 27 <td class="value"><span id="branch">
28 {% if review_request.repository.source_viewer %}<a href={{review_request_details.branch|source_url:review_request}}>{{review_request_details.branch}}</a>{% else %}{{review_request_details.branch}}{% endif %}
29 </span></td>
28 <td class="indented label"><label for="target_groups">Groups:</label></td> 30 <td class="indented label"><label for="target_groups">Groups:</label></td>
29 <td class="value"><span id="target_groups"> 31 <td class="value"><span id="target_groups">
30 {% for group in review_request_details.target_groups.all %} 32 {% for group in review_request_details.target_groups.all %}
 
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.