From 39dde11b83ce339d0cbe511db1197ea159555bc6 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Wed, 21 Sep 2022 02:09:31 +0530 Subject: [PATCH 1/4] Replaced Bootstrap tour by IntroJs in vote activity --- activities/Vote.activity/css/activity.css | 344 ++++++++------ .../css/bootstrap-tour-standalone.min.css | 26 -- activities/Vote.activity/css/introjs.css | 2 + activities/Vote.activity/index.html | 422 ++++++++++-------- activities/Vote.activity/js/activity.js | 101 ++--- .../js/components/SugarTutorial.js | 103 ++--- .../lib/bootstrap-tour-standalone.min.js | 22 - activities/Vote.activity/lib/intro.js | 11 + activities/Vote.activity/lib/jquery.min.js | 2 - 9 files changed, 545 insertions(+), 488 deletions(-) delete mode 100644 activities/Vote.activity/css/bootstrap-tour-standalone.min.css create mode 100644 activities/Vote.activity/css/introjs.css delete mode 100644 activities/Vote.activity/lib/bootstrap-tour-standalone.min.js create mode 100644 activities/Vote.activity/lib/intro.js delete mode 100644 activities/Vote.activity/lib/jquery.min.js diff --git a/activities/Vote.activity/css/activity.css b/activities/Vote.activity/css/activity.css index 63df40bfa..230cba35b 100644 --- a/activities/Vote.activity/css/activity.css +++ b/activities/Vote.activity/css/activity.css @@ -1,246 +1,312 @@ button:disabled { - opacity: 0.3 !important; + opacity: 0.3 !important; } body { - padding: 0; - margin: 0; - background: white; + padding: 0; + margin: 0; + background: white; } * { - box-sizing: border-box; + box-sizing: border-box; } p { - margin: 0.6em 0; + margin: 0.6em 0; } #app { - min-height: 100%; + min-height: 100%; } #content { - height: calc(100vh - 55px); - overflow: auto; + height: calc(100vh - 55px); + overflow: auto; } #content.fullscreen { - height: 100vh; + height: 100vh; } .fullscreen { - min-height: 100vh !important; + min-height: 100vh !important; } #main-toolbar .splitbar { - border-right: 1.5px solid #565656; - margin: 7.5px 5px; - height: 40px; - display: inline-block; - vertical-align: bottom; + border-right: 1.5px solid #565656; + margin: 7.5px 5px; + height: 40px; + display: inline-block; + vertical-align: bottom; } #main-toolbar.toolbar { - padding: 0 2%; - overflow: hidden; + padding: 0 2%; + overflow: hidden; } #main-toolbar.hidden { - height: 0; - overflow: hidden; + height: 0; + overflow: hidden; } #main-toolbar #activity-button { - background-image: url(../activity/activity-icon.svg); + background-image: url(../activity/activity-icon.svg); } #main-toolbar #network-button { - background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-home.svg); + background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-home.svg); } #private-button { - background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-home.svg); - width: 47px; - height: 47px; - margin: 4px 2px; - color: white; - color: transparent; - background-color: transparent; - background-position: center; - background-repeat: no-repeat; - background-size: contain; - border: 0; - border-radius: 5.5px; + background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-home.svg); + width: 47px; + height: 47px; + margin: 4px 2px; + color: white; + color: transparent; + background-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-size: contain; + border: 0; + border-radius: 5.5px; } #shared-button { - background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-neighborhood.svg); - width: 47px; - height: 47px; - margin: 4px 2px; - color: white; - color: transparent; - background-color: transparent; - background-position: center; - background-repeat: no-repeat; - background-size: contain; - border: 0; - border-radius: 5.5px; + background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-neighborhood.svg); + width: 47px; + height: 47px; + margin: 4px 2px; + color: white; + color: transparent; + background-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-size: contain; + border: 0; + border-radius: 5.5px; } #main-toolbar #home-button { - background-image: url(../icons/home.svg); + background-image: url(../icons/home.svg); } #main-toolbar #settings-button { - background-image: url(../icons/settings.svg); + background-image: url(../icons/settings.svg); } #main-toolbar #add-button { - background-image: url(../icons/add.svg); + background-image: url(../icons/add.svg); } #main-toolbar #real-time-button { - background-image: url(../icons/stats.svg); + background-image: url(../icons/stats.svg); } #main-toolbar #auto-stop-button { - background-image: url(../icons/auto-stop.svg); + background-image: url(../icons/auto-stop.svg); } #main-toolbar #history-button { - background-image: url(../icons/history.svg); + background-image: url(../icons/history.svg); } #main-toolbar #delete-button { - background-image: url(../icons/delete.svg); + background-image: url(../icons/delete.svg); } #main-toolbar #export-button { - background-image: url(../icons/file-export.svg); + background-image: url(../icons/file-export.svg); } #main-toolbar #help-button { - background-image: url(../icons/help.svg); + background-image: url(../icons/help.svg); } #main-toolbar #fullscreen-button { - background-image: url(../icons/view-fullscreen.svg); + background-image: url(../icons/view-fullscreen.svg); } #main-toolbar #unfullscreen-button { - background-image: url(../icons/view-return.svg); - border: 0; - border-radius: 0px; - margin: 1px; - width: 45px; - height: 45px; - top: 0; - right: 6%; - position: absolute; - z-index: 5; + background-image: url(../icons/view-return.svg); + border: 0; + border-radius: 0px; + margin: 1px; + width: 45px; + height: 45px; + top: 0; + right: 6%; + position: absolute; + z-index: 5; } .search-field { - position: relative; - display: inline-block; - vertical-align: bottom; - margin-bottom: 10px; + position: relative; + display: inline-block; + vertical-align: bottom; + margin-bottom: 10px; } .search-field .search-icon { - position: absolute; - left: 10px; - top: 40%; - background-image: url(../icons/entry-search.svg); - background-repeat: no-repeat; - background-size: cover; - width: 20px; - height: 20px; + position: absolute; + left: 10px; + top: 40%; + background-image: url(../icons/entry-search.svg); + background-repeat: no-repeat; + background-size: cover; + width: 20px; + height: 20px; } .search-field .search-input { - width: 250px; - margin: 0; - padding-left: 35px; - padding-right: 35px; + width: 250px; + margin: 0; + padding-left: 35px; + padding-right: 35px; } .search-field .search-cancel { - position: absolute; - right: 10px; - top: 40%; - background-image: url(../icons/entry-cancel.svg); - background-repeat: no-repeat; - background-size: cover; - width: 20px; - height: 20px; - cursor: pointer; + position: absolute; + right: 10px; + top: 40%; + background-image: url(../icons/entry-cancel.svg); + background-repeat: no-repeat; + background-size: cover; + width: 20px; + height: 20px; + cursor: pointer; } #export-formats button { - border-radius: 0; - width: 50px; - height: 50px; - background-color: black; - background-size: contain; - background-position: center; - background-repeat: no-repeat; + border-radius: 0; + width: 50px; + height: 50px; + background-color: black; + background-size: contain; + background-position: center; + background-repeat: no-repeat; } #export-formats #csv-export { - background-image: url(../icons/export-txt.svg); + background-image: url(../icons/export-txt.svg); } #export-formats #pdf-export { - background-image: url(../icons/export-pdf.svg); + background-image: url(../icons/export-pdf.svg); } #export-formats #doc-export { - background-image: url(../icons/export-doc.svg); + background-image: url(../icons/export-doc.svg); } #export-formats #odt-export { - background-image: url(../icons/export-odt.svg); + background-image: url(../icons/export-odt.svg); } -.tutorial-icon-button { - border-radius: 22px; - margin-top: 5px; - height: 35px; - width: 90px; - background-color: #808080; - border: 2px solid #808080; - display: flex; - align-items: center; +/* UI styling for introJs-tutorial */ + +.introjs-overlay { + background-color: #000 !important; + opacity: 0.8 !important; +} + +.introjs-tooltip { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; + border-radius: 6px !important; + padding: 2px 1px !important; + font-size: 14px !important; +} + +.introjs-helperLayer { + background: inherit !important; + opacity: 0.6 !important; +} + +.customTooltip .introjs-tooltip-header { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #ffffff; + text-shadow: none; + background-color: #808080; + margin: 0; + padding: 0px 10px; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; } -.tutorial-icon-button { - color: white; +.customTooltip .introjs-tooltip-title { + font-size: 14px; + padding: 0px 8px; + font-weight: 800; } -.tutorial-icon-button.disabled { - color: black; + +.customTooltip .introjs-tooltiptext { + color: #000000; + line-height: 1.42857143; } -.tutorial-title { - background-color: #808080 !important; - color: #ffffff !important; +.customTooltip .introjs-skipbutton { + float: right; + cursor: pointer; + background-image: url(../icons/dialog-cancel.svg); + width: 25px; + height: 25px; + background-size: 25px 25px; + margin-top: 2px; + padding: 0px; + text-indent: 100%; + white-space: nowrap; + overflow: hidden; } -.tutorial-prev-icon1 { - margin-left: 6px; - background-image: url(../icons/go-left.svg); - width: 20px; - height: 20px; - background-size: 20px 20px; +.customTooltip .introjs-nextbutton::before { + content: ""; + margin-right: 6px; + background-image: url(../icons/go-right.svg); + width: 20px; + height: 20px; + background-size: 20px 20px; } -.tutorial-next-icon1 { - margin-left: 6px; - background-image: url(../icons/go-right.svg); - width: 20px; - height: 20px; - background-size: 20px 20px; +.customTooltip .introjs-prevbutton::before { + content: ""; + margin-right: 6px; + background-image: url(../icons/go-left.svg); + width: 20px; + height: 20px; + background-size: 20px 20px; } -.tutorial-end-icon1 { - margin-left: 6px; - background-image: url(../icons/dialog-cancel.svg); - width: 20px; - height: 20px; - background-size: 20px 20px; +.customTooltip .introjs-tooltipbuttons { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + cursor: pointer; + border-top: 0px; + padding: 0px; + text-align: center; + white-space: normal; } -.tutorial-icon-text { - padding-left: 4px; -} \ No newline at end of file +.customTooltip .introjs-button { + text-shadow: none; + border-radius: 22px; + margin: 5px 8px 8px 8px; + width: fit-content; + background-color: #808080 !important; + display: flex !important; + align-items: center !important; + color: white !important; + padding: 6px 20px 6px 10px; + border: 0px; +} + +.customTooltip .introjs-button:focus { + -webkit-box-shadow: 0 0 0 0rem rgba(158, 158, 158, 0.5); + box-shadow: 0 0 0 0rem rgba(158, 158, 158, 0.5); + border: 0px; + background-color: #808080 !important; +} + +.customTooltip .introjs-disabled { + color: black !important; + border: 0px; + opacity: 0.65; +} + +.customTooltip .introjs-disabled:focus { + -webkit-box-shadow: 0 0 0 0rem rgba(158, 158, 158, 0.5); + box-shadow: 0 0 0 0rem rgba(158, 158, 158, 0.5); + border: 0px; +} diff --git a/activities/Vote.activity/css/bootstrap-tour-standalone.min.css b/activities/Vote.activity/css/bootstrap-tour-standalone.min.css deleted file mode 100644 index d6191d68b..000000000 --- a/activities/Vote.activity/css/bootstrap-tour-standalone.min.css +++ /dev/null @@ -1,26 +0,0 @@ -/* ======================================================================== - * bootstrap-tour - v0.10.3 - * http://bootstraptour.com - * ======================================================================== - * Copyright 2012-2015 Ulrich Sossou - * - * ======================================================================== - * Licensed under the MIT License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/MIT - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== - */ - -/*! - * Bootstrap v3.1.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:focus,.btn-default.focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary:focus,.btn-primary.focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:focus,.btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#fff;background-color:#398439;border-color:#255625}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:focus,.btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:focus,.btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:focus,.btn-danger.focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:400;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.tour-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.tour-step-backdrop{position:relative;z-index:1101}.tour-step-backdrop>td{position:relative;z-index:1101}.tour-step-background{position:absolute!important;z-index:1100;background:inherit;border-radius:6px;opacity:0.6}.popover[class*=tour-]{z-index:1102}.popover[class*=tour-] .popover-navigation{padding:9px 14px;overflow:hidden}.popover[class*=tour-] .popover-navigation [data-role=end]{float:right}.popover[class*=tour-] .popover-navigation [data-role=prev],.popover[class*=tour-] .popover-navigation [data-role=next],.popover[class*=tour-] .popover-navigation [data-role=end]{cursor:pointer}.popover[class*=tour-] .popover-navigation [data-role=prev].disabled,.popover[class*=tour-] .popover-navigation [data-role=next].disabled,.popover[class*=tour-] .popover-navigation [data-role=end].disabled{cursor:default}.popover[class*=tour-].orphan{position:fixed;margin-top:0}.popover[class*=tour-].orphan .arrow{display:none} diff --git a/activities/Vote.activity/css/introjs.css b/activities/Vote.activity/css/introjs.css new file mode 100644 index 000000000..0f0bd4ec2 --- /dev/null +++ b/activities/Vote.activity/css/introjs.css @@ -0,0 +1,2 @@ +.introjs-overlay{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;z-index:999999;opacity:0;-webkit-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-showElement{z-index:9999999!important}tr.introjs-showElement>td{z-index:9999999!important;position:relative}tr.introjs-showElement>th{z-index:9999999!important;position:relative}.introjs-disableInteraction{z-index:99999999!important;position:absolute;background-color:#fff;opacity:0}.introjs-relativePosition{position:relative}.introjs-helperLayer{-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;z-index:9999998;border-radius:4px;-webkit-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperLayer *{-webkit-box-sizing:content-box;box-sizing:content-box}.introjs-helperLayer :before{-webkit-box-sizing:content-box;box-sizing:content-box}.introjs-helperLayer :after{-webkit-box-sizing:content-box;box-sizing:content-box}.introjs-tooltipReferenceLayer{font-family:"Helvetica Neue",Inter,ui-sans-serif,"Apple Color Emoji",Helvetica,Arial,sans-serif;-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;visibility:hidden;z-index:100000000;background-color:transparent;-webkit-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-tooltipReferenceLayer *{font-family:"Helvetica Neue",Inter,ui-sans-serif,"Apple Color Emoji",Helvetica,Arial,sans-serif}.introjs-helperNumberLayer{font-family:"Helvetica Neue",Inter,ui-sans-serif,"Apple Color Emoji",Helvetica,Arial,sans-serif;color:#9e9e9e;text-align:center;padding-top:10px;padding-bottom:10px}.introjs-arrow{border:5px solid transparent;content:"";position:absolute}.introjs-arrow.top{top:-10px;left:10px;border-bottom-color:#fff}.introjs-arrow.top-right{top:-10px;right:10px;border-bottom-color:#fff}.introjs-arrow.top-middle{top:-10px;left:50%;margin-left:-5px;border-bottom-color:#fff}.introjs-arrow.right{right:-10px;top:10px;border-left-color:#fff}.introjs-arrow.right-bottom{bottom:10px;right:-10px;border-left-color:#fff}.introjs-arrow.bottom{bottom:-10px;left:10px;border-top-color:#fff}.introjs-arrow.bottom-right{bottom:-10px;right:10px;border-top-color:#fff}.introjs-arrow.bottom-middle{bottom:-10px;left:50%;margin-left:-5px;border-top-color:#fff}.introjs-arrow.left{left:-10px;top:10px;border-right-color:#fff}.introjs-arrow.left-bottom{left:-10px;bottom:10px;border-right-color:#fff}.introjs-tooltip{-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;visibility:visible;background-color:#fff;min-width:250px;max-width:300px;border-radius:5px;-webkit-box-shadow:0 3px 30px rgba(33,33,33,.3);box-shadow:0 3px 30px rgba(33,33,33,.3);-webkit-transition:opacity .1s ease-out;-o-transition:opacity .1s ease-out;transition:opacity .1s ease-out}.introjs-tooltiptext{padding:20px}.introjs-dontShowAgain{padding-left:20px;padding-right:20px}.introjs-dontShowAgain input{padding:0;margin:0;margin-bottom:2px;display:inline;width:10px;height:10px}.introjs-dontShowAgain label{font-size:14px;display:inline-block;font-weight:400;display:inline-block;margin:0 0 0 5px;padding:0;background-color:#fff;color:#616161;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.introjs-tooltip-title{font-size:18px;margin:0;padding:0;font-weight:700;float:left;line-height:32px}.introjs-tooltip-header{padding-left:20px;padding-right:20px;padding-top:10px}.introjs-tooltip-header:after{content:".";visibility:hidden;display:block;height:0;clear:both}.introjs-tooltipbuttons{border-top:1px solid #e0e0e0;padding:10px;text-align:right;white-space:nowrap}.introjs-tooltipbuttons:after{content:"";visibility:hidden;display:block;height:0;clear:both}.introjs-button{-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;overflow:visible;display:inline-block;padding:.5rem 1rem;border:1px solid #bdbdbd;text-decoration:none;text-shadow:1px 1px 0 #fff;font-size:14px;color:#424242;white-space:nowrap;cursor:pointer;outline:0;background-color:#f4f4f4;border-radius:.2em;zoom:1;display:inline}.introjs-button:hover{outline:0;text-decoration:none;border-color:#9e9e9e;background-color:#e0e0e0;color:#212121}.introjs-button:focus{outline:0;text-decoration:none;background-color:#eee;-webkit-box-shadow:0 0 0 .2rem rgba(158,158,158,.5);box-shadow:0 0 0 .2rem rgba(158,158,158,.5);border:1px solid #616161;color:#212121}.introjs-button:active{outline:0;text-decoration:none;background-color:#e0e0e0;border-color:#9e9e9e;color:#212121}.introjs-button::-moz-focus-inner{padding:0;border:0}.introjs-skipbutton{-webkit-box-sizing:content-box;box-sizing:content-box;color:#616161;float:right;font-size:20px;cursor:pointer;font-weight:700;line-height:1;text-align:center;padding:7px 10px}.introjs-skipbutton:focus,.introjs-skipbutton:hover{color:#212121;outline:0;text-decoration:none}.introjs-prevbutton{float:left}.introjs-nextbutton{float:right}.introjs-disabled{color:#9e9e9e;border-color:#bdbdbd;-webkit-box-shadow:none;box-shadow:none;cursor:default;background-color:#f4f4f4;background-image:none;text-decoration:none}.introjs-disabled:focus,.introjs-disabled:hover{color:#9e9e9e;border-color:#bdbdbd;-webkit-box-shadow:none;box-shadow:none;cursor:default;background-color:#f4f4f4;background-image:none;text-decoration:none}.introjs-hidden{display:none}.introjs-bullets{text-align:center;padding-top:10px;padding-bottom:10px}.introjs-bullets ul{-webkit-box-sizing:content-box;box-sizing:content-box;clear:both;margin:0 auto 0;padding:0;display:inline-block}.introjs-bullets ul li{-webkit-box-sizing:content-box;box-sizing:content-box;list-style:none;float:left;margin:0 2px}.introjs-bullets ul li a{-webkit-transition:width .1s ease-in;-o-transition:width .1s ease-in;transition:width .1s ease-in;-webkit-box-sizing:content-box;box-sizing:content-box;display:block;width:6px;height:6px;background:#ccc;border-radius:10px;text-decoration:none;cursor:pointer}.introjs-bullets ul li a:focus,.introjs-bullets ul li a:hover{width:15px;background:#999;text-decoration:none;outline:0}.introjs-bullets ul li a.active{width:15px;background:#999}.introjs-progress{-webkit-box-sizing:content-box;box-sizing:content-box;overflow:hidden;height:10px;margin:10px;border-radius:4px;background-color:#e0e0e0}.introjs-progressbar{-webkit-box-sizing:content-box;box-sizing:content-box;float:left;width:0%;height:100%;font-size:10px;line-height:10px;text-align:center;background-color:#08c}.introjsFloatingElement{position:absolute;height:0;width:0;left:50%;top:50%}.introjs-fixedTooltip{position:fixed}.introjs-hint{-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;background:0 0;width:20px;height:15px;cursor:pointer}.introjs-hint:focus{border:0;outline:0}.introjs-hint:hover>.introjs-hint-pulse{background-color:rgba(60,60,60,.57)}.introjs-hidehint{display:none}.introjs-fixedhint{position:fixed}@-webkit-keyframes introjspulse{0%{-webkit-transform:scale(.95);transform:scale(.95);-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.7);box-shadow:0 0 0 0 rgba(0,0,0,.7)}70%{-webkit-transform:scale(1);transform:scale(1);-webkit-box-shadow:0 0 0 10px transparent;box-shadow:0 0 0 10px transparent}100%{-webkit-transform:scale(.95);transform:scale(.95);-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent}}@keyframes introjspulse{0%{-webkit-transform:scale(.95);transform:scale(.95);-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.7);box-shadow:0 0 0 0 rgba(0,0,0,.7)}70%{-webkit-transform:scale(1);transform:scale(1);-webkit-box-shadow:0 0 0 10px transparent;box-shadow:0 0 0 10px transparent}100%{-webkit-transform:scale(.95);transform:scale(.95);-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent}}.introjs-hint-pulse{-webkit-box-sizing:content-box;box-sizing:content-box;width:15px;height:15px;border-radius:30px;background-color:rgba(136,136,136,.24);z-index:10;position:absolute;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;-webkit-animation:introjspulse 2s infinite;animation:introjspulse 2s infinite}.introjs-hint-no-anim .introjs-hint-pulse{-webkit-animation:none;animation:none}.introjs-hint-dot{-webkit-box-sizing:content-box;box-sizing:content-box;background:0 0;border-radius:60px;height:50px;width:50px;position:absolute;top:-18px;left:-18px;z-index:1;opacity:0} +/*# sourceMappingURL=introjs.css.map */ \ No newline at end of file diff --git a/activities/Vote.activity/index.html b/activities/Vote.activity/index.html index b53d37b7c..400d0c959 100644 --- a/activities/Vote.activity/index.html +++ b/activities/Vote.activity/index.html @@ -1,194 +1,244 @@ + + + My Vue Activity + + + + + + + + + + + + + + + + + + + + + + + + + + - - - My Vue Activity - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+ + - -
- - + + + + + + + +
+
+ +
+
+ + + + + + + + + +
- - - - - - - -
-
- -
-
- - - - - - - - - - +
+ + + + + +
-
- - - - - -
- - - - - - - - -
- - - - - - - - - - - - - - - - - + + + + + + + +
+ + + + + + + + + + + + + + + + diff --git a/activities/Vote.activity/js/activity.js b/activities/Vote.activity/js/activity.js index 9a2385b74..f1aaf2250 100644 --- a/activities/Vote.activity/js/activity.js +++ b/activities/Vote.activity/js/activity.js @@ -641,63 +641,63 @@ var app = new Vue({ steps = steps.concat([ { element: ".poll-card#0", - placement: "right", + position: "right", title: this.l10n.stringTutoSettingsPollCardTitle, - content: this.l10n.stringTutoSettingsPollCardContent + intro: this.l10n.stringTutoSettingsPollCardContent }, { element: "#edit-button", - placement: "right", + position: "right", title: this.l10n.stringTutoSettingsEditButtonTitle, - content: this.l10n.stringTutoSettingsEditButtonContent + intro: this.l10n.stringTutoSettingsEditButtonContent }, { element: "#delete-button", - placement: "right", + position: "right", title: this.l10n.stringTutoSettingsDeleteButtonTitle, - content: this.l10n.stringTutoSettingsDeleteButtonContent + intro: this.l10n.stringTutoSettingsDeleteButtonContent }, { element: "#settings-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoSettingsPlayButtonTitle, - content: this.l10n.stringTutoSettingsPlayButtonContent + intro: this.l10n.stringTutoSettingsPlayButtonContent }, { element: "#add-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoSettingsAddButtonTitle, - content: this.l10n.stringTutoSettingsAddButtonContent + intro: this.l10n.stringTutoSettingsAddButtonContent }, { element: "#image-edit-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoSettingsImageEditButtonTitle, - content: this.l10n.stringTutoSettingsImageEditButtonContent + intro: this.l10n.stringTutoSettingsImageEditButtonContent }, { element: "#question", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoSettingsQuestionTitle, - content: this.l10n.stringTutoSettingsQuestionContent + intro: this.l10n.stringTutoSettingsQuestionContent }, { element: "#type", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoSettingsTypeTitle, - content: this.l10n.stringTutoSettingsTypeContent + intro: this.l10n.stringTutoSettingsTypeContent }, { element: ".add-option-button", - placement: "top", + position: "top", title: this.l10n.stringTutoSettingsAddOptionButtonTitle, - content: this.l10n.stringTutoSettingsAddOptionButtonContent + intro: this.l10n.stringTutoSettingsAddOptionButtonContent }, { element: ".option#0", - placement: "top", + position: "top", title: this.l10n.stringTutoSettingsOptionTitle, - content: this.l10n.stringTutoSettingsOptionContent + intro: this.l10n.stringTutoSettingsOptionContent }, ]); } else { @@ -705,41 +705,38 @@ var app = new Vue({ case 'polls-grid': steps = steps.concat([ { - element: "", - orphan: true, - placement: "bottom", title: this.l10n.stringTutoExplainTitle, - content: this.l10n.stringTutoExplainContent + intro: this.l10n.stringTutoExplainContent }, { element: ".poll-card#0", - placement: "right", + position: "right", title: this.l10n.stringTutoPollCardTitle, - content: this.l10n.stringTutoPollCardContent + intro: this.l10n.stringTutoPollCardContent }, { element: ".search-input", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoPollSearchTitle, - content: this.l10n.stringTutoPollSearchContent + intro: this.l10n.stringTutoPollSearchContent }, { element: "#settings-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoSettingsButtonTitle, - content: this.l10n.stringTutoSettingsButtonContent + intro: this.l10n.stringTutoSettingsButtonContent }, { element: "#history-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoHistoryButtonTitle, - content: this.l10n.stringTutoHistoryButtonContent + intro: this.l10n.stringTutoHistoryButtonContent }, { element: "#network-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoNetworkButtonTitle, - content: this.l10n.stringTutoNetworkButtonContent + intro: this.l10n.stringTutoNetworkButtonContent }, ]); break; @@ -747,27 +744,27 @@ var app = new Vue({ steps = steps.concat([ { element: ".history-item#0", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoHistoryItemTitle, - content: this.l10n.stringTutoHistoryItemContent + intro: this.l10n.stringTutoHistoryItemContent }, { element: "#home-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoHomeButtonTitle, - content: this.l10n.stringTutoHomeButtonContent + intro: this.l10n.stringTutoHomeButtonContent }, { element: "#export-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoExportButtonTitle, - content: this.l10n.stringTutoExportButtonContent + intro: this.l10n.stringTutoExportButtonContent }, { element: "#delete-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoDeleteButtonTitle, - content: this.l10n.stringTutoDeleteButtonContent + intro: this.l10n.stringTutoDeleteButtonContent }, ]); break; @@ -775,33 +772,33 @@ var app = new Vue({ steps = steps.concat([ { element: "#stats", - placement: "right", + position: "right", title: this.l10n.stringTutoPollStatsTitle, - content: this.l10n.stringTutoPollStatsContent + intro: this.l10n.stringTutoPollStatsContent }, { element: ".poll-footer", - placement: "top", + position: "top", title: this.l10n.stringTutoPollFooterTitle, - content: this.l10n.stringTutoPollFooterContent + intro: this.l10n.stringTutoPollFooterContent }, { element: "#stop-poll", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoStopPollTitle, - content: this.l10n.stringTutoStopPollContent + intro: this.l10n.stringTutoStopPollContent }, { element: "#real-time-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoRealTimeButtonTitle, - content: this.l10n.stringTutoRealTimeButtonContent + intro: this.l10n.stringTutoRealTimeButtonContent }, { element: "#auto-stop-button", - placement: "bottom", + position: "bottom", title: this.l10n.stringTutoAutoStopButtonTitle, - content: this.l10n.stringTutoAutoStopButtonContent + intro: this.l10n.stringTutoAutoStopButtonContent }, ]); break; diff --git a/activities/Vote.activity/js/components/SugarTutorial.js b/activities/Vote.activity/js/components/SugarTutorial.js index d02b795d9..3ed51c9ba 100644 --- a/activities/Vote.activity/js/components/SugarTutorial.js +++ b/activities/Vote.activity/js/components/SugarTutorial.js @@ -1,62 +1,43 @@ -// Tutorial component based on bootstrap tour -Vue.component('sugar-tutorial', { - data: function () { - return { - l10n: { - stringTutoPrev: 'Prev', - stringTutoNext: 'Next', - stringTutoEnd: 'End', - } - } - }, - mounted() { - let vm = this; - if (this.$root.$refs.SugarL10n) { - this.$root.$refs.SugarL10n.$on('localized', function () { - vm.$root.$refs.SugarL10n.localize(vm.l10n); - }); - } - }, - methods: { - show: function (steps) { - var vm = this; - var tour = new Tour({ - template: ` -
-
-

-
-
-
-
-
${this.l10n.stringTutoPrev}
-
- | -
-
-
${this.l10n.stringTutoNext}
-
-
-
-
${this.l10n.stringTutoEnd}
-
-
-
`, - storage: false, - backdrop: true, - steps: steps, - onStart: function (tour) { - vm.$emit('start', tour); - }, - onShow: function (tour) { - vm.$emit('show', tour); - }, - onEnd: function (tour) { - vm.$emit('end', tour); - }, - }); - tour.init(); - tour.start(true); - } - } +// Tutorial component based on introJs tour +Vue.component("sugar-tutorial", { + data: function () { + return { + l10n: { + stringTutoPrev: "Prev", + stringTutoNext: "Next", + stringTutoEnd: "End", + }, + }; + }, + mounted() { + let vm = this; + if (this.$root.$refs.SugarL10n) { + this.$root.$refs.SugarL10n.$on("localized", function () { + vm.$root.$refs.SugarL10n.localize(vm.l10n); + }); + } + }, + methods: { + show: function (steps) { + steps = steps.filter(function (obj) { + return ( + !("element" in obj) || + (obj.element.length && + document.querySelector(obj.element) && + document.querySelector(obj.element).style.display != "none") + ); + }); + introJs() + .setOptions({ + tooltipClass: "customTooltip", + steps: steps, + prevLabel: this.l10n.stringTutoPrev, + nextLabel: this.l10n.stringTutoNext, + exitOnOverlayClick: false, + nextToDone: false, + showBullets: false, + }) + .start(); + }, + }, }); diff --git a/activities/Vote.activity/lib/bootstrap-tour-standalone.min.js b/activities/Vote.activity/lib/bootstrap-tour-standalone.min.js deleted file mode 100644 index 4827f08ad..000000000 --- a/activities/Vote.activity/lib/bootstrap-tour-standalone.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/* ======================================================================== - * bootstrap-tour - v0.10.3 - * http://bootstraptour.com - * ======================================================================== - * Copyright 2012-2015 Ulrich Sossou - * - * ======================================================================== - * Licensed under the MIT License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/MIT - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ======================================================================== - */ - -+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var o in e)if(void 0!==t.style[o])return{end:e[o]};return!1}t.fn.emulateTransitionEnd=function(e){var o=!1,n=this;t(this).one("bsTransitionEnd",function(){o=!0});var i=function(){o||t(n).trigger(t.support.transition.end)};return setTimeout(i,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.tooltip"),r="object"==typeof e&&e;(i||!/destroy|hide/.test(e))&&(i||n.data("bs.tooltip",i=new o(this,r)),"string"==typeof e&&i[e]())})}var o=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};o.VERSION="3.3.7",o.TRANSITION_DURATION=150,o.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},o.prototype.init=function(e,o,n){if(this.enabled=!0,this.type=e,this.$element=t(o),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var s=i[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",p="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(p+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},o.prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},o.prototype.getDelegateOptions=function(){var e={},o=this.getDefaults();return this._options&&t.each(this._options,function(t,n){o[t]!=n&&(e[t]=n)}),e},o.prototype.enter=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return o||(o=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,o)),e instanceof t.Event&&(o.inState["focusin"==e.type?"focus":"hover"]=!0),o.tip().hasClass("in")||"in"==o.hoverState?(o.hoverState="in",void 0):(clearTimeout(o.timeout),o.hoverState="in",o.options.delay&&o.options.delay.show?(o.timeout=setTimeout(function(){"in"==o.hoverState&&o.show()},o.options.delay.show),void 0):o.show())},o.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},o.prototype.leave=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return o||(o=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,o)),e instanceof t.Event&&(o.inState["focusout"==e.type?"focus":"hover"]=!1),o.isInStateTrue()?void 0:(clearTimeout(o.timeout),o.hoverState="out",o.options.delay&&o.options.delay.hide?(o.timeout=setTimeout(function(){"out"==o.hoverState&&o.hide()},o.options.delay.hide),void 0):o.hide())},o.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),s=this.getUID(this.type);this.setContent(),r.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,p=/\s?auto?\s?/i,h=p.test(a);h&&(a=a.replace(p,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),u=r[0].offsetWidth,c=r[0].offsetHeight;if(h){var d=a,f=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+c>f.bottom?"top":"top"==a&&l.top-cf.width?"left":"left"==a&&l.left-us.top+s.height&&(i.top=s.top+s.height-p)}else{var h=e.left-r,l=e.left+r+o;hs.right&&(i.left=s.left+s.width-l)}return i},o.prototype.getTitle=function(){var t,e=this.$element,o=this.options;return t=e.attr("data-original-title")||("function"==typeof o.title?o.title.call(e[0]):o.title)},o.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},o.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},o.prototype.enable=function(){this.enabled=!0},o.prototype.disable=function(){this.enabled=!1},o.prototype.toggleEnabled=function(){this.enabled=!this.enabled},o.prototype.toggle=function(e){var o=this;e&&(o=t(e.currentTarget).data("bs."+this.type),o||(o=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,o))),e?(o.inState.click=!o.inState.click,o.isInStateTrue()?o.enter(o):o.leave(o)):o.tip().hasClass("in")?o.leave(o):o.enter(o)},o.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=o,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.popover"),r="object"==typeof e&&e;(i||!/destroy|hide/.test(e))&&(i||n.data("bs.popover",i=new o(this,r)),"string"==typeof e&&i[e]())})}var o=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");o.VERSION="3.3.7",o.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),o.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),o.prototype.constructor=o,o.prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),o=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof o?"html":"append":"text"](o),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},o.prototype.hasContent=function(){return this.getTitle()||this.getContent()},o.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=o,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),function(t,e){return"function"==typeof define&&define.amd?define(["jquery"],function(o){return t.Tour=e(o)}):"object"==typeof exports?module.exports=e(require("jQuery")):t.Tour=e(t.jQuery)}(window,function(t){var e,o;return o=window.document,e=function(){function e(e){var o;try{o=window.localStorage}catch(n){o=!1}this._options=t.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:o,debug:!1,backdrop:!1,backdropContainer:"body",backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'',afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){},onRedirectError:function(){}},e),this._force=!1,this._inited=!1,this._current=null,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return e.prototype.addSteps=function(t){var e,o,n;for(o=0,n=t.length;n>o;o++)e=t[o],this.addStep(e);return this},e.prototype.addStep=function(t){return this._options.steps.push(t),this},e.prototype.getStep=function(e){return null!=this._options.steps[e]?t.extend({id:"step-"+e,path:"",host:"",placement:"right",title:"",content:"

",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[e].element,backdropElement:this._options.steps[e].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[e]):void 0},e.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},e.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},e.prototype.next=function(){var t;return t=this.hideStep(this._current,this._current+1),this._callOnPromiseDone(t,this._showNextStep)},e.prototype.prev=function(){var t;return t=this.hideStep(this._current,this._current-1),this._callOnPromiseDone(t,this._showPrevStep)},e.prototype.goTo=function(t){var e;return e=this.hideStep(this._current,t),this._callOnPromiseDone(e,this.showStep,t)},e.prototype.end=function(){var e,n;return e=function(e){return function(){return t(o).off("click.tour-"+e._options.name),t(o).off("keyup.tour-"+e._options.name),t(window).off("resize.tour-"+e._options.name),e._setState("end","yes"),e._inited=!1,e._force=!1,e._clearTimer(),null!=e._options.onEnd?e._options.onEnd(e):void 0}}(this),n=this.hideStep(this._current),this._callOnPromiseDone(n,e)},e.prototype.ended=function(){return!this._force&&!!this._getState("end")},e.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},e.prototype.pause=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,window.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},e.prototype.resume=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=window.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},e.prototype.hideStep=function(e,o){var n,i,r,s;return(s=this.getStep(e))?(this._clearTimer(),r=this._makePromise(null!=s.onHide?s.onHide(this,e):void 0),i=function(n){return function(){var i,r;return i=t(s.element),i.data("bs.popover")||i.data("popover")||(i=t("body")),i.popover("destroy").removeClass("tour-"+n._options.name+"-element tour-"+n._options.name+"-"+e+"-element").removeData("bs.popover").focus(),s.reflex&&t(s.reflexElement).removeClass("tour-step-element-reflex").off(""+n._reflexEvent(s.reflex)+".tour-"+n._options.name),s.backdrop&&(r=null!=o&&n.getStep(o),r&&r.backdrop&&r.backdropElement===s.backdropElement||n._hideBackdrop()),null!=s.onHidden?s.onHidden(n):void 0}}(this),n=s.delay.hide||s.delay,"[object Number]"==={}.toString.call(n)&&n>0?(this._debug("Wait "+n+" milliseconds to hide the step "+(this._current+1)),window.setTimeout(function(t){return function(){return t._callOnPromiseDone(r,i)}}(this),n)):this._callOnPromiseDone(r,i),r):void 0},e.prototype.showStep=function(t){var e,n,i,r,s,a;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(a=this.getStep(t),a&&(s=t0?(this._debug("Wait "+i+" milliseconds to show the step "+(this._current+1)),window.setTimeout(function(t){return function(){return t._callOnPromiseDone(n,r)}}(this),i)):this._callOnPromiseDone(n,r),n):void 0)},e.prototype.getCurrentStep=function(){return this._current},e.prototype.setCurrentStep=function(t){return null!=t?(this._current=t,this._setState("current_step",t)):(this._current=this._getState("current_step"),this._current=null===this._current?null:parseInt(this._current,10)),this},e.prototype.redraw=function(){return this._showOverlayElement(this.getStep(this.getCurrentStep()).element,!0)},e.prototype._setState=function(t,e){var o,n;if(this._options.storage){n=""+this._options.name+"_"+t;try{this._options.storage.setItem(n,e)}catch(i){o=i,o.code===DOMException.QUOTA_EXCEEDED_ERR&&this._debug("LocalStorage quota exceeded. State storage failed.")}return this._options.afterSetState(n,e)}return null==this._state&&(this._state={}),this._state[t]=e},e.prototype._removeState=function(t){var e;return this._options.storage?(e=""+this._options.name+"_"+t,this._options.storage.removeItem(e),this._options.afterRemoveState(e)):null!=this._state?delete this._state[t]:void 0},e.prototype._getState=function(t){var e,o;return this._options.storage?(e=""+this._options.name+"_"+t,o=this._options.storage.getItem(e)):null!=this._state&&(o=this._state[t]),(void 0===o||"null"===o)&&(o=null),this._options.afterGetState(t,o),o},e.prototype._showNextStep=function(){var t,e,o;return o=this.getStep(this._current),e=function(t){return function(){return t.showStep(o.next)}}(this),t=this._makePromise(null!=o.onNext?o.onNext(this):void 0),this._callOnPromiseDone(t,e)},e.prototype._showPrevStep=function(){var t,e,o;return o=this.getStep(this._current),e=function(t){return function(){return t.showStep(o.prev)}}(this),t=this._makePromise(null!=o.onPrev?o.onPrev(this):void 0),this._callOnPromiseDone(t,e)},e.prototype._debug=function(t){return this._options.debug?window.console.log("Bootstrap Tour '"+this._options.name+"' | "+t):void 0},e.prototype._isRedirect=function(t,e,o){var n;return null!=t&&""!==t&&("[object RegExp]"==={}.toString.call(t)&&!t.test(o.origin)||"[object String]"==={}.toString.call(t)&&this._isHostDifferent(t,o))?!0:(n=[o.pathname,o.search,o.hash].join(""),null!=e&&""!==e&&("[object RegExp]"==={}.toString.call(e)&&!e.test(n)||"[object String]"==={}.toString.call(e)&&this._isPathDifferent(e,n)))},e.prototype._isHostDifferent=function(t,e){switch({}.toString.call(t)){case"[object RegExp]":return!t.test(e.origin);case"[object String]":return this._getProtocol(t)!==this._getProtocol(e.href)||this._getHost(t)!==this._getHost(e.href);default:return!0}},e.prototype._isPathDifferent=function(t,e){return this._getPath(t)!==this._getPath(e)||!this._equal(this._getQuery(t),this._getQuery(e))||!this._equal(this._getHash(t),this._getHash(e))},e.prototype._isJustPathHashDifferent=function(t,e,o){var n;return null!=t&&""!==t&&this._isHostDifferent(t,o)?!1:(n=[o.pathname,o.search,o.hash].join(""),"[object String]"==={}.toString.call(e)?this._getPath(e)===this._getPath(n)&&this._equal(this._getQuery(e),this._getQuery(n))&&!this._equal(this._getHash(e),this._getHash(n)):!1)},e.prototype._redirect=function(e,n,i){var r;return t.isFunction(e.redirect)?e.redirect.call(this,i):(r="[object String]"==={}.toString.call(e.host)?""+e.host+i:i,this._debug("Redirect to "+r),this._getState("redirect_to")!==""+n?(this._setState("redirect_to",""+n),o.location.href=r):(this._debug("Error redirection loop to "+i),this._removeState("redirect_to"),null!=e.onRedirectError?e.onRedirectError(this):void 0))},e.prototype._isOrphan=function(e){return null==e.element||!t(e.element).length||t(e.element).is(":hidden")&&"http://www.w3.org/2000/svg"!==t(e.element)[0].namespaceURI},e.prototype._isLast=function(){return this._current").parent().html()},e.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},e.prototype._focus=function(t,e,o){var n,i;return i=o?"end":"next",n=t.find("[data-role='"+i+"']"),e.on("shown.bs.popover",function(){return n.focus()})},e.prototype._reposition=function(e,n){var i,r,s,a,p,h,l;if(a=e[0].offsetWidth,r=e[0].offsetHeight,l=e.offset(),p=l.left,h=l.top,i=t(o).outerHeight()-l.top-e.outerHeight(),0>i&&(l.top=l.top+i),s=t("html").outerWidth()-l.left-e.outerWidth(),0>s&&(l.left=l.left+s),l.top<0&&(l.top=0),l.left<0&&(l.left=0),e.offset(l),"bottom"===n.placement||"top"===n.placement){if(p!==l.left)return this._replaceArrow(e,2*(l.left-p),a,"left")}else if(h!==l.top)return this._replaceArrow(e,2*(l.top-h),r,"top")},e.prototype._center=function(e){return e.css("top",t(window).outerHeight()/2-e.outerHeight()/2)},e.prototype._replaceArrow=function(t,e,o,n){return t.find(".arrow").css(n,e?50*(1-e/o)+"%":"")},e.prototype._scrollIntoView=function(e,o){var n,i,r,s,a,p,h;if(n=t(e.element),!n.length)return o();switch(i=t(window),a=n.offset().top,s=n.outerHeight(),h=i.height(),p=0,e.placement){case"top":p=Math.max(0,a-h/2);break;case"left":case"right":p=Math.max(0,a+s/2-h/2);break;case"bottom":p=Math.max(0,a+s-h/2)}return this._debug("Scroll into view. ScrollTop: "+p+". Element offset: "+a+". Window height: "+h+"."),r=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(p)},function(t){return function(){return 2===++r?(o(),t._debug("Scroll into view.\nAnimation end element offset: "+n.offset().top+".\nWindow height: "+i.height()+".")):void 0}}(this))},e.prototype._onResize=function(e,o){return t(window).on("resize.tour-"+this._options.name,function(){return clearTimeout(o),o=setTimeout(e,100)})},e.prototype._initMouseNavigation=function(){var e;return e=this,t(o).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t._current>0?t.prev():void 0}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(o){var n;return o.preventDefault(),n=t(this),n.text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},e.prototype._initKeyboardNavigation=function(){return this._options.keyboard?t(o).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev()}}}(this)):void 0},e.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},e.prototype._callOnPromiseDone=function(t,e,o){return t?t.then(function(t){return function(){return e.call(t,o)}}(this)):e.call(this,o)},e.prototype._showBackdrop=function(e){return this.backdrop.backgroundShown?void 0:(this.backdrop=t("
",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,t(e.backdropContainer).append(this.backdrop))},e.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},e.prototype._hideBackground=function(){return this.backdrop&&this.backdrop.remove?(this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1):void 0},e.prototype._showOverlayElement=function(e,o){var n,i,r;return i=t(e.element),n=t(e.backdropElement),!i||0===i.length||this.backdrop.overlayElementShown&&!o?void 0:(this.backdrop.overlayElementShown||(this.backdrop.$element=n.addClass("tour-step-backdrop"),this.backdrop.$background=t("
",{"class":"tour-step-background"}),this.backdrop.$background.appendTo(e.backdropContainer),this.backdrop.overlayElementShown=!0),r={width:n.innerWidth(),height:n.innerHeight(),offset:n.offset()},e.backdropPadding&&(r=this._applyBackdropPadding(e.backdropPadding,r)),this.backdrop.$background.width(r.width).height(r.height).offset(r.offset))},e.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},e.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},e.prototype._clearTimer=function(){return window.clearTimeout(this._timer),this._timer=null,this._duration=null},e.prototype._getProtocol=function(t){return t=t.split("://"),t.length>1?t[0]:"http"},e.prototype._getHost=function(t){return t=t.split("//"),t=t.length>1?t[1]:t[0],t.split("/")[0]},e.prototype._getPath=function(t){return t.replace(/\/?$/,"").split("?")[0].split("#")[0]},e.prototype._getQuery=function(t){return this._getParams(t,"?")},e.prototype._getHash=function(t){return this._getParams(t,"#")},e.prototype._getParams=function(t,e){var o,n,i,r,s;if(n=t.split(e),1===n.length)return{};for(n=n[1].split("&"),i={},r=0,s=n.length;s>r;r++)o=n[r],o=o.split("="),i[o[0]]=o[1]||"";return i},e.prototype._equal=function(t,e){var o,n,i,r,s,a;if("[object Object]"==={}.toString.call(t)&&"[object Object]"==={}.toString.call(e)){if(n=Object.keys(t),i=Object.keys(e),n.length!==i.length)return!1;for(o in t)if(r=t[o],!this._equal(e[o],r))return!1;return!0}if("[object Array]"==={}.toString.call(t)&&"[object Array]"==={}.toString.call(e)){if(t.length!==e.length)return!1;for(o=s=0,a=t.length;a>s;o=++s)if(r=t[o],!this._equal(r,e[o]))return!1;return!0}return t===e},e}()}); \ No newline at end of file diff --git a/activities/Vote.activity/lib/intro.js b/activities/Vote.activity/lib/intro.js new file mode 100644 index 000000000..88c49dc90 --- /dev/null +++ b/activities/Vote.activity/lib/intro.js @@ -0,0 +1,11 @@ +/*! + * Intro.js v5.1.0 + * https://introjs.com + * + * Copyright (C) 2012-2022 Afshin Mehrabani (@afshinmeh). + * https://introjs.com + * + * Date: Mon, 04 Apr 2022 21:20:28 GMT + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).introJs=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var i,o,r=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(r.push(i.value),!e||r.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:"introjs-stamp";return t[n]=t[n]||0,void 0===e[n]&&(e[n]=t[n]++),e[n]}}();function r(t,e,n){if(t)for(var i=0,o=t.length;i0&&c[0]<4?1:+(c[0]+c[1])),!u&&F&&(!(c=F.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=F.match(/Chrome\/(\d+)/))&&(u=+c[1]);var U=u,W=!!Object.getOwnPropertySymbols&&!p((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&U&&U<41})),K=W&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Y=f.Object,X=K?function(t){return"symbol"==typeof t}:function(t){var e=H("Symbol");return M(e)&&D(e.prototype,Y(t))},J=f.String,Q=function(t){try{return J(t)}catch(t){return"Object"}},Z=f.TypeError,tt=function(t){if(M(t))return t;throw Z(Q(t)+" is not a function")},et=function(t,e){var n=t[e];return null==n?void 0:tt(n)},nt=f.TypeError,it=Object.defineProperty,ot=function(t,e){try{it(f,t,{value:e,configurable:!0,writable:!0})}catch(n){f[t]=e}return e},rt="__core-js_shared__",at=f[rt]||ot(rt,{}),st=l((function(t){(t.exports=function(t,e){return at[t]||(at[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.21.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),lt=f.Object,ct=function(t){return lt(P(t))},ut=A({}.hasOwnProperty),ht=Object.hasOwn||function(t,e){return ut(ct(t),e)},ft=0,pt=Math.random(),dt=A(1..toString),gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+dt(++ft+pt,36)},vt=st("wks"),mt=f.Symbol,bt=mt&&mt.for,yt=K?mt:mt&&mt.withoutSetter||gt,wt=function(t){if(!ht(vt,t)||!W&&"string"!=typeof vt[t]){var e="Symbol."+t;W&&ht(mt,t)?vt[t]=mt[t]:vt[t]=K&&bt?bt(e):yt(e)}return vt[t]},_t=f.TypeError,St=wt("toPrimitive"),xt=function(t,e){if(!q(t)||X(t))return t;var n,i=et(t,St);if(i){if(void 0===e&&(e="default"),n=m(i,t,e),!q(n)||X(n))return n;throw _t("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,i;if("string"===e&&M(n=t.toString)&&!q(i=m(n,t)))return i;if(M(n=t.valueOf)&&!q(i=m(n,t)))return i;if("string"!==e&&M(n=t.toString)&&!q(i=m(n,t)))return i;throw nt("Can't convert object to primitive value")}(t,e)},jt=function(t){var e=xt(t,"string");return X(e)?e:e+""},Ct=f.document,At=q(Ct)&&q(Ct.createElement),kt=function(t){return At?Ct.createElement(t):{}},Et=!d&&!p((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Tt=Object.getOwnPropertyDescriptor,It={f:d?Tt:function(t,e){if(t=R(t),e=jt(e),Et)try{return Tt(t,e)}catch(t){}if(ht(t,e))return _(!m(w.f,t,e),t[e])}},Nt=d&&p((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Lt=f.String,Ot=f.TypeError,Pt=function(t){if(q(t))return t;throw Ot(Lt(t)+" is not an object")},Rt=f.TypeError,Mt=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,Bt="enumerable",Ht="configurable",Dt="writable",Ft={f:d?Nt?function(t,e,n){if(Pt(t),e=jt(e),Pt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Dt in n&&!n.writable){var i=qt(t,e);i&&i.writable&&(t[e]=n.value,n={configurable:Ht in n?n.configurable:i.configurable,enumerable:Bt in n?n.enumerable:i.enumerable,writable:!1})}return Mt(t,e,n)}:Mt:function(t,e,n){if(Pt(t),e=jt(e),Pt(n),Et)try{return Mt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Rt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},$t=d?function(t,e,n){return Ft.f(t,e,_(1,n))}:function(t,e,n){return t[e]=n,t},Gt=A(Function.toString);M(at.inspectSource)||(at.inspectSource=function(t){return Gt(t)});var Vt,zt,Ut,Wt=at.inspectSource,Kt=f.WeakMap,Yt=M(Kt)&&/native code/.test(Wt(Kt)),Xt=st("keys"),Jt=function(t){return Xt[t]||(Xt[t]=gt(t))},Qt={},Zt="Object already initialized",te=f.TypeError,ee=f.WeakMap;if(Yt||at.state){var ne=at.state||(at.state=new ee),ie=A(ne.get),oe=A(ne.has),re=A(ne.set);Vt=function(t,e){if(oe(ne,t))throw new te(Zt);return e.facade=t,re(ne,t,e),e},zt=function(t){return ie(ne,t)||{}},Ut=function(t){return oe(ne,t)}}else{var ae=Jt("state");Qt[ae]=!0,Vt=function(t,e){if(ht(t,ae))throw new te(Zt);return e.facade=t,$t(t,ae,e),e},zt=function(t){return ht(t,ae)?t[ae]:{}},Ut=function(t){return ht(t,ae)}}var se={set:Vt,get:zt,has:Ut,enforce:function(t){return Ut(t)?zt(t):Vt(t,{})},getterFor:function(t){return function(e){var n;if(!q(e)||(n=zt(e)).type!==t)throw te("Incompatible receiver, "+t+" required");return n}}},le=Function.prototype,ce=d&&Object.getOwnPropertyDescriptor,ue=ht(le,"name"),he={EXISTS:ue,PROPER:ue&&"something"===function(){}.name,CONFIGURABLE:ue&&(!d||d&&ce(le,"name").configurable)},fe=l((function(t){var e=he.CONFIGURABLE,n=se.get,i=se.enforce,o=String(String).split("String");(t.exports=function(t,n,r,a){var s,l=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,u=!!a&&!!a.noTargetGet,h=a&&void 0!==a.name?a.name:n;M(r)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ht(r,"name")||e&&r.name!==h)&&$t(r,"name",h),(s=i(r)).source||(s.source=o.join("string"==typeof h?h:""))),t!==f?(l?!u&&t[n]&&(c=!0):delete t[n],c?t[n]=r:$t(t,n,r)):c?t[n]=r:ot(n,r)})(Function.prototype,"toString",(function(){return M(this)&&n(this).source||Wt(this)}))})),pe=Math.ceil,de=Math.floor,ge=function(t){var e=+t;return e!=e||0===e?0:(e>0?de:pe)(e)},ve=Math.max,me=Math.min,be=function(t,e){var n=ge(t);return n<0?ve(n+e,0):me(n,e)},ye=Math.min,we=function(t){return t>0?ye(ge(t),9007199254740991):0},_e=function(t){return we(t.length)},Se=function(t){return function(e,n,i){var o,r=R(e),a=_e(r),s=be(i,a);if(t&&n!=n){for(;a>s;)if((o=r[s++])!=o)return!0}else for(;a>s;s++)if((t||s in r)&&r[s]===n)return t||s||0;return!t&&-1}},xe={includes:Se(!0),indexOf:Se(!1)},je=xe.indexOf,Ce=A([].push),Ae=function(t,e){var n,i=R(t),o=0,r=[];for(n in i)!ht(Qt,n)&&ht(i,n)&&Ce(r,n);for(;e.length>o;)ht(i,n=e[o++])&&(~je(r,n)||Ce(r,n));return r},ke=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=ke.concat("length","prototype"),Te={f:Object.getOwnPropertyNames||function(t){return Ae(t,Ee)}},Ie={f:Object.getOwnPropertySymbols},Ne=A([].concat),Le=H("Reflect","ownKeys")||function(t){var e=Te.f(Pt(t)),n=Ie.f;return n?Ne(e,n(t)):e},Oe=function(t,e,n){for(var i=Le(e),o=Ft.f,r=It.f,a=0;aa;)Ft.f(t,n=o[a++],i[n]);return t},an={f:rn},sn=H("document","documentElement"),ln=Jt("IE_PROTO"),cn=function(){},un=function(t){return" - - - - - - - - - - - - - -
- - + + + My Vue Activity + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - -
-
- -
-
- - - - - - - - - -
+ +
+ + -
- - - - - -
+ + + + + + + +
+
+ +
+
+ + + + + + + + + +
- - - - - - - -
+
+ + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - From b9253ccc8b2830753ab854df56cd4d1040b0bac6 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Wed, 21 Sep 2022 16:21:13 +0530 Subject: [PATCH 3/4] Fixed the DOMException --- activities/Vote.activity/js/activity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activities/Vote.activity/js/activity.js b/activities/Vote.activity/js/activity.js index f1aaf2250..aaeb83863 100644 --- a/activities/Vote.activity/js/activity.js +++ b/activities/Vote.activity/js/activity.js @@ -640,7 +640,7 @@ var app = new Vue({ if(this.settings) { steps = steps.concat([ { - element: ".poll-card#0", + element: ".poll-card [id='#0']", position: "right", title: this.l10n.stringTutoSettingsPollCardTitle, intro: this.l10n.stringTutoSettingsPollCardContent @@ -709,7 +709,7 @@ var app = new Vue({ intro: this.l10n.stringTutoExplainContent }, { - element: ".poll-card#0", + element: ".poll-card [id='#0']", position: "right", title: this.l10n.stringTutoPollCardTitle, intro: this.l10n.stringTutoPollCardContent From b603cde9a46bfe46afe3b834931f34b9180c7989 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Wed, 21 Sep 2022 17:58:19 +0530 Subject: [PATCH 4/4] Minor changes in activity.js of vote activity --- activities/Vote.activity/js/activity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activities/Vote.activity/js/activity.js b/activities/Vote.activity/js/activity.js index aaeb83863..f2589459c 100644 --- a/activities/Vote.activity/js/activity.js +++ b/activities/Vote.activity/js/activity.js @@ -694,7 +694,7 @@ var app = new Vue({ intro: this.l10n.stringTutoSettingsAddOptionButtonContent }, { - element: ".option#0", + element: ".option [id='#0']", position: "top", title: this.l10n.stringTutoSettingsOptionTitle, intro: this.l10n.stringTutoSettingsOptionContent @@ -743,7 +743,7 @@ var app = new Vue({ case 'history': steps = steps.concat([ { - element: ".history-item#0", + element: ".history-item [id='#0']", position: "bottom", title: this.l10n.stringTutoHistoryItemTitle, intro: this.l10n.stringTutoHistoryItemContent