Skip to content

Commit 95c0502

Browse files
committed
Updated brythonSPA.
* Upgraded to brython 3.10.5. * Upgraded to Django 3.2.13. * Added tab-click functionality for tabs with subtabs as well, which calls 'default' subtab. * Updated src/brythonSPA/BrythonSPATemplate/static/WebApplication/webInterface/activator.py . * And a few minor changes.
1 parent f62716e commit 95c0502

29 files changed

+2118
-822
lines changed

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Installing / Getting started
1212
============================
1313
.. Introduction of minimal setup.
1414
Command, followed by explanation in next paragraph or after every command.
15-
* `src <https://github.com/CXINFINITE/ProjectEssentials-Python/blob/main/src>`_
15+
* `src/ <https://github.com/CXINFINITE/ProjectEssentials-Python/blob/main/src>`_
1616
contains various directories containing various components.
1717

1818
* Each have their own set of requirements and (independent) source codes.
1919

20-
* For GitHub related commands, check `docs/ <https://github.com/CXINFINITE/ProjectEssentials-Python/blob/main/docs/GitHubUsage.rst>`_.
20+
* For GitHub related commands, check `docs/GitHubUsage.rst <https://github.com/CXINFINITE/ProjectEssentials-Python/blob/main/docs/GitHubUsage.rst>`_.
2121

2222
Developing
2323
==========

docs/Contributing.rst

+21-16
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,29 @@ Contributing
44

55
What/How to contribute?
66
=======================
7-
You can contribute to almost anything in the repository, from a typo in
8-
READMEs to fixing any error/bug in code or introducing new features.
9-
Just remember to follow a general flow of contributing to projects, which
10-
could be found on internet.
7+
Sorry, this project currently does not accept contributions, but you're welcome
8+
to fork this project and use as required (and as per `LICENSE <https://github.com/CXINFINITE/ProjectEssentials-Python/blob/main/LICENSE>`_).
119

12-
While working in community projects, it is a good thing to ask other
13-
contributors or any other people in community before working on any part of the
14-
project like working on new features, bugs, issues, etc, which helps to know
15-
if someone is already working on it or not.
10+
.. .
11+
You can contribute to almost anything in the repository, from a typo in
12+
READMEs to fixing any error/bug in code or introducing new features.
13+
Just remember to follow a general flow of contributing to projects, which
14+
could be found on internet.
1615
17-
Pull requests
18-
=============
19-
1. Check with ``PEP 8`` coding style guidelines.
20-
2. Put appropriate summary in commit regarding what's changed/fixed, with
21-
more details in description.
22-
3. Combine multiple commits into single then create new pull request.
23-
4. You're done!
16+
While working in community projects, it is a good thing to ask other
17+
contributors or any other people in community before working on any part of the
18+
project like working on new features, bugs, issues, etc, which helps to know
19+
if someone is already working on it or not.
20+
21+
Pull requests
22+
=============
23+
1. Check with ``PEP 8`` coding style guidelines.
24+
2. Put appropriate summary in commit regarding what's changed/fixed, with
25+
more details in description.
26+
3. Combine multiple commits into single then create new pull request.
27+
4. You're done!
2428
2529
Working with GitHub
2630
===================
27-
Check `docs/GitHubUsage.rst <https://github.com/CXINFINITE/ProjectEssentials-Python/blob/main/docs/GitHubUsage.rst>`_ for how to perform various git related operations.
31+
Check `docs/GitHubUsage.rst <https://github.com/CXINFINITE/ProjectEssentials-Python/blob/main/docs/GitHubUsage.rst>`_ for how to perform various git related
32+
operations.

examples/BrythonSPA-UAPI-Django/BrythonModulesUpdater.py

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import os
2+
import sys
3+
from pathlib import Path
4+
5+
sys.path.append(os.path.abspath(
6+
Path(__file__).resolve().parent.parent
7+
))
8+
9+
import BrythonModulesUpdater as App
10+
11+
if __name__ == '__main__':
12+
App.core.Executor.execute_from_cli()
13+
exit(0)

