From 9ce72f3cbb8e86d20f397d735e72272413024359 Mon Sep 17 00:00:00 2001 From: johanko Date: Tue, 26 Jan 2016 23:39:06 +0100 Subject: [PATCH 1/5] Remove label, add placeholder Removes label from search input and adds placeholder. --- corputils/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corputils/forms.py b/corputils/forms.py index 969b5d24..dad21d09 100644 --- a/corputils/forms.py +++ b/corputils/forms.py @@ -12,4 +12,4 @@ class SelectCorpForm(forms.Form): corpid = forms.ChoiceField(corpnamelist, required=True, label="Corporation") class CorputilsSearchForm(forms.Form): - search_string = forms.CharField(max_length=254, required=True, label="Search String") + search_string = forms.CharField(max_length=254, required=True, label="", widget=forms.TextInput(attrs={'placeholder': 'Search characters...'})) From 5635d82251e26e2c6500e3dfff545fe8cc3f2edc Mon Sep 17 00:00:00 2001 From: johanko Date: Tue, 26 Jan 2016 23:41:21 +0100 Subject: [PATCH 2/5] Template changes Check if progressbar has the "logic" we want. --- stock/templates/registered/corputils.html | 255 ++++++++++++---------- 1 file changed, 141 insertions(+), 114 deletions(-) diff --git a/stock/templates/registered/corputils.html b/stock/templates/registered/corputils.html index b8678029..46a589df 100644 --- a/stock/templates/registered/corputils.html +++ b/stock/templates/registered/corputils.html @@ -12,118 +12,172 @@ {% if perms.auth.corputils %}
{% if corp %} -
Corporation
-
-
-
+
+
+ +
+
+

{{ corp.corporation_name }}

-
-

Name: {{ corp.corporation_name }}

+

Ticker: {{ corp.corporation_ticker }}

-

Ticker: {{ corp.corporation_ticker }}

+

Member count: {{ corp.member_count }}

-

Member count: {{ corp.member_count }}

+

Player count: {{characters_with_api|length}}

-

Player count: {{characters_with_api|length}}

- -

Unregistered characters: {{characters_without_api|length}}

-
-
- - {% if membercorp_list %} - - {% endif %} - - +

Unregistered characters: {{characters_without_api|length}}

+
+
+ API Index: +
+
+ {{characters_with_api|length}}/{{ corp.member_count }} +
+
+
- - -
-
-
Registered Characters
+ + +
+
+ {% if characters_with_api %}
-
- +
+
- - - - + + + + + {% for maincharname, player in characters_with_api %} - - - - - - - {% endfor %} - {% for character_name, character_id in characters_without_api %} - - - - - - + + + + + + + {% endfor %}
Main characterMain corporationCharacter listMain characterKillboardMain corporationCharacter list
- - -

{{ maincharname }}

-
-

{{ player.maincorp }}

-
- {% for char in player.altlist %} -

{{ char.character_name }}

- {% endfor %} -
- - -

{{ character_name }}

-
-

-
-

No API registered!

-
+ + +

{{ maincharname }}

+
+ Killboard + + {% if not corp.corporation_name == player.maincorp%} + + {{ player.maincorp }} + + {% else %} + + {{ player.maincorp }} + + {% endif %} + + {% for char in player.altlist %} +

{{ char.character_name }}

+ {% endfor %} +
+ {% else %} + + {% endif %} +
+
+ {% if characters_without_api %} +
+
+ + + + + + + + {% for character_name, character_id in characters_without_api %} + + + + + + + {% endfor %} +
CharacterKillboardAPI
+ + +

{{ character_name }}

+
+ Killboard + + No API registered! +
+
+
+ {% else %} + + {% endif %}
- {% else %} -
-
-
- -
+ {% else %} +
+
+
+
- {% endif %}
+ {% endif %} +
{% else %} {% if IS_CORP %} @@ -132,31 +186,4 @@ {% endif %} {% endif %}
- - {% if perms.auth.corputils %} - - - {% endif %} -{% endblock content %} \ No newline at end of file +{% endblock content %} From 0bb7cc9ae18faddfe429fda643f6b2a3340d6429 Mon Sep 17 00:00:00 2001 From: johanko Date: Tue, 26 Jan 2016 23:45:55 +0100 Subject: [PATCH 3/5] Template changes Moved searchform to navbar --- .../registered/corputilssearchview.html | 95 ++++++++----------- 1 file changed, 41 insertions(+), 54 deletions(-) diff --git a/stock/templates/registered/corputilssearchview.html b/stock/templates/registered/corputilssearchview.html index 42d882e8..78f2ec96 100644 --- a/stock/templates/registered/corputilssearchview.html +++ b/stock/templates/registered/corputilssearchview.html @@ -8,63 +8,50 @@ {% block extra_css %}{% endblock extra_css %} {% block content %} -
+
{% if perms.auth.corputils %} -

Member Search Results -
- - -
-

-
- - - - - - {% for member in members %} - - - - - {% endfor %} -
CharacterMain Character
{{ member.name }} - {% if member.api_registered%} - {{ member.main }} - {% else %} - No API registered! - {% endif %} -
+ +
+
+

Search Results

- {% endif %} -
- - {% if perms.auth.corputils %} - - {% endblock content %} From 8e7125f1b03f0c54e4590ab2ee2783584ed9639a Mon Sep 17 00:00:00 2001 From: johanko Date: Tue, 26 Jan 2016 23:52:35 +0100 Subject: [PATCH 4/5] Added column class attribute Column class attribute to use 2 columns on screensize, using this in navbar dropdown in corputils.html --- stock/static/css/bootstrap.min.css | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/stock/static/css/bootstrap.min.css b/stock/static/css/bootstrap.min.css index d368d7be..7e5f6272 100644 --- a/stock/static/css/bootstrap.min.css +++ b/stock/static/css/bootstrap.min.css @@ -3401,6 +3401,22 @@ tbody.collapse.in { box-shadow: 0 6px 12px rgba(0, 0, 0, .175) } +@media screen and (max-width: 991px){ + .columns{ + height: 200px; + overflow:scroll; + } +} + +@media screen and (min-width: 992px){ + .columns{ + -moz-column-count:2; /* Firefox */ + -webkit-column-count:2; /* Safari and Chrome */ + column-count:2; + width: 500px; + } +} + .dropdown-menu.scrollable { overflow: auto; max-height: 450px; @@ -6668,4 +6684,4 @@ button.close { .hidden-print { display: none !important } -} \ No newline at end of file +} From 995bbf7966dda3a630b27df234308b512d11a1cb Mon Sep 17 00:00:00 2001 From: johanko Date: Tue, 26 Jan 2016 23:54:02 +0100 Subject: [PATCH 5/5] Change overflow for dropdown If there's no content the page-wrapper cuts dropdown. This change fixes this. --- stock/static/css/sb-admin-2.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock/static/css/sb-admin-2.css b/stock/static/css/sb-admin-2.css index a3f23e6b..b1c36085 100755 --- a/stock/static/css/sb-admin-2.css +++ b/stock/static/css/sb-admin-2.css @@ -27,7 +27,7 @@ body { margin: 0 0 0 250px; padding: 0 30px; border-left: 1px solid #e7e7e7; - overflow: hidden; + overflow: visible; } } @@ -346,4 +346,4 @@ table.dataTable thead .sorting:after { .panel-yellow a:hover { color: #df8a13; -} \ No newline at end of file +}