diff --git a/index.php b/index.php index 1b4a10a..2b1c423 100644 --- a/index.php +++ b/index.php @@ -15,8 +15,11 @@ /*Get an API Token from my.trackinghive.com and put it here */ $bearerToken = ''; -$version = "0.3"; +$version = "0.4"; + +//echo "Setting alertMessage to ' '
"; $alertMessage = ""; + $comment = "No title"; $now = new DateTime(); @@ -26,6 +29,10 @@ //----- Functions -----// + + +//-- PHP Stuff --// + function deleteParcel($_id, $bearerToken){ $ch = curl_init(); @@ -47,7 +54,9 @@ function deleteParcel($_id, $bearerToken){ $json = json_decode($response, true); if ($json['meta']['code'] == 200) { + //echo 'Package removed!

'; $alertMessage = "Removed"; + //echo $alertMessage; } return $alertMessage; @@ -146,7 +155,9 @@ function addSubscription ($_id, $bearerToken) { if ($json->meta->code == 200) { $_id = $json->data->_id; + //echo 'Package added!

'; $alertMessage = "Added"; + //echo $alertMessage; //addSubscription($_id, $bearerToken); } else if ($json->meta->code == 400) { echo 'Could not add package.

'; @@ -161,6 +172,8 @@ function addSubscription ($_id, $bearerToken) {
Package added! @@ -251,7 +264,7 @@ function addSubscription ($_id, $bearerToken) { $json = json_decode($response, false); //print_r($json); - + try { foreach ($json->data as $mydata) { $custom_fields = explode(':', $mydata->custom_fields); $comment = $custom_fields[1]; @@ -268,7 +281,7 @@ function addSubscription ($_id, $bearerToken) { $expectedDelivery = "Expected Delivery Today"; } else { - $expectedDelivery = "Expected Delivery is " . date("m/d/y", strtotime($expTS)); + $expectedDelivery = "Expected Delivery is " . date("l, m/d/y", strtotime($expTS)); } $scheduled = true; @@ -335,23 +348,6 @@ function addSubscription ($_id, $bearerToken) { $carrier = $carriers->title; } } - - /* - switch ($carrier_slug){ - case 'usps': - $carrier = 'USPS'; - break; - case 'ups': - $carrier = 'UPS'; - break; - case 'fedex': - $carrier = 'FedEx'; - break; - case 'dhl': - $carrier = 'DHL'; - break; - } - */ $trackingNum = $mydata->tracking_number; @@ -470,10 +466,39 @@ function addSubscription ($_id, $bearerToken) {
+
+ Click to Expand +
+
+ +
+ + + diff --git a/styles.css b/styles.css index 78da316..8a96125 100644 --- a/styles.css +++ b/styles.css @@ -44,13 +44,11 @@ a { width: 1075px; margin-right: auto; margin-left: auto; - padding-left: 15px; - padding-right: 15px; box-sizing: border-box; } .content { - margin-left: -15px; + margin-left: -30px; margin-right: -15px; box-sizing: border-box; } @@ -82,13 +80,13 @@ a { .package-container { position: relative; min-height: 100%; - margin-top: 10px; padding: 20px; margin-bottom: 10px; background: #fff; box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.2); border-radius: 2px; box-sizing: border-box; + overflow: auto; } .logo-view { @@ -111,10 +109,8 @@ a { .parcel-item { padding-top: 10px; padding-bottom: 15px; - min-height: 150px; - border-top: 1px solid #ddd; + min-height: 170px; box-sizing: border-box; - } .row { @@ -126,12 +122,14 @@ a { .media-box { padding-left: 15px; padding-right: 25px; - width: 100%; + width: 985px; float: left; position: relative; + border-top: 1px solid #ddd; } .media { + padding-top: 10px; padding-left: 15px; padding-right: 25px; width: 83.33333333%; @@ -139,6 +137,7 @@ a { position: relative; min-height: 1px; box-sizing: border-box; + cursor: pointer; } .media-right { @@ -156,9 +155,25 @@ a { display: table-cell; vertical-align: top; box-sizing: border-box; +} +.media-click-text { + position: relative; + float: left; + max-width: 100%; + padding-left: 45%; + padding-bottom: 10px; + color: #9e9e9e; + cursor: pointer; } +.media-track { + display: none; + float: left; + width: 100%; +} + + .info { display: block; margin-top: 4px; @@ -282,6 +297,8 @@ input[type=button], input[type=submit] { .info-middle { box-sizing: border-box; padding-top: 3px; + display: flex; + flex-direction: column; } .loc { @@ -351,6 +368,7 @@ input[type=button], input[type=submit] { text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box; + min-height: 20px; } .last-update { @@ -436,7 +454,7 @@ a { .content { box-sizing: border-box; - + margin: 0px; } .package-view { @@ -508,13 +526,13 @@ a { .parcels { padding: 2px; + overflow: auto; } .parcel-item { padding-top: 10px; padding-bottom: 15px; - min-height: 150px; - border-top: 1px solid #ddd; + min-height: 160px; box-sizing: border-box; } @@ -533,6 +551,7 @@ a { position: relative; display: flex; flex-direction: column; + min-height: 150.5px; } .media { @@ -545,6 +564,15 @@ a { width: auto; } +.media-click-text { + padding-left: 30%; +} + +.media-track { + font-size: 12px; + width: 90%; +} + .media-right { padding: 0 5px; float: left; @@ -754,6 +782,7 @@ a { white-space: nowrap; box-sizing: border-box; padding-left: 10px; + min-height: 20px; } .last-update {