Skip to content

Commit

Permalink
Merge pull request #487 from eurich/templates
Browse files Browse the repository at this point in the history
Templates & Javascript
  • Loading branch information
norv committed Jun 1, 2013
2 parents 1686ef2 + 4e9ebad commit 935ea25
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion themes/default/BoardIndex.template.php
Expand Up @@ -16,7 +16,7 @@

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
global $context, $settings, $txt, $scripturl;

echo '
<div id="boardindex_table" class="boardindex_table">
Expand Down
1 change: 0 additions & 1 deletion themes/default/Calendar.template.php
Expand Up @@ -202,7 +202,6 @@ function template_show_month_grid($grid_name)
return false;

$calendar_data = &$context['calendar_grid_' . $grid_name];
$colspan = !empty($calendar_data['show_week_links']) ? 8 : 7;

if (empty($calendar_data['disable_title']))
{
Expand Down
4 changes: 2 additions & 2 deletions themes/default/Display.template.php
Expand Up @@ -27,8 +27,8 @@ function template_report_sent_above()

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Yeah, I know, though at the moment is the only way...
global $context, $settings, $options, $txt, $scripturl;
// Yeah, I know, though at the moment is the only way...
global $removableMessageIDs, $ignoredMsgs;

// Show the topic information - icon, subject, etc.
Expand Down
2 changes: 1 addition & 1 deletion themes/default/GenericControls.template.php
Expand Up @@ -225,7 +225,7 @@ function spellCheckStart(fieldName)
// What's this, verification?!
function template_control_verification($verify_id)
{
global $context, $settings, $options, $txt, $modSettings;
global $context;

$verify_context = &$context['controls']['verification'][$verify_id];

Expand Down
2 changes: 1 addition & 1 deletion themes/default/ManageMaintenance.template.php
Expand Up @@ -19,7 +19,7 @@
*/
function template_maintain_database()
{
global $context, $settings, $txt, $scripturl, $db_type;
global $context, $settings, $txt, $scripturl;

// If maintenance has finished tell the user.
if (!empty($context['maintenance_finished']))
Expand Down
4 changes: 2 additions & 2 deletions themes/default/ManagePaid.template.php
Expand Up @@ -139,7 +139,7 @@ function template_modify_subscription()
<div id="flexible_area" ', !empty($context['sub']['duration']) && $context['sub']['duration'] == 'flexible' ? '' : 'style="display: none;"', '>
<fieldset>';

//!! Removed until implemented
/** Removed until implemented
if (!empty($sdflsdhglsdjgs))
echo '
<dl class="settings">
Expand All @@ -150,7 +150,7 @@ function template_modify_subscription()
<input type="checkbox" name="allow_partial" id="allow_partial_check"', empty($context['sub']['allow_partial']) ? '' : ' checked="checked"', ' class="input_check" />
</dd>
</dl>';

*/
echo '
<div class="information">
<strong>', $txt['paid_mod_price_breakdown'], '</strong><br />
Expand Down
2 changes: 1 addition & 1 deletion themes/default/MessageIndex.template.php
Expand Up @@ -19,7 +19,7 @@
*/
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
global $context, $settings, $options, $scripturl, $txt;

if (!$context['no_topic_listing'])
{
Expand Down
6 changes: 3 additions & 3 deletions themes/default/Post.template.php
Expand Up @@ -19,7 +19,7 @@
*/
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings, $counter;
global $context, $settings, $options, $txt, $modSettings;

// Show the actual posting area...
echo '
Expand Down Expand Up @@ -152,7 +152,7 @@ function template_main()

function template_load_drafts_below()
{
global $context, $settings, $txt, $modSettings, $options;
global $context, $settings, $txt, $options;

// If the admin enabled the drafts feature, show a draft selection box
if (!empty($options['drafts_show_saved_enabled']))
Expand Down Expand Up @@ -304,7 +304,7 @@ function template_topic_replies_below()

function template_postarea_above()
{
global $context, $scripturl, $txt;
global $context, $scripturl, $txt, $modSettings;

// Start the javascript...
echo '
Expand Down
2 changes: 1 addition & 1 deletion themes/default/Reports.template.php
Expand Up @@ -220,7 +220,7 @@ function template_print()
// Shaded?
if ($column_number == 0 && !empty($table['shading']['left']))
echo '
<td class="titlebg" style="text-align:', $table['align']['shaded'], $tabe['width']['shaded'] != 'auto' ? ';width:' . $table['width']['shaded'] . '"' : '"', '>
<td class="titlebg" style="text-align:', $table['align']['shaded'], $table['width']['shaded'] != 'auto' ? ';width:' . $table['width']['shaded'] . '"' : '"', '>
', $data['v'] == $table['default_value'] ? '' : ($data['v'] . (empty($data['v']) ? '' : ':')), '
</td>';
else
Expand Down
6 changes: 3 additions & 3 deletions themes/default/scripts/PersonalMessage.js
Expand Up @@ -266,7 +266,7 @@ function addCriteriaOption()
if (document.forms.addrule.elements[i].id.substr(0, 8) == "ruletype")
criteriaNum++;
}
criteriaNum++
criteriaNum++;

// group selections
var group_option = '';
Expand All @@ -284,12 +284,12 @@ function addActionOption()
if (document.forms.addrule.elements[i].id.substr(0, 7) == "acttype")
actionNum++;
}
actionNum++
actionNum++;

// Label selections
var label_option = '';
for (var index in labels)
label_option += '<option value="' + index + '">' + labels[index] + '</option>';

setOuterHTML(document.getElementById("actionAddHere"), '<br /><select name="acttype[' + actionNum + ']" id="acttype' + actionNum + '" onchange="updateActionDef(' + actionNum + ');rebuildRuleDesc();"><option value="">' + txt_pm_rule_sel_action + ':</option><option value="lab">'+ txt_pm_rule_label + '</option><option value="del">' + txt_pm_rule_delete + '</option></select>&nbsp;<span id="labdiv' + actionNum + '" style="display: none;"><select name="labdef[' + actionNum + ']" id="labdef' + actionNum + '" onchange="rebuildRuleDesc();"><option value="">' + txt_pm_rule_sel_label + '</option>' + label_option + '</select></span><span id="actionAddHere"></span>');
}
}
2 changes: 1 addition & 1 deletion themes/default/scripts/admin.js
Expand Up @@ -683,7 +683,7 @@ function testFTP()
2: "ftp_username",
3: "ftp_password",
4: "ftp_path"
}
};

var sPostData = "";
for (i = 0; i < 5; i++)
Expand Down
6 changes: 3 additions & 3 deletions themes/default/scripts/post.js
Expand Up @@ -328,9 +328,9 @@ function addPollOption()
pollTabIndex = document.forms[form_name].elements[i].tabIndex;
}
}
pollOptionNum++
pollOptionId++
pollTabIndex++
pollOptionNum++;
pollOptionId++;
pollTabIndex++;
setOuterHTML(document.getElementById('pollMoreOptions'), '<li><label for="options-' + pollOptionId + '">' + txt_option + ' ' + pollOptionNum + '</label>: <input type="text" name="options[' + pollOptionId + ']" id="options-' + pollOptionId + '" value="" size="80" maxlength="255" tabindex="' + pollTabIndex + '" class="input_text" /></li><li id="pollMoreOptions"></li>');
}

Expand Down
6 changes: 3 additions & 3 deletions themes/default/scripts/script.js
Expand Up @@ -132,7 +132,7 @@ String.prototype.php_to8bit = function ()
{
n = this.charCodeAt(i);
if (n < 128)
sReturn += String.fromCharCode(n)
sReturn += String.fromCharCode(n);
else if (n < 2048)
sReturn += String.fromCharCode(192 | n >> 6) + String.fromCharCode(128 | n & 63);
else if (n < 65536)
Expand Down Expand Up @@ -242,7 +242,7 @@ String.prototype.php_to8bit = function ()
sReturn += iOffsetFrom > -1 ? this.oCharsetConversion.to.charAt(iOffsetFrom) : (this.charCodeAt(i) > 127 ? '&#' + this.charCodeAt(i) + ';' : this.charAt(i));
}

return sReturn
return sReturn;
}

// Character-level replacement function.
Expand Down Expand Up @@ -816,7 +816,7 @@ smc_Toggle.prototype.init = function ()
this.oCookie = new smc_Cookie({});

// Check if the cookie is set.
var cookieValue = this.oCookie.get(this.opt.oCookieOptions.sCookieName)
var cookieValue = this.oCookie.get(this.opt.oCookieOptions.sCookieName);
if (cookieValue != null)
this.opt.bCurrentlyCollapsed = cookieValue == '1';
}
Expand Down
3 changes: 1 addition & 2 deletions themes/default/scripts/sha1.js
Expand Up @@ -213,5 +213,4 @@ function binb2b64(binarray)
}
}
return str;
}

}

0 comments on commit 935ea25

Please sign in to comment.