/**
Checks if the entered topic name is a valid WikiWord.
Alterado:
< <
If so, enables the submit button, if not: enables the submit button
> >
If so, enables the submit button, if not: enables the submit button if the user allows non-WikiWords as topic name; otherwise disables the submit button and returns 'false'.
Deleted:
< <
if the user allows non-WikiWords as topic name; otherwise disables the
submit button and returns 'false'.
Automatically removes spaces from entered name.
Automatically strips illegal characters.
If non-WikiWords are not allowed, capitalizes words (separated by space).
Added:
> >
If non-WikiWords are allowed, capitalizes sentence.
The generated topic name is written to a 'feedback' field.
@param inForm : pointer to the form
@param inShouldConvertInput : true: a new name is created from the entered name
@return True: submit is enabled and topic creation is allowed; false: submit is disabled and topic creation should be inhibited.
*/
function canSubmit(inForm, inShouldConvertInput) {
var inputForTopicName = inForm.topic.value;
Added:
> >
if (inputForTopicName) return;
Alterado:
< <
// Topic names of zero length are not allowed
> >
/* Topic names of zero length are not allowed */
if (inputForTopicName.length == 0) {
disableSubmit(inForm.submit);
// Update hidden field 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 = userAllowsNonWikiWord ? "off" : "on";
> >
/*
Update hidden field value
Use the negative value of the checkbox. This is the ugly way but must be used until edit script parameter allowsnonwikiword is implemented.
*/
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.
> >
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.
<-- TODO: move JS to a separate file and make it callable on click of the button too -->
<-- TODO: blank out all the irrelevant links: Edit, Compose, Attach, Printable, ... Raw text, versions, History, More topic actions: could this be a CSS? -->
> >
<--generated name will be put here-->
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.
Deleted:
< <
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.
<--/twikiFormStep-->
Tópico pai:
Alterado:
< <
> >
Alterado:
< <
> >
<--/twikiFormStep-->
Alterado:
< <
> >
<--/twikiFormStep-->
<--/twikiFormSteps-->
Alterado:
< <
> >
Added:
> >
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.
//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);
}
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;
}
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;
}
//]]>
Criar Novo Tópico na Web TWiki
Alterado:
< <
Nome do tópico:
> >
Nome do tópico:
<-- TODO: move JS to a separate file and make it callable on click of the button too -->
<-- TODO: blank out all the irrelevant links: Edit, Compose, Attach, Printable, ... Raw text, versions, History, More topic actions: could this be a CSS? -->
Alterado:
< <
Tópico pai:
> >
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.
<--/twikiFormStep-->
Added:
> >
Tópico pai:
Alterado:
< <
> >
Deleted:
< <
Alterado:
< <
> >
<--/twikiFormStep-->
Added:
> >
<--/twikiFormStep-->
<--/twikiFormSteps-->
Alterado:
< <
To create a new topic, enter a WikiWord for the topic name, select a topic parent and click 'Create.'
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.
> >
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.
To create a new topic, enter a WikiWord for the topic name, select a topic parent and click 'Create.'
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.