-
Re: how to make custom tile responsive - TR Hackathon
Scott A Johnson Jul 12, 2016 8:57 AM (in response to bhavin)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 Jul 12, 2016 9:14 AM (in response to Scott A Johnson)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 Jul 12, 2016 9:19 AM (in response to bhavin)can you show the full script you're using?
-
Re: how to make custom tile responsive - TR Hackathon
bhavin Jul 12, 2016 9:27 AM (in response to Scott A Johnson)<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();
}
-
Re: how to make custom tile responsive - TR Hackathon
bhavin Jul 12, 2016 9:32 AM (in response to bhavin)Here is the code Scott A Johnson ..!!!
-
Re: how to make custom tile responsive - TR Hackathon
Scott A Johnson Jul 12, 2016 9:34 AM (in response to bhavin)Are there any errors in the console?
-
Re: how to make custom tile responsive - TR Hackathon
bhavin Jul 12, 2016 9:37 AM (in response to Scott A Johnson)Here is the console, i got two errors but i got response too, and data is also coming.
Scott A Johnson ..!!!
-
Re: how to make custom tile responsive - TR Hackathon
Scott A Johnson Jul 12, 2016 10:13 AM (in response to bhavin)Try setting the height to a fixed number like adjustHeight(300). Otherwise, you may try setting a timeout to delay the resize, just in case the page markup hasn't fully adjusted before the call is made.
setTimeout(onPageLoaded, 200); // delay resize for 200 milliseconds
Hope this helps,
Scott
-
Re: how to make custom tile responsive - TR Hackathon
bhavin Jul 12, 2016 10:23 AM (in response to Scott A Johnson)Thank you Thank you Thank you sooo much...!!!
-
-
-
-
-
-
-
-