Skip to content

Commit

Permalink
bs5: initial updates
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldero committed Jun 7, 2022
1 parent b1d98d3 commit b7a448e
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 54 deletions.
2 changes: 1 addition & 1 deletion wepsim_core/wepsim_checkpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
o +
'</ul>' +
'To close this notification please press in the ' +
'<span class="btn btn-sm btn-info py-0" data-dismiss="alert">X</span> mark. <br>' ;
'<span class="btn btn-sm btn-info py-0" data-bs-dismiss="alert">X</span> mark. <br>' ;
}

if (checkpointObj.notify === true) {
Expand Down
2 changes: 1 addition & 1 deletion wepsim_core/wepsim_notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}

// create the alert div
var btn1 = $('<button type="button" class="btn-close border border-secondary" onclick="wepsim_notify_close(); return false;">') ;
var btn1 = $('<button type="button" class="btn-close border border-secondary float-end" onclick="wepsim_notify_close(); return false;">') ;
var alert1 = $('<div class="alert alert-' + ntf_type + ' shadow border border-light">') ;
ac.prepend(alert1.append(btn1.append("")).append(ntf_message)) ;

Expand Down
4 changes: 2 additions & 2 deletions wepsim_web/wepsim_uielto_dbg_asm.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
{
var wsi = get_cfg('ws_idiom') ;

var o = '<span class="d-grid gap-2">' +
var o = '<span class="d-grid gap-2 p-1">' +
// <labels>
quickcfg_html_header(i18n_get('dialogs', wsi, 'Show labels')) +
quickcfg_html_onoff('C0',
Expand Down Expand Up @@ -433,7 +433,7 @@
"wepsim_click_asm_columns(\'pins\',\'C4\'); return false;") +
// <close>
'<button type="button" id="close" data-role="none" ' +
' class="btn btn-sm btn-danger w-100 p-0 mt-2" ' +
' class="btn btn-sm btn-danger w-100 p-0 mt-3" ' +
' onclick="wepsim_popovers_hide('+asm_po+');">' + i18n_get('dialogs', wsi, 'Close') +
'</button>' +
'</span>' ;
Expand Down
2 changes: 1 addition & 1 deletion wepsim_web/wepsim_web_simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@
o = 'WepSIM has been instructed to preload some work for you:<br>' +
'<ul>' + o + '</ul>' +
'To close this notification please press in the ' +
'<span class="btn btn-sm btn-info py-0" data-dismiss="alert">X</span> mark. <br>' +
'<span class="btn btn-sm btn-info py-0" data-bs-dismiss="alert">X</span> mark. <br>' +
'In order to execute an example please press the ' +
'<span class="btn btn-sm btn-info py-0" ' +
' onclick="webui_executionbar_toggle_play(\'exebar1\');">Run</span> ' +
Expand Down
2 changes: 1 addition & 1 deletion wepsim_web/wepsim_web_ui_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
{
return "<div class='col p-1 mt-2'>" +
"<button type='button' id='close' data-role='none' " +
" class='btn btn-sm btn-danger w-100 p-0 mt-1' " +
" class='btn btn-sm btn-danger w-100 p-0 mt-2' " +
" onclick='wepsim_popover_hide(\"" + btn2_id + "\");'>" +
"<span data-langkey='Close'>Close</span>" +
"</button>" +
Expand Down
97 changes: 52 additions & 45 deletions wepsim_web/wepsim_web_ui_quickcfg.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,55 +29,46 @@
quick_id: '#po1',
val_trigger: 'manual',
fun_content: function() {
var wsi = get_cfg('ws_idiom') ;

var o = '<ul class="list-group list-group-flush">' ;

o += '<li class="list-group-item px-0"> ' +
' <a class="btn btn-sm btn-outline-dark col p-1 text-start float-end w-100" href="#" ' +
' onclick="wsweb_dialog_open(\'about\'); ' +
' wsweb_quickmenu_close(); ' +
' return true;">' +
'<em class="fas fa-magic col-1 me-2 float-start"></em>' +
'<span class="col-11">' + i18n_get('dialogs',wsi,'About WepSIM') + '...</span></a>' +
'</li>' ;

/*
o += '<li class="list-group-item px-0"> ' +
' <a class="btn btn-sm btn-outline-dark col p-1 text-start float-end w-100" href="#" ' +
' onclick="wepsim_newbie_tour(); ' +
' wsweb_quickmenu_close(); ' +
' return true;">' +
'<em class="fas fa-book-reader col-1 me-2 float-start"></em>' +
'<span class="col-11">' + i18n_get('dialogs',wsi,'Initial intro') + '...</span></a>' +
'</li>' ;
*/

o += '<li class="list-group-item px-0"> ' +
' <span class="btn-group-toggle w-100" data-bs-toggle="buttons">' +
' <label class="btn btn-sm btn-outline-dark col p-1 text-start float-end w-100" data-bs-toggle="collapse" href=".multi-collapse-3">' +
' <input type="checkbox" class="btn-check" checked="" autocomplete="off">' +
'<em class="fas fa-wrench col-1 me-2 float-start"></em>' +
'<span class="col-11">' + i18n_get('dialogs',wsi,'Show/Hide QuickConfig') + '</span>&nbsp;</label>' +
' </span>' +
'</li>' ;

o += '<li class="list-group-item px-0"> ' +
' <span class="btn-group-toggle w-100" data-bs-toggle="buttons">' +
' <label class="btn btn-sm btn-outline-dark col p-1 text-start float-end w-100" data-bs-toggle="collapse" href=".multi-collapse-1">' +
' <input type="checkbox" class="btn-check" checked="" autocomplete="off">' +
'<em class="fas fa-bars col-1 me-2 float-start"></em>' +
'<span class="col-11">' + i18n_get('dialogs',wsi,'Show/Hide ActionBar') + '</span></label>' +
' </span>' +
o += '<li class="list-group-item px-2 pt-0 pb-2"> ' +
"<span class='col-6'>" +
'<em class="fas fa-magic col-1 me-2 mt-1 float-start"></em>&nbsp;' +
"<span data-langkey='About WepSIM'>About WepSIM</span>" +
"</span>" +
quickcfg_html_br() +
quickcfg_html_btn('About us',
'wsweb_dialog_open(\"about\"); ' +
'wsweb_quickmenu_close(); return true;',
'col-6 me-auto') +
'</li>' ;

o += '<li class="list-group-item px-0"> ' +
' <span class="btn-group-toggle w-100" data-bs-toggle="buttons">' +
' <label class="btn btn-sm btn-outline-dark col p-1 text-start float-end w-100" data-bs-toggle="collapse" href=".multi-collapse-2">' +
' <input type="checkbox" class="btn-check" checked="" autocomplete="off">' +
'<em class="fas fa-sliders-h col-1 me-2 float-start"></em>' +
'<span class="col-11">' + i18n_get('dialogs',wsi,'Show/Hide Slider') + '</span></label>' +
' </span>' +
o += '<li class="list-group-item px-0 pt-2"> ' +
"<span class='container px-0'>" +
"<span class='row p-2'>" +
"<span class='col-7'>" +
'<em class="fas fa-wrench col-1 me-2 mt-1 float-start"></em>&nbsp;' +
"<span data-langkey='QuickConfig'>QuickConfig</span>" +
"</span>" +
quickcfg_html_btntoggle('.multi-collapse-3', 'col-5') +
"</span>" ;

o += "<span class='row p-2'>" +
"<span class='col-6'>" +
'<em class="fas fa-bars col-1 me-2 mt-1 float-start"></em>&nbsp;' +
"<span data-langkey='ActionBar'>ActionBar</span>" +
"</span>" +
quickcfg_html_btntoggle('.multi-collapse-1', 'col-6') +
"</span>" ;

o += "<span class='row p-2'>" +
"<span class='col-6'>" +
'<em class="fas fa-sliders-h col-1 me-2 mt-1 float-start"></em>&nbsp;' +
"<span data-langkey='Sliders'>Sliders</span>" +
"</span>" +
quickcfg_html_btntoggle('.multi-collapse-2', 'col-6') +
"</span>" +
"</span>" +
'</li>' ;

o += quickcfg_html_close('po1') +
Expand Down Expand Up @@ -402,6 +393,22 @@
"</div>" ;
}

function quickcfg_html_btntoggle ( label2, colwidth2 )
{
var wsi = get_cfg('ws_idiom') ;

return '<span class="btn-group-toggle ' + colwidth2 + '" data-bs-toggle="buttons">' +
' <label class="btn btn-sm btn-outline-dark p-1 text-start float-end" ' +
' data-bs-toggle="collapse" href="' + label2 + '">' +
'<input type="checkbox" class="btn-check" checked="" autocomplete="off">' +
'<span class="mx-auto px-1 fw-bold rounded text-dark" ' +
' style="background-color:#CEECF5; ">' +
i18n_get('dialogs', wsi, 'Show/Hide') +
'</span>' +
' </label>' +
'</span>' ;
}

function quickcfg_html_onoff ( id2, arial2, nm_off2, code_off2, nm_on2, code_on2 )
{
return wepsim_config_button_html_onoff(id2, arial2, nm_off2, code_off2, nm_on2, code_on2) ;
Expand Down
2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_node.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ws_dist/min.wepsim_web.js

Large diffs are not rendered by default.

0 comments on commit b7a448e

Please sign in to comment.