You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2023/04/25 14:50:51 UTC
[allura] branch gc/8504b updated (114dbe238 -> a578117a4)
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a change to branch gc/8504b
in repository https://gitbox.apache.org/repos/asf/allura.git
from 114dbe238 [#8504] more inline event replacement
new e98c57058 fixup! [#8504] more inline event replacement
new a578117a4 fixup! fixup! [#8504] more inline event replacement
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Allura/allura/lib/widgets/forms.py | 8 +++++---
ForgeFiles/forgefiles/templates/create_folder.html | 2 +-
ForgeFiles/forgefiles/templates/delete.html | 2 +-
ForgeFiles/forgefiles/templates/edit.html | 2 +-
ForgeFiles/forgefiles/templates/publish_folder.html | 2 +-
ForgeFiles/forgefiles/templates/upload_file.html | 2 +-
6 files changed, 10 insertions(+), 8 deletions(-)
[allura] 01/02: fixup! [#8504] more inline event replacement
Posted by gc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch gc/8504b
in repository https://gitbox.apache.org/repos/asf/allura.git
commit e98c570587d865a7fecec34ab9b08a6bf717a7e7
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Mon Apr 24 17:01:21 2023 -0500
fixup! [#8504] more inline event replacement
---
ForgeFiles/forgefiles/templates/create_folder.html | 2 +-
ForgeFiles/forgefiles/templates/delete.html | 2 +-
ForgeFiles/forgefiles/templates/edit.html | 2 +-
ForgeFiles/forgefiles/templates/publish_folder.html | 2 +-
ForgeFiles/forgefiles/templates/upload_file.html | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ForgeFiles/forgefiles/templates/create_folder.html b/ForgeFiles/forgefiles/templates/create_folder.html
index 9b1cc9103..8cc7c99d5 100644
--- a/ForgeFiles/forgefiles/templates/create_folder.html
+++ b/ForgeFiles/forgefiles/templates/create_folder.html
@@ -55,6 +55,6 @@
</form>
</div>
<script>
- $('#create-folder-form').on('submit', validateFolderForm(e));
+ $('#create-folder-form').on('submit', function(e){ validateFolderForm(e) });
</script>
diff --git a/ForgeFiles/forgefiles/templates/delete.html b/ForgeFiles/forgefiles/templates/delete.html
index cd42de870..ae1f69ca6 100644
--- a/ForgeFiles/forgefiles/templates/delete.html
+++ b/ForgeFiles/forgefiles/templates/delete.html
@@ -59,7 +59,7 @@
</form>
</div>
<script>
- $('#delete_folder_form').on('submit', ConfirmDeleteFolder(e));
+ $('#delete_folder_form').on('submit', function(e){ ConfirmDeleteFolder(e) });
</script>
diff --git a/ForgeFiles/forgefiles/templates/edit.html b/ForgeFiles/forgefiles/templates/edit.html
index d021c2e3f..8323892b5 100644
--- a/ForgeFiles/forgefiles/templates/edit.html
+++ b/ForgeFiles/forgefiles/templates/edit.html
@@ -75,7 +75,7 @@
</form>
</div>
<script>
- $('#edit_folder_form').on('submit', validateEditFolderForm(e));
+ $('#edit_folder_form').on('submit', function(e){ validateEditFolderForm(e) });
</script>
diff --git a/ForgeFiles/forgefiles/templates/publish_folder.html b/ForgeFiles/forgefiles/templates/publish_folder.html
index c21960f41..b53c6a2ff 100644
--- a/ForgeFiles/forgefiles/templates/publish_folder.html
+++ b/ForgeFiles/forgefiles/templates/publish_folder.html
@@ -65,7 +65,7 @@
<script type="text/javascript" src="{{g.app_static('js/publish_folder.js')}}"></script>
<script>
- $('#publish_folder_form').on('submit', ConfirmPublishFolder(e));
+ $('#publish_folder_form').on('submit', function(e){ ConfirmPublishFolder(e) });
</script>
diff --git a/ForgeFiles/forgefiles/templates/upload_file.html b/ForgeFiles/forgefiles/templates/upload_file.html
index 7405121f1..045aa3539 100644
--- a/ForgeFiles/forgefiles/templates/upload_file.html
+++ b/ForgeFiles/forgefiles/templates/upload_file.html
@@ -54,5 +54,5 @@
</form>
</div>
<script>
- $('upload-file-form').on('submit', validateFileForm(e));
+ $('upload-file-form').on('submit', function(e){ validateFileForm(e) });
</script>
[allura] 02/02: fixup! fixup! [#8504] more inline event replacement
Posted by gc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch gc/8504b
in repository https://gitbox.apache.org/repos/asf/allura.git
commit a578117a422e0f94061c6825b8c8da86d3ab776c
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Tue Apr 25 09:50:32 2023 -0500
fixup! fixup! [#8504] more inline event replacement
---
Allura/allura/lib/widgets/forms.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Allura/allura/lib/widgets/forms.py b/Allura/allura/lib/widgets/forms.py
index 94b99871a..0ac373b2d 100644
--- a/Allura/allura/lib/widgets/forms.py
+++ b/Allura/allura/lib/widgets/forms.py
@@ -261,7 +261,7 @@ class PersonalDataForm(ForgeForm):
[ew.Option(py_value=c, label=n, selected=False)
for c, n in sorted(list(country_names.items()),
key=lambda k_v: k_v[1])],
- attrs={'onchange': 'selectTimezone(this.value)'}),
+ ),
ew.TextField(
name='city',
label='City of residence',
@@ -334,7 +334,7 @@ class PersonalDataForm(ForgeForm):
yield ew.JSScript('''
var $allTimezones = $("#tz").clone();
var $t = ''' + h.escape_json(dict(country_timezones)) + ''';
-function selectTimezone($country){
+function selectTimeZ($country){
if($country == " "){
$("#tz").replaceWith($allTimezones);
}
@@ -344,7 +344,9 @@ function selectTimezone($country){
$("#tz").append($("<option></option>").attr("value", value).text(value))
})
}
-}''')
+};
+$("select[name='country']").on("change", function(e){ selectTimeZ(e.target.value) });
+''')
class AddTelNumberForm(ForgeForm):