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 2022/08/09 00:52:46 UTC

[allura] branch gc/8452 created (now 0055b6343)

This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a change to branch gc/8452
in repository https://gitbox.apache.org/repos/asf/allura.git


      at 0055b6343 [#8452] replaced .bind calls with .on

This branch includes the following new commits:

     new d8dbce397 [#8452] updated .removeAttr -> .prop
     new 0055b6343 [#8452] replaced .bind calls with .on

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.



[allura] 02/02: [#8452] replaced .bind calls with .on

Posted by gc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch gc/8452
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 0055b6343fb452c4998cff15faef3cee83af8866
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Mon Aug 8 18:52:05 2022 -0600

    [#8452] replaced .bind calls with .on
---
 Allura/allura/lib/widgets/resources/js/post.js            |  2 +-
 Allura/allura/lib/widgets/resources/js/sf_markitup.js     |  4 ++--
 Allura/allura/public/nf/js/stats.js                       |  2 +-
 Allura/allura/templates/repo/file.html                    |  4 ++--
 ForgeImporters/forgeimporters/templates/project_base.html | 13 ++++++++-----
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/Allura/allura/lib/widgets/resources/js/post.js b/Allura/allura/lib/widgets/resources/js/post.js
index 1da44aa7d..6103944eb 100644
--- a/Allura/allura/lib/widgets/resources/js/post.js
+++ b/Allura/allura/lib/widgets/resources/js/post.js
@@ -157,7 +157,7 @@
                     }
                 });
             });
-            $('.close', popup).bind('click', function() {
+            $('.close', popup).on('click', function() {
                 popup.hide();
             });
         }
diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index d676126af..9e8da5e76 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -121,7 +121,7 @@ $(window).load(function() {
                   $('.markdown_syntax_toc_crumb').toggle(!$this_section.is('.md_ex_toc'));
                 };
                 $('.markdown_syntax_toc a', $help_contents).click(display_section);
-                $(window).bind('hashchange', display_section); // handle back button
+                $(window).on('hashchange', display_section); // handle back button
               });
               $help_area.lightbox_me();
             }
@@ -141,7 +141,7 @@ $(window).load(function() {
               return 'Loading...';
             }
 
-            $('.close', $help_area).bind('click', function() {
+            $('.close', $help_area).on('click', function() {
               $help_area.hide();
             });
         });
diff --git a/Allura/allura/public/nf/js/stats.js b/Allura/allura/public/nf/js/stats.js
index efbf938a7..fdb59946a 100644
--- a/Allura/allura/public/nf/js/stats.js
+++ b/Allura/allura/public/nf/js/stats.js
@@ -95,7 +95,7 @@ function chartProjectStats(url, params, series, checkEmpty, tooltipFormat){
   $(".busy").hide();
 
   var previousPoint = null;
-  holder.bind("plothover", function (event, pos, item) {
+  holder.on("plothover", function (event, pos, item) {
       if (item) {
         if (previousPoint !== item.dataIndex) {
           previousPoint = item.dataIndex;
diff --git a/Allura/allura/templates/repo/file.html b/Allura/allura/templates/repo/file.html
index 42f8bb20a..5fbb38b23 100644
--- a/Allura/allura/templates/repo/file.html
+++ b/Allura/allura/templates/repo/file.html
@@ -39,7 +39,7 @@
 {% block extra_js %}
 {{ super() }}
 <script type="text/javascript">(function() {
-  $(window).bind('hashchange', function(e) {
+  $(window).on('hashchange', function(e) {
     var hash = window.location.hash.substring(1);
 	if ('originalEvent' in e && 'oldURL' in e.originalEvent) {
       $('#' + e.originalEvent.oldURL.split('#')[1]).css('background-color', 'transparent');
@@ -51,7 +51,7 @@
 
   var clicks = 0;
   $('.code_block').each(function(index, element) {
-    $(element).bind('click', function() {
+    $(element).on('click', function() {
       // Trick to ignore double and triple clicks
       clicks++;
       if (clicks === 1) {
diff --git a/ForgeImporters/forgeimporters/templates/project_base.html b/ForgeImporters/forgeimporters/templates/project_base.html
index 120e8bed5..cbba5d457 100644
--- a/ForgeImporters/forgeimporters/templates/project_base.html
+++ b/ForgeImporters/forgeimporters/templates/project_base.html
@@ -65,17 +65,20 @@
         }
 
         $(function() {
-            $('#project_name').bind('change keyup', suggest_name);
-            $('#project_shortname').bind('change keyup', function(event) {
+            $('#project_name').on('change keyup', suggest_name);
+            $('#project_shortname').on('change keyup', function(event) {
+                console.log('update url!!')
+
+
                 if (event.type == 'keyup') {
                     manual = true;
                 }
                 update_url();
             });
-            $('#project_name').bind('blur', check_names);
-            $('#project_shortname').bind('blur', check_names);
+            $('#project_name').on('blur', check_names);
+            $('#project_shortname').on('blur', check_names);
             if($('#project_url').length === 1) {
-                $('#project_url').bind('blur', check_names);
+                $('#project_url').on('blur', check_names);
             }
         });
     </script>


[allura] 01/02: [#8452] updated .removeAttr -> .prop

Posted by gc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch gc/8452
in repository https://gitbox.apache.org/repos/asf/allura.git

commit d8dbce3978e5c0d1a11dd3c168eac20772d58850
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Mon Aug 8 16:31:06 2022 -0600

    [#8452] updated .removeAttr -> .prop
---
 Allura/allura/templates/repo/log.html             | 2 +-
 ForgeShortUrl/forgeshorturl/templates/master.html | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/templates/repo/log.html b/Allura/allura/templates/repo/log.html
index 42c1864ea..64d7a80fd 100644
--- a/Allura/allura/templates/repo/log.html
+++ b/Allura/allura/templates/repo/log.html
@@ -60,7 +60,7 @@
         $(".revision").click(function(){
             if ( $("input:checked").length > 2){
                 $("tr.selected").toggleClass("selected", false);
-                $("input.selected").removeAttr("checked");
+                $("input.selected").prop("checked", false);
                 $("input.selected").toggleClass("selected", false);
             }
             $(this).closest("tr").toggleClass("selected");
diff --git a/ForgeShortUrl/forgeshorturl/templates/master.html b/ForgeShortUrl/forgeshorturl/templates/master.html
index d67e9d4ad..0e8fa4fbc 100644
--- a/ForgeShortUrl/forgeshorturl/templates/master.html
+++ b/ForgeShortUrl/forgeshorturl/templates/master.html
@@ -32,10 +32,10 @@
             modal.find('#short-url-form-title').show();
             modal.find('#short-url-form-action-label').text('Add');
             modal.find('input[name="update"]').val('False');
-            modal.find('input[name="short_url"]').val('').removeAttr('readonly').trigger('keyup');
+            modal.find('input[name="short_url"]').val('').prop('readonly', false).trigger('keyup');
             modal.find('input[name="full_url"]').val('');
             modal.find('textarea[name="description"]').val('');
-            modal.find('input[name="private"]').removeAttr('checked');
+            modal.find('input[name="private"]').prop('checked', false);
         });
     });
 </script>