diff --git a/application/core/plugins/CintLink/CintLink.php b/application/core/plugins/CintLink/CintLink.php index 39c5455f30f..e43f53c298f 100644 --- a/application/core/plugins/CintLink/CintLink.php +++ b/application/core/plugins/CintLink/CintLink.php @@ -175,6 +175,7 @@ public function actionIndex($surveyId) // Show tutorial if survey has no orders if (!CintLinkOrder::hasAnyOrders($surveyId)) { + /* (new UniqueNotification(array( 'survey_id' => $surveyId, 'importance' => Notification::HIGH_IMPORTANCE, @@ -182,6 +183,12 @@ public function actionIndex($surveyId) 'title' => $this->gT('Welcome to CintLink LimeSurvey Integration'), 'message' => $this->renderPartial('tutorial', array(), true) )))->save(); + */ + $assetsUrl = Yii::app()->assetManager->publish(dirname(__FILE__) . '/js'); + App()->clientScript->registerScriptFile("$assetsUrl/bootstrap-tour.min.js"); + App()->clientScript->registerScriptFile("$assetsUrl/tour.js"); + $assetsUrl = Yii::app()->assetManager->publish(dirname(__FILE__) . '/css'); + App()->clientScript->registerCssFile("$assetsUrl/bootstrap-tour.min.css"); } return $content; diff --git a/application/core/plugins/CintLink/css/bootstrap-tour.min.css b/application/core/plugins/CintLink/css/bootstrap-tour.min.css new file mode 100644 index 00000000000..8ebd3d37503 --- /dev/null +++ b/application/core/plugins/CintLink/css/bootstrap-tour.min.css @@ -0,0 +1,22 @@ +/* ======================================================================== + * 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. + * ======================================================================== + */ + +.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}.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} \ No newline at end of file diff --git a/application/core/plugins/CintLink/css/cintlink.css b/application/core/plugins/CintLink/css/cintlink.css index b92fbf39070..361d96ce68b 100644 --- a/application/core/plugins/CintLink/css/cintlink.css +++ b/application/core/plugins/CintLink/css/cintlink.css @@ -76,3 +76,18 @@ .cintlink-shadow { box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12) } + +/* Tour */ +.tour-limesurvey-cintlink-tour .popover-title { + background-color: #eee; + border: 0; +} + +.tour-limesurvey-cintlink-tour-element { + pointer-events: none; +} + +body .tour-backdrop { + background-color: #fff; + opactiy: .8; +} diff --git a/application/core/plugins/CintLink/js/bootstrap-tour.min.js b/application/core/plugins/CintLink/js/bootstrap-tour.min.js new file mode 100644 index 00000000000..a481cecfb42 --- /dev/null +++ b/application/core/plugins/CintLink/js/bootstrap-tour.min.js @@ -0,0 +1,22 @@ +/* ======================================================================== + * 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,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:'