head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2007.01.16.04.12.02; author TWikiContributor; state Exp; branches; next 1.3; 1.3 date 2006.06.25.16.26.30; author TWikiContributor; state Exp; branches; next 1.2; 1.2 date 2006.04.01.05.55.26; author TWikiContributor; state Exp; branches; next 1.1; 1.1 date 2006.02.01.12.01.21; author TWikiContributor; state Exp; branches; next ; desc @new-topic @ 1.4 log @buildrelease @ text @%META:TOPICINFO{author="TWikiContributor" date="1131431859" format="1.1" version="4"}% %META:TOPICPARENT{name="WebHome"}% ---+ %MAKETEXT{"Create New Topic in [_1] Web" args="%BASEWEB%"}% %STARTSECTION{"newtopicform"}% %STARTSECTION{"formstart"}% %STARTSECTION{"javascriptfunctions"}% %ENDSECTION{"javascriptfunctions"}%
%ENDSECTION{"formstart"}%
---------------------------------------------+++ %MAKETEXT{"Topic name:"}%

%STARTSECTION{"topicname"}% %ENDSECTION{"topicname"}%

%STARTSECTION{"allownonwikiword"}%
%MAKETEXT{"It's usually best to choose a WikiWord for the new topic name, otherwise automatic linking may not work. Characters not allowed in topic names, such as spaces will automatically be removed." args="%TWIKIWEB%,%SCRIPTURLPATH{"view"}%/%TWIKIWEB%/WikiWord"}% %ENDSECTION{"allownonwikiword"}%

---------------------------------------------+++ %MAKETEXT{"Topic parent:"}%

%STARTSECTION{"topicparent"}%%ENDSECTION{"topicparent"}%

---------------------------------------------+++ %MAKETEXT{"Use template:"}%

%STARTSECTION{"topictemplate"}% %MAKETEXT{"View templates"}% %ENDSECTION{"topictemplate"}%

%STARTSECTION{"submit"}%%ENDSECTION{"submit"}%

%STARTSECTION{"formend"}%
%ENDSECTION{"formend"}% %ENDSECTION{"newtopicform"}% %BR%
%ICON{info}% %MAKETEXT{"Once you have created the topic, consider adding links in related topics to the new topic so that there are more ways people can discover it."}%
@ 1.3 log @buildrelease @ text @d1 1 a1 1 %META:TOPICINFO{author="TWikiContributor" date="1131431859" format="1.1" version="3"}% d4 1 d6 1 d9 1 a9 1 // d106 2 a107 1
%ENDSECTION{"formstart"}% d110 2 a111 2 ---+++ %MAKETEXT{"Topic name:"}%

%STARTSECTION{"topicname"}% %ENDSECTION{"topicname"}%

d113 8 a120 1 %MAKETEXT{"It's usually best to choose a WikiWord for the new topic name, otherwise automatic linking may not work. Characters not allowed in topic names, such as spaces will automatically be removed." args="%TWIKIWEB%,%SCRIPTURLPATH{"view"}%/%TWIKIWEB%/WikiWord"}%%ENDSECTION{"allownonwikiword"}%

d123 1 a123 1 ---+++ %MAKETEXT{"Topic parent:"}% d129 5 d138 1 a138 2 %STARTSECTION{"formend"}% a141 3 // Read url param 'allowsnonwikiword' to set the initial checkbox value var allowsNonWikiWord = "%URLPARAM{"allowsnonwikiword" default=off}%"; setCheckBoxState(document.forms.newtopic.nonwikiword, allowsNonWikiWord.toBoolean() ? true : false); d148 1 @ 1.2 log @buildrelease @ text @d1 1 a1 1 %META:TOPICINFO{author="TWikiContributor" date="1131431859" format="1.1" version="2"}% d3 3 d8 64 a71 24 function capitalize(inForm, inValue) { // only capitalize if user wants a WikiWord if (inForm.nonwikiword.checked == true) { return removeSpaces(inValue); } var sIn = inValue; var sOut = ''; var chgUpper = true; for ( var i = 0; i < sIn.length; i++ ) { var ch = sIn.charAt( i ); if( ch!=' ' ) { if( chgUpper ) { ch = ch.toUpperCase(); chgUpper = false; } } if( ch==' ' ) { chgUpper = true; } else { chgUpper = false; } sOut += ch; } return removeSpaces(sOut); d73 3 a75 12 function removeSpaces(inValue) { var sIn = inValue; var sOut = ''; for ( var i = 0; i < sIn.length; i++ ) { var ch = sIn.charAt( i ); if( ch==' ' ) { chgUpper = true; continue; } sOut += ch; } return sOut; d77 3 a79 5 function canSubmit(inForm) { inForm.topic.value = capitalize(inForm, inForm.topic.value); // Use the negative value of the checkbox. This is the ugly way but must be used until edit script parameter =allowsnonwikiword= is implemented. inForm.onlywikiname.value = (inForm.nonwikiword.checked == true) ? "off" : "on"; return true; d83 1 a83 2 ---+ %MAKETEXT{"Create New Topic in [_1] Web" args="%BASEWEB%"}% d87 3 a89 6

%MAKETEXT{"It's usually best to choose a WikiWord for the new topic name, otherwise automatic linking may not work. Characters not allowed in topic names, such as spaces will automatically be removed." args="%TWIKIWEB%,%SCRIPTURLPATH{"view"}%/%TWIKIWEB%/WikiWord"}%

d93 1 a93 1 d99 1 a99 1 d102 1 a102 1 d105 11 @ 1.1 log @buildrelease @ text @d1 1 a1 1 %META:TOPICINFO{author="TWikiContributor" date="1131431859" format="1.1" version="1"}% d3 49 a51 1 d53 4 a56 4
%MAKETEXT{"Topic name:"}% d59 6 a64 4  
%MAKETEXT{"Topic parent:"}% d66 1 a66 2 %SEARCH{ "\.*" regex="on" scope="topic" nosearch="on" nototal="on" format="" }% d69 6 a74 3
d77 4 a80 4 %MAKETEXT{"To create a new topic, enter a [_1].WikiWord for the topic name, select a topic parent and click 'Create.'" args="%TWIKIWEB%"}% %MAKETEXT{"Once you have created the topic, consider adding links in related topics to the new topic so that there are more ways people can discover it."}% @