archive: use camelCase in js function names

This commit is contained in:
Daniel Marjamäki 2013-07-30 18:06:03 +02:00
parent e1acef1217
commit e559b6da65
2 changed files with 9 additions and 9 deletions

View File

@ -15,24 +15,24 @@ uninitialized variables, unused functions" />
<link rel="alternate" type="application/rss+xml" title="Project News" <link rel="alternate" type="application/rss+xml" title="Project News"
href="http://sourceforge.net/p/cppcheck/news/feed" /> href="http://sourceforge.net/p/cppcheck/news/feed" />
<script type="text/javascript"> <script type="text/javascript">
function addfile() { function addFile() {
var name = prompt("Name of library/platform/etc", ""); var name = prompt("Name of library/platform/etc", "");
if (name != null) if (name != null)
window.location = "http://cppcheck.sourceforge.net/cgi-bin/addfile.cgi?name=" + name; window.location = "http://cppcheck.sourceforge.net/cgi-bin/addfile.cgi?name=" + name;
} }
function editfile(name,version) { function editFile(name,version) {
window.location = "http://cppcheck.sourceforge.net/cgi-bin/edit.cgi?name=" + name + "&amp;version=" + version; window.location = "http://cppcheck.sourceforge.net/cgi-bin/edit.cgi?name=" + name + "&amp;version=" + version;
} }
function renamefile(name1,version) { function renameFile(name1,version) {
var name2 = prompt("Name", name1); var name2 = prompt("Name", name1);
if (name2 != null) if (name2 != null)
window.location = "http://cppcheck.sourceforge.net/cgi-bin/renamefile.cgi?name1=" + name1 + "&amp;name2=" + name2; window.location = "http://cppcheck.sourceforge.net/cgi-bin/renamefile.cgi?name1=" + name1 + "&amp;name2=" + name2;
} }
function deletefile(name,version) { function deleteFile(name,version) {
window.location = "http://cppcheck.sourceforge.net/cgi-bin/deletefile.cgi?name=" + name + "&amp;version=" + version; window.location = "http://cppcheck.sourceforge.net/cgi-bin/deletefile.cgi?name=" + name + "&version=" + version;
} }
</script> </script>
</head> </head>

View File

@ -10,7 +10,7 @@
void listAll(char **data) void listAll(char **data)
{ {
puts("Content-type: text/html\r\n\r\n"); puts("Content-type: text/html\r\n\r\n");
puts("<input type=\"button\" onclick=\"addfile()\" value=\"Add file\"/>"); puts("<input type=\"button\" onclick=\"addFile()\" value=\"Add file\"/>");
puts("<table border=\"1\"><tr><td><table>"); puts("<table border=\"1\"><tr><td><table>");
for (int i = 0; i < MAX_RECORDS && data[i]; i++) { for (int i = 0; i < MAX_RECORDS && data[i]; i++) {
const char *name = getname(data[i]); const char *name = getname(data[i]);
@ -20,9 +20,9 @@ void listAll(char **data)
if (i > 0) if (i > 0)
printf("<tr height=\"1\"><td colspan=\"2\" bgcolor=\"gray\"></td></tr>"); printf("<tr height=\"1\"><td colspan=\"2\" bgcolor=\"gray\"></td></tr>");
printf("<tr><td width=\"200\">%s</td>", name); printf("<tr><td width=\"200\">%s</td>", name);
printf("<td><input type=\"button\" onclick=\"editfile(\'%s\','%i')\" value=\"Edit\"/>", name, version); printf("<td><input type=\"button\" onclick=\"editFile(\'%s\','%i')\" value=\"Edit\"/>", name, version);
printf("<input type=\"button\" onclick=\"renamefile(\'%s\','%i')\" value=\"Rename\"/>", name, version); printf("<input type=\"button\" onclick=\"renameFile(\'%s\','%i')\" value=\"Rename\"/>", name, version);
printf("<input type=\"button\" onclick=\"deletefile(\'%s\','%i')\" value=\"Delete\"/>&nbsp;</td>", name, version); printf("<input type=\"button\" onclick=\"deleteFile(\'%s\','%i')\" value=\"Delete\"/>&nbsp;</td>", name, version);
printf("</tr>\n"); printf("</tr>\n");
} }
puts("</table></td></tr></table>"); puts("</table></td></tr></table>");