Jump to content

Straight to Google Drive?


gbligh

Recommended Posts

Hi all

We have Google Drive appear in FrogDrive. Is there a way for it to be the first thing than opens when FrogDrive is launched? Or another way round this? Personally I’d like to embed Google Drive inside FrogDrive on a page.

Link to comment
Share on other sites

On 29/05/2020 at 18:45, gbligh said:

I forgot to tag the experts! @Graham Quince @adamw @pconkie

Hah! When it comes to stuff like that, I'm not the expert! However I know a few people who are, and so I will discreetly probe their knowledge.

And by that, I mean shout stuff at them and then run away as they hurl abuse at me.

  • Haha 1
Link to comment
Share on other sites

3 hours ago, adamw said:

Hah! When it comes to stuff like that, I'm not the expert! However I know a few people who are, and so I will discreetly probe their knowledge.

And by that, I mean shout stuff at them and then run away as they hurl abuse at me.

Thanks Adam - appreciate that :) 

Link to comment
Share on other sites

  • 10 months later...

Hi George,

I've stumbled across a way to trigger Google Drive in FrogDrive to open directly from a link (not quite embedding it though)

<div class="GoogleDrive">Google Drive</div>


<script>
$(".GoogleDrive").click(function(){
    $('.GoogleDrive').trigger('os.internal.launchapp', {
        data: {
            name: 'resources',
            view: 'googledrive',
            selected: 'googledrive'
        }
    });
});

</script>

 

To open FrogDrive to My Documents, you can use this option:

<div class="FrogDriveButton">Open FrogDrive</div>

<script>
$(".FrogDriveButton").click(function(){
    $('.FrogDriveButton').trigger('os.internal.launchapp', {
        data: {
            name: 'resources'
        }
    });
});
</script>

And most other sections can open with just a 'view' value being passed:

<div class="AppsButton">Open FrogDrive > Applications</div>

<script>
$(".AppsButton").click(function(){
    $('.AppsButton').trigger('os.internal.launchapp', {
        data: {
            name: 'resources',
            view: 'apps'
        }
    });
});
</script>

 

 

Link to comment
Share on other sites

Had to do some fiddling with CSS, but I think I've got there.  This code will let you embed Google Drive using an HTML widget:

<style>
    .embeddedGoogleDrive .content {
        width: calc(100% - 220px) !important;
        background: #ffffff;
    }
    .embeddedGoogleDrive {
        font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !mportant;
        font-size: .9em !important;
    }
    .embeddedGoogleDriveembed {
        width: 100%;
        height: 510px;
        background: #ffffff;
    }
    .embeddedGoogleDrive a {
        color: #222;
    }
</style>

<div class="embeddedGoogleDrive">
<div class="column link-info embeddedGoogleDriveembed">
     <h2 class="widget-title os-ellipsis">Google Drive</h2>
</div>
</div>

<script>
var embedded = arguments[0].find('.embeddedGoogleDrive');

function renderEmbedWidget() {

    var app_data = {
        data: {
            name: 'resources',
            view: 'googledrive',
            selected: 'googledrive'
        }
    };
    
    var app_width = parseInt(embedded.css('width'));

    embedded.addClass('embedded').trigger('os.internal.launchEmbeddedApp', {
        app_name: 'resources',
        role_name: 'googledrive',
        app_container: embedded,
        app_width: app_width,
        app_height: 600,
        app_data: app_data,
        user: FrogOS ? FrogOS.getUser() : this.getUser()
    });
}
renderEmbedWidget();
</script>

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...