Index: tags/extensions/SemanticFormsInputs/REL_0_4/SemanticFormsInputs.i18n.php |
— | — | @@ -0,0 +1,454 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Language file for Semantic Forms Inputs |
| 5 | + */ |
| 6 | + |
| 7 | +$messages = array(); |
| 8 | + |
| 9 | +$messages['en'] = array( |
| 10 | + 'semanticformsinputs-desc' => 'Additional input types for [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 11 | + 'semanticformsinputs-wrongformat' => 'Wrong format.', |
| 12 | + 'semanticformsinputs-close' => 'Close', |
| 13 | + 'semanticformsinputs-prev' => 'Previous', |
| 14 | + 'semanticformsinputs-next' => 'Next', |
| 15 | + 'semanticformsinputs-today' => 'Today', |
| 16 | + 'semanticformsinputs-dateformatlong' => 'd MM yy', // see http://docs.jquery.com/UI/Datepicker/formatDate |
| 17 | + 'semanticformsinputs-dateformatshort' => 'dd/mm/yy', // see http://docs.jquery.com/UI/Datepicker/formatDate |
| 18 | + 'semanticformsinputs-firstdayofweek' => '0' // 0 - sunday, 1 - monday... |
| 19 | +); |
| 20 | + |
| 21 | +/** Message documentation (Message documentation) |
| 22 | + * @author EugeneZelenko |
| 23 | + * @author Siebrand |
| 24 | + * @author The Evil IP address |
| 25 | + */ |
| 26 | +$messages['qqq'] = array( |
| 27 | + 'semanticformsinputs-desc' => '{{desc}}', |
| 28 | + 'semanticformsinputs-close' => '{{Identical|Close}}', |
| 29 | + 'semanticformsinputs-prev' => '{{Identical|Previous}}', |
| 30 | + 'semanticformsinputs-next' => '{{Identical|Next}}', |
| 31 | + 'semanticformsinputs-dateformatlong' => 'This is a machine-readable date format string! It is used by a function to format a date. It will not be read by a human user. Do not translate each letter literally! Instead insert the date format for your language using the english-based letters. See http://docs.jquery.com/UI/Datepicker/formatDate', |
| 32 | + 'semanticformsinputs-dateformatshort' => 'This is a machine-readable date format string! It is used by a function to format a date. It will not be read by a human user. Do not translate each letter literally! Instead insert the date format for your language using the english-based letters. See http://docs.jquery.com/UI/Datepicker/formatDate', |
| 33 | +); |
| 34 | + |
| 35 | +/** Afrikaans (Afrikaans) |
| 36 | + * @author Naudefj |
| 37 | + */ |
| 38 | +$messages['af'] = array( |
| 39 | + 'semanticformsinputs-desc' => 'Ekstra invoertipes vir [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 40 | + 'semanticformsinputs-wrongformat' => 'Verkeerde formaat.', |
| 41 | + 'semanticformsinputs-close' => 'Sluit', |
| 42 | + 'semanticformsinputs-prev' => 'Vorige', |
| 43 | + 'semanticformsinputs-next' => 'Volgende', |
| 44 | + 'semanticformsinputs-today' => 'Vandag', |
| 45 | +); |
| 46 | + |
| 47 | +/** Aramaic (ܐܪܡܝܐ) |
| 48 | + * @author Basharh |
| 49 | + */ |
| 50 | +$messages['arc'] = array( |
| 51 | + 'semanticformsinputs-close' => 'ܣܟܘܪ', |
| 52 | + 'semanticformsinputs-prev' => 'ܩܕܡ', |
| 53 | + 'semanticformsinputs-next' => 'ܒܬܪ', |
| 54 | + 'semanticformsinputs-today' => 'ܝܘܡܢܐ', |
| 55 | +); |
| 56 | + |
| 57 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 58 | + * @author EugeneZelenko |
| 59 | + * @author Jim-by |
| 60 | + */ |
| 61 | +$messages['be-tarask'] = array( |
| 62 | + 'semanticformsinputs-desc' => 'Дадатковыя тыпы ўводу для [http://www.mediawiki.org/wiki/Extension:Semantic_Forms сэмантычных формаў]', |
| 63 | + 'semanticformsinputs-wrongformat' => 'Няслушны фармат.', |
| 64 | + 'semanticformsinputs-close' => 'Закрыць', |
| 65 | + 'semanticformsinputs-prev' => 'Папярэдняе', |
| 66 | + 'semanticformsinputs-next' => 'Наступнае', |
| 67 | + 'semanticformsinputs-today' => 'Сёньня', |
| 68 | +); |
| 69 | + |
| 70 | +/** Breton (Brezhoneg) |
| 71 | + * @author Gwendal |
| 72 | + * @author Y-M D |
| 73 | + */ |
| 74 | +$messages['br'] = array( |
| 75 | + 'semanticformsinputs-desc' => 'Doareoù moned ouzhpenn evit [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 76 | + 'semanticformsinputs-wrongformat' => 'Furmad fall.', |
| 77 | + 'semanticformsinputs-close' => 'Serriñ', |
| 78 | + 'semanticformsinputs-prev' => 'Kent', |
| 79 | + 'semanticformsinputs-next' => "War-lerc'h", |
| 80 | + 'semanticformsinputs-today' => 'Hiziv', |
| 81 | +); |
| 82 | + |
| 83 | +/** Bosnian (Bosanski) |
| 84 | + * @author CERminator |
| 85 | + */ |
| 86 | +$messages['bs'] = array( |
| 87 | + 'semanticformsinputs-desc' => 'Dodatne vrste unosa za [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantičke forme]', |
| 88 | + 'semanticformsinputs-wrongformat' => 'Pogrešan format.', |
| 89 | + 'semanticformsinputs-close' => 'Zatvori', |
| 90 | + 'semanticformsinputs-prev' => 'Prethodno', |
| 91 | + 'semanticformsinputs-next' => 'Slijedeće', |
| 92 | + 'semanticformsinputs-today' => 'Danas', |
| 93 | +); |
| 94 | + |
| 95 | +/** Catalan (Català) |
| 96 | + * @author Toniher |
| 97 | + */ |
| 98 | +$messages['ca'] = array( |
| 99 | + 'semanticformsinputs-desc' => "Tipus d'entrada addicionals per al [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]", |
| 100 | + 'semanticformsinputs-wrongformat' => 'Format incorrecte.', |
| 101 | + 'semanticformsinputs-close' => 'Tanca', |
| 102 | + 'semanticformsinputs-prev' => 'Anterior', |
| 103 | + 'semanticformsinputs-next' => 'Següent', |
| 104 | + 'semanticformsinputs-today' => 'Avui', |
| 105 | +); |
| 106 | + |
| 107 | +/** Czech (Česky) */ |
| 108 | +$messages['cs'] = array( |
| 109 | + 'semanticformsinputs-close' => 'Zavřít', |
| 110 | + 'semanticformsinputs-prev' => 'Předchozí', |
| 111 | + 'semanticformsinputs-next' => 'Další', |
| 112 | +); |
| 113 | + |
| 114 | +/** German (Deutsch) |
| 115 | + * @author Kghbln |
| 116 | + */ |
| 117 | +$messages['de'] = array( |
| 118 | + 'semanticformsinputs-desc' => 'Ermöglicht zusätzliche Eingabearten für [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 119 | + 'semanticformsinputs-wrongformat' => 'Falsches Format.', |
| 120 | + 'semanticformsinputs-close' => 'Schließen', |
| 121 | + 'semanticformsinputs-prev' => 'Voriger Monat', |
| 122 | + 'semanticformsinputs-next' => 'Nächster Monat', |
| 123 | + 'semanticformsinputs-today' => 'Heute', |
| 124 | + 'semanticformsinputs-dateformatlong' => 'd. MM yy', |
| 125 | + 'semanticformsinputs-dateformatshort' => 'dd.mm.yy', |
| 126 | + 'semanticformsinputs-firstdayofweek' => '1', |
| 127 | +); |
| 128 | + |
| 129 | +/** Lower Sorbian (Dolnoserbski) |
| 130 | + * @author Michawiki |
| 131 | + */ |
| 132 | +$messages['dsb'] = array( |
| 133 | + 'semanticformsinputs-desc' => 'Pśidatne zapódawańske typy [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 134 | + 'semanticformsinputs-wrongformat' => 'Wopacny format', |
| 135 | + 'semanticformsinputs-close' => 'Zacyniś', |
| 136 | + 'semanticformsinputs-prev' => 'Pjerwjejšny', |
| 137 | + 'semanticformsinputs-next' => 'Pśiducy', |
| 138 | + 'semanticformsinputs-today' => 'Źinsa', |
| 139 | +); |
| 140 | + |
| 141 | +/** Spanish (Español) |
| 142 | + * @author Danke7 |
| 143 | + * @author Translationista |
| 144 | + */ |
| 145 | +$messages['es'] = array( |
| 146 | + 'semanticformsinputs-desc' => 'Tipos de entrada adicionales para [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Formularios Semánticos]', |
| 147 | + 'semanticformsinputs-wrongformat' => 'Formato incorrecto.', |
| 148 | + 'semanticformsinputs-close' => 'Cerrar', |
| 149 | + 'semanticformsinputs-prev' => 'Anterior', |
| 150 | + 'semanticformsinputs-next' => 'Siguiente', |
| 151 | + 'semanticformsinputs-today' => 'Hoy', |
| 152 | +); |
| 153 | + |
| 154 | +/** French (Français) |
| 155 | + * @author F.trott |
| 156 | + * @author IAlex |
| 157 | + */ |
| 158 | +$messages['fr'] = array( |
| 159 | + 'semanticformsinputs-desc' => "Types d'entrées additionnelles pour [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Formulaires sémantiques]", |
| 160 | + 'semanticformsinputs-wrongformat' => 'Format erroné.', |
| 161 | + 'semanticformsinputs-close' => 'Fermer', |
| 162 | + 'semanticformsinputs-prev' => 'Précédent', |
| 163 | + 'semanticformsinputs-next' => 'Suivant', |
| 164 | + 'semanticformsinputs-today' => "Aujourd'hui", |
| 165 | + 'semanticformsinputs-dateformatshort' => 'dd / mm / yy', |
| 166 | + 'semanticformsinputs-firstdayofweek' => '0', |
| 167 | +); |
| 168 | + |
| 169 | +/** Franco-Provençal (Arpetan) |
| 170 | + * @author ChrisPtDe |
| 171 | + */ |
| 172 | +$messages['frp'] = array( |
| 173 | + 'semanticformsinputs-wrongformat' => 'Crouyo format.', |
| 174 | +); |
| 175 | + |
| 176 | +/** Galician (Galego) |
| 177 | + * @author Toliño |
| 178 | + */ |
| 179 | +$messages['gl'] = array( |
| 180 | + 'semanticformsinputs-desc' => 'Tipos de entrada adicionais para os [http://www.mediawiki.org/wiki/Extension:Semantic_Forms formularios semánticos]', |
| 181 | + 'semanticformsinputs-wrongformat' => 'Formato incorrecto.', |
| 182 | + 'semanticformsinputs-close' => 'Pechar', |
| 183 | + 'semanticformsinputs-prev' => 'Anterior', |
| 184 | + 'semanticformsinputs-next' => 'Seguinte', |
| 185 | + 'semanticformsinputs-today' => 'Hoxe', |
| 186 | +); |
| 187 | + |
| 188 | +/** Swiss German (Alemannisch) |
| 189 | + * @author Als-Holder |
| 190 | + */ |
| 191 | +$messages['gsw'] = array( |
| 192 | + 'semanticformsinputs-desc' => 'Mecht zuesätzligi Arte vu Yygabe megli fir [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 193 | + 'semanticformsinputs-wrongformat' => 'Falsch Format.', |
| 194 | + 'semanticformsinputs-close' => 'Zuemache', |
| 195 | + 'semanticformsinputs-prev' => 'Vorigi', |
| 196 | + 'semanticformsinputs-next' => 'Negschti', |
| 197 | + 'semanticformsinputs-today' => 'Hit', |
| 198 | +); |
| 199 | + |
| 200 | +/** Hebrew (עברית) |
| 201 | + * @author YaronSh |
| 202 | + */ |
| 203 | +$messages['he'] = array( |
| 204 | + 'semanticformsinputs-desc' => 'סוגי קלט נוספים עבור [http://www.mediawiki.org/wiki/Extension:Semantic_Forms טפסים סמנטיים]', |
| 205 | + 'semanticformsinputs-wrongformat' => 'מבנה שגוי.', |
| 206 | + 'semanticformsinputs-close' => 'סגירה', |
| 207 | + 'semanticformsinputs-prev' => 'הקודם', |
| 208 | + 'semanticformsinputs-next' => 'הבא', |
| 209 | + 'semanticformsinputs-today' => 'היום', |
| 210 | +); |
| 211 | + |
| 212 | +/** Upper Sorbian (Hornjoserbsce) |
| 213 | + * @author Michawiki |
| 214 | + */ |
| 215 | +$messages['hsb'] = array( |
| 216 | + 'semanticformsinputs-desc' => 'Přidatne zapodawanske typy za [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 217 | + 'semanticformsinputs-wrongformat' => 'Wopačny format', |
| 218 | + 'semanticformsinputs-close' => 'Začinić', |
| 219 | + 'semanticformsinputs-prev' => 'Předchadny', |
| 220 | + 'semanticformsinputs-next' => 'Přichodny', |
| 221 | + 'semanticformsinputs-today' => 'Dźensa', |
| 222 | +); |
| 223 | + |
| 224 | +/** Hungarian (Magyar) |
| 225 | + * @author Dani |
| 226 | + */ |
| 227 | +$messages['hu'] = array( |
| 228 | + 'semanticformsinputs-wrongformat' => 'Hibás formátum.', |
| 229 | + 'semanticformsinputs-close' => 'Bezárás', |
| 230 | + 'semanticformsinputs-prev' => 'Előző', |
| 231 | + 'semanticformsinputs-next' => 'Következő', |
| 232 | + 'semanticformsinputs-today' => 'Ma', |
| 233 | +); |
| 234 | + |
| 235 | +/** Interlingua (Interlingua) |
| 236 | + * @author McDutchie |
| 237 | + */ |
| 238 | +$messages['ia'] = array( |
| 239 | + 'semanticformsinputs-desc' => 'Additional typos de entrata pro [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Formularios Semantic]', |
| 240 | + 'semanticformsinputs-wrongformat' => 'Formato incorrecte.', |
| 241 | + 'semanticformsinputs-close' => 'Clauder', |
| 242 | + 'semanticformsinputs-prev' => 'Precedente', |
| 243 | + 'semanticformsinputs-next' => 'Sequente', |
| 244 | + 'semanticformsinputs-today' => 'Hodie', |
| 245 | +); |
| 246 | + |
| 247 | +/** Indonesian (Bahasa Indonesia) |
| 248 | + * @author Farras |
| 249 | + * @author IvanLanin |
| 250 | + */ |
| 251 | +$messages['id'] = array( |
| 252 | + 'semanticformsinputs-desc' => 'Jenis masukan tambahan untuk [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 253 | + 'semanticformsinputs-wrongformat' => 'Format salah.', |
| 254 | + 'semanticformsinputs-close' => 'Penutup', |
| 255 | + 'semanticformsinputs-prev' => 'Sebelumnya', |
| 256 | + 'semanticformsinputs-next' => 'Selanjutnya', |
| 257 | + 'semanticformsinputs-today' => 'Hari ini', |
| 258 | +); |
| 259 | + |
| 260 | +/** Japanese (日本語) |
| 261 | + * @author Yanajin66 |
| 262 | + * @author 青子守歌 |
| 263 | + */ |
| 264 | +$messages['ja'] = array( |
| 265 | + 'semanticformsinputs-desc' => ' [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]のための追加の入力タイプ', |
| 266 | + 'semanticformsinputs-wrongformat' => '間違った形式です。', |
| 267 | + 'semanticformsinputs-close' => '閉じる', |
| 268 | + 'semanticformsinputs-prev' => '前へ', |
| 269 | + 'semanticformsinputs-next' => '次へ', |
| 270 | + 'semanticformsinputs-today' => '今日', |
| 271 | +); |
| 272 | + |
| 273 | +/** Luxembourgish (Lëtzebuergesch) |
| 274 | + * @author Robby |
| 275 | + */ |
| 276 | +$messages['lb'] = array( |
| 277 | + 'semanticformsinputs-desc' => "Zousätzlech Manéieren fir d'Eraginn fir [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Formulairen]", |
| 278 | + 'semanticformsinputs-wrongformat' => 'Falsche Format.', |
| 279 | + 'semanticformsinputs-close' => 'Zoumaachen', |
| 280 | + 'semanticformsinputs-prev' => 'Vireg', |
| 281 | + 'semanticformsinputs-next' => 'Nächst', |
| 282 | + 'semanticformsinputs-today' => 'Haut', |
| 283 | +); |
| 284 | + |
| 285 | +/** Macedonian (Македонски) |
| 286 | + * @author Bjankuloski06 |
| 287 | + */ |
| 288 | +$messages['mk'] = array( |
| 289 | + 'semanticformsinputs-desc' => 'Дополнителни типови на внос за [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Семантички обрасци]', |
| 290 | + 'semanticformsinputs-wrongformat' => 'Погрешен формат.', |
| 291 | + 'semanticformsinputs-close' => 'Затвори', |
| 292 | + 'semanticformsinputs-prev' => 'Претходно', |
| 293 | + 'semanticformsinputs-next' => 'Следно', |
| 294 | + 'semanticformsinputs-today' => 'Денес', |
| 295 | +); |
| 296 | + |
| 297 | +/** Malayalam (മലയാളം) |
| 298 | + * @author Praveenp |
| 299 | + */ |
| 300 | +$messages['ml'] = array( |
| 301 | + 'semanticformsinputs-close' => 'അടയ്ക്കുക', |
| 302 | + 'semanticformsinputs-prev' => 'മുൻപത്തേത്', |
| 303 | + 'semanticformsinputs-next' => 'അടുത്തത്', |
| 304 | + 'semanticformsinputs-today' => 'ഇന്ന്', |
| 305 | +); |
| 306 | + |
| 307 | +/** Dutch (Nederlands) |
| 308 | + * @author Siebrand |
| 309 | + */ |
| 310 | +$messages['nl'] = array( |
| 311 | + 'semanticformsinputs-desc' => 'Extra invoertypen voor [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 312 | + 'semanticformsinputs-wrongformat' => 'Onjuiste opmaak.', |
| 313 | + 'semanticformsinputs-close' => 'Sluiten', |
| 314 | + 'semanticformsinputs-prev' => 'Vorige', |
| 315 | + 'semanticformsinputs-next' => 'Volgende', |
| 316 | + 'semanticformsinputs-today' => 'Vandaag', |
| 317 | +); |
| 318 | + |
| 319 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 320 | + * @author Nghtwlkr |
| 321 | + */ |
| 322 | +$messages['no'] = array( |
| 323 | + 'semanticformsinputs-desc' => 'Ekstra inndatatyper for [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms]', |
| 324 | + 'semanticformsinputs-wrongformat' => 'Feil format.', |
| 325 | + 'semanticformsinputs-close' => 'Lukk', |
| 326 | + 'semanticformsinputs-prev' => 'Forrige', |
| 327 | + 'semanticformsinputs-next' => 'Neste', |
| 328 | + 'semanticformsinputs-today' => 'I dag', |
| 329 | +); |
| 330 | + |
| 331 | +/** Deitsch (Deitsch) |
| 332 | + * @author Xqt |
| 333 | + */ |
| 334 | +$messages['pdc'] = array( |
| 335 | + 'semanticformsinputs-next' => 'Neegschte', |
| 336 | +); |
| 337 | + |
| 338 | +/** Pfälzisch (Pfälzisch) |
| 339 | + * @author Xqt |
| 340 | + */ |
| 341 | +$messages['pfl'] = array( |
| 342 | + 'semanticformsinputs-prev' => 'Voriche', |
| 343 | + 'semanticformsinputs-next' => 'Negschte', |
| 344 | +); |
| 345 | + |
| 346 | +/** Polish (Polski) |
| 347 | + * @author Sp5uhe |
| 348 | + */ |
| 349 | +$messages['pl'] = array( |
| 350 | + 'semanticformsinputs-desc' => 'Dodatkowe typy wejściowe dla [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Formularzy Semantycznych]', |
| 351 | + 'semanticformsinputs-wrongformat' => 'Niewłaściwy format.', |
| 352 | + 'semanticformsinputs-close' => 'Zamknij', |
| 353 | + 'semanticformsinputs-prev' => 'Poprzednie', |
| 354 | + 'semanticformsinputs-next' => 'Następne', |
| 355 | + 'semanticformsinputs-today' => 'Dziś', |
| 356 | +); |
| 357 | + |
| 358 | +/** Piedmontese (Piemontèis) |
| 359 | + * @author Borichèt |
| 360 | + * @author Dragonòt |
| 361 | + */ |
| 362 | +$messages['pms'] = array( |
| 363 | + 'semanticformsinputs-desc' => "Sòrt d'intrade adissionaj për [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Formolari Semàntich]", |
| 364 | + 'semanticformsinputs-wrongformat' => 'Formà pa bon.', |
| 365 | + 'semanticformsinputs-close' => 'Sara', |
| 366 | + 'semanticformsinputs-prev' => 'Prima', |
| 367 | + 'semanticformsinputs-next' => 'Apress', |
| 368 | + 'semanticformsinputs-today' => 'Ancheuj', |
| 369 | +); |
| 370 | + |
| 371 | +/** Portuguese (Português) |
| 372 | + * @author Hamilton Abreu |
| 373 | + */ |
| 374 | +$messages['pt'] = array( |
| 375 | + 'semanticformsinputs-desc' => 'Tipos de entrada adicionais para [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Formulários Semânticos]', |
| 376 | + 'semanticformsinputs-wrongformat' => 'Formato incorrecto.', |
| 377 | + 'semanticformsinputs-close' => 'Fechar', |
| 378 | + 'semanticformsinputs-prev' => 'Anterior', |
| 379 | + 'semanticformsinputs-next' => 'Seguinte', |
| 380 | + 'semanticformsinputs-today' => 'Hoje', |
| 381 | +); |
| 382 | + |
| 383 | +/** Brazilian Portuguese (Português do Brasil) |
| 384 | + * @author Giro720 |
| 385 | + */ |
| 386 | +$messages['pt-br'] = array( |
| 387 | + 'semanticformsinputs-desc' => 'Tipos de entrada adicionais para [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Formulários Semânticos]', |
| 388 | + 'semanticformsinputs-wrongformat' => 'Formato incorreto.', |
| 389 | + 'semanticformsinputs-close' => 'Fechar', |
| 390 | + 'semanticformsinputs-prev' => 'Anterior', |
| 391 | + 'semanticformsinputs-next' => 'Seguinte', |
| 392 | + 'semanticformsinputs-today' => 'Hoje', |
| 393 | +); |
| 394 | + |
| 395 | +/** Tarandíne (Tarandíne) |
| 396 | + * @author Joetaras |
| 397 | + */ |
| 398 | +$messages['roa-tara'] = array( |
| 399 | + 'semanticformsinputs-desc' => 'Tipe de input aggiundive pe le [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Module Semandece]', |
| 400 | + 'semanticformsinputs-wrongformat' => 'Formate sbagliate', |
| 401 | +); |
| 402 | + |
| 403 | +/** Russian (Русский) |
| 404 | + * @author MaxSem |
| 405 | + * @author Александр Сигачёв |
| 406 | + * @author Сrower |
| 407 | + */ |
| 408 | +$messages['ru'] = array( |
| 409 | + 'semanticformsinputs-desc' => 'Дополнительные входящие типы для [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Семантических Форм]', |
| 410 | + 'semanticformsinputs-wrongformat' => 'Неверный формат.', |
| 411 | + 'semanticformsinputs-close' => 'Закрыть', |
| 412 | + 'semanticformsinputs-prev' => 'Предыдущая', |
| 413 | + 'semanticformsinputs-next' => 'Следующая', |
| 414 | + 'semanticformsinputs-today' => 'Сегодня', |
| 415 | +); |
| 416 | + |
| 417 | +/** Telugu (తెలుగు) |
| 418 | + * @author Veeven |
| 419 | + */ |
| 420 | +$messages['te'] = array( |
| 421 | + 'semanticformsinputs-close' => 'మూసివేయి', |
| 422 | + 'semanticformsinputs-prev' => 'గత', |
| 423 | + 'semanticformsinputs-next' => 'తదుపరి', |
| 424 | + 'semanticformsinputs-today' => 'ఈరోజు', |
| 425 | +); |
| 426 | + |
| 427 | +/** Tagalog (Tagalog) |
| 428 | + * @author AnakngAraw |
| 429 | + */ |
| 430 | +$messages['tl'] = array( |
| 431 | + 'semanticformsinputs-desc' => 'Karagdagang mga tipo ng pagpasok para sa [http://www.mediawiki.org/wiki/Extension:Semantic_Forms Anyong Semantiko]', |
| 432 | + 'semanticformsinputs-wrongformat' => 'Maling anyo.', |
| 433 | + 'semanticformsinputs-close' => 'Isara', |
| 434 | + 'semanticformsinputs-prev' => 'Nakaraan', |
| 435 | + 'semanticformsinputs-next' => 'Susunod', |
| 436 | + 'semanticformsinputs-today' => 'Ngayon', |
| 437 | +); |
| 438 | + |
| 439 | +/** Ukrainian (Українська) |
| 440 | + * @author Тест |
| 441 | + */ |
| 442 | +$messages['uk'] = array( |
| 443 | + 'semanticformsinputs-close' => 'Закрити', |
| 444 | + 'semanticformsinputs-prev' => 'Попередня', |
| 445 | + 'semanticformsinputs-next' => 'Наступна', |
| 446 | +); |
| 447 | + |
| 448 | +/** Simplified Chinese (中文(简体)) */ |
| 449 | +$messages['zh-hans'] = array( |
| 450 | + 'semanticformsinputs-close' => '关闭', |
| 451 | + 'semanticformsinputs-prev' => '向前', |
| 452 | + 'semanticformsinputs-next' => '下一个', |
| 453 | + 'semanticformsinputs-today' => '今天', |
| 454 | +); |
| 455 | + |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/SemanticFormsInputs.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 456 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/SemanticFormsInputs.php |
— | — | @@ -0,0 +1,82 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Additional input types for [http://www.mediawiki.org/wiki/Extension:SemanticForms Semantic Forms]. |
| 5 | + * |
| 6 | + * @author Stephan Gambke |
| 7 | + * @author Sanyam Goyal |
| 8 | + * @version 0.4 |
| 9 | + */ |
| 10 | + |
| 11 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 12 | + die( 'This file is a MediaWiki extension, it is not a valid entry point.' ); |
| 13 | +} |
| 14 | + |
| 15 | +if ( !defined( 'SF_VERSION' ) ) { |
| 16 | + die( 'This is a Semantic Forms extension. You need to install Semantic Forms first.' ); |
| 17 | +} |
| 18 | + |
| 19 | +define( 'SFI_VERSION', '0.4' ); |
| 20 | + |
| 21 | +// create and initialize settings |
| 22 | +$sfigSettings = new SFISettings(); |
| 23 | + |
| 24 | +// register extension |
| 25 | +$wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array( |
| 26 | + 'path' => __FILE__, |
| 27 | + 'name' => 'Semantic Forms Inputs', |
| 28 | + 'author' => array( '[http://www.mediawiki.org/wiki/User:F.trott Stephan Gambke]', 'Sanyam Goyal', 'Yaron Koren' ), |
| 29 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs', |
| 30 | + 'descriptionmsg' => 'semanticformsinputs-desc', |
| 31 | + 'version' => SFI_VERSION, |
| 32 | +); |
| 33 | + |
| 34 | +$dir = dirname( __FILE__ ); |
| 35 | + |
| 36 | +// load user settings |
| 37 | +require_once( $dir . '/SFI_Settings.php' ); |
| 38 | + |
| 39 | +$wgExtensionMessagesFiles['SemanticFormsInputs'] = $dir . '/SemanticFormsInputs.i18n.php'; |
| 40 | +$wgExtensionFunctions[] = "wfSFISetup"; |
| 41 | +$wgAutoloadClasses['SFIInputs'] = $dir . '/SFI_Inputs.php'; |
| 42 | + |
| 43 | +/* |
| 44 | + * Class to encapsulate all settings |
| 45 | + */ |
| 46 | +class SFISettings { |
| 47 | + // general settings |
| 48 | + public $scriptPath; |
| 49 | + //public $yuiBase; |
| 50 | + |
| 51 | + // settings for input type datepicker |
| 52 | + public $datePickerFirstDate; |
| 53 | + public $datePickerLastDate; |
| 54 | + public $datePickerDateFormat; |
| 55 | + public $datePickerWeekStart; |
| 56 | + public $datePickerShowWeekNumbers; |
| 57 | + public $datePickerDisableInputField; |
| 58 | + public $datePickerShowResetButton; |
| 59 | + public $datePickerDisabledDaysOfWeek; |
| 60 | + public $datePickerHighlightedDaysOfWeek; |
| 61 | + public $datePickerDisabledDates; |
| 62 | + public $datePickerHighlightedDates; |
| 63 | + public $datePickerMonthNames; |
| 64 | + public $datePickerDayNames; |
| 65 | +} |
| 66 | + |
| 67 | +/* |
| 68 | + * Registers the input types with Semantic Forms. |
| 69 | + */ |
| 70 | +function wfSFISetup() { |
| 71 | + global $sfgFormPrinter, $wgOut; |
| 72 | + |
| 73 | + $sfgFormPrinter->setInputTypeHook( 'regexp', array( 'SFIInputs', 'regexpHTML' ), array() ); |
| 74 | + $sfgFormPrinter->setInputTypeHook( 'datepicker', array( 'SFIInputs', 'jqDatePickerHTML' ), array() ); |
| 75 | + $sfgFormPrinter->setInputTypeHook( 'simpledatepicker', array( 'SFIInputs', 'jqDatePickerHTML' ), array() ); |
| 76 | + $sfgFormPrinter->setInputTypeHook( 'timepicker', array( 'SFIInputs', 'timepickerHTML' ), array() ); |
| 77 | + $sfgFormPrinter->setInputTypeHook( 'datetimepicker', array( 'SFIInputs', 'datetimepickerHTML' ), array() ); |
| 78 | +// $sfgFormPrinter->setInputTypeHook( 'wysiwyg', array( 'SFIInputs', 'wysiwygHTML' ), array() ); |
| 79 | + $sfgFormPrinter->setInputTypeHook( 'menuselect', array( 'SFIInputs', 'menuselectHTML' ), array() ); |
| 80 | + |
| 81 | + // TODO: obsolete as of MW 1.16, remove around 1.18 or so |
| 82 | + wfLoadExtensionMessages( 'SemanticFormsInputs' ); |
| 83 | +} |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/SemanticFormsInputs.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 84 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerResetButton.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerResetButton.gif |
___________________________________________________________________ |
Added: svn:mime-type |
2 | 85 | + image/gif |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerButtonDisabled.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerButtonDisabled.gif |
___________________________________________________________________ |
Added: svn:mime-type |
3 | 86 | + application/octet-stream |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/MenuSelectArrow.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/MenuSelectArrow.gif |
___________________________________________________________________ |
Added: svn:mime-type |
4 | 87 | + image/gif |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerButtonDisabled.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerButtonDisabled.gif |
___________________________________________________________________ |
Added: svn:mime-type |
5 | 88 | + image/gif |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/DateTimePickerResetButtonDisabled.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/DateTimePickerResetButtonDisabled.gif |
___________________________________________________________________ |
Added: svn:mime-type |
6 | 89 | + image/gif |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerResetButtonDisabled.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerResetButtonDisabled.gif |
___________________________________________________________________ |
Added: svn:mime-type |
7 | 90 | + application/octet-stream |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerResetButtonDisabled.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerResetButtonDisabled.gif |
___________________________________________________________________ |
Added: svn:mime-type |
8 | 91 | + image/gif |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerButton.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerButton.gif |
___________________________________________________________________ |
Added: svn:mime-type |
9 | 92 | + application/octet-stream |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerButton.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/TimePickerButton.gif |
___________________________________________________________________ |
Added: svn:mime-type |
10 | 93 | + image/gif |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/DateTimePickerResetButton.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/DateTimePickerResetButton.gif |
___________________________________________________________________ |
Added: svn:mime-type |
11 | 94 | + image/gif |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerResetButton.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/images/DatePickerResetButton.gif |
___________________________________________________________________ |
Added: svn:mime-type |
12 | 95 | + application/octet-stream |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/SFI_Settings.php |
— | — | @@ -0,0 +1,168 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Settings for the Semantic Forms Inputs extension. |
| 5 | + * |
| 6 | + * @author Stephan Gambke |
| 7 | + * @version 0.4 |
| 8 | + * |
| 9 | + * To change the default settings you can uncomment (or copy) the |
| 10 | + * examples here and adjust them to your needs. You may as well |
| 11 | + * include them in your LocalSettings.php. |
| 12 | + */ |
| 13 | + |
| 14 | +## |
| 15 | +# This is the path to your installation of Semantic Forms Inputs as |
| 16 | +# seen from the web. No final slash. |
| 17 | +# |
| 18 | +$sfigSettings->scriptPath = $wgScriptPath . '/extensions/SemanticFormsInputs'; |
| 19 | + |
| 20 | +## Date Picker Settings |
| 21 | + |
| 22 | +## |
| 23 | +# This is the first selectable date (format yyyy/mm/dd) |
| 24 | +# Sample value: '2005/01/01' |
| 25 | +# |
| 26 | +$sfigSettings->datePickerFirstDate = null; |
| 27 | + |
| 28 | +## |
| 29 | +# This is the last selectable date (format yyyy/mm/dd) |
| 30 | +# Sample value: '2015/31/12' |
| 31 | +# |
| 32 | +$sfigSettings->datePickerLastDate = null; |
| 33 | + |
| 34 | +## |
| 35 | +# The date format string used for the user input. |
| 36 | +# The date sent back to the form is fixed to yyyy/mm/dd |
| 37 | +# (that is, yy/mm/dd in the format code below). |
| 38 | +# |
| 39 | +# The format can be combinations of the following: |
| 40 | +# |
| 41 | +# d - day of month (no leading zero) |
| 42 | +# dd - day of month (two digit) |
| 43 | +# o - day of the year (no leading zeros) |
| 44 | +# oo - day of the year (three digit) |
| 45 | +# D - day name short |
| 46 | +# DD - day name long |
| 47 | +# m - month of year (no leading zero) |
| 48 | +# mm - month of year (two digit) |
| 49 | +# M - month name short |
| 50 | +# MM - month name long |
| 51 | +# y - year (two digit) |
| 52 | +# yy - year (four digit) |
| 53 | +# @ - Unix timestamp (ms since 01/01/1970) |
| 54 | +# ! - Windows ticks (100ns since 01/01/0001) |
| 55 | +# '...' - literal text |
| 56 | +# '' - single quote |
| 57 | +# anything else - literal text |
| 58 | +# |
| 59 | +# There are also a number of predefined standard date formats available: |
| 60 | +# |
| 61 | +# SHORT - short date format localized to the wiki user language |
| 62 | +# LONG - long date format localized to the wiki user language |
| 63 | +# ATOM - 'yy-mm-dd' (Same as RFC 3339/ISO 8601) |
| 64 | +# COOKIE - 'D, dd M yy' |
| 65 | +# ISO_8601 - 'yy-mm-dd' |
| 66 | +# RFC_822 - 'D, d M y' (See RFC 822) |
| 67 | +# RFC_850 - 'DD, dd-M-y' (See RFC 850) |
| 68 | +# RFC_1036 - 'D, d M y' (See RFC 1036) |
| 69 | +# RFC_1123 - 'D, d M yy' (See RFC 1123) |
| 70 | +# RFC_2822 - 'D, d M yy' (See RFC 2822) |
| 71 | +# RSS - 'D, d M y' (Same as RFC 822) |
| 72 | +# TICKS - '!' |
| 73 | +# TIMESTAMP - '@' |
| 74 | +# W3C - 'yy-mm-dd' (Same as ISO 8601) |
| 75 | +# |
| 76 | +$sfigSettings->datePickerDateFormat = 'SHORT'; |
| 77 | + |
| 78 | +## |
| 79 | +# This determines the start of the week in the display. |
| 80 | +# Set it to: 0 (Zero) for Sunday, 1 (One) for Monday etc. |
| 81 | +# If set to null the day is localized to the wiki user language |
| 82 | +# Sample value: 1 |
| 83 | +# |
| 84 | +$sfigSettings->datePickerWeekStart = null; |
| 85 | + |
| 86 | +## |
| 87 | +# This determines if the number of the week shall be shown. |
| 88 | +# |
| 89 | +$sfigSettings->datePickerShowWeekNumbers = false; |
| 90 | + |
| 91 | +## |
| 92 | +# This determines if the input field shall be disabled. The user can |
| 93 | +# only set the date via the datepicker in this case. |
| 94 | +# |
| 95 | +$sfigSettings->datePickerDisableInputField = false; |
| 96 | + |
| 97 | +## |
| 98 | +# This determines if a reset button shall be shown. This is the only |
| 99 | +# way to erase the input field if it is disabled for direct input. |
| 100 | +# |
| 101 | +$sfigSettings->datePickerShowResetButton = false; |
| 102 | + |
| 103 | +## |
| 104 | +# This is a string of disabled days of the week, i.e. days the user can not |
| 105 | +# pick. The days must be given as comma-separated list of numbers starting |
| 106 | +# with 0 for Sunday. |
| 107 | +# Sample value: "6,0" |
| 108 | +# |
| 109 | +$sfigSettings->datePickerDisabledDaysOfWeek = null; |
| 110 | + |
| 111 | +## |
| 112 | +# This is a string of highlighted days of the week. The days must be given as |
| 113 | +# comma-separated list of numbers starting with 0 for Sunday. |
| 114 | +# Sample value: "6,0" |
| 115 | +# |
| 116 | +$sfigSettings->datePickerHighlightedDaysOfWeek = null; |
| 117 | + |
| 118 | +## |
| 119 | +# This is a string of disabled dates, i.e. days the user cannot pick. The |
| 120 | +# days must be given as comma-separated list of dates or date ranges. The |
| 121 | +# format for days is yyyy/mm/dd, for date ranges use yyyy/mm/dd-yyyy/mm/dd. |
| 122 | +# Spaces are permissible. |
| 123 | +# Sample value: "2010/12/25 - 2011/01/06, 2011/05/01" |
| 124 | +# |
| 125 | +$sfigSettings->datePickerDisabledDates = null; |
| 126 | + |
| 127 | +## |
| 128 | +# This is a string of highlighted dates. The days must be given as |
| 129 | +# comma-separated list of dates or date ranges. The format for days is |
| 130 | +# yyyy/mm/dd, for date ranges use yyyy/mm/dd-yyyy/mm/dd. Spaces are |
| 131 | +# permissible. |
| 132 | +# Sample value: "2010/12/25 - 2011/01/06, 2011/05/01" |
| 133 | +# |
| 134 | +$sfigSettings->datePickerHighlightedDates = null; |
| 135 | + |
| 136 | + |
| 137 | +## Time Picker Settings |
| 138 | + |
| 139 | +## |
| 140 | +# This is the first selectable time (format hh:mm) |
| 141 | +# Sample value: '00:00' |
| 142 | +# |
| 143 | +$sfigSettings->timePickerMinTime = null; |
| 144 | + |
| 145 | +## |
| 146 | +# This is the last selectable time (format hh:mm) |
| 147 | +# Sample value: '24:00' |
| 148 | +# |
| 149 | +$sfigSettings->timePickerMaxTime = null; |
| 150 | + |
| 151 | +## |
| 152 | +# This determines if the input field shall be disabled. The user can |
| 153 | +# only set the time via the timepicker in this case. |
| 154 | +# |
| 155 | +$sfigSettings->timePickerDisableInputField = false; |
| 156 | + |
| 157 | +## |
| 158 | +# This determines if a reset button shall be shown. This is the only |
| 159 | +# way to erase the input field if it is disabled for direct input. |
| 160 | +# |
| 161 | +$sfigSettings->timePickerShowResetButton = false; |
| 162 | + |
| 163 | + |
| 164 | +## |
| 165 | +# This determines if a reset button shall be shown. This is the only |
| 166 | +# way to erase the input field if it is disabled for direct input. |
| 167 | +# |
| 168 | +$sfigSettings->datetimePickerShowResetButton = false; |
| 169 | + |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/SFI_Settings.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 170 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/skins/SFI_Timepicker.css |
— | — | @@ -0,0 +1,35 @@ |
| 2 | +/** |
| 3 | + * Style sheet for the input type timepicker. |
| 4 | + * |
| 5 | + * @author Stephan Gambke |
| 6 | + * @version 0.4 |
| 7 | + */ |
| 8 | + |
| 9 | +.SFI_timepicker { |
| 10 | + position: absolute; |
| 11 | + cursor: default; |
| 12 | + margin-top: 22px; |
| 13 | +} |
| 14 | + |
| 15 | +.SFI_timepicker ul { /* hours and minutes lists */ |
| 16 | + margin: 0px; |
| 17 | + padding: 0px; |
| 18 | + list-style: none; |
| 19 | + position: absolute; |
| 20 | +} |
| 21 | + |
| 22 | +.SFI_timepicker ul ul { /* minutes lists only */ |
| 23 | + margin-left: 24px; |
| 24 | + margin-right: 24px; |
| 25 | + margin-top: -22px; |
| 26 | +} |
| 27 | + |
| 28 | + |
| 29 | +.SFI_timepicker li { /* hours and minutes entries */ |
| 30 | + margin: 1px 0px; |
| 31 | + padding: 0px; |
| 32 | + text-align: center; |
| 33 | + line-height: 22px; |
| 34 | + width: 22px; |
| 35 | +} |
| 36 | + |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/skins/SFI_Timepicker.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 37 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/skins/SFI_Menuselect.css |
— | — | @@ -0,0 +1,60 @@ |
| 2 | +/** |
| 3 | + * Style sheet for the input type menuselect. |
| 4 | + * |
| 5 | + * @author Stephan Gambke |
| 6 | + * @version 0.4 |
| 7 | + */ |
| 8 | + |
| 9 | +.SFI_menuselect { |
| 10 | + visibility: hidden; /* will be shown by JS when setup is finished*/ |
| 11 | + display: block; |
| 12 | + cursor: default; |
| 13 | + position: absolute; |
| 14 | +} |
| 15 | + |
| 16 | +.SFI_menuselect a { |
| 17 | + cursor: default; |
| 18 | +} |
| 19 | + |
| 20 | +.SFI_menuselect ul { /* all lists */ |
| 21 | + margin: 0px; |
| 22 | + padding: 0px; |
| 23 | + /*margin: -20px; |
| 24 | + padding: 20px;*/ |
| 25 | + list-style: none; |
| 26 | + position: absolute; |
| 27 | + display: inline; |
| 28 | +} |
| 29 | + |
| 30 | +.SFI_menuselect ul ul { /* sub-item lists only */ |
| 31 | + margin-left: 2px; |
| 32 | + margin-right: 2px; |
| 33 | + margin-top: -2px; |
| 34 | + /*margin-left: -18px; |
| 35 | + margin-right: -18px; |
| 36 | + margin-top: -22px;*/ |
| 37 | +} |
| 38 | + |
| 39 | + |
| 40 | +.SFI_menuselect li { /* all entries */ |
| 41 | + margin: 1px 0px; |
| 42 | + padding: 0px 0px; |
| 43 | + text-align: left; |
| 44 | + /*position: static;*/ |
| 45 | + /*display:inline;*/ |
| 46 | + /*min-width: 100px;*/ |
| 47 | +} |
| 48 | + |
| 49 | +.SFI_menuselect li>span { /* all entries */ |
| 50 | + display:inline-block; |
| 51 | + width:100%; |
| 52 | +} |
| 53 | + |
| 54 | +.SFI_menuselect li>span>div.cont { |
| 55 | + padding:0px 2px; |
| 56 | +} |
| 57 | + |
| 58 | +.SFI_menuselect li>span>div.arrow { |
| 59 | + float:right; |
| 60 | +} |
| 61 | + |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/skins/SFI_Menuselect.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 62 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/COPYING |
— | — | @@ -0,0 +1,348 @@ |
| 2 | +The license text below "----" applies to all files within this distribution, other |
| 3 | +than those that are in a directory which contains files named "LICENSE" or |
| 4 | +"COPYING", or a subdirectory thereof. For those files, the license text contained in |
| 5 | +said file overrides any license information contained in directories of smaller depth. |
| 6 | +Alternative licenses are typically used for software that is provided by external |
| 7 | +parties, and merely packaged with the Semantic Forms release for convenience. |
| 8 | +---- |
| 9 | + |
| 10 | + GNU GENERAL PUBLIC LICENSE |
| 11 | + Version 2, June 1991 |
| 12 | + |
| 13 | + Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
| 14 | + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 15 | + Everyone is permitted to copy and distribute verbatim copies |
| 16 | + of this license document, but changing it is not allowed. |
| 17 | + |
| 18 | + Preamble |
| 19 | + |
| 20 | + The licenses for most software are designed to take away your |
| 21 | +freedom to share and change it. By contrast, the GNU General Public |
| 22 | +License is intended to guarantee your freedom to share and change free |
| 23 | +software--to make sure the software is free for all its users. This |
| 24 | +General Public License applies to most of the Free Software |
| 25 | +Foundation's software and to any other program whose authors commit to |
| 26 | +using it. (Some other Free Software Foundation software is covered by |
| 27 | +the GNU Library General Public License instead.) You can apply it to |
| 28 | +your programs, too. |
| 29 | + |
| 30 | + When we speak of free software, we are referring to freedom, not |
| 31 | +price. Our General Public Licenses are designed to make sure that you |
| 32 | +have the freedom to distribute copies of free software (and charge for |
| 33 | +this service if you wish), that you receive source code or can get it |
| 34 | +if you want it, that you can change the software or use pieces of it |
| 35 | +in new free programs; and that you know you can do these things. |
| 36 | + |
| 37 | + To protect your rights, we need to make restrictions that forbid |
| 38 | +anyone to deny you these rights or to ask you to surrender the rights. |
| 39 | +These restrictions translate to certain responsibilities for you if you |
| 40 | +distribute copies of the software, or if you modify it. |
| 41 | + |
| 42 | + For example, if you distribute copies of such a program, whether |
| 43 | +gratis or for a fee, you must give the recipients all the rights that |
| 44 | +you have. You must make sure that they, too, receive or can get the |
| 45 | +source code. And you must show them these terms so they know their |
| 46 | +rights. |
| 47 | + |
| 48 | + We protect your rights with two steps: (1) copyright the software, and |
| 49 | +(2) offer you this license which gives you legal permission to copy, |
| 50 | +distribute and/or modify the software. |
| 51 | + |
| 52 | + Also, for each author's protection and ours, we want to make certain |
| 53 | +that everyone understands that there is no warranty for this free |
| 54 | +software. If the software is modified by someone else and passed on, we |
| 55 | +want its recipients to know that what they have is not the original, so |
| 56 | +that any problems introduced by others will not reflect on the original |
| 57 | +authors' reputations. |
| 58 | + |
| 59 | + Finally, any free program is threatened constantly by software |
| 60 | +patents. We wish to avoid the danger that redistributors of a free |
| 61 | +program will individually obtain patent licenses, in effect making the |
| 62 | +program proprietary. To prevent this, we have made it clear that any |
| 63 | +patent must be licensed for everyone's free use or not licensed at all. |
| 64 | + |
| 65 | + The precise terms and conditions for copying, distribution and |
| 66 | +modification follow. |
| 67 | + |
| 68 | + GNU GENERAL PUBLIC LICENSE |
| 69 | + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 70 | + |
| 71 | + 0. This License applies to any program or other work which contains |
| 72 | +a notice placed by the copyright holder saying it may be distributed |
| 73 | +under the terms of this General Public License. The "Program", below, |
| 74 | +refers to any such program or work, and a "work based on the Program" |
| 75 | +means either the Program or any derivative work under copyright law: |
| 76 | +that is to say, a work containing the Program or a portion of it, |
| 77 | +either verbatim or with modifications and/or translated into another |
| 78 | +language. (Hereinafter, translation is included without limitation in |
| 79 | +the term "modification".) Each licensee is addressed as "you". |
| 80 | + |
| 81 | +Activities other than copying, distribution and modification are not |
| 82 | +covered by this License; they are outside its scope. The act of |
| 83 | +running the Program is not restricted, and the output from the Program |
| 84 | +is covered only if its contents constitute a work based on the |
| 85 | +Program (independent of having been made by running the Program). |
| 86 | +Whether that is true depends on what the Program does. |
| 87 | + |
| 88 | + 1. You may copy and distribute verbatim copies of the Program's |
| 89 | +source code as you receive it, in any medium, provided that you |
| 90 | +conspicuously and appropriately publish on each copy an appropriate |
| 91 | +copyright notice and disclaimer of warranty; keep intact all the |
| 92 | +notices that refer to this License and to the absence of any warranty; |
| 93 | +and give any other recipients of the Program a copy of this License |
| 94 | +along with the Program. |
| 95 | + |
| 96 | +You may charge a fee for the physical act of transferring a copy, and |
| 97 | +you may at your option offer warranty protection in exchange for a fee. |
| 98 | + |
| 99 | + 2. You may modify your copy or copies of the Program or any portion |
| 100 | +of it, thus forming a work based on the Program, and copy and |
| 101 | +distribute such modifications or work under the terms of Section 1 |
| 102 | +above, provided that you also meet all of these conditions: |
| 103 | + |
| 104 | + a) You must cause the modified files to carry prominent notices |
| 105 | + stating that you changed the files and the date of any change. |
| 106 | + |
| 107 | + b) You must cause any work that you distribute or publish, that in |
| 108 | + whole or in part contains or is derived from the Program or any |
| 109 | + part thereof, to be licensed as a whole at no charge to all third |
| 110 | + parties under the terms of this License. |
| 111 | + |
| 112 | + c) If the modified program normally reads commands interactively |
| 113 | + when run, you must cause it, when started running for such |
| 114 | + interactive use in the most ordinary way, to print or display an |
| 115 | + announcement including an appropriate copyright notice and a |
| 116 | + notice that there is no warranty (or else, saying that you provide |
| 117 | + a warranty) and that users may redistribute the program under |
| 118 | + these conditions, and telling the user how to view a copy of this |
| 119 | + License. (Exception: if the Program itself is interactive but |
| 120 | + does not normally print such an announcement, your work based on |
| 121 | + the Program is not required to print an announcement.) |
| 122 | + |
| 123 | +These requirements apply to the modified work as a whole. If |
| 124 | +identifiable sections of that work are not derived from the Program, |
| 125 | +and can be reasonably considered independent and separate works in |
| 126 | +themselves, then this License, and its terms, do not apply to those |
| 127 | +sections when you distribute them as separate works. But when you |
| 128 | +distribute the same sections as part of a whole which is a work based |
| 129 | +on the Program, the distribution of the whole must be on the terms of |
| 130 | +this License, whose permissions for other licensees extend to the |
| 131 | +entire whole, and thus to each and every part regardless of who wrote it. |
| 132 | + |
| 133 | +Thus, it is not the intent of this section to claim rights or contest |
| 134 | +your rights to work written entirely by you; rather, the intent is to |
| 135 | +exercise the right to control the distribution of derivative or |
| 136 | +collective works based on the Program. |
| 137 | + |
| 138 | +In addition, mere aggregation of another work not based on the Program |
| 139 | +with the Program (or with a work based on the Program) on a volume of |
| 140 | +a storage or distribution medium does not bring the other work under |
| 141 | +the scope of this License. |
| 142 | + |
| 143 | + 3. You may copy and distribute the Program (or a work based on it, |
| 144 | +under Section 2) in object code or executable form under the terms of |
| 145 | +Sections 1 and 2 above provided that you also do one of the following: |
| 146 | + |
| 147 | + a) Accompany it with the complete corresponding machine-readable |
| 148 | + source code, which must be distributed under the terms of Sections |
| 149 | + 1 and 2 above on a medium customarily used for software interchange; or, |
| 150 | + |
| 151 | + b) Accompany it with a written offer, valid for at least three |
| 152 | + years, to give any third party, for a charge no more than your |
| 153 | + cost of physically performing source distribution, a complete |
| 154 | + machine-readable copy of the corresponding source code, to be |
| 155 | + distributed under the terms of Sections 1 and 2 above on a medium |
| 156 | + customarily used for software interchange; or, |
| 157 | + |
| 158 | + c) Accompany it with the information you received as to the offer |
| 159 | + to distribute corresponding source code. (This alternative is |
| 160 | + allowed only for noncommercial distribution and only if you |
| 161 | + received the program in object code or executable form with such |
| 162 | + an offer, in accord with Subsection b above.) |
| 163 | + |
| 164 | +The source code for a work means the preferred form of the work for |
| 165 | +making modifications to it. For an executable work, complete source |
| 166 | +code means all the source code for all modules it contains, plus any |
| 167 | +associated interface definition files, plus the scripts used to |
| 168 | +control compilation and installation of the executable. However, as a |
| 169 | +special exception, the source code distributed need not include |
| 170 | +anything that is normally distributed (in either source or binary |
| 171 | +form) with the major components (compiler, kernel, and so on) of the |
| 172 | +operating system on which the executable runs, unless that component |
| 173 | +itself accompanies the executable. |
| 174 | + |
| 175 | +If distribution of executable or object code is made by offering |
| 176 | +access to copy from a designated place, then offering equivalent |
| 177 | +access to copy the source code from the same place counts as |
| 178 | +distribution of the source code, even though third parties are not |
| 179 | +compelled to copy the source along with the object code. |
| 180 | + |
| 181 | + 4. You may not copy, modify, sublicense, or distribute the Program |
| 182 | +except as expressly provided under this License. Any attempt |
| 183 | +otherwise to copy, modify, sublicense or distribute the Program is |
| 184 | +void, and will automatically terminate your rights under this License. |
| 185 | +However, parties who have received copies, or rights, from you under |
| 186 | +this License will not have their licenses terminated so long as such |
| 187 | +parties remain in full compliance. |
| 188 | + |
| 189 | + 5. You are not required to accept this License, since you have not |
| 190 | +signed it. However, nothing else grants you permission to modify or |
| 191 | +distribute the Program or its derivative works. These actions are |
| 192 | +prohibited by law if you do not accept this License. Therefore, by |
| 193 | +modifying or distributing the Program (or any work based on the |
| 194 | +Program), you indicate your acceptance of this License to do so, and |
| 195 | +all its terms and conditions for copying, distributing or modifying |
| 196 | +the Program or works based on it. |
| 197 | + |
| 198 | + 6. Each time you redistribute the Program (or any work based on the |
| 199 | +Program), the recipient automatically receives a license from the |
| 200 | +original licensor to copy, distribute or modify the Program subject to |
| 201 | +these terms and conditions. You may not impose any further |
| 202 | +restrictions on the recipients' exercise of the rights granted herein. |
| 203 | +You are not responsible for enforcing compliance by third parties to |
| 204 | +this License. |
| 205 | + |
| 206 | + 7. If, as a consequence of a court judgment or allegation of patent |
| 207 | +infringement or for any other reason (not limited to patent issues), |
| 208 | +conditions are imposed on you (whether by court order, agreement or |
| 209 | +otherwise) that contradict the conditions of this License, they do not |
| 210 | +excuse you from the conditions of this License. If you cannot |
| 211 | +distribute so as to satisfy simultaneously your obligations under this |
| 212 | +License and any other pertinent obligations, then as a consequence you |
| 213 | +may not distribute the Program at all. For example, if a patent |
| 214 | +license would not permit royalty-free redistribution of the Program by |
| 215 | +all those who receive copies directly or indirectly through you, then |
| 216 | +the only way you could satisfy both it and this License would be to |
| 217 | +refrain entirely from distribution of the Program. |
| 218 | + |
| 219 | +If any portion of this section is held invalid or unenforceable under |
| 220 | +any particular circumstance, the balance of the section is intended to |
| 221 | +apply and the section as a whole is intended to apply in other |
| 222 | +circumstances. |
| 223 | + |
| 224 | +It is not the purpose of this section to induce you to infringe any |
| 225 | +patents or other property right claims or to contest validity of any |
| 226 | +such claims; this section has the sole purpose of protecting the |
| 227 | +integrity of the free software distribution system, which is |
| 228 | +implemented by public license practices. Many people have made |
| 229 | +generous contributions to the wide range of software distributed |
| 230 | +through that system in reliance on consistent application of that |
| 231 | +system; it is up to the author/donor to decide if he or she is willing |
| 232 | +to distribute software through any other system and a licensee cannot |
| 233 | +impose that choice. |
| 234 | + |
| 235 | +This section is intended to make thoroughly clear what is believed to |
| 236 | +be a consequence of the rest of this License. |
| 237 | + |
| 238 | + 8. If the distribution and/or use of the Program is restricted in |
| 239 | +certain countries either by patents or by copyrighted interfaces, the |
| 240 | +original copyright holder who places the Program under this License |
| 241 | +may add an explicit geographical distribution limitation excluding |
| 242 | +those countries, so that distribution is permitted only in or among |
| 243 | +countries not thus excluded. In such case, this License incorporates |
| 244 | +the limitation as if written in the body of this License. |
| 245 | + |
| 246 | + 9. The Free Software Foundation may publish revised and/or new versions |
| 247 | +of the General Public License from time to time. Such new versions will |
| 248 | +be similar in spirit to the present version, but may differ in detail to |
| 249 | +address new problems or concerns. |
| 250 | + |
| 251 | +Each version is given a distinguishing version number. If the Program |
| 252 | +specifies a version number of this License which applies to it and "any |
| 253 | +later version", you have the option of following the terms and conditions |
| 254 | +either of that version or of any later version published by the Free |
| 255 | +Software Foundation. If the Program does not specify a version number of |
| 256 | +this License, you may choose any version ever published by the Free Software |
| 257 | +Foundation. |
| 258 | + |
| 259 | + 10. If you wish to incorporate parts of the Program into other free |
| 260 | +programs whose distribution conditions are different, write to the author |
| 261 | +to ask for permission. For software which is copyrighted by the Free |
| 262 | +Software Foundation, write to the Free Software Foundation; we sometimes |
| 263 | +make exceptions for this. Our decision will be guided by the two goals |
| 264 | +of preserving the free status of all derivatives of our free software and |
| 265 | +of promoting the sharing and reuse of software generally. |
| 266 | + |
| 267 | + NO WARRANTY |
| 268 | + |
| 269 | + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
| 270 | +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
| 271 | +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
| 272 | +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
| 273 | +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 274 | +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
| 275 | +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
| 276 | +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
| 277 | +REPAIR OR CORRECTION. |
| 278 | + |
| 279 | + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
| 280 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
| 281 | +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
| 282 | +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
| 283 | +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
| 284 | +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
| 285 | +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
| 286 | +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
| 287 | +POSSIBILITY OF SUCH DAMAGES. |
| 288 | + |
| 289 | + END OF TERMS AND CONDITIONS |
| 290 | + |
| 291 | + How to Apply These Terms to Your New Programs |
| 292 | + |
| 293 | + If you develop a new program, and you want it to be of the greatest |
| 294 | +possible use to the public, the best way to achieve this is to make it |
| 295 | +free software which everyone can redistribute and change under these terms. |
| 296 | + |
| 297 | + To do so, attach the following notices to the program. It is safest |
| 298 | +to attach them to the start of each source file to most effectively |
| 299 | +convey the exclusion of warranty; and each file should have at least |
| 300 | +the "copyright" line and a pointer to where the full notice is found. |
| 301 | + |
| 302 | + <one line to give the program's name and a brief idea of what it does.> |
| 303 | + Copyright (C) <year> <name of author> |
| 304 | + |
| 305 | + This program is free software; you can redistribute it and/or modify |
| 306 | + it under the terms of the GNU General Public License as published by |
| 307 | + the Free Software Foundation; either version 2 of the License, or |
| 308 | + (at your option) any later version. |
| 309 | + |
| 310 | + This program is distributed in the hope that it will be useful, |
| 311 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 312 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 313 | + GNU General Public License for more details. |
| 314 | + |
| 315 | + You should have received a copy of the GNU General Public License |
| 316 | + along with this program; if not, write to the Free Software |
| 317 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 318 | + |
| 319 | + |
| 320 | +Also add information on how to contact you by electronic and paper mail. |
| 321 | + |
| 322 | +If the program is interactive, make it output a short notice like this |
| 323 | +when it starts in an interactive mode: |
| 324 | + |
| 325 | + Gnomovision version 69, Copyright (C) year name of author |
| 326 | + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
| 327 | + This is free software, and you are welcome to redistribute it |
| 328 | + under certain conditions; type `show c' for details. |
| 329 | + |
| 330 | +The hypothetical commands `show w' and `show c' should show the appropriate |
| 331 | +parts of the General Public License. Of course, the commands you use may |
| 332 | +be called something other than `show w' and `show c'; they could even be |
| 333 | +mouse-clicks or menu items--whatever suits your program. |
| 334 | + |
| 335 | +You should also get your employer (if you work as a programmer) or your |
| 336 | +school, if any, to sign a "copyright disclaimer" for the program, if |
| 337 | +necessary. Here is a sample; alter the names: |
| 338 | + |
| 339 | + Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
| 340 | + `Gnomovision' (which makes passes at compilers) written by James Hacker. |
| 341 | + |
| 342 | + <signature of Ty Coon>, 1 April 1989 |
| 343 | + Ty Coon, President of Vice |
| 344 | + |
| 345 | +This General Public License does not permit incorporating your program into |
| 346 | +proprietary programs. If your program is a subroutine library, you may |
| 347 | +consider it more useful to permit linking proprietary applications with the |
| 348 | +library. If this is what you want to do, use the GNU Library General |
| 349 | +Public License instead of this License. |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/COPYING |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 350 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/SFI_Inputs.php |
— | — | @@ -0,0 +1,1291 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Input definitions for the Semantic Forms Inputs extension. |
| 5 | + * |
| 6 | + * @author Stephan Gambke |
| 7 | + * @author Sanyam Goyal |
| 8 | + * @author Yaron Koren |
| 9 | + * @version 0.4 |
| 10 | + * |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'SFI_VERSION' ) ) { |
| 14 | + die( 'This file is part of a MediaWiki extension, it is not a valid entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +class SFIInputs { |
| 18 | + |
| 19 | + /** |
| 20 | + * Creates the html text for an input. |
| 21 | + * |
| 22 | + * Common attributes for input types are set according to the parameters. |
| 23 | + * The parameters are the standard parameters set by Semantic Forms' |
| 24 | + * InputTypeHook plus some optional. |
| 25 | + * |
| 26 | + * @param string $cur_value |
| 27 | + * @param string $input_name |
| 28 | + * @param boolean $is_mandatory |
| 29 | + * @param boolean $is_disabled |
| 30 | + * @param array $other_args |
| 31 | + * @param string $input_id (optional) |
| 32 | + * @param int $tabindex (optional) |
| 33 | + * @param string $class |
| 34 | + * @return string the html text of an input element |
| 35 | + */ |
| 36 | + static private function textHTML ( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args, $input_id = null, $tabindex = null, $class = "" ) { |
| 37 | + |
| 38 | + global $sfgFieldNum, $sfgTabIndex; |
| 39 | + |
| 40 | + // array of attributes to pass to the input field |
| 41 | + $attribs = array( |
| 42 | + "name" => $input_name, |
| 43 | + "class" => $class, |
| 44 | + "value" => $cur_value, |
| 45 | + "type" => "text" |
| 46 | + ); |
| 47 | + |
| 48 | + // set size attrib |
| 49 | + if ( array_key_exists( 'size', $other_args ) ) { |
| 50 | + $attribs['size'] = $other_args['size']; |
| 51 | + } |
| 52 | + |
| 53 | + // set maxlength attrib |
| 54 | + if ( array_key_exists( 'maxlength', $other_args ) ) { |
| 55 | + $attribs['maxlength'] = $other_args['maxlength']; |
| 56 | + } |
| 57 | + |
| 58 | + // modify class attribute for mandatory form fields |
| 59 | + if ( $is_mandatory ) { |
| 60 | + $attribs["class"] .= ' mandatoryField'; |
| 61 | + } |
| 62 | + |
| 63 | + // add user class(es) to class attribute of input field |
| 64 | + if ( array_key_exists( 'class', $other_args ) ) { |
| 65 | + $attribs["class"] .= ' ' . $other_args['class']; |
| 66 | + } |
| 67 | + |
| 68 | + // set readonly attrib |
| 69 | + if ( $is_disabled ) { |
| 70 | + $attribs["readonly"] = "1"; |
| 71 | + } |
| 72 | + |
| 73 | + // if no special input id is specified set the Semantic Forms standard |
| 74 | + if ( $input_id == null ) { |
| 75 | + $attribs[ 'id' ] = "input_" . $sfgFieldNum; |
| 76 | + } else { |
| 77 | + $attribs[ 'id' ] = $input_id; |
| 78 | + } |
| 79 | + |
| 80 | + |
| 81 | + if ( $tabindex == null ) $attribs[ 'tabindex' ] = $sfgTabIndex; |
| 82 | + else $attribs[ 'tabindex' ] = $tabindex; |
| 83 | + |
| 84 | + // $html = Html::element( "input", $attribs ); |
| 85 | + $html = Xml::element( "input", $attribs ); |
| 86 | + |
| 87 | + return $html; |
| 88 | + |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * Setup function for input type regexp. |
| 93 | + * |
| 94 | + * Loads the Javascript code used by all regexp filters. |
| 95 | + */ |
| 96 | + static private function regexpSetup() { |
| 97 | + |
| 98 | + global $wgOut; |
| 99 | + global $sfigSettings; |
| 100 | + |
| 101 | + static $hasRun = false; |
| 102 | + |
| 103 | + if ( !$hasRun ) { |
| 104 | + $hasRun = true; |
| 105 | + |
| 106 | + $wgOut->addScript( '<script type="text/javascript" src="' . $sfigSettings->scriptPath . '/libs/regexp.js"></script> ' ); |
| 107 | + |
| 108 | + } |
| 109 | + } |
| 110 | + |
| 111 | + |
| 112 | + /** |
| 113 | + * Definition of input type "regexp" |
| 114 | + * |
| 115 | + * Returns the html code to be included in the page and registers the |
| 116 | + * input's JS initialisation method |
| 117 | + * |
| 118 | + * @param string $cur_value current value of this field (which is sometimes null) |
| 119 | + * @param string $input_name HTML name that this input should have |
| 120 | + * @param boolean $is_mandatory indicates whether this field is mandatory for the user |
| 121 | + * @param boolean $is_disabled indicates whether this field is disabled (meaning, the user can't edit) |
| 122 | + * @param array $other_args hash representing all the other properties defined for this input in the form definition |
| 123 | + * @return string html code of input |
| 124 | + */ |
| 125 | + static function regexpHTML ( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) { |
| 126 | + |
| 127 | + global $wgOut; |
| 128 | + global $sfgFieldNum; // used for setting various HTML IDs |
| 129 | + global $sfgJSValidationCalls; // array of Javascript calls to determine if page can be saved |
| 130 | + global $sfgFormPrinter; |
| 131 | + |
| 132 | + self::regexpSetup(); |
| 133 | + |
| 134 | + // set base input type |
| 135 | + if ( array_key_exists( 'base type', $other_args ) ) { |
| 136 | + |
| 137 | + $baseType = trim( $other_args['base type'] ); |
| 138 | + unset( $other_args['base type'] ); |
| 139 | + |
| 140 | + // if unknown set default base input type |
| 141 | + if ( ! array_key_exists( $baseType, $sfgFormPrinter->mInputTypeHooks ) ) |
| 142 | + $baseType = 'text'; |
| 143 | + } |
| 144 | + else $baseType = 'text'; |
| 145 | + |
| 146 | + // set base prefix string |
| 147 | + if ( array_key_exists( 'base prefix', $other_args ) ) { |
| 148 | + $basePrefix = trim( $other_args['base prefix'] ) . "."; |
| 149 | + unset( $other_args['base prefix'] ); |
| 150 | + } |
| 151 | + else $basePrefix = ''; |
| 152 | + |
| 153 | + // set OR character |
| 154 | + if ( array_key_exists( 'or char', $other_args ) ) { |
| 155 | + $orChar = trim( $other_args['or char'] ); |
| 156 | + unset( $other_args['or char'] ); |
| 157 | + } |
| 158 | + else $orChar = '!'; |
| 159 | + |
| 160 | + // set inverse string |
| 161 | + if ( array_key_exists( 'inverse', $other_args ) ) { |
| 162 | + $inverseString = 'true'; |
| 163 | + unset( $other_args['inverse'] ); |
| 164 | + } |
| 165 | + else $inverseString = 'false'; |
| 166 | + |
| 167 | + // set regexp string |
| 168 | + if ( array_key_exists( 'regexp', $other_args ) ) { |
| 169 | + |
| 170 | + $regexp = str_replace( $orChar, '|', trim( $other_args['regexp'] ) ); |
| 171 | + unset( $other_args['regexp'] ); |
| 172 | + |
| 173 | + // check for leading/trailing delimiter and remove it (else reset regexp) |
| 174 | + if ( preg_match ( "/^\/.*\/\$/", $regexp ) ) { |
| 175 | + |
| 176 | + $regexp = substr( $regexp, 1, strlen( $regexp ) - 2 ); |
| 177 | + |
| 178 | + } |
| 179 | + else $regexp = '.*'; |
| 180 | + |
| 181 | + } |
| 182 | + else $regexp = '.*'; |
| 183 | + |
| 184 | + // set failure message string |
| 185 | + if ( array_key_exists( 'message', $other_args ) ) { |
| 186 | + $message = trim( $other_args['message'] ); |
| 187 | + unset( $other_args['message'] ); |
| 188 | + } |
| 189 | + else $message = wfMsg( 'semanticformsinputs-wrongformat' ); |
| 190 | + |
| 191 | + // sanitize error message and regexp for JS |
| 192 | + $message = Xml::encodeJsVar( $message ); |
| 193 | + $regexp = Xml::encodeJsVar( $regexp ); |
| 194 | + |
| 195 | + // register event to validate regexp on submit/preview |
| 196 | + $jstext = <<<JAVASCRIPT |
| 197 | +jQuery(function(){ |
| 198 | + jQuery('#input_$sfgFieldNum').SemanticForms_registerInputValidation( SFI_RE_validate, {retext: {$regexp}, inverse: {$inverseString}, message: {$message} }); |
| 199 | +}); |
| 200 | +JAVASCRIPT; |
| 201 | + |
| 202 | + $wgOut->addInlineScript( $jstext ); |
| 203 | + |
| 204 | + // create other_args for base input type |
| 205 | + $new_other_args = array(); |
| 206 | + |
| 207 | + foreach ( $other_args as $key => $value ) |
| 208 | + if ( $basePrefix && strpos( $key, $basePrefix ) === 0 ) { |
| 209 | + $new_other_args[substr( $key, strlen( $basePrefix ) )] = $value; |
| 210 | + } else |
| 211 | + $new_other_args[$key] = $value; |
| 212 | + |
| 213 | + // setup parameters for base input type |
| 214 | + $funcArgs = array(); |
| 215 | + $funcArgs[] = $cur_value; |
| 216 | + $funcArgs[] = $input_name; |
| 217 | + $funcArgs[] = $is_mandatory; |
| 218 | + $funcArgs[] = $is_disabled; |
| 219 | + $funcArgs[] = $new_other_args; |
| 220 | + |
| 221 | + // get the input type hooks for the base input type |
| 222 | + $hook_values = $sfgFormPrinter->mInputTypeHooks[$baseType]; |
| 223 | + |
| 224 | + // generate html and JS code for base input type and return it |
| 225 | + return call_user_func_array( $hook_values[0], $funcArgs ); |
| 226 | + |
| 227 | +} |
| 228 | + |
| 229 | + |
| 230 | + /** |
| 231 | + * Setup for input type jqdatepicker. |
| 232 | + * |
| 233 | + * Adds the Javascript code used by all datepickers. |
| 234 | + */ |
| 235 | + static private function jqDatePickerSetup () { |
| 236 | + global $wgOut, $wgLang, $sfgScriptPath; |
| 237 | + global $sfigSettings; |
| 238 | + |
| 239 | + static $hasRun = false; |
| 240 | + |
| 241 | + if ( !$hasRun ) { |
| 242 | + $hasRun = true; |
| 243 | + |
| 244 | + $wgOut->addScript( '<script type="text/javascript" src="' . $sfgScriptPath . '/libs/jquery-ui/jquery.ui.datepicker.min.js"></script> ' ); |
| 245 | + $wgOut->addExtensionStyle( $sfgScriptPath . '/skins/jquery-ui/base/jquery.ui.datepicker.css' ); |
| 246 | + $wgOut->addScript( '<script type="text/javascript" src="' . $sfigSettings->scriptPath . '/libs/datepicker.js"></script> ' ); |
| 247 | + |
| 248 | + // set localized messages (use MW i18n, not jQuery i18n) |
| 249 | + $jstext = |
| 250 | + "jQuery(function(){\n" |
| 251 | + . " jQuery.datepicker.regional['wiki'] = {\n" |
| 252 | + . " closeText: '" . wfMsg( 'semanticformsinputs-close' ) . "',\n" |
| 253 | + . " prevText: '" . wfMsg( 'semanticformsinputs-prev' ) . "',\n" |
| 254 | + . " nextText: '" . wfMsg( 'semanticformsinputs-next' ) . "',\n" |
| 255 | + . " currentText: '" . wfMsg( 'semanticformsinputs-today' ) . "',\n" |
| 256 | + . " monthNames: ['" |
| 257 | + . wfMsg( 'january' ) . "','" |
| 258 | + . wfMsg( 'february' ) . "','" |
| 259 | + . wfMsg( 'march' ) . "','" |
| 260 | + . wfMsg( 'april' ) . "','" |
| 261 | + . wfMsg( 'may_long' ) . "','" |
| 262 | + . wfMsg( 'june' ) . "','" |
| 263 | + . wfMsg( 'july' ) . "','" |
| 264 | + . wfMsg( 'august' ) . "','" |
| 265 | + . wfMsg( 'september' ) . "','" |
| 266 | + . wfMsg( 'october' ) . "','" |
| 267 | + . wfMsg( 'november' ) . "','" |
| 268 | + . wfMsg( 'december' ) . "'],\n" |
| 269 | + . " monthNamesShort: ['" |
| 270 | + . wfMsg( 'jan' ) . "','" |
| 271 | + . wfMsg( 'feb' ) . "','" |
| 272 | + . wfMsg( 'mar' ) . "','" |
| 273 | + . wfMsg( 'apr' ) . "','" |
| 274 | + . wfMsg( 'may' ) . "','" |
| 275 | + . wfMsg( 'jun' ) . "','" |
| 276 | + . wfMsg( 'jul' ) . "','" |
| 277 | + . wfMsg( 'aug' ) . "','" |
| 278 | + . wfMsg( 'sep' ) . "','" |
| 279 | + . wfMsg( 'oct' ) . "','" |
| 280 | + . wfMsg( 'nov' ) . "','" |
| 281 | + . wfMsg( 'dec' ) . "'],\n" |
| 282 | + . " dayNames: ['" |
| 283 | + . wfMsg( 'sunday' ) . "','" |
| 284 | + . wfMsg( 'monday' ) . "','" |
| 285 | + . wfMsg( 'tuesday' ) . "','" |
| 286 | + . wfMsg( 'wednesday' ) . "','" |
| 287 | + . wfMsg( 'thursday' ) . "','" |
| 288 | + . wfMsg( 'friday' ) . "','" |
| 289 | + . wfMsg( 'saturday' ) . "'],\n" |
| 290 | + . " dayNamesShort: ['" |
| 291 | + . wfMsg( 'sun' ) . "','" |
| 292 | + . wfMsg( 'mon' ) . "','" |
| 293 | + . wfMsg( 'tue' ) . "','" |
| 294 | + . wfMsg( 'wed' ) . "','" |
| 295 | + . wfMsg( 'thu' ) . "','" |
| 296 | + . wfMsg( 'fri' ) . "','" |
| 297 | + . wfMsg( 'sat' ) . "'],\n" |
| 298 | + . " dayNamesMin: ['" |
| 299 | + . $wgLang->firstChar( wfMsg( 'sun' ) ) . "','" |
| 300 | + . $wgLang->firstChar( wfMsg( 'mon' ) ) . "','" |
| 301 | + . $wgLang->firstChar( wfMsg( 'tue' ) ) . "','" |
| 302 | + . $wgLang->firstChar( wfMsg( 'wed' ) ) . "','" |
| 303 | + . $wgLang->firstChar( wfMsg( 'thu' ) ) . "','" |
| 304 | + . $wgLang->firstChar( wfMsg( 'fri' ) ) . "','" |
| 305 | + . $wgLang->firstChar( wfMsg( 'sat' ) ) . "'],\n" |
| 306 | + . " weekHeader: '',\n" |
| 307 | + . " dateFormat: '" . wfMsg( 'semanticformsinputs-dateformatshort' ) . "',\n" |
| 308 | + . " firstDay: '" . wfMsg( 'semanticformsinputs-firstdayofweek' ) . "',\n" |
| 309 | + . " isRTL: " . ( $wgLang->isRTL() ? "true":"false" ) . ",\n" |
| 310 | + . " showMonthAfterYear: false,\n" |
| 311 | + . " yearSuffix: ''};\n" |
| 312 | + . " jQuery.datepicker.setDefaults(jQuery.datepicker.regional['wiki']);\n" |
| 313 | + . "});\n"; |
| 314 | + |
| 315 | + |
| 316 | + $wgOut->addInlineScript( $jstext ); |
| 317 | + |
| 318 | + } |
| 319 | + } |
| 320 | + |
| 321 | + /** |
| 322 | + * Sort and merge time ranges in an array |
| 323 | + * |
| 324 | + * expects an array of arrays |
| 325 | + * the inner arrays must contain two dates representing the start and end |
| 326 | + * date of a time range |
| 327 | + * |
| 328 | + * returns an array of arrays with the date ranges sorted and overlapping |
| 329 | + * ranges merged |
| 330 | + * |
| 331 | + * @param array $ranges array of arrays of DateTimes |
| 332 | + * @return array of arrays of DateTimes |
| 333 | + */ |
| 334 | + static private function sortAndMergeRanges ( $ranges ) { |
| 335 | + |
| 336 | + // sort ranges, earliest date first |
| 337 | + sort( $ranges ); |
| 338 | + |
| 339 | + // stores the start of the current date range |
| 340 | + $currmin = FALSE; |
| 341 | + |
| 342 | + // stores the date the next ranges start date has to top to not overlap |
| 343 | + $nextmin = FALSE; |
| 344 | + |
| 345 | + // result array |
| 346 | + $mergedRanges = array(); |
| 347 | + |
| 348 | + foreach ( $ranges as $range ) { |
| 349 | + |
| 350 | + // ignore empty date ranges |
| 351 | + if ( !$range ) continue; |
| 352 | + |
| 353 | + if ( !$currmin ) { // found first valid range |
| 354 | + |
| 355 | + $currmin = $range[0]; |
| 356 | + $nextmin = $range[1]; |
| 357 | + $nextmin->modify( '+1 day' ); |
| 358 | + |
| 359 | + } elseif ( $range[0] <= $nextmin ) { // overlap detected |
| 360 | + |
| 361 | + $currmin = min( $currmin, $range[0] ); |
| 362 | + |
| 363 | + $range[1]->modify( '+1 day' ); |
| 364 | + $nextmin = max( $nextmin, $range[1] ); |
| 365 | + |
| 366 | + } else { // no overlap, store current range and continue with next |
| 367 | + |
| 368 | + $nextmin->modify( '-1 day' ); |
| 369 | + $mergedRanges[] = array( $currmin, $nextmin ); |
| 370 | + |
| 371 | + $currmin = $range[0]; |
| 372 | + $nextmin = $range[1]; |
| 373 | + $nextmin->modify( '+1 day' ); |
| 374 | + |
| 375 | + } |
| 376 | + |
| 377 | + } |
| 378 | + |
| 379 | + // store last range |
| 380 | + if ( $currmin ) { |
| 381 | + $nextmin->modify( '-1 day' ); |
| 382 | + $mergedRanges[] = array( $currmin, $nextmin ); |
| 383 | + } |
| 384 | + |
| 385 | + return $mergedRanges; |
| 386 | + |
| 387 | + } |
| 388 | + |
| 389 | + /** |
| 390 | + * Creates an array of arrays of dates from an array of strings |
| 391 | + * |
| 392 | + * expects an array of strings containing dates or date ranges in the format |
| 393 | + * "yyyy/mm/dd" or "yyyy/mm/dd-yyyy/mm/dd" |
| 394 | + * |
| 395 | + * returns an array of arrays, each of the latter consisting of two dates |
| 396 | + * representing the start and end date of the range |
| 397 | + * |
| 398 | + * The result array will contain null values for unparseable date strings |
| 399 | + * |
| 400 | + * @param array $rangesAsStrings array of strings with dates and date ranges |
| 401 | + * @return array of arrays of DateTimes |
| 402 | + */ |
| 403 | + static private function createRangesArray ( $rangesAsStrings ) { |
| 404 | + |
| 405 | + // transform array of strings into array of array of dates |
| 406 | + // have to use create_function to be PHP pre5.3 compatible |
| 407 | + return array_map( create_function( '$range', ' |
| 408 | + |
| 409 | + if ( strpos ( $range, "-" ) === FALSE ) { // single date |
| 410 | + $date = date_create( $range ); |
| 411 | + return ( $date ) ? array( $date, clone $date ):null; |
| 412 | + } else { // date range |
| 413 | + $dates = array_map( "date_create", explode( "-", $range ) ); |
| 414 | + return ( $dates[0] && $dates[1] ) ? $dates:null; |
| 415 | + } |
| 416 | + |
| 417 | + ' ), $rangesAsStrings ); |
| 418 | + |
| 419 | + } |
| 420 | + |
| 421 | + /** |
| 422 | + * Takes an array of date ranges and returns an array containing the gaps |
| 423 | + * |
| 424 | + * The very first and the very last date of the original string are lost in |
| 425 | + * the process, of course, as they do not delimit a gap. This means, after |
| 426 | + * repeated inversion the result would eventually be empty. |
| 427 | + * |
| 428 | + * @param array $ranges of arrays of DateTimes |
| 429 | + * @return array of arrays of DateTimes |
| 430 | + */ |
| 431 | + static private function invertRangesArray( $ranges ) { |
| 432 | + |
| 433 | + // the result (initially empty) |
| 434 | + $invRanges = null; |
| 435 | + |
| 436 | + // the minimum of the current gap (initially none) |
| 437 | + $min = null; |
| 438 | + |
| 439 | + foreach ( $ranges as $range ) { |
| 440 | + |
| 441 | + if ( $min ) { // if min date of current gap is known store gap |
| 442 | + $min->modify( "+1day " ); |
| 443 | + $range[0]->modify( "-1day " ); |
| 444 | + $invRanges[] = array( $min, $range[0] ); |
| 445 | + } |
| 446 | + |
| 447 | + $min = $range[1]; // store min date of next gap |
| 448 | + |
| 449 | + } |
| 450 | + |
| 451 | + return $invRanges; |
| 452 | + } |
| 453 | + |
| 454 | + |
| 455 | + /** |
| 456 | + * Definition of input type "datepicker". |
| 457 | + * |
| 458 | + * Returns the html code to be included in the page and registers the |
| 459 | + * input's JS initialisation method |
| 460 | + * |
| 461 | + * @param string $cur_value current value of this field (which is sometimes null) |
| 462 | + * @param string $input_name HTML name that this input should have |
| 463 | + * @param boolean $is_mandatory indicates whether this field is mandatory for the user |
| 464 | + * @param boolean $is_disabled indicates whether this field is disabled (meaning, the user can't edit) |
| 465 | + * @param array $other_args hash representing all the other properties defined for this input in the form definition |
| 466 | + * @return string html code of input |
| 467 | + */ |
| 468 | + static function jqDatePickerHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) { |
| 469 | + |
| 470 | + global $wgOut, $wgLang, $wgAmericanDates; // MW variables |
| 471 | + global $sfgFieldNum, $sfgScriptPath, $sfgTabIndex; // SF variables |
| 472 | + global $sfigSettings; // SFI variables |
| 473 | + |
| 474 | + // call common setup for all jqdatepickers |
| 475 | + self::jqDatePickerSetup(); |
| 476 | + |
| 477 | + // The datepicker is created in three steps: |
| 478 | + // first: set up HTML attributes |
| 479 | + // second: set up JS attributes |
| 480 | + // third: assemble HTML and JS code |
| 481 | + |
| 482 | + |
| 483 | + // first: set up HTML attributes |
| 484 | + // nothing much to do here, self::textHTML will take care od the standard stuff |
| 485 | + |
| 486 | + // store user class(es) for use with buttons |
| 487 | + if ( array_key_exists( 'class', $other_args ) ) { |
| 488 | + $userClasses = $other_args['class']; |
| 489 | + } else $userClasses = ""; |
| 490 | + |
| 491 | + // should the input field be disabled? |
| 492 | + $inputFieldDisabled = |
| 493 | + array_key_exists( 'disable input field', $other_args ) |
| 494 | + || ( !array_key_exists( 'enable input field', $other_args ) && $sfigSettings->datePickerDisableInputField ) |
| 495 | + || $is_disabled ; |
| 496 | + |
| 497 | + // second: set up JS attributes |
| 498 | + |
| 499 | + // set up attributes required for both enabled and disabled datepickers |
| 500 | + $jsattribs = array( |
| 501 | + 'currValue' => $cur_value, |
| 502 | + 'disabled' => $is_disabled, |
| 503 | + 'userClasses' => $userClasses |
| 504 | + ); |
| 505 | + |
| 506 | + if ( array_key_exists( 'part of dtp', $other_args ) ) { |
| 507 | + $jsattribs['partOfDTP'] = $other_args['part of dtp']; |
| 508 | + } |
| 509 | + |
| 510 | + // set date format |
| 511 | + // SHORT and LONG are SFI specific acronyms and are translated here |
| 512 | + // into format strings, anything else is passed to the jQuery date picker |
| 513 | + // Americans need special treatment |
| 514 | + if ( $wgAmericanDates && $wgLang->getCode() == "en" ) { |
| 515 | + |
| 516 | + if ( array_key_exists( 'date format', $other_args ) ) { |
| 517 | + |
| 518 | + if ( $other_args['date format'] == 'SHORT' ) { |
| 519 | + $jsattribs['dateFormat'] = 'mm/dd/yy'; |
| 520 | + } elseif ( $other_args['date format'] == 'LONG' ) { |
| 521 | + $jsattribs['dateFormat'] = 'MM d, yy'; |
| 522 | + } else { |
| 523 | + $jsattribs['dateFormat'] = $other_args['date format']; |
| 524 | + } |
| 525 | + |
| 526 | + } elseif ( $sfigSettings->datePickerDateFormat ) { |
| 527 | + |
| 528 | + if ( $sfigSettings->datePickerDateFormat == 'SHORT' ) { |
| 529 | + $jsattribs['dateFormat'] = 'mm/dd/yy'; |
| 530 | + } elseif ( $sfigSettings->datePickerDateFormat == 'LONG' ) { |
| 531 | + $jsattribs['dateFormat'] = 'MM d, yy'; |
| 532 | + } else { |
| 533 | + $jsattribs['dateFormat'] = $sfigSettings->datePickerDateFormat; |
| 534 | + } |
| 535 | + |
| 536 | + } else $jsattribs['dateFormat'] = 'yy/mm/dd'; |
| 537 | + |
| 538 | + } else { |
| 539 | + |
| 540 | + if ( array_key_exists( 'date format', $other_args ) ) { |
| 541 | + |
| 542 | + if ( $other_args['date format'] == 'SHORT' ) { |
| 543 | + $jsattribs['dateFormat'] = wfMsg( 'semanticformsinputs-dateformatshort' ); |
| 544 | + } elseif ( $other_args['date format'] == 'LONG' ) { |
| 545 | + $jsattribs['dateFormat'] = wfMsg( 'semanticformsinputs-dateformatlong' ); |
| 546 | + } else { |
| 547 | + $jsattribs['dateFormat'] = $other_args['date format']; |
| 548 | + } |
| 549 | + |
| 550 | + } elseif ( $sfigSettings->datePickerDateFormat ) { |
| 551 | + |
| 552 | + if ( $sfigSettings->datePickerDateFormat == 'SHORT' ) { |
| 553 | + $jsattribs['dateFormat'] = wfMsg( 'semanticformsinputs-dateformatshort' ); |
| 554 | + } elseif ( $sfigSettings->datePickerDateFormat == 'LONG' ) { |
| 555 | + $jsattribs['dateFormat'] = wfMsg( 'semanticformsinputs-dateformatlong' ); |
| 556 | + } else { |
| 557 | + $jsattribs['dateFormat'] = $sfigSettings->datePickerDateFormat; |
| 558 | + } |
| 559 | + |
| 560 | + } else $jsattribs['dateFormat'] = 'yy/mm/dd'; |
| 561 | + |
| 562 | + } |
| 563 | + |
| 564 | + // setup attributes required only for either disabled or enabled datepickers |
| 565 | + if ( $is_disabled ) { |
| 566 | + |
| 567 | + $jsattribs['buttonImage'] = $sfigSettings->scriptPath . '/images/DatePickerButtonDisabled.gif'; |
| 568 | + |
| 569 | + if ( array_key_exists( 'show reset button', $other_args ) || |
| 570 | + ( !array_key_exists( 'hide reset button', $other_args ) && $sfigSettings->datePickerShowResetButton ) ) { |
| 571 | + |
| 572 | + $jsattribs['resetButtonImage'] = $sfigSettings->scriptPath . '/images/DatePickerResetButtonDisabled.gif'; |
| 573 | + |
| 574 | + } |
| 575 | + |
| 576 | + } else { |
| 577 | + |
| 578 | + $jsattribs['buttonImage'] = $sfigSettings->scriptPath . '/images/DatePickerButton.gif'; |
| 579 | + |
| 580 | + if ( array_key_exists( 'show reset button', $other_args ) || |
| 581 | + ( !array_key_exists( 'hide reset button', $other_args ) && $sfigSettings->datePickerShowResetButton ) ) { |
| 582 | + |
| 583 | + $jsattribs['resetButtonImage'] = $sfigSettings->scriptPath . '/images/DatePickerResetButton.gif'; |
| 584 | + |
| 585 | + } |
| 586 | + |
| 587 | + // find min date, max date and disabled dates |
| 588 | + |
| 589 | + // set first date |
| 590 | + if ( array_key_exists( 'first date', $other_args ) ) { |
| 591 | + $minDate = date_create( $other_args['first date'] ); |
| 592 | + } elseif ( $sfigSettings->datePickerFirstDate ) { |
| 593 | + $minDate = date_create( $sfigSettings->datePickerFirstDate ); |
| 594 | + } else { |
| 595 | + $minDate = null; |
| 596 | + } |
| 597 | + |
| 598 | + // set last date |
| 599 | + if ( array_key_exists( 'last date', $other_args ) ) { |
| 600 | + $maxDate = date_create( $other_args['last date'] ); |
| 601 | + } elseif ( $sfigSettings->datePickerLastDate ) { |
| 602 | + $maxDate = date_create( $sfigSettings->datePickerLastDate ); |
| 603 | + } else { |
| 604 | + $maxDate = null; |
| 605 | + } |
| 606 | + |
| 607 | + // find allowed values and invert them to get disabled values |
| 608 | + if ( array_key_exists( 'possible_values', $other_args ) && count( $other_args['possible_values'] ) ) { |
| 609 | + |
| 610 | + $enabledDates = self::sortAndMergeRanges( self::createRangesArray( $other_args['possible_values'] ) ); |
| 611 | + |
| 612 | + // correct min/max date to the first/last allowed value |
| 613 | + if ( !$minDate || $minDate < $enabledDates[0][0] ) { |
| 614 | + $minDate = $enabledDates[0][0]; |
| 615 | + } |
| 616 | + |
| 617 | + if ( !$maxDate || $maxDate > $enabledDates[count( $enabledDates ) - 1][1] ) { |
| 618 | + $maxDate = $enabledDates[count( $enabledDates ) - 1][1]; |
| 619 | + } |
| 620 | + |
| 621 | + $disabledDates = self::invertRangesArray( $enabledDates ); |
| 622 | + |
| 623 | + } else $disabledDates = array(); |
| 624 | + |
| 625 | + // add user-defined or default disabled values |
| 626 | + if ( array_key_exists( 'disable dates', $other_args ) ) { |
| 627 | + |
| 628 | + $disabledDates = |
| 629 | + self::sortAndMergeRanges( |
| 630 | + array_merge( $disabledDates, self::createRangesArray( explode( ',' , $other_args['disable dates'] ) ) ) ); |
| 631 | + |
| 632 | + } elseif ( $sfigSettings->datePickerDisabledDates ) { |
| 633 | + |
| 634 | + $disabledDates = |
| 635 | + self::sortAndMergeRanges( |
| 636 | + array_merge( $disabledDates, self::createRangesArray( explode( ',' , $sfigSettings->datePickerDisabledDates ) ) ) ); |
| 637 | + |
| 638 | + } |
| 639 | + |
| 640 | + // if a minDate is set, discard all disabled dates below the min date |
| 641 | + if ( $minDate ) { |
| 642 | + |
| 643 | + // discard all ranges of disabled dates that are entirely below the min date |
| 644 | + while ( $minDate && count( $disabledDates ) && $disabledDates[0][1] < $minDate ) array_shift( $disabledDates ); |
| 645 | + |
| 646 | + // if min date is in first disabled date range, discard that range and adjust min date |
| 647 | + if ( count( $disabledDates ) && $disabledDates[0][0] <= $minDate && $disabledDates[0][1] >= $minDate ) { |
| 648 | + $minDate = $disabledDates[0][1]; |
| 649 | + array_shift( $disabledDates ); |
| 650 | + $minDate->modify( "+1 day" ); |
| 651 | + } |
| 652 | + } |
| 653 | + |
| 654 | + // if a maxDate is set, discard all disabled dates above the max date |
| 655 | + if ( $maxDate ) { |
| 656 | + |
| 657 | + // discard all ranges of disabled dates that are entirely above the max date |
| 658 | + while ( count( $disabledDates ) && $disabledDates[count( $disabledDates ) - 1][0] > $maxDate ) array_pop( $disabledDates ); |
| 659 | + |
| 660 | + // if max date is in last disabled date range, discard that range and adjust max date |
| 661 | + if ( count( $disabledDates ) && $disabledDates[count( $disabledDates ) - 1][0] <= $maxDate && $disabledDates[count( $disabledDates ) - 1][1] >= $maxDate ) { |
| 662 | + $maxDate = $disabledDates[count( $disabledDates ) - 1][0]; |
| 663 | + array_pop( $disabledDates ); |
| 664 | + $maxDate->modify( "-1 day" ); |
| 665 | + } |
| 666 | + } |
| 667 | + // finished with disabled dates |
| 668 | + |
| 669 | + // find highlighted dates |
| 670 | + if ( array_key_exists( "highlight dates", $other_args ) ) { |
| 671 | + $highlightedDates = self::sortAndMergeRanges ( self::createRangesArray( explode( ',' , $other_args["highlight dates"] ) ) ) ; |
| 672 | + } else if ( $sfigSettings->datePickerHighlightedDates ) { |
| 673 | + $highlightedDates = self::sortAndMergeRanges ( self::createRangesArray( explode( ',' , $sfigSettings->datePickerHighlightedDates ) ) ) ; |
| 674 | + } else { |
| 675 | + $highlightedDates = null; |
| 676 | + } |
| 677 | + |
| 678 | + |
| 679 | + // find disabled week days and mark them in an array |
| 680 | + if ( array_key_exists( "disable days of week", $other_args ) ) { |
| 681 | + $disabledDaysString = $other_args['disable days of week']; |
| 682 | + } else { |
| 683 | + $disabledDaysString = $sfigSettings->datePickerDisabledDaysOfWeek; |
| 684 | + } |
| 685 | + |
| 686 | + if ( $disabledDaysString != null ) { |
| 687 | + |
| 688 | + $disabledDays = array( false, false, false, false, false, false, false ); |
| 689 | + |
| 690 | + foreach ( explode( ',', $disabledDaysString ) as $day ) { |
| 691 | + |
| 692 | + if ( is_numeric( $day ) && $day >= 0 && $day <= 6 ) { |
| 693 | + $disabledDays[$day] = true; |
| 694 | + } |
| 695 | + |
| 696 | + } |
| 697 | + |
| 698 | + } else { |
| 699 | + $disabledDays = null; |
| 700 | + } |
| 701 | + |
| 702 | + // find highlighted week days and mark them in an array |
| 703 | + if ( array_key_exists( "highlight days of week", $other_args ) ) { |
| 704 | + $highlightedDaysString = $other_args['highlight days of week']; |
| 705 | + } else { |
| 706 | + $highlightedDaysString = $sfigSettings->datePickerHighlightedDaysOfWeek; |
| 707 | + } |
| 708 | + |
| 709 | + if ( $highlightedDaysString != null ) { |
| 710 | + |
| 711 | + $highlightedDays = array( false, false, false, false, false, false, false ); |
| 712 | + |
| 713 | + foreach ( explode( ',', $highlightedDaysString ) as $day ) { |
| 714 | + |
| 715 | + if ( is_numeric( $day ) && $day >= 0 && $day <= 6 ) { |
| 716 | + $highlightedDays[$day] = true; |
| 717 | + } |
| 718 | + |
| 719 | + } |
| 720 | + |
| 721 | + } else { |
| 722 | + $highlightedDays = null; |
| 723 | + } |
| 724 | + |
| 725 | + // set first day of the week |
| 726 | + if ( array_key_exists( 'week start', $other_args ) ) { |
| 727 | + $jsattribs['firstDay'] = $other_args['week start']; |
| 728 | + } elseif ( $sfigSettings->datePickerWeekStart != null ) { |
| 729 | + $jsattribs['firstDay'] = $sfigSettings->datePickerWeekStart; |
| 730 | + } else { |
| 731 | + $jsattribs['firstDay'] = wfMsg( 'semanticformsinputs-firstdayofweek' ); |
| 732 | + } |
| 733 | + |
| 734 | + // set show week number |
| 735 | + if ( array_key_exists( 'show week numbers', $other_args ) |
| 736 | + || ( !array_key_exists( 'hide week numbers', $other_args ) && $sfigSettings->datePickerShowWeekNumbers ) ) { |
| 737 | + |
| 738 | + $jsattribs['showWeek'] = true; |
| 739 | + } else { |
| 740 | + $jsattribs['showWeek'] = false; |
| 741 | + } |
| 742 | + |
| 743 | + // store min date as JS attrib |
| 744 | + if ( $minDate ) { |
| 745 | + $jsattribs['minDate'] = $minDate->format( 'Y/m/d' ); |
| 746 | + } |
| 747 | + |
| 748 | + // store max date as JS attrib |
| 749 | + if ( $maxDate ) { |
| 750 | + $jsattribs['maxDate'] = $maxDate->format( 'Y/m/d' ); |
| 751 | + } |
| 752 | + |
| 753 | + // register disabled dates with datepicker |
| 754 | + if ( count( $disabledDates ) > 0 ) { |
| 755 | + |
| 756 | + // convert the PHP array of date ranges into an array of numbers |
| 757 | + $jsattribs["disabledDates"] = array_map( create_function ( '$range', ' |
| 758 | + |
| 759 | + $y0 = $range[0]->format( "Y" ); |
| 760 | + $m0 = $range[0]->format( "m" ) - 1; |
| 761 | + $d0 = $range[0]->format( "d" ); |
| 762 | + |
| 763 | + $y1 = $range[1]->format( "Y" ); |
| 764 | + $m1 = $range[1]->format( "m" ) - 1; |
| 765 | + $d1 = $range[1]->format( "d" ); |
| 766 | + |
| 767 | + return array($y0, $m0, $d0, $y1, $m1, $d1); |
| 768 | + ' ) , $disabledDates ); |
| 769 | + } |
| 770 | + |
| 771 | + // register highlighted dates with datepicker |
| 772 | + if ( count( $highlightedDates ) > 0 ) { |
| 773 | + |
| 774 | + // convert the PHP array of date ranges into an array of numbers |
| 775 | + $jsattribs["highlightedDates"] = array_map( create_function ( '$range', ' |
| 776 | + |
| 777 | + $y0 = $range[0]->format( "Y" ); |
| 778 | + $m0 = $range[0]->format( "m" ) - 1; |
| 779 | + $d0 = $range[0]->format( "d" ); |
| 780 | + |
| 781 | + $y1 = $range[1]->format( "Y" ); |
| 782 | + $m1 = $range[1]->format( "m" ) - 1; |
| 783 | + $d1 = $range[1]->format( "d" ); |
| 784 | + |
| 785 | + return array($y0, $m0, $d0, $y1, $m1, $d1); |
| 786 | + ' ) , $highlightedDates ); |
| 787 | + } |
| 788 | + |
| 789 | + // register disabled days of week with datepicker |
| 790 | + if ( count( $disabledDays ) > 0 ) { |
| 791 | + $jsattribs["disabledDays"] = $disabledDays; |
| 792 | + } |
| 793 | + |
| 794 | + // register highlighted days of week with datepicker |
| 795 | + if ( count( $highlightedDays ) > 0 ) { |
| 796 | + $jsattribs["highlightedDays"] = $highlightedDays; |
| 797 | + } |
| 798 | + } |
| 799 | + |
| 800 | + |
| 801 | + // third: assemble HTML and JS code |
| 802 | + |
| 803 | + // start with the displayed input and append the real, but hidden |
| 804 | + // input that gets sent to SF; it will be filled by the datepicker |
| 805 | + $html = self::textHTML( $cur_value, "", $is_mandatory, $inputFieldDisabled, |
| 806 | + $other_args, "input_{$sfgFieldNum}_dp_show", null, "createboxInput" ); |
| 807 | + |
| 808 | + if ( ! array_key_exists( 'part of dtp', $other_args ) ) { |
| 809 | + |
| 810 | + $html .= Xml::element( "input", |
| 811 | + array( |
| 812 | + "id" => "input_{$sfgFieldNum}", |
| 813 | + "name" => $input_name, |
| 814 | + "type" => "hidden", |
| 815 | + "value" => $cur_value |
| 816 | + ) ); |
| 817 | + |
| 818 | + // wrap in span (e.g. used for mandatory inputs) |
| 819 | + $html = '<span class="inputSpan' . ($is_mandatory ? ' mandatoryFieldSpan' : '') . '">' .$html . '</span>'; |
| 820 | + } |
| 821 | + |
| 822 | + // build JS code from attributes array |
| 823 | + $jsattribsString = Xml::encodeJsVar( $jsattribs ); |
| 824 | + |
| 825 | + // wrap the JS code fragment in a function for deferred init |
| 826 | + $jstext = <<<JAVASCRIPT |
| 827 | +jQuery(function(){ jQuery('#input_{$sfgFieldNum}_dp_show').SemanticForms_registerInputInit(SFI_DP_init, $jsattribsString ); }); |
| 828 | +JAVASCRIPT; |
| 829 | + |
| 830 | + // insert the code of the JS init function into the pages code |
| 831 | + $wgOut->addScript( '<script type="text/javascript">' . $jstext . '</script>' ); |
| 832 | + |
| 833 | + //return array( $html, "", "initInput$sfgFieldNum" ); |
| 834 | + return $html; |
| 835 | + |
| 836 | + } |
| 837 | + |
| 838 | + /** |
| 839 | + * Setup for input type jqdatepicker. |
| 840 | + * |
| 841 | + * Adds the Javascript code used by all datetimepickers. |
| 842 | + */ |
| 843 | + static private function datetimePickerSetup () { |
| 844 | + |
| 845 | + global $wgOut, $sfigSettings; |
| 846 | + |
| 847 | + static $hasRun = false; |
| 848 | + |
| 849 | + if ( !$hasRun ) { |
| 850 | + $hasRun = true; |
| 851 | + |
| 852 | + $wgOut->addScript( '<script type="text/javascript" src="' . $sfigSettings->scriptPath . '/libs/datetimepicker.js"></script> ' ); |
| 853 | + |
| 854 | + } |
| 855 | + } |
| 856 | + |
| 857 | + /** |
| 858 | + * Definition of input type "datetimepicker". |
| 859 | + * |
| 860 | + * Returns the html code to be included in the page and registers the |
| 861 | + * input's JS initialisation method |
| 862 | + * |
| 863 | + * @param string $cur_value current value of this field (which is sometimes null) |
| 864 | + * @param string $input_name HTML name that this input should have |
| 865 | + * @param boolean $is_mandatory indicates whether this field is mandatory for the user |
| 866 | + * @param boolean $is_disabled indicates whether this field is disabled (meaning, the user can't edit) |
| 867 | + * @param array $other_args hash representing all the other properties defined for this input in the form definition |
| 868 | + * @return string html code of input |
| 869 | + */ |
| 870 | + static function datetimepickerHTML($cur_value, $input_name, $is_mandatory, $is_disabled, $other_args) { |
| 871 | + |
| 872 | + global $wgOut, $sfgFieldNum, $sfigSettings; |
| 873 | + |
| 874 | + self::datetimePickerSetup(); |
| 875 | + |
| 876 | + $other_args["part of dtp"] = true; |
| 877 | + |
| 878 | + $jsattribs = array(); |
| 879 | + |
| 880 | + // if we have to show a reset button |
| 881 | + if ( array_key_exists( 'show reset button', $other_args ) || |
| 882 | + ( !array_key_exists( 'hide reset button', $other_args ) && $sfigSettings->datetimePickerShowResetButton ) ) { |
| 883 | + |
| 884 | + // some values must be available to the init function |
| 885 | + |
| 886 | + // is the button disabled? |
| 887 | + $jsattribs['disabled'] = $is_disabled; |
| 888 | + |
| 889 | + // set the button image |
| 890 | + if ( $is_disabled ) { |
| 891 | + $jsattribs['resetButtonImage'] = $sfigSettings->scriptPath . '/images/DateTimePickerResetButtonDisabled.gif'; |
| 892 | + } else { |
| 893 | + $jsattribs['resetButtonImage'] = $sfigSettings->scriptPath . '/images/DateTimePickerResetButton.gif'; |
| 894 | + } |
| 895 | + |
| 896 | + // set user classes |
| 897 | + if ( array_key_exists( 'class', $other_args ) ) $jsattribs[ "userClasses" ] = $other_args['class']; |
| 898 | + else $jsattribs[ "userClasses" ] = ""; |
| 899 | + |
| 900 | + } |
| 901 | + |
| 902 | + // build JS code from attributes array |
| 903 | + $jsattribsString = Xml::encodeJsVar( $jsattribs ); |
| 904 | + |
| 905 | + $jstext = <<<JAVASCRIPT |
| 906 | +jQuery(function(){ jQuery('#input_$sfgFieldNum').SemanticForms_registerInputInit(SFI_DTP_init, $jsattribsString ); }); |
| 907 | +JAVASCRIPT; |
| 908 | + |
| 909 | + // insert the code of the JS init function into the pages code |
| 910 | + $wgOut->addScript('<script type="text/javascript">' . $jstext . '</script>'); |
| 911 | + |
| 912 | + // find allowed values and keep only the date portion |
| 913 | + if ( array_key_exists( 'possible_values', $other_args ) && |
| 914 | + count( $other_args[ 'possible_values' ] ) ) { |
| 915 | + |
| 916 | + $other_args[ 'possible_values' ] = preg_replace( |
| 917 | + '/^\s*(\d{4}\/\d{2}\/\d{2}).*/', |
| 918 | + '$1', |
| 919 | + $other_args[ 'possible_values' ] |
| 920 | + ); |
| 921 | + } |
| 922 | + |
| 923 | + $separator = strpos($cur_value, " "); |
| 924 | + |
| 925 | + $html = '<span class="inputSpan' . ($is_mandatory ? ' mandatoryFieldSpan' : '') . '">' . |
| 926 | + self::jqDatePickerHTML(substr($cur_value + " ", 0, $separator), $input_name, $is_mandatory, $is_disabled, $other_args) . " " . |
| 927 | + self::timepickerHTML(substr($cur_value + " ", $separator + 1), $input_name, $is_mandatory, $is_disabled, $other_args) . |
| 928 | + Xml::element("input", |
| 929 | + array( |
| 930 | + "id" => "input_{$sfgFieldNum}", |
| 931 | + "name" => $input_name, |
| 932 | + "type" => "hidden", |
| 933 | + "value" => $cur_value |
| 934 | + )) |
| 935 | + . '</span>'; |
| 936 | + |
| 937 | + return $html; |
| 938 | + } |
| 939 | + |
| 940 | +// |
| 941 | +// static function wysiwygSetup() { |
| 942 | +// |
| 943 | +// } |
| 944 | +// |
| 945 | +// |
| 946 | +// static function wysiwygHTML ( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) { |
| 947 | +// |
| 948 | +// global $wgOut, $wgLang, $wgAmericanDates, $wgScriptPath, $wgFCKEditorDir; |
| 949 | +// global $sfgFieldNum, $sfgScriptPath, $sfigSettings; |
| 950 | +// global $sfgTabIndex, $sfgJSValidationCalls; // used to represent the current tab index in the form |
| 951 | +// |
| 952 | +// $htmltext = Html::element('textarea', array( |
| 953 | +// 'id' => "input_$sfgFieldNum", |
| 954 | +// 'class' => 'createboxInput', |
| 955 | +// 'name' => $input_name, |
| 956 | +// 'tabindex' => $sfgTabIndex, |
| 957 | +// 'rows' => 25, |
| 958 | +// 'cols' => 80 |
| 959 | +// )); |
| 960 | +// |
| 961 | +// $jstext = <<<JAVASCRIPT |
| 962 | +// addOnloadHook(function() |
| 963 | +// { |
| 964 | +// var oFCKeditor = new FCKeditor( 'input_$sfgFieldNum', '100%', '100%') ; |
| 965 | +// oFCKeditor.BasePath = "$wgScriptPath/$wgFCKEditorDir/" ; |
| 966 | +// oFCKeditor.ReplaceTextarea() ; |
| 967 | +// }); |
| 968 | +// |
| 969 | +// JAVASCRIPT; |
| 970 | +// |
| 971 | +// $sfgJSValidationCalls[] = "function() {document.getElementById('input_$sfgFieldNum').value = FCKeditorAPI.GetInstance('input_$sfgFieldNum').GetHtml();return true;}"; |
| 972 | +// |
| 973 | +// $wgOut->addScript( '<script type="text/javascript">' . $jstext . '</script>' ); |
| 974 | +// return array( $htmltext, "" ); |
| 975 | +// } |
| 976 | +// |
| 977 | + |
| 978 | + |
| 979 | + /** |
| 980 | + * Setup for input type "timepicker". |
| 981 | + * |
| 982 | + * Adds the Javascript code and css used by all timepickers. |
| 983 | + */ |
| 984 | + static private function timepickerSetup() { |
| 985 | + |
| 986 | + global $sfigSettings, $wgOut; |
| 987 | + |
| 988 | + static $hasRun = false; |
| 989 | + |
| 990 | + if ( !$hasRun ) { |
| 991 | + |
| 992 | + $wgOut->addScript( '<script type="text/javascript" src="' . $sfigSettings->scriptPath . '/libs/timepicker.js"></script> ' ); |
| 993 | + $wgOut->addExtensionStyle( $sfigSettings->scriptPath . '/skins/SFI_Timepicker.css' ); |
| 994 | + |
| 995 | + } |
| 996 | + |
| 997 | + } |
| 998 | + |
| 999 | + /** |
| 1000 | + * Definition of input type "timepicker" |
| 1001 | + * |
| 1002 | + * Returns the html code to be included in the page and registers the |
| 1003 | + * input's JS initialisation method |
| 1004 | + * |
| 1005 | + * @param string $cur_value current value of this field (which is sometimes null) |
| 1006 | + * @param string $input_name HTML name that this input should have |
| 1007 | + * @param boolean $is_mandatory indicates whether this field is mandatory for the user |
| 1008 | + * @param boolean $is_disabled indicates whether this field is disabled (meaning, the user can't edit) |
| 1009 | + * @param array $other_args hash representing all the other properties defined for this input in the form definition |
| 1010 | + * @return string html code of input |
| 1011 | + */ |
| 1012 | + static function timepickerHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) { |
| 1013 | + |
| 1014 | + global $wgOut; |
| 1015 | + global $sfgFieldNum; |
| 1016 | + global $sfigSettings; |
| 1017 | + |
| 1018 | + // The timepicker is created in four steps: |
| 1019 | + // first: set up HTML attributes |
| 1020 | + // second: assemble HTML |
| 1021 | + // third: set up JS attributes |
| 1022 | + // fourth: assemble JS call |
| 1023 | + |
| 1024 | + |
| 1025 | + // first: set up HTML attributes |
| 1026 | + $inputFieldDisabled = |
| 1027 | + array_key_exists( 'disable input field', $other_args ) |
| 1028 | + || ( !array_key_exists( 'enable input field', $other_args ) && $sfigSettings->timePickerDisableInputField ) |
| 1029 | + || $is_disabled ; |
| 1030 | + |
| 1031 | + if ( array_key_exists( 'class', $other_args ) ) $userClasses = $other_args['class']; |
| 1032 | + else $userClasses = ""; |
| 1033 | + |
| 1034 | + // second: assemble HTML |
| 1035 | + // create visible input field (for display) and invisible field (for data) |
| 1036 | + $html = self::textHTML( $cur_value, '', $is_mandatory, $inputFieldDisabled, $other_args, "input_{$sfgFieldNum}_tp_show", null, "createboxInput" ); |
| 1037 | + |
| 1038 | + if ( ! array_key_exists( 'part of dtp', $other_args ) ) { |
| 1039 | + $html .= Xml::element( "input", array( |
| 1040 | + 'id' => "input_{$sfgFieldNum}", |
| 1041 | + 'type' => 'hidden', |
| 1042 | + 'name' => $input_name, |
| 1043 | + 'value' => $cur_value |
| 1044 | + ) ); |
| 1045 | + } |
| 1046 | + |
| 1047 | + // append time picker button |
| 1048 | + if ( $is_disabled ) { |
| 1049 | + |
| 1050 | + $html .= Xml::openElement( |
| 1051 | + "button", |
| 1052 | + array( |
| 1053 | + 'type' => 'button', |
| 1054 | + 'class' => 'createboxInput ' . $userClasses, |
| 1055 | + 'disabled' => '1', |
| 1056 | + 'id' => "input_{$sfgFieldNum}_button" |
| 1057 | + ) ) |
| 1058 | + |
| 1059 | + . Xml::element( |
| 1060 | + "image", |
| 1061 | + array( 'src' => $sfigSettings->scriptPath . '/images/TimePickerButtonDisabled.gif' ) |
| 1062 | + ) |
| 1063 | + |
| 1064 | + . Xml::closeElement( "button" ); |
| 1065 | + |
| 1066 | + } else { |
| 1067 | + |
| 1068 | + $html .= "<button " |
| 1069 | + . Xml::expandAttributes ( array( |
| 1070 | + 'type' => 'button', |
| 1071 | + 'class' => 'createboxInput ' . $userClasses, |
| 1072 | + 'name' => "button", |
| 1073 | + ) ) |
| 1074 | + . " onclick=\"document.getElementById(this.id.replace('_button','_tp_show')).focus();\"" |
| 1075 | + . ">" |
| 1076 | + |
| 1077 | + . Xml::element( |
| 1078 | + "image", |
| 1079 | + array( 'src' => $sfigSettings->scriptPath . '/images/TimePickerButton.gif' ) |
| 1080 | + ) |
| 1081 | + |
| 1082 | + . Xml::closeElement( "button" ); |
| 1083 | + |
| 1084 | + } |
| 1085 | + |
| 1086 | + // append reset button (if selected) |
| 1087 | + if ( ! array_key_exists( 'part of dtp', $other_args ) && |
| 1088 | + ( array_key_exists( 'show reset button', $other_args ) || |
| 1089 | + $sfigSettings->timePickerShowResetButton && !array_key_exists( 'hide reset button', $other_args ) |
| 1090 | + ) |
| 1091 | + ) { |
| 1092 | + |
| 1093 | + if ( $is_disabled ) { |
| 1094 | + |
| 1095 | + $html .= Xml::openElement( |
| 1096 | + "button", |
| 1097 | + array( |
| 1098 | + 'type' => 'button', |
| 1099 | + 'class' => 'createboxInput ' . $userClasses, |
| 1100 | + 'disabled' => '1', |
| 1101 | + 'id' => "input_{$sfgFieldNum}_resetbutton" |
| 1102 | + ) ) |
| 1103 | + |
| 1104 | + . Xml::element( |
| 1105 | + "image", |
| 1106 | + array( 'src' => $sfigSettings->scriptPath . '/images/TimePickerResetButtonDisabled.gif' ) |
| 1107 | + |
| 1108 | + ) |
| 1109 | + . Xml::closeElement( "button" ); |
| 1110 | + |
| 1111 | + } else { |
| 1112 | + |
| 1113 | + $html .= "<button " |
| 1114 | + . Xml::expandAttributes ( array( |
| 1115 | + 'type' => 'button', |
| 1116 | + 'class' => 'createboxInput ' . $userClasses, |
| 1117 | + 'name' => "resetbutton", |
| 1118 | + ) ) |
| 1119 | + . " onclick=\"document.getElementById(this.id.replace('_resetbutton','')).value='';" |
| 1120 | + . "document.getElementById(this.id.replace('_resetbutton','_tp_show')).value='';\"" |
| 1121 | + . ">" |
| 1122 | + |
| 1123 | + . Xml::element( |
| 1124 | + "image", |
| 1125 | + array( 'src' => $sfigSettings->scriptPath . '/images/TimePickerResetButton.gif' ) |
| 1126 | + |
| 1127 | + ) |
| 1128 | + . Xml::closeElement( "button" ); |
| 1129 | + |
| 1130 | + } |
| 1131 | + } |
| 1132 | + |
| 1133 | + // wrap in span (e.g. used for mandatory inputs) |
| 1134 | + if ( ! array_key_exists( 'part of dtp', $other_args ) ) { |
| 1135 | + $html = '<span class="inputSpan' . ($is_mandatory ? ' mandatoryFieldSpan' : '') . '">' .$html . '</span>'; |
| 1136 | + } |
| 1137 | + |
| 1138 | + // third: if the timepicker is not disabled set up JS attributes ans assemble JS call |
| 1139 | + if ( !$is_disabled ) { |
| 1140 | + |
| 1141 | + self::timepickerSetup(); |
| 1142 | + |
| 1143 | + // set min time if valid, else use default |
| 1144 | + if ( array_key_exists( 'mintime', $other_args ) |
| 1145 | + && ( preg_match( '/^\d+:\d\d$/', trim( $other_args['mintime'] ) ) == 1 ) ) { |
| 1146 | + $minTime = trim( $other_args[ 'mintime' ] ); |
| 1147 | + } else { |
| 1148 | + $minTime = '00:00'; |
| 1149 | + } |
| 1150 | + |
| 1151 | + // set max time if valid, else use default |
| 1152 | + if ( array_key_exists( 'maxtime', $other_args ) |
| 1153 | + && ( preg_match( '/^\d+:\d\d$/', trim( $other_args['maxtime'] ) ) == 1 ) ) { |
| 1154 | + $maxTime = trim( $other_args[ 'maxtime' ] ); |
| 1155 | + } else { |
| 1156 | + $maxTime = '23:59'; |
| 1157 | + } |
| 1158 | + |
| 1159 | + // set interval if valid, else use default |
| 1160 | + if ( array_key_exists( 'interval', $other_args ) |
| 1161 | + && preg_match( '/^\d+$/', trim( $other_args['interval'] ) ) == 1 ) { |
| 1162 | + $interval = trim( $other_args[ 'interval' ] ); |
| 1163 | + } else { |
| 1164 | + $interval = '15'; |
| 1165 | + } |
| 1166 | + |
| 1167 | + // build JS code from attributes array |
| 1168 | + $jsattribs = array( |
| 1169 | + "minTime" => $minTime, |
| 1170 | + "maxTime" => $maxTime, |
| 1171 | + "interval" => $interval, |
| 1172 | + "format" => "hh:mm" |
| 1173 | + ); |
| 1174 | + |
| 1175 | + if ( array_key_exists( 'part of dtp', $other_args ) ) { |
| 1176 | + $jsattribs['partOfDTP'] = $other_args['part of dtp']; |
| 1177 | + } |
| 1178 | + |
| 1179 | + $jstext = Xml::encodeJsVar( $jsattribs ); |
| 1180 | + |
| 1181 | + $jstext = <<<JAVASCRIPT |
| 1182 | +jQuery(function(){ jQuery('#input_{$sfgFieldNum}_tp_show').SemanticForms_registerInputInit(SFI_TP_init, $jstext ); }); |
| 1183 | +JAVASCRIPT; |
| 1184 | + |
| 1185 | + // write JS code directly to the page's code |
| 1186 | + $wgOut->addScript( '<script type="text/javascript">' . $jstext . '</script>' ); |
| 1187 | + |
| 1188 | + // return HTML and name of JS init function |
| 1189 | + |
| 1190 | + } |
| 1191 | + |
| 1192 | + return $html; |
| 1193 | + |
| 1194 | + } |
| 1195 | + |
| 1196 | + /** |
| 1197 | + * Setup for input type "menuselect". |
| 1198 | + * Adds the Javascript code and css used by all menuselects. |
| 1199 | + */ |
| 1200 | + static private function menuselectSetup() { |
| 1201 | + |
| 1202 | + global $wgOut; |
| 1203 | + global $sfigSettings; |
| 1204 | + |
| 1205 | + static $hasRun = false; |
| 1206 | + |
| 1207 | + if ( !$hasRun ) { |
| 1208 | + |
| 1209 | + $wgOut->addScript( '<script type="text/javascript">sfigScriptPath="' . $sfigSettings->scriptPath . '";</script> ' ); |
| 1210 | + $wgOut->addScript( '<script type="text/javascript" src="' . $sfigSettings->scriptPath . '/libs/menuselect.js"></script> ' ); |
| 1211 | + $wgOut->addExtensionStyle( $sfigSettings->scriptPath . '/skins/SFI_Menuselect.css' ); |
| 1212 | + |
| 1213 | + } |
| 1214 | + |
| 1215 | + } |
| 1216 | + |
| 1217 | + /** |
| 1218 | + * Definition of input type "menuselect" |
| 1219 | + * |
| 1220 | + * Returns the html code to be included in the page and registers the |
| 1221 | + * input's JS initialisation method |
| 1222 | + * |
| 1223 | + * @param string $cur_value current value of this field (which is sometimes null) |
| 1224 | + * @param string $input_name HTML name that this input should have |
| 1225 | + * @param boolean $is_mandatory indicates whether this field is mandatory for the user |
| 1226 | + * @param boolean $is_disabled indicates whether this field is disabled (meaning, the user can't edit) |
| 1227 | + * @param array $other_args hash representing all the other properties defined for this input in the form definition |
| 1228 | + * @return string html code of input |
| 1229 | + */ |
| 1230 | + static function menuselectHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) { |
| 1231 | + global $wgParser, $wgUser, $wgTitle, $wgOut; |
| 1232 | + global $sfgFieldNum; |
| 1233 | + global $sfigSettings; |
| 1234 | + |
| 1235 | + self::menuselectSetup(); |
| 1236 | + |
| 1237 | + // first: set up HTML attributes |
| 1238 | + $inputFieldDisabled = |
| 1239 | + array_key_exists( 'disable input field', $other_args ) |
| 1240 | + || ( !array_key_exists( 'enable input field', $other_args ) && $sfigSettings->timePickerDisableInputField ) |
| 1241 | + || $is_disabled ; |
| 1242 | + |
| 1243 | + // second: assemble HTML |
| 1244 | + // create visible input field (for display) and invisible field (for data) |
| 1245 | + $html = self::textHTML( $cur_value, '', $is_mandatory, $inputFieldDisabled, $other_args, "input_{$sfgFieldNum}_show", null, "createboxInput" ) |
| 1246 | + . Xml::element( "input", array( |
| 1247 | + 'id' => "input_{$sfgFieldNum}", |
| 1248 | + 'type' => 'hidden', |
| 1249 | + 'name' => $input_name, |
| 1250 | + 'value' => $cur_value |
| 1251 | + ) ); |
| 1252 | + |
| 1253 | + |
| 1254 | + $html .= "<span class='SFI_menuselect' id='span_{$sfgFieldNum}_tree'>"; |
| 1255 | + |
| 1256 | + |
| 1257 | + // if ( array_key_exists( 'delimiter', $other_args ) ) $delimiter = $other_args[ 'delimiter' ]; |
| 1258 | + // else $delimiter = ' '; |
| 1259 | + |
| 1260 | + // parse menu structure |
| 1261 | + |
| 1262 | + $options = ParserOptions::newFromUser( $wgUser ); |
| 1263 | + |
| 1264 | + $oldStripState = $wgParser->mStripState; |
| 1265 | + $wgParser->mStripState = new StripState(); |
| 1266 | + |
| 1267 | + // FIXME: SF does not parse options correctly. Users have to replace | by {{!}} |
| 1268 | + $structure = str_replace( '{{!}}', '|', $other_args["structure"] ); |
| 1269 | + |
| 1270 | + $structure = $wgParser->parse( $structure, $wgTitle, $options )->getText(); |
| 1271 | + |
| 1272 | + $wgParser->mStripState = $oldStripState; |
| 1273 | + |
| 1274 | + |
| 1275 | + $html .= str_replace( '<li', '<li class=\'ui-state-default\'', $structure ); |
| 1276 | + |
| 1277 | + $html .= "</span>"; |
| 1278 | + |
| 1279 | + // wrap in span (e.g. used for mandatory inputs) |
| 1280 | + $html = '<span class="inputSpan' . ($is_mandatory ? ' mandatoryFieldSpan' : '') . '">' .$html . '</span>'; |
| 1281 | + |
| 1282 | + $jstext = <<<JAVASCRIPT |
| 1283 | +jQuery(function(){ jQuery('#input_$sfgFieldNum').SemanticForms_registerInputInit(SFI_MS_init, null ); }); |
| 1284 | +JAVASCRIPT; |
| 1285 | + |
| 1286 | + // write JS code directly to the page's code |
| 1287 | + $wgOut->addScript( '<script type="text/javascript">' . $jstext . '</script>' ); |
| 1288 | + |
| 1289 | + return array( $html, "", "SFI_MS_init" ); |
| 1290 | + |
| 1291 | + } |
| 1292 | +} |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/SFI_Inputs.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 1293 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/libs/menuselect.js |
— | — | @@ -0,0 +1,265 @@ |
| 2 | +/** |
| 3 | + * Javascript code to be used with input type menuselect. |
| 4 | + * |
| 5 | + * @author Stephan Gambke |
| 6 | + * @version 0.4 |
| 7 | + * |
| 8 | + */ |
| 9 | + |
| 10 | +/** |
| 11 | + * Initializes a menuselect input |
| 12 | + * |
| 13 | + * @param inputID ( String ) the id of the input to initialize |
| 14 | + */ |
| 15 | +function SFI_MS_init( inputID, params ) { |
| 16 | + |
| 17 | + var treeid = "#" + inputID.replace(/input/,"span") + "_tree" |
| 18 | + |
| 19 | + jQuery(treeid).css("visibility","hidden"); |
| 20 | + |
| 21 | + // wrap content in span to separate content from sub-menus, |
| 22 | + // wrap content in div to support animating the list item width later |
| 23 | + jQuery( treeid + " li" ).each( |
| 24 | + function() { |
| 25 | + |
| 26 | + jQuery( this ).contents().not( "ul" ) |
| 27 | + .wrapAll( '<span />' ) |
| 28 | + .wrapAll( '<div class="cont"/>' ); |
| 29 | + |
| 30 | + jQuery( this ).contents().not( "ul" ) |
| 31 | + .find("div.cont") |
| 32 | + .css('position','fixed'); |
| 33 | + |
| 34 | + // insert the arrows indicating submenus |
| 35 | + if ( jQuery( this ).children( "ul" ).length > 0 ) { |
| 36 | + jQuery( this ).children( "span" ).children( "div" ) |
| 37 | + .before( '<div class="arrow" ><img src="' + sfigScriptPath + '/images/MenuSelectArrow.gif" /></div>' ) |
| 38 | + } |
| 39 | + |
| 40 | + } ); |
| 41 | + |
| 42 | + // ensure labels of list item have constant width regardless of width of list item |
| 43 | + // prevents layout changes when list item width is changed |
| 44 | + // set position static ( was set to fixed to calculate text width ) |
| 45 | + jQuery( treeid + " li>span>div.cont" ).each( function() { |
| 46 | + jQuery( this ).width( jQuery( this ).outerWidth(true) + jQuery( this ).siblings("div.arrow").outerWidth(true) + 5); |
| 47 | + jQuery( this ).css( "position", "static" ); |
| 48 | + } ); |
| 49 | + |
| 50 | + // add class for default state and fix dimensions |
| 51 | + jQuery( treeid + " li" ) |
| 52 | + .addClass( "ui-state-default" ) |
| 53 | + .each( |
| 54 | + function() { |
| 55 | + jQuery(this).height(jQuery(this).height()); |
| 56 | + jQuery(this).width(jQuery(this).width()); |
| 57 | + |
| 58 | + // to be used for restoring width after mouse leves this item |
| 59 | + jQuery(this).data("width", jQuery(this).width()); |
| 60 | + } |
| 61 | + ); |
| 62 | + |
| 63 | + // initially hide everything |
| 64 | + jQuery( treeid + " ul" ) |
| 65 | + .css({"z-index":1}) |
| 66 | + .hide() |
| 67 | + .fadeTo(0, 0 ); |
| 68 | + |
| 69 | + // some crap "browsers" need special treatment |
| 70 | + if ( jQuery.browser.msie ) { |
| 71 | + jQuery( treeid + " ul" ).css({ "position":"relative" }); |
| 72 | + } |
| 73 | + |
| 74 | + // sanitize links |
| 75 | + jQuery( treeid ).find( "a" ) |
| 76 | + .each( |
| 77 | + function() { |
| 78 | + |
| 79 | + // find title of target page |
| 80 | + if ( jQuery( this ).hasClass( 'new' ) ) { // for red links get it from the href |
| 81 | + |
| 82 | + regexp = /.*title=([^&]*).*/; |
| 83 | + res = regexp.exec( jQuery( this ).attr( 'href' ) ); |
| 84 | + |
| 85 | + title = unescape( res[1] ); |
| 86 | + |
| 87 | + jQuery( this ).data( 'title', title ); // save title in data |
| 88 | + |
| 89 | + } else { // for normal links title is in the links title attribute |
| 90 | + jQuery( this ) |
| 91 | + .data( 'title', jQuery( this ).attr( 'title' ) ); // save title in data |
| 92 | + } |
| 93 | + |
| 94 | + jQuery( this ) |
| 95 | + .removeAttr( 'title' ) // remove title to prevent tooltips on links |
| 96 | + .bind( "click", function( event ) { |
| 97 | + event.preventDefault(); |
| 98 | + } ) // prevent following links |
| 99 | + |
| 100 | + } |
| 101 | + ); |
| 102 | + |
| 103 | + // attach event handlers |
| 104 | + |
| 105 | + // mouse entered list item |
| 106 | + jQuery( treeid + " li" ) |
| 107 | + .mouseenter( function( evt ) { |
| 108 | + |
| 109 | + // switch classes to change display style |
| 110 | + jQuery( evt.currentTarget ) |
| 111 | + .removeClass( "ui-state-default" ) |
| 112 | + .addClass( "ui-state-hover" ); |
| 113 | + |
| 114 | + // if we reentered (i.e. moved mouse from item to sub-item) |
| 115 | + if (jQuery( evt.currentTarget ).data( "timeout" ) != null) { |
| 116 | + |
| 117 | + // clear any timeout that may still run on the list item |
| 118 | + // (i.e. do not fade out submenu) |
| 119 | + clearTimeout( jQuery( evt.currentTarget ).data( "timeout" ) ); |
| 120 | + jQuery( evt.currentTarget ).data( "timeout", null ); |
| 121 | + |
| 122 | + // abort further actions (just leave the submenu open) |
| 123 | + return; |
| 124 | + } |
| 125 | + |
| 126 | + |
| 127 | + // if list item has sub-items... |
| 128 | + if ( jQuery( evt.currentTarget ).children( "ul" ).length > 0 ) { |
| 129 | + |
| 130 | + // set timeout to show sub-items |
| 131 | + jQuery( evt.currentTarget ) |
| 132 | + .data( "timeout", setTimeout( |
| 133 | + function() { |
| 134 | + |
| 135 | + // clear timeout data |
| 136 | + jQuery( evt.currentTarget ).data( "timeout", null ); |
| 137 | + |
| 138 | + // some crap "browsers" need special treatment |
| 139 | + if ( jQuery.browser.msie ) { |
| 140 | + jQuery( evt.currentTarget ).children( "ul" ) |
| 141 | + .css( { |
| 142 | + "top": -jQuery( evt.currentTarget ).outerHeight(), |
| 143 | + "left": jQuery( evt.currentTarget ).outerWidth() + 10 |
| 144 | + } ); |
| 145 | + } |
| 146 | + |
| 147 | + // fade in sub-menu |
| 148 | + // can not use fadeIn, it sets display:block |
| 149 | + jQuery( evt.currentTarget ).children( "ul" ) |
| 150 | + .css( { |
| 151 | + "display":"inline", |
| 152 | + "z-index":100 |
| 153 | + } ) |
| 154 | + .fadeTo( 400, 1 ); |
| 155 | + |
| 156 | + w = jQuery( evt.currentTarget ).width(); |
| 157 | + |
| 158 | + // animate list item width |
| 159 | + jQuery( evt.currentTarget ) |
| 160 | + .animate( { "width": w + 10 }, 100 ); |
| 161 | + |
| 162 | + }, 400 ) |
| 163 | + ); |
| 164 | + } |
| 165 | + |
| 166 | + } ); |
| 167 | + |
| 168 | + // mouse left list item |
| 169 | + jQuery( treeid + " li" ) |
| 170 | + .mouseleave( function( evt ) { |
| 171 | + |
| 172 | + // switch classes to change display style |
| 173 | + jQuery( evt.currentTarget ) |
| 174 | + .removeClass( "ui-state-hover" ) |
| 175 | + .addClass( "ui-state-default" ) |
| 176 | + |
| 177 | + // if we just moved in and out of the item (without really hovering) |
| 178 | + if (jQuery( evt.currentTarget ).data( "timeout" ) != null) { |
| 179 | + |
| 180 | + // clear any timeout that may still run on the list item |
| 181 | + // (i.e. do not fade in submenu) |
| 182 | + clearTimeout( jQuery( evt.currentTarget ).data( "timeout" ) ); |
| 183 | + jQuery( evt.currentTarget ).data( "timeout", null ); |
| 184 | + |
| 185 | + // abort further actions (no need to close) |
| 186 | + return; |
| 187 | + } |
| 188 | + |
| 189 | + // if list item has sub-items... |
| 190 | + if ( jQuery( evt.currentTarget ).children( "ul" ).length > 0 ) { |
| 191 | + |
| 192 | + // hide sub-items after a short pause |
| 193 | + jQuery( evt.currentTarget ).data( "timeout", setTimeout( |
| 194 | + function() { |
| 195 | + |
| 196 | + // clear timeout data |
| 197 | + jQuery( evt.currentTarget ).data( "timeout", null ); |
| 198 | + |
| 199 | + // fade out sub-menu |
| 200 | + // when finished set display:none and put list item back in |
| 201 | + // line ( i.e. animate to original width ) |
| 202 | + jQuery( evt.currentTarget ).children( "ul" ) |
| 203 | + .css( "z-index", 1 ) |
| 204 | + .fadeTo( 400, 0, |
| 205 | + function() { |
| 206 | + |
| 207 | + jQuery( this ).css( "display", "none" ); |
| 208 | + |
| 209 | + // animate list item width |
| 210 | + jQuery( this ).parent() |
| 211 | + .animate( { "width": jQuery( this ).parent().data( "width" ) }, 100 ); |
| 212 | + } |
| 213 | + ); |
| 214 | + |
| 215 | + }, 400 ) |
| 216 | + ); |
| 217 | + } |
| 218 | + |
| 219 | + } ); |
| 220 | + |
| 221 | + // clicked list item |
| 222 | + jQuery( treeid + " li" ) |
| 223 | + .mousedown( function() { |
| 224 | + |
| 225 | + // set visible value and leave input |
| 226 | + jQuery( "#" + inputID + "_show" ).attr( "value", jQuery( this ) |
| 227 | + .children( "span" ).find( "div.cont" ).text() ).blur(); |
| 228 | + |
| 229 | + // set hidden value that gets sent back to the server |
| 230 | + link = jQuery( this ).children( "span" ).find( "div.cont>a" ); |
| 231 | + |
| 232 | + // if content is link |
| 233 | + if ( link.length == 1 ) { |
| 234 | + |
| 235 | + // use title set by MW |
| 236 | + jQuery( "#" + inputID ).attr( "value", link.data( "title" ) ); |
| 237 | + |
| 238 | + } else { |
| 239 | + |
| 240 | + // just use text of list item |
| 241 | + jQuery( "#" + inputID ).attr( "value", jQuery( this ).children( "span" ).find( "div.cont" ).text() ); |
| 242 | + |
| 243 | + } |
| 244 | + return false; |
| 245 | + |
| 246 | + } ); |
| 247 | + |
| 248 | + // show top menu when input gets focus |
| 249 | + jQuery( "#" + inputID + "_show" ) |
| 250 | + .focus( function() { |
| 251 | + jQuery( treeid + ">ul" ).css( "display", "inline" ).fadeTo( 400, 1 ); |
| 252 | + } ); |
| 253 | + |
| 254 | + // hide all menus when input loses focus |
| 255 | + jQuery( "#" + inputID + "_show" ) |
| 256 | + .blur( function() { |
| 257 | + |
| 258 | + jQuery( treeid + " ul" ).fadeTo( 400, 0, |
| 259 | + function() { |
| 260 | + jQuery( this ).css( "display", "none" ); |
| 261 | + } ); |
| 262 | + } ); |
| 263 | + |
| 264 | + jQuery( treeid ).css("visibility","visible"); |
| 265 | + |
| 266 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/libs/menuselect.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 267 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/libs/datetimepicker.js |
— | — | @@ -0,0 +1,37 @@ |
| 2 | +/** |
| 3 | + * Javascript code to be used with input type datepicker. |
| 4 | + * |
| 5 | + * @author Stephan Gambke |
| 6 | + * @version 0.4 |
| 7 | + * |
| 8 | + */ |
| 9 | + |
| 10 | + |
| 11 | +function SFI_DTP_init ( input_id, params ) { |
| 12 | + |
| 13 | + var dp = jQuery( "#" + input_id + "_dp_show"); // datepicker element |
| 14 | + var tp = jQuery( "#" + input_id + "_tp_show"); // timepicker element |
| 15 | + |
| 16 | + jQuery( "#" + input_id + "_dp_show, #" + input_id + "_tp_show" ).change (function(){ |
| 17 | + jQuery( "#" + input_id ).attr("value", |
| 18 | + jQuery.datepicker.formatDate( dp.datepicker("option", "altFormat"), dp.datepicker("getDate"), null ) + |
| 19 | + " " + tp.attr( "value" ) |
| 20 | + ); |
| 21 | + }) |
| 22 | + |
| 23 | + if ( params.resetButtonImage ) { |
| 24 | + |
| 25 | + if ( params.disabled ) { |
| 26 | + // append inert reset button if image is set |
| 27 | + tp.parent().append('<button type="button" class="ui-datetimepicker-trigger' + params.userClasses + '" disabled><img src="' + params.resetButtonImage + '" alt="..." title="..."></button>'); |
| 28 | + } else { |
| 29 | + var resetbutton = jQuery('<button type="button" class="ui-datetimepicker-trigger ' + params.userClasses + '" ><img src="' + params.resetButtonImage + '" alt="..." title="..."></button>'); |
| 30 | + tp.parent().append(resetbutton); |
| 31 | + resetbutton.click(function(){ |
| 32 | + dp.datepicker( "setDate", null); |
| 33 | + tp.attr( "value", "" ); |
| 34 | + jQuery( "#" + input_id ).attr( "value", "" ); |
| 35 | + }) |
| 36 | + } |
| 37 | + } |
| 38 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/libs/datetimepicker.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 39 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/libs/regexp.js |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +/** |
| 3 | + * Javascript code to be used with input type regexp. |
| 4 | + * |
| 5 | + * @author Stephan Gambke |
| 6 | + * @version 0.4 |
| 7 | + * |
| 8 | + */ |
| 9 | + |
| 10 | +/** |
| 11 | + * Validates inputs of type regexp. |
| 12 | + * |
| 13 | + * @param input_id (String) the id string of the input to check |
| 14 | + * @param params (Object) the parameter object for the check, contains |
| 15 | + * retext: (String) regular expression the input's value has to match |
| 16 | + * inverse: (Boolean) if the check result shall be inverted |
| 17 | + * message: (String) the message too be printed if the input's value does not match |
| 18 | + * @return (Boolean) true, if the input's value matches the regular expression in |
| 19 | + * retext, false otherwise; the value is inverted if inverse is true |
| 20 | + */ |
| 21 | +function SFI_RE_validate ( input_id, params ) { //input_number, retext, inverse, message, multiple |
| 22 | + |
| 23 | + var re = new RegExp( jQuery( "<div/>" ).html( params.retext ).text() ); |
| 24 | + var match = re.test( jQuery('#' + input_id).attr("value") ); |
| 25 | + |
| 26 | + if ( ( match && ! params.inverse ) || ( ! match && params.inverse ) ) { |
| 27 | + return true; |
| 28 | + } else { |
| 29 | + jQuery( '#' + input_id ).parent().addErrorMessage(params.message); |
| 30 | + return false; |
| 31 | + } |
| 32 | +} |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/libs/regexp.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 33 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/libs/datepicker.js |
— | — | @@ -0,0 +1,172 @@ |
| 2 | +/** |
| 3 | + * Javascript code to be used with input type datepicker. |
| 4 | + * |
| 5 | + * @author Stephan Gambke |
| 6 | + * @version 0.4 |
| 7 | + * |
| 8 | + */ |
| 9 | + |
| 10 | +function SFI_DP_init ( input_id, params ) { |
| 11 | + |
| 12 | + var input = jQuery("#" + input_id); |
| 13 | + var re = /\d{4}\/\d{2}\/\d{2}/ |
| 14 | + |
| 15 | + if ( params.disabled ) { |
| 16 | + |
| 17 | + // append inert reset button if image is set |
| 18 | + if ( params.resetButtonImage && ! params.partOfDTP ) { |
| 19 | + input.after('<button type="button" class="ui-datepicker-trigger' + params.userClasses + '" disabled><img src="' + params.resetButtonImage + '" alt="..." title="..."></button>'); |
| 20 | + } |
| 21 | + |
| 22 | + // append inert datepicker button |
| 23 | + input.after('<button type="button" class="ui-datepicker-trigger' + params.userClasses + '" disabled><img src="' + params.buttonImage + '" alt="..." title="..."></button>'); |
| 24 | + |
| 25 | + // set value for input fields |
| 26 | + try { |
| 27 | + if ( ! re.test( params.currValue ) ) { |
| 28 | + throw "Wrong date format!"; |
| 29 | + } |
| 30 | + input.attr( "value", jQuery.datepicker.formatDate(params.dateFormat, jQuery.datepicker.parseDate( "yy/mm/dd", params.currValue, null ), null ) ); |
| 31 | + |
| 32 | + } catch (e) { |
| 33 | + input.attr( "value", params.currValue ); |
| 34 | + } |
| 35 | + } else { |
| 36 | + |
| 37 | + // append reset button if image is set |
| 38 | + if ( params.resetButtonImage && ! params.partOfDTP ) { |
| 39 | + var resetbutton = jQuery('<button type="button" class="ui-datepicker-trigger ' + params.userClasses + '" ><img src="' + params.resetButtonImage + '" alt="..." title="..."></button>'); |
| 40 | + input.after(resetbutton); |
| 41 | + resetbutton.click(function(){ |
| 42 | + input.datepicker( "setDate", null); |
| 43 | + }) |
| 44 | + } |
| 45 | + |
| 46 | + input.datepicker( { |
| 47 | + "showOn": "both", |
| 48 | + "buttonImage": params.buttonImage, |
| 49 | + "buttonImageOnly": false, |
| 50 | + "changeMonth": true, |
| 51 | + "changeYear": true, |
| 52 | + "altFormat": "yy/mm/dd", |
| 53 | + // Today button does not work (http://dev.jqueryui.com/ticket/4045) |
| 54 | + // do not show button panel for now |
| 55 | + // TODO: show date picker button panel when bug is fixed |
| 56 | + "showButtonPanel": false, |
| 57 | + "firstDay": params.firstDay, |
| 58 | + "showWeek": params.showWeek, |
| 59 | + "dateFormat": params.dateFormat, |
| 60 | + "beforeShowDay": function (date) {return SFI_DP_checkDate("#" + input_id, date);} |
| 61 | + } ); |
| 62 | + |
| 63 | + if ( ! params.partOfDTP ) { |
| 64 | + input.datepicker( "option", "altField", "#" + input_id.replace( "_dp_show", "" ) ); |
| 65 | + } |
| 66 | + |
| 67 | + if ( params.minDate ) { |
| 68 | + input.datepicker( "option", "minDate", |
| 69 | + jQuery.datepicker.parseDate("yy/mm/dd", params.minDate, null) ); |
| 70 | + } |
| 71 | + |
| 72 | + if ( params.maxDate ) { |
| 73 | + input.datepicker( "option", "maxDate", |
| 74 | + jQuery.datepicker.parseDate("yy/mm/dd", params.maxDate, null) ); |
| 75 | + } |
| 76 | + |
| 77 | + if ( params.userClasses ) { |
| 78 | + input.datepicker("widget").addClass( params.userClasses ); |
| 79 | + jQuery("#" + input_id + " + button").addClass( params.userClasses ); |
| 80 | + } |
| 81 | + |
| 82 | + if ( params.disabledDates ) { |
| 83 | + |
| 84 | + var disabledDates = params.disabledDates.map(function(range) { |
| 85 | + return [new Date(range[0], range[1], range[2]), new Date(range[3], range[4], range[5])] |
| 86 | + }); |
| 87 | + |
| 88 | + input.datepicker("option", "disabledDates", disabledDates); |
| 89 | + } |
| 90 | + |
| 91 | + if ( params.highlightedDates ) { |
| 92 | + |
| 93 | + var highlightedDates = params.highlightedDates.map(function(range) { |
| 94 | + return [new Date(range[0], range[1], range[2]), new Date(range[3], range[4], range[5])] |
| 95 | + }); |
| 96 | + |
| 97 | + input.datepicker("option", "highlightedDates", highlightedDates); |
| 98 | + } |
| 99 | + |
| 100 | + if (params.disabledDays) { |
| 101 | + input.datepicker("option", "disabledDays", params.disabledDays); |
| 102 | + } |
| 103 | + |
| 104 | + if (params.highlightedDays) { |
| 105 | + input.datepicker("option", "highlightedDays", params.highlightedDays); |
| 106 | + } |
| 107 | + |
| 108 | + try { |
| 109 | + if ( ! re.test( params.currValue ) ) { |
| 110 | + throw "Wrong date format!"; |
| 111 | + } |
| 112 | + input.datepicker( "setDate", jQuery.datepicker.parseDate( "yy/mm/dd", params.currValue, null ) ); |
| 113 | + |
| 114 | + } catch (e) { |
| 115 | + input.attr( "value", params.currValue ); |
| 116 | + jQuery( "#" + input_id.replace( "_dp_show", "" )).attr( "value", params.currValue ); |
| 117 | + } |
| 118 | + } |
| 119 | +} |
| 120 | + |
| 121 | +/** |
| 122 | + * Checks a date if it is to be enabled or highlighted |
| 123 | + * |
| 124 | + * This function is a callback function given to the jQuery datepicker to be |
| 125 | + * called for every date before it is displayed. |
| 126 | + * |
| 127 | + * @param input the input the datepicker works on |
| 128 | + * @param date the date object that is to be displayed |
| 129 | + * @return Array(Boolean enabled, Boolean highlighted, "") determining the style and behaviour |
| 130 | + */ |
| 131 | +function SFI_DP_checkDate( input, date ) { |
| 132 | + |
| 133 | + var enable = true |
| 134 | + |
| 135 | + var disabledDates = jQuery( input ).datepicker( "option", "disabledDates" ); |
| 136 | + |
| 137 | + if ( disabledDates ) { |
| 138 | + for ( i = 0; i < disabledDates.length; ++i ) { |
| 139 | + if ( (date >= disabledDates[i][0] ) && ( date <= disabledDates[i][1] ) ) { |
| 140 | + enable = false; |
| 141 | + break; |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | + |
| 146 | + var disabledDays = jQuery( input ).datepicker( "option", "disabledDays" ); |
| 147 | + |
| 148 | + if ( disabledDays ) { |
| 149 | + enable = enable && !disabledDays[ date.getDay() ]; |
| 150 | + } |
| 151 | + |
| 152 | + var highlightedDates = jQuery( input ).datepicker( "option", "highlightedDates" ); |
| 153 | + var highlight = ""; |
| 154 | + |
| 155 | + if ( highlightedDates ) { |
| 156 | + for ( var i = 0; i < highlightedDates.length; ++i ) { |
| 157 | + if ( ( date >= highlightedDates[i][0] ) && ( date <= highlightedDates[i][1] ) ) { |
| 158 | + highlight = "ui-state-highlight"; |
| 159 | + break; |
| 160 | + } |
| 161 | + } |
| 162 | + } |
| 163 | + |
| 164 | + var highlightedDays = jQuery( input ).datepicker( "option", "highlightedDays" ); |
| 165 | + |
| 166 | + if ( highlightedDays ) { |
| 167 | + if ( highlightedDays[ date.getDay() ] ) { |
| 168 | + highlight = "ui-state-highlight"; |
| 169 | + } |
| 170 | + } |
| 171 | + |
| 172 | + return [ enable, highlight, "" ]; |
| 173 | +} |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/libs/datepicker.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 174 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/libs/timepicker.js |
— | — | @@ -0,0 +1,179 @@ |
| 2 | +/** |
| 3 | + * Javascript code to be used with input type timepicker. |
| 4 | + * |
| 5 | + * @author Stephan Gambke |
| 6 | + * @version 0.4 |
| 7 | + * |
| 8 | + */ |
| 9 | + |
| 10 | +/** |
| 11 | + * Initializes a timepicker input |
| 12 | + * |
| 13 | + * @param inputID (String) the id of the input to initialize |
| 14 | + * @param params (Object) the parameter object for the timepicker, contains |
| 15 | + * minTime: (String) the minimum time to be shown (format hh:mm) |
| 16 | + * maxTime: (String) the maximum time to be shown (format hh:mm) |
| 17 | + * interval: (String) the interval between selectable times in minutes |
| 18 | + * format: (String) a format string (unused) (do we even need it?) |
| 19 | + * |
| 20 | + */ |
| 21 | +function SFI_TP_init( inputIDshow, params ) { // minTime, maxTime, interval, format |
| 22 | + |
| 23 | + var inputID = inputIDshow.replace( "_tp_show", "" ); |
| 24 | + |
| 25 | + // sanitize inputs |
| 26 | + var re = /^\d+:\d\d$/; |
| 27 | + var minh = 0; |
| 28 | + var minm = 0; |
| 29 | + |
| 30 | + var maxh = 23; |
| 31 | + var maxm = 59; |
| 32 | + |
| 33 | + if ( re.test( params.minTime ) ) { |
| 34 | + |
| 35 | + var min = params.minTime.split( ':', 2 ); |
| 36 | + minh = Number( min[0] ); |
| 37 | + minm = Number( min[1] ); |
| 38 | + |
| 39 | + if ( minm > 59 ) minm = 59; |
| 40 | + } |
| 41 | + |
| 42 | + if ( re.test( params.maxTime ) ) { |
| 43 | + |
| 44 | + var max = params.maxTime.split( ':', 2 ); |
| 45 | + maxh = Number( max[0] ); |
| 46 | + maxm = Number( max[1] ); |
| 47 | + |
| 48 | + if ( maxm > 59 ) maxm = 59; |
| 49 | + } |
| 50 | + |
| 51 | + var interv = Number( params.interval ); |
| 52 | + |
| 53 | + if ( interv < 1 ) interv = 1; |
| 54 | + else if ( interv > 60 ) interv = 60; |
| 55 | + |
| 56 | + // build html structure |
| 57 | + var sp = jQuery( "<span class='SFI_timepicker' id='" + inputID + "_tree' ></span>" ).insertBefore( "#" + inputIDshow ); |
| 58 | + |
| 59 | + var ulh = jQuery( "<ul>" ).appendTo( sp ); |
| 60 | + |
| 61 | + |
| 62 | + for ( var h = minh; h <= maxh; ++h ) { |
| 63 | + |
| 64 | + var lih = jQuery( "<li class='ui-state-default'>" + ( ( h < 10 ) ? "0" : "" ) + h + "</li>" ).appendTo( ulh ); |
| 65 | + |
| 66 | + //TODO: Replace value for "show" by formatted string |
| 67 | + lih |
| 68 | + .data( "value", ( ( h < 10 ) ? "0" : "" ) + h + ":00" ) |
| 69 | + .data( "show", ( ( h < 10 ) ?"0" : "" ) + h + ":00" ); |
| 70 | + |
| 71 | + var ulm = jQuery( "<ul>" ).appendTo( lih ); |
| 72 | + |
| 73 | + for ( var m = ( (h == minh) ? minm : 0 ) ; m <= ( (h == maxh) ? maxm : 59 ); m += interv ) { |
| 74 | + |
| 75 | + var lim = jQuery( "<li class='ui-state-default'>" + ( ( m < 10 ) ? "0" : "" ) + m + "</li>" ).appendTo( ulm ); |
| 76 | + |
| 77 | + //TODO: Replace value for "show" by formatted string |
| 78 | + lim |
| 79 | + .data( "value", ( ( h < 10 ) ? "0" : "" ) + h + ":" + ( ( m < 10 ) ? "0" : "") + m ) |
| 80 | + .data( "show", ( ( h < 10 ) ? "0" : "") + h + ":" + ( ( m < 10 ) ? "0" : "" ) + m ); |
| 81 | + |
| 82 | + } |
| 83 | + |
| 84 | + } |
| 85 | + |
| 86 | + // initially hide everything |
| 87 | + jQuery("#" + inputID + "_tree ul") |
| 88 | + .hide(); |
| 89 | + |
| 90 | + // attach event handlers |
| 91 | + jQuery("#" + inputID + "_tree li") // hours |
| 92 | + .mouseover(function(evt){ |
| 93 | + |
| 94 | + // clear any timeout that may still run on the last list item |
| 95 | + clearTimeout(jQuery(evt.currentTarget).data("timeout")); |
| 96 | + |
| 97 | + jQuery(evt.currentTarget) |
| 98 | + |
| 99 | + // switch classes to change display style |
| 100 | + .removeClass("ui-state-default") |
| 101 | + .addClass("ui-state-hover") |
| 102 | + |
| 103 | + // set timeout to show minutes for selected hour |
| 104 | + .data("timeout", setTimeout( |
| 105 | + function(){ |
| 106 | + //console.log("mouseover timer " + jQuery(evt.currentTarget).text()); |
| 107 | + jQuery(evt.currentTarget).children().fadeIn(); |
| 108 | + },400)); |
| 109 | + |
| 110 | + }); |
| 111 | + |
| 112 | + jQuery("#" + inputID + "_tree li") // hours |
| 113 | + .mouseout(function(evt){ |
| 114 | + |
| 115 | + // clear any timeout that may still run on this jQuery list item |
| 116 | + clearTimeout(jQuery(evt.currentTarget).data("timeout")); |
| 117 | + |
| 118 | + jQuery(evt.currentTarget) |
| 119 | + |
| 120 | + // switch classes to change display style |
| 121 | + .removeClass("ui-state-hover") |
| 122 | + .addClass("ui-state-default") |
| 123 | + |
| 124 | + // hide minutes after a short pause |
| 125 | + .data("timeout", setTimeout( |
| 126 | + function(){ |
| 127 | + //console.log("mouseout timer " + jQuery(evt.currentTarget).text()); |
| 128 | + jQuery(evt.currentTarget).children().fadeOut(); |
| 129 | + },400)); |
| 130 | + |
| 131 | + }); |
| 132 | + |
| 133 | + jQuery("#" + inputID + "_tree li") // hours, minutes |
| 134 | + .mousedown(function(evt){ |
| 135 | + // set values and leave input |
| 136 | + jQuery("#" + inputIDshow ).attr("value", jQuery(this).data("show")).blur().change(); |
| 137 | + //jQuery("#" + inputID ).attr("value", jQuery(this).data("value")); |
| 138 | + |
| 139 | + // clear any timeout that may still run on this jQuery list item |
| 140 | + clearTimeout(jQuery(evt.currentTarget).data("timeout")); |
| 141 | + |
| 142 | + jQuery(evt.currentTarget) |
| 143 | + |
| 144 | + // switch classes to change display style |
| 145 | + .removeClass("ui-state-hover") |
| 146 | + .addClass("ui-state-default") |
| 147 | + |
| 148 | + // avoid propagation to parent list item (e.g. hours), |
| 149 | + // they would overwrite the input value |
| 150 | + return false; |
| 151 | + }); |
| 152 | + |
| 153 | + // show timepicker when input gets focus |
| 154 | + jQuery("#" + inputIDshow ).focus(function() { |
| 155 | + jQuery("#" + inputID + "_tree>ul").fadeIn(); |
| 156 | + }); |
| 157 | + |
| 158 | + // hide timepicker when input loses focus |
| 159 | + jQuery("#" + inputIDshow ).blur(function() { |
| 160 | + jQuery("#" + inputID + "_tree ul").fadeOut("normal", function() {jQuery(this).hide()}); |
| 161 | + }); |
| 162 | + |
| 163 | + if ( ! params.partOfDTP ) { |
| 164 | + jQuery("#" + inputIDshow).change(function() { |
| 165 | + jQuery("#" + inputID ).attr("value", jQuery(this).attr("value")); |
| 166 | + }); |
| 167 | + } |
| 168 | + |
| 169 | + jQuery("#" + inputID + '_tp_show ~ button[name="button"]' ) |
| 170 | + .attr("id", inputID + "_button") |
| 171 | + .click(function() { |
| 172 | + jQuery("#" + inputIDshow ).focus(); |
| 173 | + }); |
| 174 | + |
| 175 | + jQuery("#" + inputID + '_tp_show ~ button[name="resetbutton"]' ) |
| 176 | + .attr("id", inputID + "_resetbutton") |
| 177 | + .click(function() { |
| 178 | + jQuery("#" + inputIDshow ).attr("value", ""); |
| 179 | + }); |
| 180 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/libs/timepicker.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 181 | + native |
Index: tags/extensions/SemanticFormsInputs/REL_0_4/README |
— | — | @@ -0,0 +1,58 @@ |
| 2 | +Semantic Forms Inputs is an extension to MediaWiki that provides |
| 3 | +additional input types for the Semantic Forms extension. |
| 4 | + |
| 5 | +The Semantic Forms extension allows users to add, edit and query data |
| 6 | +of a Semantic MediaWiki-based wiki using forms. For every form field |
| 7 | +the input type specifies the type of input a field will have in the |
| 8 | +form. Semantic Forms comes with basic input types for all data |
| 9 | +types. This extension -- Semantic Forms Inputs -- aims to collect |
| 10 | +further, visually and/or functionally enhanced input types. |
| 11 | + |
| 12 | +For the full description, see the Semantic Forms Inputs homepage: |
| 13 | +http://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs |
| 14 | + |
| 15 | +This software is licensed under the GNU General Public License (GPL). |
| 16 | +See the COPYING file for more information. |
| 17 | + |
| 18 | +== Installation == |
| 19 | + |
| 20 | +Having at least MediaWiki 1.16, Semantic MediaWiki 1.5.4 and Semantic |
| 21 | +Forms 2.0.8 installed is a precondition for the Semantic Forms Inputs |
| 22 | +extension version 0.4; the code will not work without it. |
| 23 | + |
| 24 | +To install Semantic Forms Inputs, create a directory named |
| 25 | +SemanticFormsInputs in the extensions directory of your MediaWiki |
| 26 | +installation and copy the extension's files into it. Then add the |
| 27 | +following line to your LocalSettings.php below the inclusion of the |
| 28 | +Semantic Forms extension: |
| 29 | + |
| 30 | +require_once('extensions/SemanticFormsInputs/SemanticFormsInputs.php'); |
| 31 | + |
| 32 | +== Credits == |
| 33 | + |
| 34 | +Semantic Forms Inputs was written by Stephan Gambke, Sanyam Goyal and |
| 35 | +Yaron Koren. |
| 36 | + |
| 37 | +The 'datepicker' input uses the jQuery and jQuery UI libraries. |
| 38 | +See http://jquery.org/ and http://jqueryui.com/ . |
| 39 | + |
| 40 | +Button icons are derived from the Mini Icons 2 icon set from |
| 41 | +brandspankingnew.net. See |
| 42 | +http://www.brandspankingnew.net/archive/2006/12/hohoho.html |
| 43 | + |
| 44 | + |
| 45 | +== Contact == |
| 46 | + |
| 47 | +Bugs should preferably be reported on the Wikimedia bug tracker: |
| 48 | +http://bugzilla.wikimedia.org/ |
| 49 | + |
| 50 | +Comments, questions and suggestions can be send or posted to: |
| 51 | + |
| 52 | +* the appropriate Semantic MediaWiki mailing list: |
| 53 | + http://lists.sourceforge.net/lists/listinfo/semediawiki-user |
| 54 | + |
| 55 | +* the Semantic Forms Inputs discussion page on mediawiki.org: |
| 56 | + http://www.mediawiki.org/wiki/Extension_talk:Semantic_Forms_Inputs |
| 57 | + |
| 58 | +* the author: |
| 59 | + http://www.mediawiki.org/wiki/Special:EmailUser/F.trott |
Property changes on: tags/extensions/SemanticFormsInputs/REL_0_4/README |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 60 | + native |