|
|
Mads Kiilerich
|
462064bd9489
|
5 years ago
|
|
|
|
|
Mads Kiilerich
|
19d93bd709bf
|
6 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
|
919cebd1073c
|
8 years ago
|
|
templates: use bootstrap grid system for centered panels (login page etc.)
The bootstrap grid system rearranges the elements so that the pages look good an small screens as well. (i.e. no vertical scrolling)
|
|
|
Mads Kiilerich
|
efba9f77d48f
|
8 years ago
|
|
login: drop the big lock icon - just put a small one in the header
It is too much trouble to try to make a nice graphical element out of it.
|
|
|
domruf
|
1433199fb0f5
|
8 years ago
|
|
|
|
|
domruf
|
7e22d42320cd
|
8 years ago
|
|
style: be consistent and don't use col-*-* classes
In order to not show overlap the lock icon also change its positioning style.
|
|
|
Mads Kiilerich
|
ee3343f3658f
|
8 years ago
|
|
style: drop form-horizontal - our style is much closer to plain Bootstrap forms
form-horizontal is made for grid markup. It give form-groups a negative margin to break out of the grid ... but the way we use it for settings, we have to do weird things to undo that. The default styling for forms is much closer to what we want. It looks ok without our custom styling and is easier to style to our style.
If we want grid markup with form-horizontal, it would be correct to re-introduce both at once.
|
|
|
Mads Kiilerich
|
1f02a239c23c
|
9 years ago
|
|
style: use panel, panel-heading, panel-title, panel-body and settings
This imply lots of tweaking of header handling and panel spacing.
Not converted yet: codeblock code-header code-body.
Based on work by Dominik Ruf.
|
|
|
Mads Kiilerich
|
ba18d1f6d081
|
9 years ago
|
|
style: refactor panel headings - use pull-left and pull-right and introduce clearfix like Bootstrap
Based on work by Dominik Ruf.
|
|
|
Mads Kiilerich
|
8656c0073e17
|
9 years ago
|
|
|
|
|
Mads Kiilerich
|
9447a8b26da0
|
9 years ago
|
|
style: consistently use label markup wrapping around input elements
The 'for="..."' markup is error prone.
|
|
|
Mads Kiilerich
|
dd42c2ad28d7
|
9 years ago
|
|
style: drop 'input' class inside 'form-group'
As long as we use the old styling, just apply styling to div inside form-group.
Based on work by Dominik Ruf.
|
|
|
Mads Kiilerich
|
2e1f40e605b0
|
9 years ago
|
|
style: drop unused 'focus' class - controls should be 'form-control' instead
Based on work by Dominik Ruf.
|
|
|
domruf
|
67e53a272e1a
|
9 years ago
|
|
templates: use Bootstrap compatible 'form-control' name instead of 'medium' & co
In Bootstrap, form controls tend to be 100%.
|
|
|
Mads Kiilerich
|
b75d11abd208
|
9 years ago
|
|
login: clarify "Remember be" checkbox - it controls if session should expire with browser session or at timeout
Hint that it is related to cookie expires attribute.
|
|
|
Søren Løvborg
|
b537babcf966
|
10 years ago
|
|
login: include query parameters in came_from
The login controller uses the came_from query argument to determine the page to continue to after login.
Previously, came_from specified only the URL path (obtained using h.url.current), and any URL query parameters were passed along as separate (additional) URL query parameters; to obtain the final redirect target, h.url was used to combine came_from with the request.GET.
As of this changeset, came_from specifies both the URL path and query string (obtained using request.path_qs), which means that came_from can be used directly as the redirect target (as always, WebOb handles the task of expanding the server relative path to a fully qualified URL). The mangling of request.GET can also be removed.
The login code appended arbitrary, user-supplied query parameters to URLs by calling the Routes URLGenerator (h.url) with user-supplied keyword arguments. This construct is unfortunate, since url only appends _unknown_ keyword arguments as query parameters, and the parameter names could overlap with known keyword arguments, possibly affecting the generated URL in various ways. This changeset removes this usage from the login code, but other instances remain.
(In practice, the damage is apparently limited to causing an Internal Server Error when going to e.g. "/_admin/login?host=foo", since WebOb returns Unicode strings and URLGenerator only allows byte strings for these keyword arguments.)
|
|
|
Mads Kiilerich
|
b98f4431671c
|
10 years ago
|
|
login: inline _redirect_to_origin
Refactor to simplify code and make next changes simpler.
Let the controller handle came_from early and more explicit, thus simplifying the redirect flow.
|
|
|
Thomas De Schampheleire
|
4c5c59b96adc
|
11 years ago
|
|
login: preserve GET arguments throughout login redirection (issue #104)
When redirecting a user to the login page and while handling this login and redirecting to the original page, the GET arguments passed to the original URL are lost through the login redirection process.
For example, when creating a pull request for a specific revision from the repository changelog, there are rev_start and rev_end arguments passed in the URL. Through the login redirection, they are lost.
Fix the issue by passing along the GET arguments to the login page, in the login form action, and when redirecting back to the original page. Tests are added to cover these cases, including tests with unicode GET arguments (in URL encoding).
|
|
|
Andrew Shadura
|
7a5db341a942
|
11 years ago
|
|
style: make the login page Bootstrap-ready
Change the template to use CSS classes names compatible with what Bootstrap provides. That would allow the login page to have sane appearance with Bootstrap CSS immediately.
The template changes also remove extra vertical space between the ‘Log in’ button and extra links at the bottom for the sake of having a simpler markup.
|
|
|
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
|
|
|
|
|
Mads Kiilerich
|
72bf89475004
|
11 years ago
|
|
styling: don't loop on loading kallithea-logo.png after kallithea-logo.svg failed
Bad configuration of static files or static_files=false could make the page loop when trying to apply the svg/png fallback.
Instead, let the error handler remove itself when it is used the first time.
|
|
|
Sean Farley
|
f6d278d6baed
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
34a7bec2c525
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
6f87a5ae84b7
|
11 years ago
|
|
|
|
|
Takumi IINO
|
b5e4758460f0
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
e271a8766951
|
11 years ago
|
|
javascript: replace YUE.onDOMReady with $(document).ready
Different execution order of YUE.onDOMReady and $(document).ready makes it hard to do gradually.
|
|
|
Sean Farley
|
dd8f8f5895b2
|
11 years ago
|
|
|
|
|
Bradley M. Kuhn
|
24c0d584ba86
|
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.
|