From 7f812a8e196887a7333fd349c11485b021026601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?"J.=20Rene=CC=81e=20Beach"?= Date: Wed, 24 Oct 2012 14:27:01 -0400 Subject: [PATCH] Issue #1137920: Toolbar completely broken for small screen sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit e44c8f97ab4b409a917e761a255db712260342d6 Author: J. Renée Beach Date: Wed Oct 24 14:26:01 2012 -0400 Temp committing matchMedia.js Signed-off-by: J. Renée Beach commit 733774825de77023dd1fa9017ecd78a7c1468ef2 Author: J. Renée Beach Date: Tue Oct 23 12:13:26 2012 -0400 Issue #1137920 by jessebeach: Sped up animations. Tried to stop ellipsis of first level menu items in the horizontal orientation. Committed a very !important sin. Signed-off-by: J. Renée Beach commit 7c054a10a984543bfdf28ec43ff9d4bbb10afd8a Author: J. Renée Beach Date: Tue Oct 23 11:50:26 2012 -0400 Issue #1137920 by jessebeach: I sped up the animations. Signed-off-by: J. Renée Beach commit 484aa1879c70a9fe4df92284261b3fb42604d38d Author: J. Renée Beach Date: Tue Oct 23 01:13:19 2012 -0400 Issue #1137920 by jessebeach: Fixed broken first level icons. Signed-off-by: J. Renée Beach commit 47cef82b1bc0ecaea477b7193fb7240c8cfe871c Author: J. Renée Beach Date: Tue Oct 23 00:20:02 2012 -0400 Issue #1137920 by jessebeach: Fixed shortcuts. Well, brought them back. Not quite fixed yet. Signed-off-by: J. Renée Beach commit 6f1539c08b3c58d7c37de0220dcd0769236b2a66 Author: J. Renée Beach Date: Mon Oct 22 23:29:09 2012 -0400 Issue #1137920 by jessebeach: Horizontal menu expansion happens in stages. Level 1, then subsequent levels. Signed-off-by: J. Renée Beach commit 9ba64f17269298828bf9629ac6c485af1c4e2a21 Author: J. Renée Beach Date: Mon Oct 22 21:56:21 2012 -0400 Issue #1137920 by jessebeach: Further cleanup of the vertical and horizontal trays. Signed-off-by: J. Renée Beach commit abce01bd55529014af032c0ef522f63dfe1cb734 Author: J. Renée Beach Date: Mon Oct 22 16:02:24 2012 -0400 Issue #1137920 by jessebeach: The horizontal menu puzzle is at least cracked. Signed-off-by: J. Renée Beach commit 4544b61fded34d30f2fd9e5a9710cf5dc6d4b5e4 Author: J. Renée Beach Date: Mon Oct 22 13:52:36 2012 -0400 Issue #1137920 by jessebeach: Cleaning up the decorator pattern for rendering menus. Signed-off-by: J. Renée Beach commit 1afd9039355a1402e85ed0012a3d9a6803e79e52 Author: J. Renée Beach Date: Mon Oct 22 10:50:28 2012 -0400 Issue #1137920 by jessebeach: Distilling the essence of horizontal and vertical menus into a common set of styles and markup. Signed-off-by: J. Renée Beach commit 9fab357333b0aeac301cafff9e70bf11e756c885 Author: J. Renée Beach Date: Mon Oct 22 01:48:03 2012 -0400 Issue #1137920 by jessebeach: switching between vertical and horizontal tray builds. Signed-off-by: J. Renée Beach commit c26b023c3de11e59a1af1f8ca41219e6adc498bc Author: J. Renée Beach Date: Mon Oct 22 01:21:14 2012 -0400 Issue #1137920 by jessebeach: Only show icons if JavaScript is enabled. Signed-off-by: J. Renée Beach commit 21a2a219539e38dd0f92ab453e6c35ef59c79753 Author: J. Renée Beach Date: Mon Oct 22 01:12:19 2012 -0400 Issue #1137920 by jessebeach: cleaned up the events on the VerticalTray. Signed-off-by: J. Renée Beach commit 0c293f1289e5ca16e6b11f1920a16071a0dbe9ff Author: J. Renée Beach Date: Mon Oct 22 00:48:04 2012 -0400 Issue #1137920 by jessebeach: further teasing apart ToolBar from VerticalTray. Signed-off-by: J. Renée Beach commit 17ce92ffad4b82c37f45a4f5da27775e406776d7 Author: J. Renée Beach Date: Sun Oct 21 22:32:57 2012 -0400 Issue #1137920 by jessebeach: Fixed icons after breaking them a few commits back. Signed-off-by: J. Renée Beach commit 9bd56827ca92d13fbf7058e4bd0c1fe1dd1594fe Author: J. Renée Beach Date: Fri Oct 19 19:38:29 2012 -0400 Issue #1137920 by jessbeach: reinstated the vertical tray rendering. Stills needs a lot of refactoring to let it render without so many assumptions. Signed-off-by: J. Renée Beach commit d6846f5d6c3d6ac0840e94cbfdc418b143abf5fa Author: J. Renée Beach Date: Fri Oct 19 18:59:28 2012 -0400 Issue #1137920 by jessebeach: The trigger to switch between vertical horizontal now works. Signed-off-by: J. Renée Beach commit df0f6bea5b7e700e93cb95a4d389c982f907f0c1 Author: J. Renée Beach Date: Fri Oct 19 11:52:02 2012 -0400 Issue #1137920 by jessebeach: Remove reference to the mediaquerygroup library and reference the matchMedia library directly. Signed-off-by: J. Renée Beach commit 21aa22e0fceae20566ad72d709a55eb1f3a5081b Author: J. Renée Beach Date: Thu Oct 18 16:14:20 2012 -0400 Added the basic trigger between the vertical and horizontal presentation of the trays.
 Signed-off-by: J. Renée Beach commit bf30da6645c73295df19d937e6d7c9941970a0b3 Author: J. Renée Beach Date: Thu Oct 18 16:05:00 2012 -0400 Removed .clearfix from the #toolbar element in toolbar.tpl.php Signed-off-by: J. Renée Beach commit b50f24cd1d99f949f319a191856d218430e80b0f Author: J. Renée Beach Date: Thu Oct 18 16:00:56 2012 -0400 Refactored .toolbar-menu to .menu-site Signed-off-by: J. Renée Beach commit 15804644f69c09747d305749a7dd27b03860ef8b Author: J. Renée Beach Date: Thu Oct 18 16:00:27 2012 -0400 Refactored .toolbar-shortcuts to .menu-shortcuts Signed-off-by: J. Renée Beach commit 0bcc948df06d8110496bc0058bdf17dacf9c35e0 Author: J. Renée Beach Date: Thu Oct 18 15:51:46 2012 -0400 Refactored .toolbar-tray to .tray Signed-off-by: J. Renée Beach commit c9cb0669a74c0807a2e387880d90082df490cc75 Author: J. Renée Beach Date: Thu Oct 18 15:51:12 2012 -0400 Added stub code for the HorizontalTray Signed-off-by: J. Renée Beach commit b5aea6e62725b299b080b3522401e0e9a1d62c9c Author: J. Renée Beach Date: Thu Oct 18 15:48:54 2012 -0400 Replaced .toolbar-bar with .bar Signed-off-by: J. Renée Beach commit 5db1a145c46368c967f20848e68dd49855316a03 Author: J. Renée Beach Date: Thu Oct 18 15:46:24 2012 -0400 Added a toolbar-main class. Replaced all instances of #toolbar with .toolbar-main Signed-off-by: J. Renée Beach commit 648a35c8388a0f9b8d38f6d5119e5fcd40b135b3 Author: J. Renée Beach Date: Thu Oct 18 15:17:04 2012 -0400 Added a scoping .icons class to the toolbar wrapper. Signed-off-by: J. Renée Beach commit c1516f0da1433e1e55eec964767ada89d2f7ed29 Author: J. Renée Beach Date: Thu Oct 18 15:07:22 2012 -0400 Issue #1137920 by jessebeach: refactored TraySlider to VerticalTray. Signed-off-by: J. Renée Beach commit 9efde6fde1ab1781e11ae58571c69fa2af076515 Author: J. Renée Beach Date: Thu Oct 18 11:08:24 2012 -0400 Issue #1137920 by jessebeach: renamed mediaquery library referenced in toolbar.module to mediaquerygroup. Signed-off-by: J. Renée Beach commit 0476ba907b86ba1873d8df23a91a0a5223b8aafd Author: J. Renée Beach Date: Thu Oct 18 11:04:13 2012 -0400 Issue #1137920 by jessebeach: Removed matchMedia and mediaquery.js reference and code. That code was moved to node/1815602 as its own patch. Signed-off-by: J. Renée Beach commit 6a00e6d979484206537599ff8c440c7262e92aca Author: J. Renée Beach Date: Wed Oct 17 14:18:15 2012 -0400 Issue #1137920 by jessebeach: Removed the dependency on jQuery from the MediaQueryGroup object. Signed-off-by: J. Renée Beach commit 013c94a8e7c021bb38be92d882cf50f19f0f98fa Author: J. Renée Beach Date: Tue Oct 16 21:38:41 2012 -0400 Issue #1137920 by jessebeach: Finished the first draft of the MediaQueryGroup object. Signed-off-by: J. Renée Beach commit 26c5c270a908ae04e95f9d27bcfa8c7ec0172050 Author: J. Renée Beach Date: Tue Oct 16 19:39:32 2012 -0400 Issue #1137920 by jessebeach: Pulled the matchMedia polyfill out into its own file. Signed-off-by: J. Renée Beach commit a93464222b60d49edfef55c708d7dcb0f57d5f93 Author: J. Renée Beach Date: Tue Oct 16 18:26:06 2012 -0400 Issue #1137920 by jessebeach: Added the media query library. Configured breakpoints can now be associated with callbacks. Still working on the details. This is a work-in-progress commit. Signed-off-by: J. Renée Beach commit 08cb09618e9271cda27bbe155ccd448aed038f90 Author: J. Renée Beach Date: Thu Oct 4 20:51:02 2012 -0400 Close open item siblings when opening an item. Signed-off-by: J. Renée Beach commit 0ca5f479ca77e333545a0cfad0d2af003830c382 Author: J. Renée Beach Date: Thu Oct 4 17:31:51 2012 -0400 Incorporating style changes from Kevin. Signed-off-by: J. Renée Beach commit 822e3e53e5fb70cdca2c20a9f41f62434ab51310 Author: J. Renée Beach Date: Thu Oct 4 00:47:09 2012 -0400 Mispelled leve as level Signed-off-by: J. Renée Beach commit dd09bf56c153b3b87e56b2a9f6bf334417b28364 Author: J. Renée Beach Date: Thu Oct 4 00:45:25 2012 -0400 Reduced the background size for handles level 2 and below. Signed-off-by: J. Renée Beach commit e7f733147b0e627994a04c72d78e6105510f5025 Author: J. Renée Beach Date: Thu Oct 4 00:39:00 2012 -0400 Set background size of the handles to 2em. Signed-off-by: J. Renée Beach commit 46416ea7330a8659b8d595e0aa8c54d96e28a27a Author: J. Renée Beach Date: Thu Oct 4 00:26:59 2012 -0400 Ported navbar style updates to icons to the Toolbar. added a space between properties and values in the media queries. Signed-off-by: J. Renée Beach commit 0c1c9b1075649be679099f4906491edd1edb1544 Author: J. Renée Beach Date: Mon Oct 1 19:21:50 2012 -0400 Removed toolbar.png Signed-off-by: J. Renée Beach commit 122bb9b7a7bb973722c38220de3dbecbe88310d0 Author: J. Renée Beach Date: Mon Oct 1 19:09:27 2012 -0400 Fixed the fleximenu handle CSS and the font sizing. Font sizes will still need work. Signed-off-by: J. Renée Beach commit 0cf3af17d9991247a0c5fa9b5f54a0404a08b35e Author: J. Renée Beach Date: Mon Oct 1 18:26:04 2012 -0400 Extended all -webkit vendor prefixed properties to included other vendors and the standards property as well. Signed-off-by: J. Renée Beach commit 2b83c8bfba4eb41d7d8f74a931e82d8ea7d0bae8 Author: J. Renée Beach Date: Mon Oct 1 17:52:33 2012 -0400 Toolbar bar is now stretching nicely from very small to very large. Signed-off-by: J. Renée Beach commit 7638e69eddfd31a0838b2bcf8e96499f5602bd15 Author: J. Renée Beach Date: Mon Oct 1 16:32:54 2012 -0400 Removed the jump-to search box. This is being worked in issue #1781422. Cleaned up the toolbar.tpl file. Removed a dependency on the ui.accordion and ui.position. Signed-off-by: J. Renée Beach commit 02d51f41b143cd720a75c5abf88c36a717f43a03 Author: J. Renée Beach Date: Fri Sep 28 15:23:27 2012 -0400 Reduced the specificity of a toolbar tray selector. Signed-off-by: J. Renée Beach commit 3aa705d11899f1b87c8eb8987a21b1278b5667aa Author: J. Renée Beach Date: Wed Sep 19 18:33:20 2012 -0400 Issue #1137920 by jessebeach: Adjusted toolbar.base.css and toolbar.theme.css based on the most current dropbutton patch. Signed-off-by: J. Renée Beach commit cf93fe8d35ab2c8ae0038382c4264f0995a12773 Author: J. Renée Beach Date: Sun Sep 16 19:33:52 2012 -0400 Issue #1137920 by jessebeach: Finished styling the toolbar dropbuttons. Signed-off-by: J. Renée Beach commit 2729a641750d43169a6a49fd0f076aa0c9c59143 Author: J. Renée Beach Date: Sun Sep 16 19:04:33 2012 -0400 Issue #1137920 by jessebeach: Styled the dropbuttons. Added 1/3 width sections to the toolbar-bar to layout the different action buttons evenly. Signed-off-by: J. Renée Beach commit b9f5dcc2b1c19426bc8c4c82f088018d01e4f34d Author: J. Renée Beach Date: Sun Sep 16 18:33:42 2012 -0400 Issue #1137920 by jessebeach: Refactored the toolbar.tpl.php file. Fixed heading text. Signed-off-by: J. Renée Beach commit 56b4100177b02dd426bf51ef520a58dd1dfd15e7 Author: J. Renée Beach Date: Sun Sep 16 17:23:08 2012 -0400 Issue #1137920 by jessebeach: Added local action links to the toolbar. Themed them as links, which required translation the render array returned by menu_local_actions to a structure that theme_links expects. Signed-off-by: J. Renée Beach commit 1e78c46f3b2315231c48fbdf604aba2e79fef982 Author: J. Renée Beach Date: Wed Sep 12 17:32:57 2012 -0400 Issue #1782576 by jessebeach: Had to add a clear to the #edit-shortcuts links. And it seems I forgot to save this file with changes before committing the last set changes. Signed-off-by: J. Renée Beach commit 00ea722e13492f9942326b875d4c234d47ad344f Author: J. Renée Beach Date: Wed Sep 12 17:20:50 2012 -0400 Issue #1782576 by jessebeach: Reinstated shortcuts in the toolbar tray. Signed-off-by: J. Renée Beach commit ca7b2df0cfca2fdf7e9e451ccf0ce4f3a6bae286 Author: J. Renée Beach Date: Wed Sep 12 12:59:33 2012 -0400 Issue #1782576 by jessebeach: Removed all code mentions to the toolbar drawer in toolbar.module. We will still need to update the help text. Signed-off-by: J. Renée Beach commit 3a286795548cb2e02bb88cc87465b471312de90c Author: J. Renée Beach Date: Wed Sep 12 12:34:29 2012 -0400 Issue #1137920 by jessebeach: Refactored the toolbar.js so that it follows the current Drupal JavaScript patterns. Signed-off-by: J. Renée Beach commit 841f1bffef29e676cff5d232cc2977f364ce681c Author: J. Renée Beach Date: Mon Sep 10 23:03:24 2012 -0400 Issue #1137920 by jessebeach: Eliminated all traces of flexiPanda. Signed-off-by: J. Renée Beach commit 01e8d99ab3300d4399614eb58393064a048a7eb6 Author: J. Renée Beach Date: Mon Sep 10 20:08:21 2012 -0400 Issue #1137920 by jessebeach: Fixed the styling of the list and items after removing the flexiPanda plugin. Signed-off-by: J. Renée Beach commit b457f7773f729f086007fdf845f5b221ade48357 Author: J. Renée Beach Date: Mon Sep 10 16:24:32 2012 -0400 Issue #1137920 by jessebeach: Updated the base CSS of the tray. It's not perfect yet, but it's getting there. Signed-off-by: J. Renée Beach commit 9ddc78cb697fbc92fbcc957d3b3dffc1ceb11525 Author: J. Renée Beach Date: Mon Sep 10 11:21:49 2012 -0400 Issue #1137920 by jessebeach: Removed the flexiPanda plugin. Ported the relevant functionality over to toolbar.js Signed-off-by: J. Renée Beach commit 69c6191533985854786940a8a74a9e17f287844a Author: J. Renée Beach Date: Sun Sep 9 23:26:58 2012 -0400 Issue #1137920 by jessebeach: Refactored toolbar.js to use the $.extend() pattern for object prototypes. Signed-off-by: J. Renée Beach commit c9d64fb54b37be229fa926cd9e53d8449e791a19 Author: J. Renée Beach Date: Sun Sep 9 23:12:32 2012 -0400 Issue #1137920 by jessebeach: Moved the .addClass of positioned to the init method rather than the displace method for the $tray. Signed-off-by: J. Renée Beach commit c8d467929c498e076cedff4d7ab065ef5346249e Author: J. Renée Beach Date: Sun Sep 9 23:02:03 2012 -0400 Issue #1137920 by jessebeach: The toolbar tray is now positioned by JavaScript using the jQuery UI position method. The fallback for no JS is to display the menu at the bottom of the screen, full page width. Signed-off-by: J. Renée Beach commit d3037b266f7dc701b5667525fd2dfa8a601cdb4f Author: J. Renée Beach Date: Sat Sep 8 14:33:56 2012 -0400 Issue #1137920 by jessebeach: Moved the flexiPanda accordion styles from toolbar.theme.css to toolbar.accordion.css. Signed-off-by: J. Renée Beach commit d9e55c6b5eb6c68dfccb8ebc4ef7d4d59499994f Author: J. Renée Beach Date: Fri Sep 7 20:35:51 2012 -0400 Issue #1137920 by jessebeach: Getting closer to Kevin's designs for the menu. Signed-off-by: J. Renée Beach commit 62f6a2470f7eb5b5e65310dd9c78fb63689104bd Author: J. Renée Beach Date: Fri Sep 7 18:49:49 2012 -0400 Issue #1137920 by jessebeach: slight adjustment to the icon spacing and sizing. Signed-off-by: J. Renée Beach commit 9a17ef4212937e31ea33d8eae12d2b1e842b841f Author: J. Renée Beach Date: Fri Sep 7 11:26:05 2012 -0400 Issue #1137920 by jessebeach: resized the toolbar tray down to a more appealing, smaller width. Signed-off-by: J. Renée Beach commit 8ffb93e08bb5a03e4d1f637fea2726e6a4efd574 Author: J. Renée Beach Date: Fri Sep 7 11:25:25 2012 -0400 Issue #1137920 by jessebeach: Fixed the offset top recalculation on screen resize. Signed-off-by: J. Renée Beach commit 70e9a0e0ef5218eabdefbb395ea54f8fdd518559 Author: J. Renée Beach Date: Thu Sep 6 16:42:27 2012 -0400 Issue #1137920 by jessebeach: Added icons to the second level menu items. The method is not ideal yet, but I wanted to get the icons in sooner rather than later. I'll have to change the selectors later once the folder directory twisties are updated. Signed-off-by: J. Renée Beach commit 1d60327010023caeccd6a9f23ca47864095f073e Author: J. Renée Beach Date: Thu Sep 6 15:07:11 2012 -0400 Issue #1137920 by jessebeach: Varied the strategy for the two types of toolbar overlay - page overlay and page push. Signed-off-by: J. Renée Beach commit fe612afba51ab922bb806185c64b0080cdf57435 Author: J. Renée Beach Date: Thu Sep 6 12:08:19 2012 -0400 Issue #1137920 by jessebeach: The menu slider now works purely from CSS. Signed-off-by: J. Renée Beach commit eccedfd9606e6a0de42348739498dd67b74d8f13 Author: J. Renée Beach Date: Thu Sep 6 11:08:25 2012 -0400 Issue #1137920 by jessebeach: Moving closer to Kevin's designs. Built out the tabs in the navbar. Signed-off-by: J. Renée Beach commit 52ecdc7b502def270a93e5c1062d56c783a78199 Author: J. Renée Beach Date: Wed Sep 5 17:06:49 2012 -0400 Issue #1137920 by jessebeach: Removed the toolbar drawer collapsed logic and styling. Moved the toolbar tray trigger link into the toolbar_home links and renamed toolbar_home to toolbar_actions. Signed-off-by: J. Renée Beach commit 7fb064ffbc8c1bb8156d1c2f9d185275129b0d0f Author: J. Renée Beach Date: Wed Sep 5 16:20:45 2012 -0400 Issue #1137920 by jessebeach: Refactored the tray interactions to an event-driven model, looking forward to a time when these interactions will be more pluggable. Signed-off-by: J. Renée Beach commit f2656888b7693c9df837b6a0030fb6622f9a1ef9 Author: J. Renée Beach Date: Wed Sep 5 15:23:47 2012 -0400 Issue #1137920 by jessebeach: added a named anchor to the toolbar-tray. Added an anchor fragment to the link that opens the tray. Added role="button" to the toolbar tray toggle link. Signed-off-by: J. Renée Beach commit 02a440a04a1e8ef521a7293e949e7323a2778063 Author: J. Renée Beach Date: Tue Sep 4 14:39:46 2012 -0400 Issue #1137920 by jessebeach: prototyped the accordion-style menu interaction. Signed-off-by: J. Renée Beach commit 3d0cb63b651e1eaf6c86d075118e88afd199883c Author: J. Renée Beach Date: Tue Sep 4 13:43:35 2012 -0400 Issue #1137920 by jessebeach: Eliminated whitespace from the flexiPanda file. Signed-off-by: J. Renée Beach commit 18e5baa6d343e61d293ba1fd1d84efaa9a3ab63e Author: J. Renée Beach Date: Mon Sep 3 23:34:55 2012 -0400 Issue #1137920 by jessebeach: Patched up the flexiPanda plugin enough to post the changes to the issue queue. Signed-off-by: J. Renée Beach commit 9a0115be63cf0438e8d31922d8c264920781806d Author: J. Renée Beach Date: Sat Sep 1 17:15:27 2012 -0400 Issue #1137920 by jessebeach: The basics of the flexiPanda plugin are in place. Signed-off-by: J. Renée Beach commit d4688bfff3916c56f885d091fb6312dd6b9d29da Author: J. Renée Beach Date: Sat Sep 1 16:44:33 2012 -0400 Issue #1137920 by jessebeach: The main menu now prints all of the links under the menu, not just the second level links. Signed-off-by: J. Renée Beach commit 59542707159161773103458bff4e87ec113d7523 Author: J. Renée Beach Date: Fri Aug 31 16:18:19 2012 -0400 Issue #1137920 by jessebeach: Further adjustments to the side tray CSS. Signed-off-by: J. Renée Beach commit 187d6becaf50f980af3dfe83400614d7bbd58eef Author: J. Renée Beach Date: Fri Aug 31 15:55:07 2012 -0400 Issue #1137920 by jessebeach: Further refinements to the CSS for the side tray. Signed-off-by: J. Renée Beach commit a36e38fb71de94098f4983af3bfb7aedb42cd7f2 Author: J. Renée Beach Date: Fri Aug 31 13:58:23 2012 -0400 Issue #1137920 by jessebeach: Removed references to attached CSS from the hook_view. These attachments are now made in hook_library_info in the module. Signed-off-by: J. Renée Beach commit 57a4610289e4836036a066b453ab9abc15e1e379 Author: J. Renée Beach Date: Fri Aug 31 10:31:52 2012 -0400 Issue #1137920 by jessebeach: Renamed toolbar.admin.css to toolbar.base.css. Signed-off-by: J. Renée Beach commit 31351980776bde14d26702f4b3a51c540a67ced3 Author: J. Renée Beach Date: Fri Aug 31 10:30:46 2012 -0400 Issue #1137920 by jessebeach: Removed styling from the shortcut module that targets the Toolbar module. Signed-off-by: J. Renée Beach commit dffc180ab1ea24ee72d419662bb15097047399a0 Author: J. Renée Beach Date: Fri Aug 31 10:27:57 2012 -0400 Issue #1137920 by jessebeach: I messed up the position of the toolbar-bar. Fixed it. Signed-off-by: J. Renée Beach commit 6890b53d37760e9978db6ebab973d6b2dcc68caf Author: J. Renée Beach Date: Fri Aug 31 10:19:55 2012 -0400 Issue #1137920 by jessebeach: Shortcuts are now integrated into the side tray. Signed-off-by: J. Renée Beach commit 8a275bf2b9eed9f0bf9120aeba4b3f0d17bdbee4 Author: J. Renée Beach Date: Thu Aug 30 16:15:51 2012 -0400 Issue #1137920 by jessebeach: removed drop shadows from the toolbar and tray. Signed-off-by: J. Renée Beach commit 961d2b0d4ede1e26bea4c063acd3518ff7a16bdd Author: J. Renée Beach Date: Thu Aug 30 14:17:57 2012 -0400 Issue #1137920 by jessebeach: Experimenting with placing the toolbar in page_top or page_bottom. Going with page_bottom for now. Signed-off-by: J. Renée Beach commit 094badf18a0ebbf95720298d3a0da3dcb1e12e31 Author: J. Renée Beach Date: Thu Aug 30 14:05:44 2012 -0400 Issue #1137920 by jessebeach: Split the Toolbar CSS out into admin and theme. Removed Toolbar-targeted styling from the Shortcut module. Signed-off-by: J. Renée Beach commit 1fded487f3f6013c946fae0d6d7c8d1d06e00d7e Author: J. Renée Beach Date: Thu Aug 30 11:18:09 2012 -0400 Issue #1137920 by jessebeach: Toolbar was moved from page_top to page_bottom. Updating the Shortcut module to reflect this. Signed-off-by: J. Renée Beach commit ec1304833499c0533e434f134df9842caa0e1a13 Author: J. Renée Beach Date: Thu Aug 30 10:19:11 2012 -0400 Issue #1137920 by jessebeach: Changed references to CSS and JS files to point to the new directories. Added CSS files for .admin.css and .theme.css. Signed-off-by: J. Renée Beach commit 0b14708357cbd71bcec7fddc5469d79d544a63c6 Author: J. Renée Beach Date: Thu Aug 30 10:17:37 2012 -0400 Issue #1137920 by jessebeach: Moved the toolbar from the page_top to the page_bottom region. Signed-off-by: J. Renée Beach commit ba9eb67ee4350732f2e2203db925b311cc09d6c4 Author: J. Renée Beach Date: Thu Aug 30 10:10:31 2012 -0400 Issue #1137920 by jessebeach: moved CSS and JS files to their own directory. Signed-off-by: J. Renée Beach commit 50643dca74f71f8001bf18037984404c9f523f4e Author: J. Renée Beach Date: Thu Aug 30 10:03:49 2012 -0400 Issue #1137920 by jessebeach: Changed padding to margin to create the gap for the side pull menu tray. Signed-off-by: J. Renée Beach commit 809cfc51c46acf48cae6b79fc42c4a334f2d5d8a Author: J. Renée Beach Date: Sun Aug 26 14:48:42 2012 -0400 Issue #1137920 by jessebeach: The admin tray now slides side to side. Signed-off-by: J. Renée Beach commit 13a79c629b96c42e7c2877b7386ef8b4ea13cc09 Author: J. Renée Beach Date: Sun Aug 26 14:00:07 2012 -0400 Issue 1137920 by jessebeach: Added a missing 'html' property to the options passed to theme_link that creates the menu tray button. Signed-off-by: J. Renée Beach commit cdeddad0338291132afd8fd870fb203cc36559bf Author: J. Renée Beach Date: Sun Aug 26 13:55:04 2012 -0400 Issue #1137920 by jessebeach: added a @todo to move the computeOffsetTop method in tableheader.js to drupal.js. Signed-off-by: J. Renée Beach commit 834df7724b948e571f9ab05b1c4effbe7e5d3bcd Author: J. Renée Beach Date: Sun Aug 26 13:54:25 2012 -0400 Issue #1137920 by jessebeach: The tray menu now positions itself correctly. Signed-off-by: J. Renée Beach commit 43a8306191e5c84bc326af7752c69528111eb4bd Author: J. Renée Beach Date: Sun Aug 26 13:25:26 2012 -0400 Issue #1137920 by jessebeach: The toolbar drawer toggling action has been refactored to sue the properties of the Toolbar object, not raw DOM queries. Signed-off-by: J. Renée Beach commit 01fe18c49ea17f9ee6a46f67627ab9ce1cb8873b Author: J. Renée Beach Date: Sun Aug 26 12:49:48 2012 +0200 Issue #1137920 by jessebeach: Refactored the toolbar.js file to use an object for the bar and tray of the toolbar instead of bare JS constructs. Signed-off-by: J. Renée Beach commit 89d1cd7f44f1ed8341924d93faf5426afc1afc03 Author: Kathryn Cornelius Date: Fri Aug 24 17:46:21 2012 +0200 Issue #1137920 by Kathryn531: Style updates to the existing toolbar commit 0150f56a29bebd204f971bc7379af824f45409d6 Author: Kathryn Cornelius Date: Fri Aug 24 17:43:03 2012 +0200 Issue #1137920 by Kathryn531: Sample look & feel of how the search filter will function (no submit button since updates happen on key events, sample close button included) commit 4ae068bb1fee2beb2a4e16b61dd12367c1f14d3d Author: J. Renée Beach Date: Fri Aug 24 16:43:11 2012 +0200 Issue #1137920 by jessebeach: side tray now toggles up and down. Precursor to the side sliding. Signed-off-by: J. Renée Beach commit 4a4963e15380aad8b8ae8f62ba7e3fac9429aa99 Author: J. Renée Beach Date: Fri Aug 24 16:24:45 2012 +0200 Issue #1137920 by jessebeach: Added a tray toggle. Signed-off-by: J. Renée Beach commit 614b6f75df125e463a7ed4546e04d6d7a6903a36 Author: Kathryn Cornelius Date: Fri Aug 24 15:35:48 2012 +0200 Issue #1137920 by Kathryn531: Added textfield and link to appear as a search button for the filtering component in the toolbar tray. commit df1c8eab4b88ac3dcc6c55dfa62bfc069181f87a Author: J. Renée Beach Date: Fri Aug 24 14:31:17 2012 +0200 Issue #11337920 by jessebeach: refactored the toolbar.js to use an object Drupal.ToolBar. Signed-off-by: J. Renée Beach commit 782f08007ffb694229e59207652bd5efd7b29b2a Author: Kathryn Cornelius Date: Fri Aug 24 14:05:02 2012 +0200 Issue #1137920 by Kathryn531: Scoping CSS selectors to maintain original styling when main menu links are shown in wide layouts, but apply unique styling when displayed via the new toolbar tray. commit 766688eb982d98d3ce58809003110bcb39cde3f9 Author: Kathryn Cornelius Date: Fri Aug 24 13:08:08 2012 +0200 Issue #1137920 by Kathryn531: Missed the template file. Adding it as well to previous commit. commit 4ad0700e3bdc17b3d2007b075fc14614e4cae86d Author: Kathryn Cornelius Date: Fri Aug 24 13:07:38 2012 +0200 Issue #1137920 by Kathryn531: Restructuring markup of toolbar so the toolbar-menu items appear below the main bar with Toggle, home, shortcuts, etc... commit 7d504a35965051c84a98b74db5ea3ced3f2eda48 Author: Kathryn Cornelius Date: Fri Aug 24 11:42:54 2012 +0200 Issue #1137920 by Kathryn531: Added a temporary placeholder link in the new toolbar menu for tray toggle Signed-off-by: J. Renée Beach --- core/misc/matchMedia.js | 139 +++++++ core/modules/shortcut/shortcut.base.css | 13 - core/modules/shortcut/shortcut.module | 8 +- core/modules/shortcut/shortcut.theme.css | 51 --- core/modules/system/system.module | 10 +- .../modules/toolbar/config/toolbar.breakpoints.yml | 1 + core/modules/toolbar/config/toolbar.config.yml | 2 + core/modules/toolbar/css/toolbar.base-rtl.css | 26 ++ core/modules/toolbar/css/toolbar.base.css | 317 ++++++++++++++ core/modules/toolbar/css/toolbar.theme-rtl.css | 7 + core/modules/toolbar/css/toolbar.theme.css | 440 ++++++++++++++++++++ core/modules/toolbar/js/toolbar.js | 425 +++++++++++++++++++ core/modules/toolbar/templates/toolbar.tpl.php | 37 +- core/modules/toolbar/toolbar-rtl.css | 37 -- core/modules/toolbar/toolbar.css | 129 ------ core/modules/toolbar/toolbar.info | 5 + core/modules/toolbar/toolbar.js | 115 ----- core/modules/toolbar/toolbar.module | 239 +++++------ core/modules/toolbar/toolbar.png | 4 - 19 files changed, 1495 insertions(+), 510 deletions(-) create mode 100644 core/misc/matchMedia.js create mode 100755 core/modules/toolbar/config/toolbar.breakpoints.yml create mode 100755 core/modules/toolbar/config/toolbar.config.yml create mode 100644 core/modules/toolbar/css/toolbar.base-rtl.css create mode 100644 core/modules/toolbar/css/toolbar.base.css create mode 100644 core/modules/toolbar/css/toolbar.theme-rtl.css create mode 100644 core/modules/toolbar/css/toolbar.theme.css create mode 100755 core/modules/toolbar/js/toolbar.js delete mode 100644 core/modules/toolbar/toolbar-rtl.css delete mode 100644 core/modules/toolbar/toolbar.css mode change 100644 => 100755 core/modules/toolbar/toolbar.info delete mode 100644 core/modules/toolbar/toolbar.js mode change 100644 => 100755 core/modules/toolbar/toolbar.module delete mode 100644 core/modules/toolbar/toolbar.png diff --git a/core/misc/matchMedia.js b/core/misc/matchMedia.js new file mode 100644 index 0000000..3a0807e --- /dev/null +++ b/core/misc/matchMedia.js @@ -0,0 +1,139 @@ +/** + * Polyfill the behavior of window.matchMedia. + * + * @see http://dev.w3.org/csswg/cssom-view/#widl-Window-matchMedia-MediaQueryList-DOMString-query + * + * Test whether a CSS media type or media query applies. Register listeners + * to MediaQueryList objects. + * + * Adapted from https://github.com/paulirish/matchMedia.js with the addition + * of addListener and removeListener. The polyfill referenced above uses + * polling to trigger registered listeners on matchMedia tests. + * This polyfill triggers tests on window resize and orientationchange. + */ + +window.matchMedia = window.matchMedia || (function (doc) { + + "use strict"; + + var docElem = doc.documentElement; + var refNode = docElem.firstElementChild || docElem.firstChild; + // fakeBody required for + var fakeBody = doc.createElement( "body" ); + var div = doc.createElement( "div" ); + + div.id = "mq-test-1"; + div.style.cssText = "position:absolute;top:-100em"; + fakeBody.style.background = "none"; + fakeBody.appendChild(div); + // Ensure addEventListener and removeEventListener are defined. + window.addEventListener = window.addEventListener || window.attachEvent || function () {}; + window.removeEventListener = window.removeEventListener || window.detachEvent || function () {}; + /** + * A replacement for the native MediaQueryList object. + * + * @param {String} q + * A media query e.g. "screen" or "screen and (min-width: 28em)". + */ + function MediaQueryList (q) { + this.media = q; + this.matches = false; + this.check.call(this); + } + /** + * Polyfill the addListener and removeListener methods. + */ + MediaQueryList.prototype = { + listeners: [], + /** + * Perform the media query application check. + */ + check: function () { + var isApplied; + div.innerHTML = "­"; + docElem.insertBefore( fakeBody, refNode ); + isApplied = div.offsetWidth === 42; + docElem.removeChild( fakeBody ); + this.matches = isApplied; + }, + /** + * Polyfill the addListener method of the MediaQueryList object. + * + * @param {Function} callback + * The callback to be invoked on screen resize or orientationchange. + * + * @return {Object MediaQueryList} + * A MediaQueryList object that indicates whether the registered media + * query applies to the current screen dimenions and orientation. The + * matches property is true when the media query applies and false when + * not. The original media query is referenced in the media property. + */ + addListener: function (callback) { + var handler = (function (mql, debounced) { + return function () { + var self = mql; + var cb = debounced; + self.check(); + cb.call(self, self); + }; + }(this, debounce(callback, 250))); + this.listeners.push({ + 'callback': callback, + 'handler': handler + }); + window.addEventListener('resize', handler); + window.addEventListener('orientationchange', handler); + }, + /** + * Polyfill the removeListener method of the MediaQueryList object. + * + * @param {Function} callback + * The callback to be removed from the set of listeners. + */ + removeListener: function (callback) { + for (var i = 0, listeners = this.listeners; i < listeners.length; i++) { + if (listeners[i].callback === callback) { + window.removeEventListener('resize', listeners[i].handler); + window.removeEventListener('orientationchange', listeners[i].handler); + listeners.splice(i, 1); + } + } + } + }; + /** + * Limits the invocations of a function in a given time frame. + * + * @param {Function} callback + * The function to be invoked. + * + * @param {Number} wait + * The time period within which the callback function should only be + * invoked once. For example if the wait period is 250ms, then the callback + * will only be called at most 4 times per second. + */ + function debounce (callback, wait) { + var timeout, result; + return function () { + var context = this; + var args = arguments; + var later = function () { + timeout = null; + result = callback.apply(context, args); + }; + window.clearTimeout(timeout); + timeout = window.setTimeout(later, wait); + return result; + }; + } + /** + * Return a MediaQueryList. + * + * @param {String} q + * A media query e.g. "screen" or "screen and (min-width: 28em)". The media + * query is checked for applicability before the object is returned. + */ + return function (q) { + // Build a new MediaQueryList object with the result of the check. + return new MediaQueryList(q); + }; +}(document)); diff --git a/core/modules/shortcut/shortcut.base.css b/core/modules/shortcut/shortcut.base.css index 90a1046..5af1151 100644 --- a/core/modules/shortcut/shortcut.base.css +++ b/core/modules/shortcut/shortcut.base.css @@ -5,19 +5,6 @@ */ /** - * Toolbar. - */ -#edit-shortcuts { - float: right; /* LTR */ -} -#shortcut-toolbar ul { - float: left; /* LTR */ -} -#shortcut-toolbar .icon { - float: left; /* LTR */ -} - -/** * Add/remove links. */ .add-or-remove-shortcuts .icon { diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 9bbb12a..840a68b 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -716,10 +716,10 @@ function shortcut_preprocess_page(&$variables) { * Implements hook_page_alter(). */ function shortcut_page_alter(&$page) { - if (isset($page['page_top']['toolbar'])) { + if (isset($page['page_bottom']['toolbar'])) { // If the toolbar is available, add a pre-render function to display the // current shortcuts in the toolbar drawer. - $page['page_top']['toolbar']['#pre_render'][] = 'shortcut_toolbar_pre_render'; + $page['page_bottom']['toolbar']['#pre_render'][] = 'shortcut_toolbar_pre_render'; } } @@ -734,8 +734,6 @@ function shortcut_toolbar_pre_render($toolbar) { drupal_get_path('module', 'shortcut') . '/shortcut.theme.css', ), ); - $links['#prefix'] = '
