Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to hide sync checkbox #46

Open
kipusoep opened this issue May 10, 2016 · 7 comments
Open

Add option to hide sync checkbox #46

kipusoep opened this issue May 10, 2016 · 7 comments

Comments

@kipusoep
Copy link

I can't think of any reason why you don't want to sync between the language tabs, so it would be good to have an option to hide the sync checkbox.

@rosrosros
Copy link

+1

1 similar comment
@alecrt
Copy link

alecrt commented Jun 16, 2016

+1

@anth12
Copy link
Contributor

anth12 commented Jun 29, 2016

+1

On every Umbraco site I have used Vorto I have added a script that does exactly this, it also removes the language selection from each individual property and places it the header of the admin screen & adds a globe icon next to the property to indicate it is multilingual. Personally I try to keep the forms as compact as possible so am not a fan of having a language selection dropdown on very property.

@mattbrailsford
Copy link
Collaborator

@anth12 care to share your code?

@anth12
Copy link
Contributor

anth12 commented Nov 1, 2016

@mattbrailsford sure I will dig it out, but I'm warning in advance its not pretty ;).

@mattbrailsford
Copy link
Collaborator

@anth12 a starting point is better than nothing :)

@anth12
Copy link
Contributor

anth12 commented Nov 1, 2016

Ok so I normally use Umbraco's manifest to inject the following:

$(window).on('vorto-ready', function() {

    //Ensure its not already been setup by another property firing duplicate events
    if ($('.umb-panel-header .vorto-tabs').length == 0) {

        setTimeout(function() {
            //Move the tabs
            $('.vorto-tabs').first().insertAfter($('.btn-toolbar.pull-right.umb-btn-toolbar'));

        }, 10);
    }
});
.vorto-tabs {
    display: none;
}

.umb-panel-header .vorto-tabs {
    display: inline!important;
    float: right;
    margin-top: 15px;
}

    .umb-panel-header .vorto-tabs .vorto-tabs__item {
        height: 29px;
        border-bottom-color: #ddd;
    }

    .umb-panel-header .vorto-tabs .vorto-menu {
        left: auto;
        right: -1px;
    }

And finally I modify the vorto.js file to fire the 'Vorto-Ready' ($(window).trigger('vorto-ready');) event- obviously this is not an idea solution as upgrades overwrite the change.

I do much prefer having one central language selector but using the standard customisation in Umbraco I'm not sure it would be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants