From 4ad948c6206a01c855566bd7477d9de3a7753376 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 20 Sep 2017 16:35:38 -0400 Subject: [PATCH] adding styles and structure to the front end output --- css/front.css | 2 +- css/front.css.map | 2 +- models/front/forSale/detail.php | 4 ---- scss/front.scss | 17 +++++++++++++++- views/admin/forSale/edit.html | 23 +++++++++++++++++++++ views/front/forSale/detail.html | 36 +++++++++++++++++++-------------- views/front/forSale/list.html | 3 +-- 7 files changed, 63 insertions(+), 24 deletions(-) diff --git a/css/front.css b/css/front.css index 9f06b2c..94f0918 100644 --- a/css/front.css +++ b/css/front.css @@ -1,3 +1,3 @@ -.no-padding{padding:0}.front-item-list-wrapper span{font-weight:bold}.front-item-list-wrapper .front-list-item{padding:10px 0;border-bottom:1px solid lightgray}.front-item-list-wrapper div{line-height:1.1;padding:3px 0 3px 0}.front-item-list-wrapper .front-list-topic{padding:5px;width:100px;text-align:center;color:white;border-radius:5px;margin:0 auto 10px auto}.front-item-list-wrapper .item-wanted{background:green}.front-item-list-wrapper .item-sale{background:red}.front-item-list-wrapper .item-detail-link{display:inline-block;padding:5px;background:blue;color:white;text-decoration:none;margin-top:5px}.front-item-detail-wrapper .item-detail-images{padding-top:20px} +.no-padding{padding:0}.front-item-list-wrapper span{font-weight:bold}.front-item-list-wrapper .front-list-item{padding:10px 0;border-bottom:1px solid lightgray}.front-item-list-wrapper div{line-height:1.1;padding:3px 0}.front-item-list-wrapper .front-list-topic{padding:5px;width:100px;text-align:center;color:white;border-radius:5px;margin:0 auto 10px auto}.front-item-list-wrapper .item-wanted{background:green}.front-item-list-wrapper .item-sale{background:red}.front-item-list-wrapper .item-detail-link{display:inline-block;padding:5px;background:blue;color:white;text-decoration:none;margin-top:5px}.front-item-list-wrapper .item-list-container{padding:0 5px 0 0}.front-item-detail-wrapper span{font-weight:bold}.front-item-detail-wrapper div{line-height:1.1;margin:5px 0}.front-item-detail-wrapper .item-detail-images{padding-top:20px}.front-item-detail-wrapper .detail-image{display:block;margin:10px auto 10px} /*# sourceMappingURL=front.css.map */ diff --git a/css/front.css.map b/css/front.css.map index 6158f39..6c371b4 100644 --- a/css/front.css.map +++ b/css/front.css.map @@ -1 +1 @@ -{"version":3,"file":"front.css","sources":["front.scss"],"sourcesContent":[".no-padding{\n padding: 0;\n}\n.front-item-list-wrapper{\n span{\n font-weight: bold;\n }\n .front-list-item{\n padding: 10px 0;\n border-bottom: 1px solid lightgray;\n }\n div{\n line-height: 1.1;\n padding: 3px 0 3px 0;\n }\n .front-list-topic{\n padding: 5px;\n width: 100px;\n text-align: center;\n color: white;\n border-radius: 5px;\n margin: 0 auto 10px auto;\n }\n .item-wanted{\n background: green;\n }\n .item-sale{\n background: red;\n }\n .item-detail-link{\n display: inline-block;\n padding: 5px;\n background: blue;\n color: white;\n text-decoration: none;\n margin-top: 5px;\n }\n}\n.front-item-detail-wrapper{\n .item-detail-images{\n padding-top: 20px;\n }\n}"],"names":[],"mappings":"AAAA,AAAA,WAAW,AAAA,CACP,OAAO,CAAE,CAAC,CACb,AACD,AACI,wBADoB,CACpB,IAAI,AAAA,CACA,WAAW,CAAE,IAAI,CACpB,AAHL,AAII,wBAJoB,CAIpB,gBAAgB,AAAA,CACZ,OAAO,CAAE,MAAM,CACf,aAAa,CAAE,mBAAmB,CACrC,AAPL,AAQI,wBARoB,CAQpB,GAAG,AAAA,CACC,WAAW,CAAE,GAAG,CAChB,OAAO,CAAE,WAAW,CACvB,AAXL,AAYI,wBAZoB,CAYpB,iBAAiB,AAAA,CACb,OAAO,CAAE,GAAG,CACZ,KAAK,CAAE,KAAK,CACZ,UAAU,CAAE,MAAM,CAClB,KAAK,CAAE,KAAK,CACZ,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,gBAAgB,CAC3B,AAnBL,AAoBI,wBApBoB,CAoBpB,YAAY,AAAA,CACR,UAAU,CAAE,KAAK,CACpB,AAtBL,AAuBI,wBAvBoB,CAuBpB,UAAU,AAAA,CACN,UAAU,CAAE,GAAG,CAClB,AAzBL,AA0BI,wBA1BoB,CA0BpB,iBAAiB,AAAA,CACb,OAAO,CAAE,YAAY,CACrB,OAAO,CAAE,GAAG,CACZ,UAAU,CAAE,IAAI,CAChB,KAAK,CAAE,KAAK,CACZ,eAAe,CAAE,IAAI,CACrB,UAAU,CAAE,GAAG,CAClB,AAEL,AACI,0BADsB,CACtB,mBAAmB,AAAA,CACf,WAAW,CAAE,IAAI,CACpB"} \ No newline at end of file +{"version":3,"file":"front.css","sources":["front.scss"],"sourcesContent":[".no-padding{\n padding: 0;\n}\n\n.front-item-list-wrapper{\n span{\n font-weight: bold;\n }\n .front-list-item{\n padding: 10px 0;\n border-bottom: 1px solid lightgray;\n }\n div{\n line-height: 1.1;\n padding: 3px 0;\n }\n .front-list-topic{\n padding: 5px;\n width: 100px;\n text-align: center;\n color: white;\n border-radius: 5px;\n margin: 0 auto 10px auto;\n }\n .item-wanted{\n background: green;\n }\n .item-sale{\n background: red;\n }\n .item-detail-link{\n display: inline-block;\n padding: 5px;\n background: blue;\n color: white;\n text-decoration: none;\n margin-top: 5px;\n }\n .item-list-container{\n padding: 0 5px 0 0;\n }\n}\n.front-item-detail-wrapper{\n span{\n font-weight: bold;\n }\n div{\n line-height: 1.1;\n margin: 5px 0;\n }\n .item-detail-images{\n padding-top: 20px;\n }\n .detail-image{\n display: block;\n margin: 10px auto 10px;\n }\n}"],"names":[],"mappings":"AAAA,AAAA,WAAW,AAAA,CACP,OAAO,CAAE,CAAC,CACb,AAED,AACI,wBADoB,CACpB,IAAI,AAAA,CACA,WAAW,CAAE,IAAI,CACpB,AAHL,AAII,wBAJoB,CAIpB,gBAAgB,AAAA,CACZ,OAAO,CAAE,MAAM,CACf,aAAa,CAAE,mBAAmB,CACrC,AAPL,AAQI,wBARoB,CAQpB,GAAG,AAAA,CACC,WAAW,CAAE,GAAG,CAChB,OAAO,CAAE,KAAK,CACjB,AAXL,AAYI,wBAZoB,CAYpB,iBAAiB,AAAA,CACb,OAAO,CAAE,GAAG,CACZ,KAAK,CAAE,KAAK,CACZ,UAAU,CAAE,MAAM,CAClB,KAAK,CAAE,KAAK,CACZ,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,gBAAgB,CAC3B,AAnBL,AAoBI,wBApBoB,CAoBpB,YAAY,AAAA,CACR,UAAU,CAAE,KAAK,CACpB,AAtBL,AAuBI,wBAvBoB,CAuBpB,UAAU,AAAA,CACN,UAAU,CAAE,GAAG,CAClB,AAzBL,AA0BI,wBA1BoB,CA0BpB,iBAAiB,AAAA,CACb,OAAO,CAAE,YAAY,CACrB,OAAO,CAAE,GAAG,CACZ,UAAU,CAAE,IAAI,CAChB,KAAK,CAAE,KAAK,CACZ,eAAe,CAAE,IAAI,CACrB,UAAU,CAAE,GAAG,CAClB,AAjCL,AAkCI,wBAlCoB,CAkCpB,oBAAoB,AAAA,CAChB,OAAO,CAAE,SAAS,CACrB,AAEL,AACI,0BADsB,CACtB,IAAI,AAAA,CACA,WAAW,CAAE,IAAI,CACpB,AAHL,AAII,0BAJsB,CAItB,GAAG,AAAA,CACC,WAAW,CAAE,GAAG,CAChB,MAAM,CAAE,KAAK,CAChB,AAPL,AAQI,0BARsB,CAQtB,mBAAmB,AAAA,CACf,WAAW,CAAE,IAAI,CACpB,AAVL,AAWI,0BAXsB,CAWtB,aAAa,AAAA,CACT,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,cAAc,CACzB"} \ No newline at end of file diff --git a/models/front/forSale/detail.php b/models/front/forSale/detail.php index d2b81bf..a40b469 100644 --- a/models/front/forSale/detail.php +++ b/models/front/forSale/detail.php @@ -84,7 +84,6 @@ class GlmMembersFront_forSale_detail extends GlmDataForSale */ public function __construct ($wpdb, $config) { - // Save WordPress Database object $this->wpdb = $wpdb; @@ -98,13 +97,10 @@ class GlmMembersFront_forSale_detail extends GlmDataForSale * data class that it should flag a group of fields as 'view_only'. */ parent::__construct(false, false, true); - - } public function modelAction($actionData = false) { - wp_enqueue_style('fancyStyle', GLM_MEMBERS_FOR_SALE_PLUGIN_URL . '/fancybox/dist/jquery.fancybox.min.css'); wp_enqueue_script('fancyScript', GLM_MEMBERS_FOR_SALE_PLUGIN_URL . '/fancybox/dist/jquery.fancybox.min.js', array('jquery'), '', true ); diff --git a/scss/front.scss b/scss/front.scss index 8a51dd6..525f790 100644 --- a/scss/front.scss +++ b/scss/front.scss @@ -1,6 +1,7 @@ .no-padding{ padding: 0; } + .front-item-list-wrapper{ span{ font-weight: bold; @@ -11,7 +12,7 @@ } div{ line-height: 1.1; - padding: 3px 0 3px 0; + padding: 3px 0; } .front-list-topic{ padding: 5px; @@ -35,9 +36,23 @@ text-decoration: none; margin-top: 5px; } + .item-list-container{ + padding: 0 5px 0 0; + } } .front-item-detail-wrapper{ + span{ + font-weight: bold; + } + div{ + line-height: 1.1; + margin: 5px 0; + } .item-detail-images{ padding-top: 20px; } + .detail-image{ + display: block; + margin: 10px auto 10px; + } } \ No newline at end of file diff --git a/views/admin/forSale/edit.html b/views/admin/forSale/edit.html index 009af91..2d790e6 100644 --- a/views/admin/forSale/edit.html +++ b/views/admin/forSale/edit.html @@ -113,6 +113,29 @@ {/php} + +
+
+ Terms +
+
+ {php} + wp_editor( + + '{$item.fieldData.terms|escape:quotes}', + + 'terms', array( + 'media_buttons' => false, + 'tinymce' => false, + // 'quicktags' => false, + // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text. + 'textarea_name' => 'terms', + 'editor_height' => 200, // Height in px, overrides editor_rows + // 'textarea_rows' => 8 + )); + {/php} +
+
diff --git a/views/front/forSale/detail.html b/views/front/forSale/detail.html index bc7774a..c349cb1 100644 --- a/views/front/forSale/detail.html +++ b/views/front/forSale/detail.html @@ -1,40 +1,46 @@
-
- {$itemData.title} +
+ {$itemData.title}
-
+
+ Company: {$itemData.company}
-
+
+ Description: {$itemData.descr}
-
+
+ Terms: {$itemData.terms}
-
+
+ Contact: {$itemData.contact_name}
-
+
+ Email: {$itemData.contact_email}
-
+
+ Phone: {$itemData.contact_phone}
diff --git a/views/front/forSale/list.html b/views/front/forSale/list.html index 81ffbbd..f408fb6 100644 --- a/views/front/forSale/list.html +++ b/views/front/forSale/list.html @@ -4,9 +4,8 @@ {foreach $itemData as $item=>$data}
-
+
- {$data.title}
-- 2.17.1