'; - $links['#suffix'] = '
'; $shortcut_set = shortcut_current_displayed_set(); $configure_link = NULL; if (shortcut_set_edit_access($shortcut_set)) { @@ -752,7 +750,7 @@ function shortcut_toolbar_pre_render($toolbar) { 'configure' => $configure_link, ); - $toolbar['toolbar_drawer'][] = $drawer; + $toolbar['toolbar_shortcuts'][] = $drawer; return $toolbar; } diff --git a/core/modules/shortcut/shortcut.theme.css b/core/modules/shortcut/shortcut.theme.css index 9e2dc69..930f466 100644 --- a/core/modules/shortcut/shortcut.theme.css +++ b/core/modules/shortcut/shortcut.theme.css @@ -5,45 +5,6 @@ */ /** - * Toolbar. - */ -.toolbar #edit-shortcuts { - line-height: 24px; - padding: 5px 10px; -} -#edit-shortcuts:focus, -#edit-shortcuts:hover, -#edit-shortcuts.active { - text-decoration: underline; -} -#shortcut-toolbar ul { - line-height: 24px; - margin-left: 5px; /* LTR */ - padding: 5px 0; -} -#shortcut-toolbar a { - border-radius: 5px; - margin-right: 5px; /* LTR */ - padding: 0 5px; -} -#shortcut-toolbar a:focus, -#shortcut-toolbar a:hover, -#shortcut-toolbar a.active:focus { - background: #555; -} -#shortcut-toolbar a.active:hover, -#shortcut-toolbar a.active { - background-color: #000; -} -#shortcut-toolbar .icon { - background-color: #444; - border-radius: 5px; - height: 30px; - margin-right: 5px; /* LTR */ - width: 30px; -} - -/** * Add/remove links. */ .add-or-remove-shortcuts .icon { @@ -65,15 +26,3 @@ .remove-shortcut a:hover .icon { background-position: -12px -12px; /* LTR */ } -.add-or-remove-shortcuts .text { - padding: 0 6px 0 10px; /* LTR */ -} -.add-or-remove-shortcuts a:focus .text, -.add-or-remove-shortcuts a:hover .text { - background-color: #5f605b; - border-radius: 0 5px 5px 0; /* LTR */ - color: #fff; - cursor: pointer; - font-size: 10px; - line-height: 12px; -} diff --git a/core/modules/system/system.module b/core/modules/system/system.module index ea3dadc..abbb5ac 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1380,6 +1380,15 @@ function system_library_info() { ), ); + $libraries['matchMedia'] = array( + 'title' => 'window.matchMedia polyfill', + 'website' => 'http://drupal.org/node/1815602', + 'version' => '1.0', + 'js' => array( + 'core/misc/matchMedia.js' => array(), + ), + ); + // Farbtastic. $libraries['jquery.farbtastic'] = array( 'title' => 'Farbtastic', @@ -1883,7 +1892,6 @@ function system_library_info() { array('system', 'jquery'), ), ); - $libraries['drupal.tableselect'] = array( 'title' => 'Tableselect', 'version' => VERSION, diff --git a/core/modules/toolbar/config/toolbar.breakpoints.yml b/core/modules/toolbar/config/toolbar.breakpoints.yml new file mode 100755 index 0000000..0cae5cc --- /dev/null +++ b/core/modules/toolbar/config/toolbar.breakpoints.yml @@ -0,0 +1 @@ +wide: 'all and (min-width: 60em)' diff --git a/core/modules/toolbar/config/toolbar.config.yml b/core/modules/toolbar/config/toolbar.config.yml new file mode 100755 index 0000000..79522f0 --- /dev/null +++ b/core/modules/toolbar/config/toolbar.config.yml @@ -0,0 +1,2 @@ +breakpoints: + - 'module.toolbar.wide' diff --git a/core/modules/toolbar/css/toolbar.base-rtl.css b/core/modules/toolbar/css/toolbar.base-rtl.css new file mode 100644 index 0000000..69a0d5f --- /dev/null +++ b/core/modules/toolbar/css/toolbar.base-rtl.css @@ -0,0 +1,26 @@ + +.toolbar-main, +.toolbar-main * { + text-align: right; +} +.toolbar-main ul li { + float: right; +} +.toolbar-main ul li a { + display: inline-block; + float: none; + zoom: 1; +} +.toolbar-main-user { + float: left; +} +.toolbar-main .toolbar-main-user li { + float: none; + display: inline; +} +.toolbar-main-menu { + float: none; +} +.toolbar-main-home { + float: right; +} diff --git a/core/modules/toolbar/css/toolbar.base.css b/core/modules/toolbar/css/toolbar.base.css new file mode 100644 index 0000000..f9f0e7e --- /dev/null +++ b/core/modules/toolbar/css/toolbar.base.css @@ -0,0 +1,317 @@ +/** + * @file toolbar.admin.css + * + * + * Aggressive resets so we can achieve a consistent look in hostile CSS + * environments. + */ +body.toolbar { + -moz-box-sizing: border-box; + -o-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 100%; +} +.toolbar-main, +.toolbar-main * { + -moz-box-sizing: border-box; + -o-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + list-style: none; + margin: 0; + outline: 0; + padding: 0; + -moz-tap-highlight-color: rgba(0,0,0,0); + -o-tap-highlight-color: rgba(0,0,0,0); + -webkit-tap-highlight-color: rgba(0,0,0,0); + tap-highlight-color: rgba(0,0,0,0); + text-align: left; /* LTR */ + -moz-text-size-adjust: none; + -o-text-size-adjust: none; + -webkit-text-size-adjust: none; + text-size-adjust: none; + -moz-touch-callout: none; + -o-touch-callout: none; + -webkit-touch-callout: none; + touch-callout: none; + -moz-user-select: none; + -o-user-select: none; + -webkit-user-select: none; + user-select: none; + vertical-align: baseline; +} +.toolbar-main { + font-size: 100%; + font-size: 1rem; + line-height: 1; +} + +/** + * Administration menu. + */ +.toolbar-main .bar, +.toolbar-main .shortcuts { + left: 0; + position: fixed; + right: 0; + z-index: 600; +} +.toolbar-main .bar { + top: 0; +} +.toolbar-main .shortcuts { + height: 3em; + -moz-transition: height, 0.05s ease-out; + -o-transition: height, 0.05s ease-out; + -webkit-transition: height, 0.05s ease-out; + transition: height, 0.05s ease-out; +} +.toolbar-main .shortcuts.hidden { + height: 0; + overflow: hidden; + padding: 0; +} +@media screen and (max-width: 28.124em) { + .toolbar-main .bar { + position: absolute; + } +} +@media screen and (min-width: 16.5em) { + .toolbar-main-actions { + float: left; /* LTR */ + } + .toolbar-main-user { + float: right; /* LTR */ + } + .toolbar-main .bar .section { + min-height: 2.875em; + } + .toolbar-main .bar .section.first, + .toolbar-main .bar .section.second { + min-width: 6.6667em; + } + .toolbar-main .bar .section.first { + float: left; /* LTR */ + } + .toolbar-main .bar .section.second { + float: right; /* LTR */ + } + .toolbar-main .bar .section.actions { + overflow: hidden; + } + .toolbar-main .bar .menu li { + display: block; + float: left; /* LTR */ + } + .toolbar-main .bar .menu a { + display: inline-block; + } +} +/** + * Toolbar tray - vertical. + */ +.toolbar-main .tray.vertical { + bottom: 0; + left: -240px; + left: -15rem; + max-width: 92%; + overflow-x: hidden; + overflow-y: auto; + position: fixed; + width: 240px; + width: 15rem; + z-index: 600; +} +.toolbar-main .tray.vertical > .slider { + left: -100%; /* LTR */ + overflow:hidden; + position: absolute; + -moz-transition: left, 0.05s ease-out; + -o-transition: left, 0.05s ease-out; + -webkit-transition: left, 0.05s ease-out; + transition: left, 0.05s ease-out; + width: 100%; +} +.toolbar-main .tray.vertical.active, +.toolbar-main .tray.vertical.active > .slider { + left: 0; /* LTR */ +} +/** + * At larger screen sizes, the tray pushes the page content + * using padding instead of left. + */ +@media screen and (max-width: 28.124em) { + body.toolbar-tray-open.toolbar-vertical { + overflow: hidden; + } + .toolbar-main .tray.vertical { + position: absolute; + } +} +/** + * At larger screen sizes, the tray pushes the page content + * using padding instead of left. + */ +@media screen and (min-width: 28.125em) { + body.toolbar-tray-open.toolbar-vertical { + padding-left: 272px; + padding-left: 17rem; + } + .toolbar-main .tray.vertical { + left: -272px; + left: -17rem; + width: 272px; + width: 17rem; + } +} +.toolbar-main .tray .menu-site li a { + display: block; +} +/** + * Toolbar tray - horizontal. + */ +.toolbar-main .tray.horizontal { + left: 0; /* LTR */ + height: 0; + overflow: hidden; + position: fixed; + -moz-transition: height, 0.05s ease-out; + -o-transition: height, 0.05s ease-out; + -webkit-transition: height, 0.05s ease-out; + transition: height, 0.05s ease-out; + width: 100%; + z-index: 600; +} +.toolbar-main .horizontal.active { + height: 3.3333em; +} +.toolbar-main .horizontal.expand { + height: 27.6667em; +} +.toolbar-main .horizontal .level-2 a { + padding: 0.6667em 1em; +} +/** + * Menus. + */ +.toolbar-main .menu { + list-style: none; + margin: 0; + padding: 0; +} +.toolbar-main .interactive-menu { + height: 100%; + position: relative; +} +.toolbar-main .menu-site { + position: relative; +} +.toolbar-main .box { + display: block; + line-height: 1em; /* this prevents the value "normal" from being returned as the line-height */ + position: relative; + width: auto; +} +.toolbar-main .dormant { + display: none; +} +.toolbar-main .trail > ul { /* Show the sub-menus */ + display: block; +} +.toolbar-main .active > ul { + z-index: 51; /* Pull the active trail li's above the other li's */ +} +.toolbar-main .tray .menu-site li { + display: block; +} +.toolbar-main .menu-site a { + display: block; + line-height: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.toolbar-main .handle { + background-attachment: scroll; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iNjEycHgiIGhlaWdodD0iNzkycHgiIHZpZXdCb3g9IjAgMCA2MTIgNzkyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2MTIgNzkyIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjOTk5OTk5IiBkPSJNMjk2LDM5NmMwLDUuNTIsNC40OCwxMCwxMCwxMGM1LjUyLDAsMTAtNC40OCwxMC0xMA0KCWMwLTUuNTItNC40OC0xMC0xMC0xMEMzMDAuNDgsMzg2LDI5NiwzOTAuNDgsMjk2LDM5NnogTTI5NywzOTZjMC00Ljk3LDQuMDMtOSw5LTljNC45NzEsMCw5LDQuMDMsOSw5YzAsNC45NzEtNC4wMjksOS05LDkNCglDMzAxLjAzLDQwNSwyOTcsNDAwLjk3MSwyOTcsMzk2eiIvPg0KPHBvbHlnb24gZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiM1MTgxQzIiIHBvaW50cz0iMzA2LDM5OSAzMDEsMzk0IDMxMSwzOTQgIi8+DQo8L3N2Zz4NCg==); + background-position: -279px -374px; + background-repeat: no-repeat; + bottom: 0; + display: block; + height: 100%; + position: absolute; + right: 0; + top: 0; + -moz-transform: rotate(0deg); + -moz-transition: -webkit-transform 0.1s ease-in; + -webkit-transform: rotate(0deg); + -webkit-transition: -webkit-transform 0.1s ease-in; + transform: rotate(0deg); + transition: -webkit-transform 0.1s ease-in; + width: 4em; + z-index: 1; +} +.toolbar-main .horizontal .handle { + background-position: -282px -375px; + background-size: auto auto; +} +.toolbar-main .vertical .level-2 .handle { + background-position: -279px -382px; +} +.toolbar-main .horizontal .level-2 .handle { + background-position: -280px -382px; + -webkit-transform: rotate(-90deg); +} +.toolbar-main .handle.open { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iNjEycHgiIGhlaWdodD0iNzkycHgiIHZpZXdCb3g9IjAgMCA2MTIgNzkyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2MTIgNzkyIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiM5OTk5OTkiIGQ9Ik0zMTYsMzk2YzAtNS41Mi00LjQ4LTEwLTEwLTEwcy0xMCw0LjQ4LTEwLDEwczQuNDgsMTAsMTAsMTBTMzE2LDQwMS41MiwzMTYsMzk2eiBNMzE1LDM5Ng0KCWMwLDQuOTctNC4wMyw5LTksOWMtNC45NzEsMC05LTQuMDMtOS05YzAtNC45NzEsNC4wMjktOSw5LTlDMzEwLjk3LDM4NywzMTUsMzkxLjAyOSwzMTUsMzk2eiIvPg0KPHBvbHlnb24gZmlsbD0iIzc3Nzc3NyIgcG9pbnRzPSIzMDYsMzkzIDMxMSwzOTggMzAxLDM5OCAiLz4NCjwvc3ZnPg0K); +} +.toolbar-main .handle + a { + margin-right: 4em; +} +.toolbar-main .handle:hover { + cursor: pointer; +} +/** + * ToolBar tray - vertical. + */ + .toolbar-main .vertical .menu-site { + overflow: hidden; +} +/** + * Horizonal tray main menu. + */ +.toolbar-main .horizontal .menu-site li { + float: left; +} +.toolbar-main .horizontal .menu-site .level-1 ul { + height: 23.6667em; + position: absolute; + top: 4em; + width: 12.5%; +} +.toolbar-main .horizontal .level-1 > li { +max-width: 14%; +} +.toolbar-main .horizontal .menu-site .level-2 { + left: 0; +} +.toolbar-main .horizontal .menu-site .level-2 li { + display: block; + float: none; +} +.toolbar-main .horizontal .menu-site .level-2 ul { + bottom: 0; + left: 100%; + top: 0; + width: 100%; +} + +/* Shortcuts */ +.toolbar-main .shortcuts h2 { + display: inline-block; + float: left; +} +.toolbar-main .shortcuts .menu { + float: left; +} diff --git a/core/modules/toolbar/css/toolbar.theme-rtl.css b/core/modules/toolbar/css/toolbar.theme-rtl.css new file mode 100644 index 0000000..e8cb8cf --- /dev/null +++ b/core/modules/toolbar/css/toolbar.theme-rtl.css @@ -0,0 +1,7 @@ +.toolbar-main .bar .menu li + li { + margin-left: auto; + margin-right: 1em; +} +.toolbar-main .shortcuts .menu li { + float: right; +} diff --git a/core/modules/toolbar/css/toolbar.theme.css b/core/modules/toolbar/css/toolbar.theme.css new file mode 100644 index 0000000..5c2b163 --- /dev/null +++ b/core/modules/toolbar/css/toolbar.theme.css @@ -0,0 +1,440 @@ +/** + * @file toolbar.theme.css + * + * + * We use a keyword for the toolbar font size to make it display consistently + * across different themes, while still allowing browsers to resize the text. + */ +.toolbar-main { + font-family: "Source Sans Pro", "Lucida Grande", Verdana, sans-serif; + /* Set base font size to 13px based on root ems. */ + font-size: 0.8125rem; +} +.toolbar-main a { + text-decoration: none; +} +.toolbar-main a:hover { + text-decoration: underline; +} +/** + * Toolbar bar. + */ +.toolbar-main .bar { + background-color: #383838; + color: #dddddd; +} +.toolbar-main .bar a { + color: #ffffff; +} +.toolbar-main .bar .toggle-tray.active { + background-color: white; + color: black; +} +.toolbar-main .bar .tab { + background-attachment: scroll; + background-color: transparent; + background-repeat: no-repeat; + cursor: pointer; + display: block; + padding: 0.3333em 0.1667em; +} +@media screen and (min-width: 16.5em) { + .toolbar-main .bar .section.actions { + padding-bottom: 0.5em; + padding-top: 0.5em; + } +} +/** + * Toolbar tray. + */ +.toolbar-main .tray { + background-color: white; + border-right: 1px solid #aaaaaa; + -moz-box-shadow: 0px 1px 7px 0px rgba(0, 0, 0, 0.4); + -o-box-shadow: 0px 1px 7px 0px rgba(0, 0, 0, 0.4); + -webkit-box-shadow: 0px 1px 7px 0px rgba(0, 0, 0, 0.4); + box-shadow: 0px 5px 7px 0px rgba(0, 0, 0, 0.4); +} +.toolbar-main .tray a { + color: #333333; +} +.toolbar-main .vertical .menu-site { + border-bottom-color: #dddddd; + border-bottom-style: solid; + border-bottom-width: 1px; +} +.toolbar-main .tray li { + padding: 0; +} +.toolbar-main .vertical li .box { + border-top-color: transparent; + border-top-style: solid; + border-top-width: 1px; +} +.toolbar-main .vertical li.open > .box { + border-bottom-color: transparent; + border-bottom-style: solid; + border-bottom-width: 1px; +} +.toolbar-main .menu-site li a { + padding: 1em 0; + text-indent: 3px; +} +.toolbar-main .vertical .level-1 > li > .box { + border-top-color: #dddddd; +} +.toolbar-main .tray .level-1 > li.open + li > .box { + border-top-color: #dddddd; +} +.toolbar-main .tray .level-1 a { + padding: 1.25em 0; + font-weight: bold; +} +.toolbar-main .tray .level-2 { + background-color: #fff; +} +.toolbar-main .tray .level-2 a { + color: #333333; + padding: 0.6667em 0; + font-weight: normal; +} +.toolbar-main .tray .level-2 > li.open > .box { + border-bottom-color: #cccccc; +} +.toolbar-main .tray .level-2 > li.open + li > .box { + border-top-color: #cccccc; +} +.toolbar-main .tray .level-3 { + background-color: #f5f5f5; +} +.toolbar-main .tray .level-3 > li.open > .box { + border-bottom-color: #bbbbbb; +} +.toolbar-main .tray .level-3 > li.open + li > .box { + border-top-color: #bbbbbb; +} +.toolbar-main .tray .level-3 a { + color: #303030; +} +.toolbar-main .tray .level-4 { + background-color: #e5e5e5; +} +.toolbar-main .tray .level-4 > li + li { + border-top-color: #aaaaaa; +} +.toolbar-main .tray .level-4 > li.open > .box { + border-bottom-color: #aaaaaa; +} +.toolbar-main .tray .level-4 a { + color: #2d2d2d; +} +.toolbar-main .tray .level-5 { + background-color: #d5d5d5; +} +.toolbar-main .tray .level-5 > li + li { + border-top-color: #999999; +} +.toolbar-main .tray .level-5 > li.open > .box { + border-bottom-color: #999999; +} +.toolbar-main .tray .level-5 a { + color: #2a2a2a; +} +.toolbar-main .tray .level-6 { + background-color: #c5c5c5; +} +.toolbar-main .tray .level-6 > li + li { + border-top-color: #888888; +} +.toolbar-main .tray .level-6 > li.open > .box { + border-bottom-color: #888888; +} +.toolbar-main .tray .level-6 a { + color: #272727; +} +.toolbar-main .tray .level-7 { + background-color: #d5d5d5; +} +.toolbar-main .tray .level-7 > li + li { + border-top-color: #777777; +} +.toolbar-main .tray .level-7 > li.open > .box { + border-bottom-color: #777777; +} +.toolbar-main .tray .level-7 a { + color: #242424; +} +.toolbar-main .tray .level-8 { + background-color: #e5e5e5; +} +.toolbar-main .tray .level-8 > li + li { + border-top-color: #666666; +} +.toolbar-main .tray .level-8 > li.open > .box { + border-bottom-color: #666666; +} +.toolbar-main .tray .level-8 a { + color: #212121; +} +.toolbar-main .tray .level-9 { + background-color: #f5f5f5; +} +.toolbar-main .tray .level-9 > li + li { + border-top-color: #555555; +} +.toolbar-main .tray .level-9 a { + color: #1e1e1e; +} +.toolbar-main .tray .form-type-search { + padding-left: 0.75em; + padding-right: 0.75em; +} +.toolbar-main .tray .filter { + width: 100%; +} +/** + * ToolBar tray - vertical. + */ +.toolbar-main .tray.vertical .lining { + padding-bottom: 1em; + padding-top: 1em; +} +.toolbar-main .tray.vertical .lining > * + * { + margin-top: 1em; +} +.toolbar-main .vertical .level-1 ul { + margin-left: 2.75em; +} +.toolbar-main .vertical .level-2 ul { + margin-left: 0.4545em; +} +/** + * ToolBar tray - horizontal. + */ +.toolbar-main .horizontal .level-1 > li.open > .box { + border-bottom-color: white; + border-bottom-width: 1px; + border-bottom-style: solid; + position: relative; + margin-top: -1px; + top: 1px; +} +.toolbar-main .horizontal .level-2 ul { + border-left: 1px solid #bcbcbc; +} +.toolbar-main .horizontal .level-2 a { + padding: 0.6667em 1em; +} +/** + * Icons. + */ +@media screen and (min-width: 16.5em) and (max-width: 34em) { + .toolbar-main .bar .tab { + padding: 1.4667em 0.1667em 1.1667em; + text-indent: -9999px; + } +} +.toolbar-main.icons .tray .menu a, +.toolbar-main.icons .bar .tab { + background-attachment: scroll; + background-repeat: no-repeat; +} +.toolbar-main.icons .tray .level-1 > li > .box > a, +.toolbar-main.icons .bar .tab { + background-position: 0.4545em center; +} + +@media screen and (min-width: 16.5em) { +/** + * Icons + * + * Hide icons from UAs that don't support media queries. They + * are not sophisticated enough for this enhancement. + */ + .toolbar-main.icons .bar .tab { + background-attachment: scroll; + background-position: 0.7545em 0.9em; + background-repeat: no-repeat; + background-size: 25px 25px; + width: 3.3333em; + } + .toolbar-main.icons .bar .home a { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTAwcHgiIGhlaWdodD0iMTAwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAgMTAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxsaW5lYXJHcmFkaWVudCBpZD0iU1ZHSURfMV8iIGdyYWRpZW50VW5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0djE0LjYyNUgwLjE1OFY0Mi42ODh6Ii8+DQo8L3N2Zz4NCg==); + } + .toolbar-main.icons .bar .toggle-tray:active, + .toolbar-main.icons .bar .toggle-tray.active { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTAwcHgiIGhlaWdodD0iMTAwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAgMTAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxyZWN0IHg9IjAuMTU4IiB5PSI3MS45MzgiIHdpZHRoPSI5OS43NCIgaGVpZ2h0PSIxNC42MjUiLz4NCjxyZWN0IHg9IjAuMTU4IiB5PSIxMy40MzgiIHdpZHRoPSI5OS43NCIgaGVpZ2h0PSIxNC42MjUiLz4NCjxyZWN0IHg9IjAuMTU4IiB5PSI0Mi42ODgiIHdpZHRoPSI5OS43NCIgaGVpZ2h0PSIxNC42MjUiLz4NCjwvc3ZnPg0K); + } + .toolbar-main.icons .bar .account a { + background-image: url(data:image/svg+xml;base64,PD94bW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I4LjQwODEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLTEgMCAxMDEpIj4NCgk8c3RvcCAgb2Zmc2V0PSIwIiBzdHlsZT0ic3RvcC1jb2xvcjojQ0NDQ0NDIi8+DQoJPHN0b3AgIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6Izk5OTk5OSIvPg0KPC9saW5lYXJHcmFkaWVudD4NCjxwYXRoIGZpbGw9InVybCgjU1ZHSURfMV8pIiBkPSJNMjguNDI1LDI5LjM0N0MyOC40MjUsNDEuMzEsMzguMDc4LDUxLDQ5Ljk5OCw1MWMxMS45MjYsMCwyMS41NzktOS42OSwyMS41NzktMjEuNjUzDQoJYzAtMTEuOTYyLTkuNjUyLTIxLjY1My0yMS41NzktMjEuNjUzQzM4LjA3OCw3LjY5MywyOC40MjUsMTcuMzg0LDI4LjQyNSwyOS4zNDd6IE0xMDAsOTIuMzA3YzAtMjAuMzQ2LTEuMTItMzUuNDIxLTUwLjAwMi0zNS40MjENCglDMS4xOTUsNTYuODg1LDAsNzEuMTkxLDAsOTIuMzA3SDEwMHoiLz4NCjwvc3ZnPg0K); + } +} + +.toolbar-main.icons .level-1 > li > .box > a { + margin-left: 0.75em; + margin-right: 2em; + padding-bottom: 1.15em; + padding-top: 1.15em; +} +.toolbar-main.icons .horizontal .level-1 > li > .box > a { + margin-left: 1.5em; + margin-right: 2em; + } +.toolbar-main.icons .vertical .level-1 > li > .box > a { + padding-left: 2em; + padding-right: 2em; +} +.toolbar-main .level-1 > li > .box > .handle + a, +.toolbar-main .horizontal .level-1 > li > .box > .handle + a { + margin-right: 4em; +} + +.toolbar-main.icons .tray .level-1 > li > .box > a { + background-size: 20px 20px; +} +.toolbar-main.icons #toolbar-link-admin-dashboard { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3Ry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M4OGMwLDIuMTAzLTAuNjA0LDQuMDA5LTEuODIzLDUuNzE2Yy0xLjIxOSwxLjcwOC0zLjcyOSwzLjkyLTcuNTM5LDYuNjQxDQoJYy0zLjk1NCwyLjkwNi02LjY3Niw1LjY0Mi04LjE2Niw4LjIxOWMtMS40OTEsMi41NzgtMi4yMzEsNS42MDctMi4yMzEsOS4wOTJ2NC4wMjlINTUuMjA5eiBNNDEuNTQ0LDg4LjI3MQ0KCWMxLjY2NywxLjYxMiw0LjAyOSwyLjQyMiw3LjA3OCwyLjQyMmMyLjk3MiwwLDUuMzAxLTAuODI0LDYuOTY4LTIuNDc4YzEuNjY1LTEuNjU1LDIuNTAzLTMuOTE0LDIuNTAzLTYuNzc2DQoJYzAtMi45NzYtMC44MjEtNS4yNTgtMi40NzYtNi44NjFjLTEuNjU0LTEuNTk4LTMuOTgtMi4zOTUtNi45OTUtMi4zOTVjLTMuMTIzLDAtNS40OTcsMC43ODItNy4xMywyLjM0Mg0KCWMtMS42MzUsMS41NTktMi40NDksMy44NjMtMi40NDksNi45MTRDMzkuMDQyLDg0LjM3OSwzOS44NzgsODYuNjU2LDQxLjU0NCw4OC4yNzF6Ii8+DQo8L3N2Zz4NCg==); +} + +@media screen and (max-width: 79.999em) { + .toolbar-main.icons .horizontal .level-1 > li > .box > a { + background-image: none !important; + } +} + +@media screen and (min-width: 80em) { + .toolbar-main.icons .horizontal .level-1 > li > .box > a { + padding-left: 2em; + padding-right: 0.25em; + } +} + +@media screen and (min-width: 34em) { + .toolbar-main.icons .bar .tab { + padding: 1.4667em 2em 1.1667em 3.25em; + width: auto; + } +} +/** + * ToolBar tray - horizontal. + */ +.toolbar-main.icons .horizontal .level-1 { + border-color: #ccc; + border-style: solid; + border-width: 0 0 1px 0; +} +.toolbar-main.icons .horizontal .level-1 > li { + border-color: #ccc; + border-style: solid; + border-width: 0 1px 0 0; +} +/* @end */ + +/* Shortcuts */ +.toolbar-main .shortcuts { + background-color: #555; + padding: 0.5em 0.6667em; +} +.toolbar-main .shortcuts h2 { + font-size: 1em; + font-weight: normal; + line-height: 2; +} +.toolbar-main .shortcuts .menu { + margin-left: 0.5em; +} +.toolbar-main .shortcuts .menu li { + display: block; + float: left; /* LTR */ + padding: 0 0.2em; + margin-bottom: 0.5em; +} +.toolbar-main .shortcuts, +.toolbar-main .shortcuts a { + color: #E0E0E0; +} +.toolbar-main .shortcuts .menu a { + background-color: #777; + border-radius: 0.3em; + display: inline-block; + font-size: 0.9em; + line-height: 1; + padding: 0.6em 0.8em; +} +.toolbar-main .shortcuts .menu + a { + font-size: 1em; + line-height: 2; + margin-left: 0.75em; +} + +/* Dropbutton */ + +.toolbar-main .section.second .dropbutton { + right: 100%; +} +.toolbar-main .section.second .dropbutton-widget { + right: -10em; + max-width: 10em; +} +.toolbar-main .section.second .dropbutton.open .dropbutton-widget { + max-width: none; +} +.toolbar-main .dropbutton-widget { + background-color: #4894DA; + border: 0; + font-size: inherit; +} +.toolbar-main .dropbutton-multiple .dropbutton-widget { + padding-right: 2em; +} +.toolbar-main .dropbutton-content a { + padding: 0.6667em 1em; + line-height: 1; +} +.toolbar-main .dropbutton .dropbutton-arrow { + border-bottom-width: 0; + border-left-width: 0.55em; + border-right-width: 0.55em; + border-top-width: 0.6em; + right: 7px; + top: 0.75em; +} +.toolbar-main .dropbutton.open .dropbutton-arrow { + border-bottom-width: 0.6em; + border-left-width: 0.55em; + border-right-width: 0.55em; + border-top-width: 0.05em; +} diff --git a/core/modules/toolbar/js/toolbar.js b/core/modules/toolbar/js/toolbar.js new file mode 100755 index 0000000..cb67740 --- /dev/null +++ b/core/modules/toolbar/js/toolbar.js @@ -0,0 +1,425 @@ +/** + * @file toolbar.js + * + * Defines the behavior of the Drupal administration toolbar. + */ +(function ($, _) { + +"use strict"; + +/** + * Attach toggling behavior and notify the overlay of the toolbar. + */ +Drupal.behaviors.toolbar = { + attach: function(context, settings) { + var options = _.extend(this.options, settings); + var $toolbar = $(context).find('.toolbar-main').once('toolbar'); + if ($toolbar.length) { + var toolbar = new ToolBar($toolbar, VerticalTray, HorizontalTray); + // Set up switching between the vertical and horizontal presentation + // of the toolbar. + if (options.toolbar.breakpoints && options.toolbar.breakpoints['module.toolbar.wide'] !== undefined) { + var mql = matchMedia(settings.toolbar.breakpoints['module.toolbar.wide']); + mql.addListener(toolbar.mediaQueryChangeHandler); + toolbar.mediaQueries.push(mql); + if (mql.matches) { + toolbar.orientation = 'horizontal'; + } + } + // Render the Toolbar tray. + toolbar.renderTray(); + } + }, + options: { + toolbar: { + breakpoints: null + } + } +}; +/** + * A toolbar is an administration action button container. + */ +function ToolBar ($toolbar, VerticalTray, HorizontalTray) { + this.$toolbar = $toolbar; + this.$bar = $toolbar.find('.bar'); + var $tray = $toolbar.find('.tray'); + this.trays = { + vertical: new VerticalTray($tray, '.menu-site > .menu'), + horizontal: new HorizontalTray($tray, '.menu-site > .menu') + }; + // Bind the methods of the trays. + _.bindAll(this.trays.vertical); + _.bindAll(this.trays.horizontal); + this.$tray = this.getTray(); + this.$shortcuts = $toolbar.find('.shortcuts'); + this.$trigger = $toolbar.find('.toggle-tray'); + this.mediaQueries = []; + this.orientation = 'vertical'; + this.state = 'closed'; + this.ui = { + 'activeClass': 'active', + 'expandClass': 'expand', + 'shortcutsClass': 'hidden', + 'trayOpenBodyClass': 'toolbar-tray-open', + 'trayOpenBodyClassVertical': 'toolbar-vertical', + 'trayOpenBodyClassHorizontal': 'toolbar-horizontal' + }; + // Show icons if JavaScript is enabled. + this.$toolbar.addClass('icons'); + // Bind all ToolBar methods to the instance. + _.bindAll(this); + // Recalculate the offset top on screen resize. + // Use throttle to prevent setHeight from being called too frequently. + var setHeight = _.debounce(this.setHeight, 250); + $(window) + .on({ + 'resize.toolbar': setHeight + }); + // Register for offsettopchange events. + $(document) + .on({ + // Offset value vas changed by a third party script. + 'offsettopchange.toolbar': this.displace + }); + // Toolbar event handlers. + this.$toolbar + .on({ + 'setup.toolbar': setHeight, + }) + .trigger('setup'); + // Tray trigger. + this.$trigger + .on({ + 'setup.toolbar': this.toggleTrigger, + 'click.toolbar': this.handleTriggerClick, + }) + .trigger('setup'); +}; +/** + * Extend the prototype of the VerticalTray class. + */ +$.extend(ToolBar.prototype, { + /** + * The height of the toolbar offsets the top of the page content. + * + * Page components can register with the offsettopchange event to know when + * the height of the toolbar changes. + */ + setHeight: function () { + this.height = this.$bar.outerHeight(); + this.$bar.attr('data-offset-top', this.height); + // Alter the padding on the top of the body element. + // @todo, this should be moved to drupal.js and register for + // the offsettopchange event. + $('body').css('paddingTop', this.height); + $(document).trigger('offsettopchange'); + }, + /** + * + */ + renderTray: function () { + this.trays[this.orientation].render(); + }, + /** + * + */ + destroyTray: function () { + this.trays[this.orientation].destroy(); + }, + /** + * + */ + getTray: function () { + return this.trays[this.orientation]; + }, + /** + * + */ + mediaQueryChangeHandler: function (mql, event) { + if (mql.matches && this.orientation === 'vertical') { + // Destroy the current tray. + this.destroyTray(); + this.orientation = 'horizontal'; + $('body').addClass(this.ui.trayOpenBodyClassHorizontal).removeClass(this.ui.trayOpenBodyClassVertical); + } + else if (!mql.matches && this.orientation == 'horizontal') { + // Destroy the current tray. + this.destroyTray(); + this.orientation = 'vertical'; + $('body').addClass(this.ui.trayOpenBodyClassVertical).removeClass(this.ui.trayOpenBodyClassHorizontal); + } + // Render the tray + this.renderTray(); + }, + /** + * + */ + handleTriggerClick: function (event) { + event.preventDefault(); + event.stopImmediatePropagation(); + this.state = (this.state === 'closed') ? 'open' : 'closed'; + this.toggleTray(); + this.toggleTrigger(); + }, + /** + * + */ + toggleTrigger: function (event) { + this.$trigger[((this.state === 'open') ? 'add' : 'remove') + 'Class'](this.ui.activeClass); + }, + /** + * + */ + toggleTray: function (event) { + this.getTray().$tray[((this.state === 'open') ? 'add' : 'remove') + 'Class'](this.ui.activeClass); + this.$shortcuts[((this.state === 'open') ? 'add' : 'remove') + 'Class'](this.ui.shortcutsClass); + if (this.state !== 'open') { + this.getTray().$tray.removeClass(this.ui.expandClass); + } + // Add a class to the body so it can be styled to react to the tray. + $('body')[((this.state === 'open') ? 'add' : 'remove') + 'Class'](this.ui.trayOpenBodyClass); + $('body')[((this.state === 'open') ? 'add' : 'remove') + 'Class'](this.ui.trayOpenBodyClass); + }, + /** + * + */ + displace: function (event) { + this.getTray().$tray + .add(this.$shortcuts) + .css({ + 'top': this.computeOffsetTop() + 'px' + }); + }, + /** + * Sum all [data-offset-top] values and cache it. + * @todo move this out of tableheader.js into a move generic place like drupal.js. + */ + computeOffsetTop: function () { + var $offsets = $('[data-offset-top]'); + var value, sum = 0; + for (var i = 0, il = $offsets.length; i < il; i++) { + value = parseInt($offsets[i].getAttribute('data-offset-top'), 10); + sum += !isNaN(value) ? value : 0; + } + this.offsetTop = sum; + return sum; + } +}); +/** + * Common interactive menu setup methods. + */ +var interactiveMenu = function () { + + var processLists = function (event) { + event.stopPropagation(); + // Mark up the lists and items. + $(event.target) + .trigger('listChange'); + }; + var toggleList = function (event) { + // The toggle. + var $toggle = $(event.target); + var $item = $toggle.closest('li'); + var $list = $item.children('ul'); + var isHidden = $list.hasClass('dormant'); + // Close open siblings. + $item.siblings().filter('.open').find('.handle').trigger('click'); + // Toggle the item open state. + $item + [((isHidden) ? 'add' : 'remove') + 'Class']('open'); + // Toggle the item list visibility. + $list + ['slide' + ((isHidden) ? 'Down' : 'Up')](50) + [((isHidden) ? 'remove' : 'add') + 'Class']('dormant'); + // Twist the toggle. + $toggle + [((isHidden) ? 'add' : 'remove') + 'Class']('open'); + // Fire an event to signify that a list has been toggled. + $item.trigger('itemToggled', [$item.parent().data('toolbar').level, !isHidden]); + }; + var initItems = function (event) { + // The accordion wrapper. + var $wrapper = $(event.target); + var rootClass = 'root'; + var boxClass = 'box'; + var handleClass = 'handle'; + // Get lists and items. + var $root = $wrapper.children('.' + rootClass); + var $ul = $wrapper.find('ul').once('interactive-menu'); + var $li = $wrapper.find('li').once('interactive-menu'); + // Basic setup + $ul + .each(function (index, element) { + $(this).data('toolbar', { + processed: false, + type: 'list', + level: NaN + }); + }); + // Initialize items and their links. + $li + .each(function (index, element) { + $(this).data('toolbar', { + processed: false, + type: 'item' + }); + }) + // Add a class to item links. + .children('a') + .wrap( + $('
', { + 'class': boxClass + }) + ) + .end() + // Add a handle to each list item if it has a menu. + .each(function (index, element) { + var $item = $(this); + if ($item.children('ul').length > 0) { + $item + .children('.' + boxClass) + .prepend( + $('', { + 'class': handleClass, + text: '' + }) + ); + } + }); + }; + /** + * Adds a level class to each list based on its depth in the menu. + */ + var markListLevels = function ($lists, level) { + level = (typeof level === 'object') ? 1 : level; + $lists + .addClass('level-' + level) + .each(function (index, element) { + $(this).data().toolbar.level = level; + }); + $lists = $lists.children('li').children('ul'); + if ($lists.length > 0) { + markListLevels($lists, (level + 1)); + } + }; + var setLevelVisibility = function ($lists, visibleAfter) { + var level; + $lists + .each(function (index, element) { + var $this = $(this); + level = $(this).data().toolbar.level; + if (level > visibleAfter) { + $this.addClass('dormant'); + } + else { + $this.addClass('visible'); + } + }); + $lists = $lists.children('li').children('ul'); + if ($lists.length > 0) { + setLevelVisibility($lists, visibleAfter); + } + }; + + return { + /** + * Decorate a menu with markup and classes for attaching behaviors. + */ + decorate: function (menuPath) { + var context = this; + // Find any menus that have already been decorated. + var $wrapper = this.$tray.find('.interactive-menu'); + // Decorate any menus that have not been. + this.$tray.find(menuPath) + .once('decorate-menu') + .addClass('clearfix') + .each(function (index, element) { + var $root = $(this).addClass('root'); + // Create a set of list-manipulation callbacks. + // Called when items are added or removed. + var listUpdate = $.Callbacks(); + listUpdate.add(_.bind(initItems, context)); + listUpdate.add(_.bind(markListLevels, context, $root)); + listUpdate.add(_.bind(setLevelVisibility, context, $root, 1)); + // Wrap the list in a div to provide a positioning context. + $wrapper = $().add($wrapper).add( + $root + .wrap('
') + .parent() + // Bind event handlers. + .on('setup.toolbar', _.bind(processLists, context)) + .on('listChange.toolbar', listUpdate.fire) + .on('click.toolbar', '.handle', _.bind(toggleList, context)) + /* @todo + .on('clean.toolbar.accordionMode', 'li', cleanItem) + .on('activate.toolbar.accordionMode', 'li', activateItem) + */ + .trigger('setup') + ); + }); + return $wrapper; + } + }; +}; +/** + * Renders the display of a tray as a vertical, sliding container. + */ +function VerticalTray ($el, menuPath) { + this.$tray = $el; + this.tag = 'vertical'; + this.$menu = $(); + this.menuPath = menuPath; +} +/** + * Extend the prototype of the VerticalTray. + */ +_.extend(VerticalTray.prototype, interactiveMenu(), { + /** + * + */ + render: function () { + this.$menu = this.decorate(this.menuPath); + this.$tray.addClass(this.tag); + }, + destroy: function () { + this.$tray.removeClass(this.tag); + } +}); +/** + * Renders the display of a tray as a horizontal container. + */ +function HorizontalTray ($el, menuPath) { + this.$tray = $el; + this.tag = 'horizontal'; + this.$menu = $(); + this.menuPath = menuPath; +} +/** + * Extend the prototype of the HorizontalTray. + */ +$.extend(HorizontalTray.prototype, interactiveMenu(), { + /** + * + */ + render: function () { + this.$menu = this.decorate(this.menuPath); + this.$tray.addClass(this.tag); + // Bind to menu events. + this.$tray + .find('.interactive-menu') + .once('horizontal-tray') + .on({ + 'itemToggled': this.revealSubitems + }, 'li'); + }, + destroy: function () { + this.$tray.removeClass(this.tag); + }, + revealSubitems: function (event, level, isHidden) { + event.stopPropagation(); + if (level === 1) { + this.$tray[((!isHidden) ? 'add' : 'remove') + 'Class']('expand'); + } + } +}); +}(jQuery, _)); diff --git a/core/modules/toolbar/templates/toolbar.tpl.php b/core/modules/toolbar/templates/toolbar.tpl.php index 5b03fee..268dafb 100644 --- a/core/modules/toolbar/templates/toolbar.tpl.php +++ b/core/modules/toolbar/templates/toolbar.tpl.php @@ -19,15 +19,34 @@ * @ingroup themeable */ ?> - + +
+

