~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/spell_check.tpl.html

  • Committer: Elan Ruusamäe
  • Date: 2015-04-03 17:16:08 UTC
  • Revision ID: glen@delfi.ee-20150403171608-u41tcmt49uayv0g4
discard {literal} from templates

it is rarely needed in Smarty3

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
//-->
51
51
</script>
52
52
{else}
53
 
{literal}
 
53
 
54
54
<script type="text/javascript">
55
55
<!--
56
56
function fixSpelling()
57
57
{
58
 
{/literal}
 
58
 
59
59
    var f = document.forms[0];
60
60
    var old_value = f.misspelled_words.options[f.misspelled_words.selectedIndex].text;
61
61
    var new_value = f.suggestion.options[f.suggestion.selectedIndex].text;
62
 
    {literal}
 
62
 
63
63
    if (new_value == '') {
64
64
        return;
65
65
    }
66
 
    {/literal}
 
66
 
67
67
    var textarea = window.opener.document.{$smarty.post.form_name}.{$smarty.post.field_name};
68
68
    textarea.value = replaceWords(textarea.value, old_value, new_value);
69
 
{literal}
 
69
 
70
70
}
71
71
function buildSuggestionBox()
72
72
{
73
 
{/literal}
 
73
 
74
74
    var suggestions = [];
75
75
    {foreach key=word item=suggestions from=$spell_check.suggestions}
76
76
    suggestions.push(new Option("{$word}", "{section name=i loop=$suggestions}{$suggestions[i]}{if not $smarty.section.i.last},{/if}{/section}"));
77
77
    {/foreach}
78
 
{literal}
 
78
 
79
79
    var f = document.forms[0];
80
80
    var word = f.misspelled_words.options[f.misspelled_words.selectedIndex].text;
81
81
    var _suggestions = '';
93
93
}
94
94
//-->
95
95
</script>
96
 
{/literal}
 
96
 
97
97
<form>
98
98
<table align="center" width="100%" cellpadding="3">
99
99
  <tr>