27 Commits

Author SHA1 Message Date
Andrew Nicols
d3f62f2aa3 MDL-42989 JavaScript: Check result of navigation IO requests before reporting errors
When making a request which fails, we need to ensure that the AJAX query
was not aborted before displaying the error.

This ensures that if the navigation tree is being requested at the same
time as a page load is being processed, the abortion of the AJAX request is
not displayed before the page reloads.
2013-12-03 14:36:42 +08:00
Andrew Nicols
2f13dd98b0 MDL-42989 JavaScript: Do not attempt to expand navigation when opening link
When clicking on a link which is also expandable, we should not attempt to
expand it.
2013-12-03 14:20:51 +08:00
Andrew Nicols
0bb56f2e31 MDL-42989 Admin: Clean output when building site administration tree for JS
Previously, any inappropriate whitespace found whilst building the admin
tree caused a JSON error and for the site administration tree retrieval to
fail.

This change ensures that access to the site administration tree is unbroken
for non-developers, whilst still alerting developers that there is an
issue.
2013-12-02 14:28:37 +08:00
Sam Hemelryk
9474b47781 MDL-43016 block_navigation: fixed category link display 2013-11-22 08:55:39 +13:00
Rajesh Taneja
5ab32c11b7 MDL-41811 navigation: Site admin will be loaded by ajax on non admin pages 2013-10-21 14:17:52 +08:00
Sam Hemelryk
84192d7836 MDL-40167 dock: converted the dock JS to a YUI shifted module.
The patch converts the dock into a YUI shifter module and at
the same time improves several aspects of its operation.
The features of this patch include:
* Dock Module conversion.
* A loader that ensures we don't include the dock JS or its
  requirements unless actually required.
* We no longer include the dock JS for themes that don't
  enable it.
* Blocks no longer add registration events to the page
  instead a dockable attribute is added to the html and the
  loader looks for that.
* The dock module is properly documented and running YUIDoc
  gives good quality documentation.
* We no longer need the dock module registration or
  subcomponent.
* All events that can be delegated are now delegated.
* Removed unused variables and code left over after fixes.
* Support for docking blocks renderered using the new blocks
  render method. Better support for custom block regions.
2013-07-15 09:46:03 +12:00
Sam Hemelryk
8a7d747581 MDL-40142 navigation: fixed chainable issue with navigation JS 2013-06-17 09:11:45 +12:00
Damyon Wiese
986adc066c MDL-39092 Yuilib - remove more -coverage.js files
Also slight tweak to the readme for someone who does not know shifter.
2013-04-15 09:02:11 +08:00
Eloy Lafuente (stronk7)
77b0357faf MDL-38887 block nav: reshifter module 2013-04-09 10:28:24 +02:00
Aparup Banerjee
eeb47dbd30 Merge branch 'wip-MDL-38887-m25' of git://github.com/marinaglancy/moodle 2013-04-09 14:21:22 +08:00
Marina Glancy
30142c1905 MDL-38593 Merge code from /course/category.php into /course/index.php 2013-04-09 12:21:05 +10:00
Marina Glancy
938c7dd3bc MDL-38887 dim hidden branches in navigation expanded via AJAX requests 2013-04-08 11:05:37 +10:00
Andrew Robert Nicols
81c8a42040 MDL-38516 JavaScript: Migrate moodle-block_navigation-navigation to use Shifter 2013-03-27 22:27:48 +00:00
Damyon Wiese
a3e57810c6 Merge branch 'wip-MDL-36287-m25' of git://github.com/samhemelryk/moodle 2013-02-25 15:49:13 +08:00
Sam Hemelryk
068ad19988 MDL-36287 block_navigation: ajax loading events are now delegated 2013-02-22 14:18:36 +13:00
Rajesh Taneja
db47f68f28 MDL-37329 Navigation: Navigation node My Courses will only show enrolled courses 2013-02-15 17:55:28 +08:00
Sam Hemelryk
b9c87ef86a MDL-33017 navigation: Tidied up after peer-review 2012-11-07 09:52:47 +13:00
Sam Hemelryk
58b602da8e MDL-33017 navigation: added current course and simplified loading 2012-11-04 11:06:49 +13:00
Rajesh Taneja
e5c46b5435 MDL-30833 Accessibility: Added aria-expanded attribute on navigation nodes 2012-09-18 17:26:39 +08:00
Petr Skoda
0958759dc2 MDL-28554 workaround for http://yuilibrary.com/projects/yui3/ticket/2530999
Do not load io-xdr and io-upload-iframe on the same page.
2011-08-25 11:38:34 +02:00
Aparup Banerjee
0193d9dfe7 MDL-27428 accessibility : added a fourth argument to event's subscription and delegation methods to specify selector actions.
- selected actions will fire the event through to the relevant handling functions.
2011-05-23 11:13:52 +08:00
Aparup Banerjee
f93844f3d7 MDL-27428 accessibility : added keyboard support to navigational menus loaded via ajax. 2011-05-23 11:13:36 +08:00
Aparup Banerjee
1e22cd351f MDL-27428 accessibility : allowed enter/space/left_arrow/right_arrow to expand/collapse navigation & settings menu branches
- note: a menu node branch that is a link will be followed instead of toggling the branch.
2011-05-23 11:12:35 +08:00
Sam Hemelryk
4c2820fbd8 navigation MDL-26875 Moved course type check into object check and moved JS string call to navigation block where the navigation JS is initialised. 2011-03-18 14:45:10 +08:00
Jonathon Fowler
c683165a4a insert a 'View all courses' link when loading category navigation entries from AJAX 2011-03-18 15:00:14 +10:00
Sam Hemelryk
8e5c23e04f blocks-navigation MDL-25596 Fixed up redundant AJAX calls when navigation was limited by config 2011-01-06 11:50:01 +08:00
Sam Hemelryk
48d8d09063 navigation MDL-25596 Improvements for the navigation blocks JS
The biggest change is that the navigation block has been converted to a proper YUI module.
The following are the other changes made at the same time:
 * A loading icon is displayed when a branch is being loaded by AJAX.
 * Fixed a bug where you could trigger multiple AJAX requests by rapidly clicking an unloaded branch.
 * Fixed a bug where empty branches weren't being marked as such after a successful AJAX load.
 * When docked the width of the blocks dock panel is now inspected an increased if required to try avoid horizontal scrolling.
 * Removed the no longer needed inclusion of the YUI2 dom library from the navigation and settings block.
 * Expandable nodes are now passed as JS data allowing the navigation JS to be initialised through block_navigation::get_required_javascript.
 * AJAX is now focused around the branch in question rather than the tree in general.
 * Expansion of branches is now delegated to the tree rather than being an individual event on all branches.
 * Tidied up the code in general removing unneeded-unused parameters.
2010-12-23 11:21:07 +08:00