+ +
+ + +
+
+ + + +
+
+
diff --git a/core/modules/toolbar/toolbar-rtl.css b/core/modules/toolbar/toolbar-rtl.css deleted file mode 100644 index e121547..0000000 --- a/core/modules/toolbar/toolbar-rtl.css +++ /dev/null @@ -1,37 +0,0 @@ - -#toolbar, -#toolbar * { - text-align: right; -} -#toolbar ul li { - float: right; -} -#toolbar ul li a { - display: inline-block; - float: none; - zoom: 1; -} -#toolbar div.toolbar-menu { - padding: 5px 50px 5px 50px; -} -#toolbar-user { - float: left; -} -#toolbar ul#toolbar-user li { - float: none; - display: inline; -} -#toolbar-menu { - float: none; -} -#toolbar-home { - float: right; -} -#toolbar ul li.home a { - position: absolute; - right: 10px; -} -#toolbar div.toolbar-menu a.toggle { - left: 10px; - right: auto; -} diff --git a/core/modules/toolbar/toolbar.css b/core/modules/toolbar/toolbar.css deleted file mode 100644 index bd18110..0000000 --- a/core/modules/toolbar/toolbar.css +++ /dev/null @@ -1,129 +0,0 @@ - -body.toolbar { - padding-top: 2.2em; -} -body.toolbar-drawer { - padding-top: 5.3em; -} - -/** - * Aggressive resets so we can achieve a consistent look in hostile CSS - * environments. - */ -#toolbar, -#toolbar * { - border: 0; - font-size: 100%; - line-height: inherit; - list-style: none; - margin: 0; - outline: 0; - padding: 0; - text-align: left; /* LTR */ - vertical-align: baseline; -} - -/** - * Base styles. - * - * We use a keyword for the toolbar font size to make it display consistently - * across different themes, while still allowing browsers to resize the text. - */ -#toolbar { - background: #666; - color: #ccc; - font: normal small "Lucida Grande", Verdana, sans-serif; - left: 0; - margin: 0 -20px; - padding: 0 20px; - position: fixed; - right: 0; - top: 0; - box-shadow: 0 3px 20px #000; - z-index: 600; -} -#toolbar div.collapsed { - display: none; - visibility: hidden; -} -#toolbar a { - color: #fff; - font-size: .846em; - text-decoration: none; -} -#toolbar ul li, -#toolbar ul li a { - float: left; /* LTR */ -} - -/** - * Administration menu. - */ -#toolbar div.toolbar-menu { - background: #000; - line-height: 20px; - padding: 5px 50px 5px 10px; /* LTR */ - position: relative; -} -#toolbar-home a span { - background: url(toolbar.png) no-repeat 0 -45px; - display: block; - height: 14px; - margin: 3px 0px; - text-indent: -9999px; - vertical-align: text-bottom; - width: 11px; -} -#toolbar-user { - float: right; /* LTR */ -} -#toolbar-menu { - float: left; /* LTR */ -} -#toolbar div.toolbar-menu a.toggle { - background: url(toolbar.png) 0 -20px no-repeat; - bottom: 0; - cursor: pointer; - height: 25px; - overflow: hidden; - position: absolute; - right: 10px; /* LTR */ - text-indent: -9999px; - width: 25px; -} -#toolbar div.toolbar-menu a.toggle:focus, -#toolbar div.toolbar-menu a.toggle:hover { - background-position: -50px -20px; -} -#toolbar div.toolbar-menu a.toggle-active { - background-position: -25px -20px; -} -#toolbar div.toolbar-menu a.toggle-active.toggle:focus, -#toolbar div.toolbar-menu a.toggle-active.toggle:hover { - background-position: -75px -20px; -} -#toolbar div.toolbar-menu ul li a { - padding: 0 10px; - border-radius: 10px; -} -#toolbar div.toolbar-menu ul li a:focus, -#toolbar div.toolbar-menu ul li a:hover, -#toolbar div.toolbar-menu ul li a:active, -#toolbar div.toolbar-menu ul li a.active:focus { - background: #444; -} -#toolbar div.toolbar-menu ul li a.active:hover, -#toolbar div.toolbar-menu ul li a.active:active, -#toolbar div.toolbar-menu ul li a.active, -#toolbar div.toolbar-menu ul li.active-trail a { - background: url(toolbar.png) 0 0 repeat-x; - text-shadow: #333 0 1px 0; -} - -/** - * Collapsed drawer of additional toolbar content. - */ -#toolbar div.toolbar-drawer { - position: relative; - padding: 0 10px; -} diff --git a/core/modules/toolbar/toolbar.info b/core/modules/toolbar/toolbar.info old mode 100644 new mode 100755 index 758dc9c..1f3a375 --- a/core/modules/toolbar/toolbar.info +++ b/core/modules/toolbar/toolbar.info @@ -3,3 +3,8 @@ description = Provides a toolbar that shows the top-level administration menu it core = 8.x package = Core version = VERSION + +dependencies[] = config +dependencies[] = breakpoint + +configure = admin/structure/toolbar diff --git a/core/modules/toolbar/toolbar.js b/core/modules/toolbar/toolbar.js deleted file mode 100644 index 2353050..0000000 --- a/core/modules/toolbar/toolbar.js +++ /dev/null @@ -1,115 +0,0 @@ -(function ($) { - -"use strict"; - -Drupal.toolbar = Drupal.toolbar || {}; - -/** - * Attach toggling behavior and notify the overlay of the toolbar. - */ -Drupal.behaviors.toolbar = { - attach: function(context, settings) { - var $toolbar = $('#toolbar').once('toolbar'); - if ($toolbar.length) { - - // Set the initial state of the toolbar. - Drupal.toolbar.init(); - - $(window).on('resize.toolbar', Drupal.toolbar.height); - - // Toggling toolbar drawer. - $toolbar.find('a.toggle').once('toolbar-toggle').click(function(e) { - e.preventDefault(); - Drupal.toolbar.toggle(); - // Allow resize event handlers to recalculate sizes/positions. - $(window).triggerHandler('resize'); - }); - } - } -}; - -/** - * Retrieve last saved cookie settings and set up the initial toolbar state. - */ -Drupal.toolbar.init = function() { - // Retrieve the collapsed status from a stored cookie. - var collapsed = $.cookie('Drupal.toolbar.collapsed'); - - // Expand or collapse the toolbar based on the cookie value. - if (collapsed === '1') { - Drupal.toolbar.collapse(); - } - else { - Drupal.toolbar.expand(); - } -}; - -/** - * Collapse the toolbar. - */ -Drupal.toolbar.collapse = function() { - var toggle_text = Drupal.t('Show shortcuts'); - $('#toolbar div.toolbar-drawer').addClass('collapsed'); - $('#toolbar a.toggle') - .removeClass('toggle-active') - .attr('title', toggle_text) - .html(toggle_text); - $('body').removeClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height()); - $.cookie( - 'Drupal.toolbar.collapsed', - 1, - { - path: Drupal.settings.basePath, - // The cookie should "never" expire. - expires: 36500 - } - ); - Drupal.toolbar.height(); - $(document).trigger('offsettopchange'); -}; - -/** - * Expand the toolbar. - */ -Drupal.toolbar.expand = function() { - var toggle_text = Drupal.t('Hide shortcuts'); - $('#toolbar div.toolbar-drawer').removeClass('collapsed'); - $('#toolbar a.toggle') - .addClass('toggle-active') - .attr('title', toggle_text) - .html(toggle_text); - $('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height()); - $.cookie( - 'Drupal.toolbar.collapsed', - 0, - { - path: Drupal.settings.basePath, - // The cookie should "never" expire. - expires: 36500 - } - ); - Drupal.toolbar.height(); - $(document).trigger('offsettopchange'); -}; - -/** - * Toggle the toolbar. - */ -Drupal.toolbar.toggle = function() { - if ($('#toolbar div.toolbar-drawer').hasClass('collapsed')) { - Drupal.toolbar.expand(); - } - else { - Drupal.toolbar.collapse(); - } -}; - -Drupal.toolbar.height = function() { - // @TODO this needs to be cached outside this function. - var $toolbar = $('#toolbar'); - var height = $toolbar.outerHeight(); - $toolbar.attr('data-offset-top', height); - return height; -}; - -})(jQuery); diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module old mode 100644 new mode 100755 index 3717d7b..3ebe6ec --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -41,87 +41,18 @@ function toolbar_theme($existing, $type, $theme, $path) { 'render element' => 'toolbar', 'template' => 'toolbar', ); - $items['toolbar_toggle'] = array( - 'variables' => array( - 'collapsed' => NULL, - 'attributes' => array(), - ), - ); - return $items; -} - -/** - * Implements hook_menu(). - */ -function toolbar_menu() { - $items['toolbar/toggle'] = array( - 'title' => 'Toggle drawer visibility', - 'type' => MENU_CALLBACK, - 'page callback' => 'toolbar_toggle_page', - 'access arguments' => array('access toolbar'), - ); return $items; } /** - * Page callback: Toggles the visibility of the toolbar drawer. - * - * @see toolbar_menu(). - */ -function toolbar_toggle_page() { - global $base_path; - // Toggle the value in the cookie. - setcookie('Drupal.toolbar.collapsed', !_toolbar_is_collapsed(), NULL, $base_path); - // Redirect the user from where he used the toggle element. - drupal_goto(); -} - -/** - * Formats an element used to toggle the toolbar drawer's visibility. - * - * @param $variables - * An associative array containing: - * - collapsed: A boolean value representing the toolbar drawer's visibility. - * - attributes: An associative array of HTML attributes. - * - * @return - * An HTML string representing the element for toggling. - * - * @ingroup themable - */ -function theme_toolbar_toggle($variables) { - if ($variables['collapsed']) { - $toggle_text = t('Show shortcuts'); - } - else { - $toggle_text = t('Hide shortcuts'); - $variables['attributes']['class'][] = 'toggle-active'; - } - return l($toggle_text, 'toolbar/toggle', array('query' => drupal_get_destination(), 'attributes' => array('title' => $toggle_text) + $variables['attributes'])); -} - -/** - * Determines the current state of the toolbar drawer's visibility. - * - * @return - * TRUE when drawer is collapsed, FALSE when it is expanded. - */ -function _toolbar_is_collapsed() { - // PHP converts dots into underscores in cookie names to avoid problems with - // its parser, so we use a converted cookie name. - return isset($_COOKIE['Drupal_toolbar_collapsed']) ? $_COOKIE['Drupal_toolbar_collapsed'] : 0; -} - -/** * Implements hook_page_build(). * - * Add admin toolbar to the page_top region automatically. + * Add admin toolbar to the page_bottom region automatically. */ function toolbar_page_build(&$page) { - $page['page_top']['toolbar'] = array( + $page['page_bottom']['toolbar'] = array( '#pre_render' => array('toolbar_pre_render'), '#access' => user_access('access toolbar'), - 'toolbar_drawer' => array(), ); } @@ -144,11 +75,8 @@ function toolbar_pre_render($toolbar) { * Add some page classes, so global page theming can adjust to the toolbar. */ function toolbar_preprocess_html(&$vars) { - if (isset($vars['page']['page_top']['toolbar']) && user_access('access toolbar')) { + if (isset($vars['page']['page_bottom']['toolbar']) && user_access('access toolbar')) { $vars['attributes']['class'][] = 'toolbar'; - if (!_toolbar_is_collapsed()) { - $vars['attributes']['class'][] = 'toolbar-drawer'; - } } } @@ -159,13 +87,14 @@ function toolbar_preprocess_html(&$vars) { * down, so it appears below the toolbar. */ function toolbar_preprocess_toolbar(&$variables) { + $variables['attributes']['class'][] = "toolbar-main"; $variables['attributes']['class'][] = "overlay-displace-top"; } /** * Implements hook_system_info_alter(). * - * Indicate that the 'page_top' region (in which the toolbar will be displayed) + * Indicate that the 'page_bottom' region (in which the toolbar will be displayed) * is an overlay supplemental region that should be refreshed whenever its * content is updated. * @@ -174,7 +103,7 @@ function toolbar_preprocess_toolbar(&$variables) { */ function toolbar_system_info_alter(&$info, $file, $type) { if ($type == 'theme') { - $info['overlay_supplemental_regions'][] = 'page_top'; + $info['overlay_supplemental_regions'][] = 'page_bottom'; } } @@ -196,14 +125,26 @@ function toolbar_view() { ), ); - // Retrieve the admin menu from the database. - $links = toolbar_menu_navigation_links(toolbar_get_menu_tree()); - $build['toolbar_menu'] = array( - '#theme' => 'links__toolbar_menu', - '#links' => $links, - '#attributes' => array('id' => 'toolbar-menu'), - '#heading' => array('text' => t('Administrative toolbar'), 'level' => 'h2', 'class' => 'element-invisible'), - ); + // Get the configured breakpoint for switch from vertical to horizontal + // toolbar presentation. + $breakpoints = entity_load('breakpoint_group', 'module.toolbar.toolbar'); + if (!empty($breakpoints)) { + $build['#attached']['js'] = array( + array( + 'data' => array( + 'toolbar' => array( + 'breakpoints' => array(), + ), + ), + 'type' => 'setting', + ) + ); + // // Load the breakpoints for toolbar. + foreach ($breakpoints->breakpoints as $key => $breakpoint) { + $build['#attached']['js'][0]['data']['toolbar']['breakpoints'][$key] = $breakpoint->mediaQuery; + } + } + // Add logout & user account links or login link. if ($user->uid) { @@ -212,11 +153,17 @@ function toolbar_view() { 'title' => t('Hello @username', array('@username' => user_format_name($user))), 'href' => 'user', 'html' => TRUE, - 'attributes' => array('title' => t('User account')), + 'attributes' => array( + 'title' => t('User account'), + 'class' => array('tab'), + ), ), 'logout' => array( 'title' => t('Log out'), 'href' => 'user/logout', + 'attributes' => array( + 'class' => array('tab'), + ), ), ); } @@ -225,47 +172,63 @@ function toolbar_view() { 'login' => array( 'title' => t('Log in'), 'href' => 'user', + 'attributes' => array( + 'class' => array('tab'), + ), ), ); } + // Theme the toolbar user action links. $build['toolbar_user'] = array( '#theme' => 'links__toolbar_user', '#links' => $links, - '#attributes' => array('id' => 'toolbar-user'), + '#attributes' => array( + 'id' => 'toolbar-user', + 'class' => array('menu'), + ), + '#heading' => array('text' => t('Toolbar user actions'), 'level' => 'h2', 'class' => 'element-invisible'), ); - // Add a "home" link. - $link = array( + // Build the default toolbar navigation links. + $links = array( + 'toolbar_tray_toggle' => array( + 'title' => t('Menu'), + 'href' => '', + 'html' => FALSE, + 'attributes' => array( + 'class' => array('tab', 'toggle', 'toggle-tray'), + 'role' => 'button', + ), + ), 'home' => array( - 'title' => 'Home', + 'title' => t('Home'), 'href' => '', - 'html' => TRUE, - 'attributes' => array('title' => t('Home')), + 'html' => FALSE, + 'attributes' => array( + 'title' => t('Home'), + 'class' => array('tab', 'home-link'), + ), ), ); - $build['toolbar_home'] = array( + + // Toolbar navigation links. + $build['toolbar_navigation'] = array( '#theme' => 'links', - '#links' => $link, - '#attributes' => array('id' => 'toolbar-home'), + '#links' => $links, + '#attributes' => array( + 'class' => array('menu', 'navigation'), + ), + '#heading' => array('text' => t('Toolbar navigation'), 'level' => 'h2', 'class' => 'element-invisible'), ); - // Add an anchor to be able to toggle the visibility of the drawer. - $build['toolbar_toggle'] = array( - '#theme' => 'toolbar_toggle', - '#collapsed' => _toolbar_is_collapsed(), - '#attributes' => array('class' => array('toggle')), - ); + // Retrieve the admin menu from the database. + $tree = toolbar_get_menu_tree(); + // Add attributes to the links before rendering. + toolbar_menu_navigation_links($tree); + $build['toolbar_menu'] = menu_tree_output($tree); - // Prepare the drawer links CSS classes. - $toolbar_drawer_classes = array( - 'toolbar-drawer', - 'clearfix', - ); - if (_toolbar_is_collapsed()) { - $toolbar_drawer_classes[] = 'collapsed'; - } - $build['toolbar_drawer']['#type'] = 'container'; - $build['toolbar_drawer']['#attributes']['class'] = $toolbar_drawer_classes; + // Shortcuts. + $build['toolbar_shortcuts'] = array(); return $build; } @@ -280,14 +243,13 @@ function toolbar_get_menu_tree() { $tree = array(); $admin_link = db_query('SELECT * FROM {menu_links} WHERE menu_name = :menu_name AND module = :module AND link_path = :path', array(':menu_name' => 'management', ':module' => 'system', ':path' => 'admin'))->fetchAssoc(); if ($admin_link) { - $tree = menu_build_tree('management', array( - 'expanded' => array($admin_link['mlid']), - 'min_depth' => $admin_link['depth'] + 1, - 'max_depth' => $admin_link['depth'] + 1, - )); + $tree = menu_tree_all_data('management'); } - - return $tree; + // Return the sub-menus of the management menu root. + foreach ($tree as $key => $menu) { + return (!empty($tree[$key]['below'])) ? $tree[$key]['below'] : array(); + } + return array(); } /** @@ -299,34 +261,16 @@ function toolbar_get_menu_tree() { * @return * An array of links as defined above. */ -function toolbar_menu_navigation_links($tree) { - $links = array(); - foreach ($tree as $item) { - if (!$item['link']['hidden'] && $item['link']['access']) { - // Make sure we have a path specific ID in place, so we can attach icons - // and behaviors to the items. - $id = str_replace(array('/', '<', '>'), array('-', '', ''), $item['link']['href']); - - $link = $item['link']['localized_options']; - $link['href'] = $item['link']['href']; - // Add icon placeholder. - $link['title'] = '' . check_plain($item['link']['title']); - // Add admin link ID. - $link['attributes'] = array('id' => 'toolbar-link-' . $id); - if (!empty($item['link']['description'])) { - $link['title'] .= ' (' . $item['link']['description'] . ')'; - $link['attributes']['title'] = $item['link']['description']; - } - $link['html'] = TRUE; - - $class = ' path-' . $id; - if (toolbar_in_active_trail($item['link']['href'])) { - $class .= ' active-trail'; - } - $links['menu-' . $item['link']['mlid'] . $class] = $link; +function toolbar_menu_navigation_links(&$tree) { + foreach ($tree as $key => $item) { + // Configure sub-items. + if (!empty($item['below'])) { + toolbar_menu_navigation_links($tree[$key]['below']); } + // Make sure we have a path specific ID in place, so we can attach icons + // and behaviors to the items. + $tree[$key]['link']['localized_options']['attributes']['id'] = 'toolbar-link-' . str_replace(array('/', '<', '>'), array('-', '', ''), $item['link']['link_path']); } - return $links; } /** @@ -365,13 +309,16 @@ function toolbar_library_info() { 'title' => 'Toolbar', 'version' => VERSION, 'js' => array( - drupal_get_path('module', 'toolbar') . '/toolbar.js' => array(), + drupal_get_path('module', 'toolbar') . '/js/toolbar.js' => array(), ), 'css' => array( - drupal_get_path('module', 'toolbar') . '/toolbar.css', + drupal_get_path('module', 'toolbar') . '/css/toolbar.base.css', + drupal_get_path('module', 'toolbar') . '/css/toolbar.theme.css', ), 'dependencies' => array( + array('system', 'matchMedia'), array('system', 'jquery'), + array('system', 'underscore'), array('system', 'drupal'), array('system', 'drupalSettings'), array('system', 'jquery.once'), diff --git a/core/modules/toolbar/toolbar.png b/core/modules/toolbar/toolbar.png deleted file mode 100644 index f2c7f35..0000000 --- a/core/modules/toolbar/toolbar.png +++ /dev/null @@ -1,4 +0,0 @@ -PNG - - IHDRd9,~OPLTEfffffffffffffff===>>>GGGHHHPPPQQQXXXfffstRNSO^zIDATx[O@o -VK71i}.f.Ifbd`pg01\. \ԌP`MRhUl DB(gŰ8!+2VL,Z$MNY16:V,fKzANJZ?6 se]OԍI_"[Wߺ, }8D !yP,G9BUĩ%W'X"_U!N<*"IENDB` \ No newline at end of file -- 1.7.10.4