diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-06-20 10:37:30 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-06-20 10:37:30 +0200 |
| commit | ccb8fd18e2e20d3f843c713e7c23aeba2227148c (patch) | |
| tree | e2f7dec128700c128ad670f3d314fec075b15949 /phpBB/assets/javascript | |
| parent | 99e08bffd827ac4b1f3396955ec0ee6ae73bb0b6 (diff) | |
| parent | 0f034ca7173c700c9b6de4b9ebf9cead56f17207 (diff) | |
| download | forums-ccb8fd18e2e20d3f843c713e7c23aeba2227148c.tar forums-ccb8fd18e2e20d3f843c713e7c23aeba2227148c.tar.gz forums-ccb8fd18e2e20d3f843c713e7c23aeba2227148c.tar.bz2 forums-ccb8fd18e2e20d3f843c713e7c23aeba2227148c.tar.xz forums-ccb8fd18e2e20d3f843c713e7c23aeba2227148c.zip | |
Merge pull request #2514 from prototech/ticket/12553
[ticket/12553] Right-to-left fixes.
* prototech/ticket/12553:
[ticket/12553] Fix responsive user profile.
[ticket/12553] Fix responsive post profile.
[ticket/12553] Remove dropdown-trigger class from member search input.
[ticket/12553] Fix the merge topic list.
[ticket/12553] Fix dropdown position of live search
[ticket/12553] Fix the responsive topic/forum lists.
[ticket/12553] Align the text in responsive tables to the right.
[ticket/12553] Center the responsive CP menus instead of floating right.
[ticket/12553] Open the notification dropdown to the left.
[ticket/12553] Fix alignment of contact icon.
[ticket/12553] Fix incorrect alignment in ACP responsive tables.
[ticket/12553] Align alert text to the right.
[ticket/12553] Remove incorrect size for site logo.
[ticket/12553] Fix links in the last post column that are not clickable.
[ticket/12553] Align contact icons to the right.
[ticket/12553] Move Place inline and Delete buttons left of the file name.
Diffstat (limited to 'phpBB/assets/javascript')
| -rw-r--r-- | phpBB/assets/javascript/core.js | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 80c44ec08f..785aa141f0 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -874,19 +874,6 @@ phpbb.timezonePreselectSelect = function(forceSelector) { } }; -// Toggle notification list -$('#notification_list_button').click(function(e) { - $('#notification_list').toggle(); - e.preventDefault(); -}); -$('#phpbb').click(function(e) { - var target = $(e.target); - - if (!target.is('#notification_list, #notification_list_button') && !target.parents().is('#notification_list, #notification_list_button')) { - $('#notification_list').hide(); - } -}); - phpbb.ajaxCallbacks = {}; /** @@ -1516,11 +1503,37 @@ phpbb.getFunctionByName = function (functionName) { }; /** -* Apply code editor to all textarea elements with data-bbcode attribute +* Register page dropdowns. */ -$(document).ready(function() { - $('textarea[data-bbcode]').each(function() { - phpbb.applyCodeEditor(this); +phpbb.registerPageDropdowns = function() { + $('body').find('.dropdown-container').each(function() { + var $this = $(this), + trigger = $this.find('.dropdown-trigger:first'), + contents = $this.find('.dropdown'), + options = { + direction: 'auto', + verticalDirection: 'auto' + }, + data; + + if (!trigger.length) { + data = $this.attr('data-dropdown-trigger'); + trigger = data ? $this.children(data) : $this.children('a:first'); + } + + if (!contents.length) { + data = $this.attr('data-dropdown-contents'); + contents = data ? $this.children(data) : $this.children('div:first'); + } + + if (!trigger.length || !contents.length) return; + + if ($this.hasClass('dropdown-up')) options.verticalDirection = 'up'; + if ($this.hasClass('dropdown-down')) options.verticalDirection = 'down'; + if ($this.hasClass('dropdown-left')) options.direction = 'left'; + if ($this.hasClass('dropdown-right')) options.direction = 'right'; + + phpbb.registerDropdown(trigger, contents, options); }); // Hide active dropdowns when click event happens outside @@ -1530,6 +1543,17 @@ $(document).ready(function() { $(phpbb.dropdownHandles).each(phpbb.toggleDropdown); } }); +} + +/** +* Apply code editor to all textarea elements with data-bbcode attribute +*/ +$(document).ready(function() { + $('textarea[data-bbcode]').each(function() { + phpbb.applyCodeEditor(this); + }); + + phpbb.registerPageDropdowns(); $('#color_palette_placeholder').each(function() { phpbb.registerPalette($(this)); |
