mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
- Chng: Switched from [bootstrap-tour](https://github.com/sorich87/bootstrap-tour) to [bootstrap-tourist](https://github.com/IGreatlyDislikeJavascript/bootstrap-tourist) due to incompatibility to bootstrap v3.4.1
- Enh: Added `humhub.modules.tour` module for handling tour logic
This commit is contained in:
parent
6805b6e744
commit
81e0c427ab
@ -11,7 +11,8 @@ HumHub Change Log
|
||||
- Fix: #3552 `humhub\modules\user\authclient\AuthAction:auth()` not compatible with `yii\authclient\AuthAction:auth()`
|
||||
- Fix: #3545 OEmbed fetch limit ignored
|
||||
- Enh: Added `humhub\libs\RestrictedCallException`
|
||||
|
||||
- Chng: Switched from [bootstrap-tour](https://github.com/sorich87/bootstrap-tour) to [bootstrap-tourist](https://github.com/IGreatlyDislikeJavascript/bootstrap-tourist) due to incompatibility to bootstrap v3.4.1
|
||||
- Enh: Added `humhub.modules.tour` module for handling tour logic
|
||||
|
||||
1.3.12 (March 26, 2019)
|
||||
---------------------------
|
||||
|
@ -176,7 +176,7 @@ class UrlOembed extends ActiveRecord
|
||||
}
|
||||
|
||||
try {
|
||||
if (!static::findExistingOembed($url)) {
|
||||
if (!self::findExistingOembed($url)) {
|
||||
static::loadUrl($url);
|
||||
}
|
||||
} catch(RestrictedCallException $re) {
|
||||
|
@ -18,4 +18,5 @@ modules:
|
||||
WebDriver:
|
||||
url: 'http://localhost:8080/'
|
||||
browser: chrome
|
||||
window_size: maximize
|
||||
port: 4444
|
58
protected/humhub/modules/tour/assets/TourAsset.php
Normal file
58
protected/humhub/modules/tour/assets/TourAsset.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
namespace humhub\modules\tour\assets;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
use yii\web\AssetBundle;
|
||||
use humhub\modules\ui\view\components\View;
|
||||
|
||||
/**
|
||||
* Stream related assets.
|
||||
*
|
||||
* @since 1.2
|
||||
* @author buddha
|
||||
*/
|
||||
class TourAsset extends AssetBundle
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public $sourcePath = '@tour/resources';
|
||||
|
||||
public $publishOptions = ['forceCopy' => true];
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public $js = [
|
||||
'js/bootstrap-tourist.min.js',
|
||||
'js/humhub.tour.js'
|
||||
];
|
||||
|
||||
public $css = [
|
||||
'css/bootstrap-tourist.min.css'
|
||||
];
|
||||
|
||||
/**
|
||||
* @param View $view
|
||||
* @return AssetBundle
|
||||
*/
|
||||
public static function register($view)
|
||||
{
|
||||
$view->registerJsConfig('tour', [
|
||||
'dashboardUrl' => Url::to(['/dashboard/dashboard']),
|
||||
'completedUrl' => Url::to(['/tour/tour/tour-completed']),
|
||||
'template' => '<div class="popover tour" role="tooltip"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev">'.Yii::t('TourModule.base', '« Prev').'</button> <button class="btn btn-sm btn-default" data-role="next">'.Yii::t('TourModule.base', 'Next »').'</button> <button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="Pause" data-resume-text="Resume">Pause</button> </div> <button class="btn btn-sm btn-default" data-role="end">'.Yii::t('TourModule.base', 'End guide').'</button> </div> </div>'
|
||||
]);
|
||||
return parent::register($view);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
namespace humhub\modules\tour\controllers;
|
||||
|
||||
use humhub\modules\space\models\Membership;
|
||||
use Yii;
|
||||
use yii\web\HttpException;
|
||||
use humhub\modules\space\models\Space;
|
||||
@ -22,16 +23,10 @@ use humhub\modules\space\models\Space;
|
||||
*/
|
||||
class TourController extends \humhub\components\Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function behaviors()
|
||||
public function getAccessRules()
|
||||
{
|
||||
return [
|
||||
'acl' => [
|
||||
'class' => \humhub\components\behaviors\AccessControl::class,
|
||||
]
|
||||
['login']
|
||||
];
|
||||
}
|
||||
|
||||
@ -42,19 +37,16 @@ class TourController extends \humhub\components\Controller
|
||||
{
|
||||
|
||||
// get section parameter from completed tour
|
||||
$section = Yii::$app->request->get('section');
|
||||
$section = Yii::$app->request->post('section');
|
||||
|
||||
if (!in_array($section, Yii::$app->params['tour']['acceptableNames']))
|
||||
if (!in_array($section, Yii::$app->params['tour']['acceptableNames'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
// set tour status to seen for current user
|
||||
Yii::$app->getModule('tour')->settings->user()->set($section, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Update user settings for hiding tour panel on dashboard
|
||||
*/
|
||||
|
||||
public function actionHidePanel()
|
||||
{
|
||||
// set tour status to seen for current user
|
||||
@ -62,7 +54,10 @@ class TourController extends \humhub\components\Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a special case, because we need to find a space to start the tour
|
||||
* This is a special case, because we need to find a space to start the tour
|
||||
*
|
||||
* @return \yii\web\Response
|
||||
* @throws HttpException
|
||||
*/
|
||||
public function actionStartSpaceTour()
|
||||
{
|
||||
@ -70,7 +65,7 @@ class TourController extends \humhub\components\Controller
|
||||
$space = null;
|
||||
|
||||
// Loop over all spaces where the user is member
|
||||
foreach (\humhub\modules\space\models\Membership::getUserSpaces() as $space) {
|
||||
foreach (Membership::getUserSpaces() as $space) {
|
||||
if ($space->isAdmin() && !$space->isArchived()) {
|
||||
// If user is admin on this space, it´s the perfect match
|
||||
break;
|
||||
|
66
protected/humhub/modules/tour/resources/css/bootstrap-tourist.css
vendored
Normal file
66
protected/humhub/modules/tour/resources/css/bootstrap-tourist.css
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
/* ========================================================================
|
||||
* Bootstrap Tourist v0.7
|
||||
* Copyright FFS 2019
|
||||
* @ IGreatlyDislikeJavascript on Github
|
||||
*
|
||||
* bootstrap-tour - v0.11.0
|
||||
* 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: absolute;
|
||||
z-index: 1100;
|
||||
background-color: #000;
|
||||
opacity: 0.8;
|
||||
filter: alpha(opacity=80);
|
||||
}
|
||||
.tour-prevent {
|
||||
position: absolute;
|
||||
z-index: 1102;
|
||||
background-color: #ccc;
|
||||
opacity: 0.20;
|
||||
filter: alpha(opacity=20);
|
||||
}
|
||||
.popover[class*="tour-"] {
|
||||
z-index: 1110;
|
||||
}
|
||||
.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;
|
||||
}
|
1
protected/humhub/modules/tour/resources/css/bootstrap-tourist.min.css
vendored
Normal file
1
protected/humhub/modules/tour/resources/css/bootstrap-tourist.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.tour-backdrop{position:absolute;z-index:1100;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.tour-prevent{position:absolute;z-index:1102;background-color:#ccc;opacity:.20;filter:alpha(opacity=20)}.popover[class*="tour-"]{z-index:1110}.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}
|
2293
protected/humhub/modules/tour/resources/js/bootstrap-tourist.js
vendored
Normal file
2293
protected/humhub/modules/tour/resources/js/bootstrap-tourist.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
protected/humhub/modules/tour/resources/js/bootstrap-tourist.min.js
vendored
Normal file
1
protected/humhub/modules/tour/resources/js/bootstrap-tourist.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
49
protected/humhub/modules/tour/resources/js/humhub.tour.js
Normal file
49
protected/humhub/modules/tour/resources/js/humhub.tour.js
Normal file
@ -0,0 +1,49 @@
|
||||
humhub.module('tour', function (module, requrie, $) {
|
||||
|
||||
var client = requrie('client');
|
||||
var tourOptions;
|
||||
var completedUrl;
|
||||
var nextUrl;
|
||||
|
||||
var start = function (options) {
|
||||
new Tour({
|
||||
storage: false,
|
||||
template: module.config.template,
|
||||
steps: options.steps,
|
||||
framework: "bootstrap3",
|
||||
name: options.name,
|
||||
sanitizeWhitelist: {'a' : ['data-action-click']},
|
||||
onEnd: tourCompleted
|
||||
}).start();
|
||||
|
||||
tourOptions = options;
|
||||
completedUrl = options.completedUrl;
|
||||
nextUrl = options.nextUrl;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set tour as seen
|
||||
*/
|
||||
function tourCompleted(next) {
|
||||
// load user spaces
|
||||
client.post(module.config.completedUrl, {data: {section: tourOptions.name}}).then(function() {
|
||||
// cross out welcome tour entry
|
||||
$('#interface_entry').addClass('completed');
|
||||
|
||||
if (next === true && nextUrl) {
|
||||
window.location.href = nextUrl;
|
||||
} else {
|
||||
window.location.href = module.config.dashboardUrl;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var next = function () {
|
||||
tourCompleted(true);
|
||||
};
|
||||
|
||||
module.export({
|
||||
start: start,
|
||||
next: next
|
||||
});
|
||||
});
|
1
protected/humhub/modules/tour/resources/js/humhub.tour.min.js
vendored
Normal file
1
protected/humhub/modules/tour/resources/js/humhub.tour.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
humhub.module("tour",function(module,requrie,$){var client=requrie("client");var tourOptions;var completedUrl;var nextUrl;var start=function(options){new Tour({storage:false,template:module.config.template,steps:options.steps,framework:"bootstrap3",name:options.name,sanitizeWhitelist:{a:["data-action-click"]},onEnd:tourCompleted}).start();tourOptions=options;completedUrl=options.completedUrl;nextUrl=options.nextUrl};function tourCompleted(next){client.post(module.config.completedUrl,{data:{section:tourOptions.name}}).then(function(){$("#interface_entry").addClass("completed");if(next===true&&nextUrl){window.location.href=nextUrl}else{window.location.href=module.config.dashboardUrl}})}var next=function(){tourCompleted(true)};module.export({start:start,next:next})});
|
@ -37,7 +37,7 @@ class TourCest
|
||||
$I->waitForElementVisible('#getting-started-panel');
|
||||
$I->see('Guide: Administration (Modules)', '#getting-started-panel');
|
||||
|
||||
$I->wait(2);
|
||||
$I->wait(4);
|
||||
$I->click('Guide: Overview');
|
||||
|
||||
$I->waitForElementVisible('.popover.tour');
|
||||
@ -45,67 +45,100 @@ class TourCest
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Notifications', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Account Menu', null,'.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Space Menu', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Start space guide', '.popover.tour');
|
||||
|
||||
$I->wait(2);
|
||||
|
||||
$I->waitForText('Once you have joined or created a new space', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Space navigation menu', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Space preferences', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Writing posts', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Yours, and other users\' posts will appear here.', null, '.popover.tour');
|
||||
$I->waitForText('Yours, and other users\' posts will appear here.');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Most recent activities', null, '.popover.tour');
|
||||
$I->waitForText('Most recent activities');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Space members', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Yay! You\'re done.', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Profile Guide', '.popover.tour');
|
||||
|
||||
$I->waitForText('User profile', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Profile photo', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Edit account', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Profile menu', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Profile stream', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Hurray! You\'re done!', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Administration (Modules)', '.popover.tour');
|
||||
|
||||
$I->waitForText('As an admin, you can manage the whole platform from here', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Modules', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('Next', '.popover.tour');
|
||||
|
||||
$I->waitForText('Hurray! That\'s all for now.', null, '.popover.tour');
|
||||
$I->wait(1);
|
||||
$I->click('End guide', '.popover.tour');
|
||||
|
||||
$I->waitForElementVisible('#wallStream');
|
||||
$I->seeInCurrentUrl('dashboard');
|
||||
}
|
||||
|
||||
public function testNonAdminTour(AcceptanceTester $I)
|
||||
{
|
||||
$I->amAdmin();
|
||||
$I->amOnRoute(['/admin/setting/basic']);
|
||||
|
||||
$I->click('.field-basicsettingsform-tour label');
|
||||
$I->click('Save');
|
||||
$I->seeSuccess();
|
||||
|
||||
$I->amUser1(true);
|
||||
$I->amOnDashboard();
|
||||
$I->seeElement('#getting-started-panel');
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace humhub\modules\tour\widgets;
|
||||
|
||||
use humhub\modules\tour\assets\TourAsset;
|
||||
use Yii;
|
||||
|
||||
|
||||
@ -41,6 +42,8 @@ class Tour extends \humhub\components\Widget
|
||||
return;
|
||||
}
|
||||
|
||||
TourAsset::register($this->view);
|
||||
|
||||
// save current module and controller id's
|
||||
$currentModuleId = Yii::$app->controller->module->id;
|
||||
$currentControllerId = Yii::$app->controller->id;
|
||||
@ -56,15 +59,6 @@ class Tour extends \humhub\components\Widget
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load needed resources files
|
||||
*/
|
||||
public function loadResources(\yii\web\View $view)
|
||||
{
|
||||
$view->registerJsFile('@web-static/js/tour/bootstrap-tour.min.js');
|
||||
$view->registerCssFile('@web-static/js/tour/bootstrap-tour.min.css');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,62 +2,36 @@
|
||||
|
||||
use yii\helpers\Url;
|
||||
|
||||
$this->context->loadResources($this);
|
||||
/* @var $this \humhub\modules\ui\view\components\View */
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$( document ).one('humhub:ready', function() {
|
||||
// Create a new tour
|
||||
var administrationTour = new Tour({
|
||||
storage: false,
|
||||
template: '<div class="popover tour"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev"><?php echo Yii::t('TourModule.base', '« Prev'); ?></button> <button class="btn btn-sm btn-default" data-role="next"><?php echo Yii::t('TourModule.base', 'Next »'); ?></button> </div> <button class="btn btn-sm btn-default" data-role="end"><?php echo Yii::t('TourModule.base', 'End guide'); ?></button> </div> </div>',
|
||||
name: 'administration',
|
||||
onEnd: function (tour) {
|
||||
tourCompleted();
|
||||
$(document).one('humhub:ready', function () {
|
||||
humhub.require('tour').start(
|
||||
{
|
||||
name: 'administration',
|
||||
steps: [
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', '<strong>Administration</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', "As an admin, you can manage the whole platform from here.<br><br>Apart from the modules, we are not going to go into each point in detail here, as each has its own short description elsewhere.")); ?>
|
||||
},
|
||||
{
|
||||
element: ".list-group-item.modules",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', '<strong>Modules</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', 'You are currently in the tools menu. From here you can access the HumHub online marketplace, where you can install an ever increasing number of tools on-the-fly.<br><br>As already mentioned, the tools increase the features available for your space.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', "<strong>Hurray!</strong> That's all for now.")); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', 'You have now learned about all the most important features and settings and are all set to start using the platform.<br><br>We hope you and all future users will enjoy using this site. We are looking forward to any suggestions or support you wish to offer for our project. Feel free to contact us via www.humhub.org.<br><br>Stay tuned. :-)')); ?>
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Add tour steps
|
||||
administrationTour.addSteps([
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', '<strong>Administration</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', "As an admin, you can manage the whole platform from here.<br><br>Apart from the modules, we are not going to go into each point in detail here, as each has its own short description elsewhere.")); ?>
|
||||
},
|
||||
{
|
||||
element: ".list-group-item.modules",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', '<strong>Modules</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', 'You are currently in the tools menu. From here you can access the HumHub online marketplace, where you can install an ever increasing number of tools on-the-fly.<br><br>As already mentioned, the tools increase the features available for your space.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', "<strong>Hurray!</strong> That's all for now.")); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_administration', 'You have now learned about all the most important features and settings and are all set to start using the platform.<br><br>We hope you and all future users will enjoy using this site. We are looking forward to any suggestions or support you wish to offer for our project. Feel free to contact us via www.humhub.org.<br><br>Stay tuned. :-)')); ?>
|
||||
}
|
||||
|
||||
]);
|
||||
|
||||
// Initialize tour plugin
|
||||
administrationTour.init();
|
||||
|
||||
// start the tour
|
||||
administrationTour.restart();
|
||||
|
||||
);
|
||||
});
|
||||
/**
|
||||
* Set tour as seen
|
||||
*/
|
||||
function tourCompleted() {
|
||||
// load user spaces
|
||||
$.ajax({
|
||||
'url': '<?php echo Url::to(['/tour/tour/tour-completed', 'section' => 'administration']); ?>',
|
||||
'cache': false,
|
||||
'data': jQuery(this).parents("form").serialize()
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
@ -2,85 +2,42 @@
|
||||
|
||||
use yii\helpers\Url;
|
||||
|
||||
$this->context->loadResources($this);
|
||||
/* @var $this \humhub\modules\ui\view\components\View */
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
var gotoSpace = false;
|
||||
|
||||
|
||||
$(document).one('humhub:ready', function () {
|
||||
|
||||
// Create a new tour
|
||||
var interfaceTour = new Tour({
|
||||
storage: false,
|
||||
template: '<div class="popover tour"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev"><?php echo Yii::t('TourModule.base', '« Prev'); ?></button> <button class="btn btn-sm btn-default" data-role="next"><?php echo Yii::t('TourModule.base', 'Next »'); ?></button> </div> <button class="btn btn-sm btn-default" data-role="end"><?php echo Yii::t('TourModule.base', 'End guide'); ?></button> </div> </div>',
|
||||
name: 'interface',
|
||||
onEnd: function (tour) {
|
||||
tourCompleted();
|
||||
humhub.require('tour').start(
|
||||
{
|
||||
name: 'interface',
|
||||
nextUrl: '<?= Url::to(['/tour/tour/start-space-tour'])?>',
|
||||
steps: [
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_interface', '<strong>Dashboard</strong>')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_interface', "This is your dashboard.<br><br>Any new activities or posts that might interest you will be displayed here.")); ?>
|
||||
},
|
||||
{
|
||||
element: "#icon-notifications",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_index', '<strong>Notifications</strong>')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_index', 'Don\'t lose track of things!<br /><br />This icon will keep you informed of activities and posts that concern you directly.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: ".dropdown.account",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_index', '<strong>Account</strong> Menu')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_index', 'The account menu gives you access to your private settings and allows you to manage your public profile.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: "#space-menu",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> Menu')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_index', 'This is the most important menu and will probably be the one you use most often!<br><br>Access all the spaces you have joined and create new spaces here.<br><br>The next guide will show you how:')); ?> +"<br><br><a href='#' data-action-click='tour.next'><?=Yii::t("TourModule.widgets_views_index", "<strong>Start</strong> space guide"); ?></a><br><br>",
|
||||
placement: "bottom"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Add tour steps
|
||||
interfaceTour.addSteps([
|
||||
{
|
||||
// step 0
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_interface', '<strong>Dashboard</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_interface', "This is your dashboard.<br><br>Any new activities or posts that might interest you will be displayed here.")); ?>
|
||||
},
|
||||
{
|
||||
element: "#icon-notifications",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_index', '<strong>Notifications</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_index', 'Don\'t lose track of things!<br /><br />This icon will keep you informed of activities and posts that concern you directly.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: ".dropdown.account",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_index', '<strong>Account</strong> Menu')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_index', 'The account menu gives you access to your private settings and allows you to manage your public profile.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: "#space-menu",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_index', '<strong>Space</strong> Menu')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_index', 'This is the most important menu and will probably be the one you use most often!<br><br>Access all the spaces you have joined and create new spaces here.<br><br>The next guide will show you how:')); ?> + "<br><br><a href='javascript:gotoSpace = true; tourCompleted();'><?php echo Yii::t("TourModule.widgets_views_index", "<strong>Start</strong> space guide"); ?></a><br><br>",
|
||||
placement: "bottom"
|
||||
}
|
||||
]);
|
||||
|
||||
// Initialize tour plugin
|
||||
interfaceTour.init();
|
||||
|
||||
// start the tour
|
||||
interfaceTour.restart();
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set tour as seen
|
||||
*/
|
||||
function tourCompleted() {
|
||||
// load user spaces
|
||||
$.ajax({
|
||||
'url': '<?php echo Url::to(['/tour/tour/tour-completed', 'section' => 'interface']); ?>',
|
||||
'cache': false,
|
||||
'data': jQuery(this).parents("form").serialize()
|
||||
}).done(function () {
|
||||
// cross out welcome tour entry
|
||||
$('#interface_entry').addClass('completed');
|
||||
|
||||
if (gotoSpace == true) {
|
||||
|
||||
// redirect to space
|
||||
window.location.href = "<?php echo Url::to(['//tour/tour/start-space-tour']); ?>";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
@ -2,98 +2,67 @@
|
||||
|
||||
use yii\helpers\Url;
|
||||
|
||||
$this->context->loadResources($this);
|
||||
/* @var $this \humhub\modules\ui\view\components\View */
|
||||
|
||||
$isAmind = Yii::$app->user->isAdmin();
|
||||
$nextUrl = $isAmind ? Url::to(['/admin/module/list-online', 'tour' => 'true']) : '';
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var gotoAdministration = false;
|
||||
|
||||
$(document).one('humhub:ready', function () {
|
||||
// Create a new tour
|
||||
var profileTour = new Tour({
|
||||
storage: false,
|
||||
template: '<div class="popover tour"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev"><?php echo Yii::t('TourModule.base', '« Prev'); ?></button> <button class="btn btn-sm btn-default" data-role="next"><?php echo Yii::t('TourModule.base', 'Next »'); ?></button> </div> <button class="btn btn-sm btn-default" data-role="end"><?php echo Yii::t('TourModule.base', 'End guide'); ?></button> </div> </div>',
|
||||
name: 'profile',
|
||||
onEnd: function (tour) {
|
||||
tourCompleted();
|
||||
}
|
||||
});
|
||||
// Add tour steps
|
||||
profileTour.addSteps([
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>User profile</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', "This is your public user profile, which can be seen by any registered user.")); ?>
|
||||
},
|
||||
{
|
||||
element: "#user-profile-image",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Profile</strong> photo')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Upload a new profile photo by simply clicking here or by drag&drop. Do just the same for updating your cover photo.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
element: ".edit-account",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Edit</strong> account')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Click on this button to update your profile and account settings. You can also add more information to your profile.')); ?>,
|
||||
placement: "left"
|
||||
},
|
||||
{
|
||||
element: ".layout-nav-container .panel",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Profile</strong> menu')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Just like in the space, the user profile can be personalized with various modules.<br><br>You can see which modules are available for your profile by looking them in “Modules” in the account settings menu.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
element: "#contentFormBody",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Profile</strong> stream')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Each profile has its own pin board. Your posts will also appear on the dashboards of those users who are following you.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
<?php if (Yii::$app->user->isAdmin() == true) : ?>
|
||||
humhub.require('tour').start(
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Hurray!</strong> You\'re done!')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'You\'ve completed the user profile guide!<br><br>To carry on with the administration guide, click here:<br /><br />')); ?> + "<a href='javascript:gotoAdministration = true; tourCompleted();'><?php echo Yii::t("TourModule.widgets_views_guide_profile", "<strong>Administration (Modules)</strong>"); ?></a><br><br>"
|
||||
}
|
||||
<?php else : ?>
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Hurray!</strong> The End.')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_profile', "You've completed the user profile guide!")); ?>
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
]);
|
||||
// Initialize tour plugin
|
||||
profileTour.init();
|
||||
// start the tour
|
||||
profileTour.restart();
|
||||
name: 'profile',
|
||||
nextUrl: '<?= $nextUrl; ?>',
|
||||
steps:[
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>User profile</strong>')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', "This is your public user profile, which can be seen by any registered user.")); ?>
|
||||
},
|
||||
{
|
||||
element: "#user-profile-image",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Profile</strong> photo')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Upload a new profile photo by simply clicking here or by drag&drop. Do just the same for updating your cover photo.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
element: ".edit-account",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Edit</strong> account')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Click on this button to update your profile and account settings. You can also add more information to your profile.')); ?>,
|
||||
placement: "left"
|
||||
},
|
||||
{
|
||||
element: ".layout-nav-container .panel",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Profile</strong> menu')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Just like in the space, the user profile can be personalized with various modules.<br><br>You can see which modules are available for your profile by looking them in “Modules” in the account settings menu.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
element: "#contentFormBody",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Profile</strong> stream')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'Each profile has its own pin board. Your posts will also appear on the dashboards of those users who are following you.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
<?php if ($isAmind) : ?>
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Hurray!</strong> You\'re done!')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', 'You\'ve completed the user profile guide!<br><br>To carry on with the administration guide, click here:<br /><br />')); ?> + "<a href='#' data-action-click='tour.next'><?= Yii::t("TourModule.widgets_views_guide_profile", "<strong>Administration (Modules)</strong>"); ?></a><br><br>"
|
||||
}
|
||||
<?php else : ?>
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', '<strong>Hurray!</strong> The End.')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_profile', "You've completed the user profile guide!")); ?>
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
]
|
||||
}
|
||||
);
|
||||
});
|
||||
/**
|
||||
* Set tour as seen
|
||||
*/
|
||||
function tourCompleted() {
|
||||
// load user spaces
|
||||
$.ajax({
|
||||
'url': '<?php echo Url::to(['/tour/tour/tour-completed', 'section' => 'profile']); ?>',
|
||||
'cache': false,
|
||||
'data': jQuery(this).parents("form").serialize()
|
||||
}).done(function () {
|
||||
// redirect to dashboard
|
||||
window.location.href = "<?php echo Url::to(['/dashboard/dashboard']); ?>";
|
||||
if (gotoAdministration == true) {
|
||||
// redirect to administration
|
||||
window.location.href = "<?php echo Url::to(['/admin/module/list-online', 'tour' => 'true']); ?>";
|
||||
} else {
|
||||
// redirect to dashboard
|
||||
window.location.href = "<?php echo Url::to(['/dashboard/dashboard']); ?>";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
@ -2,102 +2,65 @@
|
||||
|
||||
use yii\helpers\Url;
|
||||
|
||||
$this->context->loadResources($this);
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var gotoProfile = false;
|
||||
$(document).one('humhub:ready', function () {
|
||||
// Create a new tour
|
||||
var spacesTour = new Tour({
|
||||
storage: false,
|
||||
template: '<div class="popover tour"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev"><?php echo Yii::t('TourModule.base', '« Prev'); ?></button> <button class="btn btn-sm btn-default" data-role="next"><?php echo Yii::t('TourModule.base', 'Next »'); ?></button> </div> <button class="btn btn-sm btn-default" data-role="end"><?php echo Yii::t('TourModule.base', 'End guide'); ?></button> </div> </div>',
|
||||
name: 'spaces',
|
||||
onEnd: function (tour) {
|
||||
tourCompleted();
|
||||
humhub.require('tour').start(
|
||||
{
|
||||
name: 'spaces',
|
||||
nextUrl: '<?= Yii::$app->user->getIdentity()->createUrl('/user/profile', ['tour' => true]); ?>',
|
||||
steps: [
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong>')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', "Once you have joined or created a new space you can work on projects, discuss topics or just share information with other users.<br><br>There are various tools to personalize a space, thereby making the work process more productive.")); ?>
|
||||
},
|
||||
{
|
||||
element: ".layout-nav-container .panel",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong> navigation menu')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'This is where you can navigate the space – where you find which modules are active or available for the particular space you are currently in. These could be polls, tasks or notes for example.<br><br>Only the space admin can manage the space\'s modules.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
element: ".dropdown-navigation",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong> preferences')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'This menu is only visible for space admins. Here you can manage your space settings, add/block members and activate/deactivate tools for this space.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: "#contentFormBody",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Writing</strong> posts')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'New posts can be written and posted here.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: ".wall-entry:eq(0)",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Posts</strong>')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'Yours, and other users\' posts will appear here.<br><br>These can then be liked or commented on.')); ?>,
|
||||
placement: "top"
|
||||
},
|
||||
{
|
||||
element: ".panel-activities",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Most recent</strong> activities')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'To keep you up to date, other users\' most recent activities in this space will be displayed here.')); ?>,
|
||||
placement: "left"
|
||||
},
|
||||
{
|
||||
element: "#space-members-panel",
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong> members')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'All users who are a member of this space will be displayed here.<br /><br />New members can be added by anyone who has been given access rights by the admin.')); ?>,
|
||||
placement: "left"
|
||||
},
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Yay! You\'re done.</strong>')); ?>,
|
||||
content: <?= json_encode(Yii::t('TourModule.widgets_views_guide_spaces', "That's it for the space guide.<br><br>To carry on with the user profile guide, click here: ")); ?> + "<a href='#' data-action-click='tour.next' ><?= Yii::t("TourModule.widgets_views_guide_spaces", "<strong>Profile Guide</strong>"); ?></a><br><br>"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Add tour steps
|
||||
spacesTour.addSteps([
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', "Once you have joined or created a new space you can work on projects, discuss topics or just share information with other users.<br><br>There are various tools to personalize a space, thereby making the work process more productive.")); ?>
|
||||
},
|
||||
{
|
||||
element: ".layout-nav-container .panel",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong> navigation menu')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'This is where you can navigate the space – where you find which modules are active or available for the particular space you are currently in. These could be polls, tasks or notes for example.<br><br>Only the space admin can manage the space\'s modules.')); ?>,
|
||||
placement: "right"
|
||||
},
|
||||
{
|
||||
element: ".dropdown-navigation",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong> preferences')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'This menu is only visible for space admins. Here you can manage your space settings, add/block members and activate/deactivate tools for this space.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: "#contentFormBody",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Writing</strong> posts')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'New posts can be written and posted here.')); ?>,
|
||||
placement: "bottom"
|
||||
},
|
||||
{
|
||||
element: ".wall-entry:eq(0)",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Posts</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'Yours, and other users\' posts will appear here.<br><br>These can then be liked or commented on.')); ?>,
|
||||
placement: "top"
|
||||
},
|
||||
{
|
||||
element: ".panel-activities",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Most recent</strong> activities')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'To keep you up to date, other users\' most recent activities in this space will be displayed here.')); ?>,
|
||||
placement: "left"
|
||||
},
|
||||
{
|
||||
element: "#space-members-panel",
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Space</strong> members')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', 'All users who are a member of this space will be displayed here.<br /><br />New members can be added by anyone who has been given access rights by the admin.')); ?>,
|
||||
placement: "left"
|
||||
},
|
||||
{
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', '<strong>Yay! You\'re done.</strong>')); ?>,
|
||||
content: <?php echo json_encode(Yii::t('TourModule.widgets_views_guide_spaces', "That's it for the space guide.<br><br>To carry on with the user profile guide, click here: ")); ?> + "<a href='javascript:gotoProfile = true; tourCompleted();'><?php echo Yii::t("TourModule.widgets_views_guide_spaces", "<strong>Profile Guide</strong>"); ?></a><br><br>"
|
||||
}
|
||||
]);
|
||||
|
||||
// Initialize tour plugin
|
||||
spacesTour.init();
|
||||
|
||||
// start the tour
|
||||
spacesTour.restart();
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Set tour as seen
|
||||
*/
|
||||
function tourCompleted() {
|
||||
// load user spaces
|
||||
$.ajax({
|
||||
'url': '<?php echo Url::to(['/tour/tour/tour-completed', 'section' => 'spaces']); ?>',
|
||||
'cache': false,
|
||||
'data': jQuery(this).parents("form").serialize()
|
||||
}).done(function () {
|
||||
|
||||
if (gotoProfile == true) {
|
||||
// redirect to profile
|
||||
window.location.href = "<?php echo Yii::$app->user->getIdentity()->createUrl('/user/profile', ['tour' => true]); ?>";
|
||||
} else {
|
||||
// redirect to dashboard
|
||||
window.location.href = "<?php echo Url::to(['/dashboard/dashboard']); ?>";
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
22
static/js/tour/bootstrap-tour.min.css
vendored
22
static/js/tour/bootstrap-tour.min.css
vendored
@ -1,22 +0,0 @@
|
||||
/* ========================================================================
|
||||
* bootstrap-tour - v0.11.0
|
||||
* 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:absolute;z-index:1100;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.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}
|
22
static/js/tour/bootstrap-tour.min.js
vendored
22
static/js/tour/bootstrap-tour.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user