Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Tidy up the local js #846
Conversation
anthonydillon
added
the
Status: Review
label
Sep 10, 2016
nottrobin
added this to the
HTTPS milestone
Sep 10, 2016
nottrobin
reviewed
Sep 10, 2016
| @@ -33,11 +33,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
Sep 10, 2016
Owner
Could we explicitly use HTTPS urls? Protocolless URLs are now (arguably) an antipattern. https://twitter.com/paul_irish/status/588502455530311680. Credit to @barrymcgee.
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| -<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> | ||
| +<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| @@ -22,11 +22,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| -<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=utP4CMDOwQMQ4L7f4gM&guid=ON&script=0"/> | ||
| +<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=utP4CMDOwQMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| @@ -36,11 +36,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| -<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> | ||
| +<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| @@ -1,146 +0,0 @@ | ||
| -{% extends "desktop/base_desktop.html" %} |
nottrobin
Sep 10, 2016
Owner
Isn't this page needed? It's linked to from http://127.0.0.1:8001/desktop/partners (although that page should be using a relative rather than absolute URL).
nottrobin
Sep 10, 2016
•
Owner
Oh no sorry I see, it redirects to /desktop/tenders-contact-us.html.
nottrobin
reviewed
Sep 10, 2016
| @@ -43,11 +43,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| -<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=utP4CMDOwQMQ4L7f4gM&guid=ON&script=0"/> | ||
| +<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=utP4CMDOwQMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| @@ -9,7 +9,7 @@ | ||
| {% block content %} | ||
| {% include "shared/_thank_you.html" with thanks_context="enquiring about Cloud" %} | ||
| - | ||
| + | ||
| {% endblock content %} | ||
| {% block footer_extra %} | ||
| <!-- Google Code for Services Canonical — contact us Conversion Page --> |
nottrobin
Sep 10, 2016
Owner
I'm pretty sure this block of code for google ad services is exactly duplicated many times throughout the codebase. It could probably benefit from being an include.
anthonydillon
Sep 10, 2016
Contributor
Yea spotted that. Alot of moving code in this branch. Will do a polish branch after.
nottrobin
reviewed
Sep 10, 2016
| @@ -23,11 +23,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| -<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> | ||
| +<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| @@ -25,11 +25,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| -<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> | ||
| +<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| @@ -121,8 +121,10 @@ <h2 class="twelve-col">What our partners are saying</h2> | ||
| {% endblock content %} | ||
| {% block footer_extra %} | ||
| <script> | ||
| - partnersApiParams = '?programme__name=Desktop&featured=true'; | ||
| - partnersElementId = '#hardware-partners'; | ||
| + partnerLogoClouds = [{ |
nottrobin
Sep 10, 2016
Owner
As previously discussed, could we change this to being a function call?
nottrobin
reviewed
Sep 10, 2016
| @@ -1,5 +1,5 @@ | ||
| <div class="share-this"> | ||
| - <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.ubuntu.com%2Fubuntu&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font&height=20" style="border:none; overflow:hidden; height:21px; padding-right:23px;"></iframe> | ||
| + <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.ubuntu.com%2Fubuntu&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font&height=20" style="border:none; overflow:hidden; height:21px; padding-right:23px;"></iframe> |
nottrobin
reviewed
Sep 10, 2016
| @@ -37,11 +37,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| - <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=utP4CMDOwQMQ4L7f4gM&guid=ON&script=0"/> | ||
| + <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=utP4CMDOwQMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| @@ -33,11 +33,11 @@ | ||
| var google_conversion_value = 0; | ||
| /* ]]> */ | ||
| </script> | ||
| -<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> | ||
| +<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> |
nottrobin
reviewed
Sep 10, 2016
| </script> | ||
| <noscript> | ||
| <div style="display:inline;"> | ||
| -<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> | ||
| +<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1012391776/?value=0&label=-mBBCIC5vwMQ4L7f4gM&guid=ON&script=0"/> |
nottrobin
reviewed
Sep 10, 2016
| - core.loadPartners('?programme__name=Internet%20of%20Things', '#iot-partners'); | ||
| - }); | ||
| - }); | ||
| + partnerLogoClouds = [{ |
nottrobin
Sep 10, 2016
Owner
I'm guessing this ain't gonna work without partners.js being loaded afterwards.
In any case, let's move this to a function call instead.
|
Wanna do this as a driveby? ubuntudesign#847. Ignore if you want. |
anthonydillon
added some commits
Sep 10, 2016
|
Thanks for the review @nottrobin. Rebased and explicitly using HTTPS urls throughout. |
nottrobin
self-assigned this
Sep 11, 2016
|
TL; DR. Na, forms need a rethink. I want to bring up the number of forms across the site and the different methods they have been implemented. I think as they seem to make up such a large proportion of the site need to develop a elegant and consistent method. |
|
Lol how could anyone find your 1 paragraph too long? |
|
@anthonydillon I filed your forms point as issue #851. |
anthonydillon
added
Review: QA needed
Review: Code needed
labels
Sep 12, 2016
nottrobin
reviewed
Sep 12, 2016
| @@ -15,7 +15,7 @@ var partners = {} | ||
| /** | ||
| * Loops through the partner clouds and loads the feeds for each. | ||
| */ | ||
| -partners.loadPartnerClouds = function() { | ||
| +partners.loadPartnerClouds = function(partnerLogoClouds) { |
nottrobin
Sep 12, 2016
•
Owner
I would rather this was (as mentioned before):
partners.loadPartnerCloud = function (queryParams, elementId) {But if you want to merge this for now I can tidy it up afterwards.
nottrobin
reviewed
Sep 12, 2016
| -} else { | ||
| - console.warn('Load partner logos: Expected array "partnerLogoClouds" not found. Stopping.'); | ||
| -} | ||
| +// if (typeof(partnerLogoClouds) === 'object') { |
nottrobin
Sep 12, 2016
Owner
Likewise, it would be nice not to keep commented out code, but I'm happy to tidy this up myself afterwards, since I need to do some work for the managed cloud calculator anyway,
|
@anthonydillon thanks for doing that. But |
|
http://127.0.0.1:8001/cloud/training/onsite-contact-us doesn't seem to be using the validate library. I just see HTML5 validation in Firefox. Is this what you meant by forms being inconsistent? Or is it unintentional? Same with http://127.0.0.1:8001/cloud/training/server-admin-onsite-contact-us. EDIT: Ah yes, 'tis the same on live. |
nottrobin
added
Review: QA +1
Review: Code +1
and removed
Review: Code needed
Review: QA needed
labels
Sep 12, 2016
|
All LGTM and works. Great work! Merging. |
anthonydillon commentedSep 10, 2016
•
Edited 1 time
-
nottrobin
Sep 12, 2016
Done
QA
Sorry this is again a long QA. I think I have now removed all YUI completely once this and the scratch branch lands. Apart from the sliders. They will require a discussion and a follow up branch.