examples/BrythonSPA-UAPI-Django/BrythonModulesUpdater/modulefiles/brython.js

+899-376
Large diffs are not rendered by default.

examples/BrythonSPA-UAPI-Django/BrythonModulesUpdater/modulefiles/brython_stdlib.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/BrythonSPA-UAPI-Django/BrythonModulesUpdater/osCommands.py

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
import os
2+
import sys
3+
from pathlib import Path
4+
5+
sys.path.append(os.path.abspath(
6+
Path(__file__).resolve().parent.parent
7+
))
8+
9+
import BrythonModulesUpdater as App
210

311
class OSCommands:
412
OS = None

examples/BrythonSPA-UAPI-Django/DjangoProject/webapplication/static/webapplication/CSS/WebApplication.home.css

+37
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
color: rgb(240, 20, 20);
88
}
99

10+
a {
11+
text-decoration: none;
12+
}
13+
14+
a:link, a:visited {
15+
color: rgba(250, 200, 200, 1);
16+
}
17+
18+
a:hover {
19+
color: rgba(250, 200, 50, 1);
20+
}
21+
22+
a:active {
23+
color: rgba(250, 100, 50, 1);
24+
}
25+
1026
body {
1127
background-color: rgba(0, 0, 0, 1);
1228
color : white;
@@ -256,11 +272,14 @@ body {
256272

257273
.sidebar-internal-item-button {
258274
width: 100%;
275+
cursor: pointer;
259276
}
260277

278+
/*
261279
.sidebar-internal-item-button.no-subtab {
262280
cursor: pointer;
263281
}
282+
*/
264283

265284
.sidebar-internal-item-holder {
266285
position: fixed;
@@ -282,6 +301,10 @@ body {
282301
display: block;
283302
}
284303

304+
.sidebar-item-image {
305+
background-color: rgba(250, 250, 250, 0.4);
306+
}
307+
285308
.sidebar-internal-item .sidebar-item-image {
286309
border-right: 2px solid rgba(0, 0, 0, 0);
287310
}
@@ -328,6 +351,19 @@ body {
328351
backdrop-filter: blur(8px);
329352
}
330353

354+
.contentblock-splitstrip-item {
355+
height: 50%;
356+
}
357+
358+
.contentblock-splitstrip-item-container {
359+
background-color: rgba(0, 0, 0, 0);
360+
height: 1px;
361+
}
362+
363+
.contentblock-splitstrip-content-block {
364+
background-color: rgba(0, 0, 0, 0);
365+
}
366+
331367
.information-modal-content {
332368
background-color: rgba(40, 40, 40, 0.4);
333369
border-color: rgba(200, 200, 200, 0.8);
@@ -355,6 +391,7 @@ body {
355391
.information-list-item:active {
356392
background-color: rgba(60, 60, 60, 0.4);
357393
}
394+
358395
.graphic-img {
359396
max-width: 99%;
360397
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<div
2+
class="position-relative p-1 w-100 align-self-stretch d-flex flex-column
3+
contentblock-splitstrip-item"
4+
>
5+
<div
6+
class="position-relative p-0 flex-grow-1 d-flex flex-row
7+
align-self-stretch contentblock-splitstrip-item-container"
8+
>
9+
<div
10+
class="position-relative p-0 w-100 align-self-stretch overflow-auto
11+
text-wrap text-break font-monospace
12+
contentblock-splitstrip-content-block top-content-block"
13+
>
14+
{topbody}
15+
</div>
16+
</div>
17+
</div>
18+
<div
19+
class="position-relative p-1 w-100 align-self-stretch d-flex flex-column
20+
contentblock-splitstrip-item"
21+
>
22+
<div
23+
class="position-relative p-0 flex-grow-1 d-flex flex-row
24+
align-self-stretch contentblock-splitstrip-item-container"
25+
>
26+
<div
27+
class="position-relative p-0 w-100 align-self-stretch overflow-auto
28+
text-wrap text-break font-monospace
29+
contentblock-splitstrip-content-block bottom-content-block"
30+
>
31+
{bottombody}
32+
</div>
33+
</div>
34+
</div>

examples/BrythonSPA-UAPI-Django/DjangoProject/webapplication/static/webapplication/Templates/layout.information.list.item.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<li
22
class="list-group-item information-list-item
3-
information-list-{name}-button"
3+
information-list-{name}-button {addonclasses}"
44
tabindex="0"
55
>
66
<div
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<button
2+
class="position-relative p-2 btn btn-outline-light
3+
navbar-logout-button activator-logout-button activator-item-logout"
4+
type="button"
5+
>
6+
Log-out
7+
</button>

examples/BrythonSPA-UAPI-Django/DjangoProject/webapplication/static/webapplication/WebApplication/configuration.py

+2
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ class Configuration:
2222

2323
failureMaxRetries = 3 # int, times
2424
failureRefreshInterval = 1000 # int, msec
25+
26+
statusPollingInterval = 1500 # int, msec

examples/BrythonSPA-UAPI-Django/DjangoProject/webapplication/static/webapplication/WebApplication/core/uapiManager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def getEndpoint (connectionType=None):
9090
def updateAPICode (data):
9191
UAPIManager.apiUpdateRequestActive = False
9292

93-
if (data.get('status') == 'success'):
93+
if (data.get('status') == App.Configuration.STATUS_SUCCESS):
9494
if (data.get('data')):
9595
apicodes = UAPIManager.apicodes.copy()
9696
apicodes.extend(data.get('data').get('apicodes') or [])

examples/BrythonSPA-UAPI-Django/DjangoProject/webapplication/static/webapplication/WebApplication/webInterface/activator.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def deactivate ():
119119
return proceed
120120

121121
def activate (event=None, tab=None, subtab=None, popStateEvent=False,
122-
force=False, skipdeactivation=False,
122+
force=False, skipdeactivation=False, **kwargs,
123123
):
124124
try:
125125
if (tab in (None, 'default',)):
@@ -174,7 +174,7 @@ def activate (event=None, tab=None, subtab=None, popStateEvent=False,
174174

175175
try:
176176
if (callable(Activator.tabs.get(tab))):
177-
activated = Activator.tabs.get(tab)(event)
177+
activated = Activator.tabs.get(tab)(event, **kwargs)
178178
elif (
179179
(
180180
type(
@@ -183,7 +183,7 @@ def activate (event=None, tab=None, subtab=None, popStateEvent=False,
183183
)
184184
and callable(Activator.tabs.get(tab)[-1])
185185
):
186-
activated = Activator.tabs.get(tab)[-1](event)
186+
activated = Activator.tabs.get(tab)[-1](event, **kwargs)
187187
elif (
188188
(
189189
type(
@@ -192,7 +192,7 @@ def activate (event=None, tab=None, subtab=None, popStateEvent=False,
192192
)
193193
and callable(Activator.tabs.get(tab).get(subtab))
194194
):
195-
activated = Activator.tabs.get(tab).get(subtab)(event)
195+
activated = Activator.tabs.get(tab).get(subtab)(event, **kwargs)
196196
elif (
197197
(
198198
type(
@@ -206,7 +206,9 @@ def activate (event=None, tab=None, subtab=None, popStateEvent=False,
206206
)
207207
and callable(Activator.tabs.get(tab).get(subtab)[-1])
208208
):
209-
activated = Activator.tabs.get(tab).get(subtab)[-1](event)
209+
activated = Activator.tabs.get(tab).get(subtab)[-1](
210+
event, **kwargs
211+
)
210212
except:
211213
activated = False
212214

0 commit comments

Comments
 (0)