Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5540ad40 authored by smain@google.com's avatar smain@google.com Committed by android-build-merger
Browse files

add studio survey button to header. am: f887aec7 am: cc81c161 am:...

add studio survey button to header. am: f887aec7 am: cc81c161 am: ec1a297d am: 16f9ebf7 am: 371e7353
am: 47466ca1

* commit '47466ca1':
  add studio survey button to header.

Change-Id: Ib9489f512ae246b38467cbe43d8bd693352552e8
parents d1f8eb53 47466ca1
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ $.ajaxSetup({

$(document).ready(function() {

  showStudioSurveyButton();

  // show lang dialog if the URL includes /intl/
  //if (location.pathname.substring(0,6) == "/intl/") {
  //  var lang = location.pathname.split('/')[2];
@@ -5375,3 +5377,17 @@ function showSamples() {
  $(document)
    .on('click.toggle', '[data-toggle="section"]', Toggle.prototype.toggle);
})(jQuery);


var STUDIO_SURVEY_CLICKED = 'studio-survey-20160429-clicked';

function onClickStudioSurvey() {
  localStorage.setItem(STUDIO_SURVEY_CLICKED, 'true');
  $("#studio-survey-button").fadeOut();
}

function showStudioSurveyButton() {
  if (localStorage.getItem(STUDIO_SURVEY_CLICKED) == null) {
    $("#studio-survey-button").show();
  }
}
 No newline at end of file
+7 −1
Original line number Diff line number Diff line
@@ -86,7 +86,13 @@
          <span class="dac-sprite dac-google-play"></span>
          <span class="dac-visible-desktop-inline">Developer</span>
          Console
        </a><?cs /if ?>
        </a>
        <a class="dac-header-console-btn" id="studio-survey-button"
          href="http://goo.gl/forms/dOQUuzwBsX"
          onclick="onClickStudioSurvey()"
          target="_blank" style="background:#FFE0B2;display:none"
        >Take a 1 min survey</a>
        <?cs /if ?>

      </div><!-- end header-wrap.wrap -->
    </div><!-- end header -->