diff --git a/css/_share-modal.scss b/css/_share-modal.scss index bc43aa4..b440b8a 100644 --- a/css/_share-modal.scss +++ b/css/_share-modal.scss @@ -49,3 +49,7 @@ button#igv-share-url-button { .igv-app-social-button { float: left; } + +.custom-btn-group .btn.single-button { + border-radius: 0.25rem !important; +} diff --git a/css/app.css b/css/app.css index c6309d0..767a8a7 100644 --- a/css/app.css +++ b/css/app.css @@ -90,6 +90,10 @@ button#igv-share-url-button svg { float: left; } +.custom-btn-group .btn.single-button { + border-radius: 0.25rem !important; +} + #igv-encode-spinner-container { width: 100%; display: flex; diff --git a/css/app.css.map b/css/app.css.map index f9dd017..d6df1eb 100644 --- a/css/app.css.map +++ b/css/app.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["_panel.scss","_color.scss","_share-modal.scss","_encode.scss","_track-select.scss","_igv-widgets-alert-dialog.scss","app.scss","_file-load-widget.scss"],"names":[],"mappings":"AAMA;EACE;EACA;EACA;EAEA;EAEA,OAXuB;EAYvB,QAXwB;EAaxB,cCTmB;EDUnB,kBCNe;EDQf;;AAEA;EAEE;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;EAEA;EACA,QAxCmC;EA0CnC,kBCrCa;EDuCb;EACA;;AAEA;EACE;EACA,OCjDU;EDkDV;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;;AE5DR;EAEE,OAJmB;;AAMnB;EACE,aAVkB;EAWlB,WAVgB;EAWhB;EACA;;AACA;EACE;;;AAON;EACE;;AACA;EACE;EACA;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;ACjDF;EAEE;EAEA;EACA;EACA;EACA;EACA;;;ACRF;EAEE;;AAEA;EACE;;AAGF;EAGE;;;ACAJ;EAEE;EAEA;EACA;EACA;EACA;EAEA,OAlBuB;EAmBvB,QAlBwB;EAoBxB,cCfyB;EDgBzB,eCf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AAEA;EACE;;;AAKN;EACE;;;AAGF;EACE;EACA;;;AAKA;EACE;;;AAOF;EACE;;;AAKJ;EAEE;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAOE;EACE,OAhNe;EAiNf;EACA;EACA;;;AAKN;EACE;;;AAKA;EACE,OA/NiB;EAgOjB;EAEA;;AAGF;EAEE;;;AAKJ;EACE;EACA;;;AAGF;EACE,eA7OsB;;;AAgPxB;EACE;EACA;EAEA;EACA,QArPsB;EAsPtB,aAtPsB;EAwPtB;EACA;EACA;EACA;EACA;;AAEA;EACE,QA/PoB;EAgQpB,aAhQoB;EAiQpB;EACA;;AACA;EACE,OAzQe;EA0Qf;;AAIJ;EACE,QA1QoB;EA2QpB,aA3QoB;EA4QpB;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAMN;EACE;EAEA,QAlSkC;EAoSlC;;;AAIF;EACE,kBA7SmB;;;AAgTrB;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE,OA/TqB;EAgUrB;EACA;;;AAGF;EACE,OApUmB;EAqUnB,cAtUqB;;;AAyUvB;EACE,kBA1UqB;;;AA6UvB;EACE,kBA7UmB;;;AAgVrB;EACE;;;AAQA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAKJ;EACE;;;AAIF;EACE;EACA;;;AAIF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKF;EACE;;;AAKA;EACE;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EAEE;IACE;IACA;IAEA;IACA,QAraoB;IAsapB,aAtaoB;IAwapB;IACA;IACA;IACA;IACA;;EAEA;IACE,QA/akB;IAgblB,aAhbkB;IAiblB;IACA;;EACA;IACE,OAzba;IA0bb;;EAIJ;IACE,QA1bkB;IA2blB,aA3bkB;IA4blB;IACA;;EAGF;IACE","file":"app.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["_panel.scss","_color.scss","_share-modal.scss","_encode.scss","_track-select.scss","_igv-widgets-alert-dialog.scss","app.scss","_file-load-widget.scss"],"names":[],"mappings":"AAMA;EACE;EACA;EACA;EAEA;EAEA,OAXuB;EAYvB,QAXwB;EAaxB,cCTmB;EDUnB,kBCNe;EDQf;;AAEA;EAEE;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;EAEA;EACA,QAxCmC;EA0CnC,kBCrCa;EDuCb;EACA;;AAEA;EACE;EACA,OCjDU;EDkDV;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;;AE5DR;EAEE,OAJmB;;AAMnB;EACE,aAVkB;EAWlB,WAVgB;EAWhB;EACA;;AACA;EACE;;;AAON;EACE;;AACA;EACE;EACA;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;ACrDF;EAEE;EAEA;EACA;EACA;EACA;EACA;;;ACRF;EAEE;;AAEA;EACE;;AAGF;EAGE;;;ACAJ;EAEE;EAEA;EACA;EACA;EACA;EAEA,OAlBuB;EAmBvB,QAlBwB;EAoBxB,cCfyB;EDgBzB,eCfoC;EDgBpC;EACA;EAEA;EAEA,aCvBsB;EDwBtB;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;;AAGA;EAEE;EACA;EACA;EACA;EACA;EAEA;EACA,QA9C6B;EA+C7B;EAEA,wBC9CkC;ED+ClC,yBC/CkC;EDgDlC,qBCjDuB;EDkDvB;EACA;EAEA;;AAEA;EAEE;;AAMJ;EACE,OC9DkB;EDgElB;EACA;EAEA;;AAEA;EACE;EAGA,QA1E8B;EA4E9B;EACA;EAKA;EACA;EAEA;EACA;;AAKJ;EAEE;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA,QA7G8B;EA+G9B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;AAIJ;EACE,QA1QoB;EA2QpB,aA3QoB;EA4QpB;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAMN;EACE;EAEA,QAlSkC;EAoSlC;;;AAIF;EACE,kBA7SmB;;;AAgTrB;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE,OA/TqB;EAgUrB;EACA;;;AAGF;EACE,OApUmB;EAqUnB,cAtUqB;;;AAyUvB;EACE,kBA1UqB;;;AA6UvB;EACE,kBA7UmB;;;AAgVrB;EACE;;;AAQA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAKJ;EACE;;;AAIF;EACE;EACA;;;AAIF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKF;EACE;;;AAKA;EACE;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EAEE;IACE;IACA;IAEA;IACA,QAraoB;IAsapB,aAtaoB;IAwapB;IACA;IACA;IACA;IACA;;EAEA;IACE,QA/akB;IAgblB,aAhbkB;IAiblB;IACA;;EACA;IACE,OAzba;IA0bb;;EAIJ;IACE,QA1bkB;IA2blB,aA3bkB;IA4blB;IACA;;EAGF;IACE","file":"app.css"} \ No newline at end of file diff --git a/index.html b/index.html index d99fc9d..16f3117 100644 --- a/index.html +++ b/index.html @@ -475,16 +475,19 @@
- +
- +
- +
+ + +
@@ -493,9 +496,6 @@
-
- -
diff --git a/js/shareWidgets.js b/js/shareWidgets.js index 5a7bef5..a11de25 100644 --- a/js/shareWidgets.js +++ b/js/shareWidgets.js @@ -28,10 +28,12 @@ import {doShortenURL, setURLShortener, shortSessionURL} from './shareHelper.js' let href let session -function createShareWidgets({browser, container, modal, share_input, copy_link_button, qrcode_button, qrcode_image, embed_container, embed_button, embedTarget}) { +function createShareWidgets({browser, container, modal, share_input, copy_link_button, qrcode_button, qrcode_image, embed_container, embed_button, iframeButton, embedTarget}) { $(modal).on('show.bs.modal', (e) => { + iframeButton.style.display = 'none' + embed_button.classList.add('single-button') document.querySelector('#igv-app-qrcode-image').style.display = 'none' document.querySelector('#igv-app-qrcode-container').style.display = 'none' @@ -91,7 +93,8 @@ function createShareWidgets({browser, container, modal, share_input, copy_link_b document.getElementById('igv-share-long-url-radio').addEventListener('click', async () => { document.querySelector('#igv-app-qrcode-image').style.display = 'none' document.querySelector('#igv-app-qrcode-container').style.display = 'none' - share_input.value = `${href}?sessionURL=blob:${session}` + const str = `${href}?sessionURL=blob:${session}` + share_input.value = str }) copy_link_button.addEventListener('click', () => { @@ -105,8 +108,7 @@ function createShareWidgets({browser, container, modal, share_input, copy_link_b }) if (embedTarget) { - const button = embed_container.querySelector('button'); - button.addEventListener('click', () => { + iframeButton.addEventListener('click', () => { const textArea = embed_container.querySelector('textarea'); textArea.select(); @@ -118,21 +120,24 @@ function createShareWidgets({browser, container, modal, share_input, copy_link_b } else { console.error('fail!'); } - }); + }) embed_button.addEventListener('click', () => { qrcode_image.style.display = 'none'; if ('block' === embed_container.style.display) { - embed_container.style.display = 'none'; + embed_container.style.display = iframeButton.style.display = 'none' + embed_button.classList.add('single-button') } else { - embed_container.style.display = 'block'; + embed_container.style.display = iframeButton.style.display = 'block' + embed_button.classList.remove('single-button') } - }); + }) + } else { - embed_button.style.display = 'none'; + modal.querySelector('.btn-group').style.display = 'none' } qrcode_button.addEventListener('click', async () => { @@ -179,6 +184,7 @@ function shareWidgetConfigurator(browser, container, options) { qrcode_image: document.getElementById('igv-app-qrcode-image'), embed_container: document.getElementById('igv-app-embed-container'), embed_button: document.getElementById('igv-app-embed-button'), + iframeButton: document.querySelector('#igv-app-copy-iframe-button'), embedTarget: options.embedTarget || `https://igv.org/web/release/${igv.version()}/embed.html` };