|
|
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
|
d6efaa91e967
|
6 years ago
|
|
|
|
|
Mads Kiilerich
|
f4e158ed49b1
|
6 years ago
|
|
|
|
|
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'`
|
|
|
domruf
|
3fca87aa2b15
|
8 years ago
|
|
templates: don't use ordinary elements as links or buttons by adding btn styling
Bootstrap recommends using <button>, so most of the time we should use that.
Extracted by Mads Kiilerich.
|
|
|
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
|
9d34bea3059d
|
8 years ago
|
|
|
|
|
domruf
|
7d86b9876ac9
|
9 years ago
|
|
auth: refactor auth plugin importing - rename enabled_plugin to enabled_plugin_names
Patch modified by Mads Kiilerich.
|
|
|
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
|
782db8fc95ea
|
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
|
50e9a5b61c59
|
9 years ago
|
|
style: drop 'select' class inside 'form-group'
Temporarily, just apply styling to div inside form-group. Also, 'radios' is gone.
Based on work by Dominik Ruf.
|
|
|
Mads Kiilerich
|
951004d57e3f
|
9 years ago
|
|
style: drop 'checkboxes' class inside 'form-group'
Temporarily, just apply styling to div inside form-group. Also, 'radios' is gone.
Based on work by Dominik Ruf.
|
|
|
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.
|
|
|
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
|
68d3315c48d4
|
9 years ago
|
|
|
|
|
Mads Kiilerich
|
d1923cd0521c
|
9 years ago
|
|
style: refactor form label styling to prepare for Bootstrap and get rid of wrapping with 'label' class
Based on work by Dominik Ruf.
|
|
|
Mads Kiilerich
|
d27572fa323c
|
9 years ago
|
|
style: put all admin form buttons in a form-group, as our future Bootstrap likes it
Based on work by Dominik Ruf.
|
|
|
Mads Kiilerich
|
4304595d246c
|
9 years ago
|
|
style: in preparation for Bootstrap, refactor to use Bootstrap compatible form class names
Based on work by Dominik Ruf.
Mostly:
sed -i \ -e 's,<table>,<table class="table">,g' \ -e 's,<div class="fields">,<div class="form-horizontal">,g' \ -e 's,<div class="field">,<div class="form-group">,g' \ -e 's,<label for="\([^"]*\)">,<label class="control-label" for="\1">,g' \ `hg mani`
cat kallithea/public/css/style.css | \ sed -e '/\.fields\>/{p;s/\.fields/.form-horizontal/g}' | \ sed -e '/\.fields\>/s/ {$/,/g' | \ sed -e '/\.field\>/{p;s/\.field\>/.form-group/g}' | \ sed -e '/\.field\>/s/ {$/,/g' | \ sed -e '/\.fields\>.*\.form-group\>/d' | \ sed -e '/\.form-horizontal\>.*\.field\>/d ' | \ cat - > kallithea/public/css/style.css.tmp mv kallithea/public/css/style.css.tmp kallithea/public/css/style.css
|
|
|
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`
|
|
|
domruf
|
b7654d1675da
|
9 years ago
|
|
style: in preparation for bootstrap, use bootstrap compatible button class names
Give all buttons a styling (default, success, danger, warning) and rename the sizes to sm and xs.
This is a subset of a bigger changeset. The subset was extracted by Mads Kiilerich, mostly by:
sed -i \ -e 's,btn btn-small,btn btn-default btn-sm,g' \ -e 's,btn btn-mini,btn btn-default btn-xs,g' \ -e 's,btn-default btn-\(xs\|sm\) btn-\(success\|danger\|warning\),btn-\2 btn-\1,g' \ -e 's,class_="btn",class_="btn btn-default",g' \ `hg mani`
|
|
|
Andrew Shadura
|
e2fb29be0681
|
10 years ago
|
|
templates: use a better class name for an enabled toggle button
"btn-success" is rather a poor choice for a class applied when the button is active, "active" is better for that. A side effect of the change is that "Enabled" is now shown in bold.
|
|
|
Andrew Shadura
|
24d5af811027
|
10 years ago
|
|
|
|
|
Søren Løvborg
|
ac3164ba8e13
|
10 years ago
|
|
|
|
|
Søren Løvborg
|
46011fe63e75
|
10 years ago
|
|
AuthSettingsController: don't add auth settings to tmpl_context
Do not import auth setting into the template context, since the values are not actually used, except for 'auth_plugins'.
For 'auth_plugins', use the existing (and identical) 'enabled_plugins' attribute instead.
|
|
|
Søren Løvborg
|
04798ed1e1a7
|
10 years ago
|
|
AuthSettingsController: rename dictionary key for consistency
Rename 'auth_plugins_shortnames' to 'plugin_shortnames' for consistency with 'plugin_settings', and to emphasize that it's not one of the values retrieved from the database using get_auth_settings (all of which start with 'auth_').
|
|
|
Mads Kiilerich
|
5c6cc20d224b
|
11 years ago
|
|
spelling: fix title casing on translated template strings
Primarily texts.
|
|
|
Mads Kiilerich
|
54de85a17b2b
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
3b4f38277365
|
11 years ago
|
|
templates: drop autocomplete="off" - it is ignored by browsers
This is annoying for admin when setting passwor for other users - we will have to do that in some other way.
|
|
|
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
|
|
|
|
|
Andrew Shadura
|
b5d899e51ffe
|
11 years ago
|
|
|
|
|
Takumi IINO
|
b2e27f922f40
|
11 years ago
|
|
|
|
|
Mads Kiilerich
|
6eafa1e06d71
|
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.
|