aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2013-11-08 11:32:42 -0800
committerCesar G <prototech91@gmail.com>2013-12-06 00:44:48 -0800
commit4b0410a9d9ab9a405722f0d14d659ab3b7096f11 (patch)
tree75451710d5689b19da6e3490061099e5e70aaafd
parent4684ba08690b1a6e305d9f6bf8d38cacb86dc387 (diff)
downloadforums-4b0410a9d9ab9a405722f0d14d659ab3b7096f11.tar
forums-4b0410a9d9ab9a405722f0d14d659ab3b7096f11.tar.gz
forums-4b0410a9d9ab9a405722f0d14d659ab3b7096f11.tar.bz2
forums-4b0410a9d9ab9a405722f0d14d659ab3b7096f11.tar.xz
forums-4b0410a9d9ab9a405722f0d14d659ab3b7096f11.zip
[ticket/11241] Add dropdown control button.
PHPBB3-11241
-rw-r--r--phpBB/assets/javascript/core.js9
-rw-r--r--phpBB/styles/prosilver/theme/buttons.css40
-rw-r--r--phpBB/styles/prosilver/theme/colours.css27
-rw-r--r--phpBB/styles/prosilver/theme/common.css18
-rwxr-xr-x[-rw-r--r--]phpBB/styles/prosilver/theme/images/buttons.pngbin2563 -> 2923 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_download.gifbin0 -> 198 bytes
6 files changed, 87 insertions, 7 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 8d0db5da1a..5b8331bdce 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -932,6 +932,14 @@ phpbb.toggleDropdown = function() {
};
/**
+* Toggle dropdown submenu
+*/
+phpbb.toggleSubmenu = function(e) {
+ $(this).siblings('.dropdown-submenu').toggle();
+ e.preventDefault();
+}
+
+/**
* Register dropdown menu
* Shows/hides dropdown, decides which side to open to
*
@@ -962,6 +970,7 @@ phpbb.registerDropdown = function(toggle, dropdown, options)
toggle.data('dropdown-options', ops);
toggle.click(phpbb.toggleDropdown);
+ $('.dropdown-toggle-submenu', ops.parent).click(phpbb.toggleSubmenu);
};
/**
diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css
index cdd325fb13..89fdcd85a8 100644
--- a/phpBB/styles/prosilver/theme/buttons.css
+++ b/phpBB/styles/prosilver/theme/buttons.css
@@ -11,13 +11,13 @@
}
/* Rollover state */
-.buttons div {
+.buttons div, .dropdown-select {
float: left;
margin: 0 5px 0 0;
}
/* Rolloff state */
-.buttons div a {
+.buttons div a, .dropdown-select {
display: inline-block;
line-height: 17.5px;
height: 18px;
@@ -38,7 +38,7 @@
.buttons div span { display: none; }
-.buttons div a:after {
+.buttons div a:after, .dropdown-select:after {
content: '';
display: block;
position: absolute;
@@ -54,6 +54,35 @@
background-position: 0 -20px;
}
+.dropdown-select {
+ cursor: pointer;
+ font-family: inherit;
+ font-size: 1em;
+ font-weight: normal;
+}
+
+.dropdown-select:after {
+ background-position: -103px 10px;
+ border-left: 1px solid;
+ margin-top: 0;
+ top: 0;
+ right: 0;
+ height: 21px;
+ width: 15px;
+}
+
+.dropdown-visible .dropdown-select:after, .nojs .dropdown-container:hover .dropdown-select:after {
+ background-position: -103px -10px;
+}
+
+.dropdown-select-icon:before {
+ content: '';
+ display: block;
+ float: left;
+ margin-right: 4px;
+ margin-top: 2px;
+}
+
/* Big button images */
.buttons div.reply-icon a:after, .buttons div.pmreply-icon a:after { background-position: -20px 0; }
.buttons div.reply-icon a:hover:after, .buttons div.pmreply-icon a:hover:after { background-position: -20px -20px; }
@@ -67,6 +96,11 @@
.buttons div.forwardpm-icon a:after { background-position: -40px 0; }
.buttons div.forwardpm-icon a:hover:after { background-position: -40px -20px; }
+.dropdown-select.tools-icon:before { background-position: -80px 0; height: 16px; width: 16px; }
+
+.dropdown-visible .dropdown-select.tools-icon:before,
+.nojs .dropdown-container:hover .dropdown-select.tools-icon:before { background-position: -80px -20px; }
+
/* Sub-header (navigation bar)
--------------------------------------------- */
a.print, a.sendemail {
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 55b01f1269..8258262276 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -231,7 +231,6 @@ p.post-notice.reported:before, p.post-notice.error:before {
background-image: url("./images/icon_topic_reported.gif");
}
-
/*
--------------------------------------------------------------
Colours and backgrounds for links.css
@@ -655,7 +654,7 @@ a.sendemail {
background-image: url("./images/icon_sendemail.gif");
}
-.buttons div a {
+.buttons div a, .dropdown-select {
border-color: #C7C3BF;
background-color: #FFFFFF;
background-image: -moz-linear-gradient(top, #FFFFFF, #E9E9E9);
@@ -668,7 +667,15 @@ a.sendemail {
color: #BC2A4D !important;
}
-.buttons div a:hover {
+.dropdown-select {
+ color: #5C6482 !important;
+}
+
+.dropdown-select:after {
+ border-color: #DADADA;
+}
+
+.buttons div a:hover, .dropdown-select:hover {
border-color: #0a8ed0;
background-image: -moz-linear-gradient(top, #E9E9E9, #FFFFFF);
background-image: -webkit-linear-gradient(top, #E9E9E9, #FFFFFF);
@@ -678,7 +685,18 @@ a.sendemail {
text-shadow: 1px 1px 0 #FFFFFF, -1px -1px 0 #FFFFFF, -1px -1px 0 rgba(188, 42, 77, 0.2);
}
-.buttons div a:after {
+.dropdown-select:hover {
+ border-color: #C7C3BF;
+}
+
+.dropdown-visible .dropdown-select, .dropdown-visible .dropdown-select:hover, .nojs .dropdown-container:hover .dropdown-select {
+ background-color: #FFFFFF;
+ background-image: none;
+ border-color: #A6B2BA;
+ color: #105289 !important;
+}
+
+.buttons div a:after, .dropdown-select-icon:before, .dropdown-select:after {
background-image: url("images/buttons.png");
}
@@ -698,6 +716,7 @@ a.sendemail {
.icon-search, .responsive-search a { background-image: url("./images/icon_search.gif"); }
.icon-notification { background-image: url("./images/icon_notification.gif"); }
.icon-pm { background-image: url("./images/icon_pm.gif"); }
+.icon-download { background-image: url("./images/icon_download.gif"); }
/* Profile & navigation icons */
.email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); }
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 3cc3ce1afe..8d65c96a72 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -463,6 +463,10 @@ ul.linklist.bulletin li.no-bulletin:before {
padding: 9px 0 0;
}
+.dropdown-container.topic-tools {
+ float: left;
+}
+
.dropdown-up .dropdown {
top: auto;
bottom: 1.2em;
@@ -474,6 +478,15 @@ ul.linklist.bulletin li.no-bulletin:before {
right: 0;
}
+.dropdown-button-control .dropdown {
+ top: 24px;
+}
+
+.dropdown-button-control.dropdown-up .dropdown {
+ top: auto;
+ bottom: 24px;
+}
+
.dropdown .pointer, .dropdown .pointer-inner {
position: absolute;
width: 0;
@@ -536,11 +549,16 @@ ul.linklist.bulletin li.no-bulletin:before {
.dropdown li {
float: none;
+ list-style: none;
margin: 0;
white-space: nowrap;
text-align: left;
}
+.dropdown li li {
+ padding-left: 10px;
+}
+
.wrap .dropdown li, .dropdown.wrap li, #notification_list li {
white-space: normal;
}
diff --git a/phpBB/styles/prosilver/theme/images/buttons.png b/phpBB/styles/prosilver/theme/images/buttons.png
index a19abdc2b8..3a8c2f2f65 100644..100755
--- a/phpBB/styles/prosilver/theme/images/buttons.png
+++ b/phpBB/styles/prosilver/theme/images/buttons.png
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_download.gif b/phpBB/styles/prosilver/theme/images/icon_download.gif
new file mode 100644
index 0000000000..70cd61caf2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_download.gif
Binary files differ