jdarwood007 commited on 2015-11-29 10:01:38
Showing 7 changed files, with 170 additions and 17 deletions.
Signed-off-by: jdarwood007 <unmonitored+github@sleepycode.com>
... | ... |
@@ -0,0 +1,138 @@ |
1 |
+/* The icons. */ |
|
2 |
+.large_admin_menu_icon.shd_cannedreplies |
|
3 |
+{ |
|
4 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
5 |
+ background-position: -9px -9px ; |
|
6 |
+} |
|
7 |
+ |
|
8 |
+.large_admin_menu_icon.shd_custom_fields |
|
9 |
+{ |
|
10 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
11 |
+ background-position: -59px -10px ; |
|
12 |
+} |
|
13 |
+ |
|
14 |
+.large_admin_menu_icon.shd_departments |
|
15 |
+{ |
|
16 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
17 |
+ background-position: -109px -9px ; |
|
18 |
+} |
|
19 |
+ |
|
20 |
+.large_admin_menu_icon.shd_log |
|
21 |
+{ |
|
22 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
23 |
+ background-position: -161px -10px ; |
|
24 |
+} |
|
25 |
+ |
|
26 |
+.large_admin_menu_icon.shd_mail |
|
27 |
+{ |
|
28 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
29 |
+ background-position: -9px -60px ; |
|
30 |
+} |
|
31 |
+ |
|
32 |
+.large_admin_menu_icon.shd_maintenance |
|
33 |
+{ |
|
34 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
35 |
+ background-position: -61px -61px ; |
|
36 |
+} |
|
37 |
+ |
|
38 |
+.large_admin_menu_icon.shd_options |
|
39 |
+{ |
|
40 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
41 |
+ background-position: -110px -58px ; |
|
42 |
+} |
|
43 |
+ |
|
44 |
+.large_admin_menu_icon.shd_permissions |
|
45 |
+{ |
|
46 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
47 |
+ background-position: -161px -59px ; |
|
48 |
+} |
|
49 |
+ |
|
50 |
+.large_admin_menu_icon.shd_plugins |
|
51 |
+{ |
|
52 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
53 |
+ background-position: -9px -106px ; |
|
54 |
+} |
|
55 |
+ |
|
56 |
+.large_admin_menu_icon.shd_simpledesk |
|
57 |
+{ |
|
58 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
59 |
+ background-position: -56px -106px ; |
|
60 |
+} |
|
61 |
+ |
|
62 |
+.large_admin_menu_icon.shd_support |
|
63 |
+{ |
|
64 |
+ background: url(../images/simpledesk/icons/shd_admin_icons.png) no-repeat; |
|
65 |
+ background-position: -110px -110px ; |
|
66 |
+} |
|
67 |
+ |
|
68 |
+.generic_icons.shd_cannedreplies |
|
69 |
+{ |
|
70 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
71 |
+ background-position: -18px -22px ; |
|
72 |
+} |
|
73 |
+ |
|
74 |
+.generic_icons.shd_custom_fields |
|
75 |
+{ |
|
76 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
77 |
+ background-position: -71px -22px ; |
|
78 |
+} |
|
79 |
+ |
|
80 |
+.generic_icons.shd_departments |
|
81 |
+{ |
|
82 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
83 |
+ background-position: -124px -22px ; |
|
84 |
+} |
|
85 |
+ |
|
86 |
+.generic_icons.shd_log |
|
87 |
+{ |
|
88 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
89 |
+ background-position: -167px -22px ; |
|
90 |
+} |
|
91 |
+ |
|
92 |
+.generic_icons.shd_mail |
|
93 |
+{ |
|
94 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
95 |
+ background-position: -18px -64px ; |
|
96 |
+} |
|
97 |
+ |
|
98 |
+.generic_icons.shd_maintenance |
|
99 |
+{ |
|
100 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
101 |
+ background-position: -66px -64px ; |
|
102 |
+} |
|
103 |
+ |
|
104 |
+.generic_icons.shd_options |
|
105 |
+{ |
|
106 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
107 |
+ background-position: -118px -64px ; |
|
108 |
+} |
|
109 |
+ |
|
110 |
+.generic_icons.shd_permissions |
|
111 |
+{ |
|
112 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
113 |
+ background-position: -166px -65px ; |
|
114 |
+} |
|
115 |
+ |
|
116 |
+.generic_icons.shd_plugins |
|
117 |
+{ |
|
118 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
119 |
+ background-position: -16px -116px ; |
|
120 |
+} |
|
121 |
+ |
|
122 |
+.generic_icons.shd_simpledesk, .generic_icons.helpdesk |
|
123 |
+{ |
|
124 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
125 |
+ background-position: -65px -116px ; |
|
126 |
+} |
|
127 |
+ |
|
128 |
+.generic_icons.shd_support |
|
129 |
+{ |
|
130 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
131 |
+ background-position: -119px -116px ; |
|
132 |
+} |
|
133 |
+ |
|
134 |
+.generic_icons.profile |
|
135 |
+{ |
|
136 |
+ background: url(../images/simpledesk/icons/shd_generic_icons.png) no-repeat; |
|
137 |
+ background-position: -167px -117px ; |
|
138 |
+} |
|
0 | 139 |
\ No newline at end of file |
... | ... |
@@ -0,0 +1,9 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+// Try to handle it with the upper level index.php. (it should know what to do.) |
|
4 |
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
5 |
+ include (dirname(dirname(__FILE__)) . '/index.php'); |
|
6 |
+else |
|
7 |
+ exit; |
|
8 |
+ |
|
9 |
+?> |
|
0 | 10 |
\ No newline at end of file |
... | ... |
@@ -36,6 +36,7 @@ |
36 | 36 |
<!-- css --> |
37 | 37 |
<require-file name="css/helpdesk.css" destination="$themedir/css" /> |
38 | 38 |
<require-file name="css/helpdesk_admin.css" destination="$themedir/css" /> |
39 |
+ <require-file name="css/helpdesk_icons.css" destination="$themedir/css" /> |
|
39 | 40 |
|
40 | 41 |
<!-- scripts --> |
41 | 42 |
<require-file name="scripts/helpdesk_admin.js" destination="$themedir/scripts" /> |
... | ... |
@@ -73,13 +74,14 @@ |
73 | 74 |
|
74 | 75 |
<!-- css, removed --> |
75 | 76 |
<remove-file name="$themedir/css/helpdesk.css" /> |
76 |
- <remove-file name="$themedir/css/helpdesk-admin.css" /> |
|
77 |
+ <remove-file name="$themedir/css/helpdesk_admin.css" /> |
|
78 |
+ <remove-file name="$themedir/css/helpdesk_icons.css" /> |
|
77 | 79 |
|
78 | 80 |
<!-- bundled plugins removed (NOTE: done one by one to avoid eating existing plugins on upgrade) --> |
79 | 81 |
<remove-dir name="$languagedir/sd_plugin_lang" /> |
80 | 82 |
|
81 | 83 |
<!-- scripts, removed --> |
82 |
- <remove-file name="$themedir/scripts/helpdesk-admin.js" /> |
|
84 |
+ <remove-file name="$themedir/scripts/helpdesk_admin.js" /> |
|
83 | 85 |
<remove-file name="$themedir/scripts/helpdesk.js" /> |
84 | 86 |
</uninstall> |
85 | 87 |
|
... | ... |
@@ -1701,10 +1701,15 @@ function shd_buffer_replace(&$buffer) |
1701 | 1701 |
*/ |
1702 | 1702 |
function shd_main_menu(&$menu_buttons) |
1703 | 1703 |
{ |
1704 |
- global $context, $txt, $scripturl, $modSettings; |
|
1704 |
+ global $context, $txt, $scripturl, $settings, $modSettings; |
|
1705 |
+ |
|
1706 |
+ if (empty($modSettings['helpdesk_active'])) |
|
1707 |
+ return; |
|
1708 |
+ |
|
1709 |
+ // Load some extra CSS |
|
1710 |
+ $context['html_headers'] .= ' |
|
1711 |
+ <link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/helpdesk_icons.css" />'; |
|
1705 | 1712 |
|
1706 |
- if (!empty($modSettings['helpdesk_active'])) |
|
1707 |
- { |
|
1708 | 1713 |
// Stuff we'll always do in SD if active |
1709 | 1714 |
$helpdesk_admin = $context['user']['is_admin'] || shd_allowed_to('admin_helpdesk', 0); |
1710 | 1715 |
|
... | ... |
@@ -1965,7 +1970,6 @@ function shd_main_menu(&$menu_buttons) |
1965 | 1970 |
// Now engage any hooks. |
1966 | 1971 |
call_integration_hook('shd_hook_mainmenu', array(&$menu_buttons)); |
1967 | 1972 |
} |
1968 |
-} |
|
1969 | 1973 |
|
1970 | 1974 |
function shd_main_menu_admin($helpdesk_admin) |
1971 | 1975 |
{ |
... | ... |
@@ -387,8 +387,9 @@ function shd_admin_bootstrap(&$admin_areas) |
387 | 387 |
shd_load_plugin_langfiles('hdadmin'); |
388 | 388 |
|
389 | 389 |
// Now add the main SimpleDesk menu |
390 |
- if (!empty($modSettings['helpdesk_active'])) |
|
391 |
- { |
|
390 |
+ if (empty($modSettings['helpdesk_active'])) |
|
391 |
+ return; |
|
392 |
+ |
|
392 | 393 |
// The helpdesk action log |
393 | 394 |
if (empty($modSettings['shd_disable_action_log'])) |
394 | 395 |
$admin_areas['maintenance']['areas']['logs']['subsections']['helpdesklog'] = array($txt['shd_admin_helpdesklog'], 'admin_forum', 'url' => $scripturl . '?action=admin;area=helpdesk_info;sa=actionlog'); |
... | ... |
@@ -401,7 +402,7 @@ function shd_admin_bootstrap(&$admin_areas) |
401 | 402 |
'helpdesk_info' => array( |
402 | 403 |
'label' => $txt['shd_admin_info'], |
403 | 404 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
404 |
- 'icon' => 'shd/simpledesk.png', |
|
405 |
+ 'icon' => 'shd_simpledesk', |
|
405 | 406 |
'function' => 'shd_admin_main', |
406 | 407 |
'subsections' => array( |
407 | 408 |
'main' => array($txt['shd_admin_info']), |
... | ... |
@@ -412,7 +413,7 @@ function shd_admin_bootstrap(&$admin_areas) |
412 | 413 |
'helpdesk_options' => array( |
413 | 414 |
'label' => $txt['shd_admin_options'], |
414 | 415 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
415 |
- 'icon' => 'shd/options.png', |
|
416 |
+ 'icon' => 'shd_options', |
|
416 | 417 |
'function' => 'shd_admin_main', |
417 | 418 |
'subsections' => array( |
418 | 419 |
'display' => array($txt['shd_admin_options_display']), |
... | ... |
@@ -426,7 +427,7 @@ function shd_admin_bootstrap(&$admin_areas) |
426 | 427 |
'helpdesk_cannedreplies' => array( |
427 | 428 |
'label' => $txt['shd_admin_cannedreplies'], |
428 | 429 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
429 |
- 'icon' => 'shd/cannedreplies.png', |
|
430 |
+ 'icon' => 'shd_cannedreplies', |
|
430 | 431 |
'function' => 'shd_admin_main', |
431 | 432 |
'subsections' => array( |
432 | 433 |
), |
... | ... |
@@ -434,7 +435,7 @@ function shd_admin_bootstrap(&$admin_areas) |
434 | 435 |
'helpdesk_customfield' => array( |
435 | 436 |
'label' => $txt['shd_admin_custom_fields'], |
436 | 437 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
437 |
- 'icon' => 'shd/custom_fields.png', |
|
438 |
+ 'icon' => 'shd_custom_fields', |
|
438 | 439 |
'function' => 'shd_admin_main', |
439 | 440 |
'subsections' => array( |
440 | 441 |
), |
... | ... |
@@ -442,7 +443,7 @@ function shd_admin_bootstrap(&$admin_areas) |
442 | 443 |
'helpdesk_depts' => array( |
443 | 444 |
'label' => $txt['shd_admin_departments'], |
444 | 445 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
445 |
- 'icon' => 'shd/departments.png', |
|
446 |
+ 'icon' => 'shd_departments', |
|
446 | 447 |
'function' => 'shd_admin_main', |
447 | 448 |
'subsections' => array( |
448 | 449 |
), |
... | ... |
@@ -450,7 +451,7 @@ function shd_admin_bootstrap(&$admin_areas) |
450 | 451 |
'helpdesk_permissions' => array( |
451 | 452 |
'label' => $txt['shd_admin_permissions'], |
452 | 453 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
453 |
- 'icon' => 'shd/permissions.png', |
|
454 |
+ 'icon' => 'shd_permissions', |
|
454 | 455 |
'function' => 'shd_admin_main', |
455 | 456 |
'subsections' => array( |
456 | 457 |
), |
... | ... |
@@ -458,7 +459,7 @@ function shd_admin_bootstrap(&$admin_areas) |
458 | 459 |
'helpdesk_plugins' => array( |
459 | 460 |
'label' => $txt['shd_admin_plugins'], |
460 | 461 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
461 |
- 'icon' => 'shd/plugins.png', |
|
462 |
+ 'icon' => 'shd_plugins', |
|
462 | 463 |
'function' => 'shd_admin_main', |
463 | 464 |
'subsections' => array( |
464 | 465 |
), |
... | ... |
@@ -466,7 +467,7 @@ function shd_admin_bootstrap(&$admin_areas) |
466 | 467 |
'helpdesk_maint' => array( |
467 | 468 |
'label' => $txt['shd_admin_maint'], |
468 | 469 |
'file' => 'sd_source/SimpleDesk-Admin.php', |
469 |
- 'icon' => 'shd/maintenance.png', |
|
470 |
+ 'icon' => 'shd_maintenance', |
|
470 | 471 |
'function' => 'shd_admin_main', |
471 | 472 |
'subsections' => array( |
472 | 473 |
'main' => array($txt['shd_admin_maint']), |
... | ... |
@@ -479,7 +480,6 @@ function shd_admin_bootstrap(&$admin_areas) |
479 | 480 |
// Now engage any hooks. |
480 | 481 |
call_integration_hook('shd_hook_adminmenu', array(&$admin_areas)); |
481 | 482 |
} |
482 |
-} |
|
483 | 483 |
|
484 | 484 |
/** |
485 | 485 |
* Add the SimpleDesk option into the Core Features page inside the admin panel. |
486 | 486 |