Merge lp:~christopher-bradshaw-b/tiqit/dev into lp:tiqit

Proposed by Christopher Bradshaw
Status: Merged
Approved by: Sam Stoll
Approved revision: 10
Merged at revision: 10
Proposed branch: lp:~christopher-bradshaw-b/tiqit/dev
Merge into: lp:tiqit
Diff against target: 107 lines (+33/-20)
4 files modified
scripts/pages/prefs.py (+2/-0)
scripts/tiqit/__init__.py (+10/-2)
static/scripts/filter.js (+2/-2)
static/scripts/multiedit.js (+19/-16)
To merge this branch: bzr merge lp:~christopher-bradshaw-b/tiqit/dev
Reviewer Review Type Date Requested Status
Sam Stoll Approve
Review via email: mp+278329@code.launchpad.net

Commit message

Adding disable double-click-to-edit preference.
Grouping by field.name instead of field.shortname when adding a column. This fixes the bug where fields like "Activity-when-found" couldn't be grouped.
Errors truncated to 3000 characters to stop internal server error when very long summaries are submitted.

Description of the change

Adding disable double-click-to-edit preference.
Grouping by field.name instead of field.shortname when adding a column. This fixes the bug where fields like "Activity-when-found" couldn't be grouped.
Errors truncated to 3000 characters to stop internal server error when very long summaries are submitted.

To post a comment you must log in.
Revision history for this message
Matthew Hall (matt.hall) :
Revision history for this message
Christopher Bradshaw (christopher-bradshaw-b) :
Revision history for this message
Ensoft Patch Lander (ensoft-lander) wrote :

Voting does not meet specified criteria. Required: Approve >= 1, Disapprove == 0. Got: 1 Pending.

lp:~christopher-bradshaw-b/tiqit/dev updated
10. By Christopher Bradshaw <email address hidden>

Reverting changes to clear button on bug view page

Revision history for this message
Sam Stoll (samstoll1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/pages/prefs.py'
2--- scripts/pages/prefs.py 2015-12-14 16:49:02 +0000
3+++ scripts/pages/prefs.py 2016-01-18 16:01:00 +0000
4@@ -261,6 +261,8 @@
5 "Suppress automatically refresh of search results every 30 minutes."),
6 print prefs.printBool("miscHidePerRowAutoUpdateClear",
7 "Don't allow marked changes to be cleared individually for each bug."),
8+print prefs.printBool("miscDisableDblclkEdit",
9+ "Disable double-click-to-edit."),
10 print '\n'.join(plugins.printSearchPrefs(prefs))
11
12 print """</table>
13
14=== modified file 'scripts/tiqit/__init__.py' (properties changed: +x to -x)
15--- scripts/tiqit/__init__.py 2016-01-18 15:12:24 +0000
16+++ scripts/tiqit/__init__.py 2016-01-18 16:01:00 +0000
17@@ -640,6 +640,7 @@
18 'miscNeverAutoRefreshResults': 'false',
19 'miscHidePerRowAutoUpdateClear': 'false',
20 'miscHideWatermark': 'false',
21+ 'miscDisableDblclkEdit': 'false',
22 'miscToolbar': 'both',
23 'miscMaxAutoloadSize': '10485760',
24 'miscAlwaysFullView': 'false',
25@@ -1310,8 +1311,15 @@
26 Exception.__init__(self)
27 self.type = type
28 self.msg = msg
29- self.output = output
30- self.cmd = cmd
31+ if len(output) > 3000:
32+ self.output = output[:3000] + \
33+ "...(truncated)', which is longer than allowed length"
34+ else:
35+ self.output = output
36+ if len(cmd) > 3000:
37+ self.cmd = cmd[:3000] + "...(truncated)'"
38+ else:
39+ self.cmd = cmd
40
41 class TiqitError(TiqitException):
42 def __init__(self, msg='', output='', cmd=''):
43
44=== modified file 'static/scripts/filter.js'
45--- static/scripts/filter.js 2014-06-05 14:38:53 +0000
46+++ static/scripts/filter.js 2016-01-18 16:01:00 +0000
47@@ -128,10 +128,10 @@
48 // If there's a grouper, then we need to add an entry there too
49 if (filters.grouper) {
50 var opt = document.createElement('option');
51- opt.value = field.shortname;
52+ opt.value = field.name;
53 opt.appendChild(document.createTextNode(opt.value));
54
55- filters.grouper[field.shortname] = opt;
56+ filters.grouper[field.name] = opt;
57 filters.grouper.appendChild(opt);
58 selectSort(filters.grouper);
59 }
60
61=== modified file 'static/scripts/multiedit.js'
62--- static/scripts/multiedit.js 2014-06-05 14:38:53 +0000
63+++ static/scripts/multiedit.js 2016-01-18 16:01:00 +0000
64@@ -42,25 +42,28 @@
65 }
66 }
67
68- // Add a double click event handler
69- tables[i].addEventListener('dblclick', function(event) {
70- var cell = getAncestorOfType(event.target, 'TD');
71- if (cell) {
72- var row = getAncestorOfType(cell, 'TR');
73- if (!row.tiqitSaving) {
74- var table = getAncestorOfType(row, 'TABLE');
75- var colIndex = cell.cellIndex;
76- var field = table.tHead.rows[0].cells[colIndex].getAttribute('field');
77- if (contains(allEditableFields, field)) {
78- if (cell.tiqitEditing) {
79- stopEditingCell(row, cell, field);
80- } else {
81- startEditingCell(row, cell, field);
82+ // Add a double click event handler unless disabled in preferences
83+ if (Tiqit.prefs['miscDisableDblclkEdit'] == undefined ||
84+ Tiqit.prefs['miscDisableDblclkEdit'] == 'false') {
85+ tables[i].addEventListener('dblclick', function(event) {
86+ var cell = getAncestorOfType(event.target, 'TD');
87+ if (cell) {
88+ var row = getAncestorOfType(cell, 'TR');
89+ if (!row.tiqitSaving) {
90+ var table = getAncestorOfType(row, 'TABLE');
91+ var colIndex = cell.cellIndex;
92+ var field = table.tHead.rows[0].cells[colIndex].getAttribute('field');
93+ if (contains(allEditableFields, field)) {
94+ if (cell.tiqitEditing) {
95+ stopEditingCell(row, cell, field);
96+ } else {
97+ startEditingCell(row, cell, field);
98+ }
99 }
100 }
101 }
102- }
103- }, false);
104+ }, false);
105+ }
106 }
107 }
108

Subscribers

People subscribed via source and target branches