Jump to content
gbligh

Straight to Google Drive?

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 post
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 post
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 post
Share on other sites

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...