mirror of
https://github.com/moodle/moodle.git
synced 2025-03-06 16:59:56 +01:00
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.
49 lines
3.1 KiB
CSS
49 lines
3.1 KiB
CSS
/** General display rules **/
|
|
.block_navigation .block_tree {margin:5px;padding-left:0px;overflow:visible;}
|
|
.block_navigation .block_tree li {margin:3px;list-style: none;padding:0;}
|
|
.block_navigation .block_tree li.item_with_icon > p {position:relative;}
|
|
.block_navigation .block_tree li.item_with_icon > p img {vertical-align:middle;position:absolute;left:0;top:3px}
|
|
|
|
.block_navigation .block_tree li ul {padding-left:0;margin:0;}
|
|
.block_navigation .block_tree li.depth_2 ul {padding-left:16px;margin:0;}
|
|
.block_navigation .block_tree .tree_item {padding-left: 18px;margin:3px 0px;text-align:left;}
|
|
|
|
.block_navigation .block_tree .tree_item.branch {background-image: url([[pix:t/expanded]]);background-position: 0 10%;background-repeat: no-repeat;}
|
|
.block_navigation .block_tree .tree_item.branch.navigation_node {background-image:none;padding-left:0;}
|
|
.block_navigation .block_tree .type_activity > .tree_item.branch {background-image:none;position:relative;}
|
|
.block_navigation .block_tree .type_activity > .tree_item.branch img {position:absolute;left:0;}
|
|
.block_navigation .block_tree .root_node.leaf {padding-left:0px;}
|
|
.block_navigation .block_tree .active_tree_node {font-weight:bold;}
|
|
.block_navigation .block_tree .depth_1.current_branch ul {font-weight:normal;}
|
|
|
|
.dock .block_navigation .tree_item {white-space: nowrap;}
|
|
|
|
.jsenabled .block_navigation .block_tree .tree_item.branch {cursor:pointer;}
|
|
.jsenabled .block_navigation .block_tree .tree_item.emptybranch {background-image: url([[pix:t/collapsed_empty]]);background-position: 0% 5%;background-repeat: no-repeat;}
|
|
.jsenabled .block_navigation .block_tree .collapsed ul {display: none;}
|
|
.jsenabled .block_navigation .block_tree .collapsed .tree_item.branch {background-image: url([[pix:t/collapsed]]);}
|
|
.jsenabled .block_navigation .block_tree .tree_item.branch.loadingbranch {background-image:url([[pix:i/loading_small]]);}
|
|
|
|
/** JavaScript state rules **/
|
|
.jsenabled .block_navigation.dock_on_load,
|
|
.block_navigation .block_tree_box .requiresjs {display:none;}
|
|
.jsenabled .block_navigation .block_tree_box .requiresjs {display:inline;}
|
|
|
|
/** Internet explorer specific rules **/
|
|
.ie6 .block_navigation .block_tree .tree_item {width:100%;}
|
|
|
|
/** Overide for RTL layout **/
|
|
.dir-rtl .block_navigation .block_tree {padding-right:0px;}
|
|
.dir-rtl .block_navigation .block_tree li.item_with_icon > p img {right:0;}
|
|
|
|
.dir-rtl .block_navigation .block_tree li ul {padding-right:0;}
|
|
.dir-rtl .block_navigation .block_tree li.depth_2 ul {padding-right:16px;}
|
|
.dir-rtl .block_navigation .block_tree .tree_item {padding-right: 18px;text-align:right;}
|
|
|
|
.dir-rtl .block_navigation .block_tree .tree_item.branch {background-position: center right;}
|
|
.dir-rtl .block_navigation .block_tree .navigation_node.tree_item.branch {padding-right:0;}
|
|
.dir-rtl .block_navigation .block_tree .root_node.leaf {padding-right:0px;}
|
|
|
|
.jsenabled.dir-rtl .block_navigation .block_tree .tree_item.emptybranch {background-image: url([[pix:t/collapsed_empty_rtl]]);background-position: center right;}
|
|
.jsenabled.dir-rtl .block_navigation .block_tree .collapsed .tree_item.branch {background-image: url([[pix:t/collapsed_rtl]]);}
|