From 64f686b4c8bf2656203ecc89540be7ab7fdb61cf Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 8 Jul 2014 00:30:14 +0000 Subject: [PATCH] Focus and blur styling (via JS) for the install screen language selector. Props jorbin. See #28577 Built from https://develop.svn.wordpress.org/trunk@29020 git-svn-id: http://core.svn.wordpress.org/trunk@28808 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/install-rtl.css | 11 +++++++- wp-admin/css/install-rtl.min.css | 2 +- wp-admin/css/install.css | 11 +++++++- wp-admin/css/install.min.css | 2 +- wp-admin/includes/upgrade.php | 4 +-- wp-admin/install.php | 1 + wp-admin/js/language-chooser.js | 39 +++++++++++++++++++++++++++++ wp-admin/js/language-chooser.min.js | 1 + wp-admin/setup-config.php | 1 + wp-includes/script-loader.php | 1 + wp-includes/version.php | 2 +- 11 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 wp-admin/js/language-chooser.js create mode 100644 wp-admin/js/language-chooser.min.js diff --git a/wp-admin/css/install-rtl.css b/wp-admin/css/install-rtl.css index fc725c0c3b..dec29a1853 100644 --- a/wp-admin/css/install-rtl.css +++ b/wp-admin/css/install-rtl.css @@ -337,7 +337,6 @@ body.language-chooser { height: 250px; } -/* TODO:add focus style via JS */ .language-chooser fieldset.focus { border-color: #5b9dd9; -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); @@ -355,9 +354,17 @@ body.language-chooser { .language-chooser input:checked + label{ color:white; + background: #777; +} + +.language-chooser .focus input:checked + label{ background: #0074A2; } +.language-chooser label:hover { + background: #eee; +} + .language-chooser label{ display:block; } @@ -373,3 +380,5 @@ body.language-chooser { clip: rect(0 0 0 0); border: 0; } + +} diff --git a/wp-admin/css/install-rtl.min.css b/wp-admin/css/install-rtl.min.css index f531cadc04..e49e0217db 100644 --- a/wp-admin/css/install-rtl.min.css +++ b/wp-admin/css/install-rtl.min.css @@ -1 +1 @@ -html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0074a2;text-decoration:none}a:hover{color:#2ea2cc}h1{border-bottom:1px solid #dedede;clear:both;color:#666;font-size:24px;margin:30px 0;padding:0;padding-bottom:7px;font-weight:400}h2{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}dl,ol,ul{padding:5px 22px 5px 5px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#999;height:84px;font-size:20px;font-weight:400;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}.step{margin:20px 0 15px}.step,th{text-align:right;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;font-family:"Open Sans",sans-serif;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 0 10px 20px;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:right;padding:16px 0 10px 20px;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}input,submit{font-family:"Open Sans",sans-serif}.form-table input[type=password],.form-table input[type=text]{width:206px}.form-table th p{font-weight:400}.form-table.install-success td{vertical-align:middle;padding:16px 0 10px 20px}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 0 5px 5px;padding:5px;text-align:center;width:200px;display:none}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}.message{border:1px solid #c00;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:450px}.language-chooser fieldset{margin:1px;padding:8px;display:block;border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out;outline:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;font-size:16px;font-family:inherit;font-weight:inherit;overflow-y:scroll;height:250px}.language-chooser fieldset.focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wp-core-ui.language-chooser .button.button-hero{font-size:30px;line-height:30px}.language-chooser p{text-align:left}.language-chooser input:checked+label{color:#fff;background:#0074A2}.language-chooser label{display:block}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0} \ No newline at end of file +html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0074a2;text-decoration:none}a:hover{color:#2ea2cc}h1{border-bottom:1px solid #dedede;clear:both;color:#666;font-size:24px;margin:30px 0;padding:0;padding-bottom:7px;font-weight:400}h2{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}dl,ol,ul{padding:5px 22px 5px 5px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#999;height:84px;font-size:20px;font-weight:400;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}.step{margin:20px 0 15px}.step,th{text-align:right;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;font-family:"Open Sans",sans-serif;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 0 10px 20px;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:right;padding:16px 0 10px 20px;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}input,submit{font-family:"Open Sans",sans-serif}.form-table input[type=password],.form-table input[type=text]{width:206px}.form-table th p{font-weight:400}.form-table.install-success td{vertical-align:middle;padding:16px 0 10px 20px}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 0 5px 5px;padding:5px;text-align:center;width:200px;display:none}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}.message{border:1px solid #c00;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:450px}.language-chooser fieldset{margin:1px;padding:8px;display:block;border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out;outline:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;font-size:16px;font-family:inherit;font-weight:inherit;overflow-y:scroll;height:250px}.language-chooser fieldset.focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wp-core-ui.language-chooser .button.button-hero{font-size:30px;line-height:30px}.language-chooser p{text-align:left}.language-chooser input:checked+label{color:#fff;background:#777}.language-chooser .focus input:checked+label{background:#0074A2}.language-chooser label:hover{background:#eee}.language-chooser label{display:block}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0} \ No newline at end of file diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css index dfed0f33e3..27b023bb54 100644 --- a/wp-admin/css/install.css +++ b/wp-admin/css/install.css @@ -337,7 +337,6 @@ body.language-chooser { height: 250px; } -/* TODO:add focus style via JS */ .language-chooser fieldset.focus { border-color: #5b9dd9; -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); @@ -355,9 +354,17 @@ body.language-chooser { .language-chooser input:checked + label{ color:white; + background: #777; +} + +.language-chooser .focus input:checked + label{ background: #0074A2; } +.language-chooser label:hover { + background: #eee; +} + .language-chooser label{ display:block; } @@ -373,3 +380,5 @@ body.language-chooser { clip: rect(0 0 0 0); border: 0; } + +} diff --git a/wp-admin/css/install.min.css b/wp-admin/css/install.min.css index 67bcc05f0b..1d968e4c59 100644 --- a/wp-admin/css/install.min.css +++ b/wp-admin/css/install.min.css @@ -1 +1 @@ -html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0074a2;text-decoration:none}a:hover{color:#2ea2cc}h1{border-bottom:1px solid #dedede;clear:both;color:#666;font-size:24px;margin:30px 0;padding:0;padding-bottom:7px;font-weight:400}h2{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}dl,ol,ul{padding:5px 5px 5px 22px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#999;height:84px;font-size:20px;font-weight:400;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;font-family:"Open Sans",sans-serif;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 20px 10px 0;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:left;padding:16px 20px 10px 0;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}input,submit{font-family:"Open Sans",sans-serif}.form-table input[type=password],.form-table input[type=text]{width:206px}.form-table th p{font-weight:400}.form-table.install-success td{vertical-align:middle;padding:16px 20px 10px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 0;padding:5px;text-align:center;width:200px;display:none}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}.message{border:1px solid #c00;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:450px}.language-chooser fieldset{margin:1px;padding:8px;display:block;border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out;outline:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;font-size:16px;font-family:inherit;font-weight:inherit;overflow-y:scroll;height:250px}.language-chooser fieldset.focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wp-core-ui.language-chooser .button.button-hero{font-size:30px;line-height:30px}.language-chooser p{text-align:right}.language-chooser input:checked+label{color:#fff;background:#0074A2}.language-chooser label{display:block}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0} \ No newline at end of file +html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0074a2;text-decoration:none}a:hover{color:#2ea2cc}h1{border-bottom:1px solid #dedede;clear:both;color:#666;font-size:24px;margin:30px 0;padding:0;padding-bottom:7px;font-weight:400}h2{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}dl,ol,ul{padding:5px 5px 5px 22px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px;border-bottom:0;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#999;height:84px;font-size:20px;font-weight:400;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;font-family:"Open Sans",sans-serif;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 20px 10px 0;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:left;padding:16px 20px 10px 0;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}input,submit{font-family:"Open Sans",sans-serif}.form-table input[type=password],.form-table input[type=text]{width:206px}.form-table th p{font-weight:400}.form-table.install-success td{vertical-align:middle;padding:16px 20px 10px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 0;padding:5px;text-align:center;width:200px;display:none}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}.message{border:1px solid #c00;padding:.5em .7em;margin:5px 0 15px;background-color:#ffebe8}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=password],.form-table td input[type=text],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:450px}.language-chooser fieldset{margin:1px;padding:8px;display:block;border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out;outline:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;font-size:16px;font-family:inherit;font-weight:inherit;overflow-y:scroll;height:250px}.language-chooser fieldset.focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wp-core-ui.language-chooser .button.button-hero{font-size:30px;line-height:30px}.language-chooser p{text-align:right}.language-chooser input:checked+label{color:#fff;background:#777}.language-chooser .focus input:checked+label{background:#0074A2}.language-chooser label:hover{background:#eee}.language-chooser label{display:block}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0} \ No newline at end of file diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index dbd846d27b..cbec07fb13 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -2162,7 +2162,7 @@ endif; function wp_install_language_form( $languages ) { echo "
\n"; echo "Select a default language\n"; - echo ''; + echo ''; echo ''; echo "\n"; @@ -2175,7 +2175,7 @@ function wp_install_language_form( $languages ) { } foreach ( $languages as $language ) { - echo ''; + echo ''; echo '\n"; } echo "
\n"; diff --git a/wp-admin/install.php b/wp-admin/install.php index 3772f1d6b4..8c958953fc 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -281,5 +281,6 @@ if ( !wp_is_mobile() ) { + diff --git a/wp-admin/js/language-chooser.js b/wp-admin/js/language-chooser.js new file mode 100644 index 0000000000..f328db32a1 --- /dev/null +++ b/wp-admin/js/language-chooser.js @@ -0,0 +1,39 @@ +(function($){ + if ( $('body').hasClass('language-chooser') === false ) { + return; + } + + var mouseDown = 0, + $fieldset = $('fieldset'); + + // simple way to check if mousebutton is depressed while accounting for multiple mouse buttons being used independently + document.body.onmousedown = function() { + ++mouseDown; + }; + document.body.onmouseup = function() { + --mouseDown; + }; + + /* + we can't rely upon the focusout event + since clicking on a label triggers it + */ + function maybeRemoveFieldsetFocus(){ + if (mouseDown) { + setTimeout( maybeRemoveFieldsetFocus, 50); + return; + } + if ( $(':focus').hasClass('language-chooser-input') !== true ) { + $fieldset.removeClass('focus'); + } + } + + $fieldset.focusin( function() { + $(this).addClass('focus'); + }); + + $fieldset.focusout( function() { + setTimeout( maybeRemoveFieldsetFocus, 50); + }); + +})(jQuery); diff --git a/wp-admin/js/language-chooser.min.js b/wp-admin/js/language-chooser.min.js new file mode 100644 index 0000000000..1cce962712 --- /dev/null +++ b/wp-admin/js/language-chooser.min.js @@ -0,0 +1 @@ +!function(a){function b(){return c?void setTimeout(b,50):void(a(":focus").hasClass("language-chooser-input")!==!0&&d.removeClass("focus"))}if(a("body").hasClass("language-chooser")!==!1){var c=0,d=a("fieldset");document.body.onmousedown=function(){++c},document.body.onmouseup=function(){--c},d.focusin(function(){a(this).addClass("focus")}),d.focusout(function(){setTimeout(b,50)})}}(jQuery); \ No newline at end of file diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 3905d929d9..60eea999d5 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -319,5 +319,6 @@ el.select(); break; } ?> + diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 3e7dc143e4..3db15df13d 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -345,6 +345,7 @@ function wp_default_scripts( &$scripts ) { ) ); $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), false, 1 ); + $scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 ); $scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 099858897e..1321e38f71 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.0-alpha-20140707'; +$wp_version = '4.0-alpha-20140708'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.