-
Re: How to prevent JS people picker from closing my Tile Action dialog?
dbreen Jul 24, 2015 9:32 AM (in response to dbreen)Bump Ryan Rutan Rashed Talukder -- I have 90 minutes left to finish my hackathon project. I'd love to figure this part out if possible, thanks.
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Jan 5, 2016 9:27 AM (in response to dbreen)Devin Breen, I was just searching the community for this exact problem but see no one ever responded to you. Did you ever figure this out, as i'm now having the same issue?
Thanks!
Brad
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
dbreen Jan 5, 2016 10:24 AM (in response to bradwarren)No, I never received help, nor had time to dig in deeper.
On Tue, Jan 5, 2016 at 11:27 AM, Brad Warren <
-
-
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
Ryan Rutan Jan 5, 2016 10:45 AM (in response to dbreen)Sorry guys ... looked into the source code and dont see any parameter options you can pass in to control this behavior. Not sure if you tried "return false;" in any of your callback methods to see if that affects the behavior?
osapi.jive.corev3.people.requestPicker = function(options) {
options = options || {};
var success = options.success || function() {};
var error = options.error || function() {};
var pickerOptions = {};
pickerOptions.multiple = options.multiple || false;
// Take the osapi.jive.corev3.people.Person object(s) returned from pickerCallback
// and execute the originally requested callback function
var personLoaderCallback = function(data) {
if (data && !data.error) {
success(data);
}
else {
error(data && data.error || {message:"unknown error"});
}
}
// Take the data returned by the picker and convert to full osapi.jive.corev3.people.Person object(s)
var pickerCallback = function(data) {
if (data.users.length == 1) {
osapi.jive.corev3.people.get({ id : data.users[0].userID }).execute(function(response) {
personLoaderCallback(response);
})
}
else if (data.users.length > 1) {
var results = [ ];
var ids = "";
for (var i = 0; i < data.users.length; i++) {
if (ids != "") {
ids += ",";
}
ids += "" + data.users[i].userID;
}
var href = '/people?ids=' + ids;
console.log("href=" + href);
var response = osapi.jive.core.get({
href : href,
v : 'v3'
}).execute(function(response) {
personLoaderCallback(response);
});
}
}
gadgets.rpc.call(null, "request_user_picker", pickerCallback, pickerOptions);
}
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Jan 5, 2016 11:41 AM (in response to Ryan Rutan)Hey Ryan, thanks for the response! return false; doesn't seem to help me.
While i originally mentioned my problem was "exactly" the same its a bit different. Maybe adding a bit of detail can help point me to what i'm doing wrong (which is probably very simple... i'm just now getting around to learning how to make tiles and may be missing something obvious as to how this works)
I'm trying to use a Place Picker in the configuration options. I'm starting from tile-app-internal using the SDK and i added a button in configuration.html and then in configuration.js I added a click event handler for that button that opens the place picker. The place picker opens and as long as my first click is on the name of a space it successfully returns a place object to my config window but any other click causes the underlying config window to close without waiting for the picker response.
A snippet of my configuration.js :
(function() { jive.tile.onOpen(function(config, options ) { gadgets.window.adjustHeight(); $("#placepick").click(function() { osapi.jive.corev3.places.requestPicker({ type : "space", error: function() { console.log('place picker callback error'); }, success : function(data) { console.log('place picker callback success'); // do something with the place data } }); }); // update config object after clicking submit $("#btn_submit").click( function() { // save config data jive.tile.close(config, {} ); }); }); })();
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Jan 5, 2016 3:52 PM (in response to bradwarren)Ryan Rutan, wanted to follow up and let you know that I found my problem. The issue Devin and I both reported seems to only affect the people picker and place picker. When I replaced my place picker with the search content picker (osapi.jive.corev3.search.requestPicker) i no longer have the problem.
So there is something different happening with the search picker that gives it focus while the other 2 keep focus on the config panel. In fact, i forgot to mention and include in my snippet above that my place picker was actually showing up behind the config window so i had modified z-index to get it to show up above the config in the first place.
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
Eric Pierce Jan 28, 2016 8:34 AM (in response to bradwarren)The search.requestPicker doesn't seem to be recognizing our mouse and is only controllable through the keyboard. Did you happen to run into this problem?
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Feb 2, 2016 12:47 PM (in response to Eric Pierce)Hey Eric, sorry for the slow response. No, I did not run into that problem actually. It worked fine for me. Are you trying to use it in a similar context to how I did, for tile configuration?
-
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
sscullion Dec 1, 2016 8:17 AM (in response to bradwarren)my place picker was actually showing up behind the config window so i had modified z-index to get it to show up above the config in the first place
Hi Brad Warren, wondering if you recall how you did this? I'm hitting the same issue and feel I'm missing something obvious in getting the z-index change to take!
Thanks!
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Dec 1, 2016 9:07 AM (in response to sscullion)1 person found this helpfulHi Simon Scullion, I don't remember off the top of my head how I did it but could probably track it down. That said, changing the z-index did not end up really solving the underlying problem. Even after getting the picker to appear above the config window by modifying z-index i still had this problem :
The place picker opens and as long as my first click is on the name of a space it successfully returns a place object to my config window but any other click causes the underlying config window to close without waiting for the picker response.
So for now, I'd recommend using only the Search picker (search.requestPicker) instead of Place or People pickers in a tile config. You can put params on the search picker (see my other comment below) to have it only search people or places to "sort of" emulate a people picker even though the UI is not the same and forces the user to do a search instead of browsing. I'm hoping Jive will eventually address this as I couldn't find any way to get the Place picker to actually work in a Tile config.
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
sscullion Dec 1, 2016 9:28 AM (in response to bradwarren)Thanks Brad, I'll give that a bash and see how we get on.
Still interested in the z-index fix if you get a sec and find it, it's driving me crazy not spotting what I'm getting wrong! LOL
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Dec 1, 2016 10:23 AM (in response to sscullion)2 people found this helpfulI did a quick glance through my old commits for the project I worked on and found this code. This was my original attempt at using a Place Picker in the configuration screen. This is the click handler for my search_placepick button. Note in particular this line :
$(".j-pop-tileConfig", parent.document).css('z-index','1000');
Since your config JS is running inside the tile iframe and the picker opens in the parent, you have to target the container using parent.document. At least thats what i remember having to do after looking at this again. I didn't try to run this again to test, just pasting here from my old commit. Let me know if it works .
$("#search_placepick").click(function(e) {
e.preventDefault();
$(".j-pop-tileConfig", parent.document).css('z-index','1000');
osapi.jive.corev3.places.requestPicker({
type : "space",
error: function() {
console.log('place picker callback error');
},
success : function(data) {
console.log('place picker callback success');
// "data" will be the Space object (in this case) selected by the user
$("#search_placename").html(data.name);
$("#search_placeid").val(data.placeID);
}
});
});
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
sscullion Dec 1, 2016 1:24 PM (in response to bradwarren)Many thanks for taking the time to look and post back Brad!
Since your config JS is running inside the tile iframe and the picker opens in the parent, you have to target the container using parent.document.
Yep. Unfortunately with tiles in Jive cloud running from the "app-" subdomain, we hit a cross-domain security issue.
A whole lotta hassle for something so simple!!
I'm off to give the search picker a bash instead. Thanks again!
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Dec 1, 2016 1:30 PM (in response to sscullion)Oh right, I should have thought of that! You know, in hindsight, I probably wrote that on my local dev where i had the add-on and jive instance both running on localhost and forgot about the cross domain issue i would face when moving it to cloud. I ran into the other issue and switched to search picker before i ever deployed it outside of dev.
-
-
-
-
-
-
-
-
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
jordan.van.bergen@copaco.com Nov 19, 2016 8:40 AM (in response to dbreen)Devin Breen / Brad Warren Did you guys ever solve this? I am running into the same issue currently.
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren Nov 21, 2016 10:24 AM (in response to jordan.van.bergen@copaco.com)Jordan van Bergen, not exactly. I was never able to directly use the people or place pickers but i was able to use search and just limit it to places using params to limit search like this :
osapi.jive.corev3.search.requestPicker({
excludePeople: true,
excludeContent: true,
excludePlaces: false,
success: function(data) {
$("#search_placename").html(data.name);
$("#search_placeid").val(data.placeID);
}
});
That one seems to work just fine in a Tile config, but the People and Place pickers i could never get to work. It's not ideal since i would have preferred the actual Place picker but it worked for my needs.
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
jgoldhammer May 9, 2017 12:48 AM (in response to bradwarren)We run into the same problem and using the searchpicker instead which is not ideal, but a workaround.
Can somebody from Jive look into it? It is an annoying bug and should be fixed.
CC:
Thanks
Jens
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
jeremy.grant May 9, 2017 10:04 AM (in response to jgoldhammer)Have you filed a support case about this?
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
jgoldhammer May 9, 2017 12:02 PM (in response to jeremy.grant)1 person found this helpfulMy experience by filling a support case about developer rated issue is the standard support answer: "we don´t support developer related issues and we should discuss this into the developer space". I would guess we have a deadlock now
How can we efficiently address these issues? My proposal:
Can you open a space for developers of partners here in the community where we can enter these issues and a support engineer can monitor this? I think the support feedback loop is not the ideal approach here because support would open a jira issue and I will not see any progress here...
I am really willing to report issues and my ideas, but it must be efficient for me to be motivated to do that.
Thanks
Jens
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
bradwarren May 9, 2017 1:06 PM (in response to jeremy.grant)1 person found this helpfulI was about to respond with something similar so I'll just echo Jens by saying that in my experience as a partner, creating a support case for an issue like this would not go far. Even though I feel it's pretty clearly a Jive bug, anything remotely related to custom code gets stopped by support and directed here to the Developers space.
-
-
-
-
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
itsallbroken Nov 20, 2017 4:21 AM (in response to dbreen)Hey guys,
I'm having a similar issue with using the requestPicker on the tile config page, reading through it appears to be the same problem so feel free to let me know if it isn't.
I have tried the Place and the Search but both present the same issue, they both pop the requestPicker as expected but as soon as i try to select something thats not on the initial list (click on 5 more for example) the requestPicker remains on screen but my configuration popup disappears.
Can anyone confirm if this is in fact the same issue and if a solution has been found please?
Thanks
Gareth
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
laurian.muresan Mar 1, 2018 8:22 AM (in response to itsallbroken)Hello Gareth Cole ,
Did you find any solution? I have the same issue when i click show 5 more, my config window disappears.
Thanks.
-
Re: How to prevent JS people picker from closing my Tile Action dialog?
itsallbroken Mar 1, 2018 8:35 AM (in response to laurian.muresan)Hi laurian.muresan ,
I'm afraid not no, for now i have simply hidden the show more button using CSS, since i'm using the search picker it makes it less of an issue as the user can just search for what they want.
Thanks
Gareth
-
-