Mercurial > kallithea
changeset 4387:e271a8766951
javascript: replace YUE.onDOMReady with $(document).ready
Different execution order of YUE.onDOMReady and $(document).ready makes it hard to do gradually.
line wrap: on
line diff
--- a/kallithea/templates/admin/admin_log.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/admin/admin_log.html Fri Jul 18 19:22:01 2014 +0200 @@ -38,7 +38,7 @@ </table> <script type="text/javascript"> - YUE.onDOMReady(function(){ + $(document).ready(function(){ YUE.delegate("user_log","click",function(e, matchedEl, container){ ypjax(e.target.href,"user_log",function(){ show_more_event();
--- a/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html Fri Jul 18 19:22:01 2014 +0200 @@ -128,7 +128,7 @@ } }; - YUE.onDOMReady(function () { + $(document).ready(function () { if (!YUD.hasClass('perm_new_member_name', 'error')) { YUD.setStyle('add_perm_input', 'display', 'none'); }
--- a/kallithea/templates/admin/repos/repo_edit_permissions.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/admin/repos/repo_edit_permissions.html Fri Jul 18 19:22:01 2014 +0200 @@ -114,7 +114,7 @@ } }; - YUE.onDOMReady(function () { + $(document).ready(function () { if (!YUD.hasClass('perm_new_member_name', 'error')) { YUD.setStyle('add_perm_input', 'display', 'none'); }
--- a/kallithea/templates/admin/user_groups/user_group_edit_perms.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/admin/user_groups/user_group_edit_perms.html Fri Jul 18 19:22:01 2014 +0200 @@ -117,7 +117,7 @@ } }; - YUE.onDOMReady(function () { + $(document).ready(function () { if (!YUD.hasClass('perm_new_member_name', 'error')) { YUD.setStyle('add_perm_input', 'display', 'none'); }
--- a/kallithea/templates/base/default_perms_box.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/base/default_perms_box.html Fri Jul 18 19:22:01 2014 +0200 @@ -70,8 +70,7 @@ ## JS <script> -YUE.onDOMReady(function(e){ - +$(document).ready(function(e){ var show_custom_perms = function(inherit_default){ if(inherit_default){ YUD.setStyle('inherit_overlay', 'display', 'none');
--- a/kallithea/templates/base/root.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/base/root.html Fri Jul 18 19:22:01 2014 +0200 @@ -106,7 +106,7 @@ } })(window); - YUE.onDOMReady(function(){ + $(document).ready(function(){ tooltip_activate(); show_more_event(); show_changeset_tooltip();
--- a/kallithea/templates/changelog/changelog.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/changelog/changelog.html Fri Jul 18 19:22:01 2014 +0200 @@ -167,8 +167,7 @@ <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> <script type="text/javascript"> - YAHOO.util.Event.onDOMReady(function(){ - + $(document).ready(function(){ //Monitor range checkboxes and build a link to changesets ranges var checkboxes = YUD.getElementsByClassName('changeset_range'); // register extra routes needed for this view @@ -232,7 +231,7 @@ YUD.setStyle('compare_fork','display',''); } }; - YUE.onDOMReady(checkbox_checker); + checkbox_checker(); YUE.on(checkboxes,'click', checkbox_checker); YUE.on('rev_range_clear','click',function(e){
--- a/kallithea/templates/changelog/changelog_summary_data.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/changelog/changelog_summary_data.html Fri Jul 18 19:22:01 2014 +0200 @@ -69,7 +69,7 @@ </table> <script type="text/javascript"> - YUE.onDOMReady(function(){ + $(document).ready(function(){ YUE.delegate("shortlog_data","click",function(e, matchedEl, container){ ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();}); YUE.preventDefault(e);
--- a/kallithea/templates/changeset/changeset.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/changeset/changeset.html Fri Jul 18 19:22:01 2014 +0200 @@ -176,7 +176,7 @@ ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS <script type="text/javascript"> - YUE.onDOMReady(function(){ + $(document).ready(function(){ YUE.on(YUQ('.show-inline-comments'),'change',function(e){ var show = 'none'; var target = e.currentTarget;
--- a/kallithea/templates/changeset/changeset_file_comment.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/changeset/changeset_file_comment.html Fri Jul 18 19:22:01 2014 +0200 @@ -196,7 +196,7 @@ <script> -YUE.onDOMReady(function () { +$(document).ready(function () { MentionsAutoComplete('text', 'mentions_container', _USERS_AC_DATA, _GROUPS_AC_DATA); YUE.on('preview-btn', 'click', function(e){
--- a/kallithea/templates/files/files.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/files/files.html Fri Jul 18 19:22:01 2014 +0200 @@ -197,7 +197,7 @@ }) } -YUE.onDOMReady(function(){ +$(document).ready(function(){ ypjax_links(); var container = 'files_data'; //Bind to StateChange Event
--- a/kallithea/templates/followers/followers_data.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/followers/followers_data.html Fri Jul 18 19:22:01 2014 +0200 @@ -17,7 +17,7 @@ <div class="pagination-wh pagination-left"> <script type="text/javascript"> -YUE.onDOMReady(function(){ +$(document).ready(function(){ YUE.delegate("followers","click",function(e, matchedEl, container){ ypjax(e.target.href,"followers",function(){ show_more_event();
--- a/kallithea/templates/forks/forks_data.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/forks/forks_data.html Fri Jul 18 19:22:01 2014 +0200 @@ -25,7 +25,7 @@ % endfor <div class="pagination-wh pagination-left"> <script type="text/javascript"> - YUE.onDOMReady(function(){ + $(document).ready(function(){ YUE.delegate("forks","click",function(e, matchedEl, container){ ypjax(e.target.href,"forks",function(){ show_more_event();
--- a/kallithea/templates/journal/journal_data.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/journal/journal_data.html Fri Jul 18 19:22:01 2014 +0200 @@ -39,7 +39,7 @@ ${c.journal_pager.pager('$link_previous ~2~ $link_next')} </div> <script type="text/javascript"> - YUE.onDOMReady(function(){ + $(document).ready(function(){ YUE.delegate("journal","click",function(e, matchedEl, container){ ypjax(e.target.href,"journal",function(){ show_more_event();
--- a/kallithea/templates/login.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/login.html Fri Jul 18 19:22:01 2014 +0200 @@ -80,7 +80,7 @@ </div> ${h.end_form()} <script type="text/javascript"> - YUE.onDOMReady(function(){ + $(document).ready(function(){ YUD.get('username').focus(); }) </script>
--- a/kallithea/templates/pullrequests/pullrequest.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/pullrequests/pullrequest.html Fri Jul 18 19:22:01 2014 +0200 @@ -210,7 +210,7 @@ }); } - YAHOO.util.Event.onDOMReady(function(){ + $(document).ready(function(){ $("#org_repo").select2({ dropdownAutoWidth: true, });
--- a/kallithea/templates/pullrequests/pullrequest_show.html Fri Jul 18 19:22:01 2014 +0200 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Fri Jul 18 19:22:01 2014 +0200 @@ -330,7 +330,7 @@ %endif <script type="text/javascript"> - YUE.onDOMReady(function(){ + $(document).ready(function(){ PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); YUE.on(YUQ('.show-inline-comments'),'change',function(e){