From 4789d7585cdfd504d85946cd85634560ef641709 Mon Sep 17 00:00:00 2001 From: joedolson Date: Sun, 31 Jan 2021 20:11:03 +0000 Subject: [PATCH] Menus: Add sticky footer to avoid duplicate save buttons. Make the navigation menu footer sticky so a Save Menu button is always available in the viewport. Improves usability and effectiveness of the interface when in a responsive view. Props garrett-eclipse, audrasjb, maxpertici, sabernhardt, kburgoine, poena Fixes #51631 Built from https://develop.svn.wordpress.org/trunk@50115 git-svn-id: http://core.svn.wordpress.org/trunk@49794 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/nav-menus-rtl.css | 17 +++++++++++++++++ wp-admin/css/nav-menus-rtl.min.css | 2 +- wp-admin/css/nav-menus.css | 17 +++++++++++++++++ wp-admin/css/nav-menus.min.css | 2 +- wp-admin/js/nav-menu.js | 25 +++++++++++++++++++++++-- wp-admin/js/nav-menu.min.js | 2 +- wp-includes/version.php | 2 +- 7 files changed, 61 insertions(+), 6 deletions(-) diff --git a/wp-admin/css/nav-menus-rtl.css b/wp-admin/css/nav-menus-rtl.css index 4b9a589afa..abff227e07 100644 --- a/wp-admin/css/nav-menus-rtl.css +++ b/wp-admin/css/nav-menus-rtl.css @@ -892,6 +892,23 @@ body.menu-max-depth-11 { min-width: 1280px !important; } } } +@media only screen and (min-width: 783px) { + @supports ((position: -webkit-sticky) or (position: sticky)) and (scroll-margin-bottom: 130px) { + + #nav-menu-footer { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 10; + box-shadow: 0 -1px 0 0px #ddd; + } + + #save_menu_header { + display: none; + } + } +} + @media only screen and (max-width: 768px) { /* menu locations */ #menu-locations-wrap .widefat { diff --git a/wp-admin/css/nav-menus-rtl.min.css b/wp-admin/css/nav-menus-rtl.min.css index 2dd61361be..8f8f92bf27 100644 --- a/wp-admin/css/nav-menus-rtl.min.css +++ b/wp-admin/css/nav-menus-rtl.min.css @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 8px 4px 5px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}.has-no-menu-item .button-controls{display:none}#nav-menus-frame{margin-right:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-right:-300px;clear:both;float:right;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.is-submenu{color:#50575e;font-style:italic;font-weight:400;margin-right:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fff}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-left:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #f0f0f1;margin-top:2em}.menu-settings-group{margin:0 0 10px;overflow:hidden;padding-right:20%}.menu-settings-group:last-of-type{margin-bottom:0}.menu-settings-input{float:right;margin:0;width:100%}.menu-settings-group-name{float:right;clear:both;width:25%;padding:3px 0 0;margin-right:-25%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#787c82;font-size:11px}#menu-management-liquid{float:right;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-left:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px;border-top:1px solid #fff;border-bottom:1px solid #dcdcde;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px;background:#f6f7f7}#nav-menu-header{border-bottom:1px solid #dcdcde;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-left:7px}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}.nav-menus-php #post-body-content .post-body-plain{margin-bottom:0}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:left;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-title label{font-weight:600}.menu-location-menus select{float:right}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:right;width:160px;margin-left:5px}.locations-row-links{float:right;margin:6px 6px 0 0}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-left:3px;border-left:1px solid #c3c4c7}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:left}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:left}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}#cancel-save{text-decoration:underline;font-size:12px;margin-right:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:left}.list-controls{float:right;margin-top:5px}.add-to-menu{float:left}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0 0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:right;margin-top:5px;padding-left:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:right;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px 0 0 -10px}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0;margin-bottom:5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-left:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}.menu-item-title .post-state{font-weight:600}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #dcdcde;position:relative;padding:10px 15px;height:auto;min-height:20px;max-width:382px;line-height:2.30769230;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#8c8f94}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#facfd2;border-color:#ffabaf}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f86368}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:1.53846153;display:block;margin-left:13em}.menu-item-handle .menu-item-title.no-title{color:#787c82}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:9px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:9px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-right:0}.menu-item-depth-1{margin-right:30px}.menu-item-depth-2{margin-right:60px}.menu-item-depth-3{margin-right:90px}.menu-item-depth-4{margin-right:120px}.menu-item-depth-5{margin-right:150px}.menu-item-depth-6{margin-right:180px}.menu-item-depth-7{margin-right:210px}.menu-item-depth-8{margin-right:240px}.menu-item-depth-9{margin-right:270px}.menu-item-depth-10{margin-right:300px}.menu-item-depth-11{margin-right:330px}.menu-item-depth-0 .menu-item-transport{margin-right:0}.menu-item-depth-1 .menu-item-transport{margin-right:-30px}.menu-item-depth-2 .menu-item-transport{margin-right:-60px}.menu-item-depth-3 .menu-item-transport{margin-right:-90px}.menu-item-depth-4 .menu-item-transport{margin-right:-120px}.menu-item-depth-5 .menu-item-transport{margin-right:-150px}.menu-item-depth-6 .menu-item-transport{margin-right:-180px}.menu-item-depth-7 .menu-item-transport{margin-right:-210px}.menu-item-depth-8 .menu-item-transport{margin-right:-240px}.menu-item-depth-9 .menu-item-transport{margin-right:-270px}.menu-item-depth-10 .menu-item-transport{margin-right:-300px}.menu-item-depth-11 .menu-item-transport{margin-right:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#646970;font-size:12px;line-height:1.5}.item-controls{font-size:12px;position:absolute;left:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-left:10px}.nav-menus-php .item-edit{position:absolute;left:-20px;top:0;display:block;width:30px;height:40px;outline:0}.no-js.nav-menus-php .item-edit{position:static;float:left;width:auto;height:auto;margin:12px 0 12px -10px;padding:0;color:#2271b1;text-decoration:underline;font-size:12px;line-height:1.5}.no-js.nav-menus-php .item-edit .screen-reader-text{position:static;-webkit-clip-path:none;clip-path:none;width:auto;height:auto;margin:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-right:4px;width:20px;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.js.nav-menus-php .item-edit:focus{box-shadow:none}.nav-menus-php .item-edit:focus:before{box-shadow:0 0 0 1px #4f94d4,0 0 2px 1px rgba(79,148,212,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;max-width:392px;padding:10px;position:relative;z-index:10;border:1px solid #c3c4c7;border-top:none;box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move{margin:3px 0 5px;line-height:1.5}.field-move-visual-label{float:right;margin-left:4px}.menu-item-settings .field-move .button-link{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em -10px;text-align:center}.add-menu-item-pagelinks .page-numbers{display:inline-block;min-width:20px}.add-menu-item-pagelinks .page-numbers.dots{min-width:0}.link-to-original{display:block;margin:0 0 15px;padding:3px 5px 5px;border:1px solid #dcdcde;color:#787c82;font-size:12px}.link-to-original a{padding-right:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-left:10px;float:right}.description-thin{width:calc(50% - 5px)}.menu-item-settings .description-thin+.description-thin{margin-left:0}.description-wide{width:100%}.menu-item-actions{padding-top:15px;padding-bottom:7px}#cancel-save{cursor:pointer}.nav-menus-php .major-publishing-actions{clear:both;padding:10px 0;line-height:2.15384615}.nav-menus-php .major-publishing-actions .publishing-action{text-align:left;float:left}.nav-menus-php .delete-action{float:right;line-height:2.1}.nav-menus-php .major-publishing-actions .form-invalid{padding-right:4px;margin-right:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}}@media screen and (max-width:782px){body.nav-menus-php,body.wp-customizer{min-width:0!important}#nav-menus-frame{margin-right:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-right:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}#menu-name{width:100%}.nav-menus-php #nav-menu-header .major-publishing-actions .publishing-action{padding-top:1em}.nav-menus-php .delete-action{font-size:14px;line-height:2.14285714}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide{width:100%}.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings-group{padding-right:0;overflow:visible}.menu-settings-group-name{float:none;width:auto;margin-right:0;margin-bottom:15px}.menu-settings-input{float:none;margin-bottom:15px}.menu-edit .checkbox-input{margin-top:0}.manage-menus select{margin:.5em 0}.wp-core-ui .manage-menus .button{margin-bottom:0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}} \ No newline at end of file +.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 8px 4px 5px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}.has-no-menu-item .button-controls{display:none}#nav-menus-frame{margin-right:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-right:-300px;clear:both;float:right;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.is-submenu{color:#50575e;font-style:italic;font-weight:400;margin-right:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fff}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-left:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #f0f0f1;margin-top:2em}.menu-settings-group{margin:0 0 10px;overflow:hidden;padding-right:20%}.menu-settings-group:last-of-type{margin-bottom:0}.menu-settings-input{float:right;margin:0;width:100%}.menu-settings-group-name{float:right;clear:both;width:25%;padding:3px 0 0;margin-right:-25%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#787c82;font-size:11px}#menu-management-liquid{float:right;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-left:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px;border-top:1px solid #fff;border-bottom:1px solid #dcdcde;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px;background:#f6f7f7}#nav-menu-header{border-bottom:1px solid #dcdcde;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-left:7px}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}.nav-menus-php #post-body-content .post-body-plain{margin-bottom:0}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:left;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-title label{font-weight:600}.menu-location-menus select{float:right}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:right;width:160px;margin-left:5px}.locations-row-links{float:right;margin:6px 6px 0 0}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-left:3px;border-left:1px solid #c3c4c7}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:left}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:left}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}#cancel-save{text-decoration:underline;font-size:12px;margin-right:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:left}.list-controls{float:right;margin-top:5px}.add-to-menu{float:left}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0 0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:right;margin-top:5px;padding-left:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:right;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px 0 0 -10px}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0;margin-bottom:5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-left:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}.menu-item-title .post-state{font-weight:600}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #dcdcde;position:relative;padding:10px 15px;height:auto;min-height:20px;max-width:382px;line-height:2.30769230;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#8c8f94}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#facfd2;border-color:#ffabaf}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f86368}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:1.53846153;display:block;margin-left:13em}.menu-item-handle .menu-item-title.no-title{color:#787c82}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:9px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:9px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-right:0}.menu-item-depth-1{margin-right:30px}.menu-item-depth-2{margin-right:60px}.menu-item-depth-3{margin-right:90px}.menu-item-depth-4{margin-right:120px}.menu-item-depth-5{margin-right:150px}.menu-item-depth-6{margin-right:180px}.menu-item-depth-7{margin-right:210px}.menu-item-depth-8{margin-right:240px}.menu-item-depth-9{margin-right:270px}.menu-item-depth-10{margin-right:300px}.menu-item-depth-11{margin-right:330px}.menu-item-depth-0 .menu-item-transport{margin-right:0}.menu-item-depth-1 .menu-item-transport{margin-right:-30px}.menu-item-depth-2 .menu-item-transport{margin-right:-60px}.menu-item-depth-3 .menu-item-transport{margin-right:-90px}.menu-item-depth-4 .menu-item-transport{margin-right:-120px}.menu-item-depth-5 .menu-item-transport{margin-right:-150px}.menu-item-depth-6 .menu-item-transport{margin-right:-180px}.menu-item-depth-7 .menu-item-transport{margin-right:-210px}.menu-item-depth-8 .menu-item-transport{margin-right:-240px}.menu-item-depth-9 .menu-item-transport{margin-right:-270px}.menu-item-depth-10 .menu-item-transport{margin-right:-300px}.menu-item-depth-11 .menu-item-transport{margin-right:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#646970;font-size:12px;line-height:1.5}.item-controls{font-size:12px;position:absolute;left:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-left:10px}.nav-menus-php .item-edit{position:absolute;left:-20px;top:0;display:block;width:30px;height:40px;outline:0}.no-js.nav-menus-php .item-edit{position:static;float:left;width:auto;height:auto;margin:12px 0 12px -10px;padding:0;color:#2271b1;text-decoration:underline;font-size:12px;line-height:1.5}.no-js.nav-menus-php .item-edit .screen-reader-text{position:static;-webkit-clip-path:none;clip-path:none;width:auto;height:auto;margin:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-right:4px;width:20px;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.js.nav-menus-php .item-edit:focus{box-shadow:none}.nav-menus-php .item-edit:focus:before{box-shadow:0 0 0 1px #4f94d4,0 0 2px 1px rgba(79,148,212,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;max-width:392px;padding:10px;position:relative;z-index:10;border:1px solid #c3c4c7;border-top:none;box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move{margin:3px 0 5px;line-height:1.5}.field-move-visual-label{float:right;margin-left:4px}.menu-item-settings .field-move .button-link{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em -10px;text-align:center}.add-menu-item-pagelinks .page-numbers{display:inline-block;min-width:20px}.add-menu-item-pagelinks .page-numbers.dots{min-width:0}.link-to-original{display:block;margin:0 0 15px;padding:3px 5px 5px;border:1px solid #dcdcde;color:#787c82;font-size:12px}.link-to-original a{padding-right:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-left:10px;float:right}.description-thin{width:calc(50% - 5px)}.menu-item-settings .description-thin+.description-thin{margin-left:0}.description-wide{width:100%}.menu-item-actions{padding-top:15px;padding-bottom:7px}#cancel-save{cursor:pointer}.nav-menus-php .major-publishing-actions{clear:both;padding:10px 0;line-height:2.15384615}.nav-menus-php .major-publishing-actions .publishing-action{text-align:left;float:left}.nav-menus-php .delete-action{float:right;line-height:2.1}.nav-menus-php .major-publishing-actions .form-invalid{padding-right:4px;margin-right:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}}@media screen and (max-width:782px){body.nav-menus-php,body.wp-customizer{min-width:0!important}#nav-menus-frame{margin-right:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-right:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}#menu-name{width:100%}.nav-menus-php #nav-menu-header .major-publishing-actions .publishing-action{padding-top:1em}.nav-menus-php .delete-action{font-size:14px;line-height:2.14285714}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide{width:100%}.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings-group{padding-right:0;overflow:visible}.menu-settings-group-name{float:none;width:auto;margin-right:0;margin-bottom:15px}.menu-settings-input{float:none;margin-bottom:15px}.menu-edit .checkbox-input{margin-top:0}.manage-menus select{margin:.5em 0}.wp-core-ui .manage-menus .button{margin-bottom:0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (min-width:783px){@supports ((position:-webkit-sticky) or (position:sticky)) and (scroll-margin-bottom:130px){#nav-menu-footer{position:-webkit-sticky;position:sticky;bottom:0;z-index:10;box-shadow:0 -1px 0 0 #ddd}#save_menu_header{display:none}}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}} \ No newline at end of file diff --git a/wp-admin/css/nav-menus.css b/wp-admin/css/nav-menus.css index e92923d849..b243fc036c 100644 --- a/wp-admin/css/nav-menus.css +++ b/wp-admin/css/nav-menus.css @@ -891,6 +891,23 @@ body.menu-max-depth-11 { min-width: 1280px !important; } } } +@media only screen and (min-width: 783px) { + @supports ((position: -webkit-sticky) or (position: sticky)) and (scroll-margin-bottom: 130px) { + + #nav-menu-footer { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 10; + box-shadow: 0 -1px 0 0px #ddd; + } + + #save_menu_header { + display: none; + } + } +} + @media only screen and (max-width: 768px) { /* menu locations */ #menu-locations-wrap .widefat { diff --git a/wp-admin/css/nav-menus.min.css b/wp-admin/css/nav-menus.min.css index 1ea2e271ca..07b50650f1 100644 --- a/wp-admin/css/nav-menus.min.css +++ b/wp-admin/css/nav-menus.min.css @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 5px 4px 8px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}.has-no-menu-item .button-controls{display:none}#nav-menus-frame{margin-left:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.is-submenu{color:#50575e;font-style:italic;font-weight:400;margin-left:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fff}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-right:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #f0f0f1;margin-top:2em}.menu-settings-group{margin:0 0 10px;overflow:hidden;padding-left:20%}.menu-settings-group:last-of-type{margin-bottom:0}.menu-settings-input{float:left;margin:0;width:100%}.menu-settings-group-name{float:left;clear:both;width:25%;padding:3px 0 0;margin-left:-25%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#787c82;font-size:11px}#menu-management-liquid{float:left;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px;border-top:1px solid #fff;border-bottom:1px solid #dcdcde;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px;background:#f6f7f7}#nav-menu-header{border-bottom:1px solid #dcdcde;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-right:7px}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}.nav-menus-php #post-body-content .post-body-plain{margin-bottom:0}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-title label{font-weight:600}.menu-location-menus select{float:left}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:left;width:160px;margin-right:5px}.locations-row-links{float:left;margin:6px 0 0 6px}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-right:3px;border-right:1px solid #c3c4c7}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:right}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:right}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0 0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:left;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px -10px 0 0}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0;margin-bottom:5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-right:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}.menu-item-title .post-state{font-weight:600}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #dcdcde;position:relative;padding:10px 15px;height:auto;min-height:20px;max-width:382px;line-height:2.30769230;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#8c8f94}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#facfd2;border-color:#ffabaf}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f86368}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:1.53846153;display:block;margin-right:13em}.menu-item-handle .menu-item-title.no-title{color:#787c82}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:9px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:9px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#646970;font-size:12px;line-height:1.5}.item-controls{font-size:12px;position:absolute;right:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-right:10px}.nav-menus-php .item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:40px;outline:0}.no-js.nav-menus-php .item-edit{position:static;float:right;width:auto;height:auto;margin:12px -10px 12px 0;padding:0;color:#2271b1;text-decoration:underline;font-size:12px;line-height:1.5}.no-js.nav-menus-php .item-edit .screen-reader-text{position:static;-webkit-clip-path:none;clip-path:none;width:auto;height:auto;margin:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-left:4px;width:20px;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.js.nav-menus-php .item-edit:focus{box-shadow:none}.nav-menus-php .item-edit:focus:before{box-shadow:0 0 0 1px #4f94d4,0 0 2px 1px rgba(79,148,212,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;max-width:392px;padding:10px;position:relative;z-index:10;border:1px solid #c3c4c7;border-top:none;box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move{margin:3px 0 5px;line-height:1.5}.field-move-visual-label{float:left;margin-right:4px}.menu-item-settings .field-move .button-link{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em -10px;text-align:center}.add-menu-item-pagelinks .page-numbers{display:inline-block;min-width:20px}.add-menu-item-pagelinks .page-numbers.dots{min-width:0}.link-to-original{display:block;margin:0 0 15px;padding:3px 5px 5px;border:1px solid #dcdcde;color:#787c82;font-size:12px}.link-to-original a{padding-left:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:calc(50% - 5px)}.menu-item-settings .description-thin+.description-thin{margin-right:0}.description-wide{width:100%}.menu-item-actions{padding-top:15px;padding-bottom:7px}#cancel-save{cursor:pointer}.nav-menus-php .major-publishing-actions{clear:both;padding:10px 0;line-height:2.15384615}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right}.nav-menus-php .delete-action{float:left;line-height:2.1}.nav-menus-php .major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}}@media screen and (max-width:782px){body.nav-menus-php,body.wp-customizer{min-width:0!important}#nav-menus-frame{margin-left:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-left:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}#menu-name{width:100%}.nav-menus-php #nav-menu-header .major-publishing-actions .publishing-action{padding-top:1em}.nav-menus-php .delete-action{font-size:14px;line-height:2.14285714}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide{width:100%}.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings-group{padding-left:0;overflow:visible}.menu-settings-group-name{float:none;width:auto;margin-left:0;margin-bottom:15px}.menu-settings-input{float:none;margin-bottom:15px}.menu-edit .checkbox-input{margin-top:0}.manage-menus select{margin:.5em 0}.wp-core-ui .manage-menus .button{margin-bottom:0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}} \ No newline at end of file +.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 5px 4px 8px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}.has-no-menu-item .button-controls{display:none}#nav-menus-frame{margin-left:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.is-submenu{color:#50575e;font-style:italic;font-weight:400;margin-left:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fff}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-right:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #f0f0f1;margin-top:2em}.menu-settings-group{margin:0 0 10px;overflow:hidden;padding-left:20%}.menu-settings-group:last-of-type{margin-bottom:0}.menu-settings-input{float:left;margin:0;width:100%}.menu-settings-group-name{float:left;clear:both;width:25%;padding:3px 0 0;margin-left:-25%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#787c82;font-size:11px}#menu-management-liquid{float:left;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px;border-top:1px solid #fff;border-bottom:1px solid #dcdcde;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px;background:#f6f7f7}#nav-menu-header{border-bottom:1px solid #dcdcde;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-right:7px}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}.nav-menus-php #post-body-content .post-body-plain{margin-bottom:0}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-title label{font-weight:600}.menu-location-menus select{float:left}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:left;width:160px;margin-right:5px}.locations-row-links{float:left;margin:6px 0 0 6px}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-right:3px;border-right:1px solid #c3c4c7}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:right}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:right}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0 0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:left;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px -10px 0 0}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0;margin-bottom:5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-right:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}.menu-item-title .post-state{font-weight:600}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #dcdcde;position:relative;padding:10px 15px;height:auto;min-height:20px;max-width:382px;line-height:2.30769230;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#8c8f94}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#facfd2;border-color:#ffabaf}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f86368}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:1.53846153;display:block;margin-right:13em}.menu-item-handle .menu-item-title.no-title{color:#787c82}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:9px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:9px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#646970;font-size:12px;line-height:1.5}.item-controls{font-size:12px;position:absolute;right:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-right:10px}.nav-menus-php .item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:40px;outline:0}.no-js.nav-menus-php .item-edit{position:static;float:right;width:auto;height:auto;margin:12px -10px 12px 0;padding:0;color:#2271b1;text-decoration:underline;font-size:12px;line-height:1.5}.no-js.nav-menus-php .item-edit .screen-reader-text{position:static;-webkit-clip-path:none;clip-path:none;width:auto;height:auto;margin:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-left:4px;width:20px;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.js.nav-menus-php .item-edit:focus{box-shadow:none}.nav-menus-php .item-edit:focus:before{box-shadow:0 0 0 1px #4f94d4,0 0 2px 1px rgba(79,148,212,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;max-width:392px;padding:10px;position:relative;z-index:10;border:1px solid #c3c4c7;border-top:none;box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move{margin:3px 0 5px;line-height:1.5}.field-move-visual-label{float:left;margin-right:4px}.menu-item-settings .field-move .button-link{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em -10px;text-align:center}.add-menu-item-pagelinks .page-numbers{display:inline-block;min-width:20px}.add-menu-item-pagelinks .page-numbers.dots{min-width:0}.link-to-original{display:block;margin:0 0 15px;padding:3px 5px 5px;border:1px solid #dcdcde;color:#787c82;font-size:12px}.link-to-original a{padding-left:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:calc(50% - 5px)}.menu-item-settings .description-thin+.description-thin{margin-right:0}.description-wide{width:100%}.menu-item-actions{padding-top:15px;padding-bottom:7px}#cancel-save{cursor:pointer}.nav-menus-php .major-publishing-actions{clear:both;padding:10px 0;line-height:2.15384615}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right}.nav-menus-php .delete-action{float:left;line-height:2.1}.nav-menus-php .major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}}@media screen and (max-width:782px){body.nav-menus-php,body.wp-customizer{min-width:0!important}#nav-menus-frame{margin-left:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-left:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}#menu-name{width:100%}.nav-menus-php #nav-menu-header .major-publishing-actions .publishing-action{padding-top:1em}.nav-menus-php .delete-action{font-size:14px;line-height:2.14285714}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide{width:100%}.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings-group{padding-left:0;overflow:visible}.menu-settings-group-name{float:none;width:auto;margin-left:0;margin-bottom:15px}.menu-settings-input{float:none;margin-bottom:15px}.menu-edit .checkbox-input{margin-top:0}.manage-menus select{margin:.5em 0}.wp-core-ui .manage-menus .button{margin-bottom:0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (min-width:783px){@supports ((position:-webkit-sticky) or (position:sticky)) and (scroll-margin-bottom:130px){#nav-menu-footer{position:-webkit-sticky;position:sticky;bottom:0;z-index:10;box-shadow:0 -1px 0 0 #ddd}#save_menu_header{display:none}}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}} \ No newline at end of file diff --git a/wp-admin/js/nav-menu.js b/wp-admin/js/nav-menu.js index 03da8bc65b..12e02a3036 100644 --- a/wp-admin/js/nav-menu.js +++ b/wp-admin/js/nav-menu.js @@ -1331,6 +1331,27 @@ }; - $(document).ready(function(){ wpNavMenu.init(); }); + $(document).ready(function() { -})(jQuery); + wpNavMenu.init(); + + // Prevent focused element from being hidden by the sticky footer. + $( '.menu-edit a, .menu-edit button, .menu-edit input, .menu-edit textarea, .menu-edit select' ).on('focus', function() { + if ( window.innerWidth >= 783 ) { + var navMenuHeight = $( '#nav-menu-footer' ).height() + 20; + var bottomOffset = $(this).offset().top - ( $(window).scrollTop() + $(window).height() - $(this).height() ); + + if ( bottomOffset > 0 ) { + bottomOffset = 0; + } + bottomOffset = bottomOffset * -1; + + if( bottomOffset < navMenuHeight ) { + var scrollTop = $(document).scrollTop(); + $(document).scrollTop( scrollTop + ( navMenuHeight - bottomOffset ) ); + } + } + }); + }); + +})(jQuery); \ No newline at end of file diff --git a/wp-admin/js/nav-menu.min.js b/wp-admin/js/nav-menu.min.js index 83461488d8..9f4ac718e3 100644 --- a/wp-admin/js/nav-menu.min.js +++ b/wp-admin/js/nav-menu.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(I){var k=window.wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11,sortableItems:"> *",targetTolerance:0},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,lastSearch:"",init:function(){k.menuList=I("#menu-to-edit"),k.targetList=k.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachMenuSaveSubmitListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),k.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&I("#posttype-page").addSelectedToMenu(k.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){I.fn.extend({menuItemDepth:function(){var e=k.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return k.pxToDepth(e&&-1!=e.indexOf("px")?e.slice(0,-2):0)},updateDepthClass:function(t,n){return this.each(function(){var e=I(this);n=n||e.menuItemDepth(),I(this).removeClass("menu-item-depth-"+n).addClass("menu-item-depth-"+t)})},shiftDepthClass:function(i){return this.each(function(){var e=I(this),t=e.menuItemDepth(),n=t+i;e.removeClass("menu-item-depth-"+t).addClass("menu-item-depth-"+n),0===n&&e.find(".is-submenu").hide()})},childMenuItems:function(){var i=I();return this.each(function(){for(var e=I(this),t=e.menuItemDepth(),n=e.next(".menu-item");n.length&&n.menuItemDepth()>t;)i=i.add(n),n=n.next(".menu-item")}),i},shiftHorizontally:function(i){return this.each(function(){var e=I(this),t=e.menuItemDepth(),n=t+i;e.moveHorizontally(n,t)})},moveHorizontally:function(a,s){return this.each(function(){var e=I(this),t=e.childMenuItems(),i=a-s,n=e.find(".is-submenu");e.updateDepthClass(a,s).updateParentMenuItemDBId(),t&&t.each(function(){var e=I(this),t=e.menuItemDepth(),n=t+i;e.updateDepthClass(n,t).updateParentMenuItemDBId()}),0===a?n.hide():n.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var e=I(this),t=e.find(".menu-item-data-parent-id"),n=parseInt(e.menuItemDepth(),10),i=n-1,i=e.prevAll(".menu-item-depth-"+i).first();0===n?t.val(0):t.val(i.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var e=I(this);I(".hide-column-tog").not(":checked").each(function(){e.find(".field-"+I(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(a){return 0!==I("#menu-to-edit").length&&this.each(function(){var e=I(this),n={},t=menus.oneThemeLocationNoMenus&&0===e.find(".tabs-panel-active .categorychecklist li input:checked").length?e.find('#page-all li input[type="checkbox"]'):e.find(".tabs-panel-active .categorychecklist li input:checked"),i=/menu-item\[([^\]]*)/;if(a=a||k.addMenuItemToBottom,!t.length)return!1;e.find(".button-controls .spinner").addClass("is-active"),I(t).each(function(){var e=I(this),t=i.exec(e.attr("name")),t=void 0===t[1]?0:parseInt(t[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(a=k.addMenuItemToTop),n[t]=e.closest("li").getItemData("add-menu-item",t)}),k.addItemToMenu(n,a,function(){t.prop("checked",!1),e.find(".button-controls .select-all").prop("checked",!1),e.find(".button-controls .spinner").removeClass("is-active")})})},getItemData:function(t,n){t=t||"menu-item";var i,a={},s=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return(n=n||"menu-item"!=t?n:this.find(".menu-item-data-db-id").val())&&this.find("input").each(function(){var e;for(i=s.length;i--;)"menu-item"==t?e=s[i]+"["+n+"]":"add-menu-item"==t&&(e="menu-item["+n+"]["+s[i]+"]"),this.name&&e==this.name&&(a[s[i]]=this.value)}),a},setItemData:function(e,a,s){return a=a||"menu-item",(s=s||"menu-item"!=a?s:I(".menu-item-data-db-id",this).val())&&this.find("input").each(function(){var n,i=I(this);I.each(e,function(e,t){"menu-item"==a?n=e+"["+s+"]":"add-menu-item"==a&&(n="menu-item["+s+"]["+e+"]"),n==i.attr("name")&&i.val(t)})}),this}})},countMenuItems:function(e){return I(".menu-item-depth-"+e).length},moveMenuItem:function(e,t){var n,i,a=I("#menu-to-edit li"),s=a.length,m=e.parents("li.menu-item"),o=m.childMenuItems(),u=m.getItemData(),c=parseInt(m.menuItemDepth(),10),r=parseInt(m.index(),10),l=m.next(),d=l.childMenuItems(),h=parseInt(l.menuItemDepth(),10)+1,p=m.prev(),f=parseInt(p.menuItemDepth(),10),v=p.getItemData()["menu-item-db-id"];switch(t){case"up":if(i=r-1,0===r)break;0==i&&0!==c&&m.moveHorizontally(0,c),0!==f&&m.moveHorizontally(f,c),(o?n=m.add(o):m).detach().insertBefore(a.eq(i)).updateParentMenuItemDBId();break;case"down":if(o){if(n=m.add(o),(d=0!==(l=a.eq(n.length+r)).childMenuItems().length)&&(i=parseInt(l.menuItemDepth(),10)+1,m.moveHorizontally(i,c)),s===r+n.length)break;n.detach().insertAfter(a.eq(r+n.length)).updateParentMenuItemDBId()}else{if(0!==d.length&&m.moveHorizontally(h,c),s===r+1)break;m.detach().insertAfter(a.eq(r+1)).updateParentMenuItemDBId()}break;case"top":if(0===r)break;(o?n=m.add(o):m).detach().insertBefore(a.eq(0)).updateParentMenuItemDBId();break;case"left":if(0===c)break;m.shiftHorizontally(-1);break;case"right":if(0===r)break;if(u["menu-item-parent-id"]===v)break;m.shiftHorizontally(1)}e.trigger("focus"),k.registerChange(),k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility()},initAccessibility:function(){var e=I("#menu-to-edit");k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility(),e.on("mouseenter.refreshAccessibility focus.refreshAccessibility touchstart.refreshAccessibility",".menu-item",function(){k.refreshAdvancedAccessibilityOfItem(I(this).find("a.item-edit"))}),e.on("click","a.item-edit",function(){k.refreshAdvancedAccessibilityOfItem(I(this))}),e.on("click",".menus-move",function(){var e=I(this).data("dir");void 0!==e&&k.moveMenuItem(I(this).parents("li.menu-item").find("a.item-edit"),e)})},refreshAdvancedAccessibilityOfItem:function(e){var t,n,i,a,s,m,o,u,c,r,l,d,h;!0===I(e).data("needs_accessibility_refresh")&&(u=0===(o=(m=(s=I(e)).closest("li.menu-item").first()).menuItemDepth()),c=s.closest(".menu-item-handle").find(".menu-item-title").text(),r=parseInt(m.index(),10),h=u?o:parseInt(o-1,10),l=m.prevAll(".menu-item-depth-"+h).first().find(".menu-item-title").text(),d=m.prevAll(".menu-item-depth-"+o).first().find(".menu-item-title").text(),e=I("#menu-to-edit li").length,h=m.nextAll(".menu-item-depth-"+o).length,m.find(".field-move").toggle(1k.options.globalMaxDepth?k.options.globalMaxDepth:e:0}function b(e,t){e.placeholder.updateDepthClass(t,h),h=t}0!==I("#menu-to-edit li").length&&I(".drag-instructions").show(),p+=k.isRTL?k.menuList.width():0,k.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",items:k.options.sortableItems,start:function(e,t){var n,i;k.isRTL&&(t.item[0].style.right="auto"),l=t.item.children(".menu-item-transport"),s=t.item.menuItemDepth(),b(t,s),i=(t.item.next()[0]==t.placeholder[0]?t.item.next():t.item).childMenuItems(),l.append(i),n=l.outerHeight(),n+=0c&&(o.after(t.placeholder),g(t),I(this).sortable("refreshPositions"))}})},initManageLocations:function(){I("#menu-locations-wrap form").on("submit",function(){window.onbeforeunload=null}),I(".menu-location-menus select").on("change",function(){var e=I(this).closest("tr").find(".locations-edit-menu-link");I(this).find("option:selected").data("orig")?e.show():e.hide()})},attachMenuEditListeners:function(){var t=this;I("#update-nav-menu").on("click",function(e){if(e.target&&e.target.className)return-1!=e.target.className.indexOf("item-edit")?t.eventOnClickEditLink(e.target):-1!=e.target.className.indexOf("menu-save")?t.eventOnClickMenuSave(e.target):-1!=e.target.className.indexOf("menu-delete")?t.eventOnClickMenuDelete(e.target):-1!=e.target.className.indexOf("item-delete")?t.eventOnClickMenuItemDelete(e.target):-1!=e.target.className.indexOf("item-cancel")?t.eventOnClickCancelLink(e.target):void 0}),I("#menu-name").on("input",_.debounce(function(){var e=I(document.getElementById("menu-name")),t=e.val();t&&t.replace(/\s+/,"")?e.parent().removeClass("form-invalid"):e.parent().addClass("form-invalid")},500)),I('#add-custom-links input[type="text"]').on("keypress",function(e){I("#customlinkdiv").removeClass("form-invalid"),13===e.keyCode&&(e.preventDefault(),I("#submit-customlinkdiv").click())})},attachMenuSaveSubmitListeners:function(){I("#update-nav-menu").on("submit",function(){var e=I("#update-nav-menu").serializeArray();I('[name="nav-menu-data"]').val(JSON.stringify(e))})},attachThemeLocationsListeners:function(){var e=I("#nav-menu-theme-locations"),t={action:"menu-locations-save"};t["menu-settings-column-nonce"]=I("#menu-settings-column-nonce").val(),e.find('input[type="submit"]').on("click",function(){return e.find("select").each(function(){t[this.name]=I(this).val()}),e.find(".spinner").addClass("is-active"),I.post(ajaxurl,t,function(){e.find(".spinner").removeClass("is-active")}),!1})},attachQuickSearchListeners:function(){var t;I("#nav-menu-meta").on("submit",function(e){e.preventDefault()}),I("#nav-menu-meta").on("input",".quick-search",function(){var e=I(this);e.attr("autocomplete","off"),t&&clearTimeout(t),t=setTimeout(function(){k.updateQuickSearchResults(e)},500)}).on("blur",".quick-search",function(){k.lastSearch=""})},updateQuickSearchResults:function(e){var t,n,i=e.val();i.length<2||k.lastSearch==i||(k.lastSearch=i,t=e.parents(".tabs-panel"),n={action:"menu-quick-search","response-format":"markup",menu:I("#menu").val(),"menu-settings-column-nonce":I("#menu-settings-column-nonce").val(),q:i,type:e.attr("name")},I(".spinner",t).addClass("is-active"),I.post(ajaxurl,n,function(e){k.processQuickSearchQueryResponse(e,n,t)}))},addCustomLink:function(e){var t=I("#custom-menu-item-url").val().toString(),n=I("#custom-menu-item-name").val();if(""!==t&&(t=t.trim()),e=e||k.addMenuItemToBottom,""===t||"https://"==t||"http://"==t)return I("#customlinkdiv").addClass("form-invalid"),!1;I(".customlinkdiv .spinner").addClass("is-active"),this.addLinkToMenu(t,n,e,function(){I(".customlinkdiv .spinner").removeClass("is-active"),I("#custom-menu-item-name").val("").blur(),I("#custom-menu-item-url").val("").attr("placeholder","https://")})},addLinkToMenu:function(e,t,n,i){n=n||k.addMenuItemToBottom,i=i||function(){},k.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":t}},n,i)},addItemToMenu:function(e,n,i){var a,t=I("#menu").val(),s=I("#menu-settings-column-nonce").val();n=n||function(){},i=i||function(){},a={action:"add-menu-item",menu:t,"menu-settings-column-nonce":s,"menu-item":e},I.post(ajaxurl,a,function(e){var t=I("#menu-instructions");e=(e=e||"").toString().trim(),n(e,a),I("li.pending").hide().fadeIn("slow"),I(".drag-instructions").show(),!t.hasClass("menu-instructions-inactive")&&t.siblings().length&&t.addClass("menu-instructions-inactive"),i()})},addMenuItemToBottom:function(e){e=I(e);e.hideAdvancedMenuItemFields().appendTo(k.targetList),k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility(),I(document).trigger("menu-item-added",[e])},addMenuItemToTop:function(e){e=I(e);e.hideAdvancedMenuItemFields().prependTo(k.targetList),k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility(),I(document).trigger("menu-item-added",[e])},attachUnsavedChangesListener:function(){I("#menu-management input, #menu-management select, #menu-management, #menu-management textarea, .menu-location-menus select").on("change",function(){k.registerChange()}),0!==I("#menu-to-edit").length||0!==I(".menu-location-menus select").length?window.onbeforeunload=function(){if(k.menusChanged)return wp.i18n.__("The changes you made will be lost if you navigate away from this page.")}:I("#menu-settings-column").find("input,select").end().find("a").attr("href","#").unbind("click")},registerChange:function(){k.menusChanged=!0},attachTabsPanelListeners:function(){I("#menu-settings-column").on("click",function(e){var t,n,i,a,s=I(e.target);if(s.hasClass("nav-tab-link"))n=s.data("type"),i=s.parents(".accordion-section-content").first(),I("input",i).prop("checked",!1),I(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),I("#"+n,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),I(".tabs",i).removeClass("tabs"),s.parent().addClass("tabs"),I(".quick-search",i).trigger("focus"),i.find(".tabs-panel-active .menu-item-title").length?i.removeClass("has-no-menu-item"):i.addClass("has-no-menu-item"),e.preventDefault();else if(s.hasClass("select-all"))(t=s.closest(".button-controls").data("items-type"))&&((a=I("#"+t+" .tabs-panel-active .menu-item-title input")).length!==a.filter(":checked").length||s.is(":checked")?s.is(":checked")&&a.prop("checked",!0):a.prop("checked",!1));else if(s.hasClass("menu-item-checkbox"))(t=s.closest(".tabs-panel-active").parent().attr("id"))&&(a=I("#"+t+" .tabs-panel-active .menu-item-title input"),t=I('.button-controls[data-items-type="'+t+'"] .select-all'),a.length!==a.filter(":checked").length||t.is(":checked")?t.is(":checked")&&t.prop("checked",!1):t.prop("checked",!0));else if(s.hasClass("submit-add-to-menu"))return k.registerChange(),e.target.id&&"submit-customlinkdiv"==e.target.id?k.addCustomLink(k.addMenuItemToBottom):e.target.id&&-1!=e.target.id.indexOf("submit-")&&I("#"+e.target.id.replace(/submit-/,"")).addSelectedToMenu(k.addMenuItemToBottom),!1}),I("#nav-menu-meta").on("click","a.page-numbers",function(){var n=I(this).closest(".inside");return I.post(ajaxurl,this.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(e){var t=I.parseJSON(e);-1!==e.indexOf("replace-id")&&(e=document.getElementById(t["replace-id"]),t.markup&&e&&n.html(t.markup))}),!1})},eventOnClickEditLink:function(e){var t,n,e=/#(.*)$/.exec(e.href);if(e&&e[1]&&0!==(n=(t=I("#"+e[1])).parent()).length)return n.hasClass("menu-item-edit-inactive")?(t.data("menu-item-data")||t.data("menu-item-data",t.getItemData()),t.slideDown("fast"),n.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")):(t.slideUp("fast"),n.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")),!1},eventOnClickCancelLink:function(e){var t=I(e).closest(".menu-item-settings"),e=I(e).closest(".menu-item");return e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive"),t.setItemData(t.data("menu-item-data")).hide(),e.find(".menu-item-title").text(t.data("menu-item-data")["menu-item-title"]),!1},eventOnClickMenuSave:function(){var e="",t=I("#menu-name"),n=t.val();return n&&n.replace(/\s+/,"")?(I("#nav-menu-theme-locations select").each(function(){e+=''}),I("#update-nav-menu").append(e),k.menuList.find(".menu-item-data-position").val(function(e){return e+1}),!(window.onbeforeunload=null)):(t.parent().addClass("form-invalid"),!1)},eventOnClickMenuDelete:function(){return!!window.confirm(wp.i18n.__("You are about to permanently delete this menu.\n'Cancel' to stop, 'OK' to delete."))&&!(window.onbeforeunload=null)},eventOnClickMenuItemDelete:function(e){e=parseInt(e.id.replace("delete-",""),10);return k.removeMenuItem(I("#menu-item-"+e)),k.registerChange(),!1},processQuickSearchQueryResponse:function(e,t,n){var i,a,s,m={},o=document.getElementById("nav-menu-meta"),u=/menu-item[(\[^]\]*/,c=I("
").html(e).find("li"),r=n.closest(".accordion-section-content"),e=r.find(".button-controls .select-all");if(!c.length)return I(".categorychecklist",n).html("
  • "+wp.i18n.__("No results found.")+"

  • "),I(".spinner",n).removeClass("is-active"),void r.addClass("has-no-menu-item");c.each(function(){if(s=I(this),(i=u.exec(s.html()))&&i[1]){for(a=i[1];o.elements["menu-item["+a+"][menu-item-type]"]||m[a];)a--;m[a]=!0,a!=i[1]&&s.html(s.html().replace(new RegExp("menu-item\\["+i[1]+"\\]","g"),"menu-item["+a+"]"))}}),I(".categorychecklist",n).html(c),I(".spinner",n).removeClass("is-active"),r.removeClass("has-no-menu-item"),e.is(":checked")&&e.prop("checked",!1)},removeMenuItem:function(t){var n=t.childMenuItems();I(document).trigger("menu-removing-item",[t]),t.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=I("#menu-instructions");t.remove(),n.shiftDepthClass(-1).updateParentMenuItemDBId(),0===I("#menu-to-edit li").length&&(I(".drag-instructions").hide(),e.removeClass("menu-instructions-inactive")),k.refreshAdvancedAccessibility()})},depthToPx:function(e){return e*k.options.menuItemDepthPerLevel},pxToDepth:function(e){return Math.floor(e/k.options.menuItemDepthPerLevel)}};I(document).ready(function(){wpNavMenu.init()})}(jQuery); \ No newline at end of file +!function(I){var k=window.wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11,sortableItems:"> *",targetTolerance:0},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,lastSearch:"",init:function(){k.menuList=I("#menu-to-edit"),k.targetList=k.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachMenuSaveSubmitListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),k.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&I("#posttype-page").addSelectedToMenu(k.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){I.fn.extend({menuItemDepth:function(){var e=k.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return k.pxToDepth(e&&-1!=e.indexOf("px")?e.slice(0,-2):0)},updateDepthClass:function(t,n){return this.each(function(){var e=I(this);n=n||e.menuItemDepth(),I(this).removeClass("menu-item-depth-"+n).addClass("menu-item-depth-"+t)})},shiftDepthClass:function(i){return this.each(function(){var e=I(this),t=e.menuItemDepth(),n=t+i;e.removeClass("menu-item-depth-"+t).addClass("menu-item-depth-"+n),0===n&&e.find(".is-submenu").hide()})},childMenuItems:function(){var i=I();return this.each(function(){for(var e=I(this),t=e.menuItemDepth(),n=e.next(".menu-item");n.length&&n.menuItemDepth()>t;)i=i.add(n),n=n.next(".menu-item")}),i},shiftHorizontally:function(i){return this.each(function(){var e=I(this),t=e.menuItemDepth(),n=t+i;e.moveHorizontally(n,t)})},moveHorizontally:function(a,s){return this.each(function(){var e=I(this),t=e.childMenuItems(),i=a-s,n=e.find(".is-submenu");e.updateDepthClass(a,s).updateParentMenuItemDBId(),t&&t.each(function(){var e=I(this),t=e.menuItemDepth(),n=t+i;e.updateDepthClass(n,t).updateParentMenuItemDBId()}),0===a?n.hide():n.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var e=I(this),t=e.find(".menu-item-data-parent-id"),n=parseInt(e.menuItemDepth(),10),i=n-1,i=e.prevAll(".menu-item-depth-"+i).first();0===n?t.val(0):t.val(i.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var e=I(this);I(".hide-column-tog").not(":checked").each(function(){e.find(".field-"+I(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(a){return 0!==I("#menu-to-edit").length&&this.each(function(){var e=I(this),n={},t=menus.oneThemeLocationNoMenus&&0===e.find(".tabs-panel-active .categorychecklist li input:checked").length?e.find('#page-all li input[type="checkbox"]'):e.find(".tabs-panel-active .categorychecklist li input:checked"),i=/menu-item\[([^\]]*)/;if(a=a||k.addMenuItemToBottom,!t.length)return!1;e.find(".button-controls .spinner").addClass("is-active"),I(t).each(function(){var e=I(this),t=i.exec(e.attr("name")),t=void 0===t[1]?0:parseInt(t[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(a=k.addMenuItemToTop),n[t]=e.closest("li").getItemData("add-menu-item",t)}),k.addItemToMenu(n,a,function(){t.prop("checked",!1),e.find(".button-controls .select-all").prop("checked",!1),e.find(".button-controls .spinner").removeClass("is-active")})})},getItemData:function(t,n){t=t||"menu-item";var i,a={},s=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return(n=n||"menu-item"!=t?n:this.find(".menu-item-data-db-id").val())&&this.find("input").each(function(){var e;for(i=s.length;i--;)"menu-item"==t?e=s[i]+"["+n+"]":"add-menu-item"==t&&(e="menu-item["+n+"]["+s[i]+"]"),this.name&&e==this.name&&(a[s[i]]=this.value)}),a},setItemData:function(e,a,s){return a=a||"menu-item",(s=s||"menu-item"!=a?s:I(".menu-item-data-db-id",this).val())&&this.find("input").each(function(){var n,i=I(this);I.each(e,function(e,t){"menu-item"==a?n=e+"["+s+"]":"add-menu-item"==a&&(n="menu-item["+s+"]["+e+"]"),n==i.attr("name")&&i.val(t)})}),this}})},countMenuItems:function(e){return I(".menu-item-depth-"+e).length},moveMenuItem:function(e,t){var n,i,a=I("#menu-to-edit li"),s=a.length,m=e.parents("li.menu-item"),o=m.childMenuItems(),u=m.getItemData(),c=parseInt(m.menuItemDepth(),10),r=parseInt(m.index(),10),l=m.next(),d=l.childMenuItems(),h=parseInt(l.menuItemDepth(),10)+1,p=m.prev(),f=parseInt(p.menuItemDepth(),10),v=p.getItemData()["menu-item-db-id"];switch(t){case"up":if(i=r-1,0===r)break;0==i&&0!==c&&m.moveHorizontally(0,c),0!==f&&m.moveHorizontally(f,c),(o?n=m.add(o):m).detach().insertBefore(a.eq(i)).updateParentMenuItemDBId();break;case"down":if(o){if(n=m.add(o),(d=0!==(l=a.eq(n.length+r)).childMenuItems().length)&&(i=parseInt(l.menuItemDepth(),10)+1,m.moveHorizontally(i,c)),s===r+n.length)break;n.detach().insertAfter(a.eq(r+n.length)).updateParentMenuItemDBId()}else{if(0!==d.length&&m.moveHorizontally(h,c),s===r+1)break;m.detach().insertAfter(a.eq(r+1)).updateParentMenuItemDBId()}break;case"top":if(0===r)break;(o?n=m.add(o):m).detach().insertBefore(a.eq(0)).updateParentMenuItemDBId();break;case"left":if(0===c)break;m.shiftHorizontally(-1);break;case"right":if(0===r)break;if(u["menu-item-parent-id"]===v)break;m.shiftHorizontally(1)}e.trigger("focus"),k.registerChange(),k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility()},initAccessibility:function(){var e=I("#menu-to-edit");k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility(),e.on("mouseenter.refreshAccessibility focus.refreshAccessibility touchstart.refreshAccessibility",".menu-item",function(){k.refreshAdvancedAccessibilityOfItem(I(this).find("a.item-edit"))}),e.on("click","a.item-edit",function(){k.refreshAdvancedAccessibilityOfItem(I(this))}),e.on("click",".menus-move",function(){var e=I(this).data("dir");void 0!==e&&k.moveMenuItem(I(this).parents("li.menu-item").find("a.item-edit"),e)})},refreshAdvancedAccessibilityOfItem:function(e){var t,n,i,a,s,m,o,u,c,r,l,d,h;!0===I(e).data("needs_accessibility_refresh")&&(u=0===(o=(m=(s=I(e)).closest("li.menu-item").first()).menuItemDepth()),c=s.closest(".menu-item-handle").find(".menu-item-title").text(),r=parseInt(m.index(),10),h=u?o:parseInt(o-1,10),l=m.prevAll(".menu-item-depth-"+h).first().find(".menu-item-title").text(),d=m.prevAll(".menu-item-depth-"+o).first().find(".menu-item-title").text(),e=I("#menu-to-edit li").length,h=m.nextAll(".menu-item-depth-"+o).length,m.find(".field-move").toggle(1k.options.globalMaxDepth?k.options.globalMaxDepth:e:0}function b(e,t){e.placeholder.updateDepthClass(t,h),h=t}0!==I("#menu-to-edit li").length&&I(".drag-instructions").show(),p+=k.isRTL?k.menuList.width():0,k.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",items:k.options.sortableItems,start:function(e,t){var n,i;k.isRTL&&(t.item[0].style.right="auto"),l=t.item.children(".menu-item-transport"),s=t.item.menuItemDepth(),b(t,s),i=(t.item.next()[0]==t.placeholder[0]?t.item.next():t.item).childMenuItems(),l.append(i),n=l.outerHeight(),n+=0c&&(o.after(t.placeholder),g(t),I(this).sortable("refreshPositions"))}})},initManageLocations:function(){I("#menu-locations-wrap form").on("submit",function(){window.onbeforeunload=null}),I(".menu-location-menus select").on("change",function(){var e=I(this).closest("tr").find(".locations-edit-menu-link");I(this).find("option:selected").data("orig")?e.show():e.hide()})},attachMenuEditListeners:function(){var t=this;I("#update-nav-menu").on("click",function(e){if(e.target&&e.target.className)return-1!=e.target.className.indexOf("item-edit")?t.eventOnClickEditLink(e.target):-1!=e.target.className.indexOf("menu-save")?t.eventOnClickMenuSave(e.target):-1!=e.target.className.indexOf("menu-delete")?t.eventOnClickMenuDelete(e.target):-1!=e.target.className.indexOf("item-delete")?t.eventOnClickMenuItemDelete(e.target):-1!=e.target.className.indexOf("item-cancel")?t.eventOnClickCancelLink(e.target):void 0}),I("#menu-name").on("input",_.debounce(function(){var e=I(document.getElementById("menu-name")),t=e.val();t&&t.replace(/\s+/,"")?e.parent().removeClass("form-invalid"):e.parent().addClass("form-invalid")},500)),I('#add-custom-links input[type="text"]').on("keypress",function(e){I("#customlinkdiv").removeClass("form-invalid"),13===e.keyCode&&(e.preventDefault(),I("#submit-customlinkdiv").click())})},attachMenuSaveSubmitListeners:function(){I("#update-nav-menu").on("submit",function(){var e=I("#update-nav-menu").serializeArray();I('[name="nav-menu-data"]').val(JSON.stringify(e))})},attachThemeLocationsListeners:function(){var e=I("#nav-menu-theme-locations"),t={action:"menu-locations-save"};t["menu-settings-column-nonce"]=I("#menu-settings-column-nonce").val(),e.find('input[type="submit"]').on("click",function(){return e.find("select").each(function(){t[this.name]=I(this).val()}),e.find(".spinner").addClass("is-active"),I.post(ajaxurl,t,function(){e.find(".spinner").removeClass("is-active")}),!1})},attachQuickSearchListeners:function(){var t;I("#nav-menu-meta").on("submit",function(e){e.preventDefault()}),I("#nav-menu-meta").on("input",".quick-search",function(){var e=I(this);e.attr("autocomplete","off"),t&&clearTimeout(t),t=setTimeout(function(){k.updateQuickSearchResults(e)},500)}).on("blur",".quick-search",function(){k.lastSearch=""})},updateQuickSearchResults:function(e){var t,n,i=e.val();i.length<2||k.lastSearch==i||(k.lastSearch=i,t=e.parents(".tabs-panel"),n={action:"menu-quick-search","response-format":"markup",menu:I("#menu").val(),"menu-settings-column-nonce":I("#menu-settings-column-nonce").val(),q:i,type:e.attr("name")},I(".spinner",t).addClass("is-active"),I.post(ajaxurl,n,function(e){k.processQuickSearchQueryResponse(e,n,t)}))},addCustomLink:function(e){var t=I("#custom-menu-item-url").val().toString(),n=I("#custom-menu-item-name").val();if(""!==t&&(t=t.trim()),e=e||k.addMenuItemToBottom,""===t||"https://"==t||"http://"==t)return I("#customlinkdiv").addClass("form-invalid"),!1;I(".customlinkdiv .spinner").addClass("is-active"),this.addLinkToMenu(t,n,e,function(){I(".customlinkdiv .spinner").removeClass("is-active"),I("#custom-menu-item-name").val("").blur(),I("#custom-menu-item-url").val("").attr("placeholder","https://")})},addLinkToMenu:function(e,t,n,i){n=n||k.addMenuItemToBottom,i=i||function(){},k.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":t}},n,i)},addItemToMenu:function(e,n,i){var a,t=I("#menu").val(),s=I("#menu-settings-column-nonce").val();n=n||function(){},i=i||function(){},a={action:"add-menu-item",menu:t,"menu-settings-column-nonce":s,"menu-item":e},I.post(ajaxurl,a,function(e){var t=I("#menu-instructions");e=(e=e||"").toString().trim(),n(e,a),I("li.pending").hide().fadeIn("slow"),I(".drag-instructions").show(),!t.hasClass("menu-instructions-inactive")&&t.siblings().length&&t.addClass("menu-instructions-inactive"),i()})},addMenuItemToBottom:function(e){e=I(e);e.hideAdvancedMenuItemFields().appendTo(k.targetList),k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility(),I(document).trigger("menu-item-added",[e])},addMenuItemToTop:function(e){e=I(e);e.hideAdvancedMenuItemFields().prependTo(k.targetList),k.refreshKeyboardAccessibility(),k.refreshAdvancedAccessibility(),I(document).trigger("menu-item-added",[e])},attachUnsavedChangesListener:function(){I("#menu-management input, #menu-management select, #menu-management, #menu-management textarea, .menu-location-menus select").on("change",function(){k.registerChange()}),0!==I("#menu-to-edit").length||0!==I(".menu-location-menus select").length?window.onbeforeunload=function(){if(k.menusChanged)return wp.i18n.__("The changes you made will be lost if you navigate away from this page.")}:I("#menu-settings-column").find("input,select").end().find("a").attr("href","#").unbind("click")},registerChange:function(){k.menusChanged=!0},attachTabsPanelListeners:function(){I("#menu-settings-column").on("click",function(e){var t,n,i,a,s=I(e.target);if(s.hasClass("nav-tab-link"))n=s.data("type"),i=s.parents(".accordion-section-content").first(),I("input",i).prop("checked",!1),I(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),I("#"+n,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),I(".tabs",i).removeClass("tabs"),s.parent().addClass("tabs"),I(".quick-search",i).trigger("focus"),i.find(".tabs-panel-active .menu-item-title").length?i.removeClass("has-no-menu-item"):i.addClass("has-no-menu-item"),e.preventDefault();else if(s.hasClass("select-all"))(t=s.closest(".button-controls").data("items-type"))&&((a=I("#"+t+" .tabs-panel-active .menu-item-title input")).length!==a.filter(":checked").length||s.is(":checked")?s.is(":checked")&&a.prop("checked",!0):a.prop("checked",!1));else if(s.hasClass("menu-item-checkbox"))(t=s.closest(".tabs-panel-active").parent().attr("id"))&&(a=I("#"+t+" .tabs-panel-active .menu-item-title input"),t=I('.button-controls[data-items-type="'+t+'"] .select-all'),a.length!==a.filter(":checked").length||t.is(":checked")?t.is(":checked")&&t.prop("checked",!1):t.prop("checked",!0));else if(s.hasClass("submit-add-to-menu"))return k.registerChange(),e.target.id&&"submit-customlinkdiv"==e.target.id?k.addCustomLink(k.addMenuItemToBottom):e.target.id&&-1!=e.target.id.indexOf("submit-")&&I("#"+e.target.id.replace(/submit-/,"")).addSelectedToMenu(k.addMenuItemToBottom),!1}),I("#nav-menu-meta").on("click","a.page-numbers",function(){var n=I(this).closest(".inside");return I.post(ajaxurl,this.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(e){var t=I.parseJSON(e);-1!==e.indexOf("replace-id")&&(e=document.getElementById(t["replace-id"]),t.markup&&e&&n.html(t.markup))}),!1})},eventOnClickEditLink:function(e){var t,n,e=/#(.*)$/.exec(e.href);if(e&&e[1]&&0!==(n=(t=I("#"+e[1])).parent()).length)return n.hasClass("menu-item-edit-inactive")?(t.data("menu-item-data")||t.data("menu-item-data",t.getItemData()),t.slideDown("fast"),n.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")):(t.slideUp("fast"),n.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")),!1},eventOnClickCancelLink:function(e){var t=I(e).closest(".menu-item-settings"),e=I(e).closest(".menu-item");return e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive"),t.setItemData(t.data("menu-item-data")).hide(),e.find(".menu-item-title").text(t.data("menu-item-data")["menu-item-title"]),!1},eventOnClickMenuSave:function(){var e="",t=I("#menu-name"),n=t.val();return n&&n.replace(/\s+/,"")?(I("#nav-menu-theme-locations select").each(function(){e+=''}),I("#update-nav-menu").append(e),k.menuList.find(".menu-item-data-position").val(function(e){return e+1}),!(window.onbeforeunload=null)):(t.parent().addClass("form-invalid"),!1)},eventOnClickMenuDelete:function(){return!!window.confirm(wp.i18n.__("You are about to permanently delete this menu.\n'Cancel' to stop, 'OK' to delete."))&&!(window.onbeforeunload=null)},eventOnClickMenuItemDelete:function(e){e=parseInt(e.id.replace("delete-",""),10);return k.removeMenuItem(I("#menu-item-"+e)),k.registerChange(),!1},processQuickSearchQueryResponse:function(e,t,n){var i,a,s,m={},o=document.getElementById("nav-menu-meta"),u=/menu-item[(\[^]\]*/,c=I("
    ").html(e).find("li"),r=n.closest(".accordion-section-content"),e=r.find(".button-controls .select-all");if(!c.length)return I(".categorychecklist",n).html("
  • "+wp.i18n.__("No results found.")+"

  • "),I(".spinner",n).removeClass("is-active"),void r.addClass("has-no-menu-item");c.each(function(){if(s=I(this),(i=u.exec(s.html()))&&i[1]){for(a=i[1];o.elements["menu-item["+a+"][menu-item-type]"]||m[a];)a--;m[a]=!0,a!=i[1]&&s.html(s.html().replace(new RegExp("menu-item\\["+i[1]+"\\]","g"),"menu-item["+a+"]"))}}),I(".categorychecklist",n).html(c),I(".spinner",n).removeClass("is-active"),r.removeClass("has-no-menu-item"),e.is(":checked")&&e.prop("checked",!1)},removeMenuItem:function(t){var n=t.childMenuItems();I(document).trigger("menu-removing-item",[t]),t.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=I("#menu-instructions");t.remove(),n.shiftDepthClass(-1).updateParentMenuItemDBId(),0===I("#menu-to-edit li").length&&(I(".drag-instructions").hide(),e.removeClass("menu-instructions-inactive")),k.refreshAdvancedAccessibility()})},depthToPx:function(e){return e*k.options.menuItemDepthPerLevel},pxToDepth:function(e){return Math.floor(e/k.options.menuItemDepthPerLevel)}};I(document).ready(function(){wpNavMenu.init(),I(".menu-edit a, .menu-edit button, .menu-edit input, .menu-edit textarea, .menu-edit select").on("focus",function(){var e,t,n;783<=window.innerWidth&&(e=I("#nav-menu-footer").height()+20,0<(t=I(this).offset().top-(I(window).scrollTop()+I(window).height()-I(this).height()))&&(t=0),(t*=-1)