Exemplo n.º 1
0
def build_dilog():
    return html.Div([
        sd_material_ui.Dialog(children=[],
                              id='dialog',
                              modal=False,
                              open=False)
    ])
Exemplo n.º 2
0
    def share_modal(share_link, download_link):
        return html.Div([
            sd_material_ui.Dialog(
                html.Div(children=[
                    html.H3('Share WikiChron with others or save your work!'),
                    html.P([
                      html.Strong('Link with your current selection:'),
                      html.Div(className='share-modal-link-and-button-cn', children=[
                        dcc.Input(value=share_link, id='share-link-input', readOnly=True, className='share-modal-input-cn', type='url'),
                        html.Div(className='tooltip', children=[
                          html.Button('Copy!', id='share-link', className='share-modal-button-cn'),
                        ])
                      ]),
                    ]),
                    html.P([
                      html.Strong('Link to download the data of your current selection:'),
                      html.Div(className='share-modal-link-and-button-cn', children=[
                        dcc.Input(value=download_link, id='share-download-input', readOnly=True, className='share-modal-input-cn', type='url'),
                        html.Div(className='tooltip', children=[
                          html.Button('Copy!', id='share-download', className='share-modal-button-cn'),
                        ])
                      ]),

                      html.Div([
                        html.Span('You can find more info about working with the data downloaded in '),
                        html.A('this page of our wiki.', href='https://github.com/Grasia/WikiChron/wiki/Downloading-and-working-with-the-data')
                        ],
                        className='share-modal-paragraph-info-cn'
                      )
                    ]),
                    gdc.Import(src='/js/common/dash/main.share_modal.js')
                    ],
                    id='share-dialog-inner-div'
                ),
                id='share-dialog',
                modal=False,
                open=False
            )
        ])
Exemplo n.º 3
0
                          children=[
                              html.P(id='close-input7', children='X'),
                              html.H4(children='Drawer items'),
                              html.Ul(children=[
                                  html.Li(children=['Item 1']),
                                  html.Li(children=['Item 2']),
                                  html.Li(children=['Item 3']),
                              ]),
                          ]),
    html.Div(
        id='input7',
        children=[html.Button(children='Open or close the drawer (left)')]),
    spacer,
    sd_material_ui.Dialog([
        html.H3('Sample Dialog'),
        html.Div(html.Button('Close Dialog'), id='closer')
    ],
                          id='output2'),
    html.Div(id='input2', children=[html.Button(children='Open the dialog')]),
    final_spacer,
])


# @app.callback(
#     dash.dependencies.Output('question-output-id', 'children'),
#     [
#         dash.dependencies.Input('questions-id', 'value'),
#         dash.dependencies.Input('questions-id', 'n_clicks'),
#      ],
#     [dash.dependencies.State('questions-id', 'n_clicks_previous')])
# def update_questions_output(value, n_clicks, n_clicks_previous):
Exemplo n.º 4
0
    sd_material_ui.CircularProgress(mode='indeterminate',
                                    size=100,
                                    thickness=14),
    spacer,

    # Test FontIcon
    sd_material_ui.FontIcon(className="material-icons",
                            iconName="settings",
                            hoverColor='blue'),  # only works for public icons
    spacer,

    # Test SDDialog (modal)
    sd_material_ui.Dialog(html.Div(children=[
        html.P('pathname'),
        html.P(id='closer', children='Close window'),
    ]),
                          id='output2',
                          modal=True,
                          open=False),
    html.Div(id='input2', children=[html.P('Share the page (modal)')]),
    spacer,

    # Test SDDialog (non-modal)
    sd_material_ui.Dialog(html.Div(children=[
        html.P('Non-modal dialog'),
    ]),
                          id='non-modal-output',
                          modal=False,
                          open=False),
    html.Div(id='non-modal-input',
             children=[html.P('Share the page (non-modal)')]),