am 8d262c3a: am 20ee9f12: am de740985: am aa275bf9: Merge "docs: b/15180738 - invalid urls in badge generator" into lmp-docs
* commit '8d262c3a033b9123f42a8ad1a3925684264b8450': docs: b/15180738 - invalid urls in badge generator
This commit is contained in:
@@ -66,7 +66,7 @@ div.button-row input {
|
|||||||
var APP_LANGS = ['it','pt-br','pt-pt','nl','ko','ja','fr','es','es-419','en','de'];
|
var APP_LANGS = ['it','pt-br','pt-pt','nl','ko','ja','fr','es','es-419','en','de'];
|
||||||
|
|
||||||
// variables for creating 'try it out' demo button
|
// variables for creating 'try it out' demo button
|
||||||
var imagePath = "{@docRoot}images/brand/"
|
var imagePath = "https://developer.android.com/images/brand/"
|
||||||
var linkStart = "<a href=\"https://play.google.com/store/";
|
var linkStart = "<a href=\"https://play.google.com/store/";
|
||||||
var imageStart = "\">\n"
|
var imageStart = "\">\n"
|
||||||
+ " <img alt=\"";
|
+ " <img alt=\"";
|
||||||
@@ -99,7 +99,7 @@ function buildButton(form) {
|
|||||||
$("#button-preview").html(linkStart + "apps/details?id=" + packageName
|
$("#button-preview").html(linkStart + "apps/details?id=" + packageName
|
||||||
+ imageStart + altText + imageSrc
|
+ imageStart + altText + imageSrc
|
||||||
+ selectedValue + imageEnd);
|
+ selectedValue + imageEnd);
|
||||||
|
|
||||||
// Send the event to Analytics
|
// Send the event to Analytics
|
||||||
ga('send', 'event', 'Distribute', 'Create Google Play Badge', 'Package ' + selectedValue);
|
ga('send', 'event', 'Distribute', 'Create Google Play Badge', 'Package ' + selectedValue);
|
||||||
} else if (form["publisher"].value != "Example, Inc.") {
|
} else if (form["publisher"].value != "Example, Inc.") {
|
||||||
@@ -111,7 +111,7 @@ function buildButton(form) {
|
|||||||
$("#button-preview").html(linkStart + "search?q=pub:" + publisherName
|
$("#button-preview").html(linkStart + "search?q=pub:" + publisherName
|
||||||
+ imageStart + altText + imageSrc
|
+ imageStart + altText + imageSrc
|
||||||
+ selectedValue + imageEnd);
|
+ selectedValue + imageEnd);
|
||||||
|
|
||||||
// Send the event to Analytics
|
// Send the event to Analytics
|
||||||
ga('send', 'event', 'Distribute', 'Create Google Play Badge', 'Publisher ' + selectedValue);
|
ga('send', 'event', 'Distribute', 'Create Google Play Badge', 'Publisher ' + selectedValue);
|
||||||
} else {
|
} else {
|
||||||
@@ -159,7 +159,7 @@ function clearLabel(id, example) {
|
|||||||
/** Switch the badge urls for selected language */
|
/** Switch the badge urls for selected language */
|
||||||
function changeBadgeLang() {
|
function changeBadgeLang() {
|
||||||
var lang = $('#locale option:selected').val();
|
var lang = $('#locale option:selected').val();
|
||||||
|
|
||||||
// check if we have the 'app' badge for this lang and show notice if not
|
// check if we have the 'app' badge for this lang and show notice if not
|
||||||
$("div.button-row.error").remove(); // remove any existing instance of error message
|
$("div.button-row.error").remove(); // remove any existing instance of error message
|
||||||
if ($.inArray(lang,APP_LANGS) == -1) {
|
if ($.inArray(lang,APP_LANGS) == -1) {
|
||||||
@@ -173,7 +173,7 @@ function changeBadgeLang() {
|
|||||||
} else {
|
} else {
|
||||||
$("div.button-row.app").show(); // show the 'app' badge row
|
$("div.button-row.app").show(); // show the 'app' badge row
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.button-row img').each(function() {
|
$('.button-row img').each(function() {
|
||||||
var id = $(this).parent().attr('for');
|
var id = $(this).parent().attr('for');
|
||||||
var imgName = lang + $('input#'+id).attr('value') + '.png';
|
var imgName = lang + $('input#'+id).attr('value') + '.png';
|
||||||
@@ -356,7 +356,7 @@ alt="Get it on Google Play (large)" /></label>
|
|||||||
style="font-family:monospace;background-color:#efefef;padding:5px;display:none;margin-bottom:1em">
|
style="font-family:monospace;background-color:#efefef;padding:5px;display:none;margin-bottom:1em">
|
||||||
</textarea >
|
</textarea >
|
||||||
|
|
||||||
<p>Try it out:</p>
|
<p>Test your badge:</p>
|
||||||
<div id="button-preview" style="margin-top:1em"></div>
|
<div id="button-preview" style="margin-top:1em"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user