Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
/***
|''Name:''|PortugueseLingo|
|''Description:''|An european portuguese translation for TW|
|''Version:''|2.0.0|
|''Date:''|Sep 18, 2006|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Author:''|Paulo Soares (psoares (at) math (dot) ist (dot) utl (dot) pt)|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
***/
{{{
// ---------------------------------------------------------------------------------
// Translateable strings
// ---------------------------------------------------------------------------------
// Strings in "double quotes" should be translated; strings in 'single quotes' should be left alone
if (config.options.txtUserName=="YourName")
merge(config.options,{txtUserName: "OSeuNome"});
merge(config.messages,{
customConfigError: "Foram encontrados problemas ao carregar plugins. Veja o PluginManager para mais detalhes",
pluginError: "Erro: %0",
pluginDisabled: "Não executado porque foi desactivado pela etiqueta 'systemConfigDisable'",
pluginForced: "Executado porque foi forçado pela etiqueta 'systemConfigForce'",
pluginVersionError: "Não executado porque este plugin requer uma versão mais recente do TiddlyWiki",
nothingSelected: "Nada selecionado. Deve selecionar um ou mais items primeiro",
savedSnapshotError: "Parece que este TiddlyWiki foi guardado incorrectamente. Por favor veja http://www.tiddlywiki.com/#DownloadSoftware para mais detalhes",
subtitleUnknown: "(desconhecido)",
undefinedTiddlerToolTip: "O tiddler '%0' ainda não existe",
shadowedTiddlerToolTip: "O tiddler '%0' ainda não existe, mas tem um modelo pré-definido",
tiddlerLinkTooltip: "%0 - %1, %2",
externalLinkTooltip: "Ligação externa a %0",
noTags: "Não há tiddlers com etiquetas",
notFileUrlError: "É necessário guardar este TiddlyWiki num ficheiro antes de poder guardar alterações",
cantSaveError: "Não é possível guardar alterações. Isto pode acontecer porque o seu browser não o permite (em alternativa, use o Firefox se puder), ou porque o nome do caminho para o seu ficheiro TiddlyWiki contém caracteres ilegais",
invalidFileError: "O ficheiro original '%0' não parece ser um TiddlyWiki válido",
backupSaved: "Ficheiro de backup guardado",
backupFailed: "Falha ao guardar o ficheiro de backup",
rssSaved: "Ficheiro RSS guardado",
rssFailed: "Falha ao guardar o ficheiro RSS",
emptySaved: "Modelo vazio guardado",
emptyFailed: "Falha ao guardar o modelo vazio",
mainSaved: "Ficheiro principal de TiddlyWiki guardado",
mainFailed: "Falha ao guardar o ficheiro principal de TiddlyWiki. As suas alterações não foram guardadas",
macroError: "Erro na macro <<%0>>",
macroErrorDetails: "Erro ao executar a macro <<%0>>:\n%1",
missingMacro: "Essa macro não existe",
overwriteWarning: "Um tiddler chamado '%0' já existe. Escolha OK para substituí-lo",
unsavedChangesWarning: "ATENÇÃO! Há alterações no TiddlyWiki que ainda não foram guardadas\n\nEscolha OK para guardar\nEscolha CANCEL para abandonar as alterações",
confirmExit: "--------------------------------\n\nHá alterações no TiddlyWiki que ainda não foram guardadas. Se continuar irá perder essas alterações\n\n--------------------------------",
saveInstructions: "GuardarAlterações",
unsupportedTWFormat: "Formato TiddlyWiki não suportado '%0'",
tiddlerSaveError: "Erro ao guardar tiddler '%0'",
tiddlerLoadError: "Erro ao carregar tiddler '%0'",
wrongSaveFormat: "Não é possível guardar no formato de armazenamento '%0'. Use o formato standard para guardar.",
invalidFieldName: "Nome de campo inválido %0",
fieldCannotBeChanged: "O campo '%0' não pode ser modificado"});
merge(config.messages.messageClose,{
text: "fechar",
tooltip: "fecha esta área de mensagens"});
config.messages.dates.months = ["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"];
config.messages.dates.days = ["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"];
config.messages.dates.shortMonths = ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"];
config.messages.dates.shortDays = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"];
merge(config.views.wikified.tag,{
labelNoTags: "sem etiquetas",
labelTags: "etiquetas: ",
openTag: "Abrir etiqueta '%0'",
tooltip: "Abrir tiddlers etiquetados com '%0'",
openAllText: "Abrir todos",
openAllTooltip: "Abrir todos estes tiddlers",
popupNone: "Não há outros tiddlers etiquetados com '%0'"});
merge(config.views.wikified,{
defaultText: "O tiddler '%0' ainda não existe. Faça duplo-clique para criá-lo",
defaultModifier: "(em falta)",
shadowModifier: "(tiddler sombra pré-definido)",
createdPrompt: "criado em"});
merge(config.views.editor,{
tagPrompt: "Escreva as etiquetas separadas por espaços, [[use duplos parênteses rectos]] se necessário, ou atribua existentes",
defaultText: "Escreva o texto para '%0'"});
merge(config.views.editor.tagChooser,{
text: "etiquetas",
tooltip: "Escolha entre as etiquetas existentes para atribuir a este tiddler",
popupNone: "Não há etiquetas definidas",
tagTooltip: "Atribuir a etiqueta '%0'"});
merge(config.macros.search,{
label: "procurar",
prompt: "Procura neste TiddlyWiki",
accessKey: "F",
successMsg: "%0 tiddlers encontrados que contêm %1",
failureMsg: "Não foi encontrado nenhum tiddler que contenha %0"});
merge(config.macros.tagging,{
label: "etiquetando:",
labelNotTag: "não etiquetando",
tooltip: "Lista de tiddlers etiquetados com '%0'"});
merge(config.macros.timeline,{
dateFormat: "DD MMM YYYY"});
merge(config.macros.allTags,{
tooltip: "Mostra tiddlers com a etiqueta '%0'",
noTags: "Não há tiddlers etiquetados"});
config.macros.list.all.prompt = "Todos os tiddlers por ordem alfabética";
config.macros.list.missing.prompt = "Tiddlers com ligações de outros tiddlers mas que não existem";
config.macros.list.orphans.prompt = "Tiddlers sem ligações de outros tiddlers";
config.macros.list.shadowed.prompt = "Tiddlers na sombra com conteúdo pré-definido";
merge(config.macros.closeAll,{
label: "fechar todos",
prompt: "Fecha todos os tiddlers abertos (excepto os que estão a ser editados)"});
merge(config.macros.permaview,{
label: "permavista",
prompt: "Ligação a um URL que mostra todos os tiddlers que estão abertos"});
merge(config.macros.saveChanges,{
label: "guardar alterações",
prompt: "Guarda todas as alterações em ficheiro",
accessKey: "S"});
merge(config.macros.newTiddler,{
label: "novo tiddler",
prompt: "Cria um novo tiddler",
title: "Novo tiddler",
accessKey: "N"});
merge(config.macros.newJournal,{
label: "novo diário",
prompt: "Cria um novo tiddler com a data e hora actuais",
accessKey: "J"});
merge(config.macros.plugins,{
skippedText: "(Este plugin não foi executado porque foi incluido depois do arranque)",
noPluginText: "Não há plugins instalados",
confirmDeleteText: "Tem a a certeza que quer eliminar estes tiddlers:\n\n%0",
listViewTemplate : {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Title', field: 'title', tiddlerLink: 'title', title: "Título", type: 'TiddlerLink'},
{name: 'Forced', field: 'forced', title: "Forçado", tag: 'systemConfigForce', type: 'TagCheckbox'},
{name: 'Disabled', field: 'disabled', title: "Desactivado", tag: 'systemConfigDisable', type: 'TagCheckbox'},
{name: 'Executed', field: 'executed', title: "Executado", type: 'Boolean', trueText: "Sim", falseText: "Não"},
{name: 'Error', field: 'error', title: "Resultado", type: 'Boolean', trueText: "Erro", falseText: "OK"},
{name: 'Log', field: 'log', title: "Log", type: 'StringList'}
],
rowClasses: [
{className: 'error', field: 'error'},
{className: 'warning', field: 'warning'}
],
actions: [
{caption: "Mais acções...", name: ''},
{caption: "Remover a etiqueta systemConfig", name: 'remove'},
{caption: "Eliminar estes tiddlers para sempre", name: 'delete'}
]}
});
merge(config.macros.refreshDisplay,{
label: "refrescar",
prompt: "Recarrega todo o TiddlyWiki"
});
merge(config.macros.importTiddlers,{
defaultPath: "http://www.tiddlywiki.com/index.html",
fetchLabel: "importar",
fetchPrompt: "Importe o ficheiro Tiddlywiki",
fetchError: "Ocorreram problemas ao importar o ficheiro Tiddlywiki",
confirmOverwriteText: "Tem a certeza que quer substituir estes tiddlers:\n\n%0",
wizardTitle: "Importar tiddlers de outro ficheiro TiddlyWiki",
step1: "Passo 1: Localize o ficheiro",
step1prompt: "Escreva o URL ou o caminho aqui: ",
step1promptFile: "...ou procure um ficheiro: ",
step1promptFeeds: "...ou selecione uma localização pré-definida: ",
step1feedPrompt: "Escolha...",
step2: "Passo 2: A carregar o ficheiro TiddlyWiki",
step2Text: "Por favor aguarde enquanto o ficheiro é carregado de: %0",
step3: "Passo 3: Escolha os tiddlers a importar",
step4: "%0 tiddler(s) importado(s)",
step5: "terminado",
listViewTemplate: {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Title', field: 'title', title: "Título", type: 'String'},
{name: 'Snippet', field: 'text', title: "Extracto", type: 'String'},
{name: 'Tags', field: 'tags', title: "Etiquetas", type: 'Tags'}
],
rowClasses: [
],
actions: [
{caption: "Mais acções...", name: ''},
{caption: "Importar estes tiddlers", name: 'import'}
]}
});
merge(config.commands.closeTiddler,{
text: "fechar",
tooltip: "Fecha este tiddler"});
merge(config.commands.closeOthers,{
text: "fechar outros",
tooltip: "Fecha todos os outros tiddlers"});
merge(config.commands.editTiddler,{
text: "editar",
tooltip: "Edita este tiddler",
readOnlyText: "ver",
readOnlyTooltip: "Ver o conteúdo deste tiddler"});
merge(config.commands.saveTiddler,{
text: "guardar",
tooltip: "Guarda as alterações a este tiddler"});
merge(config.commands.cancelTiddler,{
text: "cancelar",
tooltip: "Cancela as alterações a este tiddler",
warning: "Tem a certeza que quer cancelar as alterações a '%0'?",
readOnlyText: "ver",
readOnlyTooltip: "Ver este tiddler normalmente"});
merge(config.commands.deleteTiddler,{
text: "eliminar",
tooltip: "Elimina este tiddler",
warning: "Tem a certeza que quer eliminar '%0'?"});
merge(config.commands.permalink,{
text: "permaligação",
tooltip: "Permaligação para este tiddler"});
merge(config.commands.references,{
text: "referências",
tooltip: "Abre tiddlers que ligam a este",
popupNone: "Sem referências"});
merge(config.commands.jump,{
text: "saltar",
tooltip: "Salta para outro tiddler aberto"});
merge(config.shadowTiddlers,{
DefaultTiddlers: "ComoComeçar",
MainMenu: "ComoComeçar",
SiteTitle: "O meu TiddlyWiki",
SiteSubtitle: "um bloco de notas reutilizável e não-linear na web",
SiteUrl: "http://www.tiddlywiki.com/",
ComoComeçar: "Para começar a usar este TiddlyWiki vazio terá de modificar os seguintes tiddlers:\n* SiteTitle & SiteSubtitle: O título e o subtítulo do site, como pode ver acima (depois de guardar as alterações, eles aparecerão também na barra de título do browser)\n* MainMenu: O menu (usualmente à esquerda)\n* DefaultTiddlers: Contém o nome dos tiddlers que pretende que apareçam quando o TiddlyWiki é aberto\nSerá também necessário inserir o nome de utilizador que servirá para assinar as edições: <<option txtUserName>>",
SideBarOptions: "<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'opções »' 'Muda as opções avançadas do TiddlyWiki'>>",
OptionsPanel: "Estas opções de personalização do TiddlyWiki ficam guardadas no seu browser\n\nO seu nome de utilizador para assinar os textos. Use uma PalavraWiki (eg, JoséSilva)\n\n<<option txtUserName>>\n<<option chkSaveBackups>> GuardarBackups\n<<option chkAutoSave>> AutoGuardar\n<<option chkRegExpSearch>> ProcuraExpReg\n<<option chkCaseSensitiveSearch>> ProcuraSensívMaiúsc\n<<option chkAnimate>> ActivarAnimações\n\n----\nOpçõesAvançadas\nGestãoDePlugins\nImportarTiddlers",
AdvancedOptions: "<<option chkGenerateAnRssFeed>> GerarUmFicheiroRSS\n<<option chkOpenInNewWindow>> AbrirLigaçõesNumaNovaJanela\n<<option chkSaveEmptyTemplate>> CriaNovoModeloVazio\n<<option chkToggleLinks>> Fazer clique em ligações para tiddlers abertos, fecha-os\n^^(desactive com Control ou outra tecla modificadora)^^\n<<option chkHttpReadOnly>> EscondeFunçõesDeEdição quando acedido por HTTP\n<<option chkForceMinorUpdate>> Trata as edições como AlteraçõesMenores preservando a data e a hora\n^^(desactive pressionando Shift enquanto clica 'guardar' ou pressionando Ctrl-Shift-Enter^^\n<<option chkConfirmDelete>> ConfirmarAntesDeEliminar\nNúmero máximo de linhas na caixa de edição do tiddler: <<option txtMaxEditRows>>\nNome do directório para os ficheiros de backup: <<option txtBackupFolder>>\n<<option chkInsertTabs>> Usar a tecla tab para inserir caracteres tab em vez de saltar para o próximo campo",
SideBarTabs: "<<tabs txtMainTab 'Data' 'Tiddlers por ordem cronológica' TabTimeline 'Título' 'Tiddlers por ordem alfabética' TabAll 'Etiquetas' 'Todas as etiquetas' TabTags 'Mais' 'Mais listas' TabMore>>",
TabTimeline: "<<timeline>>",
TabAll: "<<list all>>",
TabTags: "<<allTags>>",
TabMore: "<<tabs txtMoreTab 'Em falta' 'Tiddlers em falta' TabMoreMissing 'Orfãos' 'Tiddlers sem ligações de outros tiddlers' TabMoreOrphans Sombra 'Tiddlers na sombra' TabMoreShadowed>>",
TabMoreMissing: "<<list missing>>",
TabMoreOrphans: "<<list orphans>>",
TabMoreShadowed: "<<list shadowed>>",
PluginManager: "<<plugins>>",
ImportTiddlers: "<<importTiddlers>>",
OpçõesAvançadas: "<<tiddler AdvancedOptions>>",
GestãoDePlugins: "<<tiddler PluginManager>>",
ImportarTiddlers: "<<tiddler ImportTiddlers>>"});
delete config.shadowTiddlers.GettingStarted;
}}}
!!Vetiver
[[Arquivos|Vetiver]]...[[Album de Fotos|VetiverDocs/ImagesAlbum/index.html]]
As atividades são sub-items das metas e deven ser ligadas com as metas do projeto (para lembrar os nomes das metas que voçe crio, clic acima a palavra "meta" na caixinha cinza a direita ''antes'' voçe abrir uma atividade nova....e lembrar o nome exato!!!.
!!!Criar <<newTiddler label:"Atividade Nova" title:"Nome da Atividade" text:"Para ligar esta atividade com sua meta, entra a nome da meta, na caixa abaixa usando o formato [[Name da Meta]]. E agora digitar os detalhes desta meta acima este texto" tag:"projeto" tag:"atividade">>
!!!Atividades a dentro deste Projeto
<<forEachTiddler where 'tiddler.tags.contains("atividade")' sortBy
'tiddler.tags'
script '
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";}
' write
'"*[["+tiddler.title+"]] → "+getFirstLine(tiddler.text)+"\n"' >>
As metas do projeto.
!!!Criar <<newTiddler label:"Nova Meta" title:"Nome da Meta" tag:"projeto" tag:"Metas" tag:"meta">>
!!!Metas deste Projeto
<<forEachTiddler where 'tiddler.tags.contains("Metas")' sortBy
'tiddler.tags'
script '
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";}
' write
'"*[["+tiddler.title+"]] → "+getFirstLine(tiddler.text)+"\n"' >>
Cada Meta, terá várias atividades que serão feitas para alcansar a Meta desejada. As Atividades devem explicar o que será feito, quando? por quantas pessoas? e o que será preciso? [[ABRIR|As Atividades]]
/%
|Name|AutoRefresh|
|Source|http://www.TiddlyTools.com/#AutoRefresh|
|Version|0.6.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|enable/disable auto-refresh of selected content to force/prevent re-rendering when tiddler changes occur|
usage:
<<tiddler AutoRefresh with: mode id>>
where:
mode - (optional) is one of:
off (or disable) - prevent refresh of rendered content (except when PageTemplate is changed!)
on (or enable)- re-render content whenever corresponding tiddler source is changed
force - re-render content whenever ANY tiddler content is changes (or refreshDisplay() is triggered)
id - (optional)
is a unique DOM element identifier on which to operate.
If not specified, the current tiddler (or containing parent if not in a tiddler) is used.
%/<script>
var here=story.findContainingTiddler(place);
if (here) { // in a tiddler, get containing viewer element
var here=place; while (here && here.className!='viewer') here=here.parentNode;
if (!here) return; // no 'viewer' element (perhaps a custom template?)
}
else here=place.parentNode; // not in a tiddler, use immediate parent container
// if DOM id param, get element by ID instead of using container
if ("$2"!="$"+"2") var here=document.getElementById("$2");
if (!here) return; // safety check
var mode="$1"; if (mode=="$"+"1") mode="on";
switch (mode.toLowerCase()) {
case 'on':
case 'enable':
case 'force':
var title=here.getAttribute("tiddler");
if (!title) { // find source tiddler title
var tid=story.findContainingTiddler(place);
if (!tid) return; // can't determine source tiddler
title=tid.getAttribute("tiddler");
}
here.setAttribute("tiddler",title);
here.setAttribute("refresh","content");
here.setAttribute("force",(mode=='force')?"true":"");
break;
case 'off':
case 'disable':
here.setAttribute("refresh","");
here.setAttribute("force","");
break;
}
</script>
As avaliações normalmente são feitas no final dos projetos, no entanto, é importante elaborar um plano de avaliação em prazos menores, como por exemplo, a cada três meses, ou no final de cada atividades ou meta. A avaliação permitirá seguir o plano de trabalho com mais tranquilidade ou se for preciso, mudar se houver necessidade de correções para se chegar aos objetivos propostos.
Tambem podem ser feitas avaliações internas com mais frequência, no caso de projetos de grande porte.
É importante estabelecer parâmetros para sabermos como vamos avaliar o impacto do projeto na área e com a população alvo.
[[ABIR|Avaliação]]
<<tabs tabsClass [[Metas]] "" [[As Metas]] [[Atividades]] "" [[As Atividades]] [[Plano de Ação]] "" [[Plano de Ação]] [[Resultados]] "" [[Resultados]] [[Monitoramento]] "" [[Monitoramento]] [[Avaliação]] "" [[Avaliação]]>>
* Abrir [[Nome do Projeto|SiteTitle]] e inserir (usando __editar__) um nome bem curto como uma Sigla deste projeto...usando uma palavra ou juntando poucas palavras com linhas..como ''~Aguas_na_Serra''.
* Abrir [[Descrição do Projeto|SiteSubtitle]] e inserir (usando __editar__) o nome completo do projeto...o nome mais oficial, mais detalhado.
* Inserir <<option txtUserName>> seu Nome e seu senha <<option pasUploadPassword>>
* O botão acima __O Formulario__ tem descriçõs breve das partes de um projeto (clic na parte a ''ABRIR'' para criar tal parte), ou abrir __Projeto Completo__, abrir cada parte e clic ''ABRIR'' para abrir tal parte por edição (digitar os detalhes do parte acima a texto en cada parte).
''Notas''
* Lembrar, que a idéia é para construir Projetos em colaboração!...você pode mudar, melhorar um projeto de outra pessoa, mas não mudar radicalmente o conceito, a idéia básica, sem comunicação prévia com o criador original do projeto. ('' uma vez, com o projeto criado, NÂO mudar a SIGLA do projeto'')
* Depois cada modificação deste arquivo (por autor ou outra) lembrar salvar ele com o servidor do ~IPCP-MA, usando [[Upload o Projeto]]
* E, o criador do Projeto, lembrar voltar a pagina //~IPCP-MA Projetos// para registra seu projeto com tal indice.
Contextualizar os aspectos ecológicos do bioma, bacia, microbacia (se for o caso), da região de forma geral, do município e da área específica onde será desenvolvido o projeto. Embora o termo ecológico tenha um conceito amplo, é interessante detalhar de forma separada os diversos aspectos, ou seja, ambiente, economia, sócio-cultural e as condições climáticas, etc. Fazer um resumo!
[[ABRIR|Contexto]]
<<tabs tabsClass [[Contexto]] "" [[Contexto]] [[Justificativa]] "" [[Justificativa]] [[População alvo]] "" [[População alvo]] >>
Listar quais os recursos de que o ~IPCP-MA dispõe, seus parceiros ou que a comunidade local pode contribuir no projeto.
Normalmente isto incluirá pessoal administrativo, uso de equipamentos, uso de veiculos..... Normalmente estes recursos e usos devem ser avaliados, ou seja, orçado valor da hora de trabalho, uso de máquinas e os valores inclusos no orçamento.
Algumas instituições exigem comprovação da contrapartida, então, é bom colocar somente a contrapartida que se tem certeza e que há possibildiade de se contar.
- Contar só com o que existe de fato!
[[ABRIR|ContraPartida]]
/***
|Name|CoreTweaks|
|Source|http://www.TiddlyTools.com/#CoreTweaks|
|Version|n/a|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2.4|
|Type|plugin|
|Requires||
|Overrides|various|
|Description|a small collection of overrides to TW core functions|
This tiddler contains some quick tweaks and modifications to TW core functions to provide minor changes in standard features or behavior. It is hoped that some of these tweaks may be incorporated into later versions of the TW core, so that these adjustments will be available without needing these add-on definitions. ''Note: the changes contained in this tiddler are generally applicable for the current version of TiddlyWiki (<<version>>)./% Please view [[CoreTweaksArchive]] for tweaks and modifications that may be used with earlier versions of TiddlyWiki.%/''
To install //all// of these tweaks, import (or copy/paste) this tiddler into your document. To include only //some// of the tweaks, you can edit the imported tiddler to remove the tweaks that you don't want. Alternatively, you could copy/paste a few selected tweaks from this tiddler into a tiddler that you create in your own document. Be certain to tag that tiddler with<<tag systemConfig>> (i.e., a plugin tiddler) and then save-and-reload for the tweaks to take effect.
***/
/***
!!! Ticketed Tweaks
***/
// // {{groupbox small{
/***
!!FireFox3 Import bug: "browse" button replacement
http://trac.tiddlywiki.org/ticket/683 - OPEN
see also http://trac.tiddlywiki.org/ticket/604 - cross-platform askForFilename()
The web standard "type=file" input control that has been used as a local path/file picker for TiddlyWiki no longer works as expected in FireFox3, which has, for "security" reasons, limited javascript access to this control so that *no* local filesystem path information can be revealed, even when it is intentional and necessary, as it is with TiddlyWiki. This tweak provides alternative HTML source that patches the backstage import panel. It replaces the "type=file" input control with a text+button combination of controls that invokes a system-native secure 'file-chooser' dialog box to provide TiddlyWiki with access to a complete path+filename so that TW functions properly locate user-selected local files.
***/
//{{{
if (window.Components) {
var fixhtml='<input name="txtBrowse" style="width:30em"><input type="button" value="..."'
+' onClick="window.browseForFilename(this.previousSibling,true)">';
var cmi=config.macros.importTiddlers;
cmi.step1Html=cmi.step1Html.replace(/<input type='file' size=50 name='txtBrowse'>/,fixhtml);
}
merge(config.messages,{selectFile:"Please enter or select a file"}); // ready for I18N translation
window.browseForFilename=function(target,mustExist) { // note: both params are optional
var msg=config.messages.selectFile;
if (target && target.title) msg=target.title; // use target field tooltip (if any) as dialog prompt text
// get local path for current document
var path=getLocalPath(document.location.href);
var p=path.lastIndexOf("/"); if (p==-1) p=path.lastIndexOf("\\"); // Unix or Windows
if (p!=-1) path=path.substr(0,p+1); // remove filename, leave trailing slash
var file=""
var result=window.askForFilename(msg,path,file,mustExist); // requires #604
if (target && result.length) // set target field and trigger handling
{ target.value=result; target.onchange(); }
return result;
}
//}}}
// // }}}
// // {{groupbox small{
/***
!!cross-platform askForFilename()
http://trac.tiddlywiki.org/ticket/604 - OPEN
invokes a system-native secure 'file-chooser' dialog box to provide TiddlyWiki with access to a complete path+filename so that TW functions properly locate user-selected local files.
***/
//{{{
window.askForFilename=function(msg,path,file,mustExist) {
var r = window.mozAskForFilename(msg,path,file,mustExist);
if(r===null || r===false)
r = window.ieAskForFilename(msg,path,file,mustExist);
if(r===null || r===false)
r = window.javaAskForFilename(msg,path,file,mustExist);
if(r===null || r===false)
r = prompt(msg,path+file);
return r||"";
}
window.mozAskForFilename=function(msg,path,file,mustExist) {
if(!window.Components) return false;
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, msg, mustExist?nsIFilePicker.modeOpen:nsIFilePicker.modeSave);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
thispath.initWithPath(path);
picker.displayDirectory=thispath;
picker.defaultExtension='html';
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
if (picker.show()!=nsIFilePicker.returnCancel)
var result=picker.file.persistentDescriptor;
}
catch(ex) { displayMessage(ex.toString()); }
return result;
}
window.ieAskForFilename=function(msg,path,file,mustExist) {
if(!config.browser.isIE) return false;
try {
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';
s.FilterIndex=3; // default to HTML files;
s.InitialDir=path;
s.FileName=file;
return s.showOpen()?s.FileName:"";
}
catch(ex) { displayMessage(ex.toString()); }
return result;
}
window.javaAskForFilename=function(msg,path,file,mustExist) {
if(!document.applets["TiddlySaver"]) return false;
// TBD: implement java-based askFile(...) function
try { return document.applets["TiddlySaver"].askFile(msg,path,file,mustExist); }
catch(ex) { displayMessage(ex.toString()); }
}
//}}}
// // }}}
// // {{groupbox small{
/***
!!#story:... paramifier
http://trac.tiddlywiki.org/ticket/676 - OPEN
scan the specified 'story' tiddler content for embedded links, rather than simply parsing the content as a space-separated bracketed list. This allows links from ''any'' tiddler to be used as a story, regardless of other wiki-syntax contained in that tiddler. If specified tiddler is a shadow, fallback to using parseParams() to extract the list of links.
***/
//{{{
config.paramifiers.story = {
onstart: function(v) {
var t=store.getTiddler(v); if (t) t.changed();
var list=t?t.links:store.getTiddlerText(v,"").parseParams("open",null,false);
story.displayTiddlers(null,list);
}
};
//}}}
// // }}}
// // {{groupbox small{
/***
!!Loose links (case-folded/space-folded wiki words)
http://trac.tiddlywiki.org/ticket/664 - OPEN
This tweak matches non-WikiWord variations of mixed-case and/or added/omitted spaces within double-bracketed text with titles of //existing// tiddlers, using a "loose" (case-folded/space-folded) comparison. This allows text that occurs in normal prose to be more easily linked to tiddler titles by using double-brackets without the full "pretty link" syntax. For example:
{{{
[[CoreTweaks]], [[coreTweaks]], [[core tweaks]],
[[CORE TWEAKS]], [[CoRe TwEaKs]], [[coreTWEAKS]]
}}}
>[[CoreTweaks]], [[coreTweaks]], [[core tweaks]],
>[[CORE TWEAKS]], [[CoRe TwEaKs]], [[coreTWEAKS]]
Configuration:
><<option chkLooseLinks>> Allow case-folded and/or space-folded text to link to existing tiddler titles
>{{{usage: <<option chkLooseLinks>>}}}
***/
//{{{
if (!config.options.chkLooseLinks)
config.options.chkLooseLinks=false; // default to standard behavior
window.caseFold_createTiddlyLink = window.createTiddlyLink;
window.createTiddlyLink = function(place,title,includeText,className) {
var btn=window.caseFold_createTiddlyLink.apply(this,arguments); // create core link
if (!config.options.chkLooseLinks) return btn;
if (store.getTiddlerText(title)) return btn; // matching tiddler (or shadow) exists
var target=title.toLowerCase().replace(/\s/g,"");
var tids=store.getTiddlers("title");
for (var t=0; t<tids.length; t++) {
if (tids[t].title.toLowerCase().replace(/\s/g,"")==target) {
var i=getTiddlyLinkInfo(tids[t].title,className);
btn.setAttribute("tiddlyLink",tids[t].title);
btn.title=i.subTitle;
btn.className=i.classes;
break;
}
}
return btn;
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/657 - OPEN
// // This tweak inserts an extra space element following each tab, allowing them to wrap onto multiple lines if needed.
//{{{
config.macros.tabs.handler = function(place,macroName,params)
{
var cookie = params[0];
var numTabs = (params.length-1)/3;
var wrapper = createTiddlyElement(null,"div",null,"tabsetWrapper " + cookie);
var tabset = createTiddlyElement(wrapper,"div",null,"tabset");
tabset.setAttribute("cookie",cookie);
var validTab = false;
for(var t=0; t<numTabs; t++) {
var label = params[t*3+1];
var prompt = params[t*3+2];
var content = params[t*3+3];
var tab = createTiddlyButton(tabset,label,prompt,this.onClickTab,"tab tabUnselected");
createTiddlyElement(tab,"span",null,null," ",{style:"font-size:0pt;line-height:0px"}); // ELS
tab.setAttribute("tab",label);
tab.setAttribute("content",content);
tab.title = prompt;
if(config.options[cookie] == label)
validTab = true;
}
if(!validTab)
config.options[cookie] = params[1];
place.appendChild(wrapper);
this.switchTab(tabset,config.options[cookie]);
};
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/637 - OPEN
// // This tweak modifies the tooltip format that appears when you mouseover a link to a tiddler. It adds an option to control the date format, as well as displaying the size of the tiddler (in bytes)
// //
// // Tiddler link tooltip format:
// // {{stretch{<<option txtTiddlerLinkTootip>>}}}
// // ^^where: %0=title, %1=username, %2=modification date, %3=size in bytes^^
// // Tiddler link tooltip date format:
// // {{stretch{<<option txtTiddlerLinkTooltipDate>>}}}
//{{{
config.messages.tiddlerLinkTooltip="%0 - %1, %2 (%3 bytes)";
config.messages.tiddlerLinkTooltipDate="DDD, MMM DDth YYYY 0hh12:0mm AM";
config.options.txtTiddlerLinkTootip=
config.options.txtTiddlerLinkTootip||config.messages.tiddlerLinkTooltip;
config.options.txtTiddlerLinkTooltipDate=
config.options.txtTiddlerLinkTooltipDate||config.messages.tiddlerLinkTooltipDate;
Tiddler.prototype.getSubtitle = function() {
var modifier = this.modifier;
if(!modifier) modifier = config.messages.subtitleUnknown;
var modified = this.modified;
if(modified) modified = modified.formatString(config.options.txtTiddlerLinkTooltipDate);
else modified = config.messages.subtitleUnknown;
return config.options.txtTiddlerLinkTootip.format([this.title,modifier,modified,this.text.length]);
};
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/628 - OPEN
// // When invoking a macro that is not defined, this tweak prevents the display of the "error in macro... no such macro" message. This is useful when rendering tiddler content or templates that reference macros that are defined by //optional// plugins that have not been installed in the current document.
// //
// // <<option chkHideMissingMacros>> hide "no such macro" error messages
//{{{
if (config.options.chkHideMissingMacros===undefined)
config.options.chkHideMissingMacros=false;
window.coreTweaks_missingMacro_invokeMacro = window.invokeMacro;
window.invokeMacro = function(place,macro,params,wikifier,tiddler) {
if (!config.macros[macro] || !config.macros[macro].handler)
if (config.options.chkHideMissingMacros) return;
window.coreTweaks_missingMacro_invokeMacro.apply(this,arguments);
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/609 - OPEN (separators)
// // http://trac.tiddlywiki.org/ticket/610 - OPEN (wikify tiddler/slice/section content)
// // These tweaks extend the {{{<<toolbar>>}}} macro to permit use of "|" as separators, as well as recognizing references to tiddlernames, slices, or sections and rendering their content inline within the toolbar
// // ''see [[ToolbarCommands]] for examples of how these features can be used''
//{{{
merge(config.macros.toolbar,{
separator: "|"
});
config.macros.toolbar.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
for(var t=0; t<params.length; t++) {
var c = params[t];
switch(c) {
case '|': // ELS - SEPARATOR
case '!': // ELS - SEPARATOR (alternative for use in tiddler slices)
createTiddlyText(place,this.separator); // ELS
break; // ELS
case '>':
var btn = createTiddlyButton(place,this.moreLabel,this.morePrompt,config.macros.toolbar.onClickMore);
addClass(btn,"moreCommand");
var e = createTiddlyElement(place,"span",null,"moreCommand");
e.style.display = "none";
place = e;
break;
default:
var theClass = "";
switch(c.substr(0,1)) {
case "+":
theClass = "defaultCommand";
c = c.substr(1);
break;
case "-":
theClass = "cancelCommand";
c = c.substr(1);
break;
}
if(c in config.commands)
this.createCommand(place,c,tiddler,theClass);
else { // ELS - WIKIFY TIDDLER/SLICE/SECTION
if (c.substr(0,1)=="~") c=c.substr(1); // ignore leading ~
var txt=store.getTiddlerText(c);
if (txt) {
txt=txt.replace(/^\n*/,"").replace(/\n*$/,""); // trim any leading/trailing newlines
txt=txt.replace(/^\{\{\{\n/,"").replace(/\n\}\}\}$/,""); // trim PRE format wrapper if any
wikify(txt,createTiddlyElement(place,"span"),null,tiddler);
}
} // ELS - end WIKIFY CONTENT
break;
}
}
};
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/608 - OPEN
// // This tweak extends the {{{<<toolbar>>}}} macro to make the ">" (more) a //toggle// between more/less with the additional toolbar commands displayed on a separate line.
//{{{
merge(config.macros.toolbar,{
moreLabel: 'more',
morePrompt: "Show additional commands",
lessLabel: 'less',
lessPrompt: "Hide additional commands"
});
config.macros.toolbar.onClickMore = function(ev)
{
var e = this.nextSibling;
var showing=e.style.display=="block";
e.style.display = showing?"none":"block";
this.innerHTML=showing?config.macros.toolbar.moreLabel:config.macros.toolbar.lessLabel;
this.title=showing?config.macros.toolbar.morePrompt:config.macros.toolbar.lessPrompt;
return false;
};
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/607 - OPEN
// // This tweak automatically sets the HREF for the 'permaview' sidebar command link so you can use the 'right click' context menu for faster, easier bookmarking. Note that this does ''not'' automatically set the permaview in the browser's current location URL... it just sets the HREF on the command link. You still have to click the link to apply the permaview.
//{{{
config.macros.permaview.handler = function(place)
{
var btn=createTiddlyButton(place,this.label,this.prompt,this.onClick);
addEvent(btn,"mouseover",this.setHREF);
addEvent(btn,"focus",this.setHREF);
};
config.macros.permaview.setHREF = function(event){
var links = [];
story.forEachTiddler(function(title,element) {
links.push(String.encodeTiddlyLink(title));
});
var newURL=document.location.href;
var hashPos=newURL.indexOf("#");
if (hashPos!=-1) newURL=newURL.substr(0,hashPos);
this.href=newURL+"#"+encodeURIComponent(links.join(" "));
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/529 - OPEN
// // This tweak hijacks the standard browser function, document.getElementById(), to work-around the case-INsensitivity error in Internet Explorer (all versions up to and including IE7) //''Note: This tweak is only applied when using IE, and only for lookups of rendered tiddler elements within the containing "tiddlerDisplay" element.''//
//{{{
if (config.browser.isIE) {
document.coreTweaks_coreGetElementById=document.getElementById;
document.getElementById=function(id) {
var e=document.coreTweaks_coreGetElementById(id);
if (!e || !e.parentNode || e.parentNode.id!="tiddlerDisplay") return e;
for (var i=0; i<e.parentNode.childNodes.length; i++)
if (id==e.parentNode.childNodes[i].id) return e.parentNode.childNodes[i];
return null;
};
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/471 - OPEN
// // This tweak HIJACKS the core's saveTiddler() function to automatically add a "creator" field to a tiddler when it is FIRST created. You can use {{{<<view creator>>}}} (or {{{<<view creator wikified>>}}} if you prefer) to show this value embedded directly within the tiddler content, or {{{<span macro="view creator"></span>}}} in the ViewTemplate and/or EditTemplate to display the creator value in each tiddler.
//{{{
// hijack saveTiddler()
TiddlyWiki.prototype.CoreTweaks_creatorSaveTiddler=TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler=function(title,newTitle,newBody,modifier,modified,tags,fields)
{
var existing=store.tiddlerExists(title);
var tiddler=this.CoreTweaks_creatorSaveTiddler.apply(this,arguments);
if (!existing) store.setValue(title,"creator",config.options.txtUserName);
return tiddler;
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/458 - CLOSED: WON'T FIX
// // This tweak assigns a "permalink"-like HREF to internal Tiddler links (which normally do not have any HREF defined). This permits the link's context menu (right-click) to include 'open link in another window/tab' command. Based on a request from Dustin Spicuzza.
//{{{
window.coreTweaks_createTiddlyLink=window.createTiddlyLink;
window.createTiddlyLink=function(place,title,includeText,theClass,isStatic,linkedFromTiddler,noToggle)
{
// create the core button, then add the HREF (to internal links only)
var link=window.coreTweaks_createTiddlyLink.apply(this,arguments);
if (!isStatic)
link.href=document.location.href.split("#")[0]+"#"+encodeURIComponent(String.encodeTiddlyLink(title));
return link;
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/444 - OPEN
// // When invoking a macro, this tweak makes the current containing tiddler object and DOM rendering location available as global variables (window.tiddler and window.place, respectively). These globals can then be used within "computed macro parameters" to retrieve tiddler-relative and/or DOM-relative values or perform tiddler-specific side-effect functionality.
//{{{
window.coreTweaks_invokeMacro = window.invokeMacro;
window.invokeMacro = function(place,macro,params,wikifier,tiddler) {
var here=story.findContainingTiddler(place);
window.tiddler=here?store.getTiddler(here.getAttribute("tiddler")):null;
window.place=place;
window.coreTweaks_invokeMacro.apply(this,arguments);
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/401 - CLOSED: WON'T FIX
// // This tweak allows definition of an optional [[PageTitle]] tiddler that, when present, provides alternative text for display in the browser window's titlebar, instead of using the combined text content from [[SiteTitle]] and [[SiteSubtitle]] (which will still be displayed as usual in the TiddlyWiki document header area)
//{{{
window.coreTweaks_getPageTitle=window.getPageTitle;
window.getPageTitle=function() {
var txt=wikifyPlain("PageTitle"); if (txt.length) return txt;
return window.coreTweaks_getPageTitle.apply(this,arguments);
}
store.addNotification("PageTitle",refreshPageTitle); // so title stays in sync with tiddler changes
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/67 - OPEN
// // The "missing links" list includes items contained within "quoted" text (i.e., content that will not render as wiki-syntax, and so CANNOT create any tiddler links, even if the quoted text matches valid link syntax). This tweak removes content contained between certain delimiters before scanning tiddler source for possible links.
/***
Delimiters include:
{{{
/%...%/
{{{...}}}
"""..."""
<nowiki>...</nowiki>
<html>...</html>
<script>...</script>
}}}
***/
//{{{
Tiddler.prototype.coreTweaks_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
var savedtext=this.text;
// remove 'quoted' text before scanning tiddler source
this.text=this.text.replace(/\/%((?:.|\n)*?)%\//g,""); // /%...%/
this.text=this.text.replace(/\{{3}((?:.|\n)*?)\}{3}/g,""); // {{{...}}}
this.text=this.text.replace(/"{3}((?:.|\n)*?)"{3}/g,""); // """..."""
this.text=this.text.replace(/\<nowiki\>((?:.|\n)*?)\<\/nowiki\>/g,""); // <nowiki>...</nowiki>
this.text=this.text.replace(/\<html\>((?:.|\n)*?)\<\/html\>/g,""); // <html>...</html>
this.text=this.text.replace(/\<script((?:.|\n)*?)\<\/script\>/g,""); // <script>...</script>
this.coreTweaks_changed.apply(this,arguments);
// restore quoted text to tiddler source
this.text=savedtext;
};
//}}}
// // }}}
/***
!!! Fixed in current release (TW<<version>>)
***/
// // {{groupbox small{
// // calculate version number for conditional inclusion of tweaks below...
//{{{
var ver=version.major+version.minor/10+version.revision/100;
//}}}
// // }}}
// // {{groupbox small{
/***
!!#filter:"..." paramifier
http://trac.tiddlywiki.org/ticket/678 - FIXED IN TW241
displays all tiddlers that match any filter criteria (including tag-matching), using the {{{store.filterTiddlers()}}} syntax. Note use of double-quotes to enclose value to ensure that square-brackets within filter syntax are passed through for processing.
***/
//{{{
if (ver<2.41) {
config.paramifiers.filter = {
onstart: function(v) {
var tagged = store.filterTiddlers(v);
story.displayTiddlers(null,tagged,null,false,null);
}
};
}
//}}}
// // }}}
// // {{groupbox small{
/***
!!#tag:... paramifier
http://trac.tiddlywiki.org/ticket/677 - FIXED IN TW241
use {{{store.filterTiddlers()}}} instead of {{{store.getTaggedTiddlers()}}}. This permits enhanced tag-matching logic (such as boolean expression processing provided by [[MatchTagsPlugin]]) to be used, e.g., {{{#tag:"tag1 OR (tag2 AND NOT tag3)"}}}, instead of simply matching a single tag value.
***/
//{{{
if (ver<2.41) {
config.paramifiers.tag = {
onstart: function(v) {
var tagged = store.filterTiddlers("[tag["+v+"]]");
story.displayTiddlers(null,tagged,null,false,null);
}
};
}
//}}}
// // }}}
// // {{groupbox small{
/***
!!#recent:... paramifier
http://trac.tiddlywiki.org/ticket/675 - FIXED IN TW241
automatically display the N most recently changed tiddlers. N is, of course, an integer number. If N=0 (or is not a numeric value), the regular [[DefaultTiddlers]] will be displayed.
***/
//{{{
if (ver<2.41) {
config.paramifiers.recent= {
onstart: function(v) {
var titles=[];
var tids=store.getTiddlers("modified","excludeLists").reverse();
for (var t=0; t<v && t<tids.length; t++) titles.push(tids[t].title);
story.displayTiddlers(null,titles);
}
};
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/635 - FIXED IN TW241
// // When using backstage>import "browse" button, resulting URL is improperly formed with "file://" prefix instead of "file:///" prefix. This causes errors when using Firefox 3 (beta) or when running under Windows Vista OS.
// // http://trac.tiddlywiki.org/ticket/638 - FIXED IN TW241
// // When entering text directly into path/file field, each keystroke is displayed and then discarded, preventing manual entry of path/file.
// // http://trac.tiddlywiki.org/ticket/639 - FIXED IN TW241
// // Pressing "enter" from URL or Browse input field immediately reloads the current document. Instead, it should trigger the "open" button for the import wizard (if a URL has been entered)
//{{{
if (ver<2.41) {
// #635 and #638
config.macros.importTiddlers.onBrowseChange = function(e)
{
var wizard = new Wizard(this);
var fileInput = wizard.getElement("txtPath");
fileInput.value = config.macros.importTiddlers.getURLFromLocalPath(this.value); // #635
var serverType = wizard.getElement("selTypes");
serverType.value = "file";
return true; // #638
};
// #635 - fixup local path/file to form absolute URL reference
config.macros.importTiddlers.getURLFromLocalPath = function(v)
{
if (!v||!v.length) return v;
v=v.replace(/\\/g,"/"); // use "/" for cross-platform consistency
var t=v.split(":"); p=t[1]||t[0]; // remove drive letter (if any)
if (t[1] && (t[0]=="http"||t[0]=="https"||t[0]=="file")) { // input is already a URL
var u=v;
} else if (p.substr(0,1)=="/") { // path is absolute, add protocol+domain+extra slash (if drive letter)
var u=document.location.protocol+"//"+document.location.hostname+(t[1]?"/":"")+v;
} else { // path is relative, add current document protocol+domain+path
var c=document.location.href.replace(/\\/g,"/");
var pos=c.lastIndexOf("/"); if (pos!=-1) c=c.substr(0,pos); // remove filename
var u=c+"/"+p;
}
return u;
}
// #639 - prevent form action and click "open" button if ENTER is pressed
config.macros.importTiddlers.coreTweaks_restart = config.macros.importTiddlers.restart;
config.macros.importTiddlers.restart = function(wizard)
{
config.macros.importTiddlers.coreTweaks_restart.apply(this,arguments);
wizard.formElem.action="javascript:;"
wizard.formElem.onsubmit=function() {
if (this.txtPath.value.length)
this.lastChild.firstChild.onclick(); // press "open" button
}
};
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/623 - FIXED IN TW241
/***
This tweak allows date format strings to contain backslash-quoted characters that bypass date format replacement. This allows sequences such as "s\s", "m\m" or "a\m" to be used so that "ss", "mm" or "am" can appears as literal text within journal titles or other date-formatted values.
For example:
>{{{<<today "withhold less hummingbirds - YYYY.0MM.0DD 0hh:0mm:0ss">>}}}
>results in: <<today "withhold less hummingbirds - YYYY.0MM.0DD 0hh:0mm:0ss">>
while:
>{{{<<today "with\hold les\s hum\mingbirds - YYYY.0MM.0DD 0hh:0mm:0ss">>}}}
>results in: <<today "with\hold les\s hum\mingbirds - YYYY.0MM.0DD 0hh:0mm:0ss">>
***/
//{{{
if (ver<2.41) {
Date.prototype.coreTweaks_formatString = Date.prototype.formatString;
Date.prototype.formatString = function(template) {
var t = Date.prototype.coreTweaks_formatString.apply(this,arguments);
t = t.replace(/\\/g,""); // strip backslashes used to quote formats
return t;
};
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/578 - FIXED IN TW240
// // This tweak trims any leading whitespace/newline and the trailing newline from tiddler sections
//{{{
if (ver<2.4) {
TiddlyWiki.prototype.coreTweaks_getTiddlerText = TiddlyWiki.prototype.getTiddlerText;
TiddlyWiki.prototype.getTiddlerText = function(title,defaultText)
{
var r=TiddlyWiki.prototype.coreTweaks_getTiddlerText.apply(this,arguments);
if (r&&title.indexOf(config.textPrimitives.sectionSeparator)!=-1)
r=r.replace(/^[ \t]*\n/,"").replace(/\n$/,""); // trim any leading/trailing newlines
return r;
};
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/541 - FIXED IN TW240
// // This tweak adds a conditional check to the core's 'open' paramifier, so that when the document is viewed in readOnly mode, non-existent tiddlers specified using a permalink/permaview (i.e. "#TiddlerName" in the document URL) will not be displayed as an empty tiddler (which shows the "double-click to create" default text).
//{{{
if (ver<2.4) {
config.paramifiers.open = {
onstart: function(v) {
if(!readOnly || store.tiddlerExists(v) || store.isShadowTiddler(v))
story.displayTiddler("bottom",v,null,false,null);
}
};
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/470 - FIXED IN TW240
// // This tweak lets you set an alternative initial focus field when editing a tiddler (default field is "text")
// // Enter initial focus field name: <<option txtEditorFocus>> (//usage:// {{{<<option txtEditorFocus>>}}})
//{{{
if (ver<2.4) {
config.commands.editTiddler.coreTweaks_handler = config.commands.editTiddler.handler;
config.commands.editTiddler.handler = function(event,src,title)
{
if (config.options.txtEditorFocus==undefined) config.options.txtEditorFocus="text";
this.coreTweaks_handler.apply(this,arguments);
story.focusTiddler(title,config.options.txtEditorFocus);
return false;
};
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/468 - FIXED IN TW240
// // This tweak extends the core's {{{<<tag>>}}} macro to accept additional parameters for specifying alternative label and tooltip text for the tag popup "button" link (i.e., "`PrettyTags"). Based on a suggestion by ~PBee.
//{{{
// hijack tag handler()
if (ver<2.4) {
config.macros.tag.CoreTweaks_handler=config.macros.tag.handler;
config.macros.tag.handler = function(place,macroName,params)
{
this.CoreTweaks_handler.apply(this,arguments);
var btn=place.lastChild;
if (params[1]) btn.innerHTML=params[1];
if (params[2]) btn.title=params[2];
}
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/320 - FIXED IN TW240
// // This tweak updates the core's forceReflow() function to fix a Firefox rendering problem, whereby the contents of the a tiddler editor text area can be incorrectly displayed (overlapping other content) when more than one tiddler is in edit mode.
//{{{
if (ver<2.4) {
function forceReflow()
{
if(config.browser.isGecko) {
setStylesheet("body {top:-0px;margin-top:0px;}");
setTimeout('setStylesheet("")',1); // invoke async to bypass browser optimization
}
}
}
//}}}
// // }}}
// // {{groupbox small{
// // http://trac.tiddlywiki.org/ticket/42 - FIXED IN TW240
// // This tweak adjusts the left position of a TW popup so that it won't overlap with the browser window's vertical scrollbar, when present.
//{{{
if (ver<2.4) {
Popup.place = function(root,popup,offset)
{
if(!offset) var offset = {x:0, y:0};
var rootLeft = findPosX(root);
var rootTop = findPosY(root);
var rootHeight = root.offsetHeight;
var popupLeft = rootLeft + offset.x;
var popupTop = rootTop + rootHeight + offset.y;
var winWidth = findWindowWidth();
if(popup.offsetWidth > winWidth*0.75)
popup.style.width = winWidth*0.75 + "px";
var popupWidth = popup.offsetWidth;
// ELS: leave space for vertical scrollbar
var scrollWidth=winWidth-document.body.offsetWidth;
if(popupLeft+popupWidth > winWidth-scrollWidth-1)
popupLeft = winWidth-popupWidth-scrollWidth-1;
popup.style.left = popupLeft + "px";
popup.style.top = popupTop + "px";
popup.style.display = "block";
};
}
//}}}
// // }}}
/***
!!!Unticketed Tweaks
***/
// // {{groupbox small{
/***
!!#animate:... paramifier
http://trac.tiddlywiki.org/ticket/TBD - TBD
This tweak provides a paramifier to turn on/off animation
***/
//{{{
config.paramifiers.animate= {
onstart: function(v) {
config.options.chkAnimate=eval(v);
}
};
//}}}
// // }}}
// // {{groupbox small{
// // This tweak adds an optional 'sortby' parameter to the {{{<<tag tagname label tip sortby>>}}} macro, as well as the {{{<<allTags excludeTag sortby>>}}} macro used to generate the sidebar contents 'tags' list. Specify the field on which the contents of each tag popup is to be sorted, with a "+" or "-" prefix to indicate ascending/descending order, respectively.
// // Example: {{{<<tag systemConfig "plugins" "list plugins by date, most recent first" "-modified">>}}}
// // Try it: <<tag systemConfig "plugins" "list plugins by date, most recent first" "-modified">>
// // Similarly, to change the sort order used by the popups from all tags shown in the sidebar contents, edit the [[TagTags]] shadow tiddler and enter: {{{<<allTags excludeLists -modified>>}}}
//{{{
// hijack tag handler() to add 'sortby' attribute to tag button
config.macros.tag.CoreTweaksSortTags_handler=config.macros.tag.handler;
config.macros.tag.handler = function(place,macroName,params)
{
this.CoreTweaksSortTags_handler.apply(this,arguments);
var btn=place.lastChild;
if (params[3]) btn.setAttribute("sortby",params[3]);
}
// TWEAK <<allTags>> macro to add 'sortby' attribute to each tag button
var fn=config.macros.allTags.handler;
var lines=fn.toString().split("\n");
lines.splice(lines.length-2,0,['if(params[1]) btn.setAttribute("sortby",params[1]);']);
fn=lines.join("\n");
eval("config.macros.allTags.handler="+fn);
// TWEAK event handler for clicking on a tiddler tag to use 'sortby' attribute
var fn=onClickTag;
fn=fn.toString().replace(
/store.getTaggedTiddlers\(tag\);/g,
'store.getTaggedTiddlers(tag);'
+'var sortby=this.getAttribute("sortby");'
+'if(sortby&&sortby.length) store.sortTiddlers(tagged,sortby);'
);
eval(fn);
//}}}
// // }}}
// // {{groupbox small{
// // This HIJACK tweak pre-processes source content to convert "double-backslash-newline" into {{{<br>}}} before wikify(), so that literal newlines can be embedded in line-mode wiki syntax (e.g., tables, bullets, etc.). Based on a suggestion from Sitaram Chamarty.
//{{{
window.coreWikify = wikify;
window.wikify = function(source,output,highlightRegExp,tiddler)
{
if (source) arguments[0]=source.replace(/\\\\\n/mg,"<br>");
coreWikify.apply(this,arguments);
}
//}}}
// // }}}
Climate change and land use mismanagement often when combined result in serious disasters, this is particularly so in high rainfall tropical locations. The most devastating being caused by tropical storms on steep lands resulting in land slides, flooding, infrastructure destruction, loss of life and serious reduction in economic output. Similarly the aftermath of earthquakes often result in unstable and highly erodible slopes that slip and end up as major sediment flows in downstream catchments.
The Vetiver System can provide very significant mitigation in the prevention and rehabilitation of such damage, including the stabilization of slip prone slopes, soil erosion control, levee and dike stabilization, river bank stabilization, road and highway stabilization, bridge abutment stabilization, and the stabilization of building sites. The Vetiver System's effectiveness has been proven time and time again including the protection and stabilization of highways in El Salvador against the impact of the 1998 Hurricane Mitch; the protection of a key railway line in Madagascar against annual cyclone damage that previously shut down the railway every year for months on end; the protection of sea dikes in Vietnam against the worst typhoons in 50 years; and the stabilization of highways in China, Malaysia, and Vietnam against slippage due to tropical rainfall events. These and other examples are well documented on this web site.
Source: [[Disaster Mitigation|http://www.vetiver.com/g/disaster_mitigation.htm]]
[[Edital 27/2008 do CNPq|http://www.cnpq.br/editais/ct/2008/027.htm]]
Os documentos de Referência são relativos à informações bibliográficas, informações levantadas, escrita, falada, citações, gravações, vídeso, mapeamentos, ... tudo que der suporte à elaboração do projeto.'
[[ABRIR|Docs_Ref]]
Os Documentos para Suporte constam de:
- Documentos relativos à Legislação;
- Documentos de anuência da comunidade onde se pretende realizar o projeto - este documento é uma autorização da comunidade concordando com o projeto.
- Documentos de Termos de Parceria - Estes documentos devem ser agilizados logo no inicio da elaboração do projeto e se negociando com os parceiros e/ou aliados. Pois normalmente passam por um processo burocrático e leva tempo para serem liberados. Dependendo da instituição a liberação é imediata!
- Documentos importantes para a comunidade como Atas de reuniões, mapas, informações relevantes da comunidade ou local.
- Resultados de outros projetos ou atividades que foram ou estão em desenvolvimento
- Levantamentos existentes do local
- Fotos
- Depoimentos.
[[ABRIR|Docs_Supporte]]
<<tabs tabsClass [[Originais]] "" [[Docs_Originais]] [[Supporte]] "" [[Docs_Supporte]] [[References]] "" [[Docs_Ref]] [[Anexos]] "" [[Anexos]]>>
É importante o ~IPCP-MA ter uma Lista dos equipamentos, com dados técnicos, marca e valores dos equipamentos existentes no ~IPCP-MA e quais deles podem entrar como contrapartida. Antes de colocar tais equipamentos como contrapartida, é importante saber se o mesmo esta sendo utilizado por outro projeto e qual o tempo de disponibilidade.
No caso de não existir no ~IPCP-MA os equipamentos necessários à realização dos projetos, é importante fazer uma lista contendo também as informações citadas acima.
Notar que os equipamentos que serão comprados por parte de fundos de projetos, e aqueles do ~IPCP-MA ou de seus parceiros serão disponibilizados durante o projeto.
É importante prever recursos para manutenção de equipamentos, reparos, etc.
[[ABRIR|Equipamentos]]
Quais serão os profissionais de que o projeto precisa? Qual o perfil? Pode ser colocado nome de profissionais específicos para as funções solicitadas ou pode ser listado somente as competencias necessárias para o projeto.
É importante a Equipe do ~IPCP-MA ter pronto o currículo de cada profissional e modelos de Termos de Refências relativas à competência da Equipe Técnica do ~IPCP-MA.
[[ABRIR|Equipe]]
Escolher ate 10 propriedades para entrar o projeto incialmente. [[Como escolher?]]
// //''Name:'' FAQ List
// //''Version:'' 1.4 for TW 2.0.0
// //''Author:'' AlanHecht
// //''Type:'' [[Macro|Macros]]
// //''Description:'' FAQ List lets you compile a list of Frequently Asked Questions and present them in a cascading style for the viewer. Each question is turned into a link that will toggle the view of the answer text. The list can be compiled either from all tiddlers containing a certain tag or from a single tiddler that contains all the needed questions and answers.
// //''Syntax:'' << {{{ faqlist mode source sortBy hrSeparator }}} >>
// // ''faqlist:'' the macro call (required)
// // ''mode:'' either "byTag" or "byTitle" (required)
// // ''source:'' the associated tag or tiddler title (required)
// // ''sortBy:'' if byTag, sort can be "title," "modifier," "modified." If byTitle, sort can be "question" and will reorder the questions in alphabetical order. (this parameter is optional; use "null" if you don't want a sort order, but want to use "hr" as the last paramter)
// // ''hrSeparator:'' if "hr" is included at the end of the call string, each question/answer set will be separated by a horizontal rule.
// //Examples: (edit these two tiddlers to see the syntax used for each)
// // • [[FAQ Method One]] (compiled from tiddlers tagged with a certain tag)
// // • [[FAQ Method Two]] (compiled using the content of a single tiddler)
// // • @@color(#ff0000):''New!''@@ [[FAQ Method Three]] (uses the {{{<<tiddler>>}}} macro to pull the faq questions from a single tiddler and the answers from other tiddlers...very cool!)
// //''Directions:'' <<tiddler StartupBehaviorDirections>> <<tiddler MacroDirections>>
// //''Notes:'' If you choose to use byTitle mode where the entire set of questions/answers comes from a single tiddler, the syntax for the tiddler content is as follows:
// // • Each question must be a single line (i.e. no hard returns) but can wrap as needed
// // • The answer to a question begins on the next line after the question and can be as long as needed. It can also include hard returns as part of the answer text, but it cannot include empty lines (i.e. an empty line is the result of pressing enter twice).
// // • Each question/answer set must be seperated by two hard returns (i.e. must have a single, blank line between them.
// // Refer to [[FAQ Tiddler Sample]] for an example.
// //''Known Issues:'' If a user clicks too quickly to toggle a FAQ entry on/off, they will go into tiddler edit mode. This should be corrected in the future by allowing web-hosted versions of the faq to disable double-clicking.
// //''Revision History:''
// // v0.1.0 (01 August 2005): initial release
// // v0.1.1 (04 August 2005): Fixed an endless loop bug (thanks to Kevin Kleinfelter).
// // v0.1.2 (19 October 2005): Fixed TW compatibility .32 bugs (newline for block quote and e.preventDefault by Clint Checketts)
// // v0.1.3 (01 November 2005): Thanks to Clint's work, I fixed a similar "jump to top" problem when using the expand & collapse buttons. Also added the description for [[FAQ Method Three]]
// // v0.1.4 (05 January 2006): Created a special version of FaqList to work with TW v2.0.0
// //''Code section:''
version.extensions.faqlist = {major: 0, minor: 1, revision: 4, date: new Date("Jan 05, 2006")};
config.macros.faqlist = {
bulletCollapse: ">",
bulletExpand: "∨",
expandButton: {title: "Expand All", tooltip: "Open all items for reading"},
collapseButton: {title: "Collapse All", tooltip: "Close all items"}
};
config.macros.faqlist.handler = function(place,macroName,params)
{
lingo = config.macros.faqlist;
var mode = params[0].toLowerCase();
var list = [];
switch(mode)
{
case "bytag":
var tagged = store.getTaggedTiddlers(params[1], params[2]);
for(t=0; t<tagged.length; t++)
{
var title = tagged[t].title;
list[t] = [title,store.getTiddlerText(title)];
}
var subTitle = store.fetchTiddler(title).getSubtitle();
break;
case "bytitle":
var faqText = store.getTiddlerText(params[1]);
var faqItems = faqText.split("\n\n");
if(params[2] == "question")
faqItems.sort();
for(t=0; t<faqItems.length; t++)
{
list[t] = [faqItems[t].substring(0,faqItems[t].indexOf("\n")),faqItems[t].substring(faqItems[t].indexOf("\n")+1)];
}
var subTitle = null;
break;
}
var faqHeading = place.appendChild(document.createElement("span"));
faqHeading.appendChild(createTiddlyButton(faqHeading,lingo.expandButton.title,lingo.expandButton.tooltip,faqExpandAll));
faqHeading.appendChild(createTiddlyButton(faqHeading,lingo.collapseButton.title,lingo.collapseButton.tooltip,faqCollapseAll));
faqHeading.appendChild(document.createElement("p"));
var faqBody = place.appendChild(document.createElement("span"));
for(var t=0; t<list.length; t++)
{
var title = list[t][0];
var content = "<<<\n" + list[t][1] + "\n<<<\n";
var theClass = "tiddlyLinkExisting tiddlyLink";
var itemHeading = faqBody.appendChild(document.createElement("span"));
itemHeading.appendChild(document.createTextNode(config.macros.faqlist.bulletCollapse + " "));
createTiddlyButton(itemHeading,title,subTitle,faqToggleThis,theClass);
var itemBody = faqBody.appendChild(document.createElement("span"));
itemBody.style.display = "none";
itemBody.className = "itemBody";
wikify(content,itemBody,null,null);
faqBody.appendChild(itemBody);
faqBody.appendChild(document.createElement("p"));
if(params[3] == "hr")
faqBody.appendChild(document.createElement("hr"));
}
}
function faqToggleThis(e)
{
var content = this.parentNode.nextSibling;
var shown = content.style.display;
if(shown == "none")
{
content.style.display = "inline";
this.previousSibling.nodeValue = config.macros.faqlist.bulletExpand + " ";
}
else
{
content.style.display = "none";
this.previousSibling.nodeValue = config.macros.faqlist.bulletCollapse + " ";
}
}
function faqExpandAll(e)
{
for(t=0; t<this.parentNode.nextSibling.childNodes.length; t++)
{
if(this.parentNode.nextSibling.childNodes[t].className == "itemBody")
{
this.parentNode.nextSibling.childNodes[t].style.display = "inline";
this.parentNode.nextSibling.childNodes[t].previousSibling.childNodes[0].nodeValue = config.macros.faqlist.bulletExpand + " ";
}
}
// e.preventDefault();
}
function faqCollapseAll(e)
{
for(t=0; t<this.parentNode.nextSibling.childNodes.length; t++)
{
if(this.parentNode.nextSibling.childNodes[t].className == "itemBody")
{
this.parentNode.nextSibling.childNodes[t].style.display = "none";
this.parentNode.nextSibling.childNodes[t].previousSibling.childNodes[0].nodeValue = config.macros.faqlist.bulletCollapse + " ";
}
}
// e.preventDefault();
}
|Nome da Conta|~IPCP_Projetos|
|Host|ftp.ipcp.org.br|
|Usuario|ipcp_projetos@ipcp.org.br|
|Senha|get_going_2009|
Os ~URLs dos seus documentos será - {{{www.ipcp.org.br/IPCP-MA/Projects/Nome_do_Domento}}}
!!!Nota - esta conta FTP só tem accesso a pasta dos Projetos.....porfavor não meixer com os arquivos e documentos de outras pessoas nesta pasta!
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|© 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description
Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.
''Syntax:''
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|
See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].
!Revision history
* v1.0.8 (2007-04-12)
** Adapted to latest TiddlyWiki 2.2 Beta importTiddlyWiki API (introduced with changeset 2004). TiddlyWiki 2.2 Beta builds prior to changeset 2004 are no longer supported (but TiddlyWiki 2.1 and earlier, of cause)
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features:
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen)
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features:
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs:
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features:
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version
!Code
***/
//{{{
//============================================================================
//============================================================================
// ForEachTiddlerPlugin
//============================================================================
//============================================================================
// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {
if (!window.abego) window.abego = {};
version.extensions.ForEachTiddlerPlugin = {
major: 1, minor: 0, revision: 8,
date: new Date(2007,3,12),
source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};
// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
TiddlyWiki.prototype.forEachTiddler = function(callback) {
for(var t in this.tiddlers) {
callback.call(this,t,this.tiddlers[t]);
}
};
}
//============================================================================
// forEachTiddler Macro
//============================================================================
version.extensions.forEachTiddler = {
major: 1, minor: 0, revision: 8, date: new Date(2007,3,12), provider: "http://tiddlywiki.abego-software.de"};
// ---------------------------------------------------------------------------
// Configurations and constants
// ---------------------------------------------------------------------------
config.macros.forEachTiddler = {
// Standard Properties
label: "forEachTiddler",
prompt: "Perform actions on a (sorted) selection of tiddlers",
// actions
actions: {
addToList: {},
write: {}
}
};
// ---------------------------------------------------------------------------
// The forEachTiddler Macro Handler
// ---------------------------------------------------------------------------
config.macros.forEachTiddler.getContainingTiddler = function(e) {
while(e && !hasClass(e,"tiddler"))
e = e.parentNode;
var title = e ? e.getAttribute("tiddler") : null;
return title ? store.getTiddler(title) : null;
};
config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);
if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
// --- Parsing ------------------------------------------
var i = 0; // index running over the params
// Parse the "in" clause
var tiddlyWikiPath = undefined;
if ((i < params.length) && params[i] == "in") {
i++;
if (i >= params.length) {
this.handleError(place, "TiddlyWiki path expected behind 'in'.");
return;
}
tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the where clause
var whereClause ="true";
if ((i < params.length) && params[i] == "where") {
i++;
whereClause = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the sort stuff
var sortClause = null;
var sortAscending = true;
if ((i < params.length) && params[i] == "sortBy") {
i++;
if (i >= params.length) {
this.handleError(place, "sortClause missing behind 'sortBy'.");
return;
}
sortClause = this.paramEncode(params[i]);
i++;
if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
sortAscending = params[i] == "ascending";
i++;
}
}
// Parse the script
var scriptText = null;
if ((i < params.length) && params[i] == "script") {
i++;
scriptText = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the action.
// When we are already at the end use the default action
var actionName = "addToList";
if (i < params.length) {
if (!config.macros.forEachTiddler.actions[params[i]]) {
this.handleError(place, "Unknown action '"+params[i]+"'.");
return;
} else {
actionName = params[i];
i++;
}
}
// Get the action parameter
// (the parsing is done inside the individual action implementation.)
var actionParameter = params.slice(i);
// --- Processing ------------------------------------------
try {
this.performMacro({
place: place,
inTiddler: tiddler,
whereClause: whereClause,
sortClause: sortClause,
sortAscending: sortAscending,
actionName: actionName,
actionParameter: actionParameter,
scriptText: scriptText,
tiddlyWikiPath: tiddlyWikiPath});
} catch (e) {
this.handleError(place, e);
}
};
// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {
var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);
var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
context["tiddlyWiki"] = tiddlyWiki;
// Get the tiddlers, as defined by the whereClause
var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
context["tiddlers"] = tiddlers;
// Sort the tiddlers, when sorting is required.
if (parameter.sortClause) {
this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
}
return {tiddlers: tiddlers, context: context};
};
// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
return this.getTiddlersAndContext(parameter).tiddlers;
};
// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
// The following properties are supported:
//
// place
// whereClause
// sortClause
// sortAscending
// actionName
// actionParameter
// scriptText
// tiddlyWikiPath
//
// All properties are optional.
// For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
var tiddlersAndContext = this.getTiddlersAndContext(parameter);
// Perform the action
var actionName = parameter.actionName ? parameter.actionName : "addToList";
var action = config.macros.forEachTiddler.actions[actionName];
if (!action) {
this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
return;
}
var actionHandler = action.handler;
actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};
// ---------------------------------------------------------------------------
// The actions
// ---------------------------------------------------------------------------
// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
return;
}
// Perform the action.
var list = document.createElement("ul");
place.appendChild(list);
for (var i = 0; i < tiddlers.length; i++) {
var tiddler = tiddlers[i];
var listItem = document.createElement("li");
list.appendChild(listItem);
createTiddlyLink(listItem, tiddler.title, true);
}
};
abego.parseNamedParameter = function(name, parameter, i) {
var beginExpression = null;
if ((i < parameter.length) && parameter[i] == name) {
i++;
if (i >= parameter.length) {
throw "Missing text behind '%0'".format([name]);
}
return config.macros.forEachTiddler.paramEncode(parameter[i]);
}
return null;
}
// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
if (p >= parameter.length) {
this.handleError(place, "Missing expression behind 'write'.");
return;
}
var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
// Parse the "begin" option
var beginExpression = abego.parseNamedParameter("begin", parameter, p);
if (beginExpression !== null)
p += 2;
var endExpression = abego.parseNamedParameter("end", parameter, p);
if (endExpression !== null)
p += 2;
var noneExpression = abego.parseNamedParameter("none", parameter, p);
if (noneExpression !== null)
p += 2;
// Parse the "toFile" option
var filename = null;
var lineSeparator = undefined;
if ((p < parameter.length) && parameter[p] == "toFile") {
p++;
if (p >= parameter.length) {
this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
return;
}
filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
p++;
if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
p++;
if (p >= parameter.length) {
this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
return;
}
lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
}
}
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
return;
}
// Perform the action.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
var count = tiddlers.length;
var text = "";
if (count > 0 && beginExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
for (var i = 0; i < count; i++) {
var tiddler = tiddlers[i];
text += func(tiddler, context, count, i);
}
if (count > 0 && endExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);
if (count == 0 && noneExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
if (filename) {
if (lineSeparator !== undefined) {
lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
text = text.replace(/\n/mg,lineSeparator);
}
saveFile(filename, convertUnicodeToUTF8(text));
} else {
var wrapper = createTiddlyElement(place, "span");
wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
}
};
// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------
// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
return {
place : placeParam,
whereClause : whereClauseParam,
sortClause : sortClauseParam,
sortAscending : sortAscendingParam,
script : scriptText,
actionName : actionNameParam,
actionParameter : actionParameterParam,
tiddlyWikiPath : tiddlyWikiPathParam,
inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
};
};
// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
if (!idPrefix) {
idPrefix = "store";
}
var lenPrefix = idPrefix.length;
// Read the content of the given file
var content = loadFile(this.getLocalPath(path));
if(content === null) {
throw "TiddlyWiki '"+path+"' not found.";
}
var tiddlyWiki = new TiddlyWiki();
// Starting with TW 2.2 there is a helper function to import the tiddlers
if (tiddlyWiki.importTiddlyWiki) {
if (!tiddlyWiki.importTiddlyWiki(content))
throw "File '"+path+"' is not a TiddlyWiki.";
tiddlyWiki.dirty = false;
return tiddlyWiki;
}
// The legacy code, for TW < 2.2
// Locate the storeArea div's
var posOpeningDiv = content.indexOf(startSaveArea);
var posClosingDiv = content.lastIndexOf(endSaveArea);
if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
throw "File '"+path+"' is not a TiddlyWiki.";
}
var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
// Create a "div" element that contains the storage text
var myStorageDiv = document.createElement("div");
myStorageDiv.innerHTML = storageText;
myStorageDiv.normalize();
// Create all tiddlers in a new TiddlyWiki
// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
var store = myStorageDiv.childNodes;
for(var t = 0; t < store.length; t++) {
var e = store[t];
var title = null;
if(e.getAttribute)
title = e.getAttribute("tiddler");
if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
title = e.id.substr(lenPrefix);
if(title && title !== "") {
var tiddler = tiddlyWiki.createTiddler(title);
tiddler.loadFromDiv(e,title);
}
}
tiddlyWiki.dirty = false;
return tiddlyWiki;
};
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
//
// (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
var script = context["script"];
var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
var fullText = (script ? script+";" : "")+functionText+";theFunction;";
return eval(fullText);
};
// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
var result = [];
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
tiddlyWiki.forEachTiddler(function(title,tiddler) {
if (func(tiddler, context, undefined, undefined)) {
result.push(tiddler);
}
});
return result;
};
// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
var message = "Extra parameter behind '"+actionName+"':";
for (var i = firstUnusedIndex; i < parameter.length; i++) {
message += " "+parameter[i];
}
this.handleError(place, message);
};
// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? -1
: +1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? +1
: -1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
// To avoid evaluating the sortClause whenever two items are compared
// we pre-calculate the sortValue for every item in the array and store it in a
// temporary property ("forEachTiddlerSortValue") of the tiddlers.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
var count = tiddlers.length;
var i;
for (i = 0; i < count; i++) {
var tiddler = tiddlers[i];
tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
}
// Do the sorting
tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);
// Delete the temporary property that holds the sortValue.
for (i = 0; i < tiddlers.length; i++) {
delete tiddlers[i].forEachTiddlerSortValue;
}
};
// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
displayMessage(message);
};
// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
var message ="<<"+macroName;
for (var i = 0; i < params.length; i++) {
message += " "+params[i];
}
message += ">>";
displayMessage(message);
};
// Internal.
//
// Creates an element that holds an error message
//
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
var message = (exception.description) ? exception.description : exception.toString();
return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};
// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
if (place) {
this.createErrorElement(place, exception);
} else {
throw exception;
}
};
// Internal.
//
// Encodes the given string.
//
// Replaces
// "$))" to ">>"
// "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
var reGTGT = new RegExp("\\$\\)\\)","mg");
var reGT = new RegExp("\\$\\)","mg");
return s.replace(reGTGT, ">>").replace(reGT, ">");
};
// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
//
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
// Remove any location part of the URL
var hashPos = originalPath.indexOf("#");
if(hashPos != -1)
originalPath = originalPath.substr(0,hashPos);
// Convert to a native file format assuming
// "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
// "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
// "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
// "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
var localPath;
if(originalPath.charAt(9) == ":") // pc local file
localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
localPath = unescape(originalPath.substr(7));
else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
localPath = unescape(originalPath.substr(5));
else // pc network file
localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");
return localPath;
};
// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
"forEachTiddler");
//============================================================================
// End of forEachTiddler Macro
//============================================================================
//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
var n = prefix.length;
return (this.length >= n) && (this.slice(0, n) == prefix);
};
//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
var n = suffix.length;
return (this.length >= n) && (this.right(n) == suffix);
};
//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
return this.indexOf(substring) >= 0;
};
//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
for (var i = 0; i < this.length; i++) {
if (this[i] == item) {
return i;
}
}
return -1;
};
//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false.
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
return (this.indexOf(item) >= 0);
};
//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
for(var i = 0; i < items.length; i++) {
if (this.contains(items[i])) {
return true;
}
}
return false;
};
//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
//
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null]
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
for(var i = 0; i < items.length; i++) {
if (!this.contains(items[i])) {
return false;
}
}
return true;
};
} // of "install only once"
// Used Globals (for JSLint) ==============
// ... DOM
/*global document */
// ... TiddlyWiki Core
/*global convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink,
displayMessage, endSaveArea, hasClass, loadFile, saveFile,
startSaveArea, store, wikify */
//}}}
/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
/***
|Name|FramedLinksPlugin|
|Source|http://www.TiddlyTools.com/#FramedLinksPlugin|
|Version|1.0.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|createExternalLink|
|Options|##Configuration|
|Description|clicking an external link opens an IFRAME following the link instead of opening a new tab/window|
This plugin causes clicks on external links to be rendered into inline frames (~IFRAMEs) instead of opening them in new browser tabs/windows.
!!!!!Usage
<<<
Just place an external link into your tiddler content using standard TiddlyWiki syntax. When this plugin is enabled (see Configuration), an IFRAME will be created dynamically whenever you click the external link. Clicking on the link again removes the IFRAME. You can hold down a modifier key (shift, control, or alt) while clicking a specific link to ''temporarily'' bypass the plugin-enhanced IFRAME handling and use the standard link handling behavior for that link.
<<<
!!!!!Configuration
<<<
<<option chkFramedLinks>> display external links using inline frames
{{{usage: <<option chkFramedLinks>>}}}
IFRAME size (use CSS units: %, em, px, cm, in):
>width: <<option txtFrameWidth>> height: <<option txtFrameHeight>>
>{{{usage: <<option txtFrameWidth>> <<option txtFrameHeight>>}}}
<<<
!!!!!Examples
<<<
Enable the plugin (see Configuration)... then try these links:
*http://www.TiddlyWiki.com
*http://www.TiddlyTools.com
*http://groups.google.com/group/TiddlyWiki/topics
<<<
!!!!!Revisions
<<<
2007.11.29 [1.0.5] added slider animation and improved CSS handling for IFRAME height/width to maximize display area
2007.11.29 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.FramedLinks= {major: 1, minor: 0, revision: 5, date: new Date(2007,11,29)};
if (config.options.chkFramedLinks==undefined) config.options.chkFramedLinks=true;
if (config.options.txtFrameWidth==undefined) config.options.txtFrameWidth="100%";
if (config.options.txtFrameHeight==undefined) config.options.txtFrameHeight="80%";
window.framedLinks_createExternalLink=createExternalLink;
window.createExternalLink=function(place,url)
{
var link=this.framedLinks_createExternalLink.apply(this,arguments);
link.onclick=function(ev) { var e=ev?ev:window.event;
if (!config.options.chkFramedLinks || e.ctrlKey || e.shiftKey || e.altKey) return; // BYPASS
var p=this.parentNode;
var f=this.nextSibling?this.nextSibling.firstChild:null; // get the IFRAME... maybe...
var w=config.options.txtFrameWidth; if (!w || !w.length) w="100%";
var h=config.options.txtFrameHeight; if (!h || !h.length) h="80%";
if (h.indexOf("%")) h=(findWindowHeight()*h.replace(/%/,"")/100)+"px"; // calc height as % of window
var showing=f && f.nodeName.toUpperCase()=="IFRAME"; // does IFRAME really exist?
var stretchCell=p.nodeName.toUpperCase()=="TD" && w.indexOf("%")!=-1 && w.replace(/%/,"")>=100;
if (!showing) { // create an iframe
link.style.display="block"; // force IFRAME onto line following link
if (stretchCell) { p.setAttribute("savedWidth",p.style.width); p.style.width="100%"; } // adjust TD so IFRAME stretches
var wrapper=createTiddlyElement(null,"span"); // wrapper for slider animation
wrapper.setAttribute("url",this.href); // for async loading of frame after animation completes
var f=createTiddlyElement(wrapper,"iframe"); // create IFRAME
f.style.backgroundColor="#fff"; f.style.width=w; f.style.height=h;
p.insertBefore(wrapper,this.nextSibling);
function loadURL(wrapper) { var f=wrapper.firstChild; var url=wrapper.getAttribute("url");
var d=f.contentDocument?f.contentDocument:(f.contentWindow?f.contentWindow.document:f.document);
d.open(); d.writeln("<html>connecting to "+url+"</html>"); d.close();
try { f.src=url; } // if the iframe can't handle the href
catch(e) { alert(e.description?e.description:e.toString()); } // ... then report the error
window.scrollTo(0,ensureVisible(wrapper));
}
if (!config.options.chkAnimate) loadURL(wrapper);
else {
var morph=new Slider(wrapper,true);
morph.callback=loadURL;
morph.properties.push({style: 'width', start: 0, end: 100, template: '%0%'});
anim.startAnimating(morph);
}
} else { // remove iframe
link.style.display="inline"; // restore link style
if (stretchCell) p.style.width=p.getAttribute("savedWidth"); // restore previous width of TD
if (!config.options.chkAnimate) p.removeChild(f.parentNode);
else {
var morph=new Slider(f.parentNode,false,false,"all");
morph.properties.push({style: 'width', start: 100, end: 0, template: '%0%'});
anim.startAnimating(morph);
}
}
e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); return false;
}
return link;
}
//}}}
<<saveChanges>> - Clic para Salvar seu trabalho em seu HD.
[[Handicrafts|http://www.vetiver.com/g/handicrafts.htm]]
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()
2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)
2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link. Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed). Thanks to Xavier Verges for suggestion and preliminary code.
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.inlineJavascript= {major: 1, minor: 9, revision: 3, date: new Date(2008,6,11)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var src=lookaheadMatch[1];
var label=lookaheadMatch[2];
var tip=lookaheadMatch[3];
var key=lookaheadMatch[4];
var show=lookaheadMatch[5];
var code=lookaheadMatch[6];
if (src) { // load a script library
// make script tag, set src, add to body to execute, then remove for cleanup
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) { // there is script code
if (show) // show inline script code in tiddler output
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) { // create a link to an 'onclick' script
// add a link, define click handler, save code in link (pass 'place'), set link attributes
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
link.code="function _out(place){"+fixup+"\n};_out(this);"
link.tiddler=w.tiddler;
link.onclick=function(){
this.bufferedHTML="";
try{ var r=eval(this.code);
if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
if(this.bufferedHTML.length)
s.innerHTML=this.bufferedHTML;
if((typeof(r)==="string")&&r.length) {
wikify(r,s,null,this.tiddler);
return false;
} else return r!==undefined?r:false;
} catch(e){alert(e.description||e.toString());return false;}
};
link.setAttribute("title",tip||"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
if (key) link.accessKey=key.substr(0,1); // single character only
}
else { // run inline script code
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
var code="function _out(place){"+fixup+"\n};_out(w.output);"
try { var out=eval(code); } catch(e) { out=e.description?e.description:e.toString(); }
if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
}
}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
} )
//}}}
// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
if(limit > 0) text = text.substr(0,limit);
var wikifier = new Wikifier(text,formatter,null,tiddler);
return wikifier.wikifyPlain();
}
//}}}
// // $(...) function: 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=="undefined") { // avoid redefinition
function $() {
var elements=new Array();
for (var i=0; i<arguments.length; i++) {
var element=arguments[i];
if (typeof element=='string') element=document.getElementById(element);
if (arguments.length==1) return element;
elements.push(element);
}
return elements;
}
}
//}}}
Participação no projeto por parte os produtores locais será alem da formação de equipes de pesquisa locais, que desenvolvira seu proprio programa de estudos, com supporte tecnico do equipe do projeto. Inclusão neste grupos será voluntario.
Informar elas das tecnicas que existan para conservar, recuperar solo. AS informações seram apresentados usando postilas, videos, palestras publicas e dias do campo (este atividade mais relevante mais tarde no projeto)
Região como solos sujeita a erosão e com historia de practicas de quemadas e aração para lavouras....resultado degradação severa [[quantify]] dos solos e em muitos voçorrocas, grandes, medias e pequenas [[pesquisas comInst. Voçorrocas, UFLA]]...[[Fotos dos Voçorrocas]].
Impactos - erosão dos solos, escoriamentos dos rios, perdo areas produtivas, diminuir infiltração das aguas da chuva, menos recarga das aquiferas...
Mesmo tempo que as areas produtivas são diminuindo e ficando perigrosa por as animais....os agricultores tem dificuldade durante as tempos secas por falta alimentação por seus animais e são usando tecnologias como silo (baseado em milho) que demando mais aração dos solos, e uso de insumos externais.
Tambem precisamos considerar que no longo prazo (pode ser não tão longe - [[declaração do Chiquinho a rspeito as tempos secos]]) os tempos secas pode vem mais severos e extremos...que podem causar prdas economicas extremas [[exemplos desde australia]].
/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0 ($Rev: 2320 $)|
|Date:|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|simon.baird@gmail.com|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second. So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only. Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{
window.getSpecialBackupPath = function(backupPath) {
var MINS = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS = 24 * HOURS;
// comment out the ones you don't want
var modes = [
["YYYY", 365*DAYS], // one per year for ever
["MMM", 31*DAYS], // one per month
["latest",0] // always keep last version. (leave this).
];
var now = new Date();
for (var i=0;i<modes.length;i++) {
// the filename we will try
var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
'$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')
// open the file
try {
if (config.browser.isIE) {
var fsobject = new ActiveXObject("Scripting.FileSystemObject")
var fileExists = fsobject.FileExists(specialBackupPath);
if (fileExists) {
var fileObject = fsobject.GetFile(specialBackupPath);
var modDate = new Date(fileObject.DateLastModified).valueOf();
}
}
else {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(specialBackupPath);
var fileExists = file.exists();
if (fileExists) {
var modDate = file.lastModifiedTime;
}
}
}
catch(e) {
// give up
return backupPath;
}
// expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
// June file on disk that's more than an month old then it must be stale so overwrite
// note that "latest" should be always written because the expiration period is zero (see above)
var expiry = new Date(modDate + modes[i][1]);
if (!fileExists || now > expiry)
return specialBackupPath;
}
}
// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}
//}}}
O sistema tem um formato simples para ligar documentos externos com esta pagina. Simplesmente abrir a parte do projeto relevante, e a dentro a janela do __editar__ escrivir o texto como {{{[[Descrição do Referencia|URL do Referencia]]}}}....quando o parte esta visto normalmente, pessoas vem ler o texto "Descrição do Referencia" que será como um link...clicando nestas palavras abrirá o documento que existe na local do "URL do Referencia".
Nota, como este documento abrirá depende principalmente en qual browser e as configurações dele. En Ruindows, quiem sabe que vai acontecer! En Firefox, documentos do formatos PDF, DOC, HTML normalmente abrirá a dentro este sistema mesmo!!! XLS, PPT (Powerpoint), MM (Fremind ~MindMaps) normalmente abriram en uma janela nova (as vezes Firefox vem pedir seu autorização abrirá eles).
<<forEachTiddler
where 'tiddler.tags.contains("Projeto")'
sortBy
'tiddler.title'>>
Story.prototype.tiddlerHistory= [];
Story.prototype.maxTiddlers = 1;
Story.prototype.closedHistory=[];
Story.prototype.closedHistoryMax = 10;
Array.prototype.moveToEnd = function(item)
{
this.remove(item);
this.push(item);
}
Story.prototype.old_history_displayTiddler = Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,title,template,animate,slowly)
{
this.tiddlerHistory.moveToEnd(title);
this.closedHistory.remove(title);
var closeCount = this.tiddlerHistory.length - this.maxTiddlers;
if (closeCount > 0)
{
var count = this.tiddlerHistory.splice (0,closeCount);
for (var i=0; i<count.length;i++)
{
story.closeTiddler(count[i],false);
}
}
story.old_history_displayTiddler(null,title,template,animate,slowly);
}
Story.prototype.old_history_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler = function(title,animate,slowly)
{
this.tiddlerHistory.remove(title);
this.closedHistory.remove(title);
this.closedHistory.unshift(title);
story.old_history_closeTiddler.apply(this,arguments);
}
Story.prototype.displayTiddlers = function(srcElement,titles,template,animate,slowly)
{
for(var t = titles.length-1;t>=0;t--)
{
this.tiddlerHistory.moveToEnd(titles[t]);
this.closedHistory.remove(titles[t]);
this.old_history_displayTiddler(srcElement,titles[t],template,animate,slowly);
}
}
config.commands.history={
text: "history",
tooltip: "re-open a closed tiddler"};
config.commands.history.handler = function(event,src,title)
{
var popup = Popup.create(src);
if(popup)
{
if (!story.closedHistory.length)
createTiddlyText(popup,"No history");
else
{
var c = Math.min(story.closedHistory.length,story.closedHistoryMax);
for (i=0; i<c;i++ )
{
createTiddlyLink(createTiddlyElement(popup,"li"),story.closedHistory[i],true);
}
}
}
Popup.show(popup,false);
event.cancelBubble = true;
if (event.stopPropagation) event.stopPropagation();
return false;
}
[[Como Iniciar]]
----
[[O Projeto|Projeto]]
----
<<popup Sumario "Um texto breve que apresenta seu ideia em uma maniera prcisa e que capta a atenção das pessoas. Tentar explicar (brevemente) que voçe quer fazer, por quiem, onde, quando e porque!! [[Edit|Sumario]]">>
<<popup Parceiros "Brevemente lista as organizações que são ou podem ser parçiers por o projeto - indicar se elas foiram contatados ou não. No caso que IPCP-MA não esta a proponente principal do Projeto...indicar quiem esta o Proponente...e qual será a responsibilidade do IPCP-MA. [[Edit|Parceiros]]">>
<<popup Objetivos "Definir o objetivo geral, e uma lista de objetivos específicos. Os objetivos devem ser claros e alcançáveis. [[Edit|Objetivos]]">>
<<popup Justificativa "Aqui explicamos PORQUÊ o projeto é importante. Quais são os desafios, as lacunas que o projeto vai trabalhar.[[Edit|Justificativa]]">>
<<popup Contexto "Contextualizar os aspectos ecológicos do bioma, bacia, microbacia (se for o caso), da região de forma geral, do município e da área específica onde será desenvolvido o projeto. Embora o termo ecológico tenha um conceito amplo, é interessante detalhar de forma separada os diversos aspectos, ou seja, ambiente, economia, sócio-cultural e as condições climáticas, etc. Fazer um resumo! [[Edit|Contexto]]">>
<<popup [[População alvo]] "Quem são as pessoas que serão beneficiadas por este projeto - direta e indiretamente.[[Edit|População alvo]]">>
<<popup Metas "Listar as metas do projeto. As Metas devem considerar e estar ligadas com os objetivos e com o orçamento. A meta definirá um programa ou sequência de ações, deve ser mensurável e temporal.[[Edit|Metas]]">>
<<popup Atividades "Cada Meta, terá várias atividades que serão feitas para alcansar a Meta desejada. As Atividades devem explicar o que será feito, quando? por quantas pessoas? e o que será preciso? [[Edit|Atividades]]">>
<<popup [[Plano de Ação]] "O Plano de ação pode constar de uma simples Tabela indicando quando e por quanto tempo cada atividade será feita. Pode incluir os resultados esperados também. [[Edit|Plano de Ação]]">>
<<popup Resultados "Cada meta e cada atividade terá um resultado que planejamos alcançar. Estes resultados devem ser mensuráveis e podem ser quantitativos e qualitativos. [[Edit|Resultados]]">>
<<popup Monitoramento "Durante o projeto, como vamos confirmar continuamente se estamos seguindo o Plan de Açao? [[Edit|Monitoramento]]">>
<<popup Avaliação "As avaliações normalmente são feitas no final dos projetos, no entanto, é importante elaborar um plano de avaliação em prazos menores, como por exemplo, a cada três meses, ou no final de cada atividades ou meta. A avaliação permitirá seguir o plano de trabalho com mais tranquilidade ou se for preciso, mudar se houver necessidade de correções para se chegar aos objetivos propostos.
Tambem podem ser feitas avaliações internas com mais frequência, no caso de projetos de grande porte.
É importante estabelecer parâmetros para sabermos como vamos avaliar o impacto do projeto na área e com a população alvo.[[Edit|Avaliação]]">>
<<popup Orçamento "Fazer uma lista das despesas antecipadamente!!
É importante e facilita fazer o orçamento se este for trabalhado por meta e atividade. Depois pode ser montado um orçamento geral.
Também é legal pensar em ter folgo no orçamento, ou seja, lembrar que podem ocorrer imprevistos não sendo interessante trabalhar com um orçamento tão apertado. Por exemplo, se uma das atividades for realizar duas trÊs visitas para levantamento de dados, é bom colocar um ou dois dias a mais e assim fazer para combustível, locação de automóvel, diárias.....
Considerar despesas com encargos sociais, não somente do empregado e principalmente do empregador, no caso, o IPCP-MA, caso haja contratações. Além dos encargos tem outras despesas que normalmente não são consideradas como despesas bancárias, etc....
Outro aspecto importante, lembrar que se for feito uma tomada de preços para se elaborar o orçamento, tem que se considerar o tempo que levará para o projeto ser aprovado, diferenças que podem ocorrer nos valores orçados previamente....[[Edit|Orçamento]]">>
<<popup Equipe "Quais serão os profissionais de que o projeto precisa? Qual o perfil? Pode ser colocado nome de profissionais específicos para as funções solicitadas ou pode ser listado somente as competencias necessárias para o projeto.
É importante a Equipe do ~IPCP-MA ter pronto o currículo de cada profissional e modelos de Termos de Refências relativas à competência da Equipe Técnica do ~IPCP-MA.[[Edit|Equipe]]">>
<<popup Equipamentos "É importante o IPCP-MA ter uma Lista dos equipamentos, com dados técnicos, marca e valores dos equipamentos existentes no IPCP-MA e quais deles podem entrar como contrapartida. Antes de colocar tais equipamentos como contrapartida, é importante saber se o mesmo esta sendo utilizado por outro projeto e qual o tempo de disponibilidade.
No caso de não existir no IPCP-MA os equipamentos necessários à realização dos projetos, é importante fazer uma lista contendo também as informações citadas acima.
Notar que os equipamentos que serão comprados por parte de fundos de projetos, e aqueles do IPCP-MA ou de seus parceiros serão disponibilizados durante o projeto.
É importante prever recursos para manutenção de equipamentos, reparos, etc[[Edit|Equipamentos]]">>
<<popup ContraPartida "Listar quais os recursos de que o IPCP-MA dispõe, seus parceiros ou que a comunidade local pode contribuir no projeto.
Normalmente isto incluirá pessoal administrativo, uso de equipamentos, uso de veiculos..... Normalmente estes recursos e usos devem ser avaliados, ou seja, orçado valor da hora de trabalho, uso de máquinas e os valores inclusos no orçamento.
Algumas instituições exigem comprovação da contrapartida, então, é bom colocar somente a contrapartida que se tem certeza e que há possibildiade de se contar.
- Contar só com o que existe de fato![[Edit|ContraPartida]]">>
<<popup Docs_Originais "Os editais que podem fianciar este projeto, as condições, os formularios....[[Edit|Docs_Originais]]">>
<<popup Docs_Supporte "* Documentos e Certidçoes negativos do IPCPMA (or organização proponente), quais devem estar em dia e com cópias autenticadas para possiveis encaminhamentos.
* Documentos relativos à Legislação;
* Documentos de anuência da comunidade onde se pretende realizar o projeto - este documento é uma autorização da comunidade concordando com o projeto.
* Documentos de Termos de Parceria - Estes documentos devem ser agilizados logo no inicio da elaboração do projeto e se negociando com os parceiros e/ou aliados. Pois normalmente passam por um processo burocrático e leva tempo para serem liberados. Dependendo da instituição a liberação é imediata!
* Documentos importantes para a comunidade como Atas de reuniões, mapas, informações relevantes da comunidade ou local.
* Resultados de outros projetos ou atividades que foram ou estão em desenvolvimento
* Levantamentos existentes do local
* Fotos
* Depoimentos.
----
Lembrar de NUNCA mandar os documentos originais para as instituições financiadoras e sim SOMENTE cópias AUTENTICADAS que tÊm o mesmo valor![[Edit|Docs_Supporte]]">>
<<popup Docs_Ref "Os documentos de Referência são relativos à informações bibliográficas, informações levantadas, escrita, falada, citações, gravações, vídeso, mapeamentos, ... tudo que der suporte à elaboração do projeto.'[[Edit|Docs_Ref]]"">>
<<popup Anexos "Outros documentos de suporte não inclusos acima e que podem ser encaminhados com o projeto como por exemplo, mapas da região, fotos aéreas, levantamentos feitos pela comunidade, cópia de atas decisórias para elaboração do projeto, listas de nomes, de espéceis florísticios e faunísticos, etc....[[Edit|Anexos]]"">>
----
<<toggleSideBar "" "" hide>>
----
@@font: 8pt Times; ver 1.2 by ''Skye''
using [[TiddlyWiki|www.tiddlywiki.com]]@@
As vezes não será posivel incluir informação diritament como texto neste sistema... exemplos provaveis incluirá fotos, mapas, documentos em PDF, orçamentos feito en Excel. Este sistema pode abrirá estes documendo como [[documentos externas|Ligando Documentos Externos]] se eles exsten no Internet. Mais como podemos mandar ests documentos a Internet...colocar eles onde???
* servicios de amanazamento publico - fotos podem será depositados com servicos como [[Flickr|www.flickr.com]] e simplesmente inserir a URL no parte aqui. Videos podem ser depositados com [[YouTube|www.YouTube.com]]...DOCS and XLS com Google Docs, ou......existe milares de tal servicios...voçe escolhe!
* pessoas familiar com FTP podem upload documentos ate a pasta dos Projetos no servidor ''ipcp.org.br'', usando [[estes detalhes|FTP Configurações]] - se voçe esta pnsando "Que significa FTP....pula por opção #3!!!
* me mandar um email com seus documentos anexados e com um pedido para depositar eles na pasta Projetos. Quando isso fica feito, vou te mandar um email confirmando os ~URLs dos documentos.
Listar as metas do projeto. As Metas devem considerar e estar ligadas com os objetivos e com o orçamento. A meta definirá um programa ou sequência de ações, deve ser mensurável e temporal.
[[ABRIR|As Metas]]
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
[[volta a Metas|Metas]]
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<div class='tagClear'></div>
<!--}}}-->
Mobilização das comunidades in geral e especificamente os proprietarios com desafios de erosão dos solos.
Durante o projeto, como vamos confirmar continuamente se estamos seguindo o [[Plano de Açao]]?
[[ABRIR|Monitoramento]]
/***
|Name|MoveablePanelPlugin|
|Source|http://www.TiddlyTools.com/#MoveablePanelPlugin|
|Documentation|http://www.TiddlyTools.com/#MoveablePanelPluginInfo|
|Version|2.1.2|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|NestedSlidersPlugin|
|Overrides||
|Description|drag/stretch 'floating sliders' and other page elements|
Adds move and size mouse event handling and fold/unfold, and close/dock toolbar command items to any floating slider panel or tiddler element
!!!!!Documentation
>see [[MoveablePanelPluginInfo]]
!!!!!Revisions
<<<
2008.09.11 [2.1.2] corrected caching of transient attribute (use =="true" to convert string to boolean)
|please see [[MoveablePanelPluginInfo]] for additional revision details|
''2006.03.04 [1.0.0]'' Initial public release
<<<
!!!!!Code
***/
//{{{
version.extensions.MoveablePanelPlugin= {major: 2, minor: 1, revision: 2, date: new Date(2008,9,11)};
//}}}
//{{{
config.macros.moveablePanel= {
handler: function(place,macroName,params) {
var p=this.getPanel(place); if (!p) return;
var showfold=true; var showclose=true; var showhover=true;
var noedges=false; var param=null;
while (param=params.shift()) { param=param.toLowerCase();
if (param=="noclose") showclose=false;
if (param=="nofold") showfold=false;
if (param=="nohover") showhover=false;
if (param=="noedges") noedges=true;
}
if (!p.saved) p.saved= { // remember original panel event handlers, size, location, border
mouseover: p.onmouseover, mouseout: p.onmouseout, dblclick: p.ondblclick,
top: p.style.top, left: p.style.left, width: p.style.width, height: p.style.height,
position: p.style.position, border: p.style.border, title: p.title,
transient: p.getAttribute("transient")=="true"
};
// create control menu items
var html='<div class="toolbar" style="display:none;position:absolute;';
html+=(hasClass(p,"floatingPanel")?'right:1em;top:1em;':'right:.5em;top:-1em;')+'">';
var s='border:1px solid #666;background:#ccc;color:#666 !important;padding:0px .25em;-moz-border-radius:0px';
if (showfold)
html+='<a href="javascript:;" title="FOLD: reduce panel size" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.foldPanel(this,event)">−</a>';
if (showhover)
html+='<a href="javascript:;" title="SCROLLING: panel moves with page" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.hoverPanel(this,event)">=</a>';
if (showclose) {
if (hasClass(p,"floatingPanel"))
html+='<a href="javascript:;" title="CLOSE: hide panel and reset size/position" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.closePanel(this,event)">X</a>';
else
html+='<a href="javascript:;" title="DOCK: reset panel size/position" style="'+s+'"'
+' onclick="return config.macros.moveablePanel.dockPanel(this,event)">√</a>';
}
html+='</div>';
p.menudiv=createTiddlyElement(place,"span");
p.menudiv.innerHTML=html;
// init mouse handling and tooltip
p.setAttribute("noedges",noedges?"true":"false"); // for alternative mouseover/drag handling
p.onmousemove=function(event) { return config.macros.moveablePanel.setCursorPanel(this,event); };
p.onmousedown=function(event) { return config.macros.moveablePanel.moveOrSizePanel(this,event); };
p.ondblclick=function(event) { // DOUBLE-CLICK = DOCK
if (p.getAttribute("noedges")=="true" && !((isTop&&!isLeft&&!isRight)||(isBottom&&isRight))) // not over grab handles
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
if (!config.macros.moveablePanel.isEdge(this,event)) // not over edge
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
if (config.macros.moveablePanel.dockPanel(this,event)) // not docking
return p.saved.dblclick?p.saved.dblclick.apply(this,arguments):true;
else return false; // docked... done.
};
p.onmouseover=function(event) { // MOUSEOVER = SHOW MENU ITEMS
if(addClass instanceof Function)
addClass(this,"selected"); // so toolbar-classed items will display
if (this.getAttribute("undocked")=="true"||hasClass(this,"floatingPanel"))
this.menudiv.firstChild.style.display="inline";
if (this.saved.mouseover) return this.saved.mouseover.apply(this,arguments);
};
p.onmouseout=function(event) { // MOUSEOUT = HIDE MENU ITEMS
if(removeClass instanceof Function)
removeClass(this,"selected"); // so toolbar-classed items are hidden again
if (this.menudiv) this.menudiv.firstChild.style.display="none";
if (this.saved.mouseout) return this.saved.mouseout.apply(this,arguments);
};
// FIXUP for "floating sliders" (see NestedSlidersPlugin)
// prevent automatic trigger of adjustSliderPos() for mouse events on floating slider panel/button
// and make sure that slider button causes moveable panel to be close AND docked (if needed)
if (hasClass(p,"floatingPanel") && p.button) {
p.saved.mouseover=null; // discard previous mouse event handlers to prevent
p.saved.mouseout=null; // automatic triggering of adjustSliderPos() for mouseovers
p.button.onmouseover=null; // on slider panel and slider button
if(!p.button.saved_onclick) p.button.saved_onclick=p.button.onclick; // HIJACK SLIDER BUTTON
p.button.onclick=function(ev){
config.macros.moveablePanel.dockPanel(this.sliderPanel,ev); // DOCK PANEL FIRST...
return this.saved_onclick.apply(this,arguments); // ...THEN CLOSE IT
}
}
},
processed: function(event) {
event.cancelBubble=true; if (event.stopPropagation) event.stopPropagation(); return false;
},
getPanel: function(place) {
// find a floating panel or use containing element
var p=place; while (p && !(hasClass(p,"floatingPanel")||p.saved)) p=p.parentNode;
return p||place;
},
isEdge: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return false;
var left=findPosX(p); var top=findPosY(p);
var width=p.offsetWidth; var height=p.offsetHeight;
var x=!config.browser.isIE?event.pageX:event.clientX;
var y=!config.browser.isIE?event.pageY:event.clientY;
if (x<left||x>=left+width||y<top||y>=top+height) return false;
var edgeWidth=10; var edgeHeight=10;
var isTop=(y-top<edgeHeight); var isLeft=(x-left<edgeWidth);
var isBottom=(top+height-y<edgeHeight); var isRight=(left+width-x<edgeWidth);
return isTop||isLeft||isBottom||isRight;
},
dockPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (p.folded) this.foldPanel(p.foldButton,event);
if (p.hover) this.hoverPanel(p.hoverButton,event);
if (p.saved) {
p.style.top=p.saved.top; p.style.left=p.saved.left;
p.style.width=p.saved.width; p.style.height=p.saved.height;
p.style.position=p.saved.position;
if (p.saved.transient) p.setAttribute("transient","true");
p.setAttribute("undocked","");
}
if (hasClass(p,"floatingPanel") && window.adjustSliderPos) // see NestedSlidersPlugin
window.adjustSliderPos(p.parentNode,p.button,p);
return this.processed(event);
},
closePanel: function(place,event) {
var p=this.getPanel(place); if (!p) return true;
// if a slider button exists close the panel by calling slider button handler
if (p.button) { p.button.focus(); onClickNestedSlider({target:p.button}); }
return this.dockPanel(place,event); // and then reset panel state
},
foldPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (!p.foldButton) p.foldButton=place;
if (p.folded) {
p.style.height=p.folded_savedheight;
p.style.overflow=p.folded_savedoverflow;
if (!hasClass(p,"floatingPanel")) p.menudiv.firstChild.style.top="-1em";
} else {
p.folded_savedheight=p.style.height; p.style.height="1em";
p.folded_savedoverflow=p.style.overflow; p.style.overflow="hidden";
if (!hasClass(p,"floatingPanel")) p.menudiv.firstChild.style.top="1em";
}
p.folded=!p.folded;
place.innerHTML=p.folded?"+":"−";
place.title=p.folded?"UNFOLD: restore panel size":"FOLD: reduce panel size";
return this.processed(event);
},
hoverPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (!p.hoverButton) p.hoverButton=place;
if (p.hover) {
p.style.position=p.hover_savedposition;
if (p.getAttribute("undocked")!="true" && p.saved && p.saved.transient)
p.setAttribute("transient","true"); // see NestedSlidersPlugin
} else {
p.hover_savedposition=p.style.position; p.style.position="fixed";
if (p.saved.transient) p.setAttribute("transient","false");
}
p.hover=!p.hover;
place.innerHTML=p.hover?"^":"=";
place.title=p.hover?"HOVERING: panel stays in view when scrolling page":"SCROLLING: panel moves with page";
return this.processed(event);
},
setCursorPanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
var left=findPosX(p); var top=findPosY(p);
var width=p.offsetWidth; var height=p.offsetHeight;
var x=!config.browser.isIE?event.pageX:event.clientX;
var y=!config.browser.isIE?event.pageY:event.clientY;
if (x<left||x>=left+width||y<top||y>=top+height) return true; // not inside panel, let mousedown bubble through
var edgeWidth=10; var edgeHeight=10;
var isTop=(y-top<edgeHeight); var isLeft=(x-left<edgeWidth);
var isBottom=(top+height-y<edgeHeight); var isRight=(left+width-x<edgeWidth);
p.style.cursor="auto";
p.title=p.saved?p.saved.title:"";
if (!(isTop||isLeft||isBottom||isRight)) return true;
if (p.getAttribute("noedges")=="true") {
if (isTop&&!isLeft&&!isRight) {
p.style.cursor="move";
p.title="MOVE: drag top panel edge"
+(p.getAttribute("undocked")=="true"?", DOCK: double-click":"");
} else if (isBottom && isRight) {
p.style.cursor="se-resize";
p.title="RESIZE: drag lower right corner"
+(p.getAttribute("undocked")=="true"?", DOCK: double-click":"");
}
} else {
p.style.cursor=!event.shiftKey?"move":((isTop?'n':(isBottom?'s':''))+(isLeft?'w':(isRight?'e':''))+'-resize');
p.title="MOVE: drag panel edge, RESIZE: hold shift key"
+(p.getAttribute("undocked")=="true"?", DOCK: double-click":"");
}
return true; // let mouseover event bubble through
},
moveOrSizePanel: function(place,event) {
if (!event) var event=window.event;
var p=this.getPanel(place); if (!p) return true;
if (!this.isEdge(place,event)) return true;
if (!p.saved) p.saved= { // remember original panel event handlers, size, location, border
mouseover: p.onmouseover, mouseout: p.onmouseout, dblclick: p.ondblclick,
top: p.style.top, left: p.style.left, width: p.style.width, height: p.style.height,
position: p.style.position, border: p.style.border,
transient: p.getAttribute("transient")=="true"
};
var left=findPosX(p); var top=findPosY(p);
var width=p.offsetWidth; var height=p.offsetHeight;
var x=!config.browser.isIE?event.pageX:event.clientX;
var y=!config.browser.isIE?event.pageY:event.clientY;
var edgeWidth=10; var edgeHeight=10;
var isTop=(y-top<edgeHeight); var isLeft=(x-left<edgeWidth);
var isBottom=(top+height-y<edgeHeight); var isRight=(left+width-x<edgeWidth);
var sizing=event.shiftKey; // remember this for use during mousemove tracking
if (p.getAttribute("noedges")=="true") {
if (!((isTop&&!isLeft&&!isRight)||(isBottom&&isRight))) return true; // not over grab handle
var sizing=isBottom&&isRight;
}
var adjustLeft=0; var adjustTop=0;
// adjustment for relative container
var pp=p.parentNode; while (pp && !(pp.style&&pp.style.position=='relative')) pp=pp.parentNode;
if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }
// adjustment for floating slider container
var pp=p.parentNode; while (pp && !hasClass(pp,"floatingPanel")) pp=pp.parentNode;
if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }
// start tracking mousemove events
this.activepanel=p;
var target=p; // if 'capture' handling not supported, track within panel only
if (document.body.setCapture) { document.body.setCapture(); var target=document.body; } // IE
if (window.captureEvents) { window.captureEvents(Event.MouseMove|Event.MouseUp,true); var target=window; } // moz
if (target.onmousemove!=undefined) target.saved_mousemove=target.onmousemove;
target.onmousemove=function(e){
if (!e) var e=window.event;
var p=config.macros.moveablePanel.activepanel;
if (!p) { this.onmousemove=this.saved_mousemove?this.saved_mousemove:null; return; }
// PROBLEM: p.offsetWidth and p.offsetHeight do not seem to account for padding or borders
// WORKAROUND: subtract padding and border (in px) when calculating new panel width and height
// TBD: get these values from p.style... convert to px as needed.
var paddingWidth=10.6667; var paddingHeight=10.6667;
var borderWidth=1; var borderHeight=1;
var adjustWidth=-(paddingWidth*2+borderWidth*2);
var adjustHeight=-(paddingHeight*2+borderHeight*2);
if (p.style.position!="absolute"&&p.style.position!="fixed") {
// convert static/relative panel to movable absolute panel
p.style.position="absolute";
p.style.left=left+"px"; p.style.top=top+"px";
p.style.width=(width+adjustWidth)+"px"; p.style.top=(height+adjustHeight)+"px";
}
var newX=!config.browser.isIE?e.pageX:e.clientX;
var newY=!config.browser.isIE?e.pageY:e.clientY;
if (sizing) { // resize panel
// don't let panel get smaller than edge "grab" zones
var minWidth=edgeWidth*2-adjustWidth;
var minHeight=edgeHeight*2-adjustHeight;
if (p.folded) this.foldPanel(p.foldButton,e); // make sure panel is unfolded
if (isBottom) var newHeight=height+newY-y+1;
if (isTop) var newHeight=height-newY+y+1;
if (isLeft) var newWidth=width-newX+x+1;
if (isRight) var newWidth=width+newX-x+1;
if (isLeft||isRight) p.style.width=(newWidth>minWidth?newWidth:minWidth)+adjustWidth+"px";
if (isLeft) p.style.left=left-adjustLeft+newX-x+1+"px";
if (isTop||isBottom) p.style.height=(newHeight>minHeight?newHeight:minHeight)+adjustHeight+"px";
if (isTop) p.style.top=top-adjustTop+newY-y+1+"px";
p.setAttribute("undocked","true");
} else { // move panel
p.style.top=top-adjustTop+newY-y+1+"px";
p.style.left=left-adjustLeft+newX-x+1+"px";
if (p.saved && p.saved.transient) p.setAttribute("transient","false");
p.setAttribute("undocked","true");
}
var status=sizing?("size: "+p.style.width+","+p.style.height):("pos: "+p.style.left+","+p.style.top);
window.status=status.replace(/(\.[0-9]+)|px/g,""); // remove decimals and "px"
return config.macros.moveablePanel.processed(e);
};
// stop tracking mousemove events
if (target.onmouseup!=undefined) target.saved_mouseup=target.onmouseup;
target.onmouseup=function(e){
if (!e) var e=window.event;
if (this.releaseCapture) this.releaseCapture(); // IE
if (this.releaseEvents) this.releaseEvents(Event.MouseMove|Event.MouseUp); // moz
this.onmousemove=this.saved_mousemove?this.saved_mousemove:null;
this.onmouseup=this.saved_mouseup?this.saved_mouseup:null;
config.macros.moveablePanel.activepanel=null;
window.status="";
return config.macros.moveablePanel.processed(e);
};
return this.processed(event); // mousedown handled
}
};
//}}}
/***
|Name|NestedSlidersPlugin|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.06.07 - 2.4.5 in 'onmouseover' handler for 'open on hover' slider buttons,<br>use call() method when invoking document.onclick function (avoids error in IE)
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release. Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.nestedSliders = {major: 2, minor: 4, revision: 5, date: new Date(2008,6,7)};
// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE
// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");
config.formatters.push( {
name: "nestedSliders",
match: "\\n?\\+{3}",
terminator: "\\s*\\={3}\\n?",
lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
handler: function(w)
{
lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
var defopen=lookaheadMatch[1];
var cookiename=lookaheadMatch[2];
var header=lookaheadMatch[3];
var panelwidth=lookaheadMatch[4];
var transient=lookaheadMatch[5];
var hover=lookaheadMatch[6];
var buttonClass=lookaheadMatch[7];
var label=lookaheadMatch[8];
var openlabel=lookaheadMatch[9];
var panelID=lookaheadMatch[10];
var blockquote=lookaheadMatch[11];
var deferred=lookaheadMatch[12];
// location for rendering button and panel
var place=w.output;
// default to closed, no cookie, no accesskey, no alternate text/tip
var show="none"; var cookie=""; var key="";
var closedtext=">"; var closedtip="";
var openedtext="<"; var openedtip="";
// extra "+", default to open
if (defopen) show="block";
// cookie, use saved open/closed state
if (cookiename) {
cookie=cookiename.trim().slice(1,-1);
cookie="chkSlider"+cookie;
if (config.options[cookie]==undefined)
{ config.options[cookie] = (show=="block") }
show=config.options[cookie]?"block":"none";
}
// parse label/tooltip/accesskey: [label=X|tooltip]
if (label) {
var parts=label.trim().slice(1,-1).split("|");
closedtext=parts.shift();
if (closedtext.substr(closedtext.length-2,1)=="=")
{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
openedtext=closedtext;
if (parts.length) closedtip=openedtip=parts.join("|");
else { closedtip="show "+closedtext; openedtip="hide "+closedtext; }
}
// parse alternate label/tooltip: [label|tooltip]
if (openlabel) {
var parts=openlabel.trim().slice(1,-1).split("|");
openedtext=parts.shift();
if (parts.length) openedtip=parts.join("|");
else openedtip="hide "+openedtext;
}
var title=show=='block'?openedtext:closedtext;
var tooltip=show=='block'?openedtip:closedtip;
// create the button
if (header) { // use "Hn" header format instead of button/link
var lvl=(header.length>5)?5:header.length;
var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
btn.onclick=onClickNestedSlider;
btn.setAttribute("href","javascript:;");
btn.setAttribute("title",tooltip);
}
else
var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
btn.innerHTML=title; // enables use of HTML entities in label
// set extra button attributes
btn.setAttribute("closedtext",closedtext);
btn.setAttribute("closedtip",closedtip);
btn.setAttribute("openedtext",openedtext);
btn.setAttribute("openedtip",openedtip);
btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
btn.defOpen=defopen!=null; // save default open/closed state (boolean)
btn.keyparam=key; // save the access key letter ("" if none)
if (key.length) {
btn.setAttribute("accessKey",key); // init access key
btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
}
btn.setAttribute("hover",hover?"true":"false");
btn.onmouseover=function(ev) {
// optional 'open on hover' handling
if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
document.onclick.call(document,ev); // close transients
onClickNestedSlider(ev); // open this slider
}
// mouseover on button aligns floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
}
// create slider panel
var panelClass=panelwidth?"floatingPanel":"sliderPanel";
if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
panel.button = btn; // so the slider panel know which button it belongs to
btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
panel.setAttribute("transient",transient=="*"?"true":"false");
panel.style.display = show;
panel.style.width=panel.defaultPanelWidth;
panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }
// render slider (or defer until shown)
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
if ((show=="block")||!deferred) {
// render now if panel is supposed to be shown or NOT deferred rendering
w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
// align floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
}
else {
var src = w.source.substr(w.nextMatch);
var endpos=findMatchingDelimiter(src,"+++","===");
panel.setAttribute("raw",src.substr(0,endpos));
panel.setAttribute("blockquote",blockquote?"true":"false");
panel.setAttribute("rendered","false");
w.nextMatch += endpos+3;
if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
}
}
}
}
)
function findMatchingDelimiter(src,starttext,endtext) {
var startpos = 0;
var endpos = src.indexOf(endtext);
// check for nested delimiters
while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
// count number of nested 'starts'
var startcount=0;
var temp = src.substring(startpos,endpos-1);
var pos=temp.indexOf(starttext);
while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
// set up to check for additional 'starts' after adjusting endpos
startpos=endpos+endtext.length;
// find endpos for corresponding number of matching 'ends'
while (startcount && endpos!=-1) {
endpos = src.indexOf(endtext,endpos+endtext.length);
startcount--;
}
}
return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
if (!theTarget) return false;
var theSlider = theTarget.sliderPanel;
var isOpen = theSlider.style.display!="none";
// toggle label
theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
// toggle tooltip
theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));
// deferred rendering (if needed)
if (theSlider.getAttribute("rendered")=="false") {
var place=theSlider;
if (theSlider.getAttribute("blockquote")=="true")
place=createTiddlyElement(place,"blockquote");
wikify(theSlider.getAttribute("raw"),place);
theSlider.setAttribute("rendered","true");
}
// show/hide the slider
if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
else
theSlider.style.display = isOpen ? "none" : "block";
// reset to default width (might have been changed via plugin code)
theSlider.style.width=theSlider.defaultPanelWidth;
// align floater panel position with target button
if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);
// if showing panel, set focus to first 'focus-able' element in panel
if (theSlider.style.display!="none") {
var ctrls=theSlider.getElementsByTagName("*");
for (var c=0; c<ctrls.length; c++) {
var t=ctrls[c].tagName.toLowerCase();
if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
{ ctrls[c].focus(); break; }
}
}
var cookie=theTarget.sliderCookie;
if (cookie && cookie.length) {
config.options[cookie]=!isOpen;
if (config.options[cookie]!=theTarget.defOpen)
saveOptionCookie(cookie);
else { // remove cookie if slider is in default display state
var ex=new Date(); ex.setTime(ex.getTime()-1000);
document.cookie = cookie+"=novalue; path=/; expires="+ex.toGMTString();
}
}
// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
// prevent clicks *within* a slider button from being processed by browser
// but allow plain click to bubble up to page background (to close transients, if any)
if (e.shiftKey || theTarget!=resolveTarget(e))
{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
Popup.remove(); // close open popup (if any)
return false;
}
//}}}
//{{{
// click in document background closes transient panels
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);
if (document.nestedSliders_savedOnClick)
var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
// if click was inside a popup... leave transient panels alone
var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
if (p) return retval;
// if click was inside transient panel (or something contained by a transient panel), leave it alone
var p=target; while (p) {
if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
p=p.parentNode;
}
if (p) return retval;
// otherwise, find and close all transient panels...
var all=document.all?document.all:document.getElementsByTagName("DIV");
for (var i=0; i<all.length; i++) {
// if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
// otherwise, if the panel is currently visible, close it by clicking it's button
if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button})
}
return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
if (hasClass(panel,"floatingPanel")) {
var rightEdge=document.body.offsetWidth-1;
var panelWidth=panel.offsetWidth;
var left=0;
var top=btn.offsetHeight;
if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
}
if (place.style.position!="relative") {
var left=findPosX(btn);
var top=findPosY(btn)+btn.offsetHeight;
var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
if (p) { left-=findPosX(p); top-=findPosY(p); }
if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
if (left<0) left=0;
}
panel.style.left=left+"px"; panel.style.top=top+"px";
}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }
// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
Morpher.prototype.coreStop = Morpher.prototype.stop;
Morpher.prototype.stop = function() {
this.coreStop.apply(this,arguments);
var e=this.element;
if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
// adjust panel overflow and position after animation
e.style.overflow = "visible";
if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
}
};
}
//}}}
/***
|Name|NewDocumentPlugin|
|Source|http://www.TiddlyTools.com/#NewDocumentPlugin|
|Documentation|http://www.TiddlyTools.com/#NewDocumentPluginInfo|
|Version|1.8.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|create new TiddlyWiki documents and/or HTML snapshots from your existing document, with just one click|
Use the {{{<<newDocument>>}}} macro to place a "new document" link into your sidebar/mainmenu/any tiddler (wherever you like). Select this command to automatically create a "new.html" document containing a specific set of tagged tiddlers. Optional parameters let you specify an alternate path/filename for the new file, or different tags to match. You can also indicate "ask" for either parameter, which will trigger a prompt for input when the command is selected.
!!!!!Documentation
>see [[NewDocumentPluginInfo]]
!!!!!Revisions
<<<
2008.04.20 [1.8.0] added support for 'noCSS' and 'viewer' params for alternative snapshot output
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.03.30 [1.7.0] added support for "print" param as alternative for "snap". When "print" is used, the filename is ignored and ouput is directed to another browser tab/window, where the print dialog is then automatically triggered.
|please see [[NewDocumentPluginInfo]] for additional revision details|
2006.02.03 [1.0.0] Created.
<<<
!!!!!Code
***/
//{{{
version.extensions.newDocument = {major: 1, minor: 8, revision: 0, date: new Date(2008,4,20)};
config.macros.newDocument = {
newlabel: "new document",
newprompt: "Create a new TiddlyWiki 'starter' document",
newdefault: "new.html",
allparam: "all",
saveaslabel: "save as...",
saveasprompt: "Save current TiddlyWiki to a different file",
printparam: "print",
snapparam: "snap",
snaplabel: "create a snapshot",
snapprompt: "Create a 'snapshot' of the current TiddlyWiki display",
snapdefault: "snapshot.html",
snapID: "contentWrapper",
snapIDprompt: "Please enter a DOM element ID for the desired content",
snapIDerrmsg: "Unrecognized document element ID: '%0'",
askparam: "ask",
hereparam: "here",
viewerparam: "viewer",
noCSSparam: "noCSS",
labelparam: "label:",
promptparam: "prompt:",
fileprompt: "Please enter a filename",
filter: "includeNew",
filterprompt: "Match one or more tags:\n(space-separated, use [[...]] around tags containing spaces)",
filtererrmsg: "Error in tag filter '%0'",
snapmsg: "Document snapshot written to %1",
okmsg: "%0 tiddlers written to %1",
failmsg: "An error occurred while creating %0"
};
config.macros.newDocument.handler = function(place,macroName,params) {
var path=getLocalPath(document.location.href);
var slashpos=path.lastIndexOf("/"); if (slashpos==-1) slashpos=path.lastIndexOf("\\");
if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash
if (params[0] && params[0].substr(0,this.labelparam.length)==this.labelparam)
var label=params.shift().substr(this.labelparam.length)
if (params[0] && params[0].substr(0,this.promptparam.length)==this.promptparam)
var prompt=params.shift().substr(this.promptparam.length)
var filename=params.shift(); if (!filename) filename=this.newdefault;
if (params[0]==this.snapparam || params[0]==this.printparam) {
var printmode=(params[0]==this.printparam);
params.shift();
if (!label) var label=this.snaplabel;
if (!prompt) var prompt=this.snapprompt;
var defaultfile=this.snapdefault;
var noCSS=params[0]&¶ms[0].toLowerCase()==this.noCSSparam.toLowerCase();
if (noCSS) params.shift(); // suppress CSS output
var snapID=this.snapID;// default to "contentWrapper"
if (params[0]) var snapID=params.shift(); // alternate DOM element for snapshot
}
if (params[0]==this.allparam) {
if (!label) var label=this.saveaslabel;
if (!prompt) var prompt=this.saveasprompt;
var defaultfile=getLocalPath(document.location.href);
var slashpos=defaultfile.lastIndexOf("/"); if (slashpos==-1) slashpos=defaultfile.lastIndexOf("\\");
if (slashpos!=-1) defaultfile=defaultfile.substr(slashpos+1); // get filename only
}
if (!prompt) var prompt=this.newprompt;
if (!label) var label=this.newlabel;
if (!defaultfile) var defaultfile=this.newdefault;
var btn=createTiddlyButton(place,label,prompt,onClickNewDocument);
btn.path=path;
btn.file=filename;
btn.defaultfile=defaultfile;
btn.snapID=snapID; // NULL unless snapshot is being taken
btn.noCSS=noCSS;
btn.printmode=printmode;
btn.filter=params.length?params:[this.filter];
}
// IE needs explicit global scoping for functions called by browser events
window.onClickNewDocument=function(e)
{
if (!e) var e = window.event; var btn=resolveTarget(e);
var macro=config.macros.newDocument; // abbreviation
// assemble document content, write file, report result
var okmsg=macro.okmsg;
var failmsg=macro.failmsg;
var count=0;
var out="";
if (btn.snapID) { // HTML+CSS snapshot
var snapElem=document.getElementById(btn.snapID);
if (btn.snapID==macro.askparam) {
snapID=prompt(macro.snapIDprompt,macro.snapID);
var snapElem=document.getElementById(snapID);
if (!snapElem) { // ID not found or cancelled by user
if (snapID) displayMessage(macro.snapIDerrmsg.format([snapID]));
e.cancelBubble=true; if(e.stopPropagation)e.stopPropagation(); return(false);
}
}
else if (btn.snapID==macro.hereparam || btn.snapID==macro.viewerparam) {
var snapElem=story.findContainingTiddler(btn);
if (snapElem && btn.snapID==macro.viewerparam) {
// find viewer class element within tiddler element
var nodes=snapElem.getElementsByTagName("*");
for (var i=0; i<nodes.length; i++)
if (hasClass(nodes[i],"viewer")) { snapElem=nodes[i]; break; }
}
if (!snapElem) // not in a tiddler or no viewer element
{ e.cancelBubble=true; if(e.stopPropagation)e.stopPropagation(); return(false); }
}
out+="<html>\n";
if (!btn.noCSS) {
out+="<head>\n";
var styles=document.getElementsByTagName("style");
for(var i=0; i < styles.length; i++) {
out+="<style>\n";
out+="/* stylesheet from tiddler:"+styles[i].getAttribute("id")+" */\n";
out+=styles[i].innerHTML+"\n\n";
out+="</style>\n";
}
out+="</head>\n";
}
out+="<body>\n\n"+snapElem.innerHTML+"\n\n</body>\n";
out+="</html>";
okmsg=macro.snapmsg;
} else { // TW starter document
// get the TiddlyWiki core code source
var sourcefile=getLocalPath(document.location.href);
var source=loadFile(sourcefile);
if(source==null) { alert(config.messages.cantSaveError); return null; }
// reset existing HTML source markup
source=updateMarkupBlock(source,"PRE-HEAD");
source=updateMarkupBlock(source,"POST-HEAD");
source=updateMarkupBlock(source,"PRE-BODY");
source=updateMarkupBlock(source,"POST-BODY");
// find store area
var posOpeningDiv=source.indexOf(startSaveArea);
var posClosingDiv=source.lastIndexOf(endSaveArea);
if((posOpeningDiv==-1)||(posClosingDiv==-1)) { alert(config.messages.invalidFileError.format([sourcefile])); return; }
// get the matching tiddler divs
var match=btn.filter;
if (match[0]==macro.askparam) { // ask user for tags
var newfilt=prompt(macro.filterprompt,macro.filter);
if (!newfilt) return; // cancelled by user
match=newfilt.readMacroParams();
}
var storeAreaDivs=[];
var tiddlers=store.getTiddlers('title');
for (var i=0; i<tiddlers.length; i++)
if (match[0]==macro.allparam || (tiddlers[i].tags && tiddlers[i].tags.containsAny(match)) )
storeAreaDivs.push(store.getSaver().externalizeTiddler(store,tiddlers[i]));
out+=source.substr(0,posOpeningDiv+startSaveArea.length);
out+=convertUnicodeToUTF8(storeAreaDivs.join("\n"))+"\n\t\t";
out+=source.substr(posClosingDiv);
count=storeAreaDivs.length;
}
if (btn.printmode) {
var win=window.open("","_blank","");
win.document.open();
win.document.writeln(out);
win.document.close();
win.focus(); // bring to front
win.print(); // trigger print dialog
} else {
// get output path/filename
var filename=btn.file;
if (filename==macro.askparam)
filename=promptForFilename(macro.fileprompt,btn.path,btn.defaultfile);
if (!filename) return; // cancelled by user
// if specified file does not include a path, assemble fully qualified path and filename
var slashpos=filename.lastIndexOf("/"); if (slashpos==-1) slashpos=filename.lastIndexOf("\\");
if (slashpos==-1) filename=btn.path+filename;
var ok=saveFile(filename,out);
var msg=ok?okmsg.format([count,filename]):failmsg.format([filename]);
var link=ok?"file:///"+filename.replace(/\\/g,'/'):""; // change local path to link text
clearMessage(); displayMessage(msg,link);
}
e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false);
}
//}}}
//{{{
function promptForFilename(msg,path,file)
{
if(window.Components) { // moz
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, msg, nsIFilePicker.modeSave);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
thispath.initWithPath(path);
picker.displayDirectory=thispath;
picker.defaultExtension='html';
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;
}
catch(e) { alert('error during local file access: '+e.toString()) }
}
else { // IE
try { // XP only
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';
s.FilterIndex=3; // default to HTML files;
s.InitialDir=path;
s.FileName=file;
if (s.showOpen()) var result=s.FileName;
}
catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE
}
return result;
}
//}}}
/***
| Name:|NewHerePlugin|
| Description:|Creates the new here and new journal macros|
| Version:|3.0 ($Rev: 1845 $)|
| Date:|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
newHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
}
},
newJournalHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newJournal "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
}
}
});
//}}}
Definir o objetivo geral, e uma lista de objetivos específicos. Os objetivos devem ser claros e alcançáveis.
[[ABRIR|Objetivos]]
<<tiddler AdvancedOptions>>
Fazer uma lista das despesas antecipadamente!!
É importante e facilita fazer o orçamento se este for trabalhado por meta e atividade. Depois pode ser montado um orçamento geral.
Também é legal pensar em ter folgo no orçamento, ou seja, lembrar que podem ocorrer imprevistos não sendo interessante trabalhar com um orçamento tão apertado. Por exemplo, se uma das atividades for realizar duas trÊs visitas para levantamento de dados, é bom colocar um ou dois dias a mais e assim fazer para combustível, locação de automóvel, diárias.....
Considerar despesas com encargos sociais, não somente do empregado e principalmente do empregador, no caso, o IPCP-MA, caso haja contratações. Além dos encargos tem outras despesas que normalmente não são consideradas como despesas bancárias, etc....
Outro aspecto importante, lembrar que se for feito uma tomada de preços para se elaborar o orçamento, tem que se considerar o tempo que levará para o projeto ser aprovado, diferenças que podem ocorrer nos valores orçados previamente....
[[ABRIR|Orçamento]]
<<tabs tabsClass [[Equipe]] "" [[Equipe]] [[Equipamentos]] "" [[Equipamentos]] [[ContraPartida]] "" [[ContraPartida]] [[Orçamento]] "" [[Orçamento]]>>
<!--{{{-->
<div id='header' class='header'>
<div class='headerShadow'>
<span class='searchBar' macro='search'></span>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div id='topMenu' refresh='content' tiddler='TopMenu'></div>
</div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<span style='display:none;' refresh='content' force='true' tiddler='SetUploadParameters'></span>
</div>
<!--}}}-->
!!!Instituto Voçorrocas
!!!EMATER/Lavras - André
!!!~IPCP-MA
O Projeto sera do UFLA, Coordenado por Prof. Leandro Marcs, com IPCP-MA executando
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Guardar Senha?";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
Durante este fase os equipes locais reunião para relatar o progresso das experincias individiais.
O Plano de ação pode constar de uma simples Tabela indicando quando e por quanto tempo cada atividade será feita. Pode incluir os resultados esperados também.
[[ABRIR|Plano de Ação]]
Plantio de vetiver recupera solos e combate erosão
Enraizamento vertical e extenso da planta permite seu uso na proteção de mananciais e contenção de encostas
Fernanda Yoneya - O Estado de S.Paulo
Tamanho do texto? A A A A
SÃO PAULO - O vetiver, cujo óleo essencial é conhecido na indústria de fragrâncias, tem outra utilidade que vem sendo difundida em áreas rurais e urbanas. A planta tem se mostrado eficiente na recuperação de solos degradados e no combate à erosão. Principalmente nesta época, marcada pela ocorrência de chuvas torrenciais, os impactos da água no solo causam danos ambientais e econômicos. ''A erosão hídrica é um grave problema ambiental e decorre do mau uso do solo'', diz o agrônomo André César Henriques, do escritório local de Caxambu, da Emater-MG.
Henriques coordenou o projeto Estabilização de Solos e Controle de Erosão com Vetiveria zizanioides (L.) Nash e garante que o vetiver, espécie perene e rústica, tem características capazes de controlar a erosão mesmo em condições adversas de clima e solo.
RAÍZES
Entre os atributos da planta que servem no controle da erosão, Henriques cita o direcionamento vertical das raízes. Estas, profundas e extensas - atingem até 6 metros -, funcionam como ''pregos'' e retêm dos mais finos aos mais grosseiros sedimentos, criando uma barreira natural ao escoamento da água. ''Como a raiz cresce para baixo, há redução da velocidade de enxurradas e aumento da capacidade de infiltração da água no solo'', diz. Além disso, o extenso alcance das raízes confere à planta capacidade de resistência à seca prolongada e de recuperação após situações de stress, como queimadas, pastoreio intensivo e alagamentos. ''Também é comprovada a tolerância ao ataque de pragas e doenças.''
TECNOLOGIA
O cafeicultor Adriano Sério, da fazenda Ouro Verde, de 80 hectares, em Caxambu (MG), resolveu problemas de deslizamento de terra na fazenda com a planta. ''Refiz a encosta e plantei duas linhas de vetiver. Esta área, mesmo sendo artificial, segura as chuvas.'' Gostou tanto do resultado que construiu um viveiro de mudas de vetiver. ''Uso a planta para fazer contenção de barragem e, preventivamente, plantei para proteger área de nascente.''
Henriques diz que o uso de vetiver em intervenções ambientais é uma tecnologia simples e barata. Simples porque a fixação biológica de nitrogênio e fósforo permite à planta vegetar em solos de baixa fertilidade. Sua rusticidade também a torna tolerante a temperaturas menores que 9 graus e superiores a 50 graus. ''E é uma opção econômica porque uma barreira de contenção de vetiver custa cerca de R$ 60/hectare, enquanto o custo de métodos convencionais pode chegar a R$ 1.000/hectare.'' NÃO HÁ RISCO DE A ESPÉCIE VIRAR PRAGA
O agrônomo André Henriques, da Emater-MG, explica que o plantio de vetiver em projetos de recuperação ambiental é seguro, porque, como a planta é estéril - só se multiplica por subdivisão de touceiras -, não há risco de virar praga ou se tornar invasora. ''Para fazer a multiplicação, é preciso podar folhas e raízes e desmembrar a touceira'', explica. Ainda conforme Henriques, o vetiver raramente produz sementes férteis, não produz rizomas, estolões ou qualquer outra estrutura reprodutiva. ''Para eliminá-lo, basta arrancá-lo e deixá-lo exposto'', diz. ''O único fator limitante ao desenvolvimento da planta é o sombreamento excessivo.''
Source: [[Estadao.com.br :: Suplementos :: Plantio de vetiver recupera solos e combate erosão|http://www.estadao.com.br/suplementos/not_sup100994,0.htm]]
Quem são as pessoas que serão beneficiadas por este projeto - direta e indiretamente.
[[ABRIR|População alvo]]
''<<wikify {{store.getTiddlerText("SiteSubtitle")}}>>'' (lembrar inserer nome certo com abrir [[Como Iniciar]])
<<tabs tabsClass [[Projeto Geral]] "" [[Projeto Geral]] [[Contexto do Projeto]] "" [[Contexto do Projeto]] [[Ações do Projeto]] "" [[Ações do Projeto]] [[Orçamento]] "" [[Orçamento do Projeto]] [[Documentos]] "" [[Documentos]]>>
[[Justificativa]]
[[As Metas]]
[[As Atividades]]
[[Parceiros]]
[[Docs_Originais]]
[[Anexos]]
<<tabs tabsClass Sumario "" [[Sumario]] Objetivos "" [[Objetivos]] Parceiros "" [[Parceiros]]>>
Cada meta e cada atividade terá um resultado que planejamos alcançar. Estes resultados devem ser mensuráveis e podem ser quantitativos e qualitativos.
[[ABRIR|Resultados]]
Reuniões publicas (resultando de visitas a campo), e pesquisar como eles perceberam as viçorrocas, as historias deles e quantificar as prejucios que eles causam.
<script>
config.options.txtUploadFilename=wikifyPlain("SiteTitle")+".html";
config.options.txtUploadStoreUrl=wikifyPlain("StoreArquivo");
config.options.txtUploadUserName=config.options.txtUserName;
config.options.txtUploadDir=wikifyPlain("UploadDirectory");
config.options.chkHttpReadOnly = false;
readOnly = false;
showBackstage = true;
</script>
<<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
Bioengenharia por os Voçorocas do Carranças
http://www.ipcp.org.br/IPCP-MA/Projects/store.php
/*{{{*/
/*Haemoglobin Theme for TiddlyWiki*/
/*Design and CSS by Saq Imtiaz*/
/*Version 1.0*/
/*}}}*/
/*{{{*/
#sidebarTabs {font-family:arial,helvetica;}
body
{background:#fefefe;}
#contentWrapper {
font-family: Verdana, Arial, Tahoma, Sans-Serif;
color: #555555;
margin:0.1em auto 1em ;
background: url(background.jpg);
background-position: top center;
background-repeat: no-repeat;
}
#header {background:#fefefe;}
.headerShadow { padding: 1.0em 0em 0.5em 0.5em; }
.siteTitle {
font-family: 'Trebuchet MS' sans-serif;
font-weight: bold;
font-size: 30px;
color: #e48d04;
background-color: #FFF;
}
.siteSubtitle {
font-size: 1.0em;
display: block;
margin: .5em 1em; color: #999;
}
.clearAll {clear:both;}
.tagClear {clear:none;}
#sidebar {position:relative; float:right; display:inline; right:0;}
a{
color:#e48d04;
text-decoration: none; font-weight:normal;
}
a:hover{
color:#e48d04;
background-color: #fefefe;
border-bottom:1px solid #e48d04;
}
.viewer .button, .editorFooter .button{
color: #555;
border: 1px solid #e48d04;
}
.viewer .button:hover,
.editorFooter .button:hover{
color: #fff;
background: #e48d04;
border-color: #e48d04;
}
.viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{color:#fff; background:#9F1313;border-color:#9F1313;}
#topMenu br {display:none;}
#topMenu {padding:0.45em 1em; background:#e48d04;}
#topMenu a, #topMenu .tiddlyLink, #topMenu .button {color:#f1f1f1; padding:0.2em 0.2em; margin:0 4px;font-size:90%;font-weight:normal;font-variant: small-caps; border:none; background:#e48d04; text-decoration:none; }
#topMenu a:hover, #topMenu .tiddlyLink:hover, #topMenu .button:hover, #topMenu .button:active, #topMenu .highlight {color:#fff;text-decoration:none; background:#9F1313; }
#displayArea{margin:0 1em 1em 1em;}
.tiddler {padding-left:0;}
.title {color:#e48d04; border-bottom:1px solid#e48d043; }
.subtitle, .subtitle a { color: #999999; font-size: 1.0em;margin:0.2em;}
.shadow .title{color:#999;}
.toolbar {font-size:85%;}
.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#333; background:transparent;border:1px solid #fff;}
.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#333; background:transparent;border:1px solid #fff;}
* html .viewer pre {
margin-left: 0em;
}
* html .editor textarea, * html .editor input {
width: 98%;
}
/***
!Sidebar
***/
#sidebar {position:relative;float:right; line-height: 1.4em; border-left:0px solid#000; display:inline; background:transparent; right:0; margin-bottom:2em !important; margin-bottom:1em;
width: 16em;
align:center;}
/***
!SidebarOptions
***/
#sidebarOptions {padding-left:0.5em; padding-top:2em;}
#sidebarOptions a {
color:#999;
text-decoration: none;}
#sidebarOptions a:hover, #sidebarOptions a:active {
color:#CC0000;
background:transparent;border:1px solid #f5f5f5;
}
#sidebarOptions input {border:1px solid #999; }
.listTitle {color:#888;}
#sidebarTabs .tabContents {background:#fefefe;}
#sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button{color:#999;}
#sidebarTabs .tabContents .tiddlyLink:hover,#sidebarTabs .tabContents .button:hover{color:#CC0000;background:#fefefe; text-decoration:none;border:none;}
#sidebarTabs .tabContents .button:hover, #sidebarTabs .tabContents .highlight, #sidebarTabs .tabContents .marked, #sidebarTabs .tabContents a.button:active{color:#CC0000;background:#fefefe}
.tabSelected{color:#fefefe; background:#999;}
.tabSelected, .tabSelected:hover {
color: #555;
background: #fefefe;
border: solid 1px #ccc;
}
#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#999;}
.tabUnselected {
color: #999;
background: #eee;
border: solid 1px #ccc;
}
.tabUnselected:hover {text-decoration:none; border:1px solid #ccc;}
#sidebarTabs .tabUnselected { border-bottom: none;padding-bottom:3px;}
#sidebarTabs .tabSelected{padding-bottom:3px;}
#sidebarOptions .sliderPanel {
background: #eee; border:1px solid#ccc;
font-size: .9em;
}
#sidebarOptions .sliderPanel input {border:1px solid #999;}
#sidebarOptions .sliderPanel .txtOptionInput {border:1px solid #999;width:9em;}
#sidebarOptions .sliderPanel a {font-weight:normal; color:#555;background-color: #eee; border-bottom:1px dotted #333;}
#sidebarOptions .sliderPanel a:hover {
color:#111;
background-color: #eee;
border:none;
border-bottom:1px dotted #111;
}
.tabContents {background:#fefefe;}
.tagging, .tagged {
border: 1px solid #eee;
background-color: #F7F7F7;
}
.selected .tagging, .selected .tagged {
background-color: #f7f7f7;
border: 1px solid #ccc;
}
.tagging .listTitle, .tagged .listTitle {
color: #bbb;
}
.selected .tagging .listTitle, .selected .tagged .listTitle {
color: #666;
}
.tagging .button, .tagged .button {
color:#ccc;
}
.selected .tagging .button, .selected .tagged .button {
color:#aaa;
}
.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}
.tagging .button:hover, .tagged .button:hover, .tagging .button:active, .tagged .button:active {
border: none; background:transparent; text-decoration:underline; color:#333;
}
.popup {
background: #f9cc86;
border: 1px solid #e48d04;
}
.popup li.disabled {
color: #000;
}
.popup li a, .popup li a:visited {
color: #eee;
border: none;
}
.popup li a:hover {
background: #f9cc86;
color: #fff;
border: none;
}
#messageArea {
border: 4px solid #e48d04;
background: #fefefe;
color: #555;
font-size:90%;
}
#messageArea a:hover { background:#f5f5f5; border:none;}
#messageArea .button{
color: #666;
border: 1px solid #e48d04;
}
#messageArea .button:hover {
color: #fff;
background: #e48d04;
border-color: #e48d04;
}
.searchBar {float:right;font-size: 1.0em;position:relative; margin-top:1.3em;}
.searchBar .button {color:#999;display:block;}
.searchBar .button:hover {border:1px solid #fefefe;color:#4F4B45;}
.searchBar input {
background-color: #fefefe;
color: #999999;
border: 1px solid #CCC; margin-right:3px;
}
.tiddler {padding-bottom:10px;}
.viewer blockquote {
border-left: 5px solid #BF2323;
}
.viewer table, .viewer td {
border: 1px solid #e48d04;
}
.viewer th, thead td {
background: #BF2323;
border: 1px solid #e48d04;
color: #fff;
}
.viewer pre {
border: 1px solid #ccc;
background: #f5f5f5;
}
.viewer code {
color: #111; background:#f5f5f5;
}
.viewer hr {
border-top: dashed 1px #555;
}
.editor input {
border: 1px solid #888; margin-top:5px;
}
.editor textarea {
border: 1px solid #888;
}
h1,h2,h3,h4,h5 { color: #BF2323; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:2.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:2.5em 0em 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0em 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0em 1em;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
Um breve texto apresentando suas idéias de uma maneira precisa e que prenda a atenção das pessoas. Tentar explicar (brevemente) o quê você quer fazer? porquê? para quem? onde? quando?
[[ABRIR|Sumario]]
/***
|Name|TaggedTemplateTweak|
|Source|http://www.TiddlyTools.com/#TaggedTemplateTweak|
|Documentation|http://www.TiddlyTools.com/#TaggedTemplateTweakInfo|
|Version|1.4.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.chooseTemplateForTiddler()|
|Description|use alternative ViewTemplate/EditTemplate for tiddler's tagged with specific tag values|
This tweak extends story.chooseTemplateForTiddler() so that ''whenever a tiddler is marked with a specific tag value, it can be viewed and/or edited using alternatives to the standard tiddler templates.''
!!!!!Documentation
>see [[TaggedTemplateTweakInfo]]
!!!!!Revisions
<<<
2008.05.15 [1.4.0] support use of *shadow* tagged templates (e.g., [[DiscussionViewTemplate]] created by [[DiscussionPlugin]])
2008.05.10 [1.3.0] corrected handling for determining core template when using theme with sections
2008.05.01 [1.2.5] added support for tagged templates stored as sections in a theme
| please see [[TaggedTemplateTweakInfo]] for previous revision details |
2007.06.11 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.taggedTemplate= {major: 1, minor: 4, revision: 0, date: new Date(2008,5,15)};
Story.prototype.taggedTemplate_chooseTemplateForTiddler = Story.prototype.chooseTemplateForTiddler
Story.prototype.chooseTemplateForTiddler = function(title,template)
{
// get default template from core
var template=this.taggedTemplate_chooseTemplateForTiddler.apply(this,arguments);
// if the tiddler to be rendered doesn't exist yet, just return core result
var tiddler=store.getTiddler(title); if (!tiddler) return template;
// split core template into theme prefix and template name
var theme="";
var parts=template.split(config.textPrimitives.sectionSeparator);
if (parts[1]) { theme=parts[0]; template=parts[1]; }
else theme=config.options.txtTheme||""; // fallback if theme is not specified
theme+=config.textPrimitives.sectionSeparator;
// look for template whose prefix matches a tag on this tiddler
for (i=0; i<tiddler.tags.length; i++) {
var t=tiddler.tags[i]+template; // add tag prefix to template
var c=t.substr(0,1).toUpperCase()+t.substr(1); // capitalized for WikiWord title
if (store.getTiddlerText(theme+t)) { template=theme+t; break; } // theme##tagTemplate
if (store.getTiddlerText(theme+c)) { template=theme+c; break; } // theme##TagTemplate
if (store.getTiddlerText(t)) { template=t; break; } // tagTemplate
if (store.getTiddlerText(c)) { template=c; break; } // TagTemplate
}
return template;
}
//}}}
/***
| Name|TagglyTaggingPlugin|
| Description|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
| Version|3.0 ($Rev: 2101 $)|
| Date|$Date: 2007-04-20 00:24:20 +1000 (Fri, 20 Apr 2007) $|
| Source|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {
// for translations
lingo: {
labels: {
asc: "\u2191", // down arrow
desc: "\u2193", // up arrow
title: "title",
modified: "modified",
created: "created",
show: "+",
hide: "-",
normal: "normal",
group: "group",
commas: "commas",
sitemap: "sitemap",
numCols: "cols\u00b1", // plus minus sign
label: "Tagged as '%0':",
excerpts: "excerpts",
noexcerpts: "no excerpts"
},
tooltips: {
title: "Click to sort by title",
modified: "Click to sort by modified date",
created: "Click to sort by created date",
show: "Click to show tagging list",
hide: "Click to hide tagging list",
normal: "Click to show a normal ungrouped list",
group: "Click to show list grouped by tag",
sitemap: "Click to show a sitemap style list",
commas: "Click to show a comma separated list",
numCols: "Click to change number of columns"
}
},
config: {
showTaggingCounts: true,
listOpts: {
// the first one will be the default
sortBy: ["title","modified","created"],
sortOrder: ["asc","desc"],
hideState: ["show","hide"],
listMode: ["normal","group","sitemap","commas"],
numCols: ["1","2","3","4","5","6"],
excerpts: ["noexcerpts","excerpts"]
},
valuePrefix: "taggly.",
excludeTags: ["excludeLists","excludeTagging"],
excerptSize: 50,
excerptMarker: "/%"+"%/"
},
getTagglyOpt: function(title,opt) {
var val = store.getValue(title,this.config.valuePrefix+opt);
return val ? val : this.config.listOpts[opt][0];
},
setTagglyOpt: function(title,opt,value) {
if (!store.tiddlerExists(title))
// create it silently
store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),null);
// if value is default then remove it to save space
return store.setValue(title,
this.config.valuePrefix+opt,
value == this.config.listOpts[opt][0] ? null : value);
},
getNextValue: function(title,opt) {
var current = this.getTagglyOpt(title,opt);
var pos = this.config.listOpts[opt].indexOf(current);
// a little usability enhancement. actually it doesn't work right for grouped or sitemap
var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
var newPos = (pos + 1) % limit;
return this.config.listOpts[opt][newPos];
},
toggleTagglyOpt: function(title,opt) {
var newVal = this.getNextValue(title,opt);
this.setTagglyOpt(title,opt,newVal);
},
createListControl: function(place,title,type) {
var lingo = config.taggly.lingo;
var label;
var tooltip;
var onclick;
if ((type == "title" || type == "modified" || type == "created")) {
// "special" controls. a little tricky. derived from sortOrder and sortBy
label = lingo.labels[type];
tooltip = lingo.tooltips[type];
if (this.getTagglyOpt(title,"sortBy") == type) {
label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
onclick = function() {
config.taggly.toggleTagglyOpt(title,"sortOrder");
return false;
}
}
else {
onclick = function() {
config.taggly.setTagglyOpt(title,"sortBy",type);
config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
return false;
}
}
}
else {
// "regular" controls, nice and simple
label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
onclick = function() {
config.taggly.toggleTagglyOpt(title,type);
return false;
}
}
// hide button because commas don't have columns
if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
},
makeColumns: function(orig,numCols) {
var listSize = orig.length;
var colSize = listSize/numCols;
var remainder = listSize % numCols;
var upperColsize = colSize;
var lowerColsize = colSize;
if (colSize != Math.floor(colSize)) {
// it's not an exact fit so..
upperColsize = Math.floor(colSize) + 1;
lowerColsize = Math.floor(colSize);
}
var output = [];
var c = 0;
for (var j=0;j<numCols;j++) {
var singleCol = [];
var thisSize = j < remainder ? upperColsize : lowerColsize;
for (var i=0;i<thisSize;i++)
singleCol.push(orig[c++]);
output.push(singleCol);
}
return output;
},
drawTable: function(place,columns,theClass) {
var newTable = createTiddlyElement(place,"table",null,theClass);
var newTbody = createTiddlyElement(newTable,"tbody");
var newTr = createTiddlyElement(newTbody,"tr");
for (var j=0;j<columns.length;j++) {
var colOutput = "";
for (var i=0;i<columns[j].length;i++)
colOutput += columns[j][i];
var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
wikify(colOutput,newTd);
}
return newTable;
},
createTagglyList: function(place,title) {
switch(this.getTagglyOpt(title,"listMode")) {
case "group": return this.createTagglyListGrouped(place,title); break;
case "normal": return this.createTagglyListNormal(place,title,false); break;
case "commas": return this.createTagglyListNormal(place,title,true); break;
case "sitemap":return this.createTagglyListSiteMap(place,title); break;
}
},
getTaggingCount: function(title) {
// thanks to Doug Edmunds
if (this.config.showTaggingCounts) {
var tagCount = store.getTaggedTiddlers(title).length;
if (tagCount > 0)
return " ("+tagCount+")";
}
return "";
},
getExcerpt: function(inTiddlerTitle,title) {
if (this.getTagglyOpt(inTiddlerTitle,"excerpts") == "excerpts") {
var t = store.getTiddler(title);
if (t) {
var text = t.text.replace(/\n/," ");
var marker = text.indexOf(this.config.excerptMarker);
if (marker != -1) {
return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
}
else if (text.length < this.config.excerptSize) {
return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
}
else {
return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
}
}
}
return "";
},
notHidden: function(t,inTiddler) {
if (typeof t == "string")
t = store.getTiddler(t);
return (!t || !t.tags.containsAny(this.config.excludeTags) ||
(inTiddler && this.config.excludeTags.contains(inTiddler)));
},
// this is for normal and commas mode
createTagglyListNormal: function(place,title,useCommas) {
var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));
if (this.getTagglyOpt(title,"sortOrder") == "desc")
list = list.reverse();
var output = [];
var first = true;
for (var i=0;i<list.length;i++) {
if (this.notHidden(list[i],title)) {
var countString = this.getTaggingCount(list[i].title);
var excerpt = this.getExcerpt(title,list[i].title);
if (useCommas)
output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
else
output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");
first = false;
}
}
return this.drawTable(place,
this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
useCommas ? "commas" : "normal");
},
// this is for the "grouped" mode
createTagglyListGrouped: function(place,title) {
var sortBy = this.getTagglyOpt(title,"sortBy");
var sortOrder = this.getTagglyOpt(title,"sortOrder");
var list = store.getTaggedTiddlers(title,sortBy);
if (sortOrder == "desc")
list = list.reverse();
var leftOvers = []
for (var i=0;i<list.length;i++)
leftOvers.push(list[i].title);
var allTagsHolder = {};
for (var i=0;i<list.length;i++) {
for (var j=0;j<list[i].tags.length;j++) {
if (list[i].tags[j] != title) { // not this tiddler
if (this.notHidden(list[i].tags[j],title)) {
if (!allTagsHolder[list[i].tags[j]])
allTagsHolder[list[i].tags[j]] = "";
if (this.notHidden(list[i],title)) {
allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";
leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers
}
}
}
}
}
var allTags = [];
for (var t in allTagsHolder)
allTags.push(t);
var sortHelper = function(a,b) {
if (a == b) return 0;
if (a < b) return -1;
return 1;
};
allTags.sort(function(a,b) {
var tidA = store.getTiddler(a);
var tidB = store.getTiddler(b);
if (sortBy == "title") return sortHelper(a,b);
else if (!tidA && !tidB) return 0;
else if (!tidA) return -1;
else if (!tidB) return +1;
else return sortHelper(tidA[sortBy],tidB[sortBy]);
});
var leftOverOutput = "";
for (var i=0;i<leftOvers.length;i++)
if (this.notHidden(leftOvers[i],title))
leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";
var output = [];
if (sortOrder == "desc")
allTags.reverse();
else if (leftOverOutput != "")
// leftovers first...
output.push(leftOverOutput);
for (var i=0;i<allTags.length;i++)
if (allTagsHolder[allTags[i]] != "")
output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);
if (sortOrder == "desc" && leftOverOutput != "")
// leftovers last...
output.push(leftOverOutput);
return this.drawTable(place,
this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
"grouped");
},
// used to build site map
treeTraverse: function(title,depth,sortBy,sortOrder) {
var list = store.getTaggedTiddlers(title,sortBy);
if (sortOrder == "desc")
list.reverse();
var indent = "";
for (var j=0;j<depth;j++)
indent += "*"
var childOutput = "";
for (var i=0;i<list.length;i++)
if (list[i].title != title)
if (this.notHidden(list[i].title,this.config.inTiddler))
childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);
if (depth == 0)
return childOutput;
else
return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title) + "\n" + childOutput;
},
// this if for the site map mode
createTagglyListSiteMap: function(place,title) {
this.config.inTiddler = title; // nasty. should pass it in to traverse probably
var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));
return this.drawTable(place,
this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
"sitemap"
);
},
macros: {
tagglyTagging: {
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
var refreshContainer = createTiddlyElement(place,"div");
// do some refresh magic to make it keep the list fresh - thanks Saq
refreshContainer.setAttribute("refresh","macro");
refreshContainer.setAttribute("macroName",macroName);
refreshContainer.setAttribute("title",tiddler.title);
this.refresh(refreshContainer);
},
refresh: function(place) {
var title = place.getAttribute("title");
removeChildren(place);
if (store.getTaggedTiddlers(title).length > 0) {
var lingo = config.taggly.lingo;
config.taggly.createListControl(place,title,"hideState");
if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));
config.taggly.createListControl(place,title,"title");
config.taggly.createListControl(place,title,"modified");
config.taggly.createListControl(place,title,"created");
config.taggly.createListControl(place,title,"listMode");
config.taggly.createListControl(place,title,"excerpts");
config.taggly.createListControl(place,title,"numCols");
config.taggly.createTagglyList(place,title);
}
}
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
" margin-top:0px; padding-top:0.5em; padding-left:2em;",
" margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
" color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
" border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active {",
" border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryMid]]; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
"/*}}}*/",
""].join("\n"),
init: function() {
merge(config.macros,this.macros);
config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
store.addNotification("TagglyTaggingStyles",refreshStyles);
}
};
config.taggly.init();
//}}}
/***
|Name|ToggleSideBarMacro|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#ToggleSideBarMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a button for toggling visibility of the SideBar. You can choose whether the SideBar should initially be hidden or displayed.
!Demo
<<toggleSideBar "Toggle Sidebar">>
!Usage:
{{{<<toggleSideBar>>}}} <<toggleSideBar>>
additional options:
{{{<<toggleSideBar label tooltip show/hide>>}}} where:
label = custom label for the button,
tooltip = custom tooltip for the button,
show/hide = use one or the other, determines whether the sidebar is shown at first or not.
(default is to show the sidebar)
You can add it to your tiddler toolbar, your MainMenu, or where you like really.
If you are using a horizontal MainMenu and want the button to be right aligned, put the following in your StyleSheet:
{{{ .HideSideBarButton {float:right;} }}}
!History
*23-07-06: version 1.0: completely rewritten, now works with custom stylesheets too, and easier to customize start behaviour.
*20-07-06: version 0.11
*27-04-06: version 0.1: working.
!Code
***/
//{{{
config.macros.toggleSideBar={};
config.macros.toggleSideBar.settings={
styleHide : "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
styleShow : " ",
arrow1: "****",
arrow2: "****"
};
config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
var tooltip= params[1]||'toggle sidebar';
var mode = (params[2] && params[2]=="hide")? "hide":"show";
var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
var label= (params[0]&¶ms[0]!='.')?params[0]+" "+arrow:arrow;
var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
if (mode == "hide")
{
(document.getElementById("sidebar")).setAttribute("toggle","hide");
setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
}
};
config.macros.toggleSideBar.onToggleSideBar = function(){
var sidebar = document.getElementById("sidebar");
var settings = config.macros.toggleSideBar.settings;
if (sidebar.getAttribute("toggle")=='hide')
{
setStylesheet(settings.styleShow,"ToggleSideBarStyles");
sidebar.setAttribute("toggle","show");
this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
}
else
{
setStylesheet(settings.styleHide,"ToggleSideBarStyles");
sidebar.setAttribute("toggle","hide");
this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
}
return false;
}
setStylesheet(".HideSideBarButton .button {font-weight:bold; padding: 0 5px;}\n","ToggleSideBarButtonStyles");
//}}}
[[Inicio|Como Iniciar]].[[Upload o Projeto]].[[Guardar a Seu Cumputador|Guardar]].<<newTiddler label:"Item Novo">>.+++^50em^[O Formulario]<<moveablePanel>>
<<faqlist byTag Formulario title hr>>
=== [[As Metas]].[[As Atividades]].[[Projecto Completo|Projeto]].[[Projeto Corto]].<<toggleSideBar "" "" hide>>
Clic <<upload>> para salvar suas modificações neste arquivo, no servidor.
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 29/08/2008 10:42:19 | skye | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | http://www.ipcp.org.br/IPCP-MA/Projects/ | [[test.html | http://www.ipcp.org.br/IPCP-MA/Projects/http://www.ipcp.org.br/IPCP-MA/Projects//test.html]] | backup |
| 29/08/2008 10:52:13 | skye | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | http://www.ipcp.org.br/IPCP-MA/Projects/ | [[test.html | http://www.ipcp.org.br/IPCP-MA/Projects/http://www.ipcp.org.br/IPCP-MA/Projects//test.html]] | backup | failed |
| 01/09/2008 16:13:10 | fred | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/]] | http://www.ipcp.org.br/IPCP-MA/Projects/ | [[Nome do Projeto.html | file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/http://www.ipcp.org.br/IPCP-MA/Projects//Nome do Projeto.html]] | backup |
| 01/09/2008 16:14:06 | fred | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | http://www.ipcp.org.br/IPCP-MA/Projects/ | [[Nome do Projeto.html | http://www.ipcp.org.br/IPCP-MA/Projects/http://www.ipcp.org.br/IPCP-MA/Projects//Nome do Projeto.html]] | backup | failed |
| 01/09/2008 16:16:24 | fred | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | . | [[Nome do Projeto.html | http://www.ipcp.org.br/IPCP-MA/Projects/Nome do Projeto.html]] | backup | failed |
| 01/09/2008 16:18:06 | fred | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | . | [[Nome do Projeto.html | http://www.ipcp.org.br/IPCP-MA/Projects/Nome do Projeto.html]] | backup | failed |
| 04/09/2008 08:18:08 | fred | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | . | [[Nome do Projeto.html | http://www.ipcp.org.br/IPCP-MA/Projects/Nome do Projeto.html]] | | ok |
| 07/09/2008 13:51:25 | Skye | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | . | [[Nome do Projeto.html | http://www.ipcp.org.br/IPCP-MA/Projects/Nome do Projeto.html]] | | failed |
| 07/09/2008 13:55:10 | Skye | [[projeto.html|file:///C:/Documents%20and%20Settings/USER/Desktop/IPCP-MA%20Projects/projeto.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | . | [[Nome do Projeto.html | http://www.ipcp.org.br/IPCP-MA/Projects/Nome do Projeto.html]] | | failed |
| 17/09/2008 17:19:22 | Skye | [[CNPqSolos.html|http://www.ipcp.org.br/IPCP-MA/Projects/CNPqSolos/CNPqSolos.html]] | [[store.php|http://www.ipcp.org.br/IPCP-MA/Projects/store.php]] | . | [[CNPqSolos.html | http://www.ipcp.org.br/IPCP-MA/Projects/CNPqSolos.html]] | backup |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.4|
|''Date:''|2008-08-11|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 4,
date: new Date("2008-08-11"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
<<wikify {{config.options.txtUserName}}>>
[[What is Vetiver Grass|VetiverDocs/body_vetiver_e.htm]]
[[Capim Vetiver na Bioengenharia/ES Brasil|VetiverDocs/BRASIL ESPIRITO SANTO CIER'S.htm]]
[[Control Erosão, Congo/Africa|VetiverDocs/Congo.pdf]]
[[Control Erosão/Estradas, Congo/Africa|VetiverDocs/Congo_highway.pdf]]
[[Viçorrocas Urbanas, Congo/Africa|VetiverDocs/CONGO_urban gully.pdf]]
[[Vetiver:Hendge Against Erosion, World Bank|VetiverDocs/TVN_greenEng.pdf]]
[[Vetiver:La Barrera contra la erosión, Banco Mundial|VetiverDocs/TVN_GreenSpan.pdf]]
[[Bioengineering in the Wet Tropics|VetiverDocs/15 YEARS OF BIOENGINEEERING IN THE WET TROPICS.htm]]
[[Agricultural Uses of Vetiver|VetiverDocs/Agric'l Uses of Vetiver.htm.htm]]
[[Soils and Water Conservation/Australia|VetiverDocs/AUS_DNR_bul.pdf]]
[[In Sewerage Treatment|Vetiverdocs/AUS_ekeshire01.pdf]]
[[Stabilization of Railway Bank/China|VetiverDocs/China - Stabilization of Railroad embankment with vetiver grass in south China.htm]]
[[Soils and Water Conservation/Thailand|VetiverDocs/CP-1-6.pdf]]
[[Economic Miracle for Small Farmers;Bangladsh|VetiverDocs/CP-6-1B.pdf]]
[[Eco-Friendly Grass/India|VetiverDocs/CP-6-2.pdf]]
[[Acuativer/Ecuador|VetiverDocs/Frame.htm]]
[[Vetiver and ‘Sikki Art’/India|VetiverDocs/IND_Vetiver%20Sikki%20art.pdf]]
[[Vetiver Victorious/Madagascar|VetiverDocs/MAD_rail_stab.pdf2.pdf]]
[[Role of Vetiver Grass in Sustaining Agricultural Productivity/Mexico|VetiverDocs/Mexico paper.htm]]
[[Soft engineering for erosion control:vetiver grass|VetiverDocs/More on soft engineering for erosion control vetiver grass, groynes, awareness building_ (+Fr)(+Sp).htm]]
[[WastWaer Treatment|VetiverDocs/PRVN_wastewater_bul.pdf]]
[[Rehabilitation of Degraded Pasture/Australia|VetiverDocs/Rehabilitation of Degraded Pasture,Queensland, Australia.htm]]
[[Vetiver Grass In Upland Farming Development/Indonesia|VetiverDocs/SOCIO-ECONOMIC PAPERS.htm]]
[[Vetiver Grass System for Environmental Protection/Australia|VetiverDocs/Vetiver Grass System for Environmental Protection.htm]]
[[Vetiver Technology|VetiverDocs/Vetiver Grass Technology.htm]]
[[In Bioengineering/Chiuna|VetiverDocs/vetiver_tech_china.htm]]
[[Soil and Water Conservation/Zimbabwe|VetiverDocs/ZIMBABWE.htm]]
[[Artesanatos/India|VetiverDocs/IND_handicrafts.pdf]]
[[Artesanatos/Tailandia|VetiverDocs/THAI_Handicraft_Training_Report.pdf]]
[[Artesanatos/China|VetiverDocs/China - handicrafts from vetiver grass.htm]]
[[Artesanatos/Vietman|VetiverDocs/INR_vet%20art_r.pdf]]
[[Garden Show/China|VetiverDocs/Vetiver Grass demonstrated at garden show in China for landscaping and handicrafts.htm]]
[[Perfumaria:Segure-a pelo nariz|VetiverDocs/PLAYBOY_COM_BR.htm]]
[[Perfume|VetiverDocs/RR Perfumes.htm]]
[[Ruh Khus(Wild Vetiver Oil)/Oil of Tranquility|VetiverDocs/Vetiver-The Oil of Tranquility.htm]]
<<forEachTiddler where 'tiddler.tags.contains("vetiver")'
sortBy 'tiddler.title'>>
Vetiver (Chrysopogon zizanioides) is a perennial grass of the Poaceae family, native to India. The name comes from Tamil. In western and northern India, it is popularly known as khus (please check Opium_poppy#Use_as_food), giving the earlier English names cuscus, cuss cuss, kuss-kuss grass, etc.[1] Vetiver can grow up to 1.5 meters high and form clumps as wide. The stems are tall and the leaves are long, thin, and rather rigid; the flowers are brownish purple. Unlike most grasses, which form horizontally spreading mat-like root systems, vetiver's roots grow downward, 2–4 meters in depth. Vetiver is closely related to other fragrant grasses such as Lemon Grass (Cymbopogon citratus), citronella (Cymbopogon nardus, C. winterianus), and Palmarosa (Cymbopogon martinii). Though it originates in India, vetiver is widely cultivated in the tropical regions of the world. The world's major producers include Haiti, India, Java, and Réunion.
Source: [[Vetiver - Wikipedia, the free encyclopedia|http://en.wikipedia.org/wiki/Vetiver]]
Vetiver grass, Vetiveria zizanioides, offers a way to benefit the earth's atmosphere as well as its surface environment. This tropical grass sequesters large quantities of carbon dioxide from the atmosphere -- it may, in fact, be the ideal plant for the purpose. But hedges of vetiver also stop soil erosion, rejuvenate degraded lands, keep pollutants in their place, and much more. Nobody yet knows how much greenhouse gas vetiver can remove, but is likely to surpass anything generally imagined.
A rough estimate can be gained from measurements made on a closely related grass, Andropogon guyanus. In 1995,CIAT (a respected international agricultural research institute in Cali, Colombia) reported that this species and another deep-rooted African grass grow so widely and so prolifically in the savannas of South America that they "may remove as much as 2 billion tons of carbon dioxide from the atmosphereyearly." Andropogon guyanus roots penetrate 1 meter into tropical soils and CIAT scientists found that the plant sequesters as much as 53 tons of carbondioxide as organic matter per hectare per year.
Vetiver roots, by contrast, are more extensive and penetrate tropical soils to depths of 5 meters and beyond. Its rate of absorbing the gas is likely to be at least twice that of its botanical cousin. Back-of-the-envelope calculations suggest that a single vetiver plant may absorb 5 kg of CO2 a year. International efforts to propagate vetiver grass are underway in more than fifty countries. To give one example, the Chiang Rai Land Development Station in northern Thailand produces new vetiver plants at the rate of 100 million a year, which means that its annual output of plants might be removing 500 million kg of carbon dioxide. According to CIAT, that's as much CO2 as emittedby 100,000 gas-guzzling cars, each driven 20,000 km. Vetiver's many advantages include the fact that it:
* Thrives in acid, tropical soils that now support little or nothing;
* Is adapted to widely different conditions and climates;
* Thrives in the tropics where the year-round heat fosters tremendous
* biomassgrowth;
* Produces root matter rapidly;
* "Buries" CO2 so deep as to keep it out of the atmosphere for decades;
* Benefits the soil and surroundings;
* Provides multiple benefits in addition to any greenhouse-gas removal;
* Is easy to use and understand;
* Can protect roads, pipelines, natural-gas wells and other installations;
* Can stabilize spoil from mining and other industrial operations; and
* Is adapted to the most erosion prone, hunger prone and forest-depletedregions.
These days, interest in planting vetiver is widespread throughout the tropics. People want to plant it for their own benefit -- it doesn't have to be done for them. Small amounts of funding can therefore be put to immediate use without overheads or delays. The funds can produce huge multiplier effects. They can, for instance, be used to establish nurseries, which then go on producing planting materials in a self-sustaining manner into the foreseeable future. Vetiver seems like an exceptional tool for sequestering CO2. It can be propagated by the millions in tropical lands, and could be used to trade off against considerable volumes of emissions made elsewhere in the world. All in all, this remarkable plant has the ability to turn large amounts ofgreenhouse gases into underground solids -- all the while benefiting local soils and environments. Vetiver hedges will likely hold their stored carbon for decades. They will also benefit the lives of millions in the parts of the world that most need help.
www.vetiver.org
[[Vetiver System : Google Groups|http://groups.google.com/group/vetiver-system?hl=en]]
[[Vetiver System handbooks published June 2008 eSnips Folder|http://www.esnips.com/web/VetiverSystemhandbookspublishedJune2005]]
Farmers start by setting out contour lines in their field, using either an A-frame (made with locally available materials), a line level (adapted from a cheap carpenter’s level, so it will hang on a string), or a hand-held level (available at about US$40), useful for extension agents or groups of farmers working in larger fields. Using a hoe or similar tool, farmers make a shallow ditch along the contour line. Vetiver-grass plantlets are then planted in the ditch at about 10 cm between plants. The ditch is filled in around the roots and the soil pressed down to provide good contact between roots and surrounding soil. Adequate rainfall or initial watering is essential for adequate establishment.
Once well established, vetiver grass is highly drought tolerant and requires minimum maintenance. To enhance tillering and provide mulch to spread on the surrounding soil (a very effective erosion control practice in itself), the grass should be cut back regularly at about 30 cm above the ground. The grass will withstand burning and is not damaged by hungry buffaloes. Vetiver grass can be propagated by separating the tillers of a mature mother plant, cutting back the tops and roots to about 10-15 cm each, and planting them either directly in the field or in small plastic bags filled with soil and kept for several weeks in the nursery. Most vetiver-grass ecotypes do not produce viable seed and the grass will not spread either by seed or stolons to become a weed. Thai cassava farmers tend to prefer this method of erosion control.
Paspalum atratum hedgerows
This grass is similar to vetiver grass in that it has an erect plant type and is nearly as effective as vetiver grass in reducing erosion when planted along contour lines. The grass thrives best under humid conditions, but will survive the dry season reasonably well. The main advantages of Paspalum atratum are its capacity to reproduce vegetatively (tillers) or by seed. The latter method substantially reduces establishment costs. The small seed is dribbled into very shallow (2-3 mm deep) contour lines and lightly covered with soil. Good soil moisture is essential for germination. The second advantage is that this grass is highly palatable and is a good cut-and-carry grass for feeding cattle, buffalos, fish, and even pigs. The grass’s major disadvantage, however, is that hungry buffaloes can damage the hedgerows during the dry season. South Vietnamese cassava farmers mostly prefer this method of erosion control, as they usually also raise cattle.
Tephrosia Candida Hedgerows
This leguminous shrub is well adapted to subtropical climates with cold winters and to very acid, low-fertility soils. It also tolerates long droughts. It is easily planted by dropping seed into shallow contour lines and covering with soil. The plants are usually cut back to about 40 cm above the ground when cassava is planted. The cut stems and leaves are incorporated into the surrounding soil or spread as mulch. North Vietnamese farmers like this method because the leaves add organic matter and N to the soil, the hedgerows are easily and cheaply established from seed, and, after 3-4 years, the stems of old plants can be used as firewood. At that stage, the hedgerows will need to be replanted or the terrace risers that have formed left with native weeds. Although T. candida seeds prolifically during winter, for good seed production the plants must be sprayed for protection against pod-boring insects.
Hedgerows of either Gliricidia sepium or Leucaena leucocephala
These medium-height, leguminous shrubs produce leaves high in crude protein that can be used as feed for farm animals during the dry season or as green manure when spread out on or incorporated into the soil. Gliricidia can be planted either from stem cuttings or from seed; the latter being preferred when used as a contour hedgerow for erosion control. Leucaena is a prolific seeder and is always planted from seed. This latter species prefers high Ca soils and is not well adapted to very acid soils. Farmers of East Java, Indonesia, prefer these species as they can use the leaves as animal feed during the dry season. These hedgerows are not as effective as the grass hedgerows in reducing erosion, but they do contribute to natural terrace formation, which is itself an erosion control measure.
Intercropping
In Vietnam, many small farmers intercrop cassava, mainly with peanut. Peanut is planted either 2-3 weeks before cassava, especially in areas with a cold spring, or at the same time as cassava. Usually one or two rows of peanut are planted between rows of cassava, which are spaced at 0.8-1 m. The peanut is harvested 3½-4 months after planting and before they compete too much with cassava. The peanut protects the soil from rainfall splash and erosion, and this crop’s residues, when incorporated, contribute organic matter and N to the soil. This system usually increases the farmer’s total income, as compared to planting cassava as a monocrop.
Balanced Fertilizer Applications
Balanced applications of fertilizers will markedly increase early plant growth and thus provide a more rapid and more effective canopy to protect the soil from rainfall splash and erosion. Fertilizer application is thus a highly effective way of reducing erosion while increasing yields. What constitutes balanced fertilizer application depends on the native soil fertility and the availability and cost of alternative nutrient sources. Ideally, it consists of a combination of animal manure and chemical fertilizers high in N and K, as described under Fertility Maintenance.
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
/***
|Name|WikifyPlugin|
|Source|http://www.TiddlyTools.com/#WikifyPlugin|
|Version|1.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|substitute fields, slices, or computed values into wiki-syntax source and render results dynamically|
|Status| ALPHA - SUBJECT TO CHANGE - USE AT YOUR OWN RISK |
The "wikify" macro allows you to easily retrieve values from custom tiddler fields, tiddler slices, computed values (using javascript) or just plain old literals, and assemble them into small bits of generated wiki-syntax content that can be rendered directly into a tiddler, or used in the ViewTemplate or EditTemplate to add dynamically-generated content to each tiddler.
!!!!!Usage
<<<
The syntax for use in tiddlers:
{{{
<<wikify source value value value value ...>>
}}}
The syntax for use in templates:
{{{
<span macro='wikify source value value value value ...'></span>
}}}
where ''source'' specifies the wiki-syntax source,
followed by zero or more space-separated ''value'' parameters, specified using any of:
* ''"tiddlername::slicename"'' - a tiddler slice reference
* ''"fieldname@tiddlername"'' - a tiddler custom field reference
* ''"""{{config.options.txtUserName}}"""'' - evaluated javascript
* ''"none of the above"'' - literal text
When the initial ''source'' parameter contains //substitution markers// (using "%0" through "%9" character sequences), each value parameter is retrieved and embedded into the source content, replacing its corresponding marker. If the ''source'' parameter does //not// contain any substitution markers, then all parameters are simply joined together for output. Once the source and values have been assembled, the resulting content is then passed to the core wikify() parser to render and display it.
Notes:
* If a parameter is not recognized as fitting any of the above syntax, or if the slice/field referred to cannot be located, the reference will be inserted as literal text into the output
* When working with custom tiddler fields or tiddler slices, you can enter a special psuedo-tiddler name, ''@here'' (e.g., "fieldname@here") or ''here::'' (e.g., "here::slicename") to access custom fields and slices associated with the //current// tiddler. This //relative// reference syntax can be particularly helpful when placed directly into a ViewTemplate and/or EditTemplate definition, where it can be applied automatically to each tiddler that is displayed. Note: if you omit the ''@here'' portion of a field reference (e.g., just using "fieldname"), it is assumed to be a reference to a field in the current tiddler (i.e., it is treated as if you specified ''fieldname@here'').
<<<
!!!!!Examples
<<<
{{{
<<wikify [[This tiddler is: %0 using %1 bytes (last author: %2)]] title {{tiddler.text.length}} modifier>>
<<wikify [[The source of this plugin is: %0]] 'here::Source'>>
<<wikify [[The tiddler has been changed %0 times]] changecount@here>>
<<wikify [[The Primary Mid color is: @@background:%0;%0@@]] 'ColorPalette::PrimaryMid'>>
<<wikify [[This current user is: %0]] {{config.options.txtUserName}}>>
}}}
<<wikify [[This tiddler is: %0 using %1 bytes (last author: %2)]] title {{tiddler.text.length}} modifier>>
<<wikify [[The source of this plugin is: %0]] 'here::Source'>>
<<wikify [[The tiddler has been changed %0 times]] changecount@here>>
<<wikify [[The Primary Mid color is: @@background:%0;%0@@]] 'ColorPalette::PrimaryMid'>>
<<wikify [[This current user is: %0]] {{config.options.txtUserName}}>>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
[[WikifyPlugin]]
<<<
!!!!!Revision History
<<<
''2007.06.22 [1.0.0]'' initial release
<<<
!!!!!Credits
<<<
This feature was developed by Eric L Shulman / ELS Design Studios
<<<
!!!!!Code
***/
//{{{
version.extensions.wikify= {major: 1, minor: 0, revision: 0, date: new Date(2007,6,22)};
config.macros.wikify={
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var source=params.shift();
var values=[];
var out="";
if (!source.match(/\%[0-9]/g)) // source param has no substitution markers, just join all params
out=source+" "+params.join("");
else { // source param has markers, get values and perform substitution
while (p=params.shift()) values.push(this.getFieldReference(place,p));
out=source.format(values);
}
wikify(out,place);
},
getFieldReference: function(place,p) { // where p is "slicename::tiddlername" or "fieldname@tiddlername" or "fieldname"
if (typeof p != "string") return p; // literal non-string value... just return it...
var parts=p.split(config.textPrimitives.sliceSeparator);
if (parts.length==2) {// maybe a slice reference?
var tid=parts[0]; var slice=parts[1];
if (!tid || !tid.length || tid=="here") { // no target specified (or "here" placeholder), use containing tiddler
tid=story.findContainingTiddler(place);
if (tid) tid=tid.getAttribute("tiddler")
else tid="SiteSlices"; // fallback for references from 'non-tiddler' areas (e.g, header, sidebar, etc.)
}
var val=store.getTiddlerSlice(tid,slice); // get tiddler slice value
}
if (val==undefined) {// not a slice reference, or slice not found, maybe a field reference?
var parts=p.split("@");
var field=parts[0];
if (!field || !field.length) field="checked"; // fallback for missing fieldname (e.g., "@tiddlername")
var tid=parts[1];
if (!tid || !tid.length || tid=="here") { // no target specified (or "here" placeholder), use containing tiddler
tid=story.findContainingTiddler(place);
if (tid) tid=tid.getAttribute("tiddler")
else tid="SiteFields"; // fallback for references from 'non-tiddler' areas (e.g, header, sidebar, etc.)
}
var val=store.getValue(tid,field);
}
// not a slice, not a field, or slice/field not found... use original param value
return val===undefined?p:val;
}
}
//}}}
Vetiver Grass Application Guide
Purpose of this guide
Vetiver grass is a unique tropical grass used in nearly 100 countries for soil and water conservation, environmental protection (through bioengineering and phytoremediation), and disaster mitigation. The plant can be grown over a very wide range of climatic and soil conditions, and if planted correctly can be used virtually anywhere under tropical, semi-tropical, and Mediterranean climates. When used correctly, under the guidelines of The Vetiver System (VS), it becomes a very practical, inexpensive, low maintenance, and very effective means of soil erosion and sediment controls, water conservation, and land stabilization and rehabilitation.
The species of Vetiveria zizanioides, that is promoted for VS applications originates in south India, is sterile, non invasive and has to be propagated by clump subdivision. In 1999, however, there was a change of the generic name of vetiver into Chrysopogon. This has given rise to a new scientific name of vetiver as Chrysopogon zizanioides (L.) Roberty.
Note that only the generic name has been changed. Such a change was reluctantly made by a plant taxonomist named J.F. Veldkamp, the Editor of grasses for the Flora Malesiana at Leiden University, the Netherlands, published in Austrobaieya (Veldkamp 1999). Taxonomic information that Veldkamp reported has confirmed the long-standing belief among plant taxonomists that there are no consistent morphological difference between the genus Vetiveria and the genus Chrysopogon to differentiate them into two separate genera. Since Chrysopogon was the first-named genus, and based on the principle of botanical priority, Veldkamp had no choice but to reduce or combine the genus Vetiveria into Chrysopogon.
In spite of the above change, vetiverites all over the world still refer to Vetiver as Vetiveria, not Chrysopogon to avoid confusion. After all, it is the old name used for almost a century, and the name Vetiveria originated in India from a vernacular name in Tamil, “vetiver”, meaning the grass that is dug out. For the purpose of this guide, we will use the common name of this grass - “Vetiver”, which has been used all over the world for a long time.
This guide can not attempt to cover in depth all the many uses of this grass or all the details of of using Vetiver Grass in an industrial scale. Still, even in small scale, diligent use of a few plants around a property can provide a simple and inexpensive solution to land stabilization and soil erosion problems. For large projects or severe conditions, the reader should study the additional information sources listed below or consult with a soil conservation professional. In most cases, failure in the use of Vetiver grass is due to improper understanding or incorrect applications rather than to the Vetiver System itself.
Soil Stabilization - a general guide
Vetiver grass does not have stolons or rhizomes. Its massive, finely structured root system can grow very fast - in some applications, rooting depth can reach 10-12 ft (3-4 m) in the first year. This deep root system makes the Vetiver plant extremely drought tolerant and difficult to dislodge by strong current. It also has stiff and erect stems, which can stand up to relatively deep water flow. New shoots will develop from the underground crown, making Vetiver resistant to fire, frosts, traffic and heavy grazing pressure. Vetiver Grass is not affected to any significant extent by pests and diseases, nor does it act as a host for pests or diseases that might attack crop or garden plants.
The basic technique of soil stabilization using Vetiver consists of one or more hedgerows planted on the contour. Nursery clumps are divided into planting slips of about 3 tillers each, and typically planted 6 inches (15 cm) apart on the contour to create, when mature, a barrier of stiff grass that acts as a buffer and spreader of down slope water flow, and a filter to sediment. Multiple hedgerows may be required to stabilize a slope. The development of strong plants and a deep root system requires full sun. Partial shading stunts its growth, and significant shading can eliminate it in the long term by reducing its ability to compete with more shade-tolerant species.
When multiple hedgerows are required, each row must be planted with the same separation of 6 inches between plants. The separation between rows will depend on the slope, soil condition and composition, and the severity of the problem. As a rule of thumb, typical distances in domestic environment should range between three and six feet. Some published guidelines recommend a distance between rows of about 5.7 ft. (1.7 m) for a 30° slope, and about 3 ft. (1 m) for a 45° slope.
A good hedge will reduce rainfall run off by as much as 70% and sediment by as much as 90%. A hedgerow will stay where it is planted and the sediment that is spread out behind the hedgerow gradually accumulates to form a long lasting terrace with Vetiver protection. It is a very low cost, labor intensive technology with very high benefit/cost ratio. When used for civil works protection, its cost is about 1/20 of traditional engineered systems and designs. Engineers compare the Vetiver root to a "Living Soil Nail" with an average tensile strength of 1/6 of mild steel. Vetiver hedges are fully effective only when plants form closed hedgerows. Gaps between clumps should be timely re-planted.
A very important characteristic of the "domesticated" Vetiver varieties from southern India used in The Vetiver System is that it does not normally produce seed and stays where it was planted. In some countries Vetiver has even been used to define property lines and hedgerows will not invade other areas of the property. Vetiver hedges are a natural, soft bioengineering technique - an eco-friendly alternative to rigid or hard structures. Being vegetative, it is also visually acceptable in any neighborhood.
Additional Resources
Vetiver Grass source: Agriflora Tropicals - eBay Store
Additional Vetiver information sources: Vetiver Information Page
Source: [[eBay Guides - Vetiver Grass Application Guide|http://reviews.ebay.com/Vetiver-Grass-Application-Guide_W0QQugidZ10000000005875095]]