Changeset 132
- Timestamp:
- 10/05/05 08:53:40 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
DuplicatedTBPingLookup/trunk/DuplicatedTBPingLookup.pl
r131 r132 17 17 $VERSION = '1.02'; 18 18 19 use MT; 19 20 use MT::JunkFilter qw(ABSTAIN); 20 21 … … 62 63 63 64 sub template { 64 return <<'EOT'; 65 my $tmpl = <<'EOT'; 66 <script type="text/javascript"> 67 <!-- 68 function dtlScoreNudge(amount, id) { 69 var fld = getByID(id); 70 score = fld.value; 71 score.replace(/\+/, ''); 72 score = parseFloat(score) + amount; 73 if (isNaN(score)) score = amount; 74 if (score > 10) score = 10; 75 if (score < 0) score = 0; 76 fld.value = score; 77 return false; 78 } 79 //--> 80 </script> 81 65 82 <p>This plugin allows you to look up duplicated trackback ping from the same source and mark it as a 'junk'.</p> 66 83 </p> … … 68 85 <div class="label"><label>Score Weight:</label></div> 69 86 <div class="field"> 70 <p><input type="text" size="2" name="dtl_score_weight" value="<TMPL_VAR NAME=DTL_SCORE_WEIGHT>" /> (1-5)</p> 87 <a href="#" class="spinner" onclick="return dtlScoreNudge(-1, 'dtl_score_weight')"><img src="<TMPL_VAR NAME=STATIC_URI>images/decrease.gif" alt="<MT_TRANS phrase="Decrease">" width="12" height="8" /></a> 88 <input type="text" size="3" name="dtl_score_weight" id="dtl_score_weight" value="<TMPL_VAR NAME=DTL_SCORE_WEIGHT ESCAPE=HTML>" /> 89 <a href="#" class="spinner" onclick="return dtlScoreNudge(1, 'dtl_score_weight')"><img src="<TMPL_VAR NAME=STATIC_URI>images/increase.gif" alt="<MT_TRANS phrase="Increase">" width="12" height="8" /></a> 71 90 </div> 72 91 </div> 73 92 EOT 93 my $static_uri = MT->instance->static_path; 94 $tmpl =~ s!<TMPL_VAR NAME=STATIC_URI>!$static_uri!g; 95 $tmpl; 74 96 } 75 97
