Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Firefox can't handle the animations. Removing #2019

Merged
merged 15 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/Core/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ public function getAll(): array
if ($themeDir == '.' || $themeDir == '..') {
continue;
}
if ($themeDir == $theme) {
$themes[$themeDir] = $language->__("theme.name");
continue;
}

//Check specific language file
$language_file = ROOT
Expand All @@ -211,6 +207,7 @@ public function getAll(): array
. '.ini';

if (file_exists($language_file)) {

$iniData = parse_ini_file(
$language_file,
true,
Expand All @@ -221,6 +218,9 @@ public function getAll(): array
$themes[$themeDir] = $iniData['theme.name'];
continue;
}

$themes[$themeDir] = $themeDir;
continue;
}

//Check english language file
Expand Down
5 changes: 5 additions & 0 deletions app/Domain/Clients/Controllers/ShowClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public function run()

$row = $this->clientRepo->getClient($id);

if($row === false) {
$this->tpl->display('errors.error404');
return;
}

$clientValues = array(
'id' => $row['id'],
'name' => $row['name'],
Expand Down
27 changes: 1 addition & 26 deletions app/Domain/Dashboard/Templates/home.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
<li class='dropdown-item'><a style='background-color:#b0b0b0' href='javascript:void(0);' data-label="<?=$tpl->__("label.no_milestone")?>" data-value='<?=$row['id'] . "_0_#b0b0b0"?>'> <?=$tpl->__("label.no_milestone")?> </a></li>

<?php
if (isset($milestones[$row['projectId']])) {
if (isset($milestones[$row['projectId']]) && is_array($milestones[$row['projectId']])) {
foreach ($milestones[$row['projectId']] as $milestone) {
if ($milestone != null && is_object($milestone)) {
echo "<li class='dropdown-item'>
Expand Down Expand Up @@ -452,8 +452,6 @@ function accordionToggle(id) {

leantime.dashboardController.initDueDateTimePickers();



jQuery('.todaysDate').text(moment().format('LLLL'));

<?php if ($login::userIsAtLeast($roles::$editor)) { ?>
Expand All @@ -466,29 +464,6 @@ function accordionToggle(id) {
leantime.authController.makeInputReadonly(".maincontentinner");
<?php } ?>

<?php if ($tpl->get('completedOnboarding') === false) { ?>
leantime.helperController.firstLoginModal();
<?php } ?>


<?php
if ($tpl->get('completedOnboarding') == "1" && (isset($_SESSION['userdata']['settings']["modals"]["dashboard"]) === false || $_SESSION['userdata']['settings']["modals"]["dashboard"] == 0)) { ?>
leantime.helperController.showHelperModal("dashboard", 500, 700);

<?php
//Only show once per session
if (!isset($_SESSION['userdata']['settings']["modals"])) {
$_SESSION['userdata']['settings']["modals"] = array();
}

if (!isset($_SESSION['userdata']['settings']["modals"]["dashboard"])) {
$_SESSION['userdata']['settings']["modals"]["dashboard"] = 1;
}
} ?>




});

var events = [<?php foreach ($tpl->get('calendar') as $calendar) : ?>
Expand Down
1 change: 1 addition & 0 deletions app/Domain/Goalcanvas/Controllers/EditCanvasItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ public function post($params): void

$this->tpl->setNotification($this->language->__('notification.element_created'), 'success');
} else {
$id = "";
$this->tpl->setNotification($this->language->__('notification.please_enter_title'), 'error');
}

Expand Down
79 changes: 79 additions & 0 deletions app/Domain/Help/Composers/Helpermodal.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php

namespace Leantime\Domain\Help\Composers;

use Illuminate\Contracts\Container\BindingResolutionException;
use Leantime\Core\IncomingRequest as IncomingRequestCore;
use Leantime\Core\Frontcontroller as FrontcontrollerCore;
use Leantime\Core\Composer;
use Leantime\Domain\Help\Services\Helper;
use Leantime\Domain\Projects\Services\Projects as ProjectService;
use Leantime\Domain\Setting\Repositories\Setting;
use Leantime\Domain\Tickets\Services\Tickets as TicketService;
use Leantime\Domain\Setting\Services\Setting as SettingService;
use Leantime\Domain\Menu\Repositories\Menu as MenuRepository;

/**
*
*/
class Helpermodal extends Composer
{
private IncomingRequestCore $incomingRequest;
private Setting $settingsRepo;
private Helper $helperService;

public static array $views = [
'help::helpermodal',
];

/**

* @return void
*/
public function init(
IncomingRequestCore $request,
Setting $settingsRepo,
Helper $helperService
): void {
$this->incomingRequest = $request;
$this->settingsRepo = $settingsRepo;
$this->helperService = $helperService;
}


/**
* @return array
* @throws BindingResolutionException
*/
public function with(): array
{

$action = FrontcontrollerCore::getCurrentRoute();

$showHelperModal = false;
$completedOnboarding = $this->settingsRepo->getSetting("companysettings.completedOnboarding");

$currentModal = $this->helperService->getHelperModalByRoute($action);


if ($completedOnboarding == "1"
&& $currentModal !== 'notfount'
&& (isset($_SESSION['userdata']['settings']["modals"][$currentModal]) === false || $_SESSION['userdata']['settings']["modals"][$currentModal] == 0)) {

if (!isset($_SESSION['userdata']['settings']["modals"])) {
$_SESSION['userdata']['settings']["modals"] = array();
}

if (!isset($_SESSION['userdata']['settings']["modals"][$currentModal])) {
$_SESSION['userdata']['settings']["modals"][$currentModal] = 1;
$showHelperModal = true;
}
}

return [
"completedOnboarding" => $completedOnboarding,
"showHelperModal" => $showHelperModal,
"currentModal" => $currentModal
];
}
}
41 changes: 11 additions & 30 deletions app/Domain/Help/Controllers/ShowOnboardingDialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,21 @@ class ShowOnboardingDialog extends Controller
public function get($params)
{

if (isset($params['module']) && $params['module'] != "") {
$filteredInput = htmlspecialchars($params['module']);
$this->tpl->displayPartial('help.' . $filteredInput);
//show modals only once per session
if (!isset($_SESSION['userdata']['settings']["modals"])) {
$_SESSION['userdata']['settings']["modals"] = array();
}
}

/**
* post - handle post requests
*
* @access public
*
*/
public function post($params)
{
}
if (isset($params['module']) && $params['module'] != "") {

/**
* put - handle put requests
*
* @access public
*
*/
public function put($params)
{
}
$filteredInput = htmlspecialchars($params['module']);

/**
* delete - handle delete requests
*
* @access public
*
*/
public function delete($params)
{
if (!isset($_SESSION['userdata']['settings']["modals"][$filteredInput])) {
$_SESSION['userdata']['settings']["modals"][$filteredInput] = 1;
}

$this->tpl->displayPartial('help.' . $filteredInput);
}
}
}

Expand Down
52 changes: 35 additions & 17 deletions app/Domain/Help/Js/helperController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ leantime.helperController = (function () {

var tour = new Shepherd.Tour(
{
useModalOverlay: true,
defaults: {
classes: 'shepherd-theme-arrows',
showCancelLink: true,
Expand All @@ -53,7 +54,7 @@ leantime.helperController = (function () {
{
title: leantime.i18n.__("tour.left_navigation"),
text: leantime.i18n.__("tour.left_nav_text"),
attachTo: '.leftmenu ul right',
attachTo: { element: '.leftmenu ul', on: 'left' },
advanceOn: '.headmenu click',
buttons: [
{
Expand All @@ -74,7 +75,7 @@ leantime.helperController = (function () {
{
title: leantime.i18n.__("tour.project_selection"),
text: leantime.i18n.__("tour.project_selection_text"),
attachTo: '.project-selector right',
attachTo: { element: '.project-selector', on: 'bottom' },
buttons: [
{
text: leantime.i18n.__("tour.back"),
Expand All @@ -94,8 +95,7 @@ leantime.helperController = (function () {
{
title: leantime.i18n.__("tour.top_navigation"),
text: leantime.i18n.__("tour.top_navigation_text"),
attachTo: '.headmenu bottom',
advanceOn: '#sprintBurndownChart click',
attachTo: { element: '.headmenu', on: 'bottom' },
buttons: [
{
text: leantime.i18n.__("tour.back"),
Expand All @@ -111,12 +111,11 @@ leantime.helperController = (function () {
);

tour.addStep(
'Project Status',
'Your projects',
{
title: leantime.i18n.__("tour.project_progress"),
text: leantime.i18n.__("tour.project_progress_text"),
attachTo: '#projectProgressContainer left',
advanceOn: '.headmenu click',
text: "These are the projects currently assigned to you. You can click on the headlines to get to those project quickly." ,
attachTo: { element: '#projectProgressContainer', on: 'left' },
buttons: [
{
text: leantime.i18n.__("tour.back"),
Expand All @@ -131,14 +130,12 @@ leantime.helperController = (function () {
}
);



tour.addStep(
'Your Todos',
{
title: leantime.i18n.__("tour.your_todos"),
text: leantime.i18n.__("tour.your_todos_text"),
attachTo: '#yourToDoContainer top',
attachTo: { element: '#yourToDoContainer', on: 'top' },
advanceOn: '.headmenu click',
buttons: [
{
Expand All @@ -165,10 +162,10 @@ leantime.helperController = (function () {
action:tour.cancel
},
{
text: leantime.i18n.__("tour.goto_projects"),
text: "Go to the welcome content",
events: {
'click': function () {
window.location.href = leantime.appUrl + "/projects/newProject/";
leantime.helperController.showHelperModal('dashboard', 300, 500);
}
}
}
Expand Down Expand Up @@ -214,11 +211,11 @@ leantime.helperController = (function () {
);

tour.addStep(
'Left Nav',
'Drag & Drop',
{
title: leantime.i18n.__("tour.drag_drop"),
text: leantime.i18n.__("tour.drag_drop_text"),
attachTo: '.ticketBox h4 right',
attachTo: { element: '.ticketBox h4 ', on: 'right' },
advanceOn: '.ticketBox click',
buttons: [
{
Expand All @@ -238,8 +235,8 @@ leantime.helperController = (function () {
'Change Views',
{
title: leantime.i18n.__("tour.change_views"),
text: leantime.i18n.__("tour.change_views_text"),
attachTo: '.btn-group .fa-columns left',
text: "You can visualize your To-Dos in different ways. With these tabs you can switch between Kanban, Table, Timeline and Calendar views.",
attachTo: { element: '.maincontentinner.tabs ul li', on: 'bottom' },
advanceOn: '.ticketBox click',
buttons: [
{
Expand All @@ -255,6 +252,27 @@ leantime.helperController = (function () {
}
);

tour.addStep(
'Filters And Groups',
{
title: "Filters & Grouping",
text: "You can use filters and grouping to organize your To-Dos in a way that makes sense to you and your team",
attachTo: '.filterWrapper bottom',
advanceOn: '.ticketBox click',
buttons: [
{
text: leantime.i18n.__("tour.back"),
classes: 'shepherd-button-secondary',
action: tour.back
},
{
text: leantime.i18n.__("tour.next"),
action: tour.next
}
]
}
);

tour.addStep(
'Your Todos',
{
Expand Down
Loading