-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Icon/Button to show user's open tasks
This shows an icon with the number of open tasks assigned to the user. If the user has open tasks and they click on the icon, they should see a table with all their open tasks. Another click on the icon hides the table. Known Issues: ------------- * If a task is check-off, the number next to the icon is not updated dynamically. SPR-962
- Loading branch information
Showing
8 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
jQuery(function () { | ||
/* DOKUWIKI:include scripts/general.js */ | ||
/* DOKUWIKI:include scripts/userTasksOverlay.js */ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
var $userTasksButtons = jQuery('a.plugin__do_usertasks'); | ||
$userTasksButtons.click(function handleUserTasksButtonClick(event) { | ||
var $this; | ||
event.stopPropagation(); | ||
event.preventDefault(); | ||
|
||
if (jQuery('.plugin__do_usertasks_list').length) { | ||
jQuery('.plugin__do_usertasks_list').toggle(); | ||
return; | ||
} | ||
|
||
$this = jQuery(this); | ||
|
||
jQuery.get( | ||
DOKU_BASE + 'lib/exe/ajax.php', | ||
{ | ||
call: 'plugin_do_userTasksOverlay', | ||
}, | ||
).done(function showUserTasksOverlay(data) { | ||
var $wrapper = jQuery('<div class="plugin__do_usertasks_list"></div>'); | ||
$wrapper.css({'display': 'inline-block', 'position': 'absolute'}); | ||
$wrapper.append(jQuery(data.html)); | ||
$wrapper.appendTo('#dokuwiki__header'); | ||
$wrapper.position({ | ||
my: 'middle top', | ||
at: 'right bottom', | ||
of: $this, | ||
}); | ||
}); | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters