Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Pluginsystem and Front Page Plugin #36

Merged
merged 4 commits into from Dec 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 6 additions & 19 deletions css/helpdesk.css
Expand Up @@ -2,19 +2,6 @@
* General stuff used all around the helpdesk *
***********************************/

/* Half rounded headers */
div.grid_header
{
height: 28px;
margin-bottom: -1px;
}

/* You no left float, Core! */
div.grid_header img
{
float: none;
}

/* SimpleDesk icons */
.shd_smallicon
{
Expand Down Expand Up @@ -521,22 +508,22 @@ h3.ticketheader img
}
#shd_bbcbox div
{
margin: 0.2em 0;
vertical-align: top;
margin: 0.2em 0;
vertical-align: top;
}
#shd_bbcbox div img
{
margin: 0 1px 0 0;
vertical-align: top;
margin: 0 1px 0 0;
vertical-align: top;
}
#shd_bbcbox select
{
margin: 0 2px;
margin: 0 2px;
}
/* The smiley strip */
#shd_smileybox
{
margin: 0.75em 0 0.5em 0;
margin: 0.75em 0 0.5em 0;
}
#canned_replies
{
Expand Down
24 changes: 16 additions & 8 deletions css/helpdesk_admin.css
Expand Up @@ -288,11 +288,19 @@ h3 a.permcollapse img
.sd_description
{
background: #F8F8F8;
overflow: auto;
padding-bottom: .5em;
border: 1px solid #ddd;
border-top: none;
margin: 0 0 10px 0;
padding: 12px 9px 8px 9px;
box-sizing: border-box;
}
overflow: auto;
padding-bottom: .5em;
border: 1px solid #ddd;
border-top: none;
margin: 0 0 10px 0;
padding: 12px 9px 8px 9px;
box-sizing: border-box;
}

/* Plugin switch inmage */

.features_switch
{
float: right;
margin: 0.2em 1em 1em;
}
2 changes: 2 additions & 0 deletions sd_language/SimpleDeskAdmin.english.php
Expand Up @@ -513,6 +513,8 @@
$txt['shd_admin_plugins_versions_avail'] = 'Supported by the plugin';
$txt['shd_admin_plugins_on'] = 'On';
$txt['shd_admin_plugins_off'] = 'Off';
$txt['shd_admin_plugins_enabled'] = 'Enabled';
$txt['shd_admin_plugins_disabled'] = 'Disabled';
$txt['shd_admin_plugins_languages'] = 'Available languages';
$txt['shd_admin_plugins_lang_albanian'] = 'Albanian';
$txt['shd_admin_plugins_lang_arabic'] = 'Arabic';
Expand Down
4 changes: 2 additions & 2 deletions sd_plugins_source/front_page/index.php
Expand Up @@ -53,9 +53,9 @@ function shdplugin_front_page()
'description' => 'shdp_frontpage_desc',
'author' => 'SimpleDesk Team',
'website' => 'http://www.simpledesk.net/',
'version' => '1.0',
'version' => '1.0.1',
'compatibility' => array(
'SimpleDesk 2.0 Anatidae', // should tie up with the SHD_VERSION constants
'SimpleDesk 2.1 Beta 1', // should tie up with the SHD_VERSION constants
),
'acp_url' => 'action=admin;area=helpdesk_options;sa=frontpage',
),
Expand Down
22 changes: 18 additions & 4 deletions sd_plugins_template/SDPluginFrontPage.template.php
Expand Up @@ -48,7 +48,7 @@ function template_shd_frontpage_admin()
<div id="admincenter">
<form name="adminform" action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>
<div class="tborder">
<div class="cat_bar grid_header">
<div class="cat_bar">
<h3 class="catbg">
<img src="', shd_image_url('frontpage.png'), '" class="icon" alt="*"/> ', $txt['shdp_frontpage'], '
</h3>
Expand Down Expand Up @@ -97,15 +97,30 @@ function template_shd_frontpage_admin()
</dl>
<hr class="hrcolor" />
<div class="righttext">
<input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : $txt['save'], '" tabindex="', $context['tabindex']++, '" accesskey="s" class="button_submit" />
<input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled="disabled"' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button_submit" />
</div>

</div>
<span class="botslice"><span></span></span>
</div>
</div>
</div>';
if (isset($context['admin-dbsc_token']))
echo '
<input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '" />';
echo '
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>
</div>
<br class="clear" />';
if (!empty($context['settings_post_javascript']))
echo '
<script type="text/javascript"><!-- // --><![CDATA[
', $context['settings_post_javascript'], '
// ]]></script>';
if (!empty($context['settings_insert_below']))
echo $context['settings_insert_below'];

echo '
<script type="text/javascript"><!-- // --><![CDATA[
function invertBBC()
{
Expand All @@ -115,4 +130,3 @@ function invertBBC()
}
// ]]></script>';
}

10 changes: 5 additions & 5 deletions sd_template/SimpleDesk-AdminPlugins.template.php
Expand Up @@ -26,9 +26,9 @@ function toggleItem(itemID)
itemValueHandle.value = itemValueHandle.value == 1 ? 0 : 1;

// Change the image, alternative text and the title.
document.getElementById("switch_" + itemID).src = \'', $settings['images_url'], '/admin/switch_\' + (itemValueHandle.value == 1 ? \'on\' : \'off\') + \'.png\';
document.getElementById("switch_" + itemID).alt = itemValueHandle.value == 1 ? \'', $txt['core_settings_switch_off'], '\' : \'', $txt['core_settings_switch_on'], '\';
document.getElementById("switch_" + itemID).title = itemValueHandle.value == 1 ? \'', $txt['core_settings_switch_off'], '\' : \'', $txt['core_settings_switch_on'], '\';
document.getElementById("switch_" + itemID).src = \'', $settings['images_url'], '/simpledesk/switch_\' + (itemValueHandle.value == 1 ? \'on\' : \'off\') + \'.png\';
document.getElementById("switch_" + itemID).alt = itemValueHandle.value == 1 ? \'', $txt['shd_admin_plugins_off'], '\' : \'', $txt['shd_admin_plugins_on'], '\';
document.getElementById("switch_" + itemID).title = itemValueHandle.value == 1 ? \'', $txt['shd_admin_plugins_off'], '\' : \'', $txt['shd_admin_plugins_on'], '\';

// Don\'t reload.
return false;
Expand Down Expand Up @@ -104,8 +104,8 @@ function toggleItem(itemID)
if (!empty($plugin['installable']))
echo '
<div id="plain_feature_', $id, '">
<label for="plain_feature_', $id, '_radio_on"><input type="radio" name="feature_plain_', $id, '" id="plain_feature_', $id, '_radio_on" value="1"', $plugin['enabled'] ? ' checked="checked"' : '', ' class="input_radio" />', $txt['core_settings_enabled'], '</label>
<label for="plain_feature_', $id, '_radio_off"><input type="radio" name="feature_plain_', $id, '" id="plain_feature_', $id, '_radio_off" value="0"', !$plugin['enabled'] ? ' checked="checked"' : '', ' class="input_radio" />', $txt['core_settings_disabled'], '</label>
<label for="plain_feature_', $id, '_radio_on"><input type="radio" name="feature_plain_', $id, '" id="plain_feature_', $id, '_radio_on" value="1"', $plugin['enabled'] ? ' checked="checked"' : '', ' class="input_radio" />', $txt['shd_admin_plugins_enabled'], '</label>
<label for="plain_feature_', $id, '_radio_off"><input type="radio" name="feature_plain_', $id, '" id="plain_feature_', $id, '_radio_off" value="0"', !$plugin['enabled'] ? ' checked="checked"' : '', ' class="input_radio" />', $txt['shd_admin_plugins_disabled'], '</label>
</div>';

echo '
Expand Down