From 9f792244b492521a14eea928902276907acbdce2 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 20 Apr 2015 16:31:54 +0100 Subject: [PATCH] Pages step --- assets/css/wc-setup.css | 2 +- assets/css/wc-setup.scss | 34 ++++++- includes/admin/class-wc-admin-welcome.php | 106 +++++++++++++++------- 3 files changed, 105 insertions(+), 37 deletions(-) diff --git a/assets/css/wc-setup.css b/assets/css/wc-setup.css index 15429738372..12272dd84ed 100644 --- a/assets/css/wc-setup.css +++ b/assets/css/wc-setup.css @@ -1 +1 @@ -body{margin:100px auto 24px;box-shadow:none;background:#f1f1f1;padding:0}#wc-logo,.wc-install-content p{margin:0 0 24px}#wc-logo{border:0;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-install-content{box-shadow:0 1px 3px rgba(0,0,0,.13);padding:24px 24px 0;background:#fff;overflow:hidden;zoom:1}.wc-install-content h1,.wc-install-content h2,.wc-install-content h3,.wc-install-content table{margin:0 0 24px;border:0;padding:0}.wc-install-content .form-table{line-height:1.5em}.wc-install-content .form-table tbody th{width:40%;vertical-align:top;font-weight:400}.wc-install-content .form-table tbody td{vertical-align:top}.wc-install-content .form-table tbody td input,.wc-install-content .form-table tbody td select{width:100%;box-sizing:border-box}.wc-install-content .form-table tbody td input[size]{width:auto}.wc-install-content .form-table tbody td .description{line-height:1.5em;display:block;margin-top:.25em;color:#999;font-style:italic}.wc-install-content .form-table tbody td,.wc-install-content .form-table tbody th{padding:12px 0;margin:0;border:0}.wc-install-content .form-table tbody td:first-child,.wc-install-content .form-table tbody th:first-child{padding-right:1em}.wc-install-content .wc-install-pages{width:100%}.wc-install-content .wc-install-pages th.page-name{width:30%}.wc-install-content .wc-install-pages td,.wc-install-content .wc-install-pages th{padding:7px 0}.wc-install-content .wc-install-pages td:first-child,.wc-install-content .wc-install-pages th:first-child{padding-right:9px}@media screen and (max-width:782px){.wc-install-content .form-table tbody th{width:auto}}.wc-install-steps{padding:0 0 24px;margin:0;list-style:none;overflow:hidden;color:#ccc}.wc-install-steps li{width:20%;float:left;padding:0 0 1em;margin:0;text-align:center;position:relative;border-bottom:4px solid #ccc;line-height:1}.wc-install-steps li:before{content:"";border:4px solid #ccc;border-radius:100%;width:4px;height:4px;position:absolute;bottom:0;left:50%;margin-left:-6px;margin-bottom:-8px;background:#fff}.wc-install-steps li.active{border-color:#A16696;color:#A16696}.wc-install-steps li.active:before{border-color:#A16696}.wc-install-steps li.done{border-color:#A16696;color:#A16696}.wc-install-steps li.done:before{border-color:#A16696;background:#A16696}.wc-setup .wc-install-actions{overflow:hidden}.wc-setup .wc-install-actions .button{float:left;font-size:1.5em;padding:.5em 1em;line-height:1em;height:auto}.wc-setup .wc-install-actions .button-primary{float:right;opacity:1;background-color:#A16696;border-color:#A16696;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15)} \ No newline at end of file +.wc-install-content p,.wc-install-content table{font-size:1em;line-height:1.75em;color:#666}body{margin:100px auto 24px;box-shadow:none;background:#f1f1f1;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-install-content{box-shadow:0 1px 3px rgba(0,0,0,.13);padding:24px 24px 0;background:#fff;overflow:hidden;zoom:1}.wc-install-content h1,.wc-install-content h2,.wc-install-content h3,.wc-install-content table{margin:0 0 24px;border:0;padding:0;color:#666}.wc-install-content p{margin:0 0 24px}.wc-install-content a{color:#A16696}.wc-install-content a:focus,.wc-install-content a:hover{color:#111}.wc-install-content .form-table tbody th{width:40%;vertical-align:top;font-weight:400}.wc-install-content .form-table tbody td{vertical-align:top}.wc-install-content .form-table tbody td input,.wc-install-content .form-table tbody td select{width:100%;box-sizing:border-box}.wc-install-content .form-table tbody td input[size]{width:auto}.wc-install-content .form-table tbody td .description{line-height:1.5em;display:block;margin-top:.25em;color:#999;font-style:italic}.wc-install-content .form-table tbody td,.wc-install-content .form-table tbody th{padding:12px 0;margin:0;border:0}.wc-install-content .form-table tbody td:first-child,.wc-install-content .form-table tbody th:first-child{padding-right:1em}.wc-install-content .wc-install-pages{width:100%;border-top:1px solid #eee}.wc-install-content .wc-install-pages thead th{display:none}.wc-install-content .wc-install-pages .page-name{width:30%;font-weight:700}.wc-install-content .wc-install-pages td,.wc-install-content .wc-install-pages th{padding:14px 0;border-bottom:1px solid #eee}.wc-install-content .wc-install-pages td:first-child,.wc-install-content .wc-install-pages th:first-child{padding-right:9px}.wc-install-content .wc-install-pages th{padding-top:0}.wc-install-content .wc-install-pages .page-options p{margin:6px 0 0 24px}@media screen and (max-width:782px){.wc-install-content .form-table tbody th{width:auto}}.wc-install-steps{padding:0 0 24px;margin:0;list-style:none;overflow:hidden;color:#ccc}.wc-install-steps li{width:20%;float:left;padding:0 0 1em;margin:0;text-align:center;position:relative;border-bottom:4px solid #ccc;line-height:1}.wc-install-steps li:before{content:"";border:4px solid #ccc;border-radius:100%;width:4px;height:4px;position:absolute;bottom:0;left:50%;margin-left:-6px;margin-bottom:-8px;background:#fff}.wc-install-steps li.active{border-color:#A16696;color:#A16696}.wc-install-steps li.active:before{border-color:#A16696}.wc-install-steps li.done{border-color:#A16696;color:#A16696}.wc-install-steps li.done:before{border-color:#A16696;background:#A16696}.wc-setup .wc-install-actions{overflow:hidden}.wc-setup .wc-install-actions .button{float:left;font-size:1.5em;padding:.5em 1em;line-height:1em;height:auto}.wc-setup .wc-install-actions .button-primary{float:right;opacity:1;background-color:#A16696;border-color:#A16696;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15)} \ No newline at end of file diff --git a/assets/css/wc-setup.scss b/assets/css/wc-setup.scss index 27521994ebe..4dc3e7872d5 100644 --- a/assets/css/wc-setup.scss +++ b/assets/css/wc-setup.scss @@ -24,12 +24,26 @@ body { margin: 0 0 24px; border: 0; padding: 0; + color: #666; } p { margin: 0 0 24px; + font-size: 1em; + line-height: 1.75em; + color: #666; + } + table { + font-size: 1em; + line-height: 1.75em; + color: #666; + } + a { + color: #A16696; + &:hover, &:focus { + color: #111; + } } .form-table { - line-height: 1.5em; tbody { th { width: 40%; @@ -65,15 +79,29 @@ body { } .wc-install-pages { width: 100%; - th.page-name { + border-top: 1px solid #eee; + thead th { + display: none; + } + .page-name { width: 30%; + font-weight: bold; } th, td { - padding: 7px 0; + padding: 14px 0; + border-bottom: 1px solid #eee; &:first-child { padding-right: 9px; } } + th { + padding-top: 0; + } + .page-options { + p { + margin: 6px 0 0 24px; + } + } } @media screen and (max-width: 782px) { .form-table { diff --git a/includes/admin/class-wc-admin-welcome.php b/includes/admin/class-wc-admin-welcome.php index 7c18f94799a..33115cb56c8 100644 --- a/includes/admin/class-wc-admin-welcome.php +++ b/includes/admin/class-wc-admin-welcome.php @@ -55,11 +55,11 @@ class WC_Admin_Welcome { 'pages' => array( 'name' => __( 'Page Setup', 'woocommerce' ), 'view' => array( $this, 'wc_setup_pages' ), - 'handler' => '' + 'handler' => array( $this, 'wc_setup_pages_save' ) ), 'shipping_taxes' => array( 'name' => __( 'Shipping & Tax', 'woocommerce' ), - 'view' => array( $this, 'wc_setup_pages' ), + 'view' => array( $this, 'wc_setup_shipping_taxes' ), 'handler' => '' ), 'next_steps' => array( @@ -305,40 +305,80 @@ class WC_Admin_Welcome { public function wc_setup_pages() { ?>

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - -

+
+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

+ +

+
+
+ +
+

+
+
+ +

Menus screen%s.', 'woocommerce' ), '', '', '', '' ); ?>

+ +

+ + +

+
get_next_step_link() ); + exit; + } + + /** + * Shipping and taxes + */ + public function wc_setup_shipping_taxes() { + + } + /** * Final step */