#9282: indication unchanged when filter updated (and minor changes to css)
diff --git a/trac/htdocs/css/timeline.css b/trac/htdocs/css/timeline.css
|
a
|
b
|
|
| 15 | 15 | margin-left: 1em; |
| 16 | 16 | } |
| 17 | 17 | dl.unread { |
| 18 | | margin-left: 0.55em; |
| 19 | | border-left: 0.2em solid #c0f0c0; |
| | 18 | margin-left: 0.3em; |
| | 19 | border-left: 0.35em solid #c0f0c0; |
| 20 | 20 | padding-left: 0.35em; |
| 21 | 21 | } |
| 22 | 22 | |
| … |
… |
|
| 43 | 43 | dt.highlight { background-color: #ffa; } |
| 44 | 44 | dd { |
| 45 | 45 | font-size: 80%; |
| 46 | | margin: 0 0 .75em 5.5em; |
| | 46 | margin: 0 0 .75em 6em; |
| 47 | 47 | padding: 0; |
| 48 | 48 | color: #776; |
| 49 | 49 | } |
diff --git a/trac/timeline/templates/timeline.html b/trac/timeline/templates/timeline.html
|
a
|
b
|
|
| 26 | 26 | <input type="checkbox" name="${filter.name}" |
| 27 | 27 | checked="${filter.enabled or None}"/> ${filter.label} |
| 28 | 28 | </label> |
| | 29 | <input type="hidden" name="lastread" value="$lastread" /> |
| 29 | 30 | </fieldset> |
| 30 | 31 | <div class="buttons"> |
| 31 | 32 | <input type="submit" name="update" value="${_('Update')}" /> |
diff --git a/trac/timeline/web_ui.py b/trac/timeline/web_ui.py
|
a
|
b
|
|
| 147 | 147 | filters = [f[0] for f in available_filters if test(f)] |
| 148 | 148 | |
| 149 | 149 | # save the results of submitting the timeline form to the session |
| | 150 | filter_updated = False |
| 150 | 151 | if 'update' in req.args: |
| 151 | 152 | for filter in available_filters: |
| 152 | 153 | key = 'timeline.filter.%s' % filter[0] |
| 153 | 154 | if filter[0] in req.args: |
| | 155 | filter_updated = filter_updated or key not in req.session |
| 154 | 156 | req.session[key] = '1' |
| 155 | 157 | elif key in req.session: |
| | 158 | filter_updated = True |
| 156 | 159 | del req.session[key] |
| 157 | 160 | |
| | 161 | # new events indication unchanged when any filter was changed |
| | 162 | if filter_updated: |
| | 163 | data['lastread'] = int(req.args.get('lastread')) |
| | 164 | |
| 158 | 165 | stop = fromdate |
| 159 | 166 | start = stop - timedelta(days=daysback + 1) |
| 160 | 167 | |