pconkie Posted April 26, 2020 Posted April 26, 2020 Can anyone stop me from wasting any more time on this? @adamw Please! I need to open an app from a html widget (because I need to send the app an assignment uuid) I have code that does this from inside a frogcode widget, but it doesn't work in a html widget I was getting: error trigger is not a function. Implying this.trigger wasn't the way to go. I got a little closer by using $('div.os_core:first') to trigger from, but still got an error about an undefined name. var c = $('div.os_core:first'); var appID = "0597421320048F43D12ECF7C62B12F01382427CCB9FE4A12"; c.trigger('os.internal.launchapp', { name: appID, assignment_uuid: "any assignment uuid", appModel: new Com.Frog.Model({ 'uuid' : appID, 'role_name': Object.values(_Roles.serialize()).filter(function(role) { return /app\.frogplay$/gim.test(role); })[0], 'extended_data' : { 'from_package' : true } }) }); Here is my code - you can see that i'm sending option data (assignment_uuid) and using my frogplay role to authorise (I can't figure out the roles but i'm sure this works as it worked in frogcode). Any ideas? Thanks Paul
ADT Posted April 26, 2020 Posted April 26, 2020 19 hours ago, pconkie said: Can anyone stop me from wasting any more time on this? @adamw Please! I need to open an app from a html widget (because I need to send the app an assignment uuid) I have code that does this from inside a frogcode widget, but it doesn't work in a html widget I was getting: error trigger is not a function. Implying this.trigger wasn't the way to go. I got a little closer by using $('div.os_core:first') to trigger from, but still got an error about an undefined name. var c = $('div.os_core:first'); var appID = "0597421320048F43D12ECF7C62B12F01382427CCB9FE4A12"; c.trigger('os.internal.launchapp', { name: appID, assignment_uuid: "any assignment uuid", appModel: new Com.Frog.Model({ 'uuid' : appID, 'role_name': Object.values(_Roles.serialize()).filter(function(role) { return /app\.frogplay$/gim.test(role); })[0], 'extended_data' : { 'from_package' : true } }) }); Here is my code - you can see that i'm sending option data (assignment_uuid) and using my frogplay role to authorise (I can't figure out the roles but i'm sure this works as it worked in frogcode). Any ideas? Thanks Paul Can't help.... but am always keen to see what Conkies cooking up.... ?
adamw Posted April 27, 2020 Posted April 27, 2020 On 26/04/2020 at 01:05, pconkie said: Can anyone stop me from wasting any more time on this? @adamw Please! I need to open an app from a html widget (because I need to send the app an assignment uuid) I have code that does this from inside a frogcode widget, but it doesn't work in a html widget I was getting: error trigger is not a function. Implying this.trigger wasn't the way to go. I got a little closer by using $('div.os_core:first') to trigger from, but still got an error about an undefined name. var c = $('div.os_core:first'); var appID = "0597421320048F43D12ECF7C62B12F01382427CCB9FE4A12"; c.trigger('os.internal.launchapp', { name: appID, assignment_uuid: "any assignment uuid", appModel: new Com.Frog.Model({ 'uuid' : appID, 'role_name': Object.values(_Roles.serialize()).filter(function(role) { return /app\.frogplay$/gim.test(role); })[0], 'extended_data' : { 'from_package' : true } }) }); Here is my code - you can see that i'm sending option data (assignment_uuid) and using my frogplay role to authorise (I can't figure out the roles but i'm sure this works as it worked in frogcode). Any ideas? Thanks Paul Try: FrogOS.openApp( 'yourappnamehere', { assignment_uuid: "any assignment uuid", } ); You have to open it with the app name, not the uuid (I think) 1
pconkie Posted April 27, 2020 Author Posted April 27, 2020 25 minutes ago, adamw said: Try: FrogOS.openApp( 'yourappnamehere', { assignment_uuid: "any assignment uuid", } ); You have to open it with the app name, not the uuid (I think) No, nothing. Could my app not be called what i think it is called? <script> console.log("running?") FrogOS.openApp( 'app.externalapps.42134a12.activityreview', { assignment_uuid: "52A6047720003DD21F405F682109D30B81F312EC00EAA941", } ); FrogOS.openApp( 'activityreview', { assignment_uuid: "52A6047720003DD21F405F682109D30B81F312EC00EAA941", } ); FrogOS.openApp( 'Activity Review', { assignment_uuid: "52A6047720003DD21F405F682109D30B81F312EC00EAA941", } ); </script> It does something......I have tried the above (the last one is what it is actually called in frogcode). First one is what it is called in groups and policies. But no app. Looks like it can not find the correct url?
adamw Posted April 27, 2020 Posted April 27, 2020 Hmm, I would expect the app name to be the same as it appears in your manifest - so probably something like the second example you showed. Is the app deployed? Also, I'll need to check that we can open Frogcode apps in that way, I never thought about that before!
adamw Posted April 27, 2020 Posted April 27, 2020 I put your question to the experts here at Frog and this is what they have suggested should work! c.trigger('os.internal.launchapp', { data: { name: appID, appModel: new Com.Frog.Model({ 'uuid' : appID, 'role_name': Object.values(_Roles.serialize()).filter(function(role) { return /app\.frogplay$/gim.test(role); })[0], 'extended_data' : { 'from_package' : true } }) } }); 1
pconkie Posted April 27, 2020 Author Posted April 27, 2020 1 hour ago, adamw said: I put your question to the experts here at Frog and this is what they have suggested should work! c.trigger('os.internal.launchapp', { data: { name: appID, appModel: new Com.Frog.Model({ 'uuid' : appID, 'role_name': Object.values(_Roles.serialize()).filter(function(role) { return /app\.frogplay$/gim.test(role); })[0], 'extended_data' : { 'from_package' : true } }) } }); But that looks identical to what i posted!! However - it does work. Thanks! BTW I do consider you an expert. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now