umbraco-vorto icon indicating copy to clipboard operation
umbraco-vorto copied to clipboard

Add option to hide sync checkbox

Open kipusoep opened this issue 8 years ago • 7 comments

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.

kipusoep avatar May 10 '16 13:05 kipusoep

+1

rosrosros avatar May 17 '16 13:05 rosrosros

+1

alecrt avatar Jun 16 '16 09:06 alecrt

+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.

anth12 avatar Jun 29 '16 16:06 anth12

@anth12 care to share your code?

mattbrailsford avatar Nov 01 '16 11:11 mattbrailsford

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

anth12 avatar Nov 01 '16 11:11 anth12

@anth12 a starting point is better than nothing :)

mattbrailsford avatar Nov 01 '16 11:11 mattbrailsford

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.

anth12 avatar Nov 01 '16 12:11 anth12