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

Restyling widgets in viewer and edit popups #635

Open
kgish opened this issue Aug 15, 2016 · 2 comments
Open

Restyling widgets in viewer and edit popups #635

kgish opened this issue Aug 15, 2016 · 2 comments

Comments

@kgish
Copy link

kgish commented Aug 15, 2016

I still haven't upgraded to v2.x and was wondering if there is an easy way in v1.2.10 to restyle (overrule css) only certain widgets (edit, submit, buttons, font-size, links, etc).

@kgish kgish changed the title Restyling widgest Restyling widgets in viewer and edit popups Aug 15, 2016
@tilgovi
Copy link
Member

tilgovi commented Aug 19, 2016

Nope :-(

@kgish
Copy link
Author

kgish commented Aug 19, 2016

For what it's worth, here's how I managed to change widget stylings. I realize that this is not a very elegant solution, but it works. In case anyone is interested I will share it:

this.annotator.subscribe('annotationEditorShown', function (editor, annotation) {
    var buttons = editor.element.find('button');
    buttons.css({
        display: 'inline-block',
        textAlign: 'center',
        borderRadius: '4px',
        border: '1px solid black',
        padding: '.2em .6em .3em',
        margin: '.2em',
        cursor: 'pointer',
        backgroundColor: '#fff',
        borderColor: '#ccc',
        color: '#333'
    });
    buttons.hover(function() {
         $(this).css({
           color: '#333333',
           backgroundColor: '#e6e6e6',
           borderColor: '#adadad'
         });
    });
});

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

No branches or pull requests

2 participants