Skip to content

Commit

Permalink
🔀 Merge pull request
Browse files Browse the repository at this point in the history
Merge pull request #6 from kaplanPRO/development
  • Loading branch information
csengor authored Feb 18, 2022
2 parents ffdf032 + 72ec754 commit 890dc10
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY . /code/

RUN pip install -U pip
RUN pip install -r requirements.txt
RUN pip install gunicorn
RUN pip install -U pip && \
pip install -r requirements.txt && \
pip install gunicorn

COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
Expand Down
2 changes: 1 addition & 1 deletion kaplancloud/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.0'
__version__ = '0.2.1'
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
</div>
<footer>
<p>v0.2.0</p>
<p>v0.2.1</p>
</footer>
</main>
{% endblock %}
2 changes: 1 addition & 1 deletion kaplancloudaccounts/templates/accounts/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>
</div>
<footer>
<p>v0.2.0</p>
<p>v0.2.1</p>
</footer>
</main>
{% endblock %}
2 changes: 1 addition & 1 deletion kaplancloudaccounts/templates/accounts/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
</div>
<footer>
<p>v0.2.0</p>
<p>v0.2.1</p>
</footer>
</main>
{% endblock %}
28 changes: 14 additions & 14 deletions kaplancloudapp/static/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ window.onload = function() {
targetCell = targetCells[i];

targetCell.onfocus = function(e) {
currentSegment = this.parentNode;
currentSegment = this.parentElement;
commentForm.style.display = 'block';

while (comments.children.length > 1) {
Expand All @@ -28,8 +28,8 @@ window.onload = function() {
var url = new URL(window.location.href);

var params = {task:'lookup',
tu_id:this.parentNode.parentNode.parentNode.id,
s_id:this.parentNode.id};
tu_id:this.parentElement.parentElement.parentElement.id,
s_id:this.parentElement.id};
url.search = new URLSearchParams(params).toString();

fetch(url)
Expand Down Expand Up @@ -336,16 +336,16 @@ window.onload = function() {
}

function submitSegment(targetCell) {
let status = targetCell.parentNode.getAttribute('status');
let status = targetCell.parentElement.getAttribute('status');

targetCell.parentNode.classList.remove(('blank', 'draft', 'translated', 'error'));
targetCell.parentNode.classList.add(status);
targetCell.parentElement.classList.remove(('blank', 'draft', 'translated', 'error'));
targetCell.parentElement.classList.add(status);

segmentFormData = new FormData();
segmentFormData.append('task', 'update_segment');
segmentFormData.append('status', status);
segmentFormData.append('tu_id', targetCell.parentNode.parentNode.parentNode.id);
segmentFormData.append('s_id', targetCell.parentNode.id);
segmentFormData.append('tu_id', targetCell.parentElement.parentElement.parentElement.id);
segmentFormData.append('s_id', targetCell.parentElement.id);
segmentFormData.append('target', targetCell.innerHTML);

fetch('',
Expand All @@ -360,14 +360,14 @@ window.onload = function() {
.then(response => {
if (!response.ok)
{
throw 'Could not update segment #' + targetCell.parentNode.id + '.';
throw 'Could not update segment #' + targetCell.parentElement.id + '.';
}
targetCell.parentNode.classList.remove('error');
targetCell.parentElement.classList.remove('error');
})
.catch(error => {
console.error(error);
targetCell.parentNode.classList.add('error');
targetCell.parentNode.classList.remove('blank', 'draft', 'translated');
targetCell.parentElement.classList.add('error');
targetCell.parentElement.classList.remove('blank', 'draft', 'translated');
})


Expand All @@ -379,10 +379,10 @@ function toggleExpand(span)
if (span.textContent === 'expand_more')
{
span.textContent = 'expand_less';
span.parentNode.nextSibling.nextElementSibling.hidden = false;
span.parentElement.nextSibling.nextElementSibling.hidden = false;
} else
{
span.textContent = 'expand_more';
span.parentNode.nextSibling.nextElementSibling.hidden = true;
span.parentElement.nextSibling.nextElementSibling.hidden = true;
}
}
2 changes: 1 addition & 1 deletion kaplancloudapp/static/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
window.onload = function() {
document.getElementById('search-form-toggle').onclick = function() {
this.parentNode.className = "show";
this.parentElement.className = "show";
}
}
4 changes: 2 additions & 2 deletions kaplancloudapp/static/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ function toggleExpand(span)
if (span.textContent === 'expand_more')
{
span.textContent = 'expand_less';
span.parentNode.parentNode.nextSibling.nextElementSibling.hidden = false;
span.parentElement.parentElement.nextSibling.nextElementSibling.hidden = false;
} else
{
span.textContent = 'expand_more';
span.parentNode.parentNode.nextSibling.nextElementSibling.hidden = true;
span.parentElement.parentElement.nextSibling.nextElementSibling.hidden = true;
}
}
2 changes: 1 addition & 1 deletion kaplancloudapp/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a id="nav-clients" class="disabled" href="#" disabled>Clients</a>--->
</nav>
<div id="version">
<p>v0.2.0</p>
<p>v0.2.1</p>
</div>
</div>
{% block div %}
Expand Down
2 changes: 1 addition & 1 deletion kaplancloudapp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def project(request, id):
with Path(project_file.target_bilingualfile.path).open() as target_bf:
tmpfile.write_bytes(target_bf.read_bytes)

tempdir_files = list(Path(tempdir).iterdir())
tempdir_files = [tempdir_file for tempdir_file in list(Path(tempdir).iterdir()) if not tempdir_file.is_dir()]
if len(tempdir_files) > 1:
tmpzip_path = Path(tempdir) / 'target.zip'
with zipfile.ZipFile(tmpzip_path, 'w') as tmpzip:
Expand Down

0 comments on commit 890dc10

Please sign in to comment.