9 Replies Latest reply on Jul 12, 2016 10:23 AM by bhavin

    how to make custom tile responsive - TR Hackathon

    bhavin

      I wanna to increase the height of this custom tile( responsive custom tile) which is a add on.

       

       

       

      Any help in this as soon as possible because i am middle of TR Hackathon.

       

      Thanks,

      Bhavin

        • Re: how to make custom tile responsive - TR Hackathon
          Scott A Johnson

          Try adding this js function call:

           

          gadgets.window.adjustHeight();
          

           

          You can also pass in an integer value to this function to set a specific height. By default it will resize to fit the content.

           

          You generally would want to call this after the page has loaded completely and any markup/style changes have been applied to the page.

           

          Hope this helps,

          Scott

            • Re: how to make custom tile responsive - TR Hackathon
              bhavin

              Thanks for the answer Scott A Johnson

               

              i add this at the bottom of my <script> tag and call that function onload event.

               

              But it is not working.

              do you have any other solution?

                • Re: how to make custom tile responsive - TR Hackathon
                  Scott A Johnson

                  can you show the full script you're using?

                    • Re: how to make custom tile responsive - TR Hackathon
                      bhavin

                      <script>

                              $(document).ready(function () {

                                      var userName = "";

                        var desig="";

                        var depart="";

                       

                                      var hireDate = new Date();

                                      osapi.jive.core.get({

                                          v: "v3",

                                          href: "/people?filter=hire-date(2010-07-04T22:46:12.044%2B0000,2015-08-05T22:46:12.044%2B0000)",

                                          headers: {

                                              'Authorization': 'Bearer eht28syxxt9dr9dtknex56otsu1ed181mbdo63kk.t'

                                          }

                                      }).execute(function (response) {

                                          console.log("Response is: " + JSON.stringify(response));

                                          userName = response.content.list[0].displayName;

                                          desig = response.content.list[0].displayName;

                        depart = response.content.list[0].displayName;

                       

                                          $("#user-name").html(userName);

                                          var empId = response.content.list[0].jive.username;

                                          osapi.jive.core.get({

                                              v: "v3",

                                              href: "/people/username/" + empId,

                                              headers: {

                                                  'Authorization': 'Bearer eht28syxxt9dr9dtknex56otsu1ed181mbdo63kk.t'

                                              }

                                          }).execute(function (response) {

                                              var userProfile = response.content.jive.profile;

                                              $("#user-image").attr("src", response.content.thumbnailUrl);

                                              $("#profile-link").attr("href", "https://thomsonreuters-test.jiveon.com/people/" + response.content.jive.username);

                                              for (i in userProfile) {

                                                  var item = userProfile[i];

                                                  if (item["jive_label"] == "Hire Date") {

                                                      console.log(item["Hire Date"]);

                                                      hireDate = new Date(item["value"]);

                                                      $("#hire-date").html(item["value"])

                                                  }

                       

                                                  if (item["jive_label"] == "Employee ID") {

                                                    

                                                  }

                                              }

                                             

                                              var austDay = hireDate;

                                             

                                              console.log("start:"+austDay);

                                              austDay = new Date(new Date().getFullYear(), austDay.getMonth(), austDay.getDate());

                                              console.log(austDay);

                       

                       

                                              $('#defaultCountdown').countdown({ until: austDay });

                                              console.log("Response is: " + JSON.stringify(response));

                        onPageLoaded();

                       

                                          });

                                      });

                                     

                                  });

                       

                        function onPageLoaded() {

                                     gadgets.window.adjustHeight();

                                      }