|
|
Mads Kiilerich
|
19d93bd709bf
|
5 years ago
|
|
html: put 'use strict' on separate lines
use.py: import re import sys for fn in sys.argv[1:]: with open(fn) as f: s = f.read() s = re.sub(r'''(<script>)('use strict';)\n( *)''', r'''\1\n\3\2\n\3''', s) with open(fn, 'w') as f: f.write(s)
python use.py $(hg loc 'kallithea/templates/**.html')
|
|
|
Mads Kiilerich
|
fb9550946c26
|
6 years ago
|
|
js: use strict ... and fix the problems it points out
"use strict" gives stricter checks, both statically and at runtime. The strictness tightens up the code and prevents some kinds of problems.
The <script> tag addition might not be pretty, but has consistently been added with:
sed -i 's,<script>$,&'"'"'use strict'"'"';,g' `hg loc '*.html'`
|
|
|
Mads Kiilerich
|
1f3e993156e4
|
6 years ago
|
|
|
|
|
domruf
|
1ab38cd72704
|
9 years ago
|
|
template: use Bootstrap tooltips and popover instead of handmade tooltips
Based on work from Andrew Shadura <andrew@shadura.me>.
Further modified by Mads Kiilerich.
show_changeset_tooltip is merged into tooltip_activate.
|
|
|
Mads Kiilerich
|
d99afb88579e
|
9 years ago
|
|
style: rename div.table to Bootstrap .panel-body
Based on work by Dominik Ruf.
|
|
|
Mads Kiilerich
|
8656c0073e17
|
9 years ago
|
|
|
|
|
Mads Kiilerich
|
33ca6d0f7058
|
9 years ago
|
|
style: introduce "clearfix" class where the Bootstrap migration will need it
Based on work by Dominik Ruf.
|
|
|
domruf
|
ee3fb2dfbcc0
|
9 years ago
|
|
style: in preparation for bootstrap, replace kallithea title class with bootstrap compatible panel-heading
This is a subset of a bigger changeset. The subset was extracted by Mads Kiilerich, mostly by:
sed -i 's,<div class="title\>,<div class="panel-heading,g' `hg mani` sed -i 's,\<div\.title\>,div.panel-heading,g' kallithea/public/css/style.css
|
|
|
domruf
|
80a15e10857a
|
9 years ago
|
|
style: in preparation for bootstrap, replace kallithea box with bootstrap compatible panel
This is a subset of a bigger changeset. The subset was extracted by Mads Kiilerich, mostly by:
sed -i \ -e 's,<div\(.*\) class="box",<div\1 class="panel panel-primary",g' \ `hg mani`
|
|
|
Mads Kiilerich
|
2881dd265f21
|
11 years ago
|
|
templates: only bind pager event handlers once - avoid "leaks" and repeated page loads
Summary page ended up hammering the server and when pages were loaded one time extra for each paging click.
Just moving javascript code from the data template (where it would be re-run on each paging) and to the main page template.
|
|
|
Thomas De Schampheleire
|
a40824531f68
|
11 years ago
|
|
controllers: don't pass rendered templates in context variables Some controllers used the followifng pattern: - render a data template into a context variable - for partial (ajax) requests, return the contents of this variable - for full-page requests, render the full page, which expands the value of the context variable Instead, avoid context variables let the controller simply render the full or partial page, and let the full page template include the partial page. Remove this context variable for templating and use render exclusively. From templates, use %include instead of context variables. This in line with the suggestions in the Pylons documentation: http://pylons-webframework.readthedocs.org/en/latest/helpers.html#partial-updates-with-ajax
|
|
|
Thomas De Schampheleire
|
3a3ec35466e7
|
11 years ago
|
|
templates: move site branding in page title to base template
Instead of repeating the same three lines in each and every template, move it to the base template.
|
|
|
Mads Kiilerich
|
37354e1ab283
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
ec39e73be935
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
a540f7e69c82
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
d1addaf7a91e
|
11 years ago
|
|
Second step in two-part process to rename directories. This is the actual directory rename.
|