mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Some improvements in tour
This commit is contained in:
@@ -12,6 +12,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use Preferences;
|
||||
use Response;
|
||||
use Session;
|
||||
use Steam;
|
||||
@@ -24,21 +25,23 @@ use Steam;
|
||||
class JsonController extends Controller
|
||||
{
|
||||
|
||||
public function endTour()
|
||||
{
|
||||
Preferences::set('tour', false);
|
||||
|
||||
return Response::json(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function tour()
|
||||
{
|
||||
$headers = [
|
||||
'main-content',
|
||||
'sidebar-toggle',
|
||||
'account-menu',
|
||||
'budget-menu',
|
||||
'report-menu',
|
||||
'transaction-menu',
|
||||
'option-menu',
|
||||
'main-content-end'
|
||||
];
|
||||
$pref = Preferences::get('tour', true);
|
||||
if (!$pref) {
|
||||
abort(404);
|
||||
}
|
||||
$headers = ['main-content', 'sidebar-toggle', 'account-menu', 'budget-menu', 'report-menu', 'transaction-menu', 'option-menu', 'main-content-end'];
|
||||
$steps = [];
|
||||
foreach ($headers as $header) {
|
||||
$steps[] = [
|
||||
@@ -59,20 +62,21 @@ class JsonController extends Controller
|
||||
$steps[7]['orphan'] = true;
|
||||
$steps[7]['backdrop'] = true;
|
||||
|
||||
$template ='<div class="popover" role="tooltip">
|
||||
$template
|
||||
= '<div class="popover" 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">« '.trans('firefly.prev').'</button>
|
||||
<button class="btn btn-sm btn-default" data-role="next">'.trans('firefly.next').' »</button>
|
||||
<button class="btn btn-sm btn-default" data-role="prev">« ' . trans('firefly.prev') . '</button>
|
||||
<button class="btn btn-sm btn-default" data-role="next">' . trans('firefly.next') . ' »</button>
|
||||
<button class="btn btn-sm btn-default"
|
||||
data-role="pause-resume"
|
||||
data-pause-text="Pause"
|
||||
data-resume-text="Resume">'.trans('firefly.pause').'</button>
|
||||
data-resume-text="Resume">' . trans('firefly.pause') . '</button>
|
||||
</div>
|
||||
<button class="btn btn-sm btn-default" data-role="end">'.trans('firefly.end-tour').'</button>
|
||||
<button class="btn btn-sm btn-default" data-role="end">' . trans('firefly.end-tour') . '</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
|
Reference in New Issue
Block a user