Dropdown Menu Widget - Version 1.7

Version Description

  • Added: brand new options page.
  • Added: Web2.0 Theme.
  • Added: width option to widgets.
  • Fixed: Right aligned menu dropdown errors.
  • Added: Effect delay option (hoverIntent).
  • Added: Plugin both search theme & template folders for dropdown.css
  • Added: Adminbar button to easily change current options.
Download this release

Release Info

Developer mattsay
Plugin Icon wp plugin Dropdown Menu Widget
Version 1.7
Comparing to
See all releases

Code changes from version 1.6.4 to 1.7

admin.css DELETED
@@ -1,28 +0,0 @@
1
- /** Dropdown Menu Widget Admin Styles */
2
- .shailan_dm_input{padding:10px;}
3
- .shailan_dm_input small{font-style:italic; font-size:smaller; color:#666;}
4
- .shailan_dm_input label{ font-size:12px;
5
- width:200px;
6
- display:block;
7
- float:left; }
8
-
9
- .shailan_dm_input input[type=text]{
10
- width:280px;}
11
-
12
- .shailan_dm_input textarea{
13
- width:400px; height:150px; }
14
-
15
- #widgets-right .widgets-sortables{ min-height:0px; }
16
-
17
- .widget-holder{position:relative; zoom:1;}
18
-
19
- #picker{ position:absolute; top:10px; right:10px; }
20
-
21
-
22
-
23
- .sidebar-name{overflow:auto; display:block;}
24
- .sidebar-name h3{float:left;}
25
- .sidebar-name span{float:right;}
26
-
27
- input.selected{border:1px solid #f93}
28
- input.color-error{border:1px solid #f00;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
blank.gif DELETED
Binary file
css/admin.css DELETED
@@ -1,39 +0,0 @@
1
- /** Dropdown Menu Widget Admin Styles */
2
- .shailan_dm_input{padding:10px;}
3
- .shailan_dm_input.shailan_dm_paragraph{ background: #ddd; padding:10px; }
4
- .shailan_dm_input.shailan_dm_splitter{ border-top:1px solid #ddd; font-size:1px; line-height:1px; height:1px; margin-top:12px; margin-bottom:12px; padding:0; }
5
- .shailan_dm_paragraph p{ margin:0; line-height:1.5em; }
6
- .shailan_dm_input small{font-style:italic; font-size:smaller; color:#666;}
7
- .shailan_dm_input label{ font-size:12px;
8
- width:200px;
9
- display:block;
10
- float:left; }
11
-
12
- .shailan_dm_input input[type=text]{
13
- width:280px;}
14
-
15
- .shailan_dm_input textarea{
16
- width:400px; height:150px; }
17
-
18
- .widget-holder{ position:relative; zoom:1; }
19
-
20
- #widgets-right .widgets-sortables{ min-height:0px; position:relative; }
21
-
22
- #picker{ position:absolute; top:10px; right:10px; }
23
-
24
- .sidebar-name{overflow:auto; display:block;}
25
- .sidebar-name h3{float:left;}
26
- .sidebar-name span{float:right;}
27
-
28
- input.selected{border:1px solid #f93}
29
- input.color-error{border:1px solid #f00;}
30
-
31
- .ads{
32
- background-color: #F1F1F1;
33
- border: 1px solid #DDDDDD;
34
- padding: 10px;
35
- text-align:center;
36
- border-radius: 8px 8px;
37
- -moz-border-radius: 8px 8px;
38
- -webkit-border-radius: 8px 8px;
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/dropdown-admin.css ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /** Dropdown Menu Widget Admin Styles */
3
+
4
+ .stf_options_page{ font-family: 'Droid Sans', serif; }
5
+
6
+ #shailancom{ float:right; width:250px; }
7
+ #shailancom li{ font-family: 'Droid Sans', serif; font-size: 115%; line-height:150%; margin-bottom:1em; }
8
+ #stf_nav{ font-family: 'Droid Sans', serif; font-size: 110%; line-height:150%; margin-bottom:1em; margin:5px 15px 10px 45px; color:#ddd; }
9
+ #stf_nav a{ text-decoration:none }
10
+ #donate {
11
+ padding: 10px;
12
+ border: 1px solid #E6DB55;
13
+ border-radius: 10px;
14
+ margin-bottom: 15px;
15
+ font-style: italic;
16
+ text-align: center;
17
+ background: lightYellow;
18
+ color: #827500;
19
+ }
20
+ #stf_tweet{ background-color:#EAF9FE; border:1px solid #B0ECEE; border-radius:10px; padding:10px; }
21
+ #stf_tweet li{ margin:0; font-size:13px; color:#208FBE; }
22
+
23
+ .follow-link {
24
+ font-style: italic;
25
+ padding: 5px 15px 5px 30px;
26
+ display: block;
27
+ background: url(images/twitter.png) 13px 50% no-repeat;
28
+ }
29
+
30
+ .stf_share{ background:#ededed; padding:5px; border-radius:5px; overflow:hidden; margin-right:15px; }
31
+ .share-label, .share-button{ display:inline; float:left; margin-right:10px; }
32
+ .share-label{
33
+ margin-top: 3px;
34
+ margin-left: 5px;
35
+ font-size: 16px;
36
+ text-shadow: white 1px 1px 0;
37
+ color: #aaa;
38
+ } .stf_share:hover .share-label{ color:#21759B }
39
+ .tweet{ margin-top:2px; }
40
+ .panel{ background: #ededed; border-bottom:1px solid #ddd; }
41
+ a.helplink{ color:#666; text-decoration:none; }
42
+
43
+ .shailan_dm_input{padding:10px;}
44
+ .shailan_dm_input small{font-style:italic; font-size:smaller; color:#666;}
45
+ .shailan_dm_input label{ font-size:12px;
46
+ width:200px;
47
+ display:block;
48
+ float:left; }
49
+
50
+ .shailan_dm_input input[type=text]{
51
+ width:280px;}
52
+
53
+ .shailan_dm_input textarea{
54
+ width:400px; height:150px; }
55
+
56
+ #widgets-right .widgets-sortables{ min-height:0px; }
57
+
58
+ .widget-holder{position:relative; zoom:1;}
59
+
60
+ #picker{
61
+ position: absolute;
62
+ top: 10px;
63
+ right: 10px;
64
+ background: white;
65
+ box-shadow: #999 0 1px 15px;
66
+ border-radius: 8px;
67
+ }
68
+
69
+ .sidebar-name{overflow:auto; display:block;}
70
+ .sidebar-name h3{float:left;}
71
+ .sidebar-name span{float:right;}
72
+
73
+ input.selected{border:1px solid #f93}
74
+ input.color-error{border:1px solid #f00;}
75
+
76
+
77
+
78
+ .stf_options { margin-top: 20px; margin-right:265px; text-shadow:#fff 0 0 1px }
79
+ .stf_opts_wrap{ width:100%; margin-right:-265px; }
80
+ .stf_section{ }
81
+ .stf_options label{ font-size:14px; font-weight:500; width:230px; display:block; float:left; line-height:24px; }
82
+ .stf_paragraph{ padding:10px; background:#eee; border-radius:8px; }
83
+ .stf_input { padding:10px 10px; border-bottom:1px solid #eee; }
84
+ .stf_options small{
85
+ display: block;
86
+ float: left;
87
+ width: 330px;
88
+ color: #999;
89
+ font-style: italic;
90
+ font-size: 13px;
91
+ margin-left: 15px;
92
+ line-height: 24px;
93
+ }
94
+ .stf_options small:hover{ color:#444; }
95
+ .stf_options input[type="text"], .stf_options textarea, .stf_options select {
96
+ width:250px; font-size:12px; padding:4px; color:#333; line-height:1em; background:#efefef; float:left; }
97
+ .stf_options input[type="checkbox"]{ float:left; margin:5px 0; }
98
+ .stf_input input:focus, .stf_input textarea:focus{ background:#fff; }
99
+ .stf_input textarea{ width:250px; height:135px; font-size:12px; padding:4px; color:#333; line-height:1.5em; background:#efefef;
100
+ }
101
+ .stf_table th, .stf_table td{ border:1px solid #bbb; padding:10px; text-align:center; }
102
+ .stf_table th, .stf_table td.feature{ border-color:#ccc; }
103
+
104
+ .stf_options ul.tabs {
105
+ margin: 0;
106
+ padding: 0;
107
+ list-style: none;
108
+ height: 32px; /*--Set height of tabs--*/
109
+ border-bottom: 1px solid #ddd;
110
+ /* border-left: 1px solid #ddd; */
111
+ border-left: 0;
112
+ border-top-left-radius: 4px;
113
+ width: 100%;
114
+ float:none;
115
+ }
116
+ .stf_options ul.tabs li {
117
+ float: left;
118
+ margin: 0;
119
+ padding: 0;
120
+ height: 31px; /*--Subtract 1px from the height of the unordered list--*/
121
+ line-height: 31px; /*--Vertically aligns the text within the tab--*/
122
+ border: 1px solid #ddd;
123
+ /*border-left: none;*/
124
+ margin-bottom: -1px; /*--Pull the list item down 1px--*/
125
+ overflow: hidden;
126
+ position: relative;
127
+ background: #efefef;
128
+ border-top-left-radius: 4px;
129
+ border-top-right-radius: 4px;
130
+ font-family: 'Droid Sans', serif;
131
+ }
132
+ .stf_options ul.tabs li a {
133
+ text-decoration: none;
134
+ color: #999;
135
+ display: block;
136
+ font-size: 1.3em;
137
+ padding: 0 10px 0 10px;
138
+ border: 1px solid #fff; /*--Gives the bevel look with a 1px white border inside the list item--*/
139
+ outline: none;
140
+ background-position: 6px 50%;
141
+ background-repeat: no-repeat;
142
+ border-top-left-radius: 6px;
143
+ border-top-right-radius: 6px;
144
+ }
145
+ .stf_options ul.tabs li a:hover { background-color: #fff; }
146
+ .stf_options ul.tabs li:hover { border-top:1px solid #f60; }
147
+
148
+ html .stf_options ul.tabs li.active, html .stf_options ul.tabs li.active a:hover { /*--Makes sure that the active tab does not listen to the hover properties--*/
149
+ background-color: #fff;
150
+ border-bottom: 1px solid #fff; /*--Makes the active tab look like it's connected with its content--*/
151
+ border-top-left-radius: 5px;
152
+ border-top-right-radius: 5px;
153
+ }
154
+
155
+ html .stf_options ul.tabs li.active { /*--Makes sure that the active tab does not listen to the hover properties--*/
156
+ border-top-color:#2275AA;
157
+ }
158
+
159
+ .stf_options .tab_container {
160
+ border: 1px solid #ddd; border-top: none; float:none; clear:none; overflow: hidden; width: 100%; background: #fff; position: relative; }
161
+ .stf_options .tab_content { padding: 20px; }
162
+
163
+ .stf_options #tabs-footer{
164
+ padding: 15px;
165
+ border-top: 1px solid #ddd;
166
+ overflow: hidden;
167
+ background: transparent;
168
+ }
169
+ #tabs-footer .copyright { margin-top: 24px }
170
+ .stf_options #tabs-footer p.submit{ margin:0; padding:0; float:right; }
171
+ .stf_options #options-tabs .button-primary {
172
+ background-image: url('images/disk.png');
173
+ background-position: 12px 50%;
174
+ background-repeat: no-repeat;
175
+ padding: 12px 30px 12px 40px;
176
+ border-radius: 8px;
177
+ -webkit-border-radius: 8px;
178
+ -moz-border-radius: 5px;
179
+ font-family: 'Droid Sans', serif;
180
+ font-size: 16px !important; font-weight:normal; text-shadow: #1A5B77 1px 1px 1px;}
181
+
182
+ .stf_options #options-tabs .button-primary:hover{ background-color: #298CBA; }
183
+ .stf_options #options-tabs .button-primary:active{ background-color: #21759B; }
184
+
185
+ .stf_options #options-tabs .wysiwyg{ float:left; padding:0; }
186
+ .stf_options #options-tabs .wysiwyg ul.panel li { background-color:transparent; }
187
+
188
+ .stf_options ul.tabs li a.general { padding-left:28px; background-image: url('images/cog.png'); }
189
+ .stf_options ul.tabs li a.advanced { padding-left:28px; background-image: url('images/wrench_orange.png'); }
190
+ .stf_options ul.tabs li a.colors { padding-left:28px; background-image: url('images/color_wheel.png'); }
191
+ .stf_options ul.tabs li a.effects { padding-left:28px; background-image: url('images/lightning.png'); }
192
+ .stf_options ul.tabs li a.template-tag { padding-left:28px; background-image: url('images/tag.png'); }
193
+
194
+
195
+ /* Clearfix */
196
+ .clearfix:after {
197
+ clear: both;
198
+ content: ".";
199
+ display: block;
200
+ height: 0;
201
+ visibility: hidden;
202
+ }
203
+ * html > body .clearfix {
204
+ display: block;
205
+ width: 100%;
206
+ }
207
+ * html .clearfix {
208
+ height: 1%;
209
+ }
css/images/cog.png ADDED
Binary file
css/images/color_wheel.png ADDED
Binary file
css/images/disk.png ADDED
Binary file
css/images/font.png ADDED
Binary file
css/images/lightning.png ADDED
Binary file
css/images/tag.png ADDED
Binary file
css/images/twitter.png ADDED
Binary file
css/images/wrench_orange.png ADDED
Binary file
css/shailan-dropdown-old.css DELETED
@@ -1,85 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- ul.dropdown,
4
- ul.dropdown li,
5
- ul.dropdown ul {
6
- list-style: none;
7
- margin: 0;
8
- padding: 0;
9
- }
10
-
11
- ul.dropdown {
12
- position: relative;
13
- z-index: 597;
14
- float: left;
15
- }
16
-
17
- ul.dropdown li {
18
- float: left;
19
- line-height: 1.3em;
20
- vertical-align: middle;
21
- zoom: 1;
22
- }
23
-
24
- ul.dropdown li.hover,
25
- ul.dropdown li:hover {
26
- position: relative;
27
- z-index: 599;
28
- cursor: default;
29
- }
30
-
31
- ul.dropdown ul {
32
- visibility: hidden;
33
- position: absolute;
34
- top: 100%;
35
- left: 0;
36
- z-index: 598;
37
- }
38
-
39
- ul.dropdown ul li {
40
- float: none;
41
- }
42
-
43
- ul.dropdown ul ul {
44
- top: 1px;
45
- left: 99%;
46
- }
47
-
48
- ul.dropdown li:hover > ul { visibility: visible; }
49
-
50
- /* Vertical menu support */
51
- ul.dropdown-vertical { /*width: 200px;*/ }
52
- ul.dropdown-vertical ul { top: 1px; left: 99%; }
53
- ul.dropdown-vertical li { float: none; }
54
-
55
- /* IE Support */
56
-
57
- * html ul.dropdown li {
58
- height: 1px;
59
- }
60
-
61
- ul.dropdown ul li,
62
- ul.dropdown-vertical {
63
- margin-left: -16px;
64
- mar\gin-left: 0;
65
- }
66
-
67
- ul.dropdown ul,
68
- ul.dropdown li:hover ul ul,
69
- ul.dropdown li:hover ul ul ul,
70
- ul.dropdown li:hover ul ul ul ul,
71
- ul.dropdown li:hover ul ul ul ul ul {
72
- visibility: hidden;
73
- }
74
-
75
- ul.dropdown li:hover ul,
76
- ul.dropdown ul li:hover ul,
77
- ul.dropdown ul ul li:hover ul,
78
- ul.dropdown ul ul ul li:hover ul,
79
- ul.dropdown ul ul ul ul li:hover ul {
80
- visibility: visible;
81
- }
82
-
83
- ul.dropdown ul ul ul ul ul ul {
84
- visibility: hidden !important;
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/shailan-dropdown.css CHANGED
@@ -1,6 +1,6 @@
1
  /* Reset */
2
  div.shailan-dropdown-menu table, div.shailan-dropdown-menu tbody, div.shailan-dropdown-menu tr, div.shailan-dropdown-menu td, div.shailan-dropdown-menu ul, div.shailan-dropdown-menu li, div.dropdown-horizontal-container, ul.dropdown * { margin:0; padding:0; border:0; }
3
- .dropdown-horizontal-container{ width:100%; }
4
  /* Remove list styling */
5
  ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
6
 
@@ -31,7 +31,21 @@ ul.dropdown ul, ul.dropdown li.hover ul ul, ul.dropdown li.hover ul ul ul, ul.dr
31
 
32
  ul.dropdown ul ul ul ul ul ul { display: none !important; }
33
 
 
 
 
 
 
 
34
  /* Vertical menu support */
35
- ul.dropdown-vertical.dropdown-align-left ul { top: 1px; left: 99%; }
36
- ul.dropdown-vertical.dropdown-align-right ul { top: 1px; right: 99%; }
37
  ul.dropdown-vertical li { float: none; display:block; }
 
 
 
 
 
 
 
 
1
  /* Reset */
2
  div.shailan-dropdown-menu table, div.shailan-dropdown-menu tbody, div.shailan-dropdown-menu tr, div.shailan-dropdown-menu td, div.shailan-dropdown-menu ul, div.shailan-dropdown-menu li, div.dropdown-horizontal-container, ul.dropdown * { margin:0; padding:0; border:0; }
3
+ /* .dropdown-horizontal-container{ width:100%; } */
4
  /* Remove list styling */
5
  ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
6
 
31
 
32
  ul.dropdown ul ul ul ul ul ul { display: none !important; }
33
 
34
+ /* Alignment support */
35
+ .dm-align-right table{ float:right; }
36
+ .dm-align-left table{ float:left; }
37
+ ul.dropdown-horizontal.dropdown-align-right ul { right: 0; left: auto; }
38
+ ul.dropdown-horizontal.dropdown-align-right ul ul{ right: 99%; left: auto; }
39
+
40
  /* Vertical menu support */
41
+ ul.dropdown-vertical.dropdown-align-left ul { top: 1px; left: 99%; right:auto; }
42
+ ul.dropdown-vertical.dropdown-align-right ul { top: 1px; right: 99%; left:auto; }
43
  ul.dropdown-vertical li { float: none; display:block; }
44
+
45
+ /* Clearfix */
46
+ .clearfix:after { clear: both; content: "."; display: block; height: 0; visibility: hidden; }
47
+ * html > body .clearfix { display: block; width: 100%; }
48
+ * html .clearfix { height: 1%; }
49
+
50
+ /* Cursor fix */
51
+ ul.dropdown li a{ cursor:pointer; }
css/widgets.css DELETED
@@ -1,2 +0,0 @@
1
- #widgets-right .shailan-dropdown, #widgets-left .shailan-dropdown .widget-top{ border-color: #F90; }
2
- #widgets-right .shailan-dropdown-multi, #widgets-left .shailan-dropdown-multi .widget-top{ border-color: #F90; }
 
 
csshover.htc DELETED
@@ -1,120 +0,0 @@
1
- <attach event="ondocumentready" handler="parseStylesheets" />
2
- <script>
3
- /**
4
- * Whatever:hover - V1.42.060206 - hover & active
5
- * ------------------------------------------------------------
6
- * (c) 2005 - Peter Nederlof
7
- * Peterned - http://www.xs4all.nl/~peterned/
8
- * License - http://creativecommons.org/licenses/LGPL/2.1/
9
- *
10
- * Whatever:hover is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU Lesser General Public
12
- * License as published by the Free Software Foundation; either
13
- * version 2.1 of the License, or (at your option) any later version.
14
- *
15
- * Whatever:hover is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * Lesser General Public License for more details.
19
- *
20
- * Credits and thanks to:
21
- * Arnoud Berendsen, Martin Reurings, Robert Hanson
22
- *
23
- * howto: body { behavior:url("csshover.htc"); }
24
- * ------------------------------------------------------------
25
- */
26
-
27
- var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
28
- currentSheet, doc = window.document, hoverEvents = [], activators = {
29
- onhover:{on:'onmouseover', off:'onmouseout'},
30
- onactive:{on:'onmousedown', off:'onmouseup'}
31
- }
32
-
33
- function parseStylesheets() {
34
- if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
35
- window.attachEvent('onunload', unhookHoverEvents);
36
- var sheets = doc.styleSheets, l = sheets.length;
37
- for(var i=0; i<l; i++)
38
- parseStylesheet(sheets[i]);
39
- }
40
- function parseStylesheet(sheet) {
41
- if(sheet.imports) {
42
- try {
43
- var imports = sheet.imports, l = imports.length;
44
- for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
45
- } catch(securityException){}
46
- }
47
-
48
- try {
49
- var rules = (currentSheet = sheet).rules, l = rules.length;
50
- for(var j=0; j<l; j++) parseCSSRule(rules[j]);
51
- } catch(securityException){}
52
- }
53
-
54
- function parseCSSRule(rule) {
55
- var select = rule.selectorText, style = rule.style.cssText;
56
- if(!csshoverReg.test(select) || !style) return;
57
-
58
- var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
59
- var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
60
- var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
61
- var affected = select.replace(/:(hover|active).*$/, '');
62
- var elements = getElementsBySelect(affected);
63
- if(elements.length == 0) return;
64
-
65
- currentSheet.addRule(newSelect, style);
66
- for(var i=0; i<elements.length; i++)
67
- new HoverElement(elements[i], className, activators[pseudo]);
68
- }
69
-
70
- function HoverElement(node, className, events) {
71
- if(!node.hovers) node.hovers = {};
72
- if(node.hovers[className]) return;
73
- node.hovers[className] = true;
74
- hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
75
- hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
76
- }
77
- function hookHoverEvent(node, type, handler) {
78
- node.attachEvent(type, handler);
79
- hoverEvents[hoverEvents.length] = {
80
- node:node, type:type, handler:handler
81
- };
82
- }
83
-
84
- function unhookHoverEvents() {
85
- for(var e,i=0; i<hoverEvents.length; i++) {
86
- e = hoverEvents[i];
87
- e.node.detachEvent(e.type, e.handler);
88
- }
89
- }
90
-
91
- function getElementsBySelect(rule) {
92
- var parts, nodes = [doc];
93
- parts = rule.split(' ');
94
- for(var i=0; i<parts.length; i++) {
95
- nodes = getSelectedNodes(parts[i], nodes);
96
- } return nodes;
97
- }
98
- function getSelectedNodes(select, elements) {
99
- var result, node, nodes = [];
100
- var identify = (/\#([a-z0-9_-]+)/i).exec(select);
101
- if(identify) {
102
- var element = doc.getElementById(identify[1]);
103
- return element? [element]:nodes;
104
- }
105
-
106
- var classname = (/\.([a-z0-9_-]+)/i).exec(select);
107
- var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
108
- var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
109
- for(var i=0; i<elements.length; i++) {
110
- result = tagName? elements[i].all.tags(tagName):elements[i].all;
111
- for(var j=0; j<result.length; j++) {
112
- node = result[j];
113
- if(classReg && !classReg.test(node.className)) continue;
114
- nodes[nodes.length] = node;
115
- }
116
- }
117
-
118
- return nodes;
119
- }
120
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://shailan.com/donate
4
  Tags: css, dropdown, menu, widget, pages, categories, multi, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
  Tested up to: 3.1
7
- Stable tag: 1.6.4
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
10
 
@@ -47,6 +47,15 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
47
 
48
  == Changelog ==
49
 
 
 
 
 
 
 
 
 
 
50
  = 1.6.4 =
51
  * Fixed effect selector error.
52
  * Added width option for vertical menus.
4
  Tags: css, dropdown, menu, widget, pages, categories, multi, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
  Tested up to: 3.1
7
+ Stable tag: 1.7
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
10
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.7 =
51
+ * Added: brand new options page.
52
+ * Added: Web2.0 Theme.
53
+ * Added: width option to widgets.
54
+ * Fixed: Right aligned menu dropdown errors.
55
+ * Added: Effect delay option (hoverIntent).
56
+ * Added: Plugin both search theme & template folders for dropdown.css
57
+ * Added: Adminbar button to easily change current options.
58
+
59
  = 1.6.4 =
60
  * Fixed effect selector error.
61
  * Added width option for vertical menus.
{js → scripts}/admin.js RENAMED
@@ -15,12 +15,6 @@ jQuery.fn.disable = function(){
15
 
16
  jQuery(document).ready(function() {
17
 
18
- /*if(jQuery('#shailan_dm_active_theme').val() == '*url*'){
19
- jQuery('#shailan_dm_theme_url').enable();
20
- } else {
21
- jQuery('#shailan_dm_theme_url').disable();
22
- }*/
23
-
24
  function shailan_dm_active_theme_change(){
25
  if(jQuery('#shailan_dm_active_theme').val() == '*url*'){
26
  jQuery('#shailan_dm_theme_url').enable();
15
 
16
  jQuery(document).ready(function() {
17
 
 
 
 
 
 
 
18
  function shailan_dm_active_theme_change(){
19
  if(jQuery('#shailan_dm_active_theme').val() == '*url*'){
20
  jQuery('#shailan_dm_theme_url').enable();
{js → scripts}/hoverIntent.js RENAMED
File without changes
{js → scripts}/include.js RENAMED
File without changes
{js → scripts}/jquery.bgiframe.min.js RENAMED
File without changes
scripts/jquery.tweetable.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * tweetable 1.3 - jQuery twitter feed generator plugin
3
+ *
4
+ * Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/)
5
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
6
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
7
+ *
8
+ * Revision: $Id: jquery.tweetable.js 2010-08-09 $
9
+ *
10
+ */
11
+ (function($){
12
+ $.fn.tweetable=function(options){
13
+ var defaults={
14
+ limit:5,
15
+ username:'philipbeel',
16
+ time:false,
17
+ replies:false
18
+ };
19
+ var options=$.extend(defaults,options);
20
+ return this.each(function(options){
21
+ var act=$(this);
22
+ var api="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=";
23
+ var count="&count=";
24
+ $.getJSON(api+defaults.username+count+defaults.limit+"&callback=?",act,function(data){
25
+ $.each(data,function(i,item){
26
+ if(i==0){
27
+ $(act).prepend('<ul class="tweetList">');
28
+ }
29
+ if(defaults.replies === false) {
30
+ if(item.in_reply_to_status_id === null){
31
+ $('.tweetList').append('<li class="tweet_content_'+i+'"><span class="tweet_link_'+i+'">'+item.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2'));
32
+ if(defaults.time==true){
33
+ $('.tweet_content_'+i).append('<small> '+item.created_at.substr(0,20)+'</small>');
34
+ }
35
+ }
36
+ } else {
37
+ $('.tweetList').append('<li class="tweet_content_'+i+'"><span class="tweet_link_'+i+'">'+item.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2'));
38
+ if(defaults.time==true){
39
+ $('.tweet_content_'+i).append('<small> '+item.created_at.substr(0,20)+'</small>');
40
+ }
41
+ }
42
+ });
43
+ });
44
+ });
45
+ }
46
+ })(jQuery);
scripts/jquery.wysiwyg.css ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ div.wysiwyg { border: 1px solid #cccccc; padding: 5px; background-color: #ffffff; }
3
+ div.wysiwyg * { margin: 0; padding: 0; }
4
+
5
+ div.wysiwyg ul.panel { border-bottom: 1px solid #cccccc; float: left; width: 100%; padding: 0 0 0 0; }
6
+ div.wysiwyg ul.panel li { list-style-type: none; float: left; margin: 1px 2px 3px 0; background: #ffffff;}
7
+ div.wysiwyg ul.panel li.separator { height: 16px; margin: 0 4px; border-left: 1px solid #cccccc; }
8
+ div.wysiwyg ul.panel li a { text-indent: -5000px; opacity: 0.85; filter:alpha(opacity=85); display: block; width: 16px; height: 16px; background: url('jquery.wysiwyg.gif') no-repeat -64px -80px; border: 0; cursor: pointer; padding: 1px; }
9
+ div.wysiwyg ul.panel li a:hover, div.wysiwyg ul.panel li a.active { opacity: 1.00; filter:alpha(opacity=100); }
10
+ div.wysiwyg ul.panel li a.active { background-color: #f9f9f9; border: 1px solid #cccccc; border-left-color: #aaaaaa; border-top-color: #aaaaaa; padding: 0; }
11
+
12
+ div.wysiwyg ul.panel li a.bold { background-position: 0 -16px; }
13
+ div.wysiwyg ul.panel li a.italic { background-position: -16px -16px; }
14
+ div.wysiwyg ul.panel li a.strikeThrough { background-position: -32px -16px; }
15
+ div.wysiwyg ul.panel li a.underline { background-position: -48px -16px; }
16
+
17
+ div.wysiwyg ul.panel li a.justifyLeft { background-position: 0 0; }
18
+ div.wysiwyg ul.panel li a.justifyCenter { background-position: -16px 0; }
19
+ div.wysiwyg ul.panel li a.justifyRight { background-position: -32px 0; }
20
+ div.wysiwyg ul.panel li a.justifyFull { background-position: -48px 0; }
21
+
22
+ div.wysiwyg ul.panel li a.indent { background-position: -64px 0; }
23
+ div.wysiwyg ul.panel li a.outdent { background-position: -80px 0; }
24
+
25
+ div.wysiwyg ul.panel li a.subscript { background-position: -64px -16px; }
26
+ div.wysiwyg ul.panel li a.superscript { background-position: -80px -16px; }
27
+
28
+ div.wysiwyg ul.panel li a.undo { background-position: 0 -64px; }
29
+ div.wysiwyg ul.panel li a.redo { background-position: -16px -64px; }
30
+
31
+ div.wysiwyg ul.panel li a.insertOrderedList { background-position: -32px -48px; }
32
+ div.wysiwyg ul.panel li a.insertUnorderedList { background-position: -16px -48px; }
33
+ div.wysiwyg ul.panel li a.insertHorizontalRule { background-position: 0 -48px; }
34
+
35
+ div.wysiwyg ul.panel li a.h1 { background-position: 0 -32px; }
36
+ div.wysiwyg ul.panel li a.h2 { background-position: -16px -32px; }
37
+ div.wysiwyg ul.panel li a.h3 { background-position: -32px -32px; }
38
+ div.wysiwyg ul.panel li a.h4 { background-position: -48px -32px; }
39
+ div.wysiwyg ul.panel li a.h5 { background-position: -64px -32px; }
40
+ div.wysiwyg ul.panel li a.h6 { background-position: -80px -32px; }
41
+
42
+ div.wysiwyg ul.panel li a.cut { background-position: -32px -64px; }
43
+ div.wysiwyg ul.panel li a.copy { background-position: -48px -64px; }
44
+ div.wysiwyg ul.panel li a.paste { background-position: -64px -64px; }
45
+
46
+ div.wysiwyg ul.panel li a.increaseFontSize { background-position: -16px -80px; }
47
+ div.wysiwyg ul.panel li a.decreaseFontSize { background-position: -32px -80px; }
48
+
49
+ div.wysiwyg ul.panel li a.createLink { background-position: -80px -48px; }
50
+ div.wysiwyg ul.panel li a.insertImage { background-position: -80px -80px; }
51
+
52
+ div.wysiwyg ul.panel li a.html { background-position: -47px -46px; }
53
+ div.wysiwyg ul.panel li a.removeFormat { background-position: -80px -63px; }
54
+
55
+ div.wysiwyg ul.panel li a.empty { background-position: -64px -80px; }
56
+
57
+ div.wysiwyg iframe { border: 0; clear: left; margin: 4px 0 0 1px; }
scripts/jquery.wysiwyg.gif ADDED
Binary file
scripts/jquery.wysiwyg.jpg ADDED
Binary file
scripts/jquery.wysiwyg.js ADDED
@@ -0,0 +1,745 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WYSIWYG - jQuery plugin 0.6
3
+ *
4
+ * Copyright (c) 2008-2009 Juan M Martinez
5
+ * http://plugins.jquery.com/project/jWYSIWYG
6
+ *
7
+ * Dual licensed under the MIT and GPL licenses:
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ * http://www.gnu.org/licenses/gpl.html
10
+ *
11
+ * $Id: $
12
+ */
13
+ (function( $ )
14
+ {
15
+ $.fn.document = function()
16
+ {
17
+ var element = this.get(0);
18
+
19
+ if ( element.nodeName.toLowerCase() == 'iframe' )
20
+ {
21
+ return element.contentWindow.document;
22
+ /*
23
+ return ( $.browser.msie )
24
+ ? document.frames[element.id].document
25
+ : element.contentWindow.document // contentDocument;
26
+ */
27
+ }
28
+ return this;
29
+ };
30
+
31
+ $.fn.documentSelection = function()
32
+ {
33
+ var element = this.get(0);
34
+
35
+ if ( element.contentWindow.document.selection )
36
+ return element.contentWindow.document.selection.createRange().text;
37
+ else
38
+ return element.contentWindow.getSelection().toString();
39
+ };
40
+
41
+ $.fn.wysiwyg = function( options )
42
+ {
43
+ if ( arguments.length > 0 && arguments[0].constructor == String )
44
+ {
45
+ var action = arguments[0].toString();
46
+ var params = [];
47
+
48
+ for ( var i = 1; i < arguments.length; i++ )
49
+ params[i - 1] = arguments[i];
50
+
51
+ if ( action in Wysiwyg )
52
+ {
53
+ return this.each(function()
54
+ {
55
+ $.data(this, 'wysiwyg')
56
+ .designMode();
57
+
58
+ Wysiwyg[action].apply(this, params);
59
+ });
60
+ }
61
+ else return this;
62
+ }
63
+
64
+ var controls = {};
65
+
66
+ /**
67
+ * If the user set custom controls, we catch it, and merge with the
68
+ * defaults controls later.
69
+ */
70
+ if ( options && options.controls )
71
+ {
72
+ var controls = options.controls;
73
+ delete options.controls;
74
+ }
75
+
76
+ options = $.extend({
77
+ html : '<'+'?xml version="1.0" encoding="UTF-8"?'+'><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">STYLE_SHEET</head><body style="margin: 0px;">INITIAL_CONTENT</body></html>',
78
+ css : {},
79
+
80
+ debug : false,
81
+
82
+ autoSave : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=11
83
+ rmUnwantedBr : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=15
84
+ brIE : true,
85
+
86
+ controls : {},
87
+ messages : {}
88
+ }, options);
89
+
90
+ options.messages = $.extend(true, options.messages, Wysiwyg.MSGS_EN);
91
+ options.controls = $.extend(true, options.controls, Wysiwyg.TOOLBAR);
92
+
93
+ for ( var control in controls )
94
+ {
95
+ if ( control in options.controls )
96
+ $.extend(options.controls[control], controls[control]);
97
+ else
98
+ options.controls[control] = controls[control];
99
+ }
100
+
101
+ // not break the chain
102
+ return this.each(function()
103
+ {
104
+ Wysiwyg(this, options);
105
+ });
106
+ };
107
+
108
+ function Wysiwyg( element, options )
109
+ {
110
+ return this instanceof Wysiwyg
111
+ ? this.init(element, options)
112
+ : new Wysiwyg(element, options);
113
+ }
114
+
115
+ $.extend(Wysiwyg, {
116
+ insertImage : function( szURL, attributes )
117
+ {
118
+ var self = $.data(this, 'wysiwyg');
119
+
120
+ if ( self.constructor == Wysiwyg && szURL && szURL.length > 0 )
121
+ {
122
+ if ($.browser.msie) self.focus();
123
+ if ( attributes )
124
+ {
125
+ self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
126
+ var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
127
+
128
+ if ( img )
129
+ {
130
+ img.src = szURL;
131
+
132
+ for ( var attribute in attributes )
133
+ {
134
+ img.setAttribute(attribute, attributes[attribute]);
135
+ }
136
+ }
137
+ }
138
+ else
139
+ {
140
+ self.editorDoc.execCommand('insertImage', false, szURL);
141
+ }
142
+ }
143
+ },
144
+
145
+ createLink : function( szURL )
146
+ {
147
+ var self = $.data(this, 'wysiwyg');
148
+
149
+ if ( self.constructor == Wysiwyg && szURL && szURL.length > 0 )
150
+ {
151
+ var selection = $(self.editor).documentSelection();
152
+
153
+ if ( selection.length > 0 )
154
+ {
155
+ if ($.browser.msie) self.focus();
156
+ self.editorDoc.execCommand('unlink', false, []);
157
+ self.editorDoc.execCommand('createLink', false, szURL);
158
+ }
159
+ else if ( self.options.messages.nonSelection )
160
+ alert(self.options.messages.nonSelection);
161
+ }
162
+ },
163
+
164
+ insertHtml : function( szHTML )
165
+ {
166
+ var self = $.data(this, 'wysiwyg');
167
+
168
+ if ( self.constructor == Wysiwyg && szHTML && szHTML.length > 0 )
169
+ {
170
+ if ($.browser.msie)
171
+ {
172
+ self.focus();
173
+ self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
174
+ var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
175
+ if (img)
176
+ {
177
+ $(img).replaceWith(szHTML);
178
+ }
179
+ }
180
+ else
181
+ {
182
+ self.editorDoc.execCommand('insertHTML', false, szHTML);
183
+ }
184
+ }
185
+ },
186
+
187
+ setContent : function( newContent )
188
+ {
189
+ var self = $.data(this, 'wysiwyg');
190
+ self.setContent( newContent );
191
+ self.saveContent();
192
+ },
193
+
194
+ clear : function()
195
+ {
196
+ var self = $.data(this, 'wysiwyg');
197
+ self.setContent('');
198
+ self.saveContent();
199
+ },
200
+
201
+ MSGS_EN : {
202
+ nonSelection : 'select the text you wish to link'
203
+ },
204
+
205
+ TOOLBAR : {
206
+ bold : { visible : true, tags : ['b', 'strong'], css : { fontWeight : 'bold' }, tooltip : "Bold" },
207
+ italic : { visible : true, tags : ['i', 'em'], css : { fontStyle : 'italic' }, tooltip : "Italic" },
208
+ strikeThrough : { visible : true, tags : ['s', 'strike'], css : { textDecoration : 'line-through' }, tooltip : "Strike-through" },
209
+ underline : { visible : true, tags : ['u'], css : { textDecoration : 'underline' }, tooltip : "Underline" },
210
+
211
+ separator00 : { visible : true, separator : true },
212
+
213
+ justifyLeft : { visible : true, css : { textAlign : 'left' }, tooltip : "Justify Left" },
214
+ justifyCenter : { visible : true, tags : ['center'], css : { textAlign : 'center' }, tooltip : "Justify Center" },
215
+ justifyRight : { visible : true, css : { textAlign : 'right' }, tooltip : "Justify Right" },
216
+ justifyFull : { visible : true, css : { textAlign : 'justify' }, tooltip : "Justify Full" },
217
+
218
+ separator01 : { visible : true, separator : true },
219
+
220
+ indent : { visible : true, tooltip : "Indent" },
221
+ outdent : { visible : true, tooltip : "Outdent" },
222
+
223
+ separator02 : { visible : false, separator : true },
224
+
225
+ subscript : { visible : true, tags : ['sub'], tooltip : "Subscript" },
226
+ superscript : { visible : true, tags : ['sup'], tooltip : "Superscript" },
227
+
228
+ separator03 : { visible : true, separator : true },
229
+
230
+ undo : { visible : true, tooltip : "Undo" },
231
+ redo : { visible : true, tooltip : "Redo" },
232
+
233
+ separator04 : { visible : true, separator : true },
234
+
235
+ insertOrderedList : { visible : true, tags : ['ol'], tooltip : "Insert Ordered List" },
236
+ insertUnorderedList : { visible : true, tags : ['ul'], tooltip : "Insert Unordered List" },
237
+ insertHorizontalRule : { visible : true, tags : ['hr'], tooltip : "Insert Horizontal Rule" },
238
+
239
+ separator05 : { separator : true },
240
+
241
+ createLink : {
242
+ visible : true,
243
+ exec : function()
244
+ {
245
+ var selection = $(this.editor).documentSelection();
246
+
247
+ if ( selection.length > 0 )
248
+ {
249
+ if ( $.browser.msie )
250
+ {
251
+ this.focus();
252
+ this.editorDoc.execCommand('createLink', true, null);
253
+ }
254
+ else
255
+ {
256
+ var szURL = prompt('URL', 'http://');
257
+
258
+ if ( szURL && szURL.length > 0 )
259
+ {
260
+ this.editorDoc.execCommand('unlink', false, []);
261
+ this.editorDoc.execCommand('createLink', false, szURL);
262
+ }
263
+ }
264
+ }
265
+ else if ( this.options.messages.nonSelection )
266
+ alert(this.options.messages.nonSelection);
267
+ },
268
+
269
+ tags : ['a'],
270
+ tooltip : "Create link"
271
+ },
272
+
273
+ insertImage : {
274
+ visible : true,
275
+ exec : function()
276
+ {
277
+ if ( $.browser.msie )
278
+ {
279
+ this.focus();
280
+ this.editorDoc.execCommand('insertImage', true, null);
281
+ }
282
+ else
283
+ {
284
+ var szURL = prompt('URL', 'http://');
285
+
286
+ if ( szURL && szURL.length > 0 )
287
+ this.editorDoc.execCommand('insertImage', false, szURL);
288
+ }
289
+ },
290
+
291
+ tags : ['img'],
292
+ tooltip : "Insert image"
293
+ },
294
+
295
+ separator06 : { separator : true },
296
+
297
+ h1mozilla : { visible : true && $.browser.mozilla, className : 'h1', command : 'heading', arguments : ['h1'], tags : ['h1'], tooltip : "Header 1" },
298
+ h2mozilla : { visible : true && $.browser.mozilla, className : 'h2', command : 'heading', arguments : ['h2'], tags : ['h2'], tooltip : "Header 2" },
299
+ h3mozilla : { visible : true && $.browser.mozilla, className : 'h3', command : 'heading', arguments : ['h3'], tags : ['h3'], tooltip : "Header 3" },
300
+
301
+ h1 : { visible : true && !( $.browser.mozilla ), className : 'h1', command : 'formatBlock', arguments : ['<H1>'], tags : ['h1'], tooltip : "Header 1" },
302
+ h2 : { visible : true && !( $.browser.mozilla ), className : 'h2', command : 'formatBlock', arguments : ['<H2>'], tags : ['h2'], tooltip : "Header 2" },
303
+ h3 : { visible : true && !( $.browser.mozilla ), className : 'h3', command : 'formatBlock', arguments : ['<H3>'], tags : ['h3'], tooltip : "Header 3" },
304
+
305
+ separator07 : { visible : false, separator : true },
306
+
307
+ cut : { visible : false, tooltip : "Cut" },
308
+ copy : { visible : false, tooltip : "Copy" },
309
+ paste : { visible : false, tooltip : "Paste" },
310
+
311
+ separator08 : { separator : false && !( $.browser.msie ) },
312
+
313
+ increaseFontSize : { visible : false && !( $.browser.msie ), tags : ['big'], tooltip : "Increase font size" },
314
+ decreaseFontSize : { visible : false && !( $.browser.msie ), tags : ['small'], tooltip : "Decrease font size" },
315
+
316
+ separator09 : { separator : true },
317
+
318
+ html : {
319
+ visible : false,
320
+ exec : function()
321
+ {
322
+ if ( this.viewHTML )
323
+ {
324
+ this.setContent( $(this.original).val() );
325
+ $(this.original).hide();
326
+ }
327
+ else
328
+ {
329
+ this.saveContent();
330
+ $(this.original).show();
331
+ }
332
+
333
+ this.viewHTML = !( this.viewHTML );
334
+ },
335
+ tooltip : "View source code"
336
+ },
337
+
338
+ removeFormat : {
339
+ visible : true,
340
+ exec : function()
341
+ {
342
+ if ($.browser.msie) this.focus();
343
+ this.editorDoc.execCommand('removeFormat', false, []);
344
+ this.editorDoc.execCommand('unlink', false, []);
345
+ },
346
+ tooltip : "Remove formatting"
347
+ }
348
+ }
349
+ });
350
+
351
+ $.extend(Wysiwyg.prototype,
352
+ {
353
+ original : null,
354
+ options : {},
355
+
356
+ element : null,
357
+ editor : null,
358
+
359
+ focus : function()
360
+ {
361
+ $(this.editorDoc.body).focus();
362
+ },
363
+
364
+ init : function( element, options )
365
+ {
366
+ var self = this;
367
+
368
+ this.editor = element;
369
+ this.options = options || {};
370
+
371
+ $.data(element, 'wysiwyg', this);
372
+
373
+ var newX = element.width || element.clientWidth;
374
+ var newY = element.height || element.clientHeight;
375
+
376
+ if ( element.nodeName.toLowerCase() == 'textarea' )
377
+ {
378
+ this.original = element;
379
+
380
+ if ( newX == 0 && element.cols )
381
+ newX = ( element.cols * 8 ) + 21;
382
+
383
+ if ( newY == 0 && element.rows )
384
+ newY = ( element.rows * 16 ) + 16;
385
+
386
+ var editor = this.editor = $('<iframe src="javascript:false;"></iframe>').css({
387
+ minHeight : ( newY - 6 ).toString() + 'px',
388
+ width : ( newX - 8 ).toString() + 'px'
389
+ }).attr('id', $(element).attr('id') + 'IFrame')
390
+ .attr('frameborder', '0');
391
+
392
+ /**
393
+ * http://code.google.com/p/jwysiwyg/issues/detail?id=96
394
+ */
395
+ this.editor.attr('tabindex', $(element).attr('tabindex'));
396
+
397
+ if ( $.browser.msie )
398
+ {
399
+ this.editor
400
+ .css('height', ( newY ).toString() + 'px');
401
+
402
+ /**
403
+ var editor = $('<span></span>').css({
404
+ width : ( newX - 6 ).toString() + 'px',
405
+ height : ( newY - 8 ).toString() + 'px'
406
+ }).attr('id', $(element).attr('id') + 'IFrame');
407
+
408
+ editor.outerHTML = this.editor.outerHTML;
409
+ */
410
+ }
411
+ }
412
+
413
+ var panel = this.panel = $('<ul role="menu" class="panel"></ul>');
414
+
415
+ this.appendControls();
416
+ this.element = $('<div></div>').css({
417
+ width : ( newX > 0 ) ? ( newX ).toString() + 'px' : '100%'
418
+ }).addClass('wysiwyg')
419
+ .append(panel)
420
+ .append( $('<div><!-- --></div>').css({ clear : 'both' }) )
421
+ .append(editor)
422
+ ;
423
+
424
+ $(element)
425
+ .hide()
426
+ .before(this.element)
427
+ ;
428
+
429
+ this.viewHTML = false;
430
+ this.initialHeight = newY - 8;
431
+
432
+ /**
433
+ * @link http://code.google.com/p/jwysiwyg/issues/detail?id=52
434
+ */
435
+ this.initialContent = $(element).val();
436
+ this.initFrame();
437
+
438
+ if ( this.initialContent.length == 0 )
439
+ this.setContent('');
440
+
441
+ /**
442
+ * http://code.google.com/p/jwysiwyg/issues/detail?id=100
443
+ */
444
+ var form = $(element).closest('form');
445
+
446
+ if ( this.options.autoSave )
447
+ {
448
+ form.submit(function() { self.saveContent(); });
449
+ }
450
+
451
+ form.bind('reset', function()
452
+ {
453
+ self.setContent( self.initialContent );
454
+ self.saveContent();
455
+ });
456
+ },
457
+
458
+ initFrame : function()
459
+ {
460
+ var self = this;
461
+ var style = '';
462
+
463
+ /**
464
+ * @link http://code.google.com/p/jwysiwyg/issues/detail?id=14
465
+ */
466
+ if ( this.options.css && this.options.css.constructor == String )
467
+ {
468
+ style = '<link rel="stylesheet" type="text/css" media="screen" href="' + this.options.css + '" />';
469
+ }
470
+
471
+ this.editorDoc = $(this.editor).document();
472
+ this.editorDoc_designMode = false;
473
+
474
+ try {
475
+ this.editorDoc.designMode = 'on';
476
+ this.editorDoc_designMode = true;
477
+ } catch ( e ) {
478
+ // Will fail on Gecko if the editor is placed in an hidden container element
479
+ // The design mode will be set ones the editor is focused
480
+
481
+ $(this.editorDoc).focus(function()
482
+ {
483
+ self.designMode();
484
+ });
485
+ }
486
+
487
+ this.editorDoc.open();
488
+ this.editorDoc.write(
489
+ this.options.html
490
+ /**
491
+ * @link http://code.google.com/p/jwysiwyg/issues/detail?id=144
492
+ */
493
+ .replace(/INITIAL_CONTENT/, function() { return self.initialContent; })
494
+ .replace(/STYLE_SHEET/, function() { return style; })
495
+ );
496
+ this.editorDoc.close();
497
+
498
+ this.editorDoc.contentEditable = 'true';
499
+
500
+ if ( $.browser.msie )
501
+ {
502
+ /**
503
+ * Remove the horrible border it has on IE.
504
+ */
505
+ setTimeout(function() { $(self.editorDoc.body).css('border', 'none'); }, 0);
506
+ }
507
+
508
+ $(this.editorDoc).click(function( event )
509
+ {
510
+ self.checkTargets( event.target ? event.target : event.srcElement);
511
+ });
512
+
513
+ /**
514
+ * @link http://code.google.com/p/jwysiwyg/issues/detail?id=20
515
+ */
516
+ $(this.original).focus(function()
517
+ {
518
+ if (!$.browser.msie)
519
+ {
520
+ self.focus();
521
+ }
522
+ });
523
+
524
+ if ( this.options.autoSave )
525
+ {
526
+ /**
527
+ * @link http://code.google.com/p/jwysiwyg/issues/detail?id=11
528
+ */
529
+ $(this.editorDoc).keydown(function() { self.saveContent(); })
530
+ .keyup(function() { self.saveContent(); })
531
+ .mousedown(function() { self.saveContent(); });
532
+ }
533
+
534
+ if ( this.options.css )
535
+ {
536
+ setTimeout(function()
537
+ {
538
+ if ( self.options.css.constructor == String )
539
+ {
540
+ /**
541
+ * $(self.editorDoc)
542
+ * .find('head')
543
+ * .append(
544
+ * $('<link rel="stylesheet" type="text/css" media="screen" />')
545
+ * .attr('href', self.options.css)
546
+ * );
547
+ */
548
+ }
549
+ else
550
+ $(self.editorDoc).find('body').css(self.options.css);
551
+ }, 0);
552
+ }
553
+
554
+ $(this.editorDoc).keydown(function( event )
555
+ {
556
+ if ( $.browser.msie && self.options.brIE && event.keyCode == 13 )
557
+ {
558
+ var rng = self.getRange();
559
+ rng.pasteHTML('<br />');
560
+ rng.collapse(false);
561
+ rng.select();
562
+ return false;
563
+ }
564
+ return true;
565
+ });
566
+ },
567
+
568
+ designMode : function()
569
+ {
570
+ if ( !( this.editorDoc_designMode ) )
571
+ {
572
+ try {
573
+ this.editorDoc.designMode = 'on';
574
+ this.editorDoc_designMode = true;
575
+ } catch ( e ) {}
576
+ }
577
+ },
578
+
579
+ getSelection : function()
580
+ {
581
+ return ( window.getSelection ) ? window.getSelection() : document.selection;
582
+ },
583
+
584
+ getRange : function()
585
+ {
586
+ var selection = this.getSelection();
587
+
588
+ if ( !( selection ) )
589
+ return null;
590
+
591
+ return ( selection.rangeCount > 0 ) ? selection.getRangeAt(0) : selection.createRange();
592
+ },
593
+
594
+ getContent : function()
595
+ {
596
+ return $( $(this.editor).document() ).find('body').html();
597
+ },
598
+
599
+ setContent : function( newContent )
600
+ {
601
+ $( $(this.editor).document() ).find('body').html(newContent);
602
+ },
603
+
604
+ saveContent : function()
605
+ {
606
+ if ( this.original )
607
+ {
608
+ var content = this.getContent();
609
+
610
+ if ( this.options.rmUnwantedBr )
611
+ {
612
+ content = ( content.substr(-4) == '<br>' ) ? content.substr(0, content.length - 4) : content;
613
+ }
614
+
615
+ $(this.original).val(content);
616
+ }
617
+ },
618
+
619
+ withoutCss: function()
620
+ {
621
+ if ($.browser.mozilla)
622
+ {
623
+ try
624
+ {
625
+ this.editorDoc.execCommand('styleWithCSS', false, false);
626
+ }
627
+ catch (e)
628
+ {
629
+ try
630
+ {
631
+ this.editorDoc.execCommand('useCSS', false, true);
632
+ }
633
+ catch (e)
634
+ {
635
+ }
636
+ }
637
+ }
638
+ },
639
+
640
+ appendMenu : function( cmd, args, className, fn, tooltip )
641
+ {
642
+ var self = this;
643
+ args = args || [];
644
+
645
+ $('<li></li>').append(
646
+ $('<a role="menuitem" tabindex="-1" href="javascript:;">' + (className || cmd) + '</a>')
647
+ .addClass(className || cmd)
648
+ .attr('title', tooltip)
649
+ ).click(function() {
650
+ if ( fn ) fn.apply(self); else
651
+ {
652
+ self.withoutCss();
653
+ self.editorDoc.execCommand(cmd, false, args);
654
+ }
655
+ if ( self.options.autoSave ) self.saveContent();
656
+ }).appendTo( this.panel );
657
+ },
658
+
659
+ appendMenuSeparator : function()
660
+ {
661
+ $('<li role="separator" class="separator"></li>').appendTo( this.panel );
662
+ },
663
+
664
+ appendControls : function()
665
+ {
666
+ for ( var name in this.options.controls )
667
+ {
668
+ var control = this.options.controls[name];
669
+
670
+ if ( control.separator )
671
+ {
672
+ if ( control.visible !== false )
673
+ this.appendMenuSeparator();
674
+ }
675
+ else if ( control.visible )
676
+ {
677
+ this.appendMenu(
678
+ control.command || name, control.arguments || [],
679
+ control.className || control.command || name || 'empty', control.exec,
680
+ control.tooltip || control.command || name || ''
681
+ );
682
+ }
683
+ }
684
+ },
685
+
686
+ checkTargets : function( element )
687
+ {
688
+ for ( var name in this.options.controls )
689
+ {
690
+ var control = this.options.controls[name];
691
+ var className = control.className || control.command || name || 'empty';
692
+
693
+ $('.' + className, this.panel).removeClass('active');
694
+
695
+ if ( control.tags )
696
+ {
697
+ var elm = element;
698
+
699
+ do {
700
+ if ( elm.nodeType != 1 )
701
+ break;
702
+
703
+ if ( $.inArray(elm.tagName.toLowerCase(), control.tags) != -1 )
704
+ $('.' + className, this.panel).addClass('active');
705
+ } while ((elm = elm.parentNode));
706
+ }
707
+
708
+ if ( control.css )
709
+ {
710
+ var elm = $(element);
711
+
712
+ do {
713
+ if ( elm[0].nodeType != 1 )
714
+ break;
715
+
716
+ for ( var cssProperty in control.css )
717
+ if ( elm.css(cssProperty).toString().toLowerCase() == control.css[cssProperty] )
718
+ $('.' + className, this.panel).addClass('active');
719
+ } while ((elm = elm.parent()));
720
+ }
721
+ }
722
+ },
723
+
724
+ getElementByAttributeValue : function( tagName, attributeName, attributeValue )
725
+ {
726
+ var elements = this.editorDoc.getElementsByTagName(tagName);
727
+
728
+ for ( var i = 0; i < elements.length; i++ )
729
+ {
730
+ var value = elements[i].getAttribute(attributeName);
731
+
732
+ if ( $.browser.msie )
733
+ {
734
+ /** IE add full path, so I check by the last chars. */
735
+ value = value.substr(value.length - attributeValue.length);
736
+ }
737
+
738
+ if ( value == attributeValue )
739
+ return elements[i];
740
+ }
741
+
742
+ return false;
743
+ }
744
+ });
745
+ })(jQuery);
{js → scripts}/superfish.js RENAMED
File without changes
{js → scripts}/supersubs.js RENAMED
File without changes
{js → scripts}/widgets.js RENAMED
File without changes
shailan-dropdown-menu-options.php ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Define themes
4
+ $available_themes = array(
5
+ 'None' => '*none*',
6
+ 'From URL' => '*url*',
7
+ 'Custom CSS' => '*custom*',
8
+ 'Color Scheme' => 'color-scheme',
9
+ 'Web 2.0' => plugins_url('/themes/web20.css', __FILE__),
10
+ 'Simple White' => plugins_url('/themes/simple.css', __FILE__),
11
+ 'Wordpress Default' => plugins_url('/themes/wpdefault.css', __FILE__),
12
+ 'Grayscale' => plugins_url('/themes/grayscale.css', __FILE__),
13
+ 'Aqua' => plugins_url('/themes/aqua.css', __FILE__),
14
+ 'Blue gradient' => plugins_url('/themes/simple-blue.css', __FILE__),
15
+ 'Shiny Black' => plugins_url('/themes/shiny-black.css', __FILE__),
16
+ 'Flickr theme' => plugins_url('/themes/flickr.com/default.ultimate.css', __FILE__),
17
+ 'Nvidia theme' => plugins_url('/themes/nvidia.com/default.advanced.css', __FILE__),
18
+ 'Adobe theme' => plugins_url('/themes/adobe.com/default.advanced.css', __FILE__),
19
+ 'MTV theme' => plugins_url('/themes/mtv.com/default.ultimate.css', __FILE__),
20
+ 'Hulu theme' => plugins_url('/themes/hulu/hulu.css', __FILE__)
21
+ );
22
+
23
+ // Check for theme style file
24
+ if( file_exists( trailingslashit( get_stylesheet_directory() ) . 'dropdown.css') ){
25
+ $available_themes['Dropdown.css (theme)'] = get_stylesheet_directory_uri() . '/dropdown.css';
26
+ }
27
+
28
+ if( file_exists( trailingslashit( get_template_directory() ) . 'dropdown.css') ){
29
+ $available_themes['Dropdown.css (template)'] = get_template_directory_uri() . '/dropdown.css';
30
+ }
31
+
32
+ // Swap array for options page
33
+ $themes = array();
34
+ while(list($Key,$Val) = each($available_themes))
35
+ $themes[$Val] = $Key;
36
+
37
+ $overlays = array(
38
+ 'none'=>'none',
39
+ 'glassy'=>'glassy',
40
+ 'flat'=>'flat',
41
+ 'shadow'=>'shadow',
42
+ 'soft' =>'soft'
43
+ );
44
+
45
+ $alignment = array('left'=>'left', 'center' => 'center', 'right'=> 'right');
46
+ $types = array('pages'=>'Pages', 'categories'=>'Categories');
47
+ $effects = array('fade'=>'Fade In/Out', 'slide'=>'Slide Up/Down');
48
+ $speed = array('400'=>'Normal', 'fast'=>'Fast', 'slow'=>'Slow');
49
+ $delay = array('100'=>'100', '200'=>'200', '300'=>'300');
50
+
51
+ if( function_exists('wp_nav_menu') ){
52
+ // Get available menus
53
+ $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
54
+ $navmenus = array();
55
+
56
+ if($menus){
57
+ foreach( $menus as $menu ){
58
+ $navmenus[ 'navmenu_' . $menu->term_id ] = $menu->name;
59
+ }
60
+ }
61
+
62
+ // Merge type with menu array
63
+ $types = array_merge($types, $navmenus);
64
+ }
65
+
66
+ $this->menu_types = $types; // Back it up
67
+
68
+ // Define plugin options
69
+ $options = array(
70
+
71
+ array(
72
+ "name" => "General",
73
+ "label" => __("General"),
74
+ "type" => "section"
75
+ ),
76
+
77
+ array( "name" => "Dropdown Menu Theme",
78
+ "desc" => "Skin for the menu",
79
+ "id" => "shailan_dm_active_theme",
80
+ "std" => "None",
81
+ "options" => $themes,
82
+ "type" => "select"),
83
+
84
+ array( "name" => "Theme URL",
85
+ "desc" => "If From URL is selected you can specify theme URL here. <br />Warning : Please make sure this file only modifies dropdown theme. Otherwise your theme may be affected by this css file.",
86
+ "id" => "shailan_dm_theme_url",
87
+ "std" => "http://",
88
+ "type" => "text"),
89
+
90
+ array( "name" => "Rename Homepage",
91
+ "desc" => "You can change your homepage link here",
92
+ "id" => "shailan_dm_home_tag",
93
+ "std" => __("Home"),
94
+ "type" => "text"),
95
+
96
+ array( "name" => "Wrap long menu items",
97
+ "desc" => "If checked long menu items will wrap",
98
+ "id" => "shailan_dm_allowmultiline",
99
+ "type" => "checkbox"),
100
+
101
+ array( "name" => "Remove title attributes from menu items",
102
+ "desc" => "This will remove 'View all posts under..' title attributes from menu links",
103
+ "id" => "shailan_dm_remove_title_attributes",
104
+ "type" => "checkbox"),
105
+
106
+ array( "name" => "Remove links from top levels",
107
+ "desc" => "This will remove links from top level pages/categories. So user can only click to sub-level menu.",
108
+ "id" => "shailan_dm_remove_top_level_links",
109
+ "type" => "checkbox"),
110
+
111
+ array( "type" => "close" ),
112
+
113
+ array(
114
+ "name" => "Effects",
115
+ "label" => __("Effects"),
116
+ "type" => "section"
117
+ ),
118
+
119
+ array( "name" => "Enable dropdown effects",
120
+ "desc" => "If checked sub menus will use effects below",
121
+ "id" => "shailan_dm_effects",
122
+ "type" => "checkbox"),
123
+
124
+ array( "name" => "Effect",
125
+ "desc" => "Select effect you want to use",
126
+ "id" => "shailan_dm_effect",
127
+ "type" => "select",
128
+ "options" => $effects ),
129
+
130
+ array( "name" => "Effect Speed",
131
+ "desc" => "Select effect speed",
132
+ "id" => "shailan_dm_effect_speed",
133
+ "type" => "select",
134
+ "options" => $speed ),
135
+
136
+ array( "name" => "Effect delay",
137
+ "desc" => "Select effect delay",
138
+ "id" => "shailan_dm_effect_delay",
139
+ "type" => "select",
140
+ "options" => $delay ),
141
+
142
+ array( "type" => "close" ),
143
+
144
+ array(
145
+ "name" => "Colors",
146
+ "label" => __("Colors"),
147
+ "type" => "section"
148
+ ),
149
+
150
+ array( "name" => "Use custom colors",
151
+ "desc" => "If not checked custom colors won't work.",
152
+ "id" => "shailan_dm_custom_colors",
153
+ "std" => true,
154
+ "type" => "checkbox"),
155
+
156
+ array("type"=>"picker"),
157
+
158
+ array( "name" => "Menu Background Color",
159
+ "desc" => "Background color of the dropdown menu",
160
+ "id" => "shailan_dm_color_menubg",
161
+ "std" => '#000000',
162
+ "type" => "text"),
163
+
164
+ array( "name" => "Hover Background Color",
165
+ "desc" => "Background color of list item link.",
166
+ "id" => "shailan_dm_color_lihover",
167
+ "std" => '#333333',
168
+ "type" => "text"),
169
+
170
+ array( "name" => "Link Text Color",
171
+ "desc" => "Default link color",
172
+ "id" => "shailan_dm_color_link",
173
+ "std" => '#FFFFFF',
174
+ "type" => "text"),
175
+
176
+ array( "name" => "Link Text Color on mouse over",
177
+ "desc" => "Secondary link color",
178
+ "id" => "shailan_dm_color_hoverlink",
179
+ "std" => '#FFFFFF',
180
+ "type" => "text"),
181
+
182
+ array( "name" => "Overlay",
183
+ "desc" => "Menu overlay (Works on browsers that support png transparency only.)",
184
+ "id" => "shailan_dm_overlay",
185
+ "std" => "glass",
186
+ "type" => "select",
187
+ "options" => $overlays ),
188
+
189
+ array( "type" => "close" ),
190
+
191
+ array(
192
+ "name" => "Advanced",
193
+ "label" => __("Advanced"),
194
+ "type" => "section"
195
+ ),
196
+
197
+ array( "name" => "Dropdown Menu Font",
198
+ "desc" => "Font family for the menu<br />Please leave blank to use your wordpress theme font.",
199
+ "id" => "shailan_dm_font",
200
+ "std" => '',
201
+ "type" => "text"),
202
+
203
+ array( "name" => "Dropdown Menu Font Size",
204
+ "desc" => "Font size of the menu items (Eg: 12px OR 1em) <br />Please leave blank to use your wordpress theme font-size.",
205
+ "id" => "shailan_dm_fontsize",
206
+ "std" => '',
207
+ "type" => "text"),
208
+
209
+ array( "name" => "Custom css",
210
+ "desc" => "You can paste your own customization file here.",
211
+ "id" => "shailan_dm_custom_css",
212
+ "std" => '',
213
+ "type" => "textarea"),
214
+
215
+ array( "name" => "Show Empty Categories",
216
+ "desc" => "If checked categories with no posts will be shown.",
217
+ "id" => "shailan_dm_show_empty",
218
+ "std" => false,
219
+ "type" => "checkbox"),
220
+
221
+ array( "type" => "close" ),
222
+
223
+ array(
224
+ "name" => "Template Tag",
225
+ "label" => __("Template Tag"),
226
+ "type" => "section"
227
+ ),
228
+
229
+ array(
230
+ "desc" => "Settings here only effect menus inserted with template tag : <code>&lt;?php shailan_dropdown_menu(); ?&gt;</code>. Widget settings are NOT affected by these settings. ",
231
+ "type" => "paragraph"
232
+ ),
233
+
234
+ array( "name" => "Menu Type",
235
+ "desc" => "Dropdown Menu Type",
236
+ "id" => "shailan_dm_type",
237
+ "std" => "pages",
238
+ "options" => $types,
239
+ "type" => "select"),
240
+
241
+ array( "name" => "Home link",
242
+ "desc" => "If checked dropdown menu displays home link",
243
+ "id" => "shailan_dm_home",
244
+ "std" => true,
245
+ "type" => "checkbox"),
246
+
247
+ array( "name" => "Login",
248
+ "desc" => "If checked dropdown menu displays login link",
249
+ "id" => "shailan_dm_login",
250
+ "std" => true,
251
+ "type" => "checkbox"),
252
+
253
+ array( "name" => "Register / Site Admin",
254
+ "desc" => "If checked dropdown menu displays register/site admin link.",
255
+ "id" => "shailan_dm_login",
256
+ "std" => true,
257
+ "type" => "checkbox"),
258
+
259
+ array( "name" => "Vertical menu",
260
+ "desc" => "If checked dropdown menu is displayed vertical.",
261
+ "id" => "shailan_dm_vertical",
262
+ "std" => true,
263
+ "type" => "checkbox"),
264
+
265
+ array( "name" => "Exclude Pages",
266
+ "desc" => "Excluded page IDs.",
267
+ "id" => "shailan_dm_exclude",
268
+ "std" => "",
269
+ "type" => "text"),
270
+
271
+ array( "name" => "Alignment",
272
+ "desc" => "Menu alignment.",
273
+ "id" => "shailan_dm_align",
274
+ "std" => "left",
275
+ "options" => $alignment,
276
+ "type" => "select"),
277
+
278
+ array( "type" => "close" )
279
+
280
+ );
shailan.DropDownMenu.php CHANGED
@@ -3,33 +3,33 @@
3
  Plugin Name: Dropdown Menu Widget
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
- Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme
7
- Version: 1.6.4
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
- define('SHAILAN_DM_VERSION', '1.6.4');
14
- define('SHAILAN_DM_TITLE', 'Dropdown Menu');
15
- define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
16
-
17
- /******************************************************************************
18
- * Shailan Dropdown Widget Class
19
- ******************************************************************************/
20
 
21
  class shailan_DropdownWidget extends WP_Widget {
22
 
23
  function shailan_DropdownWidget(){
24
- global $pluginname, $pluginshortname, $pluginoptions;
 
 
 
25
 
26
- $widget_ops = array('classname' => 'shailan-dropdown-menu-widget', 'description' => __( 'Dropdown page/category menu', 'shailan-dropdown-menu' ) );
27
  $this->WP_Widget('dropdown-menu', __('Dropdown Menu', 'shailan-dropdown-menu'), $widget_ops);
28
  $this->alt_option_name = 'widget_dropdown_menu';
29
 
30
  $this->pluginname = "Dropdown Menu";
31
  $this->shortname = "shailan_dm";
32
 
 
 
 
 
33
  // Hook up styles
34
  add_action( 'wp_head', array(&$this, 'header') );
35
  add_action( 'wp_footer', array(&$this, 'footer'), 10, 1 );
@@ -37,278 +37,16 @@ class shailan_DropdownWidget extends WP_Widget {
37
  // Hook up scripts
38
  if(!is_admin()){
39
  wp_enqueue_script( 'jquery' );
40
- wp_enqueue_script( 'dropdown-ie-support', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/include.js', array('jquery') );
41
- wp_enqueue_script( 'hover-intent', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/hoverIntent.js', array('jquery') );
42
- }
43
-
44
- // Define themes
45
- $available_themes = array(
46
- 'None' => '*none*',
47
- 'From URL' => '*url*',
48
- 'Custom CSS' => '*custom*',
49
- 'Color Scheme' => 'color-scheme',
50
- 'Simple White' => plugins_url('/themes/simple.css', __FILE__),
51
- 'Wordpress Default' => plugins_url('/themes/wpdefault.css', __FILE__),
52
- 'Grayscale' => plugins_url('/themes/grayscale.css', __FILE__),
53
- 'Aqua' => plugins_url('/themes/aqua.css', __FILE__),
54
- 'Blue gradient' => plugins_url('/themes/simple-blue.css', __FILE__),
55
- 'Shiny Black' => plugins_url('/themes/shiny-black.css', __FILE__),
56
- 'Flickr theme' => plugins_url('/themes/flickr.com/default.ultimate.css', __FILE__),
57
- 'Nvidia theme' => plugins_url('/themes/nvidia.com/default.advanced.css', __FILE__),
58
- 'Adobe theme' => plugins_url('/themes/adobe.com/default.advanced.css', __FILE__),
59
- 'MTV theme' => plugins_url('/themes/mtv.com/default.ultimate.css', __FILE__),
60
- 'Hulu theme' => plugins_url('/themes/hulu/hulu.css', __FILE__)
61
- );
62
-
63
- // Check for theme style file
64
- if( file_exists( trailingslashit( get_template_directory() ) . 'dropdown.css') ){
65
- $available_themes['Dropdown.css (theme)'] = get_template_directory_uri() . '/dropdown.css';
66
- }
67
-
68
- // Swap array for options page
69
- $themes = array();
70
- while(list($Key,$Val) = each($available_themes))
71
- $themes[$Val] = $Key;
72
-
73
- $overlays = array(
74
- 'none'=>'none',
75
- 'glassy'=>'glassy',
76
- 'flat'=>'flat',
77
- 'shadow'=>'shadow',
78
- 'soft' =>'soft'
79
- );
80
-
81
- $alignment = array('left'=>'left', 'center' => 'center', 'right'=> 'right');
82
- $types = array('pages'=>'Pages', 'categories'=>'Categories');
83
- $effects = array('fade'=>'Fade In/Out', 'slide'=>'Slide Up/Down'/*, 'fade2'=>'Fade In/Out Moving Up'*/);
84
- $speed = array('400'=>'Normal', 'fast'=>'Fast', 'slow'=>'Slow');
85
- $delay = array('100'=>'1s', '200'=>'2s', '300'=>'3s', '400'=>'4s', '500'=>'5s');
86
-
87
- if( function_exists('wp_nav_menu') ){
88
- // Get available menus
89
- $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
90
-
91
- $navmenus = array();
92
-
93
- if($menus){
94
- foreach( $menus as $menu ){
95
- $navmenus[ 'navmenu_' . $menu->term_id ] = $menu->name;
96
- }
97
- }
98
-
99
- // Merge type with menu array
100
- $types = array_merge($types, $navmenus);
101
  }
102
 
103
- $this->menu_types = $types; // Back it up
104
-
105
- // Define plugin options
106
- $this->admin_options = array(
107
-
108
- array(
109
- "name" => "Menu options",
110
- "type" => "section"
111
- ),
112
-
113
- array( "name" => "Dropdown Menu Theme",
114
- "desc" => "Skin for the menu",
115
- "id" => "shailan_dm_active_theme",
116
- "std" => "None",
117
- "options" => $themes,
118
- "type" => "select"),
119
-
120
- array( "name" => "Theme URL",
121
- "desc" => "If From URL is selected you can specify theme URL here. <br />Warning : Please make sure this file only modifies dropdown theme. Otherwise your theme may be affected by this css file.",
122
- "id" => "shailan_dm_theme_url",
123
- "std" => "http://",
124
- "type" => "text"),
125
-
126
- array( "name" => "Rename Homepage",
127
- "desc" => "You can change your homepage link here",
128
- "id" => "shailan_dm_home_tag",
129
- "std" => __("Home"),
130
- "type" => "text"),
131
-
132
- array("type" => "splitter"),
133
-
134
- array( "name" => "Enable dropdown effects",
135
- "desc" => "If checked sub menus will use effects below",
136
- "id" => "shailan_dm_effects",
137
- "type" => "checkbox"),
138
-
139
- array( "name" => "Effect",
140
- "desc" => "Select effect you want to use",
141
- "id" => "shailan_dm_effect",
142
- "type" => "select",
143
- "options" => $effects ),
144
-
145
- array( "name" => "Effect Speed",
146
- "desc" => "Select effect speed",
147
- "id" => "shailan_dm_effect_speed",
148
- "type" => "select",
149
- "options" => $speed ),
150
-
151
- array( "name" => "Effect delay",
152
- "desc" => "Select effect delay",
153
- "id" => "shailan_dm_effect_delay",
154
- "type" => "select",
155
- "options" => $delay ),
156
-
157
- array("type" => "splitter"),
158
-
159
- array( "name" => "Wrap long menu items",
160
- "desc" => "If checked long menu items will wrap",
161
- "id" => "shailan_dm_allowmultiline",
162
- "type" => "checkbox"),
163
-
164
- array( "name" => "Remove title attributes from menu items",
165
- "desc" => "This will remove 'View all posts under..' title attributes from menu links",
166
- "id" => "shailan_dm_remove_title_attributes",
167
- "type" => "checkbox"),
168
-
169
- array( "name" => "Remove links from top levels",
170
- "desc" => "This will remove links from top level pages/categories. So user can only click to sub-level menu.",
171
- "id" => "shailan_dm_remove_top_level_links",
172
- "type" => "checkbox"),
173
-
174
- array( "type" => "close" ),
175
-
176
- array(
177
- "name" => "Color Scheme (beta)",
178
- "type" => "section"
179
- ),
180
-
181
- array( "name" => "Use custom colors",
182
- "desc" => "If not checked custom colors won't work.",
183
- "id" => "shailan_dm_custom_colors",
184
- "std" => true,
185
- "type" => "checkbox"),
186
-
187
- array("type"=>"picker"),
188
-
189
- array( "name" => "Menu Background Color",
190
- "desc" => "Background color of the dropdown menu",
191
- "id" => "shailan_dm_color_menubg",
192
- "std" => '#000000',
193
- "type" => "text"),
194
-
195
- array( "name" => "Hover Background Color",
196
- "desc" => "Background color of list item link.",
197
- "id" => "shailan_dm_color_lihover",
198
- "std" => '#333333',
199
- "type" => "text"),
200
-
201
- array( "name" => "Link Text Color",
202
- "desc" => "Default link color",
203
- "id" => "shailan_dm_color_link",
204
- "std" => '#FFFFFF',
205
- "type" => "text"),
206
-
207
- array( "name" => "Link Text Color on mouse over",
208
- "desc" => "Secondary link color",
209
- "id" => "shailan_dm_color_hoverlink",
210
- "std" => '#FFFFFF',
211
- "type" => "text"),
212
-
213
- array( "name" => "Overlay",
214
- "desc" => "Menu overlay (Works on browsers that support png transparency only.)",
215
- "id" => "shailan_dm_overlay",
216
- "std" => "glass",
217
- "type" => "select",
218
- "options" => $overlays ),
219
-
220
- array( "type" => "close" ),
221
-
222
- array(
223
- "name" => "Advanced Options",
224
- "type" => "section"
225
- ),
226
-
227
- array( "name" => "Dropdown Menu Font",
228
- "desc" => "Font family for the menu<br />Please leave blank to use your wordpress theme font.",
229
- "id" => "shailan_dm_font",
230
- "std" => '',
231
- "type" => "text"),
232
-
233
- array( "name" => "Dropdown Menu Font Size",
234
- "desc" => "Font size of the menu items (Eg: 12px OR 1em) <br />Please leave blank to use your wordpress theme font-size.",
235
- "id" => "shailan_dm_fontsize",
236
- "std" => '',
237
- "type" => "text"),
238
-
239
- array( "name" => "Custom css",
240
- "desc" => "You can paste your own customization file here.",
241
- "id" => "shailan_dm_custom_css",
242
- "std" => '',
243
- "type" => "textarea"),
244
-
245
- array( "name" => "Show Empty Categories",
246
- "desc" => "If checked categories with no posts will be shown.",
247
- "id" => "shailan_dm_show_empty",
248
- "std" => false,
249
- "type" => "checkbox"),
250
-
251
- array( "type" => "close" ),
252
-
253
- array(
254
- "name" => "Template Tag Options",
255
- "type" => "section"
256
- ),
257
-
258
- array(
259
- "desc" => "Settings here only effect menus inserted with template tag : <code>&lt;?php shailan_dropdown_menu(); ?&gt;</code>. Widget settings are NOT affected by these settings. ",
260
- "type" => "paragraph"
261
- ),
262
-
263
- array( "name" => "Menu Type",
264
- "desc" => "Dropdown Menu Type",
265
- "id" => "shailan_dm_type",
266
- "std" => "pages",
267
- "options" => $types,
268
- "type" => "select"),
269
-
270
- array( "name" => "Home link",
271
- "desc" => "If checked dropdown menu displays home link",
272
- "id" => "shailan_dm_home",
273
- "std" => true,
274
- "type" => "checkbox"),
275
-
276
- array( "name" => "Login",
277
- "desc" => "If checked dropdown menu displays login link",
278
- "id" => "shailan_dm_login",
279
- "std" => true,
280
- "type" => "checkbox"),
281
-
282
- array( "name" => "Register / Site Admin",
283
- "desc" => "If checked dropdown menu displays register/site admin link.",
284
- "id" => "shailan_dm_login",
285
- "std" => true,
286
- "type" => "checkbox"),
287
-
288
- array( "name" => "Vertical menu",
289
- "desc" => "If checked dropdown menu is displayed vertical.",
290
- "id" => "shailan_dm_vertical",
291
- "std" => true,
292
- "type" => "checkbox"),
293
-
294
- array( "name" => "Exclude Pages",
295
- "desc" => "Excluded page IDs.",
296
- "id" => "shailan_dm_exclude",
297
- "std" => "",
298
- "type" => "text"),
299
-
300
- array( "name" => "Alignment",
301
- "desc" => "Menu alignment.",
302
- "id" => "shailan_dm_align",
303
- "std" => "left",
304
- "options" => $alignment,
305
- "type" => "select"),
306
-
307
- array( "type" => "close" )
308
-
309
- );
310
 
311
- $this->defaults = array(
312
  'title' => '',
313
  'type' => 'pages',
314
  'exclude' => '',
@@ -322,71 +60,232 @@ class shailan_DropdownWidget extends WP_Widget {
322
  'width' => 'empty'
323
  );
324
 
325
- $pluginname = $this->pluginname;
326
- $pluginshortname = $this->shortname;
327
- $pluginoptions = $this->admin_options;
328
-
329
- /** Unused options */
330
- update_option('shailan_dm_customwalkers', false);
331
  }
332
 
333
- /******************************************************************************
334
- * OPTIONS
335
- ******************************************************************************/
336
- function adminMenu(){
337
- global $pluginname, $pluginshortname, $pluginoptions;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
 
339
- if( is_admin() ){
340
- wp_enqueue_style( 'dropdown-widget-styles', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/css/widgets.css' );
341
- wp_enqueue_script( 'dropdown-widgets', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/widgets.js', array('jquery') );
342
- };
343
 
344
- if ( isset($_GET['page']) && $_GET['page'] == 'dropdown-menu' ) {
345
-
346
- // Styles
347
- wp_admin_css( 'widgets' );
348
- wp_enqueue_style('farbtastic');
349
- wp_enqueue_style( 'dropdownMenuStyles', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/css/admin.css' );
350
-
351
- // Scripts
352
- wp_enqueue_script( 'admin-widgets' );
353
- wp_enqueue_script( 'farbtastic' );
354
- wp_enqueue_script( 'dropdown-colorpick', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/admin.js', array('jquery') );
355
-
356
- if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
357
-
358
- foreach ($pluginoptions as $value) {
359
- update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
360
-
361
- foreach ($pluginoptions as $value) {
362
- if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
363
-
364
- header("Location: admin.php?page=dropdown-menu&saved=true");
365
- die;
366
-
367
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
 
369
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
 
371
- if (function_exists('add_options_page')) {
372
- $page = add_options_page(__('Settings for Dropdown Menu', 'shailan-dropdown-menu') , __('Dropdown Menu', 'shailan-dropdown-menu'), 'edit_themes', 'dropdown-menu', array('shailan_DropdownWidget', 'getOptionsPage'));
373
- add_action('admin_print_styles-' . $page, array('shailan_DropdownWidget', 'header'));
 
 
 
 
 
 
 
 
374
  }
375
  }
376
 
377
- // Render options page
378
- function getOptionsPage(){
379
- global $pluginname, $pluginshortname, $pluginoptions;
380
- $title = __('Dropdown Menu Options');
381
- include_once('options-page.php');
382
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
 
384
  /******************************************************************************
385
  * the WIDGET
386
  ******************************************************************************/
387
  function widget($args, $instance) {
388
  extract( $args );
389
- $widget_options = wp_parse_args( $instance, $this->defaults );
390
  extract( $widget_options, EXTR_SKIP );
391
 
392
  // On and off
@@ -408,13 +307,13 @@ class shailan_DropdownWidget extends WP_Widget {
408
 
409
  $nl = "\n"; $indent = "\n\t"; $indent2 = "\n\t\t";
410
 
411
- echo $nl . "<!-- Dropdown Menu Widget by shailan (http://shailan.com) v".SHAILAN_DM_VERSION." on wp".get_bloginfo( 'version' )." -->";
412
  echo $nl . "<!-- Menu Type : " . $type . " -->";
413
  echo $nl . "<div class=\"shailan-dropdown-menu\">";
414
 
415
  $dropdown_wrapper_open = $nl . '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
416
 
417
- $dropdown_open = $indent . '<div align="' . $align . '" class="'.$orientation.'-container dm-align-'.$align.'"><table cellpadding="0" cellspacing="0"><tr><td>';
418
  $list_open = $indent2 . '<ul id="dropdown-'. $this->number .'" class="dropdown dropdown-'. $this->number .' '. $orientation . ' dropdown-align-'.$align.'" '. $width_attr .' >' . $nl . "<!-- Menu elements start -->\n";
419
 
420
  if($home && ($type == 'pages' || $type == 'categories')){
@@ -565,7 +464,7 @@ class shailan_DropdownWidget extends WP_Widget {
565
  * WIDGET FORM
566
  ******************************************************************************/
567
  function form($instance) {
568
- $widget_options = wp_parse_args( $instance, $this->defaults );
569
  extract( $widget_options, EXTR_SKIP );
570
 
571
  $width = (int) $width;
@@ -620,32 +519,30 @@ class shailan_DropdownWidget extends WP_Widget {
620
  * HEADER
621
  ******************************************************************************/
622
  function header($instance){
623
- global $pluginname, $pluginshortname, $pluginoptions;
624
  if(!is_admin()){
625
 
626
- $theme = get_option('shailan_dm_active_theme');
627
- if($theme == '*url*'){ $theme = get_option('shailan_dm_theme_url'); }
628
-
629
- $allow_multiline = (bool) get_option('shailan_dm_allowmultiline');
630
-
 
631
  // Colors
632
- $custom_colors = (bool) get_option('shailan_dm_custom_colors');
633
- $shailan_dm_color_menubg = get_option('shailan_dm_color_menubg');
634
- $shailan_dm_color_lihover = get_option('shailan_dm_color_lihover');
635
- $shailan_dm_color_link = get_option('shailan_dm_color_link');
636
- $shailan_dm_color_hoverlink = get_option('shailan_dm_color_hoverlink');
637
-
638
- $is_fx_active = (bool) get_option('shailan_dm_effects');
639
-
640
- echo "\n\n<!-- Dropdown Menu Widget Styles by shailan (http://shailan.com) v".SHAILAN_DM_VERSION." on wp".get_bloginfo( 'version' )." -->"; // For debug
641
- echo "\n<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/css/shailan-dropdown.css\" type=\"text/css\" />";
642
-
643
 
 
 
644
 
645
  if( $theme!='*none*' && $theme != '*custom*' ){
646
  if( false === strpos($theme, 'http') ){
647
  // Default
648
- echo "\n<link rel=\"stylesheet\" href=\"". plugins_url( '/themes/' . $theme . '.css', __FILE__)."\" type=\"text/css\" />";
649
  } else {
650
  // URL include
651
  echo "\n<link rel=\"stylesheet\" href=\"".$theme."\" type=\"text/css\" />";
@@ -657,11 +554,11 @@ class shailan_DropdownWidget extends WP_Widget {
657
  $indent = "\n\t";
658
 
659
  // Font family and font size
660
- $font_family = stripslashes(get_option('shailan_dm_font'));
661
 
662
  if(!empty($font_family)){ echo $indent. "ul.dropdown li a { font-family:$font_family; } "; }
663
 
664
- $font_size = get_option('shailan_dm_fontsize'); //'12px';
665
 
666
  if(!empty($font_size)){ echo $indent. "ul.dropdown li a { font-size:$font_size; }"; }
667
 
@@ -673,7 +570,7 @@ class shailan_DropdownWidget extends WP_Widget {
673
  // Custom color scheme is active
674
 
675
  // Overlay support
676
- $overlay = get_option('shailan_dm_overlay');
677
  echo $indent . "/* Selected overlay: ". $overlay . " */";
678
 
679
  if($overlay!='none' && $theme=='color-scheme' ){
@@ -707,6 +604,7 @@ class shailan_DropdownWidget extends WP_Widget {
707
  <?php } else {/* unidentified overlay ? */} ?>
708
 
709
  .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
 
710
  ul.dropdown a:link,
711
  ul.dropdown a:visited,
712
  ul.dropdown li { color: <?php echo $shailan_dm_color_link; ?>; }
@@ -739,7 +637,7 @@ class shailan_DropdownWidget extends WP_Widget {
739
  <?php }
740
 
741
  // Insert Custom CSS last
742
- $custom_css = stripslashes(get_option('shailan_dm_custom_css'));
743
  if(!empty($custom_css)){ echo $custom_css; }
744
  echo "\n</style>";
745
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
@@ -754,16 +652,16 @@ class shailan_DropdownWidget extends WP_Widget {
754
  function footer($instance){
755
  $indent = "\n\t";
756
 
757
- $remove_title_attributes = (bool) get_option('shailan_dm_remove_title_attributes');
758
- $remove_top_level_links = (bool) get_option('shailan_dm_remove_top_level_links');
759
- $is_fx_active = (bool) get_option('shailan_dm_effects');
760
- $speed = get_option('shailan_dm_effect_speed', '400');
761
- $effect = get_option('shailan_dm_effect', 'fade');
762
- $delay = get_option('shailan_dm_effect_delay', '100');
763
 
764
  if( $is_fx_active || $remove_title_attributes || $remove_top_level_links ){
765
 
766
- echo "\n\n<!-- Dropdown Menu Widget Effects by shailan (http://shailan.com) v".SHAILAN_DM_VERSION." on wp".get_bloginfo( 'version' )." -->"; // For debug
767
  echo "\n<script type=\"text/javascript\">/* <![CDATA[ */";
768
  echo "\n(function($){ \n";
769
 
@@ -795,7 +693,7 @@ class shailan_DropdownWidget extends WP_Widget {
795
  // Remove links from top-level elements
796
  if($remove_top_level_links){
797
  ?>
798
- $('ul.children').parent().find('a:first').removeAttr('href');
799
  <?php
800
  }
801
 
@@ -842,6 +740,19 @@ class shailan_DropdownWidget extends WP_Widget {
842
  }
843
  // *** END OF CLASS ***
844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
845
  // Register widget
846
  add_action('widgets_init', create_function('', 'return register_widget("shailan_DropdownWidget");'));
847
 
@@ -849,9 +760,6 @@ add_action('widgets_init', create_function('', 'return register_widget("shailan_
849
  $plugin_dir = basename(dirname(__FILE__));
850
  load_plugin_textdomain( 'shailan-dropdown-menu', false, $plugin_dir . '/lang');
851
 
852
- // Add admin menu
853
- add_action('admin_menu', array('shailan_DropdownWidget', 'adminMenu'));
854
-
855
  /* Includes */
856
  include('shailan-page-walker.php'); // Load custom page walker
857
  include('shailan-category-walker.php'); // Load custom category walker
@@ -862,14 +770,15 @@ include('shailan-multi-dropdown.php'); // Load multi-dropdown widget
862
  // Template tag support
863
  function shailan_dropdown_menu( $args = array() ){
864
 
865
- $type = get_option('shailan_dm_type');
866
- $exclude = get_option('shailan_dm_exclude');
867
- $inline_style = get_option('shailan_dm_style');
868
- $login = (bool) get_option('shailan_dm_login');
869
- $admin = (bool) get_option('shailan_dm_admin');
870
- $vertical = (bool) get_option('shailan_dm_vertical');
871
- $home = (bool) get_option('shailan_dm_home');
872
- $align = get_option('shailan_dm_align');
 
873
 
874
  $opts = array(
875
  'type' => $type,
@@ -879,7 +788,8 @@ function shailan_dropdown_menu( $args = array() ){
879
  'admin' => $admin,
880
  'vertical' => $vertical,
881
  'home' => $home,
882
- 'align' => $align
 
883
  );
884
 
885
  $options = wp_parse_args( $args, $opts );
@@ -889,10 +799,11 @@ function shailan_dropdown_menu( $args = array() ){
889
  the_widget( 'shailan_DropdownWidget', $options );
890
  }
891
 
892
- function get_latest_tweet($username){
893
- $url = "http://search.twitter.com/search.atom?q=from:$username&rpp=1";
894
- $content = file_get_contents($url);
895
- $content = explode('<content type="html">', $content);
896
- $content = explode('</content>', $content[1]);
897
- return html_entity_decode($content[0]);
898
- }
 
3
  Plugin Name: Dropdown Menu Widget
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
+ Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme, jquery, template, multi-color, theme
7
+ Version: 1.7
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
+ define('VERSION', '1.7');
 
 
 
 
 
 
14
 
15
  class shailan_DropdownWidget extends WP_Widget {
16
 
17
  function shailan_DropdownWidget(){
18
+ $widget_ops = array(
19
+ 'classname' => 'shailan-dropdown-menu-widget',
20
+ 'description' => __( 'Dropdown page/category menu', 'shailan-dropdown-menu' )
21
+ );
22
 
 
23
  $this->WP_Widget('dropdown-menu', __('Dropdown Menu', 'shailan-dropdown-menu'), $widget_ops);
24
  $this->alt_option_name = 'widget_dropdown_menu';
25
 
26
  $this->pluginname = "Dropdown Menu";
27
  $this->shortname = "shailan_dm";
28
 
29
+ $this->version = VERSION;
30
+ $this->settings_key = "shailan_dropdown_menu";
31
+ $this->options_page = "dropdown-menu";
32
+
33
  // Hook up styles
34
  add_action( 'wp_head', array(&$this, 'header') );
35
  add_action( 'wp_footer', array(&$this, 'footer'), 10, 1 );
37
  // Hook up scripts
38
  if(!is_admin()){
39
  wp_enqueue_script( 'jquery' );
40
+ wp_enqueue_script( 'dropdown-ie-support', plugins_url( '/scripts/include.js' , __FILE__ ) , array('jquery') );
41
+ wp_enqueue_script( 'hoverIntent', plugins_url( '/scripts/hoverIntent.js' , __FILE__ ) , array('jquery') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
 
44
+ // Include options array
45
+ require_once("shailan-dropdown-menu-options.php");
46
+ $this->options = $options;
47
+ $this->settings = $this->get_plugin_settings();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
+ $this->widget_defaults = array(
50
  'title' => '',
51
  'type' => 'pages',
52
  'exclude' => '',
60
  'width' => 'empty'
61
  );
62
 
63
+ add_action('admin_menu', array( &$this, 'admin_header') );
 
 
 
 
 
64
  }
65
 
66
+ function admin_header(){
67
+
68
+ if ( @$_GET['page'] == $this->options_page ) {
69
+
70
+ // Options page styles
71
+ wp_enqueue_style( 'farbtastic' );
72
+ wp_enqueue_style( "google-droid-sans", "http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold&v1", false, "1.0", "all");
73
+ wp_enqueue_style( "dropdown-admin", plugins_url( '/css/dropdown-admin.css' , __FILE__ ) , false, "1.0", "all");
74
+
75
+ // Options page scripts
76
+ wp_enqueue_script( "jquery" );
77
+ wp_enqueue_script( 'farbtastic' );
78
+ wp_enqueue_script( "tweetable", plugins_url( '/scripts/jquery.tweetable.js' , __FILE__ ) , 'jquery' );
79
+ wp_enqueue_script( 'dropdown-colorpick', plugins_url( '/scripts/admin.js' , __FILE__ ) , array('jquery') );
80
+
81
+ if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
82
+
83
+ // Save settings
84
+ $settings = $this->get_settings();
85
+
86
+ // Set updated values
87
+ foreach($this->options as $option){
88
+ if( $option['type'] == 'checkbox' && empty( $_REQUEST[ $option['id'] ] ) ) {
89
+ $settings[ $option['id'] ] = 'off';
90
+ } else {
91
+ $settings[ $option['id'] ] = $_REQUEST[ $option['id'] ];
92
+ }
93
+ }
94
+
95
+ // Save the settings
96
+ update_option( $this->settings_key, $settings );
97
+ header("Location: admin.php?page=" . $this->options_page . "&saved=true&message=1");
98
+ die;
99
+ } else if( @$_REQUEST['action'] && 'reset' == $_REQUEST['action'] ) {
100
+
101
+ // Start a new settings array
102
+ $settings = array();
103
+ delete_option( $this->settings_key );
104
+
105
+ header("Location: admin.php?page=" . $this->options_page . "&reset=true&message=2");
106
+ die;
107
+ }
108
 
109
+ }
 
 
 
110
 
111
+ $page = add_options_page(
112
+ __('Settings for Dropdown Menu', 'shailan-dropdown-menu'),
113
+ __('Dropdown Menu', 'shailan-dropdown-menu'),
114
+ 'edit_themes',
115
+ $this->options_page,
116
+ array( &$this, 'options_page')
117
+ );
118
+
119
+ add_action( 'admin_print_styles-' . $page, array( &$this, 'header' ) );
120
+ }
121
+
122
+ function get_plugin_settings(){
123
+ $settings = get_option( $this->settings_key );
124
+
125
+ if(FALSE === $settings){
126
+ // Options doesn't exist, install standard settings
127
+ return $this->install_default_settings();
128
+ } else { // Options exist, update if necessary
129
+ if( !empty( $settings['version'] ) ){ $ver = $settings['version']; }
130
+ else { $ver = ''; }
131
+
132
+ if($ver != $this->version){
133
+ // Update settings
134
+ return $this->update_plugin_settings( $settings );
135
+ } else {
136
+ // Plugin is up to date, let's return
137
+ return $settings;
138
+ }
139
+ }
140
+ }
141
+
142
+ /* Updates a single option key */
143
+ function update_plugin_setting( $key, $value ){
144
+ $settings = $this->get_plugin_settings();
145
+ $settings[$key] = $value;
146
+ update_option( $this->settings_key, $settings );
147
+ }
148
+
149
+ /* Retrieves a single option */
150
+ function get_plugin_setting( $key, $default = '' ) {
151
+ $settings = $this->get_plugin_settings();
152
+ if( array_key_exists($key, $settings) ){
153
+ return $settings[$key];
154
+ } else {
155
+ return $default;
156
+ }
157
+
158
+ return FALSE;
159
+ }
160
+
161
+ function install_default_settings(){
162
+ // Create settings array
163
+ $settings = array();
164
+
165
+ // Set default values
166
+ foreach($this->options as $option){
167
+ if( array_key_exists( 'id', $option ) )
168
+ $settings[ $option['id'] ] = $option['std'];
169
+ }
170
+
171
+ // Get old options values and update current settings
172
+ $settings['shailan_dm_active_theme'] = get_option('shailan_dm_active_theme');
173
+ delete_option('shailan_dm_active_theme');
174
+
175
+ $settings['shailan_dm_align'] = get_option('shailan_dm_align');
176
+ delete_option('shailan_dm_align');
177
+
178
+ $settings['shailan_dm_color_hoverlink'] = get_option('shailan_dm_color_hoverlink');
179
+ delete_option('shailan_dm_color_hoverlink');
180
+
181
+ $settings['shailan_dm_color_lihover'] = get_option('shailan_dm_color_lihover');
182
+ delete_option('shailan_dm_color_lihover');
183
+
184
+ $settings['shailan_dm_color_link'] = get_option('shailan_dm_color_link');
185
+ delete_option('shailan_dm_color_link');
186
+
187
+ $settings['shailan_dm_color_menubg'] = get_option('shailan_dm_color_menubg');
188
+ delete_option('shailan_dm_color_menubg');
189
+
190
+ $settings['shailan_dm_custom_css'] = get_option('shailan_dm_custom_css');
191
+ delete_option('shailan_dm_custom_css');
192
+
193
+ $settings['shailan_dm_effect'] = get_option('shailan_dm_effect');
194
+ delete_option('shailan_dm_effect');
195
+
196
+ $settings['shailan_dm_effects'] = get_option('shailan_dm_effects');
197
+ delete_option('shailan_dm_effects');
198
+
199
+ $settings['shailan_dm_effect_delay'] = get_option('shailan_dm_effect_delay');
200
+ delete_option('shailan_dm_effect_delay');
201
 
202
+ $settings['shailan_dm_effect_speed'] = get_option('shailan_dm_effect_speed');
203
+ delete_option('shailan_dm_effect_speed');
204
+
205
+ $settings['shailan_dm_exclude'] = get_option('shailan_dm_exclude');
206
+ delete_option('shailan_dm_exclude');
207
+
208
+ $settings['shailan_dm_font'] = get_option('shailan_dm_font');
209
+ delete_option('shailan_dm_font');
210
+
211
+ $settings['shailan_dm_fontsize'] = get_option('shailan_dm_fontsize');
212
+ delete_option('shailan_dm_fontsize');
213
+
214
+ $settings['shailan_dm_home_tag'] = get_option('shailan_dm_home_tag');
215
+ delete_option('shailan_dm_home_tag');
216
+
217
+ $settings['shailan_dm_overlay'] = get_option('shailan_dm_overlay');
218
+ delete_option('shailan_dm_overlay');
219
+
220
+ $settings['shailan_dm_show_empty'] = get_option('shailan_dm_show_empty');
221
+ delete_option('shailan_dm_show_empty');
222
+
223
+ $settings['shailan_dm_theme_url'] = get_option('shailan_dm_theme_url');
224
+ delete_option('shailan_dm_theme_url');
225
+
226
+ $settings['shailan_dm_type'] = get_option('shailan_dm_type');
227
+ delete_option('shailan_dm_type');
228
 
229
+ $settings['version'] = $this->version;
230
+ // Save the settings
231
+ update_option( $this->settings_key, $settings );
232
+ return $settings;
233
+ }
234
+
235
+ function update_plugin_settings( $current_settings ){
236
+ //Add missing keys
237
+ foreach($this->options as $option){
238
+ if( array_key_exists ( 'id' , $option ) && !array_key_exists ( $option['id'] ,$current_settings ) ){
239
+ $current_settings[ $option['id'] ] = $option['std'];
240
  }
241
  }
242
 
243
+ update_option( $this->settings_key, $current_settings );
244
+ return $current_settings;
245
+ }
246
+
247
+ function options_page(){
248
+ global $options, $current;
249
+
250
+ $title = "Dropdown Menu Widget Options";
251
+
252
+ $options = $this->options;
253
+ $current = $this->get_plugin_settings();
254
+
255
+ $messages = array(
256
+ "1" => __("Dropdown Menu Widget settings saved.", "shailan-dropdown-menu"),
257
+ "2" => __("Dropdown Menu Widget settings reset.", "shailan-dropdown-menu")
258
+ );
259
+
260
+ $navigation = '<div id="stf_nav"><a href="http://shailan.com/wordpress/plugins/dropdown-menu/">Plugin page</a> | <a href="http://shailan.com/wordpress/plugins/dropdown-menu/help/">Usage</a> | <a href="http://shailan.com/donate/">Donate</a> | <a href="http://shailan.com/wordpress/plugins/">Get more widgets..</a></div>
261
+
262
+ <div class="stf_share">
263
+ <div class="share-label">
264
+ Like this plugin?
265
+ </div>
266
+ <div class="share-button tweet">
267
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://shailan.com/wordpress/plugins/dropdown-menu/" data-text="I am using #dropdown-menu-widget by shailan on my #wordpress blog, Check this out!" data-count="horizontal" data-via="shailancom">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
268
+ </div>
269
+ <div class="share-button facebook">
270
+ <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
271
+ <fb:like href="http://shailan.com/wordpress/plugins/dropdown-menu/" ref="plugin_options" show_faces="false" width="300" font="segoe ui"></fb:like>
272
+ </div>
273
+ </div>
274
+
275
+ ';
276
+
277
+ $footer_text = '<em><a href="http://shailan.com/wordpress/plugins/dropdown-menu/">Dropdown Menu Widget</a> by <a href="http://shailan.com/">SHAILAN</a></em>';
278
+
279
+ include_once( "stf-page-options.php" );
280
+
281
+ }
282
 
283
  /******************************************************************************
284
  * the WIDGET
285
  ******************************************************************************/
286
  function widget($args, $instance) {
287
  extract( $args );
288
+ $widget_options = wp_parse_args( $instance, $this->widget_defaults );
289
  extract( $widget_options, EXTR_SKIP );
290
 
291
  // On and off
307
 
308
  $nl = "\n"; $indent = "\n\t"; $indent2 = "\n\t\t";
309
 
310
+ echo $nl . "<!-- Dropdown Menu Widget by shailan (http://shailan.com) v". VERSION ." on wp".get_bloginfo( 'version' )." -->";
311
  echo $nl . "<!-- Menu Type : " . $type . " -->";
312
  echo $nl . "<div class=\"shailan-dropdown-menu\">";
313
 
314
  $dropdown_wrapper_open = $nl . '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
315
 
316
+ $dropdown_open = $indent . '<div align="'.$align.'" class="'.$orientation.'-container dm-align-'.$align.' clearfix"><table cellpadding="0" cellspacing="0"><tr><td>';
317
  $list_open = $indent2 . '<ul id="dropdown-'. $this->number .'" class="dropdown dropdown-'. $this->number .' '. $orientation . ' dropdown-align-'.$align.'" '. $width_attr .' >' . $nl . "<!-- Menu elements start -->\n";
318
 
319
  if($home && ($type == 'pages' || $type == 'categories')){
464
  * WIDGET FORM
465
  ******************************************************************************/
466
  function form($instance) {
467
+ $widget_options = wp_parse_args( $instance, $this->widget_defaults );
468
  extract( $widget_options, EXTR_SKIP );
469
 
470
  $width = (int) $width;
519
  * HEADER
520
  ******************************************************************************/
521
  function header($instance){
522
+
523
  if(!is_admin()){
524
 
525
+ //$default_headers = array( 'Version' => 'Version' );
526
+ //$dropdown = get_file_data( __FILE__, $default_headers, 'plugin' );
527
+
528
+ $theme = $this->get_plugin_setting('shailan_dm_active_theme');
529
+ if($theme == '*url*'){ $theme = $this->get_plugin_setting('shailan_dm_theme_url'); }
530
+ $allow_multiline = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_allowmultiline') );
531
  // Colors
532
+ $custom_colors = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_custom_colors') );
533
+ $shailan_dm_color_menubg = $this->get_plugin_setting('shailan_dm_color_menubg');
534
+ $shailan_dm_color_lihover = $this->get_plugin_setting('shailan_dm_color_lihover');
535
+ $shailan_dm_color_link = $this->get_plugin_setting('shailan_dm_color_link');
536
+ $shailan_dm_color_hoverlink = $this->get_plugin_setting('shailan_dm_color_hoverlink');
537
+ $is_fx_active = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_effects') );
 
 
 
 
 
538
 
539
+ echo "\n\n<!-- Dropdown Menu Widget Styles by shailan (http://shailan.com) v" . VERSION . " on wp" . get_bloginfo( 'version' ) . " -->"; // For debug
540
+ echo "\n<link rel=\"stylesheet\" href=\"". plugins_url( '/css/shailan-dropdown.css' , __FILE__ ) . "\" type=\"text/css\" />";
541
 
542
  if( $theme!='*none*' && $theme != '*custom*' ){
543
  if( false === strpos($theme, 'http') ){
544
  // Default
545
+ echo "\n<link rel=\"stylesheet\" href=\"". plugins_url( '/themes/' . $theme . '.css', __FILE__ ) ."\" type=\"text/css\" />";
546
  } else {
547
  // URL include
548
  echo "\n<link rel=\"stylesheet\" href=\"".$theme."\" type=\"text/css\" />";
554
  $indent = "\n\t";
555
 
556
  // Font family and font size
557
+ $font_family = stripslashes( $this->get_plugin_setting('shailan_dm_font') );
558
 
559
  if(!empty($font_family)){ echo $indent. "ul.dropdown li a { font-family:$font_family; } "; }
560
 
561
+ $font_size = $this->get_plugin_setting('shailan_dm_fontsize'); //'12px';
562
 
563
  if(!empty($font_size)){ echo $indent. "ul.dropdown li a { font-size:$font_size; }"; }
564
 
570
  // Custom color scheme is active
571
 
572
  // Overlay support
573
+ $overlay = $this->get_plugin_setting('shailan_dm_overlay');
574
  echo $indent . "/* Selected overlay: ". $overlay . " */";
575
 
576
  if($overlay!='none' && $theme=='color-scheme' ){
604
  <?php } else {/* unidentified overlay ? */} ?>
605
 
606
  .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
607
+ ul.dropdown a,
608
  ul.dropdown a:link,
609
  ul.dropdown a:visited,
610
  ul.dropdown li { color: <?php echo $shailan_dm_color_link; ?>; }
637
  <?php }
638
 
639
  // Insert Custom CSS last
640
+ $custom_css = stripslashes( $this->get_plugin_setting('shailan_dm_custom_css') );
641
  if(!empty($custom_css)){ echo $custom_css; }
642
  echo "\n</style>";
643
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
652
  function footer($instance){
653
  $indent = "\n\t";
654
 
655
+ $remove_title_attributes = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_title_attributes') );
656
+ $remove_top_level_links = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_top_level_links') );
657
+ $is_fx_active = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_effects') );
658
+ $speed = $this->get_plugin_setting('shailan_dm_effect_speed', '400');
659
+ $effect = $this->get_plugin_setting('shailan_dm_effect', 'fade');
660
+ $delay = $this->get_plugin_setting('shailan_dm_effect_delay', '100');
661
 
662
  if( $is_fx_active || $remove_title_attributes || $remove_top_level_links ){
663
 
664
+ echo "\n\n<!-- Dropdown Menu Widget Effects by shailan (http://shailan.com) v". VERSION ." on wp".get_bloginfo( 'version' )." -->"; // For debug
665
  echo "\n<script type=\"text/javascript\">/* <![CDATA[ */";
666
  echo "\n(function($){ \n";
667
 
693
  // Remove links from top-level elements
694
  if($remove_top_level_links){
695
  ?>
696
+ $('ul.dropdown>li>ul.children').parent().find('a:first').removeAttr('href');
697
  <?php
698
  }
699
 
740
  }
741
  // *** END OF CLASS ***
742
 
743
+ function get_dropdown_setting( $key, $default = '' ) {
744
+ $settings = get_option('shailan_dropdown_menu');
745
+
746
+ if( array_key_exists($key, $settings) ){
747
+ return $settings[ $key ];
748
+ } else {
749
+ return $default;
750
+ }
751
+
752
+ return FALSE;
753
+ }
754
+
755
+
756
  // Register widget
757
  add_action('widgets_init', create_function('', 'return register_widget("shailan_DropdownWidget");'));
758
 
760
  $plugin_dir = basename(dirname(__FILE__));
761
  load_plugin_textdomain( 'shailan-dropdown-menu', false, $plugin_dir . '/lang');
762
 
 
 
 
763
  /* Includes */
764
  include('shailan-page-walker.php'); // Load custom page walker
765
  include('shailan-category-walker.php'); // Load custom category walker
770
  // Template tag support
771
  function shailan_dropdown_menu( $args = array() ){
772
 
773
+ $type = get_dropdown_setting('shailan_dm_type');
774
+ $exclude = get_dropdown_setting('shailan_dm_exclude');
775
+ $inline_style = get_dropdown_setting('shailan_dm_style');
776
+ $login = (bool) get_dropdown_setting('shailan_dm_login');
777
+ $admin = (bool) get_dropdown_setting('shailan_dm_admin');
778
+ $vertical = (bool) get_dropdown_setting('shailan_dm_vertical');
779
+ $home = (bool) get_dropdown_setting('shailan_dm_home');
780
+ $align = get_dropdown_setting('shailan_dm_align');
781
+ $width = get_dropdown_setting('shailan_dm_width');
782
 
783
  $opts = array(
784
  'type' => $type,
788
  'admin' => $admin,
789
  'vertical' => $vertical,
790
  'home' => $home,
791
+ 'align' => $align,
792
+ 'width' => $width
793
  );
794
 
795
  $options = wp_parse_args( $args, $opts );
799
  the_widget( 'shailan_DropdownWidget', $options );
800
  }
801
 
802
+ function shailan_dropdown_button() {
803
+ global $wp_admin_bar, $wpdb;
804
+ if ( !is_super_admin() || !is_admin_bar_showing() )
805
+ return;
806
+
807
+ $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'title' => 'Dropdown Menu', 'href' => admin_url('options-general.php?page=dropdown-menu') ) );
808
+ }
809
+ add_action( 'admin_bar_menu', 'shailan_dropdown_button', 1000 );
stf-page-options.php ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap stf_options_page">
2
+ <?php screen_icon(); ?>
3
+ <h2><?php echo esc_html( $title ); ?></h2>
4
+
5
+ <!-- Notifications -->
6
+ <?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
7
+ <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
8
+ <?php } ?>
9
+ <?php if ( isset($_GET['error']) && isset($errors[$_GET['error']]) ) { ?>
10
+ <div id="message" class="error fade"><p><?php echo $errors[$_GET['error']]; ?></p></div>
11
+ <?php } ?>
12
+ <!-- [End] Notifications -->
13
+
14
+
15
+ <div id="shailancom">
16
+
17
+ <div id="donate">
18
+ This plugin is FREE, </br> If you like it, please support it. <br />
19
+ <div class="center">
20
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
21
+ <input type="hidden" name="cmd" value="_s-xclick" />
22
+ <input type="hidden" name="hosted_button_id" value="2UF8Y5ZSHAGZL" />
23
+ <input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
24
+ <img alt="" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/scr/pixel.gif" width="1" height="1" />
25
+ </form>
26
+ </div>
27
+ </div>
28
+
29
+ <div id="stf_tweet_wrap">
30
+ <div id="stf_tweet"></div><script type="text/javascript">
31
+ jQuery(document).ready(function($) {
32
+ $('#stf_tweet').tweetable({username: 'shailancom', time: false, limit: 1, replies: false});
33
+ });
34
+ </script>
35
+
36
+ <a href="http://twitter.com/shailancom" class="follow-link">Follow Shailan.com on twitter!</a>
37
+ </div>
38
+
39
+ <div id="headlines">
40
+ <h3>Latest headlines from Shailan.com</h3>
41
+ <?php
42
+ //echo get_latest_tweet('mattsay');
43
+
44
+ $rss_options = array(
45
+ 'link' => 'http://shailan.com',
46
+ 'url' => 'http://feeds.feedburner.com/shailan',
47
+ 'title' => 'Shailan.com',
48
+ 'items' => 5,
49
+ 'show_summary' => 0,
50
+ 'show_author' => 0,
51
+ 'show_date' => 0,
52
+ 'before' => 'text'
53
+ );
54
+
55
+ wp_widget_rss_output( $rss_options ); ?>
56
+ </div>
57
+ </div>
58
+
59
+ <div id="nav"><?php if(!empty($navigation)){echo $navigation;} ?></div>
60
+
61
+ <div class="stf_opts_wrap">
62
+ <div class="stf_options">
63
+ <form method="post">
64
+ <div id="options-tabs">
65
+
66
+ <!-- Tabs navigation -->
67
+ <ul id="tabs-navigation" class="tabs">
68
+ <?php
69
+ foreach ($options as $field) {
70
+ if ( $field['type'] == "section" ) {
71
+ echo "<li><a href=\"#" . sanitize_title( $field['name'] ) . "\" class=\"" . sanitize_title( $field['name'] ) . "\">".$field['label']."</a></li>";
72
+ }
73
+ }
74
+ ?>
75
+ </ul>
76
+ <!-- [End] Tabs Navigation -->
77
+
78
+ <div class="tab_container">
79
+ <?php foreach ($options as $field) {
80
+ switch ( $field['type'] ) {
81
+
82
+ case 'open': ?>
83
+
84
+ <?php break;
85
+
86
+ case 'close': ?>
87
+
88
+ </div>
89
+
90
+ <?php break;
91
+
92
+ case 'paragraph': ?>
93
+
94
+ <div class="stf_paragraph clearfix">
95
+ <?php echo $field['desc']; ?>
96
+ </div>
97
+
98
+ <?php
99
+ break;
100
+
101
+ case 'text': ?>
102
+
103
+ <div class="stf_input stf_text clearfix">
104
+ <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
105
+ <input name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>" type="<?php echo $field['type']; ?>" value="<?php if ( isset($current[ $field['id'] ]) && $current[ $field['id'] ] != "") { echo esc_html(stripslashes($current[ $field['id'] ] ) ); } ?>" />
106
+ <small><?php echo $field['desc']; ?></small>
107
+ </div>
108
+
109
+ <?php
110
+ break;
111
+
112
+ case 'textarea':
113
+ ?>
114
+
115
+ <div class="stf_input stf_textarea clearfix">
116
+ <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
117
+ <textarea name="<?php echo $field['id']; ?>" type="<?php echo $field['type']; ?>" cols="" rows=""><?php if ( $current[ $field['id'] ] != "") { echo stripslashes($current[ $field['id'] ] ); } else { echo $field['std']; } ?></textarea>
118
+ <small><?php echo $field['desc']; ?></small>
119
+
120
+ </div>
121
+
122
+ <?php
123
+ break;
124
+
125
+ case 'htmlarea':
126
+ ?>
127
+
128
+ <div class="stf_input stf_textarea clearfix">
129
+ <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
130
+
131
+ <script type="text/javascript">
132
+ jQuery(document).ready(function($) {
133
+ $('#<?php echo $field['id']; ?>').wysiwyg();
134
+ });
135
+ </script>
136
+
137
+ <textarea name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>" type="<?php echo $field['type']; ?>" cols="" rows=""><?php if ( $current[ $field['id'] ] != "") { echo stripslashes($current[ $field['id'] ] ); } else { echo $field['std']; } ?></textarea>
138
+ <small><?php echo $field['desc']; ?></small>
139
+
140
+ </div>
141
+
142
+ <?php
143
+ break;
144
+
145
+ case 'select':
146
+ ?>
147
+
148
+ <div class="stf_input stf_select clearfix">
149
+ <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
150
+
151
+ <select name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>">
152
+ <?php foreach ($field['options'] as $key=>$name) { ?>
153
+ <option <?php if ( isset($current[ $field['id'] ]) && $current[ $field['id'] ] == $key) { echo 'selected="selected"'; } ?> value="<?php echo $key;?>"><?php echo $name; ?></option><?php } ?>
154
+ </select>
155
+
156
+ <small><?php echo $field['desc']; ?></small>
157
+ </div>
158
+ <?php
159
+ break;
160
+
161
+ case "checkbox":
162
+ ?>
163
+
164
+ <div class="stf_input stf_checkbox clearfix">
165
+ <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
166
+
167
+ <input type="checkbox" name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>" value="on" <?php checked($current[ $field['id'] ], "on") ?> />
168
+
169
+ <small><?php echo $field['desc']; ?></small>
170
+ </div>
171
+ <?php break;
172
+ case "section":
173
+
174
+ ?>
175
+
176
+ <div class="stf_section tab_content" id="<?php echo sanitize_title( $field['name'] ); ?>">
177
+
178
+ <?php break;
179
+
180
+ case "splitter":
181
+ ?>
182
+ <div class="shailan_dm_input shailan_dm_splitter"></div>
183
+ <?php break;
184
+
185
+ case 'picker':
186
+ ?>
187
+ <div id="picker"></div>
188
+
189
+ <?php break;
190
+
191
+ }
192
+ }
193
+ ?>
194
+
195
+ <div id="tabs-footer" class="clearfix">
196
+ <p class="submit">
197
+ <input name="save" type="submit" class="button-primary" value="Save changes" />
198
+ <input type="hidden" name="action" value="save" />
199
+ </p>
200
+ </form>
201
+
202
+ <form method="post">
203
+ <input name="reset" type="submit" class="button-secondary" value="Reset Options" />
204
+ <input type="hidden" name="action" value="reset" />
205
+ </form>
206
+
207
+
208
+ <div class="copyright"><?php if(!empty($footer_text)){echo $footer_text;} ?></div>
209
+ </div>
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+
215
+
216
+
217
+ <script type="text/javascript">
218
+ jQuery(document).ready(function($) {
219
+
220
+ //When page loads...
221
+ jQuery(".tab_content").hide(); //Hide all content
222
+ jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab
223
+ jQuery(".tab_content:first").show(); //Show first tab content
224
+
225
+ //On Click Event
226
+ jQuery("ul.tabs li").click(function() {
227
+
228
+ jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
229
+ jQuery(this).addClass("active"); //Add "active" class to selected tab
230
+ jQuery(".tab_content").hide(); //Hide all tab content
231
+
232
+ var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
233
+ jQuery(activeTab).fadeIn(); //Fade in the active ID content
234
+ return false;
235
+ });
236
+
237
+ });
238
+ </script>
239
+ </div>
themes/adobe.com/default.css CHANGED
@@ -1,7 +1,7 @@
1
  ul.dropdown { font: bold 12px Arial, Helvetica, sans-serif; }
2
  ul.dropdown li { padding: 7px 12px; background-color: #000; color: #fff; }
3
  ul.dropdown li.hover, ul.dropdown li:hover { background-color: #222; }
4
- ul.dropdown a:link, ul.dropdown a:visited { color: #fff; text-decoration: none; }
5
  ul.dropdown a:hover { color: #fff; text-decoration: underline; }
6
  ul.dropdown a:active { color: #fff; }
7
 
@@ -32,7 +32,7 @@ ul.dropdown a:active { color: #fff; }
32
  font-weight: bold;
33
  }
34
 
35
- ul.dropdown ul a:link, ul.dropdown ul a:visited { color: #000; }
36
  ul.dropdown ul a:hover { color: #000; text-decoration: none; }
37
  ul.dropdown ul a:active { color: #000; }
38
 
1
  ul.dropdown { font: bold 12px Arial, Helvetica, sans-serif; }
2
  ul.dropdown li { padding: 7px 12px; background-color: #000; color: #fff; }
3
  ul.dropdown li.hover, ul.dropdown li:hover { background-color: #222; }
4
+ ul.dropdown a, ul.dropdown a:link, ul.dropdown a:visited { color: #fff; text-decoration: none; }
5
  ul.dropdown a:hover { color: #fff; text-decoration: underline; }
6
  ul.dropdown a:active { color: #fff; }
7
 
32
  font-weight: bold;
33
  }
34
 
35
+ ul.dropdown ul a, ul.dropdown ul a:link, ul.dropdown ul a:visited { color: #000; }
36
  ul.dropdown ul a:hover { color: #000; text-decoration: none; }
37
  ul.dropdown ul a:active { color: #000; }
38
 
themes/default/default.css CHANGED
@@ -47,6 +47,7 @@ ul.dropdown {
47
  color: #000;
48
  }
49
 
 
50
  ul.dropdown a:link,
51
  ul.dropdown a:visited { color: #000; text-decoration: none; }
52
  ul.dropdown a:hover { color: #000; }
@@ -72,7 +73,7 @@ ul.dropdown {
72
  */
73
 
74
 
75
- ul.dropdown *.dir {
76
  padding-right: 20px;
77
  background-image: url(images/nav-arrow-down.png);
78
  background-position: 100% 50%;
47
  color: #000;
48
  }
49
 
50
+ ul.dropdown a,
51
  ul.dropdown a:link,
52
  ul.dropdown a:visited { color: #000; text-decoration: none; }
53
  ul.dropdown a:hover { color: #000; }
73
  */
74
 
75
 
76
+ ul.dropdown *.dir, ul.dropdown *.parent {
77
  padding-right: 20px;
78
  background-image: url(images/nav-arrow-down.png);
79
  background-position: 100% 50%;
themes/flickr.com/default.css CHANGED
@@ -46,6 +46,7 @@
46
  color: #0063dc;
47
  }
48
 
 
49
  ul.dropdown a:link,
50
  ul.dropdown a:visited { color: #0063dc; text-decoration: none; }
51
  ul.dropdown a:hover { color: #0063dc; text-decoration: underline; }
@@ -76,7 +77,7 @@
76
  */
77
 
78
 
79
- ul.dropdown *.dir {
80
  padding-right: 25px;
81
  background-image: url(images/nav-arrow-down.png);
82
  background-position: 95% 50%;
46
  color: #0063dc;
47
  }
48
 
49
+ ul.dropdown a,
50
  ul.dropdown a:link,
51
  ul.dropdown a:visited { color: #0063dc; text-decoration: none; }
52
  ul.dropdown a:hover { color: #0063dc; text-decoration: underline; }
77
  */
78
 
79
 
80
+ ul.dropdown *.dir, ul.dropdown *.parent {
81
  padding-right: 25px;
82
  background-image: url(images/nav-arrow-down.png);
83
  background-position: 95% 50%;
themes/hulu/hulu.css CHANGED
@@ -15,7 +15,7 @@ ul.dropdown ul li.hover, ul.dropdown ul li:hover { background:transparent; }
15
  ul.dropdown li.hover a, ul.dropdown li:hover a{background:transparent;}
16
 
17
  /** Link colors */
18
- ul.dropdown a:link, ul.dropdown a:visited { color: #fff; text-decoration: none; line-height:27px !important; padding:0 10px; }
19
  ul.dropdown a:hover { color: #99cc33; background:transparent; }
20
  ul.dropdown a:active { color: #fff; }
21
 
15
  ul.dropdown li.hover a, ul.dropdown li:hover a{background:transparent;}
16
 
17
  /** Link colors */
18
+ ul.dropdown a, ul.dropdown a:link, ul.dropdown a:visited { color: #fff; text-decoration: none; line-height:27px !important; padding:0 10px; }
19
  ul.dropdown a:hover { color: #99cc33; background:transparent; }
20
  ul.dropdown a:active { color: #fff; }
21
 
themes/mtv.com/default.css CHANGED
@@ -86,6 +86,7 @@
86
 
87
  /* Links */
88
 
 
89
  ul.dropdown a:link,
90
  ul.dropdown a:visited { color: #fff; text-decoration: none;}
91
  ul.dropdown a:hover {
@@ -111,7 +112,7 @@
111
 
112
  ul.dropdown ul {
113
  /*left: auto;*/
114
- right: 0;
115
  margin-top: -1px;
116
  border-top: 1px solid #1a1a1a;
117
  border-left: solid 1px #4c4c4c;
@@ -145,20 +146,20 @@
145
  /* Mixed */
146
 
147
  ul.dropdown li a,
148
- ul.dropdown *.dir {
149
  border-style: solid;
150
  border-width: 1px;
151
  border-color: #404040 #1a1a1a #1a1a1a #505050;
152
  }
153
 
154
  ul.dropdown ul li a,
155
- ul.dropdown ul *.dir { border-color: #4a4a4a #242424 #242424; border-left: none; }
156
 
157
  ul.dropdown ul ul li a,
158
- ul.dropdown ul ul *.dir { border-color: #595959 #333 #333; }
159
 
160
  ul.dropdown ul ul ul li a,
161
- ul.dropdown ul ul ul *.dir { border-color: #767676 #404040 #404040; }
162
 
163
  /* Custom elements */
164
 
86
 
87
  /* Links */
88
 
89
+ ul.dropdown a,
90
  ul.dropdown a:link,
91
  ul.dropdown a:visited { color: #fff; text-decoration: none;}
92
  ul.dropdown a:hover {
112
 
113
  ul.dropdown ul {
114
  /*left: auto;*/
115
+ right: 0;
116
  margin-top: -1px;
117
  border-top: 1px solid #1a1a1a;
118
  border-left: solid 1px #4c4c4c;
146
  /* Mixed */
147
 
148
  ul.dropdown li a,
149
+ ul.dropdown *.dir, ul.dropdown *.parent {
150
  border-style: solid;
151
  border-width: 1px;
152
  border-color: #404040 #1a1a1a #1a1a1a #505050;
153
  }
154
 
155
  ul.dropdown ul li a,
156
+ ul.dropdown ul *.dir, ul.dropdown ul *.parent { border-color: #4a4a4a #242424 #242424; border-left: none; }
157
 
158
  ul.dropdown ul ul li a,
159
+ ul.dropdown ul ul *.dir, ul.dropdown ul ul *.parent { border-color: #595959 #333 #333; }
160
 
161
  ul.dropdown ul ul ul li a,
162
+ ul.dropdown ul ul ul *.dir, ul.dropdown ul ul ul *.parent { border-color: #767676 #404040 #404040; }
163
 
164
  /* Custom elements */
165
 
themes/nvidia.com/default.css CHANGED
@@ -1,6 +1,6 @@
1
  ul.dropdown { font: normal 12px "Trebuchet MS", Arial, Helvetica, sans-serif; text-transform: uppercase; }
2
  ul.dropdown li { background-color: #000; color: #fff; line-height: normal; }
3
- ul.dropdown a:link, ul.dropdown a:visited { color: #fff; text-decoration: none; }
4
  ul.dropdown a:hover { color: #76b900; text-decoration: none; } ul.dropdown a:active { color: #fff; }
5
  ul.dropdown ul {
6
  width: 170px;
@@ -17,8 +17,8 @@ ul.dropdown a:hover { color: #76b900; text-decoration: none; } ul.dropdown a:act
17
 
18
  ul.dropdown ul li { background-color: transparent; color: #000; filter: none; }
19
  ul.dropdown ul li.hover, ul.dropdown ul li:hover { background-color: transparent; }
20
- ul.dropdown ul a:link,ul.dropdown ul a:visited { color: #fff; }
21
  ul.dropdown ul a:hover { color: #fff; text-decoration: none; }
22
  ul.dropdown ul a:active { color: #fff; }
23
- ul.dropdown *.dir { padding-right: 12px; background-image: none; background-position: 100% 50%; background-repeat: no-repeat; }
24
  .dropdown-horizontal-container{background-color:#000;}
1
  ul.dropdown { font: normal 12px "Trebuchet MS", Arial, Helvetica, sans-serif; text-transform: uppercase; }
2
  ul.dropdown li { background-color: #000; color: #fff; line-height: normal; }
3
+ ul.dropdown a, ul.dropdown a:link, ul.dropdown a:visited { color: #fff; text-decoration: none; }
4
  ul.dropdown a:hover { color: #76b900; text-decoration: none; } ul.dropdown a:active { color: #fff; }
5
  ul.dropdown ul {
6
  width: 170px;
17
 
18
  ul.dropdown ul li { background-color: transparent; color: #000; filter: none; }
19
  ul.dropdown ul li.hover, ul.dropdown ul li:hover { background-color: transparent; }
20
+ ul.dropdown ul a,ul.dropdown ul a:link,ul.dropdown ul a:visited { color: #fff; }
21
  ul.dropdown ul a:hover { color: #fff; text-decoration: none; }
22
  ul.dropdown ul a:active { color: #fff; }
23
+ ul.dropdown *.dir, ul.dropdown *.parent { padding-right: 12px; background-image: none; background-position: 100% 50%; background-repeat: no-repeat; }
24
  .dropdown-horizontal-container{background-color:#000;}
themes/web20.css ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "UTF-8";
2
+ @import url('http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold&v1');
3
+
4
+ /** Container */
5
+ .shailan-dropdown-menu .dropdown-horizontal-container{
6
+ background: #eee;
7
+ background: -moz-linear-gradient(top, #eee 0%, #ddd 100%);
8
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eee), color-stop(100%,#ddd));
9
+ background: -webkit-linear-gradient(top, #eee 0%,#ddd 100%);
10
+ background: -o-linear-gradient(top, #eee 0%,#ddd 100%);
11
+ background: -ms-linear-gradient(top, #eee 0%,#ddd 100%);
12
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#dddddd',GradientType=0 );
13
+ background: linear-gradient(top, #eee 0%,#ddd 100%);
14
+
15
+ border-radius: 4px;
16
+ -moz-border-radius: 4px;
17
+ -o-border-radius: 4px;
18
+ -webkit-border-radius: 4px;
19
+
20
+ box-shadow: inset #eee 1px 1px 0, inset #eee -1px -1px 0;
21
+ -moz-box-shadow: inset #eee 1px 1px 0, inset #eee -1px -1px 0;
22
+ -o-box-shadow: inset #eee 1px 1px 0, inset #eee -1px -1px 0;
23
+
24
+ border: 1px solid #ccc;
25
+ padding: 4px;
26
+ position: relative;
27
+
28
+ font-family:'Droid Sans', Arial, sans-serif;
29
+ font-size: 12px;
30
+ }
31
+
32
+ ul.dropdown li { color: #555; text-align:center; }
33
+ ul.dropdown-vertical>li{ border-top:1px solid #4283b9; }
34
+ ul.dropdown-horizontal.dropdown-align-left>li { border-right:1px solid #ccc; }
35
+ ul.dropdown-horizontal.dropdown-align-left>li:last-child { border-right:0; }
36
+ ul.dropdown-horizontal.dropdown-align-right>li { border-left:1px solid #ccc; }
37
+ ul.dropdown-horizontal.dropdown-align-right>li:first-child { border-left:0; }
38
+
39
+ /** Right align fix */
40
+ ul.dropdown-align-right li{ border-width: 0px 0px 0px 1px; }
41
+
42
+ ul.dropdown li a {
43
+ padding: 3px 10px;
44
+ line-height: 22px;
45
+ }
46
+
47
+ /** Link colors */
48
+ ul.dropdown a, ul.dropdown a:link, ul.dropdown a:visited { color: #888; text-shadow:#fff 1px 1px 1px; text-decoration: none; display:block; margin:1px; }
49
+ ul.dropdown a:hover { color: #444; }
50
+ ul.dropdown a:active { color: #27d; }
51
+
52
+ /** Sub menus */
53
+ ul.dropdown ul {
54
+ background: #eee;
55
+ background: -moz-linear-gradient(top, #eee 0%, #ddd 100%);
56
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eee), color-stop(100%,#ddd));
57
+ background: -webkit-linear-gradient(top, #eee 0%,#ddd 100%);
58
+ background: -o-linear-gradient(top, #eee 0%,#ddd 100%);
59
+ background: -ms-linear-gradient(top, #eee 0%,#ddd 100%);
60
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#dddddd',GradientType=0 );
61
+ background: linear-gradient(top, #eee 0%,#ddd 100%);
62
+
63
+ border-radius: 4px;
64
+ -moz-border-radius: 4px;
65
+ -o-border-radius: 4px;
66
+ -webkit-border-radius: 4px;
67
+
68
+ box-shadow: #aaa 0px 1px 4px;
69
+ -moz-box-shadow: #aaa 0px 1px 4px;
70
+ -o-box-shadow: #aaa 0px 1px 4px;
71
+
72
+ border: 1px solid #eee;
73
+ padding: 4px;
74
+ }
75
+
76
+ ul.dropdown ul li {
77
+
78
+ }
79
+
80
+ /** Current menu item */
81
+ li.current-cat>a, li.current_page_item>a, li.current-menu-item>a,
82
+ li.current-cat>a:link, li.current_page_item>a:link, li.current-menu-item>a:link,
83
+ li.current-cat>a:visited, li.current_page_item>a:visited, li.current-menu-item>a:visited{ color: #444; }
84
+
85
+ /** Ancestor */
86
+ li.current_page_ancestor>a,li.current_page_ancestor>a:visited, li.current_page_ancestor>a:link { color: #444; }
87
+ li.current-menu-ancestor>a,li.current-menu-ancestor>a:visited, li.current-menu-ancestor>a:link { color: #444; }
themes/wpdefault.css CHANGED
@@ -14,7 +14,7 @@ ul.dropdown-align-right li{ border-width: 0px 0px 0px 1px; }
14
  ul.dropdown li.hover, ul.dropdown li:hover { background:#4283b9 url('images/default2.jpg') repeat-x bottom; }
15
 
16
  /** Link colors */
17
- ul.dropdown a:link, ul.dropdown a:visited { color: #c8daeb; text-decoration: none; display:block; }
18
  ul.dropdown a:hover { color: #fff; }
19
  ul.dropdown a:active { color: #fff; }
20
 
14
  ul.dropdown li.hover, ul.dropdown li:hover { background:#4283b9 url('images/default2.jpg') repeat-x bottom; }
15
 
16
  /** Link colors */
17
+ ul.dropdown a, ul.dropdown a:link, ul.dropdown a:visited { color: #c8daeb; text-decoration: none; display:block; }
18
  ul.dropdown a:hover { color: #fff; }
19
  ul.dropdown a:active { color: #fff; }
20