From 2f1d4a94ebb4e5c412ea4332751e2a6104c7f26b Mon Sep 17 00:00:00 2001 From: Gabriel Birke Date: Thu, 30 Dec 2010 17:24:38 +0100 Subject: Modified config and lang files for new option --- lib/plugins/config/lang/de/lang.php | 1 + lib/plugins/config/lang/en/lang.php | 1 + lib/plugins/config/settings/config.class.php | 2 +- lib/plugins/config/settings/config.metadata.php | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index aa763da03..9a8ca3b30 100644 --- a/lib/plugins/config/lang/de/lang.php +++ b/lib/plugins/config/lang/de/lang.php @@ -48,6 +48,7 @@ $lang['dmode'] = 'Rechte für neue Verzeichnisse'; $lang['lang'] = 'Sprache'; $lang['basedir'] = 'Installationsverzeichnis'; $lang['baseurl'] = 'Installationspfad (URL)'; +$lang['cookiedir'] = 'Cookiepfad. Frei lassen, um den gleichen Pfad wie "baseurl" zu benutzen.'; $lang['savedir'] = 'Speicherverzeichnis'; $lang['start'] = 'Startseitenname'; $lang['title'] = 'Titel des Wikis'; diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index a944d6bd7..9003337df 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -58,6 +58,7 @@ $lang['lang'] = 'Interface language'; $lang['basedir'] = 'Server path (eg. /dokuwiki/). Leave blank for autodetection.'; $lang['baseurl'] = 'Server URL (eg. http://www.yourserver.com). Leave blank for autodetection.'; $lang['savedir'] = 'Directory for saving data'; +$lang['cookiedir'] = 'Cookie path. Leave blank for using baseurl.'; $lang['start'] = 'Start page name'; $lang['title'] = 'Wiki title'; $lang['template'] = 'Template'; diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 01f15a54e..b38f79906 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -341,7 +341,7 @@ if (!class_exists('setting')) { var $_input = NULL; // only used by those classes which error check var $_cautionList = array( - 'basedir' => 'danger', 'baseurl' => 'danger', 'savedir' => 'danger', 'useacl' => 'danger', 'authtype' => 'danger', 'superuser' => 'danger', 'userewrite' => 'danger', + 'basedir' => 'danger', 'baseurl' => 'danger', 'savedir' => 'danger', 'cookiedir' => 'danger', 'useacl' => 'danger', 'authtype' => 'danger', 'superuser' => 'danger', 'userewrite' => 'danger', 'start' => 'warning', 'camelcase' => 'warning', 'deaccent' => 'warning', 'sepchar' => 'warning', 'compression' => 'warning', 'xsendfile' => 'warning', 'renderer_xhtml' => 'warning', 'fnencode' => 'warning', 'allowdebug' => 'security', 'htmlok' => 'security', 'phpok' => 'security', 'iexssprotect' => 'security', 'xmlrpc' => 'security', 'fullpath' => 'security' ); diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index c2c3a2d0c..c64fded81 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -95,6 +95,7 @@ $meta['license'] = array('license'); $meta['savedir'] = array('savedir'); $meta['basedir'] = array('string'); $meta['baseurl'] = array('string'); +$meta['cookiedir'] = array('string'); $meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation $meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation $meta['allowdebug'] = array('onoff'); -- cgit v1.2.3 From 73ab87de7441c9c0eac123c1c44c2cf1ffdbe189 Mon Sep 17 00:00:00 2001 From: Gabriel Birke Date: Sun, 2 Jan 2011 21:00:02 +0100 Subject: If cookiedir is configured, use it. If $conf['cookiedir'] is set, use this setting instead of DOKU_REL. --- inc/auth.php | 10 ++++++---- inc/init.php | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index fd2a9c66d..834b63ec3 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -335,10 +335,11 @@ function auth_logoff($keepbc=false){ unset($_SERVER['REMOTE_USER']); $USERINFO=null; //FIXME + $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,'',time()-600000,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true); + setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); }else{ - setcookie(DOKU_COOKIE,'',time()-600000,DOKU_REL,'',($conf['securecookie'] && is_ssl())); + setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl())); } if($auth) $auth->logOff(); @@ -1085,11 +1086,12 @@ function auth_setCookie($user,$pass,$sticky) { // set cookie $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); + $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; $time = $sticky ? (time()+60*60*24*365) : 0; //one year if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,$cookie,$time,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true); + setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); }else{ - setcookie(DOKU_COOKIE,$cookie,$time,DOKU_REL,'',($conf['securecookie'] && is_ssl())); + setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl())); } // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; diff --git a/inc/init.php b/inc/init.php index ed4409729..faf5f54e1 100644 --- a/inc/init.php +++ b/inc/init.php @@ -148,10 +148,11 @@ if ($conf['gzip_output'] && // init session if (!headers_sent() && !defined('NOSESSION')){ session_name("DokuWiki"); + $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; if (version_compare(PHP_VERSION, '5.2.0', '>')) { - session_set_cookie_params(0,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true); + session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); }else{ - session_set_cookie_params(0,DOKU_REL,'',($conf['securecookie'] && is_ssl())); + session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl())); } session_start(); -- cgit v1.2.3 From bd6d984f1ebbd5da31b431960e408efd150825b7 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Tue, 19 Jul 2011 16:49:11 +0200 Subject: Make getElementsByClass() work without given tag This fixes the hiding of the highlighting of the current section when the mouse leaves the edit section button. --- lib/scripts/compatibility.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js index 27347972a..13b088582 100644 --- a/lib/scripts/compatibility.js +++ b/lib/scripts/compatibility.js @@ -99,6 +99,7 @@ function findPosY(object){ function getElementsByClass(searchClass,node,tag){ DEPRECATED('Use jQuery() instead'); if(node == null) node = document; + if(typeof tag === 'undefined') tag = ''; return jQuery(node).find(tag+'.'+searchClass).toArray(); } -- cgit v1.2.3 From 9ee7fd095e8cb3c84ad95dd52c35630147333ecb Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Mon, 25 Jul 2011 20:17:44 +0200 Subject: Finish language update --- inc/lang/fi/lang.php | 1 + lib/plugins/acl/lang/fi/lang.php | 1 + lib/plugins/config/lang/fi/lang.php | 2 ++ lib/plugins/plugin/lang/fi/lang.php | 2 ++ lib/plugins/popularity/lang/fi/lang.php | 1 + lib/plugins/revert/lang/fi/lang.php | 1 + lib/plugins/usermanager/lang/fi/lang.php | 1 + 7 files changed, 9 insertions(+) diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index 35f7b3c09..cce597fe7 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -7,6 +7,7 @@ * @author Matti Pöllä * @author Otto Vainio * @author Teemu Mattila + * @author Sami Olmari */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/acl/lang/fi/lang.php b/lib/plugins/acl/lang/fi/lang.php index 04074d8d4..4f145e0f6 100644 --- a/lib/plugins/acl/lang/fi/lang.php +++ b/lib/plugins/acl/lang/fi/lang.php @@ -5,6 +5,7 @@ * @author otto@valjakko.net * @author Otto Vainio * @author Teemu Mattila + * @author Sami Olmari */ $lang['admin_acl'] = 'Käyttöoikeudet (ACL)'; $lang['acl_group'] = 'Ryhmä'; diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php index c3434c1f3..0e9bad030 100644 --- a/lib/plugins/config/lang/fi/lang.php +++ b/lib/plugins/config/lang/fi/lang.php @@ -5,6 +5,7 @@ * @author otto@valjakko.net * @author Otto Vainio * @author Teemu Mattila + * @author Sami Olmari */ $lang['menu'] = 'Asetukset'; $lang['error'] = 'Asetuksia ei päivitetty väärän arvon vuoksi. Tarkista muutokset ja lähetä sivu uudestaan. @@ -111,6 +112,7 @@ $lang['jpg_quality'] = 'JPG pakkauslaatu (0-100)'; $lang['subscribers'] = 'Salli tuki sivujen tilaamiselle'; $lang['subscribe_time'] = 'Aika jonka jälkeen tilauslinkit ja yhteenveto lähetetään (sek). Tämän pitäisi olla pienempi, kuin recent_days aika.'; $lang['compress'] = 'Pakkaa CSS ja javascript'; +$lang['cssdatauri'] = 'Maksimikoko tavuina jossa kuvat joihin viitataan CSS-tiedostoista olisi sisällytettynä suoraan tyylitiedostoon jotta HTTP-kyselyjen kaistaa saataisiin kutistettua. Tämä tekniikka ei toimi IE versiossa aikasempi kuin 8! 400:sta 600:aan tavua on hyvä arvo. Aseta 0 kytkeäksesi ominaisuuden pois.'; $lang['hidepages'] = 'Piilota seuraavat sivut (säännönmukainen lauseke)'; $lang['send404'] = 'Lähetä "HTTP 404/Page Not Found" puuttuvista sivuista'; $lang['sitemap'] = 'Luo Google sitemap (päiviä)'; diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php index 817b4f20a..c348a2331 100644 --- a/lib/plugins/plugin/lang/fi/lang.php +++ b/lib/plugins/plugin/lang/fi/lang.php @@ -5,6 +5,7 @@ * @author otto@valjakko.net * @author Otto Vainio * @author Teemu Mattila + * @author Sami Olmari */ $lang['menu'] = 'Ylläpidä liitännäisiä'; $lang['download'] = 'Lataa ja asenna uusi liitännäinen'; @@ -50,3 +51,4 @@ $lang['enabled'] = 'Liitännäinen %s käytössä'; $lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.'; $lang['disabled'] = 'Liitännäinen %s pois käytössä'; $lang['notdisabled'] = 'Liitännäistä %s ei voitu ottaa pois käytöstä. Tarkista tiedostojen oikeudet.'; +$lang['packageinstalled'] = 'Pluginpaketti (%d plugin%s: %s:) asennettu onnistuneesti.'; diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php index a73f63501..d7c230742 100644 --- a/lib/plugins/popularity/lang/fi/lang.php +++ b/lib/plugins/popularity/lang/fi/lang.php @@ -4,6 +4,7 @@ * * @author Otto Vainio * @author Teemu Mattila + * @author Sami Olmari */ $lang['name'] = 'Suosion palaute (voi kestää jonkun aikaa latautua)'; $lang['submit'] = 'Lähetä tiedot'; diff --git a/lib/plugins/revert/lang/fi/lang.php b/lib/plugins/revert/lang/fi/lang.php index 26bc6b76a..fdf9bb81c 100644 --- a/lib/plugins/revert/lang/fi/lang.php +++ b/lib/plugins/revert/lang/fi/lang.php @@ -5,6 +5,7 @@ * @author otto@valjakko.net * @author Otto Vainio * @author Teemu Mattila + * @author Sami Olmari */ $lang['menu'] = 'Palautuksenhallinta'; $lang['filter'] = 'Etsi spammattyjä sivuja'; diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php index 6eeb4c3e8..1db4bd7fb 100644 --- a/lib/plugins/usermanager/lang/fi/lang.php +++ b/lib/plugins/usermanager/lang/fi/lang.php @@ -5,6 +5,7 @@ * @author otto@valjakko.net * @author Otto Vainio * @author Teemu Mattila + * @author Sami Olmari */ $lang['menu'] = 'Käyttäjähallinta'; $lang['noauth'] = '(autentikointi ei ole käytössä)'; -- cgit v1.2.3 From c4241309cc2c5ed1d2675cf234f9b59ded0019f4 Mon Sep 17 00:00:00 2001 From: Dejan Igrec Date: Mon, 25 Jul 2011 20:19:01 +0200 Subject: Croatian language update --- inc/lang/hr/lang.php | 114 +++++++++++++++++++++++++++---- inc/lang/hr/read.txt | 2 +- inc/lang/hr/resendpwd.txt | 2 +- lib/plugins/acl/lang/hr/help.txt | 11 +++ lib/plugins/acl/lang/hr/lang.php | 29 ++++++++ lib/plugins/config/lang/hr/lang.php | 1 + lib/plugins/plugin/lang/hr/lang.php | 1 + lib/plugins/popularity/lang/hr/lang.php | 1 + lib/plugins/revert/lang/hr/lang.php | 1 + lib/plugins/usermanager/lang/hr/lang.php | 1 + 10 files changed, 146 insertions(+), 17 deletions(-) create mode 100644 lib/plugins/acl/lang/hr/help.txt diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php index a42e8c96f..a76bde2e8 100644 --- a/inc/lang/hr/lang.php +++ b/inc/lang/hr/lang.php @@ -6,6 +6,7 @@ * @author Tomo Krajina * @author Branko Rihtman * @author Dražen Odobašić + * @author Dejan Igrec dejan.igrec@gmail.com */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -19,7 +20,7 @@ $lang['btn_source'] = 'Prikaži kod dokumenta'; $lang['btn_show'] = 'Prikaži dokument'; $lang['btn_create'] = 'Novi dokument'; $lang['btn_search'] = 'Pretraži'; -$lang['btn_save'] = 'Snimi'; +$lang['btn_save'] = 'Spremi'; $lang['btn_preview'] = 'Prikaži'; $lang['btn_top'] = 'Na vrh'; $lang['btn_newer'] = '<< noviji'; @@ -39,15 +40,13 @@ $lang['btn_back'] = 'Povratak'; $lang['btn_backlink'] = 'Povratni linkovi'; $lang['btn_backtomedia'] = 'Povratak na Mediafile izbornik'; $lang['btn_subscribe'] = 'Pretplati se na promjene dokumenta'; -$lang['btn_unsubscribe'] = 'Odjavi pretplatu o promjenama dokumenta'; -$lang['btn_subscribens'] = 'Pretplati se na promjene imenskog prostora'; -$lang['btn_unsubscribens'] = 'Odjavi pretplatu o promjenama imenskog prostora'; $lang['btn_profile'] = 'Ažuriraj profil'; $lang['btn_reset'] = 'Poništi promjene'; $lang['btn_resendpwd'] = 'Pošalji novu lozinku'; $lang['btn_draft'] = 'Uredi nacrt dokumenta'; $lang['btn_recover'] = 'Vrati prijašnji nacrt dokumenta'; $lang['btn_draftdel'] = 'Obriši nacrt dokumenta'; +$lang['btn_revert'] = 'Vrati'; $lang['btn_register'] = 'Registracija'; $lang['loggedinas'] = 'Prijavljen kao'; $lang['user'] = 'Korisničko ime'; @@ -86,13 +85,45 @@ $lang['resendpwdconfirm'] = 'Potvrdni link je poslan emailom.'; $lang['resendpwdsuccess'] = 'Nova lozinka je poslana emailom.'; $lang['license'] = 'Osim na mjestima gdje je naznačeno drugačije, sadržaj ovog wikija je licenciran sljedećom licencom:'; $lang['licenseok'] = 'Pažnja: promjenom ovog dokumenta pristajete licencirati sadržaj sljedećom licencom: '; +$lang['searchmedia'] = 'Traži naziv datoteke:'; +$lang['searchmedia_in'] = 'Traži u %s'; $lang['txt_upload'] = 'Odaberite datoteku za postavljanje'; $lang['txt_filename'] = 'Postaviti kao (nije obavezno)'; $lang['txt_overwrt'] = 'Prepiši postojeću datoteku'; $lang['lockedby'] = 'Zaključao'; $lang['lockexpire'] = 'Zaključano do'; $lang['willexpire'] = 'Dokument kojeg mijenjate će biti zaključan još 1 minutu.\n Ukoliko želite i dalje raditi izmjene na dokumentu - kliknite na "Pregled".'; -$lang['js']['notsavedyet'] = "Vaše izmjene će se izgubiti.\nŽelite li nastaviti?"; +$lang['js']['notsavedyet'] = 'Vaše izmjene će se izgubiti. +Želite li nastaviti?'; +$lang['js']['searchmedia'] = 'Traži datoteke'; +$lang['js']['keepopen'] = 'Ostavi prozor otvoren nakon izbora'; +$lang['js']['hidedetails'] = 'Sakrij detalje'; +$lang['js']['mediatitle'] = 'Postavke poveznice'; +$lang['js']['mediadisplay'] = 'Vrsta poveznice'; +$lang['js']['mediaalign'] = 'Poravnanje'; +$lang['js']['mediasize'] = 'Veličina slike'; +$lang['js']['mediatarget'] = 'Cilj poveznice'; +$lang['js']['mediaclose'] = 'Zatvori'; +$lang['js']['mediainsert'] = 'Umetni'; +$lang['js']['mediadisplayimg'] = 'Prikaži sliku.'; +$lang['js']['mediadisplaylnk'] = 'Prikaži samo poveznicu.'; +$lang['js']['mediasmall'] = 'Mala verzija.'; +$lang['js']['mediamedium'] = 'Srednja verzija.'; +$lang['js']['medialarge'] = 'Velika verzija.'; +$lang['js']['mediaoriginal'] = 'Originalna verzija.'; +$lang['js']['medialnk'] = 'Poveznica na stranicu s detaljima'; +$lang['js']['mediadirect'] = 'Direktna poveznica na original'; +$lang['js']['medianolnk'] = 'Bez poveznice'; +$lang['js']['medianolink'] = 'Nemoj povezati sliku'; +$lang['js']['medialeft'] = 'Poravnaj sliku lijevo.'; +$lang['js']['mediaright'] = 'Poravnaj sliku desno.'; +$lang['js']['mediacenter'] = 'Poravnaj sliku u sredinu.'; +$lang['js']['medianoalign'] = 'Bez poravnanja.'; +$lang['js']['nosmblinks'] = 'Linkovi na dijeljene Windows mape rade samo s Internet Explorerom. Link je još uvijek moguće kopirati i zalijepiti.'; +$lang['js']['linkwiz'] = 'Čarobnjak za poveznice'; +$lang['js']['linkto'] = 'Poveznica na:'; +$lang['js']['del_confirm'] = 'Zbilja želite obrisati odabrane stavke?'; +$lang['js']['mu_btn'] = 'Postavi više datoteka odjednom'; $lang['rssfailed'] = 'Došlo je do greške prilikom preuzimanja feed-a: '; $lang['nothingfound'] = 'Traženi dokumetni nisu pronađeni.'; $lang['mediaselect'] = 'Mediafile datoteke'; @@ -110,10 +141,7 @@ $lang['deletefail'] = '"%s" se ne može obrisati - provjerite dozvole $lang['mediainuse'] = 'Datoteka "%s" nije obrisana - još uvijek se koristi.'; $lang['namespaces'] = 'Imenski prostori'; $lang['mediafiles'] = 'Datoteke u'; -$lang['js']['keepopen'] = 'Ostavi prozor otvoren nakon izbora'; -$lang['js']['hidedetails'] = 'Sakrij detalje'; -$lang['js']['nosmblinks'] = 'Linkovi na dijeljene Windows mape rade samo s Internet Explorerom. Link je još uvijek moguće kopirati i zalijepiti.'; -$lang['js']['mu_btn'] = 'Postavi više datoteka odjednom'; +$lang['accessdenied'] = 'Nemate potrebne dozvole za pregled ove stranice.'; $lang['mediausage'] = 'Koristi sljedeću sintaksu za referenciranje ove datoteke:'; $lang['mediaview'] = 'Pregledaj originalnu datoteku'; $lang['mediaroot'] = 'root'; @@ -129,6 +157,10 @@ $lang['current'] = 'trenutno'; $lang['yours'] = 'Vaša inačica'; $lang['diff'] = 'Prikaži razlike u odnosu na trenutnu inačicu'; $lang['diff2'] = 'Pokaži razlike između odabranih inačica'; +$lang['difflink'] = 'Poveznica na ovaj prikaz usporedbe'; +$lang['diff_type'] = 'Razlike u prikazu:'; +$lang['diff_inline'] = 'U istoj razini'; +$lang['diff_side'] = 'Usporedo'; $lang['line'] = 'Redak'; $lang['breadcrumb'] = 'Putanja'; $lang['youarehere'] = 'Vi ste ovdje'; @@ -140,8 +172,10 @@ $lang['restored'] = 'vraćena prijašnja inačica'; $lang['external_edit'] = 'vanjsko uređivanje'; $lang['summary'] = 'Sažetak izmjena'; $lang['noflash'] = 'Za prikazivanje ovog sadržaja potreban je Adobe Flash Plugin'; +$lang['download'] = 'Preuzmi isječak'; $lang['mail_newpage'] = 'stranica dodana:'; $lang['mail_changed'] = 'stranica izmjenjena:'; +$lang['mail_subscribe_list'] = 'stranice promijenjene u imenskom prostoru:'; $lang['mail_new_user'] = 'novi korisnik:'; $lang['mail_upload'] = 'datoteka postavljena:'; $lang['qb_bold'] = 'Podebljani tekst'; @@ -168,7 +202,7 @@ $lang['qb_media'] = 'Dodaj slike i ostale datoteke'; $lang['qb_sig'] = 'Potpis'; $lang['qb_smileys'] = 'Smiješkići'; $lang['qb_chars'] = 'Posebni znakovi'; -$lang['js']['del_confirm'] = 'Zbilja želite obrisati odabrane stavke?'; +$lang['upperns'] = 'Skoči u nadređeni imenski prostor'; $lang['admin_register'] = 'Dodaj novog korisnika'; $lang['metaedit'] = 'Uredi metapodatake'; $lang['metasaveerr'] = 'Neuspješno zapisivanje metapodataka'; @@ -184,11 +218,22 @@ $lang['img_copyr'] = 'Autorsko pravo'; $lang['img_format'] = 'Format'; $lang['img_camera'] = 'Kamera'; $lang['img_keywords'] = 'Ključne riječi'; -$lang['subscribe_success'] = 'Dodan %s na listu preplata za %s'; -$lang['subscribe_error'] = 'Greška prilikom dodavanju %s na listu pretplata za %s'; -$lang['subscribe_noaddress'] = 'Nije postavljena email adresa za vaš korisnički profil, nije Vas moguće dodati na listu pretplata'; -$lang['unsubscribe_success'] = 'Izbrisan %s s liste pretplata za %s'; -$lang['unsubscribe_error'] = 'Greška prilikom brisanja %s s liste pretplatnika za %s'; +$lang['subscr_subscribe_success'] = 'Dodan %s u listu pretplatnika za %s'; +$lang['subscr_subscribe_error'] = 'Greška kod dodavanja %s u listu pretplatnika za %s'; +$lang['subscr_subscribe_noaddress'] = 'Ne postoji adresa povezana sa vašim podacima za prijavu, stoga ne možete biti dodani u listu pretplatnika'; +$lang['subscr_unsubscribe_success'] = 'Uklonjen %s iz liste pretplatnika za %s'; +$lang['subscr_unsubscribe_error'] = 'Greška prilikom uklanjanja %s iz liste pretplatnika za %s'; +$lang['subscr_already_subscribed'] = '%s je već pretplaćen na %s'; +$lang['subscr_not_subscribed'] = '%s nije pretplaćen na %s'; +$lang['subscr_m_not_subscribed'] = 'Trenutno niste pretplaćeni na trenutnu stranicu ili imenski prostor.'; +$lang['subscr_m_new_header'] = 'Dodaj pretplatu'; +$lang['subscr_m_current_header'] = 'Trenutne pretplate'; +$lang['subscr_m_unsubscribe'] = 'Odjavi pretplatu'; +$lang['subscr_m_subscribe'] = 'Pretplati se'; +$lang['subscr_m_receive'] = 'Primaj'; +$lang['subscr_style_every'] = 'email za svaku promjenu'; +$lang['subscr_style_digest'] = 'email s kratakim prikazom promjena za svaku stranicu (svaka %.2f dana)'; +$lang['subscr_style_list'] = 'listu promijenjenih stranica od zadnjeg primljenog email-a (svaka %.2f dana)'; $lang['authmodfailed'] = 'Greška u konfiguraciji korisničke autentifikacije. Molimo Vas da kontaktirate administratora.'; $lang['authtempfail'] = 'Autentifikacija korisnika je privremeno nedostupna. Molimo Vas da kontaktirate administratora.'; $lang['i_chooselang'] = 'Izaberite vaš jezik'; @@ -198,3 +243,42 @@ $lang['i_enableacl'] = 'Omogući ACL (preporučeno)'; $lang['i_superuser'] = 'Superkorisnik'; $lang['i_problems'] = 'Instalacija je pronašla probleme koji su naznačeni ispod. Nije moguće nastaviti dok se ti problemi ne riješe.'; $lang['i_modified'] = 'Zbog sigurnosnih razlog, ova skripta ce raditi samo sa novim i nepromijenjenim instalacijama dokuWikija. Preporucujemo da ili re-ekstraktirate fajlove iz downloadovanog paketa ili konsultujete pune a href="http://dokuwiki.org/install">Instrukcije za instalaciju Dokuwikija'; +$lang['i_funcna'] = 'PHP funkcija %s nije dostupna. Možda ju je vaš pružatelj hostinga onemogućio iz nekog razloga?'; +$lang['i_phpver'] = 'Vaša PHP verzija %s je niža od potrebne %s. Trebate nadograditi vašu PHP instalaciju.'; +$lang['i_permfail'] = '%s nema dozvolu pisanja od strane DokuWiki. Trebate podesiti dozvole pristupa tom direktoriju.'; +$lang['i_confexists'] = '%s već postoji'; +$lang['i_writeerr'] = 'Ne može se kreirati %s. Trebate provjeriti dozvole direktorija/datoteke i kreirati dokument ručno.'; +$lang['i_badhash'] = 'neprepoznat ili promijenjen dokuwiki.php (hash=%s)'; +$lang['i_badval'] = '%s - nedozvoljena ili prazna vrijednost'; +$lang['i_success'] = 'Konfiguracija je uspješno završena. Sada možete obrisati install.php datoteku. Nastavite na vaš novi DokuWiki.'; +$lang['i_failure'] = 'Pojavile su se neke greške prilikom pisanja konfiguracijskih datoteka. Morati ćete ih ručno ispraviti da bi mogli koristiti vaš novi DokuWiki.'; +$lang['i_policy'] = 'Inicijalna ACL politika'; +$lang['i_pol0'] = 'Otvoreni Wiki (čitanje, pisanje, učitavanje za sve)'; +$lang['i_pol1'] = 'Javni Wiki (čitanje za sve, pisanje i učitavanje za registrirane korisnike)'; +$lang['i_pol2'] = 'Zatvoreni Wiki (čitanje, pisanje, učitavanje samo za registrirane korisnike)'; +$lang['i_retry'] = 'Pokušaj ponovo'; +$lang['i_license'] = 'Molim odaberite licencu pod kojom želite postavljati vaš sadržaj:'; +$lang['mu_intro'] = 'Ovdje možeš učitati više datoteka odjednom. Klikni gumb pregled te ih dodajte u red. Pritisnite učitaj kad ste gotovi.'; +$lang['mu_gridname'] = 'Naziv datoteke'; +$lang['mu_gridsize'] = 'Veličina'; +$lang['mu_gridstat'] = 'Status'; +$lang['mu_namespace'] = 'Imenski prostor'; +$lang['mu_browse'] = 'Pregled'; +$lang['mu_toobig'] = 'prevelik'; +$lang['mu_ready'] = 'spremno za učitavanje'; +$lang['mu_done'] = 'gotovo'; +$lang['mu_fail'] = 'nije uspio'; +$lang['mu_authfail'] = 'sjednica istekla'; +$lang['mu_progress'] = '@PCT@% učitan'; +$lang['mu_filetypes'] = 'Dozvoljeni tipovi datoteka'; +$lang['mu_info'] = 'datoteke učitane.'; +$lang['mu_lasterr'] = 'Posljednja greška:'; +$lang['recent_global'] = 'Trenutno gledate promjene unutar %s imenskog prostora. Također možete vidjeti zadnje promjene cijelog wiki-a'; +$lang['years'] = '%d godina prije'; +$lang['months'] = '%d mjeseci prije'; +$lang['weeks'] = '%d tjedana prije'; +$lang['days'] = '%d dana prije'; +$lang['hours'] = '%d sati prije'; +$lang['minutes'] = '%d minuta prije'; +$lang['seconds'] = '%d sekundi prije'; +$lang['wordblock'] = 'Vaša promjena nije spremljena jer sadrži blokirani tekst (spam).'; diff --git a/inc/lang/hr/read.txt b/inc/lang/hr/read.txt index d036c0a7b..221f1b200 100644 --- a/inc/lang/hr/read.txt +++ b/inc/lang/hr/read.txt @@ -1 +1 @@ -Nije dopušteno mijenjati sadržaj ove stranice. +Ova stranica se može samo čitati. Možete vidjeti kod, ali ga ne možete mijenjati. Javite se vašem administratoru ako se s tim ne slažete. \ No newline at end of file diff --git a/inc/lang/hr/resendpwd.txt b/inc/lang/hr/resendpwd.txt index fe2c72bf3..ed25f985c 100644 --- a/inc/lang/hr/resendpwd.txt +++ b/inc/lang/hr/resendpwd.txt @@ -1,3 +1,3 @@ ====== Slanje nove lozinke ====== -Ispunite potrebne podatke da biste dobili novu lozinku za Vaš korisnički račun. +Ispunite potrebne podatke da biste dobili novu lozinku za Vaš korisnički račun. Link za potvrdu biti će poslan na Vašu email adresu. diff --git a/lib/plugins/acl/lang/hr/help.txt b/lib/plugins/acl/lang/hr/help.txt new file mode 100644 index 000000000..4e7cfc3c2 --- /dev/null +++ b/lib/plugins/acl/lang/hr/help.txt @@ -0,0 +1,11 @@ +=== Brza Pomoć: === + +Na ovoj stranici možeš dodavati i brisati dozvole za imenske prostore i stranice u svom wiki-u. + +Lijevi prozor prikazuje sve dostupne imenske prostore i stranice. + +Forma iznad ti omogućuje pregled i mijenjanje dozvola odabranom korisniku ili grupi. + +U tablici ispod prikazana su sva trenutno postavljena pravila kontrole pristupa. Koristite je za višestruko brisanje ili mijenjanje pravila. + +Čitanje [[doku>acl|službena dokumentacija o ACL]] može vam pomoći potpuno razumijeti kako kontrola pristupa radi u DokuWiki. \ No newline at end of file diff --git a/lib/plugins/acl/lang/hr/lang.php b/lib/plugins/acl/lang/hr/lang.php index d2094b77b..8c21f1b0b 100644 --- a/lib/plugins/acl/lang/hr/lang.php +++ b/lib/plugins/acl/lang/hr/lang.php @@ -4,4 +4,33 @@ * * @author Branko Rihtman * @author Dražen Odobašić + * @author Dejan Igrec dejan.igrec@gmail.com */ +$lang['admin_acl'] = 'Upravljanje listom kontrole pristupa'; +$lang['acl_group'] = 'Grupa'; +$lang['acl_user'] = 'Korisnik'; +$lang['acl_perms'] = 'Dozvole za'; +$lang['page'] = 'Stranica'; +$lang['namespace'] = 'Imenski prostor'; +$lang['btn_select'] = 'Odaberi'; +$lang['p_user_id'] = 'Korisnik %s trenutno ima sljedeće dozvole na stranici %s: %s.'; +$lang['p_user_ns'] = 'Korisnik %s trenutno ima sljedeće dozvole u imenskom prostoru %s: %s.'; +$lang['p_group_id'] = 'Članovi grupe %s trenutno imaju sljedeće dozvole na stranici %s: %s.'; +$lang['p_group_ns'] = 'Članovi grupe %s trenutno imaju sljedeće dozvole u imenskom prostoru %s: %s.'; +$lang['p_choose_id'] = 'Molim unesti korisnika ili grupu u gornju formu za pregled ili uređivanje dozvola postavljenih za stranicu %s.'; +$lang['p_choose_ns'] = 'Molim unesti korisnika ili grupu u gornju formu za pregled ili uređivanje dozvola postavljenih za imenski prostor %s.'; +$lang['p_inherited'] = 'Napomena: Ove dozvole nisu postavljene eksplicitno već su naslijeđene od drugih grupa ili nadređenih imenskih prostora.'; +$lang['p_isadmin'] = 'Napomena: Odabrana grupa ili korisnik uvijek ima sve dozvole jer je postavljen kao superuser.'; +$lang['p_include'] = 'Više dozvole uključuju sve niže. Dozvole Kreiraj, Učitaj i Briši se primjenjuju samo na imenske prostore, ne stranice.'; +$lang['current'] = 'Trenutna ACL Pravila'; +$lang['where'] = 'Stranica/Imenski prostor'; +$lang['who'] = 'Korisnik/Grupa'; +$lang['perm'] = 'Dozvole'; +$lang['acl_perm0'] = 'Ništa'; +$lang['acl_perm1'] = 'Čitaj'; +$lang['acl_perm2'] = 'Uredi'; +$lang['acl_perm4'] = 'Kreiraj'; +$lang['acl_perm8'] = 'Učitaj'; +$lang['acl_perm16'] = 'Briši'; +$lang['acl_new'] = 'Dodaj novi Zapis'; +$lang['acl_mod'] = 'Promijeni Zapis'; diff --git a/lib/plugins/config/lang/hr/lang.php b/lib/plugins/config/lang/hr/lang.php index d2094b77b..96f1d6afe 100644 --- a/lib/plugins/config/lang/hr/lang.php +++ b/lib/plugins/config/lang/hr/lang.php @@ -4,4 +4,5 @@ * * @author Branko Rihtman * @author Dražen Odobašić + * @author Dejan Igrec dejan.igrec@gmail.com */ diff --git a/lib/plugins/plugin/lang/hr/lang.php b/lib/plugins/plugin/lang/hr/lang.php index d2094b77b..96f1d6afe 100644 --- a/lib/plugins/plugin/lang/hr/lang.php +++ b/lib/plugins/plugin/lang/hr/lang.php @@ -4,4 +4,5 @@ * * @author Branko Rihtman * @author Dražen Odobašić + * @author Dejan Igrec dejan.igrec@gmail.com */ diff --git a/lib/plugins/popularity/lang/hr/lang.php b/lib/plugins/popularity/lang/hr/lang.php index d2094b77b..96f1d6afe 100644 --- a/lib/plugins/popularity/lang/hr/lang.php +++ b/lib/plugins/popularity/lang/hr/lang.php @@ -4,4 +4,5 @@ * * @author Branko Rihtman * @author Dražen Odobašić + * @author Dejan Igrec dejan.igrec@gmail.com */ diff --git a/lib/plugins/revert/lang/hr/lang.php b/lib/plugins/revert/lang/hr/lang.php index d2094b77b..96f1d6afe 100644 --- a/lib/plugins/revert/lang/hr/lang.php +++ b/lib/plugins/revert/lang/hr/lang.php @@ -4,4 +4,5 @@ * * @author Branko Rihtman * @author Dražen Odobašić + * @author Dejan Igrec dejan.igrec@gmail.com */ diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php index d2094b77b..96f1d6afe 100644 --- a/lib/plugins/usermanager/lang/hr/lang.php +++ b/lib/plugins/usermanager/lang/hr/lang.php @@ -4,4 +4,5 @@ * * @author Branko Rihtman * @author Dražen Odobašić + * @author Dejan Igrec dejan.igrec@gmail.com */ -- cgit v1.2.3 From 51b699a035e1acfe46e3c2107616235d69f68cd1 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sat, 30 Jul 2011 11:17:35 +0300 Subject: Adding a \n to striplangs' help Making it more aesthetic, and consistent with the others bin/*php scripts --- bin/striplangs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/striplangs.php b/bin/striplangs.php index 288859c6a..40cef5063 100644 --- a/bin/striplangs.php +++ b/bin/striplangs.php @@ -22,7 +22,7 @@ function usage($show_examples = false) { -h, --help get this help -x, --examples get also usage examples -k, --keep comma separated list of languages, -e is always implied - -e, --english keeps english, dummy to use without -k"; + -e, --english keeps english, dummy to use without -k\n"; if ( $show_examples ) { print "\n EXAMPLES -- cgit v1.2.3 From 63f4f854ffdcaed0985da6da32e960efbfab59c5 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 30 Jul 2011 09:46:11 +0100 Subject: made TOC toggle faster to avoid clunky text flow around it --- lib/scripts/behaviour.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index dd7676432..a94e40b7a 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -104,7 +104,7 @@ var dw_behaviour = { .attr('id','toc__toggle') .css('cursor','pointer') .click(function(){ - $toc.slideToggle(); + $toc.slideToggle(200); setClicky(); }); $header.prepend($clicky); -- cgit v1.2.3 From fbe7c76fbed81d1b87ee829c36aa2c1b9e494faf Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 30 Jul 2011 12:43:09 +0100 Subject: added solidus to character picker and moved multiplication sign to other mathmatical symbols --- inc/toolbar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/toolbar.php b/inc/toolbar.php index 58d80043c..02172510e 100644 --- a/inc/toolbar.php +++ b/inc/toolbar.php @@ -213,7 +213,7 @@ function toolbar_JSdefines($varname){ 'type' => 'picker', 'title' => $lang['qb_chars'], 'icon' => 'chars.png', - 'list' => explode(' ','À à Á á  â à ã Ä ä Ǎ ǎ Ă ă Å å Ā ā Ą ą Æ æ Ć ć Ç ç Č č Ĉ ĉ Ċ ċ Ð đ ð Ď ď È è É é Ê ê Ë ë Ě ě Ē ē Ė ė Ę ę Ģ ģ Ĝ ĝ Ğ ğ Ġ ġ Ĥ ĥ Ì ì Í í Î î Ï ï Ǐ ǐ Ī ī İ ı Į į Ĵ ĵ Ķ ķ Ĺ ĺ Ļ ļ Ľ ľ Ł ł Ŀ ŀ Ń ń Ñ ñ Ņ ņ Ň ň Ò ò Ó ó Ô ô Õ õ Ö ö Ǒ ǒ Ō ō Ő ő Œ œ Ø ø Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ş ş Š š Ŝ ŝ Ţ ţ Ť ť Ù ù Ú ú Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ů ů ǖ ǘ ǚ ǜ Ų ų Ű ű Ŵ ŵ Ý ý Ÿ ÿ Ŷ ŷ Ź ź Ž ž Ż ż Þ þ ß Ħ ħ ¿ ¡ ¢ £ ¤ ¥ € ¦ § ª ¬ ¯ ° ± ÷ ‰ ¼ ½ ¾ ¹ ² ³ µ ¶ † ‡ · • º ∀ ∂ ∃ Ə ə ∅ ∇ ∈ ∉ ∋ ∏ ∑ ‾ − ∗ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ◊ ℘ ℑ ℜ ℵ ♠ ♣ ♥ ♦ α β Γ γ Δ δ ε ζ η Θ θ ι κ Λ λ μ Ξ ξ Π π ρ Σ σ Τ τ υ Φ φ χ Ψ ψ Ω ω ★ ☆ ☎ ☚ ☛ ☜ ☝ ☞ ☟ ☹ ☺ ✔ ✘ × „ “ ” ‚ ‘ ’ « » ‹ › — – … ← ↑ → ↓ ↔ ⇐ ⇑ ⇒ ⇓ ⇔ © ™ ® ′ ″ [ ] { } ~ ( ) % § $ # | @'), + 'list' => explode(' ','À à Á á  â à ã Ä ä Ǎ ǎ Ă ă Å å Ā ā Ą ą Æ æ Ć ć Ç ç Č č Ĉ ĉ Ċ ċ Ð đ ð Ď ď È è É é Ê ê Ë ë Ě ě Ē ē Ė ė Ę ę Ģ ģ Ĝ ĝ Ğ ğ Ġ ġ Ĥ ĥ Ì ì Í í Î î Ï ï Ǐ ǐ Ī ī İ ı Į į Ĵ ĵ Ķ ķ Ĺ ĺ Ļ ļ Ľ ľ Ł ł Ŀ ŀ Ń ń Ñ ñ Ņ ņ Ň ň Ò ò Ó ó Ô ô Õ õ Ö ö Ǒ ǒ Ō ō Ő ő Œ œ Ø ø Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ş ş Š š Ŝ ŝ Ţ ţ Ť ť Ù ù Ú ú Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ů ů ǖ ǘ ǚ ǜ Ų ų Ű ű Ŵ ŵ Ý ý Ÿ ÿ Ŷ ŷ Ź ź Ž ž Ż ż Þ þ ß Ħ ħ ¿ ¡ ¢ £ ¤ ¥ € ¦ § ª ¬ ¯ ° ± ÷ ‰ ¼ ½ ¾ ¹ ² ³ µ ¶ † ‡ · • º ∀ ∂ ∃ Ə ə ∅ ∇ ∈ ∉ ∋ ∏ ∑ ‾ − ∗ × ⁄ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ◊ ℘ ℑ ℜ ℵ ♠ ♣ ♥ ♦ α β Γ γ Δ δ ε ζ η Θ θ ι κ Λ λ μ Ξ ξ Π π ρ Σ σ Τ τ υ Φ φ χ Ψ ψ Ω ω ★ ☆ ☎ ☚ ☛ ☜ ☝ ☞ ☟ ☹ ☺ ✔ ✘ „ “ ” ‚ ‘ ’ « » ‹ › — – … ← ↑ → ↓ ↔ ⇐ ⇑ ⇒ ⇓ ⇔ © ™ ® ′ ″ [ ] { } ~ ( ) % § $ # | @'), 'block' => false ), array( -- cgit v1.2.3 From 71d344831fe505f34e9be3fcbad3dadb7a2a409b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Neves?= Date: Sat, 30 Jul 2011 20:29:32 +0200 Subject: Portuguese language update --- lib/plugins/config/lang/pt/lang.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/config/lang/pt/lang.php b/lib/plugins/config/lang/pt/lang.php index 7f5eb9971..f4382aa94 100644 --- a/lib/plugins/config/lang/pt/lang.php +++ b/lib/plugins/config/lang/pt/lang.php @@ -112,6 +112,7 @@ $lang['jpg_quality'] = 'Compressão/Qualidade JPG (0-100)'; $lang['subscribers'] = 'Habilitar o suporte a subscrição de páginas '; $lang['subscribe_time'] = 'Tempo após o qual as listas de subscrição e "digests" são enviados (seg.); Isto deve ser inferior ao tempo especificado em recent_days.'; $lang['compress'] = 'Compactar as saídas de CSS e JavaScript'; +$lang['cssdatauri'] = 'Tamanho em bytes até ao qual as imagens referenciadas em ficheiros CSS devem ser embutidas diretamente no CSS para reduzir a carga de pedidos HTTP extra. Esta técnica não funciona em IE < 8! 400 a 600 bytes é um bom valor. Escolher 0 para desativar.'; $lang['hidepages'] = 'Esconder páginas correspondentes (expressões regulares)'; $lang['send404'] = 'Enviar "HTTP 404/Página não encontrada" para páginas não existentes'; $lang['sitemap'] = 'Gerar Sitemap Google (dias)'; -- cgit v1.2.3 From 4f616b5f20590d5f3a592bd53f2fc932968940d8 Mon Sep 17 00:00:00 2001 From: Christophe Martin Date: Sat, 30 Jul 2011 20:33:43 +0200 Subject: French language update --- inc/lang/fr/lang.php | 9 +++++---- lib/plugins/acl/lang/fr/lang.php | 1 + lib/plugins/config/lang/fr/lang.php | 2 ++ lib/plugins/plugin/lang/fr/lang.php | 1 + lib/plugins/popularity/lang/fr/lang.php | 1 + lib/plugins/revert/lang/fr/lang.php | 1 + lib/plugins/usermanager/lang/fr/lang.php | 1 + 7 files changed, 12 insertions(+), 4 deletions(-) diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 40384fecb..047019baf 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -21,6 +21,7 @@ * @author Florian Gaub * @author Samuel Dorsaz * @author Johan Guilbaud + * @author schplurtz@laposte.net */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -121,10 +122,10 @@ $lang['js']['mediaclose'] = 'Fermer'; $lang['js']['mediainsert'] = 'Insérer'; $lang['js']['mediadisplayimg'] = 'Afficher l\'image.'; $lang['js']['mediadisplaylnk'] = 'N\'afficher que le lien.'; -$lang['js']['mediasmall'] = 'Petite version'; -$lang['js']['mediamedium'] = 'Version moyenne'; -$lang['js']['medialarge'] = 'Grande version'; -$lang['js']['mediaoriginal'] = 'Version originale'; +$lang['js']['mediasmall'] = 'Petite taille'; +$lang['js']['mediamedium'] = 'taille moyenne'; +$lang['js']['medialarge'] = 'Grande taille'; +$lang['js']['mediaoriginal'] = 'taille d\'origine'; $lang['js']['medialnk'] = 'Lien vers la page de détail'; $lang['js']['mediadirect'] = 'Lien direct vers l\'original'; $lang['js']['medianolnk'] = 'Aucun lien'; diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php index 36323a51f..fd3f40dfc 100644 --- a/lib/plugins/acl/lang/fr/lang.php +++ b/lib/plugins/acl/lang/fr/lang.php @@ -21,6 +21,7 @@ * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud + * @author schplurtz@laposte.net */ $lang['admin_acl'] = 'Gestion de la liste des contrôles d\'accès (ACL)'; $lang['acl_group'] = 'Groupe'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 39a665da0..1de255b40 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -16,6 +16,7 @@ * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud + * @author schplurtz@laposte.net */ $lang['menu'] = 'Paramètres de configuration'; $lang['error'] = 'Paramètres non modifiés en raison d\'une valeur non valide, vérifiez vos réglages et réessayez.
Les valeurs erronées sont entourées d\'une bordure rouge.'; @@ -120,6 +121,7 @@ $lang['jpg_quality'] = 'Qualité de la compression JPEG (0-100)'; $lang['subscribers'] = 'Activer l\'abonnement aux pages'; $lang['subscribe_time'] = 'Délai après lequel les listes d\'abonnement et résumés sont envoyés (en secondes). Devrait être plus petit que le délai précisé dans recent_days.'; $lang['compress'] = 'Compresser CSS et JavaScript'; +$lang['cssdatauri'] = 'Taille maximale en octets pour inclure dans les feuilles de styles CSS, les images qui y sont référencées. Cette technique minimise les requêtes HTTP. Pour IE, ceci ne fonctionne qu\'à partir de la version 8 ! Valeurs correctes entre 400 et 600. 0 pour désactiver.'; $lang['hidepages'] = 'Cacher les pages correspondant à (expression régulière)'; $lang['send404'] = 'Renvoyer "HTTP 404/Page Non Trouvée" pour les pages introuvables'; $lang['sitemap'] = 'Fréquence de génération une carte Google du site (en jours)'; diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index 2989d4913..0ff26da19 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -16,6 +16,7 @@ * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud + * @author schplurtz@laposte.net */ $lang['menu'] = 'Gestion des modules externes'; $lang['download'] = 'Télécharger et installer un nouveau module'; diff --git a/lib/plugins/popularity/lang/fr/lang.php b/lib/plugins/popularity/lang/fr/lang.php index 9aaf3c7d2..3ccc4cb5f 100644 --- a/lib/plugins/popularity/lang/fr/lang.php +++ b/lib/plugins/popularity/lang/fr/lang.php @@ -13,6 +13,7 @@ * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud + * @author schplurtz@laposte.net */ $lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargée)'; $lang['submit'] = 'Envoyer les données'; diff --git a/lib/plugins/revert/lang/fr/lang.php b/lib/plugins/revert/lang/fr/lang.php index d6dc3ee3d..17a2c3a01 100644 --- a/lib/plugins/revert/lang/fr/lang.php +++ b/lib/plugins/revert/lang/fr/lang.php @@ -14,6 +14,7 @@ * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud + * @author schplurtz@laposte.net */ $lang['menu'] = 'Gestionnaire de réversions'; $lang['filter'] = 'Trouver les pages spammées '; diff --git a/lib/plugins/usermanager/lang/fr/lang.php b/lib/plugins/usermanager/lang/fr/lang.php index 49baf9d51..b6910663c 100644 --- a/lib/plugins/usermanager/lang/fr/lang.php +++ b/lib/plugins/usermanager/lang/fr/lang.php @@ -15,6 +15,7 @@ * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud + * @author schplurtz@laposte.net */ $lang['menu'] = 'Gestion des utilisateurs'; $lang['noauth'] = '(authentification utilisateur non disponible)'; -- cgit v1.2.3 From 872a6d295eacbfa8abad2877ec4e367930da3692 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 31 Jul 2011 00:52:10 +0100 Subject: added apple-touch-icon (aka 'mobile favicon') --- inc/template.php | 41 ++++++++++++++++++++++++---- lib/tpl/default/images/apple-touch-icon.png | Bin 0 -> 17728 bytes lib/tpl/default/main.php | 3 +- 3 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 lib/tpl/default/images/apple-touch-icon.png diff --git a/inc/template.php b/inc/template.php index a476e78ab..5184929b8 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1340,21 +1340,50 @@ function tpl_flush(){ /** - * Use favicon.ico from data/media root directory if it exists, otherwise use + * Returns icon from data/media root directory if it exists, otherwise * the one in the template's image directory. * + * @param bool $abs - if to use absolute URL + * @param string $fileName - file name of icon * @author Anika Henke */ -function tpl_getFavicon($abs=false) { - if (file_exists(mediaFN('favicon.ico'))) { - return ml('favicon.ico', '', true, '', $abs); +function tpl_getFavicon($abs=false, $fileName='favicon.ico') { + if (file_exists(mediaFN($fileName))) { + return ml($fileName, '', true, '', $abs); } if($abs) { - return DOKU_URL.substr(DOKU_TPL.'images/favicon.ico', strlen(DOKU_REL)); + return DOKU_URL.substr(DOKU_TPL.'images/'.$fileName, strlen(DOKU_REL)); + } + return DOKU_TPL.'images/'.$fileName; +} + +/** + * Returns tag for various icon types (favicon|mobile|generic) + * + * @param array $types - list of icon types to display (favicon|mobile|generic) + * @author Anika Henke + */ +function tpl_favicon($types=array('favicon')) { + + $return = ''; + + foreach ($types as $type) { + switch($type) { + case 'favicon': + $return .= ''.NL; + break; + case 'mobile': + $return .= ''.NL; + break; + case 'generic': + // ideal world solution, which doesn't work in any browser yet + $return .= ''.NL; + break; + } } - return DOKU_TPL.'images/favicon.ico'; + return $return; } diff --git a/lib/tpl/default/images/apple-touch-icon.png b/lib/tpl/default/images/apple-touch-icon.png new file mode 100644 index 000000000..45fa4e7b0 Binary files /dev/null and b/lib/tpl/default/images/apple-touch-icon.png differ diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 94c2322aa..26e84fde6 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -28,8 +28,7 @@ if (!defined('DOKU_INC')) die(); - - + -- cgit v1.2.3 From 11cfbdbd017ee1dedbcebd99a694421c1b815f65 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 1 Aug 2011 00:01:21 +0200 Subject: fixed media insertion FS#2298 --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index b9dacfa29..1402ad4bf 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -135,7 +135,7 @@ var dw_mediamanager = { * @author Dominik Eckelmann * @author Pierre Spring */ - insert: function () { + insert: function (id) { var opts, alignleft, alignright, edid, s; // set syntax options -- cgit v1.2.3 From 56c92de61fb92487744205a372fc66ecb489039a Mon Sep 17 00:00:00 2001 From: Eivind Morland Date: Mon, 1 Aug 2011 00:15:48 +0200 Subject: Transliteration for Sanskrit diacritics FS#2246 --- inc/utf8.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/utf8.php b/inc/utf8.php index 3d4de2289..303987e4f 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -1261,6 +1261,7 @@ if(empty($UTF8_SPECIAL_CHARS2)) $UTF8_SPECIAL_CHARS2 = * @link http://www.btranslations.com/resources/romanization/korean.asp * @author Arthit Suriyawongkul * @author Denis Scheither + * @author Eivind Morland */ global $UTF8_ROMANIZATION; if(empty($UTF8_ROMANIZATION)) $UTF8_ROMANIZATION = array( @@ -1293,6 +1294,11 @@ if(empty($UTF8_ROMANIZATION)) $UTF8_ROMANIZATION = array( 'ड'=>'dq','ढ'=>'dqh','ण'=>'nq','त'=>'t','थ'=>'th','द'=>'d','ध'=>'dh', 'न'=>'n','प'=>'p','फ'=>'ph','ब'=>'b','भ'=>'bh','म'=>'m','य'=>'z','र'=>'r', 'ल'=>'l','व'=>'v','श'=>'sh','ष'=>'sqh','स'=>'s','ह'=>'x', + //Sanskrit diacritics + 'Ā'=>'A','Ī'=>'I','Ū'=>'U','Ṛ'=>'R','Ṝ'=>'R','Ṅ'=>'N','Ñ'=>'N','Ṭ'=>'T', + 'Ḍ'=>'D','Ṇ'=>'N','Ś'=>'S','Ṣ'=>'S','Ṁ'=>'M','Ṃ'=>'M','Ḥ'=>'H','Ḷ'=>'L','Ḹ'=>'L', + 'ā'=>'a','ī'=>'i','ū'=>'u','ṛ'=>'r','ṝ'=>'r','ṅ'=>'n','ñ'=>'n','ṭ'=>'t', + 'ḍ'=>'d','ṇ'=>'n','ś'=>'s','ṣ'=>'s','ṁ'=>'m','ṃ'=>'m','ḥ'=>'h','ḷ'=>'l','ḹ'=>'l', //Hebrew 'א'=>'a', 'ב'=>'b','ג'=>'g','ד'=>'d','ה'=>'h','ו'=>'v','ז'=>'z','ח'=>'kh','ט'=>'th', 'י'=>'y','ך'=>'h','כ'=>'k','ל'=>'l','ם'=>'m','מ'=>'m','ן'=>'n','נ'=>'n', -- cgit v1.2.3 From 507a2aebd7d8bede509a97e12e2a0f208030ee15 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 1 Aug 2011 21:11:01 +0100 Subject: fixed empty target in license link --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index de860a0fe..64999ed98 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1258,7 +1258,7 @@ function html_edit(){ $form->addElement(form_makeOpenTag('div', array('class'=>'license'))); $out = $lang['licenseok']; $out .= ' '; $form->addElement($out); $form->addElement(form_makeCloseTag('div')); -- cgit v1.2.3 From fe165917474a912ed1c531a5a3711709527fadc1 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 10 Aug 2011 23:19:56 +0200 Subject: Hide hidden and deleted pages from the backlinks Sometimes pages aren't deleted from the index (that should be fixed, too) and appear in the backlinks although they don't exist anymore. This change hides them and hidden pages that shouldn't appear at all as the backlinks view is an automatic listing. Hidden pages had been hidden before the transition to the metadata index, too. --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index 6ab710d54..620237296 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -135,7 +135,7 @@ function ft_backlinks($id){ // check ACL permissions foreach(array_keys($result) as $idx){ - if(auth_quickaclcheck($result[$idx]) < AUTH_READ){ + if(isHiddenPage($result[$idx]) || auth_quickaclcheck($result[$idx]) < AUTH_READ || !page_exists($result[$idx], '', false)){ unset($result[$idx]); } } -- cgit v1.2.3 From 4678059bd0b91fb4d92aaa85cd5d0855818a2c30 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 14 Aug 2011 17:29:44 +0200 Subject: don't remove msg() errors on click this interferred with copy'n'pasting error messages --- lib/scripts/behaviour.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index a94e40b7a..aadf74a1c 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -13,7 +13,6 @@ var dw_behaviour = { init: function(){ dw_behaviour.focusMarker(); dw_behaviour.scrollToMarker(); - dw_behaviour.closeMsgOnClick(); dw_behaviour.removeHighlightOnClick(); dw_behaviour.quickSelect(); dw_behaviour.checkWindowsShares(); @@ -37,17 +36,6 @@ var dw_behaviour = { jQuery('#focus__this').focus(); }, - /** - * Close messages shown by the msg() PHP function by click - */ - closeMsgOnClick: function(){ - jQuery('div.success, div.info, div.error, div.notify').click( - function(e){ - jQuery(e.target).fadeOut('fast'); - } - ); - }, - /** * Remove all search highlighting when clicking on a highlighted term * -- cgit v1.2.3 From b2a330ca75f1ceec063a08029abb0204110e3601 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 6 Aug 2011 13:56:57 +0200 Subject: removed events.js --- lib/exe/js.php | 1 - lib/scripts/compatibility.js | 15 +++++++++++++ lib/scripts/events.js | 50 -------------------------------------------- lib/scripts/helpers.js | 29 +++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 51 deletions(-) delete mode 100644 lib/scripts/events.js diff --git a/lib/exe/js.php b/lib/exe/js.php index 44ab2d5ca..4355cbfd7 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -44,7 +44,6 @@ function js_out(){ DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC."lib/scripts/jquery/jquery-ui$min.js", DOKU_INC.'lib/scripts/helpers.js', - DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', DOKU_INC.'lib/scripts/cookie.js', DOKU_INC.'lib/scripts/script.js', diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js index 13b088582..a5cc87e58 100644 --- a/lib/scripts/compatibility.js +++ b/lib/scripts/compatibility.js @@ -108,3 +108,18 @@ function prependChild(parent,element) { jQuery(parent).prepend(element); } +function addEvent(element, type, handler) { + DEPRECATED('Use jQuery.bind() instead.'); + jQuery(element).bind(type,{},handler); +} + +function removeEvent(element, type, handler) { + DEPRECATED('Use jQuery.unbind() instead.'); + jQuery(element).unbind(type,handler); +} + +function addInitEvent(func) { + DEPRECATED('Use jQuery() instead'); + jQuery(func); +} + diff --git a/lib/scripts/events.js b/lib/scripts/events.js deleted file mode 100644 index 796d3cc4c..000000000 --- a/lib/scripts/events.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * The event functions are no longer in use and a mere wrapper around - * jQuery's event handlers. - * - * @deprecated - */ -function addEvent(element, type, handler) { - DEPRECATED('Use jQuery.bind() instead.'); - jQuery(element).bind(type,{},handler); -} - -function removeEvent(element, type, handler) { - DEPRECATED('Use jQuery.unbind() instead.'); - jQuery(element).unbind(type,handler); -} - -function addInitEvent(func) { - DEPRECATED('Use jQuery() instead'); - jQuery(func); -} - -/** - * Bind variables to a function call creating a closure - * - * Use this to circumvent variable scope problems when creating closures - * inside a loop - * - * @author Adrian Lang - * @fixme Is there a jQuery equivalent? Otherwise move to somewhere else - * @link http://www.cosmocode.de/en/blog/gohr/2009-10/15-javascript-fixing-the-closure-scope-in-loops - * @param functionref fnc - the function to be called - * @param mixed - any arguments to be passed to the function - * @returns functionref - */ -function bind(fnc/*, ... */) { - var Aps = Array.prototype.slice; - // Store passed arguments in this scope. - // Since arguments is no Array nor has an own slice method, - // we have to apply the slice method from the Array.prototype - var static_args = Aps.call(arguments, 1); - - // Return a function evaluating the passed function with the - // given args and optional arguments passed on invocation. - return function (/* ... */) { - // Same here, but we use Array.prototype.slice solely for - // converting arguments to an Array. - return fnc.apply(this, - static_args.concat(Aps.call(arguments, 0))); - }; -} diff --git a/lib/scripts/helpers.js b/lib/scripts/helpers.js index 77e7ffc4a..b286965cf 100644 --- a/lib/scripts/helpers.js +++ b/lib/scripts/helpers.js @@ -163,3 +163,32 @@ function substr_replace(str, replace, start, length) { b1 = (length < 0 ? str.length : a2) + length; return str.substring(0, a2) + replace + str.substring(b1); } + +/** + * Bind variables to a function call creating a closure + * + * Use this to circumvent variable scope problems when creating closures + * inside a loop + * + * @author Adrian Lang + * @link http://www.cosmocode.de/en/blog/gohr/2009-10/15-javascript-fixing-the-closure-scope-in-loops + * @param functionref fnc - the function to be called + * @param mixed - any arguments to be passed to the function + * @returns functionref + */ +function bind(fnc/*, ... */) { + var Aps = Array.prototype.slice; + // Store passed arguments in this scope. + // Since arguments is no Array nor has an own slice method, + // we have to apply the slice method from the Array.prototype + var static_args = Aps.call(arguments, 1); + + // Return a function evaluating the passed function with the + // given args and optional arguments passed on invocation. + return function (/* ... */) { + // Same here, but we use Array.prototype.slice solely for + // converting arguments to an Array. + return fnc.apply(this, + static_args.concat(Aps.call(arguments, 0))); + }; +} -- cgit v1.2.3 From d4228d2db11332beba5ca9fa483a45e31a9edbe9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 09:45:28 +0200 Subject: popularity plugin: send info on autosend Added information about the autosubmitting feature of the popularity plugin itself. --- lib/plugins/popularity/helper.php | 1 + lib/plugins/popularity/plugin.info.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 5ce562319..af1e8a706 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -134,6 +134,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { $data['popversion'] = $this->version; $data['language'] = $conf['lang']; $data['now'] = time(); + $data['popauto'] = (int) $this->isAutoSubmitEnabled(); // some config values $data['conf_useacl'] = $conf['useacl']; diff --git a/lib/plugins/popularity/plugin.info.txt b/lib/plugins/popularity/plugin.info.txt index 2652bd669..16b148f41 100644 --- a/lib/plugins/popularity/plugin.info.txt +++ b/lib/plugins/popularity/plugin.info.txt @@ -1,7 +1,7 @@ base popularity author Andreas Gohr email andi@splitbrain.org -date 2010-12-09 +date 2011-08-18 name Popularity Feedback Plugin desc Send anonymous data about your wiki to the developers. url http://www.dokuwiki.org/plugin:popularity -- cgit v1.2.3 From 5b812846ce6a2e72e388adbb0dcaadbc0137b173 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 10:30:16 +0200 Subject: jqueryized usermanager script --- lib/plugins/usermanager/script.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/plugins/usermanager/script.js b/lib/plugins/usermanager/script.js index 68d437129..de013242b 100644 --- a/lib/plugins/usermanager/script.js +++ b/lib/plugins/usermanager/script.js @@ -1,9 +1,8 @@ /** * Add JavaScript confirmation to the User Delete button */ -function usrmgr_delconfirm(){ - if($('usrmgr__del')){ - addEvent( $('usrmgr__del'),'click',function(){ return confirm(reallyDel); } ); - } -}; -addInitEvent(usrmgr_delconfirm); +jQuery(function(){ + jQuery('#usrmgr__del').click(function(){ + return confirm(LANG.del_confirm); + }); +}); -- cgit v1.2.3 From 20e3e8ebefec296327d39fb572b06d60c151c867 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 11:36:18 +0200 Subject: added some function comments --- lib/scripts/behaviour.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index aadf74a1c..6012e5d1d 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -112,14 +112,31 @@ var dw_behaviour = { }; +/** + * Hides elements with a slide animation + * + * @param fn optional callback to run after hiding + * @author Adrian Lang + */ jQuery.fn.dw_hide = function(fn) { return this.slideUp('fast', fn); }; -jQuery.fn.dw_show = function() { - return this.slideDown('fast'); +/** + * Unhides elements with a slide animation + * + * @param fn optional callback to run after hiding + * @author Adrian Lang + */ +jQuery.fn.dw_show = function(fn) { + return this.slideDown('fast', fn); }; +/** + * Toggles visibility of an element using a slide element + * + * @param bool the current state of the element (optional) + */ jQuery.fn.dw_toggle = function(bool) { return this.each(function() { var $this = jQuery(this); -- cgit v1.2.3 From 02782d1287173f3981a008755958543c178de296 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 12:24:43 +0200 Subject: moved subscription javascript into behaviour --- lib/exe/js.php | 1 - lib/scripts/behaviour.js | 36 +++++++++++++++++++++++++++++++++++- lib/scripts/subscriptions.js | 38 -------------------------------------- 3 files changed, 35 insertions(+), 40 deletions(-) delete mode 100644 lib/scripts/subscriptions.js diff --git a/lib/exe/js.php b/lib/exe/js.php index 4355cbfd7..93d5439e0 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -59,7 +59,6 @@ function js_out(){ DOKU_INC.'lib/scripts/locktimer.js', DOKU_INC.'lib/scripts/linkwiz.js', DOKU_INC.'lib/scripts/media.js', - DOKU_INC.'lib/scripts/subscriptions.js', DOKU_INC.'lib/scripts/compatibility.js', # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', DOKU_TPLINC.'script.js', diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 6012e5d1d..0f69d5721 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -17,6 +17,7 @@ var dw_behaviour = { dw_behaviour.quickSelect(); dw_behaviour.checkWindowsShares(); dw_behaviour.initTocToggle(); + dw_behaviour.subscription(); }, /** @@ -108,8 +109,41 @@ var dw_behaviour = { }; setClicky(); - } + }, + /** + * Hide list subscription style if target is a page + * + * @author Adrian Lang + * @author Pierre Spring + */ + subscription: function(){ + var $form, $list, $digest; + + $form = jQuery('#subscribe__form'); + if (0 === $form.length) return; + + $list = $form.find("input[name='sub_style'][value='list']"); + $digest = $form.find("input[name='sub_style'][value='digest']"); + + $form.find("input[name='sub_target']") + .click( + function () { + var $this = jQuery(this), show_list; + if (!$this.prop('checked')) { + return; + } + + show_list = $this.val().match(/:$/); + $list.parent().dw_toggle(show_list); + if (!show_list && $list.prop('checked')) { + $digest.prop('checked', 'checked'); + } + } + ) + .filter(':checked') + .click(); + } }; /** diff --git a/lib/scripts/subscriptions.js b/lib/scripts/subscriptions.js deleted file mode 100644 index b7bffb158..000000000 --- a/lib/scripts/subscriptions.js +++ /dev/null @@ -1,38 +0,0 @@ -/*jslint sloppy: true */ -/*global jQuery */ -/** - * Hide list subscription style if target is a page - * - * @author Adrian Lang - * @author Pierre Spring - */ -jQuery(function () { - var $form, $list, $digest; - - $form = jQuery('#subscribe__form'); - - if (0 === $form.length) { - return; - } - - $list = $form.find("input[name='sub_style'][value='list']"); - $digest = $form.find("input[name='sub_style'][value='digest']"); - - $form.find("input[name='sub_target']") - .click( - function () { - var $this = jQuery(this), show_list; - if (!$this.prop('checked')) { - return; - } - - show_list = $this.val().match(/:$/); - $list.parent().dw_toggle(show_list); - if (!show_list && $list.prop('checked')) { - $digest.prop('checked', 'checked'); - } - } - ) - .filter(':checked') - .click(); -}); -- cgit v1.2.3 From fbedf1265a6551391cbb7442ec5f9360328ff508 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 15:17:54 +0200 Subject: moved footnotes and section highlighting to ne file jquerized --- lib/exe/js.php | 3 +- lib/scripts/script.js | 133 -------------------------------------------------- 2 files changed, 2 insertions(+), 134 deletions(-) diff --git a/lib/exe/js.php b/lib/exe/js.php index 93d5439e0..0e0a22d42 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -61,8 +61,9 @@ function js_out(){ DOKU_INC.'lib/scripts/media.js', DOKU_INC.'lib/scripts/compatibility.js', # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', - DOKU_TPLINC.'script.js', DOKU_INC.'lib/scripts/behaviour.js', + DOKU_INC.'lib/scripts/page.js', + DOKU_TPLINC.'script.js', ); // add possible plugin scripts and userscript diff --git a/lib/scripts/script.js b/lib/scripts/script.js index b44d95d6f..3e2ec4f89 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -180,104 +180,6 @@ function hideLoadBar(id){ if(obj) obj.style.display="none"; } - -/** - * Create JavaScript mouseover popup - */ -function insitu_popup(target, popup_id) { - - // get or create the popup div - var fndiv = $(popup_id); - if(!fndiv){ - fndiv = document.createElement('div'); - fndiv.id = popup_id; - fndiv.className = 'insitu-footnote JSpopup dokuwiki'; - - // autoclose on mouseout - ignoring bubbled up events - addEvent(fndiv,'mouseout',function(e){ - var p = e.relatedTarget || e.toElement; - while (p && p !== this) { - p = p.parentNode; - } - if (p === this) { - return; - } - // okay, hide it - this.style.display='none'; - }); - getElementsByClass('dokuwiki', document.body, 'div')[0].appendChild(fndiv); - } - - var non_static_parent = fndiv.parentNode; - while (non_static_parent != document && gcs(non_static_parent)['position'] == 'static') { - non_static_parent = non_static_parent.parentNode; - } - - var fixed_target_parent = target; - while (fixed_target_parent != document && gcs(fixed_target_parent)['position'] != 'fixed') { - fixed_target_parent = fixed_target_parent.parentNode; - } - - // position the div and make it visible - if (fixed_target_parent != document) { - // the target has position fixed, that means the footnote needs to be fixed, too - fndiv.style.position = 'fixed'; - } else { - fndiv.style.position = 'absolute'; - } - - if (fixed_target_parent != document || non_static_parent == document) { - fndiv.style.left = findPosX(target)+'px'; - fndiv.style.top = (findPosY(target)+target.offsetHeight * 1.5) + 'px'; - } else { - fndiv.style.left = (findPosX(target) - findPosX(non_static_parent)) +'px'; - fndiv.style.top = (findPosY(target)+target.offsetHeight * 1.5 - findPosY(non_static_parent)) + 'px'; - } - - fndiv.style.display = ''; - return fndiv; -} - -/** - * Display an insitu footnote popup - * - * @author Andreas Gohr - * @author Chris Smith - */ -function footnote(e){ - var fndiv = insitu_popup(e.target, 'insitu__fn'); - - // locate the footnote anchor element - var a = $("fn__" + e.target.id.substr(5)); - if (!a){ return; } - - // anchor parent is the footnote container, get its innerHTML - var content = new String (a.parentNode.parentNode.innerHTML); - - // strip the leading content anchors and their comma separators - content = content.replace(/.*<\/sup>/gi, ''); - content = content.replace(/^\s+(,\s+)+/,''); - - // prefix ids on any elements with "insitu__" to ensure they remain unique - content = content.replace(/\bid=(['"])([^"']+)\1/gi,'id="insitu__$2'); - - // now put the content into the wrapper - fndiv.innerHTML = content; -} - -/** - * Add the event handlers to footnotes - * - * @author Andreas Gohr - */ -addInitEvent(function(){ - var elems = getElementsByClass('fn_top',null,'a'); - for(var i=0; i - */ -addInitEvent(function(){ - var btns = getElementsByClass('btn_secedit',document,'form'); - for(var i=0; i Date: Thu, 18 Aug 2011 20:45:07 +0200 Subject: added link to popularity page in intro FS#2305 --- lib/plugins/popularity/lang/de/intro.txt | 2 +- lib/plugins/popularity/lang/en/intro.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/popularity/lang/de/intro.txt b/lib/plugins/popularity/lang/de/intro.txt index 63b120662..dc014e029 100644 --- a/lib/plugins/popularity/lang/de/intro.txt +++ b/lib/plugins/popularity/lang/de/intro.txt @@ -1,6 +1,6 @@ ====== Popularitäts-Feedback ====== -Dieses Werkzeug sammelt verschiedene anonyme Daten über Ihr Wiki und erlaubt es Ihnen, diese an die DokuWiki-Entwickler zurückzusenden. Diese Daten helfen den Entwicklern besser zu verstehen, wie DokuWiki eingesetzt wird und stellt sicher, dass zukünftige, die Weiterentwicklung von DokuWiki betreffende, Entscheidungen auf Basis echter Nutzerdaten getroffen werden. +Dieses [[doku>popularity|Werkzeug]] sammelt verschiedene anonyme Daten über Ihr Wiki und erlaubt es Ihnen, diese an die DokuWiki-Entwickler zurückzusenden. Diese Daten helfen den Entwicklern besser zu verstehen, wie DokuWiki eingesetzt wird und stellt sicher, dass zukünftige, die Weiterentwicklung von DokuWiki betreffende, Entscheidungen auf Basis echter Nutzerdaten getroffen werden. Bitte wiederholen Sie das Versenden der Daten von Zeit zu Zeit, um die Entwickler über das Wachstum Ihres Wikis auf dem Laufenden zu halten. Ihre wiederholten Dateneinsendungen werden über eine anonyme ID identifiziert. diff --git a/lib/plugins/popularity/lang/en/intro.txt b/lib/plugins/popularity/lang/en/intro.txt index 0812ffbe3..e1d6d940a 100644 --- a/lib/plugins/popularity/lang/en/intro.txt +++ b/lib/plugins/popularity/lang/en/intro.txt @@ -1,6 +1,6 @@ ====== Popularity Feedback ====== -This tool gathers anonymous data about your wiki and allows you to send it back to the DokuWiki developers. This helps them to understand them how DokuWiki is used by its users and makes sure future development decisions are backed up by real world usage statistics. +This [[doku>popularity|tool]] gathers anonymous data about your wiki and allows you to send it back to the DokuWiki developers. This helps them to understand them how DokuWiki is used by its users and makes sure future development decisions are backed up by real world usage statistics. You are encouraged to repeat this step from time to time to keep developers informed when your wiki grows. Your repeated data sets will be identified by an anonymous ID. -- cgit v1.2.3 From 37f58beb831123388fa2373e0540fc8a5e585dac Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Fri, 19 Aug 2011 21:34:16 +0300 Subject: French localization of 69b3d ("added link to popularity page in intro FS#2305") --- lib/plugins/popularity/lang/fr/intro.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/popularity/lang/fr/intro.txt b/lib/plugins/popularity/lang/fr/intro.txt index 58be61d03..041e65d69 100644 --- a/lib/plugins/popularity/lang/fr/intro.txt +++ b/lib/plugins/popularity/lang/fr/intro.txt @@ -1,6 +1,6 @@ ====== Enquête de popularité ====== -Cet outil collecte des données anonymes concernant votre wiki et vous permet de les expédier aux développeurs de DokuWiki. Ceci leur permet de mieux comprendre comment DokuWiki est employé par ses utilisateurs et d'orienter les décisions sur les développements futurs en tenant compte des statistiques d'usage réel. +Cet [[doku>popularity|outil]] collecte des données anonymes concernant votre wiki et vous permet de les expédier aux développeurs de DokuWiki. Ceci leur permet de mieux comprendre comment DokuWiki est employé par ses utilisateurs et d'orienter les décisions sur les développements futurs en tenant compte des statistiques d'usage réel. Vous êtes encouragé à répéter l'opération de collecte et d'envoi des données anonymes de temps en temps afin d'informer les développeurs de la croissance de votre wiki. -- cgit v1.2.3 From f48fbadf2218e4ad1df6909374c30bddbb7a24bb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 11:24:07 +0200 Subject: added missing file yeah, yeah I know... --- lib/scripts/page.js | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 lib/scripts/page.js diff --git a/lib/scripts/page.js b/lib/scripts/page.js new file mode 100644 index 000000000..189c1f148 --- /dev/null +++ b/lib/scripts/page.js @@ -0,0 +1,115 @@ +/** + * Page behaviours + * + * This class adds various behaviours to the rendered page + */ +dw_page = { + /** + * initialize page behaviours + */ + init: function(){ + dw_page.sectionHighlight(); + jQuery('a.fn_top').mouseover(dw_page.footnoteDisplay); + }, + + /** + * Highlight the section when hovering over the appropriate section edit button + * + * @author Andreas Gohr + */ + sectionHighlight: function() { + jQuery('form.btn_secedit') + .mouseover(function(e){ + var tgt = this.parentNode; + var nr = tgt.className.match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2]; + do { + tgt = tgt.previousSibling; + } while (tgt !== null && typeof tgt.tagName === 'undefined'); + if (tgt === null) return; + while(typeof tgt.className === 'undefined' || + tgt.className.match('(\\s+|^)sectionedit' + nr + '(\\s+|$)') === null) { + if (typeof tgt.className !== 'undefined') { + jQuery(tgt).addClass('section_highlight'); + } + tgt = (tgt.previousSibling !== null) ? tgt.previousSibling : tgt.parentNode; + } + + jQuery(tgt).addClass('section_highlight'); + }) + .mouseout(function(e){ + jQuery('.section_highlight').removeClass('section_highlight'); + }); + }, + + /** + * Create/get a insitu popup used by the footnotes + * + * @param target - the DOM element at which the popup should be aligned at + * @param popup_id - the ID of the (new) DOM popup + * @return the Popup JQuery object + */ + insituPopup: function(target, popup_id) { + // get or create the popup div + var $fndiv = jQuery('#popup_id'); + + // popup doesn't exist, yet -> create it + if(!$fndiv.length){ + $fndiv = jQuery(document.createElement('div')) + .attr('id', popup_id) + .addClass('insitu-footnote JSpopup') + .mouseout(function(e){ + // autoclose on mouseout - ignoring bubbled up events + //FIXME can this made simpler in jQuery? + var p = e.relatedTarget || e.toElement; + while (p && p !== this) { + p = p.parentNode; + } + if (p === this) { + return; + } + jQuery(this).hide(); + }); + + jQuery('div.dokuwiki:first').append($fndiv); + } + + $fndiv.position({ + my: 'left top', + at: 'left center', + of: target + }); + + $fndiv.hide(); + return $fndiv; + }, + + /** + * Display an insitu footnote popup + * + * @author Andreas Gohr + * @author Chris Smith + */ + footnoteDisplay: function(e){ + var $fndiv = dw_page.insituPopup(e.target, 'insitu__fn'); + + // locate the footnote anchor element + var $a = jQuery("#fn__" + e.target.id.substr(5)); + if (!$a.length){ return; } + + // anchor parent is the footnote container, get its innerHTML + var content = new String ($a.parent().parent().html()); + + // strip the leading content anchors and their comma separators + content = content.replace(/.*<\/sup>/gi, ''); + content = content.replace(/^\s+(,\s+)+/,''); + + // prefix ids on any elements with "insitu__" to ensure they remain unique + content = content.replace(/\bid=(['"])([^"']+)\1/gi,'id="insitu__$2'); + + // now put the content into the wrapper + $fndiv.html(content); + $fndiv.show(); + } +}; + +jQuery(dw_page.init); -- cgit v1.2.3 From 99e7bfd4c733d81cd01dd2d97e10bb4dda62df66 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 11:35:58 +0200 Subject: jqueryized locktimer --- inc/lang/ar/lang.php | 2 +- inc/lang/az/lang.php | 2 +- inc/lang/bg/lang.php | 2 +- inc/lang/ca-valencia/lang.php | 2 +- inc/lang/ca/lang.php | 2 +- inc/lang/cs/lang.php | 2 +- inc/lang/da/lang.php | 2 +- inc/lang/de-informal/lang.php | 2 +- inc/lang/de/lang.php | 2 +- inc/lang/el/lang.php | 2 +- inc/lang/en/lang.php | 2 +- inc/lang/eo/lang.php | 2 +- inc/lang/es/lang.php | 2 +- inc/lang/et/lang.php | 2 +- inc/lang/eu/lang.php | 2 +- inc/lang/fa/lang.php | 2 +- inc/lang/fi/lang.php | 2 +- inc/lang/fo/lang.php | 2 +- inc/lang/fr/lang.php | 2 +- inc/lang/gl/lang.php | 2 +- inc/lang/he/lang.php | 2 +- inc/lang/hr/lang.php | 2 +- inc/lang/hu/lang.php | 2 +- inc/lang/ia/lang.php | 2 +- inc/lang/id/lang.php | 2 +- inc/lang/it/lang.php | 2 +- inc/lang/ja/lang.php | 2 +- inc/lang/kk/lang.php | 2 +- inc/lang/km/lang.php | 2 +- inc/lang/ko/lang.php | 2 +- inc/lang/ku/lang.php | 2 +- inc/lang/la/lang.php | 2 +- inc/lang/lb/lang.php | 2 +- inc/lang/lt/lang.php | 2 +- inc/lang/lv/lang.php | 2 +- inc/lang/mg/lang.php | 2 +- inc/lang/mk/lang.php | 2 +- inc/lang/mr/lang.php | 2 +- inc/lang/ne/lang.php | 2 +- inc/lang/nl/lang.php | 2 +- inc/lang/no/lang.php | 2 +- inc/lang/pl/lang.php | 2 +- inc/lang/pt-br/lang.php | 2 +- inc/lang/pt/lang.php | 2 +- inc/lang/ro/lang.php | 2 +- inc/lang/ru/lang.php | 2 +- inc/lang/sk/lang.php | 2 +- inc/lang/sl/lang.php | 2 +- inc/lang/sq/lang.php | 2 +- inc/lang/sr/lang.php | 2 +- inc/lang/sv/lang.php | 2 +- inc/lang/th/lang.php | 2 +- inc/lang/tr/lang.php | 2 +- inc/lang/uk/lang.php | 2 +- inc/lang/vi/lang.php | 2 +- inc/lang/zh-tw/lang.php | 2 +- inc/lang/zh/lang.php | 2 +- lib/exe/js.php | 2 +- lib/scripts/locktimer.js | 72 ++++++++++++++++++++----------------------- 59 files changed, 92 insertions(+), 96 deletions(-) diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index e5606c456..ee330099b 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'رفع كـ (اختياري)'; $lang['txt_overwrt'] = 'اكتب على ملف موجود'; $lang['lockedby'] = 'مقفلة حاليا لـ'; $lang['lockexpire'] = 'ينتهي القفل في'; -$lang['willexpire'] = 'سينتهي قفل تحرير هذه الصفحه خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصفير مؤقت القفل.'; +$lang['js']['willexpire'] = 'سينتهي قفل تحرير هذه الصفحه خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصفير مؤقت القفل.'; $lang['js']['notsavedyet'] = 'التعديلات غير المحفوظة ستفقد.'; $lang['js']['searchmedia'] = 'ابحث عن ملفات'; $lang['js']['keepopen'] = 'أبقي النافذة مفتوحة أثناء الاختيار'; diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php index 35b18d3a7..302f24c16 100644 --- a/inc/lang/az/lang.php +++ b/inc/lang/az/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Faylın wiki-də olan adını daxil edin (müt $lang['txt_overwrt'] = 'Mövcud olan faylın üstündən yaz'; $lang['lockedby'] = 'В данный момент заблокирован Bu an blokdadır'; $lang['lockexpire'] = 'Blok bitir:'; -$lang['willexpire'] = 'Sizin bu səhifədə dəyişik etmək üçün blokunuz bir dəqiqə ərzində bitəcək.\nMünaqişələrdən yayınmaq və blokun taymerini sıfırlamaq üçün, baxış düyməsini sıxın.'; +$lang['js']['willexpire'] = 'Sizin bu səhifədə dəyişik etmək üçün blokunuz bir dəqiqə ərzində bitəcək.\nMünaqişələrdən yayınmaq və blokun taymerini sıfırlamaq üçün, baxış düyməsini sıxın.'; $lang['notsavedyet'] = 'Yaddaşa yazılmamış dəyişiklər itəcəklər.\nSiz davam etmək istəyirsiz?'; $lang['rssfailed'] = 'Aşağıda göstərilmiş xəbər lentini əldə edən zaman xəta baş verdi: '; $lang['nothingfound'] = 'Heçnə tapılmadı.'; diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index 3f8460286..580f6d963 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -91,7 +91,7 @@ $lang['txt_filename'] = 'Качи като (незадължителн $lang['txt_overwrt'] = 'Презапиши съществуващите файлове'; $lang['lockedby'] = 'В момента е заключена от'; $lang['lockexpire'] = 'Ще бъде отключена на'; -$lang['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.'; +$lang['js']['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.'; $lang['js']['notsavedyet'] = 'Незаписаните промени ще бъдат загубени. Желаете ли да продължите?'; $lang['js']['searchmedia'] = 'Търсене на файлове'; $lang['js']['keepopen'] = 'Без затваряне на прозореца след избор'; diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index c6a7dc27e..c9c15b12d 100644 --- a/inc/lang/ca-valencia/lang.php +++ b/inc/lang/ca-valencia/lang.php @@ -93,7 +93,7 @@ $lang['txt_filename'] = 'Enviar com (opcional)'; $lang['txt_overwrt'] = 'Sobreescriure archius existents'; $lang['lockedby'] = 'Actualment bloquejat per'; $lang['lockexpire'] = 'El bloqueig venç a les'; -$lang['willexpire'] = 'El seu bloqueig per a editar esta pàgina vencerà en un minut.\nPer a evitar conflictes utilise el botó de vista prèvia i reiniciarà el contador.'; +$lang['js']['willexpire'] = 'El seu bloqueig per a editar esta pàgina vencerà en un minut.\nPer a evitar conflictes utilise el botó de vista prèvia i reiniciarà el contador.'; $lang['js']['notsavedyet'] = "Els canvis no guardats es perdran.\n¿Segur que vol continuar?"; $lang['rssfailed'] = 'Ha ocorregut un erro al solicitar este canal: '; $lang['nothingfound'] = 'No s\'ha trobat res.'; diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index 342257d11..fbd1cb18a 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -93,7 +93,7 @@ $lang['txt_filename'] = 'Introduïu el nom wiki (opcional)'; $lang['txt_overwrt'] = 'Sobreescriu el fitxer actual'; $lang['lockedby'] = 'Actualment blocat per:'; $lang['lockexpire'] = 'Venciment del blocatge:'; -$lang['willexpire'] = 'El blocatge per a editar aquesta pàgina venç d\'aquí a un minut.\nUtilitzeu la visualització prèvia per reiniciar el rellotge i evitar conflictes.'; +$lang['js']['willexpire'] = 'El blocatge per a editar aquesta pàgina venç d\'aquí a un minut.\nUtilitzeu la visualització prèvia per reiniciar el rellotge i evitar conflictes.'; $lang['js']['notsavedyet'] = "Heu fet canvis que es perdran si no els deseu.\nVoleu continuar?"; $lang['rssfailed'] = 'S\'ha produït un error en recollir aquesta alimentació: '; $lang['nothingfound'] = 'No s\'ha trobat res.'; diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index e1c45e0c9..eaefaadb5 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -95,7 +95,7 @@ $lang['txt_filename'] = 'Wiki jméno (volitelné)'; $lang['txt_overwrt'] = 'Přepsat existující soubor'; $lang['lockedby'] = 'Právě zamknuto:'; $lang['lockexpire'] = 'Zámek vyprší:'; -$lang['willexpire'] = 'Váš zámek pro editaci za chvíli vyprší.\nAbyste předešli konfliktům, stiskněte tlačítko Náhled a zámek se prodlouží.'; +$lang['js']['willexpire'] = 'Váš zámek pro editaci za chvíli vyprší.\nAbyste předešli konfliktům, stiskněte tlačítko Náhled a zámek se prodlouží.'; $lang['js']['notsavedyet'] = 'Jsou tu neuložené změny, které budou ztraceny. Chcete opravdu pokračovat?'; $lang['js']['searchmedia'] = 'Hledat soubory'; diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php index 80d55d6f5..614f2bdf2 100644 --- a/inc/lang/da/lang.php +++ b/inc/lang/da/lang.php @@ -98,7 +98,7 @@ $lang['txt_filename'] = 'Indtast wikinavn (valgfrit)'; $lang['txt_overwrt'] = 'Overskriv eksisterende fil'; $lang['lockedby'] = 'Midlertidig låst af'; $lang['lockexpire'] = 'Lås udløber kl.'; -$lang['willexpire'] = 'Din lås på dette dokument udløber om et minut.\nTryk på Forhåndsvisning-knappen for at undgå konflikter.'; +$lang['js']['willexpire'] = 'Din lås på dette dokument udløber om et minut.\nTryk på Forhåndsvisning-knappen for at undgå konflikter.'; $lang['js']['notsavedyet'] = 'Ugemte ændringer vil blive mistet Fortsæt alligevel?'; $lang['js']['searchmedia'] = 'Søg efter filer'; diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index d39bf8152..16686bc4c 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -103,7 +103,7 @@ $lang['txt_filename'] = 'Hochladen als (optional)'; $lang['txt_overwrt'] = 'Bestehende Datei überschreiben'; $lang['lockedby'] = 'Momentan gesperrt von'; $lang['lockexpire'] = 'Sperre läuft ab am'; -$lang['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, solltest du sie durch einen Klick auf den Vorschau-Knopf verlängern.'; +$lang['js']['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, solltest du sie durch einen Klick auf den Vorschau-Knopf verlängern.'; $lang['js']['notsavedyet'] = 'Nicht gespeicherte Änderungen gehen verloren!'; $lang['js']['searchmedia'] = 'Suche nach Dateien'; $lang['js']['keepopen'] = 'Fenster nach Auswahl nicht schließen'; diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index f9f250994..3ae06dc71 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -103,7 +103,7 @@ $lang['txt_filename'] = 'Hochladen als (optional)'; $lang['txt_overwrt'] = 'Bestehende Datei überschreiben'; $lang['lockedby'] = 'Momentan gesperrt von'; $lang['lockexpire'] = 'Sperre läuft ab am'; -$lang['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, sollten Sie sie durch einen Klick auf den Vorschau-Knopf verlängern.'; +$lang['js']['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, sollten Sie sie durch einen Klick auf den Vorschau-Knopf verlängern.'; $lang['js']['notsavedyet'] = 'Nicht gespeicherte Änderungen gehen verloren!'; $lang['js']['searchmedia'] = 'Suche Dateien'; $lang['js']['keepopen'] = 'Fenster nach Auswahl nicht schließen'; diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index 11c64285e..373dc5463 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Επιλέξτε νέο όνομα αρχεί $lang['txt_overwrt'] = 'Αντικατάσταση υπάρχοντος αρχείου'; $lang['lockedby'] = 'Προσωρινά κλειδωμένο από'; $lang['lockexpire'] = 'Το κλείδωμα λήγει στις'; -$lang['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.'; +$lang['js']['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.'; $lang['js']['notsavedyet'] = 'Οι μη αποθηκευμένες αλλαγές θα χαθούν. Θέλετε να συνεχίσετε;'; $lang['js']['searchmedia'] = 'Αναζήτηση για αρχεία'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 51fd8f645..95356f7b4 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -98,7 +98,7 @@ $lang['txt_filename'] = 'Upload as (optional)'; $lang['txt_overwrt'] = 'Overwrite existing file'; $lang['lockedby'] = 'Currently locked by'; $lang['lockexpire'] = 'Lock expires at'; -$lang['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.'; +$lang['js']['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.'; $lang['js']['notsavedyet'] = "Unsaved changes will be lost."; $lang['rssfailed'] = 'An error occurred while fetching this feed: '; diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index 4bb1c005d..14bc56405 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Alŝuti kiel (laŭvole)'; $lang['txt_overwrt'] = 'Anstataŭigi ekzistantan dosieron'; $lang['lockedby'] = 'Nune ŝlosita de'; $lang['lockexpire'] = 'Ŝlosado ĉesos en'; -$lang['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempkontrolon de la ŝlosado, do premu butonon "Antaŭrigardi".'; +$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempkontrolon de la ŝlosado, do premu butonon "Antaŭrigardi".'; $lang['js']['notsavedyet'] = 'Ne konservitaj modifoj perdiĝos. Ĉu vi certe volas daŭrigi la procezon?'; $lang['js']['searchmedia'] = 'Serĉi dosierojn'; diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index aad93c075..5dc6834e6 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -109,7 +109,7 @@ $lang['txt_filename'] = 'Subir como (opcional)'; $lang['txt_overwrt'] = 'Sobreescribir archivo existente'; $lang['lockedby'] = 'Actualmente bloqueado por'; $lang['lockexpire'] = 'El bloqueo expira en'; -$lang['willexpire'] = 'Tu bloqueo para editar esta página expira en un minuto.\nPara evitar conflictos usa el botón previsualizar para reiniciar el contador de tiempo.'; +$lang['js']['willexpire'] = 'Tu bloqueo para editar esta página expira en un minuto.\nPara evitar conflictos usa el botón previsualizar para reiniciar el contador de tiempo.'; $lang['js']['notsavedyet'] = 'Los cambios que no se han guardado se perderán. ¿Realmente quieres continuar?'; $lang['js']['searchmedia'] = 'Buscar archivos'; diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php index 180a50c09..66fab3f9a 100644 --- a/inc/lang/et/lang.php +++ b/inc/lang/et/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)'; $lang['txt_overwrt'] = 'Kirjutan olemasoleva faili üle'; $lang['lockedby'] = 'Praegu on selle lukustanud'; $lang['lockexpire'] = 'Lukustus aegub'; -$lang['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.'; +$lang['js']['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.'; $lang['js']['notsavedyet'] = 'Sul on seal salvestamata muudatusi, mis kohe kõige kaduva teed lähevad. Kas Sa ikka tahad edasi liikuda?'; $lang['js']['searchmedia'] = 'Otsi faile'; diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php index e49290e5e..30dfe9e5b 100644 --- a/inc/lang/eu/lang.php +++ b/inc/lang/eu/lang.php @@ -90,7 +90,7 @@ $lang['txt_filename'] = 'Idatzi wikiname-a (aukerazkoa)'; $lang['txt_overwrt'] = 'Oraingo fitxategiaren gainean idatzi'; $lang['lockedby'] = 'Momentu honetan blokeatzen:'; $lang['lockexpire'] = 'Blokeaketa iraungitzen da:'; -$lang['willexpire'] = 'Zure blokeaketa orri hau aldatzeko minutu batean iraungitzen da.\nGatazkak saihesteko, aurreikusi botoia erabili blokeaketa denboragailua berrabiarazteko.'; +$lang['js']['willexpire'] = 'Zure blokeaketa orri hau aldatzeko minutu batean iraungitzen da.\nGatazkak saihesteko, aurreikusi botoia erabili blokeaketa denboragailua berrabiarazteko.'; $lang['js']['notsavedyet'] = 'Gorde gabeko aldaketak galdu egingo dira. Benetan jarraitu nahi duzu?'; $lang['js']['searchmedia'] = 'Bilatu fitxategiak'; diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php index 96374b409..1a7467431 100644 --- a/inc/lang/fa/lang.php +++ b/inc/lang/fa/lang.php @@ -97,7 +97,7 @@ $lang['txt_filename'] = 'ارسال به صورت (اختیاری)'; $lang['txt_overwrt'] = 'بر روی فایل موجود بنویس'; $lang['lockedby'] = 'در حال حاضر قفل شده است'; $lang['lockexpire'] = 'قفل منقضی شده است'; -$lang['willexpire'] = 'حالت قفل شما مدتی است منقضی شده است \n برای جلوگیری از تداخل دکمه‌ی پیش‌نمایش را برای صفر شدن ساعت قفل بزنید.'; +$lang['js']['willexpire'] = 'حالت قفل شما مدتی است منقضی شده است \n برای جلوگیری از تداخل دکمه‌ی پیش‌نمایش را برای صفر شدن ساعت قفل بزنید.'; $lang['js']['notsavedyet'] = 'تغییرات ذخیره شده از بین خواهد رفت. می‌خواهید ادامه دهید؟'; $lang['js']['searchmedia'] = 'جستجو برای فایل'; diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index cce597fe7..a2f2e2027 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -93,7 +93,7 @@ $lang['txt_filename'] = 'Lähetä nimellä (valinnainen)'; $lang['txt_overwrt'] = 'Ylikirjoita olemassa oleva'; $lang['lockedby'] = 'Tällä hetkellä tiedoston on lukinnut'; $lang['lockexpire'] = 'Lukitus päättyy'; -$lang['willexpire'] = 'Lukituksesi tämän sivun muokkaukseen päättyy minuutin kuluttua.\nRistiriitojen välttämiseksi paina esikatselu-nappia nollataksesi lukitusajan.'; +$lang['js']['willexpire'] = 'Lukituksesi tämän sivun muokkaukseen päättyy minuutin kuluttua.\nRistiriitojen välttämiseksi paina esikatselu-nappia nollataksesi lukitusajan.'; $lang['js']['notsavedyet'] = 'Dokumentissa on tallentamattomia muutoksia, jotka häviävät. Haluatko varmasti jatkaa?'; $lang['js']['searchmedia'] = 'Etsi tiedostoja'; diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php index 3d4d0455b..4cb895f72 100644 --- a/inc/lang/fo/lang.php +++ b/inc/lang/fo/lang.php @@ -90,7 +90,7 @@ $lang['txt_filename'] = 'Sláa inn wikinavn (valfrítt)'; $lang['txt_overwrt'] = 'Yvurskriva verandi fílu'; $lang['lockedby'] = 'Fyribils læst av'; $lang['lockexpire'] = 'Lásið ferð úr gildi kl.'; -$lang['willexpire'] = 'Títt lás á hetta skjalið ferð úr gildi um ein minnutt.\nTrýst á Forskoðan-knappin fyri at sleppa undan trupulleikum.'; +$lang['js']['willexpire'] = 'Títt lás á hetta skjalið ferð úr gildi um ein minnutt.\nTrýst á Forskoðan-knappin fyri at sleppa undan trupulleikum.'; $lang['js']['notsavedyet'] = 'Tað eru gjørdar broytingar í skjalinum, um tú haldur fram vilja broytingar fara fyri skeytið. Ynskir tú at halda fram?'; $lang['js']['searchmedia'] = 'Leita eftir dátufílum'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 047019baf..ae082e9e7 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -107,7 +107,7 @@ $lang['txt_filename'] = 'Donnez un « wikiname » (optionnel) '; $lang['txt_overwrt'] = 'Écraser le fichier cible'; $lang['lockedby'] = 'Actuellement bloqué par'; $lang['lockexpire'] = 'Le blocage expire à'; -$lang['willexpire'] = 'Votre blocage pour modifier cette page expire dans une minute.\nPour éviter les conflits, utiliser le bouton « Aperçu » pour réinitialiser le minuteur.'; +$lang['js']['willexpire'] = 'Votre blocage pour modifier cette page expire dans une minute.\nPour éviter les conflits, utiliser le bouton « Aperçu » pour réinitialiser le minuteur.'; $lang['js']['notsavedyet'] = 'Les modifications non enregistrées seront perdues. Voulez-vous vraiment continuer ?'; $lang['js']['searchmedia'] = 'Chercher des fichiers'; diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php index 37cf55d22..a3caeff6d 100644 --- a/inc/lang/gl/lang.php +++ b/inc/lang/gl/lang.php @@ -89,7 +89,7 @@ $lang['txt_filename'] = 'Subir como (opcional)'; $lang['txt_overwrt'] = 'Sobrescribir arquivo existente'; $lang['lockedby'] = 'Bloqueado actualmente por'; $lang['lockexpire'] = 'O bloqueo remata o'; -$lang['willexpire'] = 'O teu bloqueo para editares esta páxina vai caducar nun minuto.\nPara de evitar conflitos, emprega o botón de previsualización para reiniciares o contador do tempo de bloqueo.'; +$lang['js']['willexpire'] = 'O teu bloqueo para editares esta páxina vai caducar nun minuto.\nPara de evitar conflitos, emprega o botón de previsualización para reiniciares o contador do tempo de bloqueo.'; $lang['js']['notsavedyet'] = "Perderanse os trocos non gardados.\nEstá certo de quereres continuar?"; $lang['rssfailed'] = 'Houbo un erro ao tentar obter esta corrente RSS: '; $lang['nothingfound'] = 'Non se atopou nada.'; diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 1a47ebcb8..589088320 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -95,7 +95,7 @@ $lang['txt_filename'] = 'העלאה בשם (נתון לבחירה)'; $lang['txt_overwrt'] = 'שכתוב על קובץ קיים'; $lang['lockedby'] = 'נעול על ידי'; $lang['lockexpire'] = 'הנעילה פגה'; -$lang['willexpire'] = 'הנעילה תחלוף עוד זמן קצר. \nלמניעת התנגשויות יש להשתמש בכפתור הרענון מטה כדי לאפס את מד משך הנעילה.'; +$lang['js']['willexpire'] = 'הנעילה תחלוף עוד זמן קצר. \nלמניעת התנגשויות יש להשתמש בכפתור הרענון מטה כדי לאפס את מד משך הנעילה.'; $lang['js']['notsavedyet'] = 'שינויים שלא נשמרו ילכו לאיבוד.'; $lang['js']['searchmedia'] = 'חיפוש אחר קבצים'; $lang['js']['keepopen'] = 'השארת חלון פתוח על הבחירה'; diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php index a76bde2e8..a85214cf7 100644 --- a/inc/lang/hr/lang.php +++ b/inc/lang/hr/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Postaviti kao (nije obavezno)'; $lang['txt_overwrt'] = 'Prepiši postojeću datoteku'; $lang['lockedby'] = 'Zaključao'; $lang['lockexpire'] = 'Zaključano do'; -$lang['willexpire'] = 'Dokument kojeg mijenjate će biti zaključan još 1 minutu.\n Ukoliko želite i dalje raditi izmjene na dokumentu - kliknite na "Pregled".'; +$lang['js']['willexpire'] = 'Dokument kojeg mijenjate će biti zaključan još 1 minutu.\n Ukoliko želite i dalje raditi izmjene na dokumentu - kliknite na "Pregled".'; $lang['js']['notsavedyet'] = 'Vaše izmjene će se izgubiti. Želite li nastaviti?'; $lang['js']['searchmedia'] = 'Traži datoteke'; diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index 35e810ff0..89ad77948 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -95,7 +95,7 @@ $lang['txt_filename'] = 'feltöltési név (elhagyható)'; $lang['txt_overwrt'] = 'Létező fájl felülírása'; $lang['lockedby'] = 'Jelenleg zárolta:'; $lang['lockexpire'] = 'A zárolás lejár:'; -$lang['willexpire'] = 'Az oldalszerkesztési zárolásod körülbelül egy percen belül lejár.\nAz ütközések elkerülése végett használd az előnézet gombot a zárolási időzítés frissítéséhez.'; +$lang['js']['willexpire'] = 'Az oldalszerkesztési zárolásod körülbelül egy percen belül lejár.\nAz ütközések elkerülése végett használd az előnézet gombot a zárolási időzítés frissítéséhez.'; $lang['js']['notsavedyet'] = 'Elmentetlen változások vannak, amelyek el fognak veszni. Tényleg ezt akarod?'; $lang['js']['searchmedia'] = 'Fájlok keresése'; diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php index bdfef88f4..abf1e6786 100644 --- a/inc/lang/ia/lang.php +++ b/inc/lang/ia/lang.php @@ -95,7 +95,7 @@ $lang['txt_filename'] = 'Incargar como (optional)'; $lang['txt_overwrt'] = 'Reimplaciar le file existente'; $lang['lockedby'] = 'Actualmente serrate per'; $lang['lockexpire'] = 'Serratura expira le'; -$lang['willexpire'] = 'Tu serratura super le modification de iste pagina expirara post un minuta.\nPro evitar conflictos, usa le button Previsualisar pro reinitialisar le timer del serratura.'; +$lang['js']['willexpire'] = 'Tu serratura super le modification de iste pagina expirara post un minuta.\nPro evitar conflictos, usa le button Previsualisar pro reinitialisar le timer del serratura.'; $lang['js']['notsavedyet'] = "Le modificationes non salveguardate essera perdite.\nRealmente continuar?"; $lang['rssfailed'] = 'Un error occurreva durante le obtention de iste syndication:'; $lang['nothingfound'] = 'Nihil ha essite trovate.'; diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php index c1480f518..e8026acee 100644 --- a/inc/lang/id/lang.php +++ b/inc/lang/id/lang.php @@ -85,7 +85,7 @@ $lang['txt_filename'] = 'Masukkan nama wiki (opsional)'; $lang['txt_overwrt'] = 'File yang telah ada akan ditindih'; $lang['lockedby'] = 'Sedang dikunci oleh'; $lang['lockexpire'] = 'Penguncian artikel sampai dengan'; -$lang['willexpire'] = 'Halaman yang sedang Anda kunci akan berakhir dalam waktu kurang lebih satu menit.\nUntuk menghindari konflik, gunakan tombol Preview untuk me-reset timer pengunci.'; +$lang['js']['willexpire'] = 'Halaman yang sedang Anda kunci akan berakhir dalam waktu kurang lebih satu menit.\nUntuk menghindari konflik, gunakan tombol Preview untuk me-reset timer pengunci.'; $lang['js']['notsavedyet'] = "Perubahan yang belum disimpan akan hilang.\nYakin akan dilanjutkan?"; $lang['rssfailed'] = 'Error terjadi saat mengambil feed: '; $lang['nothingfound'] = 'Tidak menemukan samasekali.'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 682f5b8c2..8812b148d 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -98,7 +98,7 @@ $lang['txt_filename'] = 'Carica come (opzionale)'; $lang['txt_overwrt'] = 'Sovrascrivi file esistente'; $lang['lockedby'] = 'Attualmente bloccato da'; $lang['lockexpire'] = 'Il blocco scade alle'; -$lang['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.'; +$lang['js']['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.'; $lang['js']['notsavedyet'] = 'Le modifiche non salvate andranno perse.'; $lang['js']['searchmedia'] = 'Cerca file'; $lang['js']['keepopen'] = 'Tieni la finestra aperta durante la selezione'; diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index e8999e05b..b0b93450e 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = '名前を変更してアップロード(オ $lang['txt_overwrt'] = '既存のファイルを上書き'; $lang['lockedby'] = 'この文書は次のユーザによってロックされています'; $lang['lockexpire'] = 'ロック期限:'; -$lang['willexpire'] = '編集中の文書はロック期限を過ぎようとしています。このままロックする場合は、一度文書の確認を行って期限をリセットしてください。'; +$lang['js']['willexpire'] = '編集中の文書はロック期限を過ぎようとしています。このままロックする場合は、一度文書の確認を行って期限をリセットしてください。'; $lang['js']['notsavedyet'] = '変更は保存されません。このまま処理を続けてよろしいですか?'; $lang['js']['searchmedia'] = 'ファイル検索'; $lang['js']['keepopen'] = '選択中はウィンドウを閉じない'; diff --git a/inc/lang/kk/lang.php b/inc/lang/kk/lang.php index 2b492ed1c..f9ea0bced 100644 --- a/inc/lang/kk/lang.php +++ b/inc/lang/kk/lang.php @@ -88,7 +88,7 @@ $lang['txt_filename'] = 'Келесідей еңгізу (қалауы $lang['txt_overwrt'] = 'Бар файлды қайта жазу'; $lang['lockedby'] = 'Осы уақытта тойтарылған'; $lang['lockexpire'] = 'Тойтару келесі уақытта бітеді'; -$lang['willexpire'] = 'Бұл бетті түзеу тойтаруыңыз бір минутта бітеді. Қақтығыс болмау және тойтару таймерді түсіру үшін қарап шығу пернені басыңыз.'; +$lang['js']['willexpire'] = 'Бұл бетті түзеу тойтаруыңыз бір минутта бітеді. Қақтығыс болмау және тойтару таймерді түсіру үшін қарап шығу пернені басыңыз.'; $lang['js']['notsavedyet'] = 'Сақталмаған өзгерістер жоғалатын болады.'; $lang['js']['searchmedia'] = 'Файлдарды іздеу'; $lang['js']['keepopen'] = 'Таңдаған соң терезе жаппаңыз'; diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php index 90cad3133..68587e90f 100644 --- a/inc/lang/km/lang.php +++ b/inc/lang/km/lang.php @@ -88,7 +88,7 @@ $lang['txt_filename'] = 'រុញឡើងជា (ស្រេច​ចិត $lang['txt_overwrt'] = 'កត់ពីលើ';//'Overwrite existing file'; $lang['lockedby'] = 'ឥឡូវនេះចកជាប់​'; $lang['lockexpire'] = 'សោជាប់ផុត​កំណត់ម៉ោង'; -$lang['willexpire'] = 'សោអ្នកចំពោះកែតម្រូវទំព័រនេះ ហួសពែលក្នុងមួយនាទី។\nកុំឲ្យមានជម្លោះ ប្រើ «បង្ហាញ»​ ទៅកំណត់​ឡើង​វិញ។'; +$lang['js']['willexpire'] = 'សោអ្នកចំពោះកែតម្រូវទំព័រនេះ ហួសពែលក្នុងមួយនាទី។\nកុំឲ្យមានជម្លោះ ប្រើ «បង្ហាញ»​ ទៅកំណត់​ឡើង​វិញ។'; $lang['js']['notsavedyet'] = "កម្រែមិនទានរុក្សាទកត្រូវបោះបង់។\nបន្តទៅទាឬទេ?"; $lang['rssfailed'] = 'មានកំហុសពេលទៅ​ប្រមូល​យកមតិ​ព័ត៌មាន៖ '; diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index c85a66d38..7b55ebe71 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -93,7 +93,7 @@ $lang['txt_filename'] = '업로드 파일 이름을 입력합니다.( $lang['txt_overwrt'] = '새로운 파일로 이전 파일을 교체합니다.'; $lang['lockedby'] = '현재 잠금 사용자'; $lang['lockexpire'] = '잠금 해제 시간'; -$lang['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.'; +$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.'; $lang['js']['notsavedyet'] = '저장하지 않은 변경은 지워집니다. 계속하시겠습니까?'; $lang['js']['searchmedia'] = '파일 찾기'; diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php index 9bed43cd1..63ccafa35 100644 --- a/inc/lang/ku/lang.php +++ b/inc/lang/ku/lang.php @@ -60,7 +60,7 @@ $lang['txt_filename'] = 'Enter wikiname (optional)'; $lang['txt_overwrt'] = 'Overwrite existing file'; $lang['lockedby'] = 'Currently locked by'; $lang['lockexpire'] = 'Lock expires at'; -$lang['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.'; +$lang['js']['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.'; $lang['js']['notsavedyet'] = "Unsaved changes will be lost.\nReally continue?"; diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php index d10c094f8..00312f7a1 100644 --- a/inc/lang/la/lang.php +++ b/inc/lang/la/lang.php @@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Onerare (optio):'; $lang['txt_overwrt'] = 'Documento ueteri imponere:'; $lang['lockedby'] = 'Nunc hoc intercludit'; $lang['lockexpire'] = 'Hoc apertum'; -$lang['willexpire'] = 'Interclusio paginae recensendae uno minuto finita est.\nUt errores uites, \'praeuisio\' preme ut interclusionem ripristines.'; +$lang['js']['willexpire'] = 'Interclusio paginae recensendae uno minuto finita est.\nUt errores uites, \'praeuisio\' preme ut interclusionem ripristines.'; $lang['js']['notsavedyet'] = 'Res non seruatae amissurae sunt.'; $lang['js']['searchmedia'] = 'Quaere inter documenta'; $lang['js']['keepopen'] = 'Fenestram apertam tene'; diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php index 09fc41f08..191a9bab5 100644 --- a/inc/lang/lb/lang.php +++ b/inc/lang/lb/lang.php @@ -84,7 +84,7 @@ $lang['txt_filename'] = 'Eroplueden als (optional)'; $lang['txt_overwrt'] = 'Bestehend Datei iwwerschreiwen'; $lang['lockedby'] = 'Am Moment gespaart vun'; $lang['lockexpire'] = 'D\'Spär leeft of ëm'; -$lang['willexpire'] = 'Deng Spär fir d\'Säit ze änneren leeft an enger Minutt of.\nFir Konflikter ze verhënneren, dréck op Kucken ouni ofzespäicheren.'; +$lang['js']['willexpire'] = 'Deng Spär fir d\'Säit ze änneren leeft an enger Minutt of.\nFir Konflikter ze verhënneren, dréck op Kucken ouni ofzespäicheren.'; $lang['js']['notsavedyet'] = "Net gespäicher Ännerunge gi verluer.\nWierklech weiderfueren?"; $lang['rssfailed'] = 'Et ass e Feeler virkomm beim erofluede vun dësem Feed: '; $lang['nothingfound'] = 'Näischt fond.'; diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index 6ae5f6c73..121e25308 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Įveskite wikivardą (nebūtina)'; $lang['txt_overwrt'] = 'Perrašyti egzistuojančią bylą'; $lang['lockedby'] = 'Užrakintas vartotojo'; $lang['lockexpire'] = 'Užraktas bus nuimtas'; -$lang['willexpire'] = 'Šio puslapio redagavimo užrakto galiojimo laikas baigsis po minutės.\nNorėdami išvengti nesklandumų naudokite peržiūros mygtuką ir užraktas atsinaujins.'; +$lang['js']['willexpire'] = 'Šio puslapio redagavimo užrakto galiojimo laikas baigsis po minutės.\nNorėdami išvengti nesklandumų naudokite peržiūros mygtuką ir užraktas atsinaujins.'; $lang['js']['notsavedyet'] = "Pakeitimai nebus išsaugoti.\nTikrai tęsti?"; $lang['rssfailed'] = 'Siunčiant šį feed\'ą įvyko klaida: '; $lang['nothingfound'] = 'Paieškos rezultatų nėra.'; diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 519ca231a..64e22c56a 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -89,7 +89,7 @@ $lang['txt_filename'] = 'Ievadi vikivārdu (nav obligāts)'; $lang['txt_overwrt'] = 'Aizstāt esošo failu'; $lang['lockedby'] = 'Patlaban bloķējis '; $lang['lockexpire'] = 'Bloķējums beigsies '; -$lang['willexpire'] = 'Tavs bloķējums uz šo lapu pēc minūtes beigsies.\nLai izvairītos no konflikta, nospied Iepriekšapskata pogu\n un bloķējuma laiku sāks skaitīt no jauna.'; +$lang['js']['willexpire'] = 'Tavs bloķējums uz šo lapu pēc minūtes beigsies.\nLai izvairītos no konflikta, nospied Iepriekšapskata pogu\n un bloķējuma laiku sāks skaitīt no jauna.'; $lang['js']['notsavedyet'] = 'Veiktas bet nav saglabātas izmaiņas. Vai tiešām tās nevajag?'; $lang['js']['searchmedia'] = 'Meklēt failus'; diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php index 8c95a9e02..4142f00d0 100644 --- a/inc/lang/mg/lang.php +++ b/inc/lang/mg/lang.php @@ -54,7 +54,7 @@ $lang['txt_filename'] = 'Ampidiro ny anaran\'ny wiki (tsy voatery)'; $lang['txt_overwrt'] = 'Fafana izay rakitra efa misy?'; $lang['lockedby'] = 'Mbola voahidin\'i'; $lang['lockexpire'] = 'Afaka ny hidy amin\'ny'; -$lang['willexpire'] = 'Efa ho lany fotoana afaka iray minitra ny hidy ahafahanao manova ny pejy.\nMba hialana amin\'ny conflit dia ampiasao ny bokotra topi-maso hamerenana ny timer-n\'ny hidy.'; +$lang['js']['willexpire'] = 'Efa ho lany fotoana afaka iray minitra ny hidy ahafahanao manova ny pejy.\nMba hialana amin\'ny conflit dia ampiasao ny bokotra topi-maso hamerenana ny timer-n\'ny hidy.'; $lang['js']['notsavedyet'] = "Misy fiovana tsy voarakitra, ho very izany ireo.\nAzo antoka fa hotohizana?"; $lang['rssfailed'] = 'An error occured while fetching this feed: '; diff --git a/inc/lang/mk/lang.php b/inc/lang/mk/lang.php index 456a5a3d4..b7d433092 100644 --- a/inc/lang/mk/lang.php +++ b/inc/lang/mk/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Качи како (неморално)'; $lang['txt_overwrt'] = 'Пребриши ја веќе постоечката датотека'; $lang['lockedby'] = 'Моментално заклучена од'; $lang['lockexpire'] = 'Клучот истекува на'; -$lang['willexpire'] = 'Вашиот клуч за уредување на оваа страница ќе истече за една минута.\nЗа да избегнете конфликти и да го ресетирате бројачот за време, искористете го копчето за преглед.'; +$lang['js']['willexpire'] = 'Вашиот клуч за уредување на оваа страница ќе истече за една минута.\nЗа да избегнете конфликти и да го ресетирате бројачот за време, искористете го копчето за преглед.'; $lang['js']['notsavedyet'] = "Незачуваните промени ќе бидат изгубени.\nСакате да продолжите?"; $lang['rssfailed'] = 'Се појави грешка при повлекувањето на овој канал:'; $lang['nothingfound'] = 'Ништо не е пронајдено.'; diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index d991d46cf..ae9d05bfd 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -96,7 +96,7 @@ $lang['txt_filename'] = 'अपलोड उर्फ़ ( वैकल् $lang['txt_overwrt'] = 'अस्तित्वात असलेल्या फाइलवरच सुरक्षित करा.'; $lang['lockedby'] = 'सध्या लॉक करणारा :'; $lang['lockexpire'] = 'सध्या लॉक करणारा :'; -$lang['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.'; +$lang['js']['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.'; $lang['js']['notsavedyet'] = "सुरक्षित न केलेले बदल नष्ट होतील. नक्की करू का ?"; $lang['rssfailed'] = 'ही पुरवणी आणण्यात काही चूक झाली:'; $lang['nothingfound'] = 'काही सापडला नाही.'; diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php index e5b30ceaf..53c701b23 100644 --- a/inc/lang/ne/lang.php +++ b/inc/lang/ne/lang.php @@ -89,7 +89,7 @@ $lang['txt_filename'] = 'अर्को रुपमा अपलो $lang['txt_overwrt'] = 'रहेको उहि नामको फाइललाई मेटाउने'; $lang['lockedby'] = 'अहिले ताल्चा लगाइएको'; $lang['lockexpire'] = 'ताल्चा अवधि सकिने :'; -$lang['willexpire'] = 'तपाईलले यो पृष्ठ सम्पादन गर्न लगाउनु भएको ताल्चाको अवधि एक मिनेट भित्र सकिदै छ। \n द्वन्द हुन नदिन पूर्वरुप वा ताल्चा समय परिवर्तन गर्नुहोस् ।'; +$lang['js']['willexpire'] = 'तपाईलले यो पृष्ठ सम्पादन गर्न लगाउनु भएको ताल्चाको अवधि एक मिनेट भित्र सकिदै छ। \n द्वन्द हुन नदिन पूर्वरुप वा ताल्चा समय परिवर्तन गर्नुहोस् ।'; $lang['js']['notsavedyet'] = "तपाईले वचन गर्नु नभएको परिवर्रन हराउने छ। \n साच्चै जारी गर्नुहुन्छ ।"; $lang['rssfailed'] = 'यो फिड लिइ आउदा गल्ति भयो ।'; $lang['nothingfound'] = 'केहि पनि भेटिएन ।'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 7dbde5ac8..6090babd9 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -99,7 +99,7 @@ $lang['txt_filename'] = 'Vul nieuwe naam in (optioneel)'; $lang['txt_overwrt'] = 'Overschrijf bestaand bestand'; $lang['lockedby'] = 'Momenteel in gebruik door'; $lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt op'; -$lang['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nKlik op de Voorbeeld-knop om het exclusieve gebruiksrecht te verlengen.'; +$lang['js']['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nKlik op de Voorbeeld-knop om het exclusieve gebruiksrecht te verlengen.'; $lang['js']['notsavedyet'] = 'Nog niet bewaarde wijzigingen zullen verloren gaan. Weet je zeker dat je wilt doorgaan?'; $lang['js']['searchmedia'] = 'Zoek naar bestanden'; diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php index e610db6bd..fa946ca02 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -101,7 +101,7 @@ $lang['txt_filename'] = 'Skriv inn wikinavn (alternativt)'; $lang['txt_overwrt'] = 'Overskriv eksisterende fil'; $lang['lockedby'] = 'Stengt av'; $lang['lockexpire'] = 'Avstengningen opphører'; -$lang['willexpire'] = 'Din redigeringslås for dette dokumentet kommer snart til å opphøre.\nFor å unngå versjonskonflikter bør du forhåndsvise dokumentet ditt for å forlenge redigeringslåsen.'; +$lang['js']['willexpire'] = 'Din redigeringslås for dette dokumentet kommer snart til å opphøre.\nFor å unngå versjonskonflikter bør du forhåndsvise dokumentet ditt for å forlenge redigeringslåsen.'; $lang['js']['notsavedyet'] = 'Ulagrede endringer vil gå tapt. Vil du fortsette?'; $lang['js']['searchmedia'] = 'Søk for filer'; diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index bc0509df3..32e5bf80c 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -96,7 +96,7 @@ $lang['txt_filename'] = 'Nazwa pliku (opcjonalnie)'; $lang['txt_overwrt'] = 'Nadpisać istniejący plik?'; $lang['lockedby'] = 'Aktualnie zablokowane przez'; $lang['lockexpire'] = 'Blokada wygasa'; -$lang['willexpire'] = 'Za minutę Twoja blokada tej strony wygaśnie.\nW celu uniknięcia konfliktów wyświetl podgląd aby odnowić blokadę.'; +$lang['js']['willexpire'] = 'Za minutę Twoja blokada tej strony wygaśnie.\nW celu uniknięcia konfliktów wyświetl podgląd aby odnowić blokadę.'; $lang['js']['notsavedyet'] = 'Nie zapisane zmiany zostaną utracone. Czy na pewno kontynuować?'; $lang['js']['searchmedia'] = 'Szukaj plików'; diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php index f3b012521..0abe8a6b6 100644 --- a/inc/lang/pt-br/lang.php +++ b/inc/lang/pt-br/lang.php @@ -103,7 +103,7 @@ $lang['txt_filename'] = 'Enviar como (opcional)'; $lang['txt_overwrt'] = 'Substituir o arquivo existente'; $lang['lockedby'] = 'Atualmente bloqueada por'; $lang['lockexpire'] = 'O bloqueio expira em'; -$lang['willexpire'] = 'O seu bloqueio de edição deste página irá expirar em um minuto.\nPara evitar conflitos de edição, clique no botão de visualização para reiniciar o temporizador de bloqueio.'; +$lang['js']['willexpire'] = 'O seu bloqueio de edição deste página irá expirar em um minuto.\nPara evitar conflitos de edição, clique no botão de visualização para reiniciar o temporizador de bloqueio.'; $lang['js']['notsavedyet'] = 'As alterações não salvas serão perdidas. Deseja realmente continuar?'; $lang['js']['searchmedia'] = 'Buscar por arquivos'; diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index 41406ee60..dba379df5 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Carregar como (opcional)'; $lang['txt_overwrt'] = 'Escrever por cima do ficheiro já existente'; $lang['lockedby'] = 'Bloqueado por'; $lang['lockexpire'] = 'Expira em'; -$lang['willexpire'] = 'O bloqueio de edição para este documento irá expirar num minuto.\nPara evitar conflitos de edição, clique no botão para re-iniciar o temporizador de bloqueio.'; +$lang['js']['willexpire'] = 'O bloqueio de edição para este documento irá expirar num minuto.\nPara evitar conflitos de edição, clique no botão para re-iniciar o temporizador de bloqueio.'; $lang['js']['notsavedyet'] = 'Existem alterações não gravadas, que serão perdidas se continuar. Deseja realmente continuar?'; $lang['js']['searchmedia'] = 'Procurar por ficheiros'; diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index cbecf6f6c..b8d7520e6 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Încarcă fişierul ca (opţional)'; $lang['txt_overwrt'] = 'Suprascrie fişierul existent'; $lang['lockedby'] = 'Momentan blocat de'; $lang['lockexpire'] = 'Blocarea expiră la'; -$lang['willexpire'] = 'Blocarea pentru editarea paginii expiră intr-un minut.\nPentru a preveni conflictele foloseşte butonul de previzualizare pentru resetarea blocării.'; +$lang['js']['willexpire'] = 'Blocarea pentru editarea paginii expiră intr-un minut.\nPentru a preveni conflictele foloseşte butonul de previzualizare pentru resetarea blocării.'; $lang['js']['notsavedyet'] = 'Există modificări nesalvate, care se vor pierde. Doreşti să continui?'; $lang['js']['searchmedia'] = 'Caută fişiere'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 1eaa488ec..ce9e54819 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -104,7 +104,7 @@ $lang['txt_filename'] = 'Введите имя файла в вики ( $lang['txt_overwrt'] = 'Перезаписать существующий файл'; $lang['lockedby'] = 'В данный момент заблокирован'; $lang['lockexpire'] = 'Блокировка истекает в'; -$lang['willexpire'] = 'Ваша блокировка редактирования этой страницы истекает в течение минуты.\nЧтобы избежать конфликтов и сбросить таймер блокировки, нажмите кнопку просмотра.'; +$lang['js']['willexpire'] = 'Ваша блокировка редактирования этой страницы истекает в течение минуты.\nЧтобы избежать конфликтов и сбросить таймер блокировки, нажмите кнопку просмотра.'; $lang['js']['notsavedyet'] = 'Несохранённые изменения будут потеряны. Вы действительно хотите продолжить?'; $lang['js']['searchmedia'] = 'Поиск файлов'; $lang['js']['keepopen'] = 'Не закрывать окно после выбора'; diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index 4a2520abd..4dab977b9 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Uložiť ako (voliteľné)'; $lang['txt_overwrt'] = 'Prepísať existujúci súbor'; $lang['lockedby'] = 'Práve zamknuté:'; $lang['lockexpire'] = 'Zámok stratí platnosť:'; -$lang['willexpire'] = 'Váš zámok pre editáciu za chvíľu stratí platnosť.\nAby ste predišli konfliktom, stlačte tlačítko Náhľad a zámok sa predĺži.'; +$lang['js']['willexpire'] = 'Váš zámok pre editáciu za chvíľu stratí platnosť.\nAby ste predišli konfliktom, stlačte tlačítko Náhľad a zámok sa predĺži.'; $lang['js']['notsavedyet'] = 'Neuložené zmeny budú stratené. Chcete naozaj pokračovať?'; $lang['js']['searchmedia'] = 'Hľadať súbory'; diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index 0e6c0a706..55c895b2d 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -93,7 +93,7 @@ $lang['txt_filename'] = 'Pošlji z imenom (izborno)'; $lang['txt_overwrt'] = 'Prepiši obstoječo datoteko'; $lang['lockedby'] = 'Trenutno je zaklenjeno s strani'; $lang['lockexpire'] = 'Zaklep preteče ob'; -$lang['willexpire'] = 'Zaklep za urejevanje bo pretekel čez eno minuto.\nV izogib sporom, uporabite predogled, da se merilnik časa za zaklep ponastavi.'; +$lang['js']['willexpire'] = 'Zaklep za urejevanje bo pretekel čez eno minuto.\nV izogib sporom, uporabite predogled, da se merilnik časa za zaklep ponastavi.'; $lang['js']['notsavedyet'] = 'Neshranjene spremembe bodo izgubljene.'; $lang['js']['searchmedia'] = 'Poišči datoteke'; $lang['js']['keepopen'] = 'Od izbiri ohrani okno odprto'; diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php index 47a54d2ea..ea2f018b3 100644 --- a/inc/lang/sq/lang.php +++ b/inc/lang/sq/lang.php @@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Ngarko si (alternative)'; $lang['txt_overwrt'] = 'Zëvendëso skedarin ekzistues'; $lang['lockedby'] = 'Kyçur momentalisht nga'; $lang['lockexpire'] = 'Kyçi skadon në'; -$lang['willexpire'] = 'Kyçi juaj për redaktimin e kësaj faqeje është duke skaduar.\nPër të shmangur konflikte përdorni butonin Shiko Paraprakisht për të rivendosur kohën e kyçjes.'; +$lang['js']['willexpire'] = 'Kyçi juaj për redaktimin e kësaj faqeje është duke skaduar.\nPër të shmangur konflikte përdorni butonin Shiko Paraprakisht për të rivendosur kohën e kyçjes.'; $lang['js']['notsavedyet'] = "Ndryshimet e paruajtura do të humbasin.\nVazhdo me të vërtetë?"; $lang['rssfailed'] = 'Ndoshi një gabim gjatë kapjes së këtij lajmi:'; $lang['nothingfound'] = 'Nuk u gjet asgjë.'; diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index b35956f03..a868f1d81 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -91,7 +91,7 @@ $lang['txt_filename'] = 'Унесите вики-име (опционо $lang['txt_overwrt'] = 'Препишите тренутни фајл'; $lang['lockedby'] = 'Тренутно закључано од стране'; $lang['lockexpire'] = 'Закључавање истиче'; -$lang['willexpire'] = 'Ваше закључавање за измену ове странице ће да истекне за један минут.\nДа би сте избегли конфликте, искористите дугме за преглед како би сте ресетовали тајмер закључавања.'; +$lang['js']['willexpire'] = 'Ваше закључавање за измену ове странице ће да истекне за један минут.\nДа би сте избегли конфликте, искористите дугме за преглед како би сте ресетовали тајмер закључавања.'; $lang['js']['notsavedyet'] = 'Несачуване измене ће бити изгубљене. Да ли стварно желите да наставите?'; $lang['js']['searchmedia'] = 'Потражи фајлове'; diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 06b21afe8..d6f90a5f4 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -102,7 +102,7 @@ $lang['txt_filename'] = 'Ladda upp som (ej obligatoriskt)'; $lang['txt_overwrt'] = 'Skriv över befintlig fil'; $lang['lockedby'] = 'Låst av'; $lang['lockexpire'] = 'Lås upphör att gälla'; -$lang['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.'; +$lang['js']['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.'; $lang['js']['notsavedyet'] = 'Det finns ändringar som inte är sparade. Är du säker på att du vill fortsätta?'; $lang['js']['searchmedia'] = 'Sök efter filer'; diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php index d40f30f4a..e9dffa2c1 100644 --- a/inc/lang/th/lang.php +++ b/inc/lang/th/lang.php @@ -100,7 +100,7 @@ $lang['txt_filename'] = 'อัพโหลดเป็น(ตัวเ $lang['txt_overwrt'] = 'เขียนทับไฟล์ที่มีอยู่แล้ว'; $lang['lockedby'] = 'ตอนนี้ถูกล๊อคโดย'; $lang['lockexpire'] = 'การล๊อคจะหมดอายุเมื่อ'; -$lang['willexpire'] = 'การล๊อคเพื่อแก้ไขหน้านี้กำลังจะหมดเวลาในอีก \n นาที เพื่อที่จะหลีกเลี่ยงข้อขัดแย้งให้ใช้ปุ่ม "Preview" เพื่อรีเซ็ทเวลาใหม่'; +$lang['js']['willexpire'] = 'การล๊อคเพื่อแก้ไขหน้านี้กำลังจะหมดเวลาในอีก \n นาที เพื่อที่จะหลีกเลี่ยงข้อขัดแย้งให้ใช้ปุ่ม "Preview" เพื่อรีเซ็ทเวลาใหม่'; $lang['js']['notsavedyet'] = "การแก้ไขที่ไม่ได้บันทึกจะสูญหาย \n ต้องการทำต่อจริงๆหรือ?"; $lang['rssfailed'] = 'มีข้อผิดพลาดขณะดูดฟีดนี้'; $lang['nothingfound'] = 'ไม่พบสิ่งใด'; diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index 0509113b0..0b76a6e81 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -93,7 +93,7 @@ $lang['txt_filename'] = 'Dosya adı (zorunlu değil)'; $lang['txt_overwrt'] = 'Mevcut dosyanın üstüne yaz'; $lang['lockedby'] = 'Şu an şunun tarafından kilitli:'; $lang['lockexpire'] = 'Kilitin açılma tarihi:'; -$lang['willexpire'] = 'Bu sayfayı değiştirme kilidinin süresi yaklaşık bir dakika içinde geçecek.\nÇakışmaları önlemek için önizleme tuşunu kullanarak kilit sayacını sıfırla.'; +$lang['js']['willexpire'] = 'Bu sayfayı değiştirme kilidinin süresi yaklaşık bir dakika içinde geçecek.\nÇakışmaları önlemek için önizleme tuşunu kullanarak kilit sayacını sıfırla.'; $lang['js']['notsavedyet'] = 'Kaydedilmemiş değişiklikler kaybolacak. Devam etmek istiyor musunuz?'; $lang['js']['searchmedia'] = 'Dosyalar için Ara'; diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 7bda02501..6b80bc75c 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Завантажити як (не обов\'я $lang['txt_overwrt'] = 'Перезаписати існуючий файл'; $lang['lockedby'] = 'Заблоковано'; $lang['lockexpire'] = 'Блокування завершується в'; -$lang['willexpire'] = 'Блокування редагування цієї сторінки закінчується через хвилину.\n Щоб уникнути конфліктів використовуйте кнопку перегляду для продовження блокування.'; +$lang['js']['willexpire'] = 'Блокування редагування цієї сторінки закінчується через хвилину.\n Щоб уникнути конфліктів використовуйте кнопку перегляду для продовження блокування.'; $lang['js']['notsavedyet'] = 'Незбережені зміни будуть втрачені. Дійсно продовжити?'; $lang['js']['searchmedia'] = 'Шукати файли'; diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index 89c9e9cfc..361e51e84 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -49,7 +49,7 @@ $lang['txt_upload'] = 'Chọn tệp để tải lên'; $lang['txt_filename'] = 'Điền wikiname (tuỳ ý)'; $lang['lockedby'] = 'Đang khoá bởi'; $lang['lockexpire'] = 'Khoá sẽ hết hạn vào lúc'; -$lang['willexpire'] = 'Khoá của bạn để biên soạn trang này sẽ hết hạn trong vòng 1 phút.\nĐể tránh xung đột, bạn nên bấm nút xem trước để lập lại thời gian khoá'; +$lang['js']['willexpire'] = 'Khoá của bạn để biên soạn trang này sẽ hết hạn trong vòng 1 phút.\nĐể tránh xung đột, bạn nên bấm nút xem trước để lập lại thời gian khoá'; $lang['js']['notsavedyet'] = "Hiện có những thay đổi chưa được bảo lưu, và sẽ mất.\nBạn thật sự muốn tiếp tục?"; $lang['rssfailed'] = 'Rút nguồn này gặp phải lỗi'; diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 074c510e9..2222125f5 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -95,7 +95,7 @@ $lang['txt_filename'] = '請輸入要存在維基內的檔案名稱 ( $lang['txt_overwrt'] = '是否要覆蓋原有檔案'; $lang['lockedby'] = '目前已被下列人員鎖定'; $lang['lockexpire'] = '預計解除鎖定於'; -$lang['willexpire'] = '本頁的編輯鎖定將在一分鐘內到期。要避免發生衝突,請按「預覽」鍵重設鎖定計時。'; +$lang['js']['willexpire'] = '本頁的編輯鎖定將在一分鐘內到期。要避免發生衝突,請按「預覽」鍵重設鎖定計時。'; $lang['js']['notsavedyet'] = '未儲存的變更將會遺失,繼續嗎?'; $lang['js']['searchmedia'] = '搜尋檔案'; $lang['js']['keepopen'] = '選擇時保持視窗開啟'; diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 14c92c4b3..31e6dc238 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -98,7 +98,7 @@ $lang['txt_filename'] = '上传并重命名为(可选)'; $lang['txt_overwrt'] = '覆盖已存在的同名文件'; $lang['lockedby'] = '目前已被下列人员锁定'; $lang['lockexpire'] = '预计锁定解除于'; -$lang['willexpire'] = '您对本页的独有编辑权将于一分钟之后解除。\n为了防止与其他人的编辑冲突,请使用预览按钮重设计时器。'; +$lang['js']['willexpire'] = '您对本页的独有编辑权将于一分钟之后解除。\n为了防止与其他人的编辑冲突,请使用预览按钮重设计时器。'; $lang['js']['notsavedyet'] = '未保存的更改将丢失。 真的要继续?'; $lang['js']['searchmedia'] = '查找文件'; diff --git a/lib/exe/js.php b/lib/exe/js.php index 0e0a22d42..e96d45ee6 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -109,7 +109,7 @@ function js_out(){ js_runonstart("addEvent(document,'click',closePopups)"); js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ - js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].", 'wiki__text')"); + js_runonstart("dw_locktimer.init(".($conf['locktime'] - 60).",".$conf['usedraft'].")"); } // init hotkeys - must have been done after init of toolbar # disabled for FS#1958 js_runonstart('initializeHotkeys()'); diff --git a/lib/scripts/locktimer.js b/lib/scripts/locktimer.js index 60508a8e7..b83840557 100644 --- a/lib/scripts/locktimer.js +++ b/lib/scripts/locktimer.js @@ -1,64 +1,62 @@ /** -* Class managing the timer to display a warning on a expiring lock -*/ -var locktimer = { - sack: null, + * Class managing the timer to display a warning on a expiring lock + */ +var dw_locktimer = { timeout: 0, + draft: false, timerID: null, lasttime: null, msg: '', pageid: '', - init: function(timeout,msg,draft,edid){ - var edit = $(edid); - if(!edit) return; - if(edit.readOnly) return; + /** + * Initialize the lock timer + * + * @param int timeout Lenght of timeout in seconds + * @param bool draft save drafts + */ + init: function(timeout,draft){ //FIXME which elements to pass here? + var $edit = jQuery('#wiki__text'); + if(!$edit.length) return; + if($edit.attr('readonly')) return; // init values - this.timeout = timeout*1000; - this.msg = msg; - this.draft = draft; - this.lasttime = new Date(); + dw_locktimer.timeout = timeout*1000; + dw_locktimer.draft = draft; + dw_locktimer.lasttime = new Date(); - if(jQuery('#dw__editform').length == 0) return; - this.pageid = jQuery('#dw__editform input[name=id]').val(); - if(!this.pageid) return; - - if(jQuery('#wiki__text').attr('readonly')) return; + dw_locktimer.pageid = jQuery('#dw__editform input[name=id]').val(); + if(!dw_locktimer.pageid) return; // register refresh event - jQuery('#dw__editform').keypress( - function() { - locktimer.refresh(); - } - ); + jQuery('#wiki__text').keypress(dw_locktimer.refresh); // start timer - this.reset(); + dw_locktimer.reset(); }, /** * (Re)start the warning timer */ reset: function(){ - this.clear(); - this.timerID = window.setTimeout("locktimer.warning()", this.timeout); + dw_locktimer.clear(); + dw_locktimer.timerID = window.setTimeout(dw_locktimer.warning, dw_locktimer.timeout); }, /** * Display the warning about the expiring lock */ warning: function(){ - this.clear(); - alert(this.msg); + dw_locktimer.clear(); + alert(LANG.willexpire.replace(/\\n/,"\n")); }, /** * Remove the current warning timer */ clear: function(){ - if(this.timerID !== null){ - window.clearTimeout(this.timerID); - this.timerID = null; + if(dw_locktimer.timerID !== null){ + window.clearTimeout(dw_locktimer.timerID); + dw_locktimer.timerID = null; } }, @@ -71,11 +69,11 @@ var locktimer = { var now = new Date(); var params = {}; // refresh every minute only - if(now.getTime() - this.lasttime.getTime() > 30*1000){ + if(now.getTime() - dw_locktimer.lasttime.getTime() > 30*1000){ params['call'] = 'lock'; - params['id'] = locktimer.pageid; + params['id'] = dw_locktimer.pageid; - if(locktimer.draft && jQuery('#dw__editform textarea[name=wikitext]').length > 0){ + if(dw_locktimer.draft && jQuery('#dw__editform textarea[name=wikitext]').length > 0){ params['prefix'] = jQuery('#dw__editform input[name=prefix]').val(); params['wikitext'] = jQuery('#dw__editform textarea[name=wikitext]').val(); params['suffix'] = jQuery('#dw__editform input[name=suffix]').val(); @@ -87,12 +85,10 @@ var locktimer = { jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', params, - function (data) { - locktimer.refreshed(data); - }, + dw_locktimer.refreshed, 'html' ); - this.lasttime = now; + dw_locktimer.lasttime = now; } }, @@ -105,6 +101,6 @@ var locktimer = { jQuery('#draft__status').html(data); if(error != '1') return; // locking failed - this.reset(); + dw_locktimer.reset(); } }; -- cgit v1.2.3 From eea912192ec9661fe82639db9442586954f6932e Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 19 Aug 2011 12:10:36 +0200 Subject: Fix popup DOM element sharing, simplify event handling --- lib/scripts/page.js | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/lib/scripts/page.js b/lib/scripts/page.js index 189c1f148..f5d84e239 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -50,36 +50,24 @@ dw_page = { */ insituPopup: function(target, popup_id) { // get or create the popup div - var $fndiv = jQuery('#popup_id'); + var $fndiv = jQuery('#' + popup_id); // popup doesn't exist, yet -> create it - if(!$fndiv.length){ + if($fndiv.length === 0){ $fndiv = jQuery(document.createElement('div')) .attr('id', popup_id) .addClass('insitu-footnote JSpopup') - .mouseout(function(e){ - // autoclose on mouseout - ignoring bubbled up events - //FIXME can this made simpler in jQuery? - var p = e.relatedTarget || e.toElement; - while (p && p !== this) { - p = p.parentNode; - } - if (p === this) { - return; - } - jQuery(this).hide(); - }); - + .mouseleave(function () {jQuery(this).hide();}); jQuery('div.dokuwiki:first').append($fndiv); } - $fndiv.position({ + // position() does not support hidden elements + $fndiv.show().position({ my: 'left top', at: 'left center', of: target - }); + }).hide(); - $fndiv.hide(); return $fndiv; }, @@ -90,7 +78,7 @@ dw_page = { * @author Chris Smith */ footnoteDisplay: function(e){ - var $fndiv = dw_page.insituPopup(e.target, 'insitu__fn'); + var $fndiv = dw_page.insituPopup(this, 'insitu__fn'); // locate the footnote anchor element var $a = jQuery("#fn__" + e.target.id.substr(5)); -- cgit v1.2.3 From 2c5ba7b2e80436af80001c436908217885ce4be3 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 19 Aug 2011 13:03:38 +0200 Subject: jQuerify edit section highlighting --- lib/scripts/page.js | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/scripts/page.js b/lib/scripts/page.js index f5d84e239..05c5ece20 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -19,24 +19,20 @@ dw_page = { */ sectionHighlight: function() { jQuery('form.btn_secedit') - .mouseover(function(e){ - var tgt = this.parentNode; - var nr = tgt.className.match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2]; - do { - tgt = tgt.previousSibling; - } while (tgt !== null && typeof tgt.tagName === 'undefined'); - if (tgt === null) return; - while(typeof tgt.className === 'undefined' || - tgt.className.match('(\\s+|^)sectionedit' + nr + '(\\s+|$)') === null) { - if (typeof tgt.className !== 'undefined') { - jQuery(tgt).addClass('section_highlight'); - } - tgt = (tgt.previousSibling !== null) ? tgt.previousSibling : tgt.parentNode; - } + .mouseover(function(){ + var $tgt = jQuery(this).parent(); + var nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2]; - jQuery(tgt).addClass('section_highlight'); + // Walk the DOM tree up (first previous siblings, then parents) + // until boundary element + while($tgt.length > 0 && !$tgt.hasClass('sectionedit' + nr)) { + // $.last gives the DOM-ordered last element: + // prev if present, else parent. + $tgt = $tgt.prev().add($tgt.parent()).last(); + $tgt.addClass('section_highlight'); + } }) - .mouseout(function(e){ + .mouseout(function(){ jQuery('.section_highlight').removeClass('section_highlight'); }); }, -- cgit v1.2.3 From 38331508a78e955e63596e778f863996dfa7763b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 13:06:25 +0200 Subject: jqueryized diff checkbox script --- lib/scripts/behaviour.js | 30 ++++++++++++++++++++++++++++++ lib/scripts/script.js | 28 ---------------------------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 0f69d5721..1580ae86f 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -18,6 +18,11 @@ var dw_behaviour = { dw_behaviour.checkWindowsShares(); dw_behaviour.initTocToggle(); dw_behaviour.subscription(); + + dw_behaviour.revisionBoxHandler(); + jQuery('#page__revisions input[type=checkbox]').click( + dw_behaviour.revisionBoxHandler + ); }, /** @@ -143,7 +148,32 @@ var dw_behaviour = { ) .filter(':checked') .click(); + }, + + /** + * disable multiple revisions checkboxes if two are checked + * + * @author Andreas Gohr + */ + revisionBoxHandler: function(){ + var $checked = jQuery('#page__revisions input[type=checkbox]:checked'); + var $all = jQuery('#page__revisions input[type=checkbox]'); + + if($checked.length < 2){ + $all.attr('disabled',false); + jQuery('#page__revisions input[type=submit]').attr('disabled',true); + }else{ + $all.attr('disabled',true); + jQuery('#page__revisions input[type=submit]').attr('disabled',false); + for(var i=0; i<$checked.length; i++){ + $checked[i].disabled = false; + if(i>1){ + $checked[i].checked = false; + } + } + } } + }; /** diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 3e2ec4f89..caa2a107c 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -187,32 +187,4 @@ function closePopups(){ jQuery('div.JSpopup').hide(); } -/** - * disable multiple revisions checkboxes if two are checked - * - * @author Anika Henke - */ -addInitEvent(function(){ - var revForm = $('page__revisions'); - if (!revForm) return; - var elems = revForm.elements; - var countTicks = 0; - for (var i=0; i= 2) input2.disabled = (input2.type=='checkbox' && !input2.checked); - else input2.disabled = (input2.type!='checkbox'); - } - }); - input1.checked = false; // chrome reselects on back button which messes up the logic - } else if(input1.type=='submit'){ - input1.disabled = true; - } - } -}); -- cgit v1.2.3 From 26fc53c6a8fe022cd60b5df5474cfbe35afd34e4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 15:40:58 +0200 Subject: moved more stuff out from script.js the file is nearly empty now --- lib/scripts/compatibility.js | 87 +++++++++++++++++++++ lib/scripts/helpers.js | 178 ++++++++++++++++++++++++++----------------- lib/scripts/script.js | 128 ------------------------------- 3 files changed, 197 insertions(+), 196 deletions(-) diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js index a5cc87e58..ddc8823d3 100644 --- a/lib/scripts/compatibility.js +++ b/lib/scripts/compatibility.js @@ -1,6 +1,78 @@ /*jslint sloppy: true */ /*global dw_index, dw_qsearch, DEPRECATED_WRAP */ +/** + * Mark a JavaScript function as deprecated + * + * This will print a warning to the JavaScript console (if available) in + * Firebug and Chrome and a stack trace (if available) to easily locate the + * problematic function call. + * + * @param msg optional message to print + */ +function DEPRECATED(msg){ + if(!window.console) return; + if(!msg) msg = ''; + + var func; + if(arguments.callee) func = arguments.callee.caller.name; + if(func) func = ' '+func+'()'; + var line = 'DEPRECATED function call'+func+'. '+msg; + + if(console.warn){ + console.warn(line); + }else{ + console.log(line); + } + + if(console.trace) console.trace(); +} + +/** + * Construct a wrapper function for deprecated function names + * + * This function returns a wrapper function which just calls DEPRECATED + * and the new function. + * + * @param func The new function + * @param context Optional; The context (`this`) of the call + */ +function DEPRECATED_WRAP(func, context) { + return function () { + DEPRECATED(); + return func.apply(context || this, arguments); + } +} + +/** + * Handy shortcut to document.getElementById + * + * This function was taken from the prototype library + * + * @link http://prototype.conio.net/ + */ +function $() { + DEPRECATED('Please use the JQuery() function instead.'); + + var elements = new Array(); + + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') + element = document.getElementById(element); + + if (arguments.length == 1) + return element; + + elements.push(element); + } + + return elements; +} + + + + var index = { throbber_delay: dw_index.throbber_delay, toggle: DEPRECATED_WRAP(dw_index.toggle, dw_index), @@ -123,3 +195,18 @@ function addInitEvent(func) { jQuery(func); } + +function jsEscape(text){ + DEPRECATED('Insert text through jQuery.text() instead of escaping on your own'); + var re=new RegExp("\\\\","g"); + text=text.replace(re,"\\\\"); + re=new RegExp("'","g"); + text=text.replace(re,"\\'"); + re=new RegExp('"',"g"); + text=text.replace(re,'"'); + re=new RegExp("\\\\\\\\n","g"); + text=text.replace(re,"\\n"); + return text; +} + + diff --git a/lib/scripts/helpers.js b/lib/scripts/helpers.js index b286965cf..b0f76cdb0 100644 --- a/lib/scripts/helpers.js +++ b/lib/scripts/helpers.js @@ -1,134 +1,161 @@ /** - * Differrent helper functions + * Various helper functions + */ + + +/** + * Simple function to check if a global var is defined * - * @author Ilya Lebedev - * @license LGPL + * @author Kae Verens + * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835 */ -//----------------------------------------------------------------------------- -// Variable/property checks -//----------------------------------------------------------------------------- +function isset(varname){ + return(typeof(window[varname])!='undefined'); +} + /** - * Checks if property is undefined + * Checks if property is undefined * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isUndefined (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'undefined'); + return (typeof prop == 'undefined'); } + /** - * Checks if property is function + * Checks if property is function * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isFunction (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'function'); + return (typeof prop == 'function'); } /** - * Checks if property is string + * Checks if property is string * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isString (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'string'); + return (typeof prop == 'string'); } + /** - * Checks if property is number + * Checks if property is number * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isNumber (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'number'); + return (typeof prop == 'number'); } + /** - * Checks if property is the calculable number + * Checks if property is the calculable number * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isNumeric (prop /* :Object */) /* :Boolean */ { - return isNumber(prop)&&!isNaN(prop)&&isFinite(prop); + return isNumber(prop)&&!isNaN(prop)&&isFinite(prop); } + /** - * Checks if property is array + * Checks if property is array * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isArray (prop /* :Object */) /* :Boolean */ { - return (prop instanceof Array); + return (prop instanceof Array); } + /** * Checks if property is regexp * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isRegExp (prop /* :Object */) /* :Boolean */ { - return (prop instanceof RegExp); + return (prop instanceof RegExp); } + /** - * Checks if property is a boolean value + * Checks if property is a boolean value * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isBoolean (prop /* :Object */) /* :Boolean */ { - return ('boolean' == typeof prop); + return ('boolean' == typeof prop); } + /** - * Checks if property is a scalar value (value that could be used as the hash key) + * Checks if property is a scalar value (value that could be used as the hash key) * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isScalar (prop /* :Object */) /* :Boolean */ { - return isNumeric(prop)||isString(prop); + return isNumeric(prop)||isString(prop); } + /** - * Checks if property is empty + * Checks if property is empty * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev */ function isEmpty (prop /* :Object */) /* :Boolean */ { - if (isBoolean(prop)) return false; - if (isRegExp(prop) && new RegExp("").toString() == prop.toString()) return true; - if (isString(prop) || isNumber(prop)) return !prop; - if (Boolean(prop)&&false != prop) { - for (var i in prop) if(prop.hasOwnProperty(i)) return false; - } - return true; + if (isBoolean(prop)) return false; + if (isRegExp(prop) && new RegExp("").toString() == prop.toString()) return true; + if (isString(prop) || isNumber(prop)) return !prop; + if (Boolean(prop)&&false != prop) { + for (var i in prop) if(prop.hasOwnProperty(i)) return false; + } + return true; } /** - * Checks if property is derived from prototype, applies method if it is not exists + * Checks if property is derived from prototype, applies method if it is not exists * - * @param string property name - * @return bool true if prototyped - * @access public + * @param string property name + * @return bool true if prototyped + * @access public + * @author Ilya Lebedev */ if ('undefined' == typeof Object.hasOwnProperty) { - Object.prototype.hasOwnProperty = function (prop) { - return !('undefined' == typeof this[prop] || this.constructor && this.constructor.prototype[prop] && this[prop] === this.constructor.prototype[prop]); - }; + Object.prototype.hasOwnProperty = function (prop) { + return !('undefined' == typeof this[prop] || this.constructor && this.constructor.prototype[prop] && this[prop] === this.constructor.prototype[prop]); + }; } /** * Very simplistic Flash plugin check, probably works for Flash 8 and higher only + * + * @author Andreas Gohr */ function hasFlash(version){ var ver = 0; @@ -192,3 +219,18 @@ function bind(fnc/*, ... */) { static_args.concat(Aps.call(arguments, 0))); }; } + +/** + * Get the computed style of a node. + * + * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/ + * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js + */ +function gcs(node){ + if(node.currentStyle){ + return node.currentStyle; + }else{ + return node.ownerDocument.defaultView.getComputedStyle(node, null); + } +} + diff --git a/lib/scripts/script.js b/lib/scripts/script.js index caa2a107c..8db223d61 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -3,53 +3,6 @@ if ('function' === typeof jQuery && 'function' === typeof jQuery.noConflict) { jQuery.noConflict(); } -/** - * Mark a JavaScript function as deprecated - * - * This will print a warning to the JavaScript console (if available) in - * Firebug and Chrome and a stack trace (if available) to easily locate the - * problematic function call. - * - * @param msg optional message to print - */ -function DEPRECATED(msg){ - if(!window.console) return; - if(!msg) msg = ''; - - var func; - if(arguments.callee) func = arguments.callee.caller.name; - if(func) func = ' '+func+'()'; - var line = 'DEPRECATED function call'+func+'. '+msg; - - if(console.warn){ - console.warn(line); - }else{ - console.log(line); - } - - if(console.trace) console.trace(); -} - -/** - * Construct a wrapper function for deprecated function names - * - * This function returns a wrapper function which just calls DEPRECATED - * and the new function. - * - * @param func The new function - * @param context Optional; The context (`this`) of the call - */ -function DEPRECATED_WRAP(func, context) { - return function () { - DEPRECATED(); - return func.apply(context || this, arguments); - } -} - -/** - * Some of these scripts were taken from wikipedia.org and were modified for DokuWiki - */ - /** * Some browser detection */ @@ -65,87 +18,6 @@ if (clientPC.indexOf('opera')!=-1) { var is_opera_seven = (window.opera && document.childNodes); } -/** - * Handy shortcut to document.getElementById - * - * This function was taken from the prototype library - * - * @link http://prototype.conio.net/ - */ -function $() { - DEPRECATED('Please use the JQuery() function instead.'); - - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} - -/** - * Simple function to check if a global var is defined - * - * @author Kae Verens - * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835 - */ -function isset(varname){ - return(typeof(window[varname])!='undefined'); -} - -/** - * Get the computed style of a node. - * - * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/ - * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js - */ -function gcs(node){ - if(node.currentStyle){ - return node.currentStyle; - }else{ - return node.ownerDocument.defaultView.getComputedStyle(node, null); - } -} - -/** - * Escape special chars in JavaScript - * - * @author Andreas Gohr - */ -function jsEscape(text){ - var re=new RegExp("\\\\","g"); - text=text.replace(re,"\\\\"); - re=new RegExp("'","g"); - text=text.replace(re,"\\'"); - re=new RegExp('"',"g"); - text=text.replace(re,'"'); - re=new RegExp("\\\\\\\\n","g"); - text=text.replace(re,"\\n"); - return text; -} - -/** - * This function escapes some special chars - * @deprecated by above function - */ -function escapeQuotes(text) { - var re=new RegExp("'","g"); - text=text.replace(re,"\\'"); - re=new RegExp('"',"g"); - text=text.replace(re,'"'); - re=new RegExp("\\n","g"); - text=text.replace(re,"\\n"); - return text; -} - /** * Prints a animated gif to show the search is performed * -- cgit v1.2.3 From 9e4f7880b1e2dfece064b313f5ad1c56b0fdc3d6 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 19 Aug 2011 15:48:22 +0200 Subject: Fix tree HTML (closes FS#2299) --- inc/html.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/inc/html.php b/inc/html.php index 64999ed98..6e9cce7df 100644 --- a/inc/html.php +++ b/inc/html.php @@ -782,16 +782,17 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default'){ return ''; } - $level = $data[0]['level']; - $opens = 0; + $start_level = $data[0]['level']; $ret = ''; - if ($level < 2) { + if ($start_level < 2) { // Trigger building a wrapper ul if the first level is // 0 (we have a root object) or 1 (just the root content) - --$level; + --$start_level; } + $level = $start_level; + foreach ($data as $item){ if( $item['level'] > $level ){ @@ -824,7 +825,7 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default'){ } //close remaining items and lists - for ($i=0; $i < $level; $i++){ + while(--$level >= $start_level) { $ret .= "\n"; } -- cgit v1.2.3 From c5f927421e944bfe2ed61a7d50177e7a04c7a079 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 19 Aug 2011 16:10:08 +0200 Subject: Don't delete meta files when pages are deleted, fixes FS#2301 As we need to keep all core meta files anyway (the only core file that had been deleted but shouldn't be deleted is the .indexed file) and plugins can keep care of their own metadata files using the IO_WIKIPAGE_WRITE event there is no reason for using the expensive metaFiles() function during the deletion of pages. --- inc/common.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/inc/common.php b/inc/common.php index 7522095ab..239cfcf99 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1007,16 +1007,8 @@ function saveWikiText($id,$text,$summary,$minor=false){ $newRev = saveOldRevision($id); // remove empty file @unlink($file); - // remove old meta info... - $mfiles = metaFiles($id); - $changelog = metaFN($id, '.changes'); - $metadata = metaFN($id, '.meta'); - $subscribers = metaFN($id, '.mlist'); - foreach ($mfiles as $mfile) { - // but keep per-page changelog to preserve page history, keep subscriber list and keep meta data - if (@file_exists($mfile) && $mfile!==$changelog && $mfile!==$metadata && $mfile!==$subscribers) { @unlink($mfile); } - } - // purge meta data + // don't remove old meta info as it should be saved, plugins can use IO_WIKIPAGE_WRITE for removing their metadata... + // purge non-persistant meta data p_purge_metadata($id); $del = true; // autoset summary on deletion -- cgit v1.2.3 From 2b580f7af6af343aef14df02fb81a9ba382ae41a Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 19 Aug 2011 15:55:32 +0200 Subject: jQuerify acl plugin JavaScript --- lib/plugins/acl/admin.php | 3 +- lib/plugins/acl/script.js | 163 ++++++++++++++++++++-------------------------- lib/plugins/acl/style.css | 1 + 3 files changed, 74 insertions(+), 93 deletions(-) diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 7c12b3374..53f6db0cc 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -540,7 +540,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { function _html_li_acl($item){ - return '
  • '; + return '
  • '; } diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js index 5b6c9ce1b..4fc97aeb5 100644 --- a/lib/plugins/acl/script.js +++ b/lib/plugins/acl/script.js @@ -3,16 +3,44 @@ * * @author Andreas Gohr */ -acl = { +var dw_acl = { /** * Initialize the object and attach the event handlers */ - init: function(){ - if(!jQuery('#acl_manager').length) return; //FIXME only one underscore!! + init: function () { + var $tree; - jQuery('#acl__user select').change(acl.userselhandler); - jQuery('#acl__tree').click(acl.treehandler); - jQuery('#acl__user input[type=submit]').click(acl.loadinfo); + //FIXME only one underscore!! + if (jQuery('#acl_manager').length === 0) { + return; + } + + jQuery('#acl__user select').change(dw_acl.userselhandler); + jQuery('#acl__user input[type=submit]').click(dw_acl.loadinfo); + + $tree = jQuery('#acl__tree'); + $tree.dw_tree({toggle_selector: 'img', + load_data: function (show_sublist, $clicky) { + // get the enclosed link and the edit form + var $frm = jQuery('#acl__detail form'); + + jQuery.post( + DOKU_BASE + 'lib/plugins/acl/ajax.php', + jQuery.extend(dw_acl.parseatt($clicky.parent().find('a')[0].search), + {ajax: 'tree', + current_ns: $frm.find('input[name=ns]').val(), + current_id: $frm.find('input[name=id]').val()}), + show_sublist, + 'html' + ); + }, + + toggle_display: function ($clicky, opening) { + $clicky.attr('src', + DOKU_BASE + 'lib/images/' + + (opening ? 'minus' : 'plus') + '.gif'); + }}); + $tree.delegate('a', 'click', dw_acl.treehandler); }, /** @@ -21,32 +49,20 @@ acl = { * Hides or shows the user/group entry box depending on what was selected in the * dropdown element */ - userselhandler: function(e){ + userselhandler: function () { // make entry field visible/invisible - if(this.value == '__g__' || this.value == '__u__'){ - jQuery('#acl__user input').show(); - }else{ - jQuery('#acl__user input').hide(); - } - acl.loadinfo(); + jQuery('#acl__user input').toggle(this.value === '__g__' || + this.value === '__u__'); + dw_acl.loadinfo(); }, /** * Load the current permission info and edit form */ - loadinfo: function(){ - var frm = jQuery('#acl__detail form')[0]; - + loadinfo: function () { jQuery('#acl__info').load( DOKU_BASE + 'lib/plugins/acl/ajax.php', - { - 'ns': frm.elements['ns'].value, - 'id': frm.elements['id'].value, - 'acl_t': frm.elements['acl_t'].value, - 'acl_w': frm.elements['acl_w'].value, - 'sectok': frm.elements['sectok'].value, - 'ajax': 'info', - } + jQuery('#acl__detail form').serialize() + '&ajax=info' ); return false; }, @@ -56,11 +72,13 @@ acl = { * * @todo put into global script lib? */ - parseatt: function(str){ - if(str[0] == '?') str = str.substr(1); + parseatt: function (str) { + if (str[0] === '?') { + str = str.substr(1); + } var attributes = {}; var all = str.split('&'); - for(var i=0; i - * @param DOMElement clicky - the plus/minus icon in front of a namespace + * Handles clicks to the tree nodes */ - treetoggle: function(clicky){ - var listitem = jQuery(clicky).parent().parent(); - - // if already open, close by removing the sublist - var sublists = listitem.find('ul'); - if(sublists.length){ - listitem.remove('ul'); - clicky.src = DOKU_BASE+'lib/images/plus.gif'; - clicky.alt = '+'; - return false; - } + treehandler: function () { + var $link, $frm; - // prepare new ul to load into it via ajax - var ul = document.createElement('ul'); - listitem[0].appendChild(ul); + $link = jQuery(this); - // get the enclosed link and the edit form - var link = listitem.find('a')[0]; - var frm = jQuery('#acl__detail form')[0]; + // remove highlighting + jQuery('#acl__tree a.cur').removeClass('cur'); - // prepare ajax data - var data = acl.parseatt(link.search); - data['ajax'] = 'tree'; - data['current_ns'] = frm.elements['ns'].value; - data['current_id'] = frm.elements['id'].value; + // add new highlighting + $link.addClass('cur'); - // run ajax - jQuery(ul).load(DOKU_BASE + 'lib/plugins/acl/ajax.php', data); - - clicky.src = DOKU_BASE+'lib/images/minus.gif'; - return false; - }, - - /** - * Handles all clicks in the tree, dispatching the right action based on the - * clicked element - * - * @param Event e The event object that caused the execution - */ - treehandler: function(e){ - if(e.target.src){ // is it an image? - acl.treetoggle(e.target); - } else if(e.target.href){ // is it a link? - // remove highlighting - jQuery('#acl__tree a.cur').removeClass('cur'); - - var link = jQuery(e.target); - - // add new highlighting - link.addClass('cur'); - - // set new page to detail form - var frm = jQuery('#acl__detail form')[0]; - if(link.hasClass('wikilink1')){ - jQuery('#acl__detail form input[name=ns]').val(''); - jQuery('#acl__detail form input[name=id]').val(acl.parseatt(link[0].search)['id']); - }else if(link.hasClass('idx_dir')){ - jQuery('#acl__detail form input[name=ns]').val(acl.parseatt(link[0].search)['ns']); - jQuery('#acl__detail form input[name=id]').val(''); - } - acl.loadinfo(); + // set new page to detail form + $frm = jQuery('#acl__detail form'); + if ($link.hasClass('wikilink1')) { + $frm.find('input[name=ns]').val(''); + $frm.find('input[name=id]').val(dw_acl.parseatt($link[0].search).id); + } else if ($link.hasClass('idx_dir')) { + $frm.find('input[name=ns]').val(dw_acl.parseatt($link[0].search).ns); + $frm.find('input[name=id]').val(''); } + dw_acl.loadinfo(); - e.stopPropagation(); - e.preventDefault(); return false; } - }; -jQuery(acl.init); +jQuery(dw_acl.init); + +var acl = { + init: DEPRECATED_WRAP(dw_acl.init, dw_acl), + userselhandler: DEPRECATED_WRAP(dw_acl.userselhandler, dw_acl), + loadinfo: DEPRECATED_WRAP(dw_acl.loadinfo, dw_acl), + parseatt: DEPRECATED_WRAP(dw_acl.parseatt, dw_acl), + treehandler: DEPRECATED_WRAP(dw_acl.treehandler, dw_acl) +}; diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css index 0c5a9819b..b7154aa78 100644 --- a/lib/plugins/acl/style.css +++ b/lib/plugins/acl/style.css @@ -22,6 +22,7 @@ div#acl_manager div#acl__tree ul { div#acl_manager div#acl__tree li { padding-left: 1em; + list-style-image: none; } div#acl_manager div#acl__tree ul img { -- cgit v1.2.3 From 9d3aa748d04561e32a6fd18a394d9970a3d334be Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 16:31:34 +0200 Subject: deprecated delay.js --- lib/scripts/delay.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/scripts/delay.js b/lib/scripts/delay.js index 2ef9f8846..edd53def3 100644 --- a/lib/scripts/delay.js +++ b/lib/scripts/delay.js @@ -51,6 +51,7 @@ Delay.prototype = { }, start: function () { + DEPRECATED('don\'t use the Delay object, use window.timeout with a callback instead'); this.delTimer(); var _this = this; this.timer = timer.add(function () { _this.exec.call(_this); }, -- cgit v1.2.3 From 0a245976b7d2b80796b2e22956a6838fe241f59e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 19:35:04 +0200 Subject: renamed some variables in editor.js --- lib/scripts/editor.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js index fbdb1d79a..d1bfe0232 100644 --- a/lib/scripts/editor.js +++ b/lib/scripts/editor.js @@ -14,10 +14,10 @@ var dw_editor = { * textareas */ init: function(){ - var editor = jQuery('#wiki__text'); - if(!editor.length) return; + var $editor = jQuery('#wiki__text'); + if(!$editor.length) return; - dw_editor.initSizeCtl('#size__ctl',editor); + dw_editor.initSizeCtl('#size__ctl',$editor); }, /** @@ -29,20 +29,20 @@ var dw_editor = { * @param selector editor the textarea to control */ initSizeCtl: function(ctlarea,editor){ - var ctl = jQuery(ctlarea); - var textarea = jQuery(editor); - if(!ctl.length || !textarea.length) return; + var $ctl = jQuery(ctlarea); + var $textarea = jQuery(editor); + if(!$ctl.length || !$textarea.length) return; var hgt = DokuCookie.getValue('sizeCtl'); if(hgt){ - textarea.css('height', hgt); + $textarea.css('height', hgt); }else{ - textarea.css('height', '300px'); + $textarea.css('height', '300px'); } var wrp = DokuCookie.getValue('wrapCtl'); if(wrp){ - dw_editor.setWrap(textarea[0], wrp); + dw_editor.setWrap($textarea[0], wrp); } // else use default value var l = document.createElement('img'); @@ -54,9 +54,9 @@ var dw_editor = { jQuery(l).click(function(){dw_editor.sizeCtl(editor,100);}); jQuery(s).click(function(){dw_editor.sizeCtl(editor,-100);}); jQuery(w).click(function(){dw_editor.toggleWrap(editor);}); - ctl.append(l); - ctl.append(s); - ctl.append(w); + $ctl.append(l); + $ctl.append(s); + $ctl.append(w); }, /** @@ -66,11 +66,11 @@ var dw_editor = { * @param int val the relative value to resize in pixel */ sizeCtl: function(editor,val){ - var textarea = jQuery(editor); - var height = parseInt(textarea.css('height')); + var $textarea = jQuery(editor); + var height = parseInt($textarea.css('height')); height += val; - textarea.css('height', height+'px'); - DokuCookie.setValue('sizeCtl',textarea.css('height')); + $textarea.css('height', height+'px'); + DokuCookie.setValue('sizeCtl',$textarea.css('height')); }, /** @@ -80,14 +80,14 @@ var dw_editor = { * @param selector editor the textarea to control */ toggleWrap: function(editor){ - var textarea = jQuery(editor); + var $textarea = jQuery(editor); var wrap = textarea.attr('wrap'); if(wrap && wrap.toLowerCase() == 'off'){ dw_editor.setWrap(textarea[0], 'soft'); }else{ dw_editor.setWrap(textarea[0], 'off'); } - DokuCookie.setValue('wrapCtl',textarea.attr('wrap')); + DokuCookie.setValue('wrapCtl',$textarea.attr('wrap')); }, /** -- cgit v1.2.3 From bedfa6abf0ea09be1ea44de0c014d83bd57a7412 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 20:09:07 +0200 Subject: moved keyhandler to the new dw_editor object --- lib/scripts/edit.js | 88 ------------------------------------------------- lib/scripts/editor.js | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 88 deletions(-) diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index a9623e14d..816568e92 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -155,86 +155,6 @@ function addBtnActionSignature(btn, props, edid) { return false; } -/** - * Make intended formattings easier to handle - * - * Listens to all key inputs and handle indentions - * of lists and code blocks - * - * Currently handles space, backspce and enter presses - * - * @author Andreas Gohr - * @fixme handle tabs - */ -function keyHandler(e){ - if(e.keyCode != 13 && - e.keyCode != 8 && - e.keyCode != 32) return; - var field = e.target; - var selection = getSelection(field); - if(selection.getLength()) return; //there was text selected, keep standard behavior - var search = "\n"+field.value.substr(0,selection.start); - var linestart = Math.max(search.lastIndexOf("\n"), - search.lastIndexOf("\r")); //IE workaround - search = search.substr(linestart); - - - if(e.keyCode == 13){ // Enter - // keep current indention for lists and code - var match = search.match(/(\n +([\*-] ?)?)/); - if(match){ - var scroll = field.scrollHeight; - var match2 = search.match(/^\n +[\*-]\s*$/); - // Cancel list if the last item is empty (i. e. two times enter) - if (match2 && field.value.substr(selection.start).match(/^($|\r?\n)/)) { - field.value = field.value.substr(0, linestart) + "\n" + - field.value.substr(selection.start); - selection.start = linestart + 1; - selection.end = linestart + 1; - setSelection(selection); - } else { - insertAtCarret(field.id,match[1]); - } - field.scrollTop += (field.scrollHeight - scroll); - e.preventDefault(); // prevent enter key - return false; - } - }else if(e.keyCode == 8){ // Backspace - // unindent lists - var match = search.match(/(\n +)([*-] ?)$/); - if(match){ - var spaces = match[1].length-1; - - if(spaces > 3){ // unindent one level - field.value = field.value.substr(0,linestart)+ - field.value.substr(linestart+2); - selection.start = selection.start - 2; - selection.end = selection.start; - }else{ // delete list point - field.value = field.value.substr(0,linestart)+ - field.value.substr(selection.start); - selection.start = linestart; - selection.end = linestart; - } - setSelection(selection); - e.preventDefault(); // prevent backspace - return false; - } - }else if(e.keyCode == 32){ // Space - // intend list item - var match = search.match(/(\n +)([*-] )$/); - if(match){ - field.value = field.value.substr(0,linestart)+' '+ - field.value.substr(linestart); - selection.start = selection.start + 2; - selection.end = selection.start; - setSelection(selection); - e.preventDefault(); // prevent space - return false; - } - } -} - /** * Determine the current section level while editing * @@ -303,14 +223,6 @@ addInitEvent(function () { if (edit_text.length > 0) { if(edit_text.attr('readOnly')) return; - // in Firefox, keypress doesn't send the correct keycodes, - // in Opera, the default of keydown can't be prevented - if (is_opera) { - edit_text.keypress(keyHandler); - } else { - edit_text.keydown(keyHandler); - } - // set focus and place cursor at the start var sel = getSelection(edit_text.get(0)); sel.start = 0; diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js index d1bfe0232..6d7f9f4a8 100644 --- a/lib/scripts/editor.js +++ b/lib/scripts/editor.js @@ -18,6 +18,17 @@ var dw_editor = { if(!$editor.length) return; dw_editor.initSizeCtl('#size__ctl',$editor); + + if($editor.attr('readOnly')) return; + + // in Firefox, keypress doesn't send the correct keycodes, + // in Opera, the default of keydown can't be prevented + if (jQuery.browser.opera) { + $editor.keypress(dw_editor.keyHandler); + } else { + $editor.keydown(dw_editor.keyHandler); + } + }, /** @@ -108,6 +119,86 @@ var dw_editor = { var nxtSib = textarea.nextSibling; parNod.removeChild(textarea); parNod.insertBefore(textarea, nxtSib); + }, + + /** + * Make intended formattings easier to handle + * + * Listens to all key inputs and handle indentions + * of lists and code blocks + * + * Currently handles space, backspce and enter presses + * + * @author Andreas Gohr + * @fixme handle tabs + * @param event e - the key press event object + */ + keyHandler: function(e){ + if(e.keyCode != 13 && + e.keyCode != 8 && + e.keyCode != 32) return; + var field = e.target; + var selection = getSelection(field); + if(selection.getLength()) return; //there was text selected, keep standard behavior + var search = "\n"+field.value.substr(0,selection.start); + var linestart = Math.max(search.lastIndexOf("\n"), + search.lastIndexOf("\r")); //IE workaround + search = search.substr(linestart); + + if(e.keyCode == 13){ // Enter + // keep current indention for lists and code + var match = search.match(/(\n +([\*-] ?)?)/); + if(match){ + var scroll = field.scrollHeight; + var match2 = search.match(/^\n +[\*-]\s*$/); + // Cancel list if the last item is empty (i. e. two times enter) + if (match2 && field.value.substr(selection.start).match(/^($|\r?\n)/)) { + field.value = field.value.substr(0, linestart) + "\n" + + field.value.substr(selection.start); + selection.start = linestart + 1; + selection.end = linestart + 1; + setSelection(selection); + } else { + insertAtCarret(field.id,match[1]); + } + field.scrollTop += (field.scrollHeight - scroll); + e.preventDefault(); // prevent enter key + return false; + } + }else if(e.keyCode == 8){ // Backspace + // unindent lists + var match = search.match(/(\n +)([*-] ?)$/); + if(match){ + var spaces = match[1].length-1; + + if(spaces > 3){ // unindent one level + field.value = field.value.substr(0,linestart)+ + field.value.substr(linestart+2); + selection.start = selection.start - 2; + selection.end = selection.start; + }else{ // delete list point + field.value = field.value.substr(0,linestart)+ + field.value.substr(selection.start); + selection.start = linestart; + selection.end = linestart; + } + setSelection(selection); + e.preventDefault(); // prevent backspace + return false; + } + }else if(e.keyCode == 32){ // Space + // intend list item + var match = search.match(/(\n +)([*-] )$/); + if(match){ + field.value = field.value.substr(0,linestart)+' '+ + field.value.substr(linestart); + selection.start = selection.start + 2; + selection.end = selection.start; + setSelection(selection); + e.preventDefault(); // prevent space + return false; + } + } } -- cgit v1.2.3 From ba72dce1b47b01a626df51666b84593d8cbc1050 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 21 Aug 2011 14:33:07 +0200 Subject: fixed TOC-Bug and moved TOC behaviour to page.js FS#2314 --- lib/scripts/behaviour.js | 31 ------------------------------- lib/scripts/page.js | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 1580ae86f..d7c3d2975 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -16,7 +16,6 @@ var dw_behaviour = { dw_behaviour.removeHighlightOnClick(); dw_behaviour.quickSelect(); dw_behaviour.checkWindowsShares(); - dw_behaviour.initTocToggle(); dw_behaviour.subscription(); dw_behaviour.revisionBoxHandler(); @@ -86,36 +85,6 @@ var dw_behaviour = { }); }, - /** - * Adds the toggle switch to the TOC - */ - initTocToggle: function() { - var $header = jQuery('#toc__header'); - if(!$header.length) return; - var $toc = jQuery('#toc__inside'); - - var $clicky = jQuery(document.createElement('span')) - .attr('id','toc__toggle') - .css('cursor','pointer') - .click(function(){ - $toc.slideToggle(200); - setClicky(); - }); - $header.prepend($clicky); - - var setClicky = function(){ - if($toc.css('display') == 'none'){ - $clicky.html('+'); - $clicky[0].className = 'toc_open'; - }else{ - $clicky.html(''); - $clicky[0].className = 'toc_close'; - } - }; - - setClicky(); - }, - /** * Hide list subscription style if target is a page * diff --git a/lib/scripts/page.js b/lib/scripts/page.js index 05c5ece20..f3d35609d 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -10,6 +10,7 @@ dw_page = { init: function(){ dw_page.sectionHighlight(); jQuery('a.fn_top').mouseover(dw_page.footnoteDisplay); + dw_page.initTocToggle(); }, /** @@ -93,7 +94,38 @@ dw_page = { // now put the content into the wrapper $fndiv.html(content); $fndiv.show(); + }, + + /** + * Adds the toggle switch to the TOC + */ + initTocToggle: function() { + var $header = jQuery('#toc__header'); + if(!$header.length) return; + var $toc = jQuery('#toc__inside'); + + var setClicky = function(){ + if($toc.css('display') == 'none'){ + $clicky.html('+'); + $clicky[0].className = 'toc_open'; + }else{ + $clicky.html(''); + $clicky[0].className = 'toc_close'; + } + }; + + var $clicky = jQuery(document.createElement('span')) + .attr('id','toc__toggle') + $header.css('cursor','pointer') + .click(function(){ + $toc.slideToggle(200,setClicky); + }) + .prepend($clicky); + + setClicky(); } + + }; jQuery(dw_page.init); -- cgit v1.2.3 From 56e27257eef4a54d4fba170088589dccb39f5bb3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 21 Aug 2011 16:59:48 +0200 Subject: avoid 100% cpu usage when reading HTTP headers FS#2304 --- inc/HTTPClient.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 372769b71..fdf95d113 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -368,6 +368,7 @@ class HTTPClient { unset($this->connections[$connectionId]); return false; } + usleep(1000); $r_headers .= fgets($socket,1024); }while(!preg_match('/\r?\n\r?\n$/',$r_headers)); -- cgit v1.2.3 From cafc90889ce6f5ce7c4007147b2fee974d80401a Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 22 Aug 2011 13:16:33 +0200 Subject: JSLINT locktimer, fix date passing in draftsave Since 80997d21e0aee9b8f27153000742ecd781f429f8 the date passed to the draft save backend is indeed the page id, not the date. --- lib/scripts/locktimer.js | 56 ++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/lib/scripts/locktimer.js b/lib/scripts/locktimer.js index b83840557..857002abf 100644 --- a/lib/scripts/locktimer.js +++ b/lib/scripts/locktimer.js @@ -17,8 +17,9 @@ var dw_locktimer = { */ init: function(timeout,draft){ //FIXME which elements to pass here? var $edit = jQuery('#wiki__text'); - if(!$edit.length) return; - if($edit.attr('readonly')) return; + if($edit.length === 0 || $edit.attr('readonly')) { + return; + } // init values dw_locktimer.timeout = timeout*1000; @@ -26,10 +27,12 @@ var dw_locktimer = { dw_locktimer.lasttime = new Date(); dw_locktimer.pageid = jQuery('#dw__editform input[name=id]').val(); - if(!dw_locktimer.pageid) return; + if(!dw_locktimer.pageid) { + return; + } // register refresh event - jQuery('#wiki__text').keypress(dw_locktimer.refresh); + $edit.keypress(dw_locktimer.refresh); // start timer dw_locktimer.reset(); }, @@ -66,30 +69,29 @@ var dw_locktimer = { * Called on keypresses in the edit area */ refresh: function(){ - var now = new Date(); - var params = {}; - // refresh every minute only - if(now.getTime() - dw_locktimer.lasttime.getTime() > 30*1000){ - params['call'] = 'lock'; - params['id'] = dw_locktimer.pageid; + var now = new Date(), + params = 'call=lock&id=' + dw_locktimer.pageid + '&'; - if(dw_locktimer.draft && jQuery('#dw__editform textarea[name=wikitext]').length > 0){ - params['prefix'] = jQuery('#dw__editform input[name=prefix]').val(); - params['wikitext'] = jQuery('#dw__editform textarea[name=wikitext]').val(); - params['suffix'] = jQuery('#dw__editform input[name=suffix]').val(); - if(jQuery('#dw__editform input[name=date]').length > 0) { - params['date'] = jQuery('#dw__editform input[name=id]').val(); - } - } + // refresh every minute only + if(now.getTime() - dw_locktimer.lasttime.getTime() <= 30*1000) { + return; + } - jQuery.post( - DOKU_BASE + 'lib/exe/ajax.php', - params, - dw_locktimer.refreshed, - 'html' - ); - dw_locktimer.lasttime = now; + // POST everything necessary for draft saving + if(dw_locktimer.draft && jQuery('#dw__editform textarea[name=wikitext]').length > 0){ + params += jQuery('#dw__editform').find('input[name=prefix], ' + + 'textarea[name=wikitext], ' + + 'input[name=suffix], ' + + 'input[name=date]').serialize(); } + + jQuery.post( + DOKU_BASE + 'lib/exe/ajax.php', + params, + dw_locktimer.refreshed, + 'html' + ); + dw_locktimer.lasttime = now; }, /** @@ -100,7 +102,9 @@ var dw_locktimer = { data = data.substring(1); jQuery('#draft__status').html(data); - if(error != '1') return; // locking failed + if(error != '1') { + return; // locking failed + } dw_locktimer.reset(); } }; -- cgit v1.2.3 From 10ecffd81cdbfc2eb72dda53c4039701687aae33 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 22 Aug 2011 14:55:02 +0200 Subject: page.js: Improve footnote cleaning regex, cleaner toc toggling * elements are only removed from the start of a footnote * the TOC wrapper instantly gets the target size to reduce layout jumping --- lib/scripts/page.js | 60 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/lib/scripts/page.js b/lib/scripts/page.js index f3d35609d..e4033b76d 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -21,8 +21,8 @@ dw_page = { sectionHighlight: function() { jQuery('form.btn_secedit') .mouseover(function(){ - var $tgt = jQuery(this).parent(); - var nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2]; + var $tgt = jQuery(this).parent(), + nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2]; // Walk the DOM tree up (first previous siblings, then parents) // until boundary element @@ -74,38 +74,38 @@ dw_page = { * @author Andreas Gohr * @author Chris Smith */ - footnoteDisplay: function(e){ - var $fndiv = dw_page.insituPopup(this, 'insitu__fn'); + footnoteDisplay: function () { + var content = jQuery(jQuery(this).attr('href')) // Footnote text anchor + .closest('div.fn').html(); - // locate the footnote anchor element - var $a = jQuery("#fn__" + e.target.id.substr(5)); - if (!$a.length){ return; } - - // anchor parent is the footnote container, get its innerHTML - var content = new String ($a.parent().parent().html()); + if (content === null){ + return; + } // strip the leading content anchors and their comma separators - content = content.replace(/.*<\/sup>/gi, ''); - content = content.replace(/^\s+(,\s+)+/,''); + content = content.replace(/((^|\s*,\s*).*?<\/sup>)+\s*/gi, ''); // prefix ids on any elements with "insitu__" to ensure they remain unique content = content.replace(/\bid=(['"])([^"']+)\1/gi,'id="insitu__$2'); // now put the content into the wrapper - $fndiv.html(content); - $fndiv.show(); + dw_page.insituPopup(this, 'insitu__fn').html(content).show(); }, /** * Adds the toggle switch to the TOC */ initTocToggle: function() { - var $header = jQuery('#toc__header'); - if(!$header.length) return; - var $toc = jQuery('#toc__inside'); + var $header, $clicky, $toc, $tocul, setClicky; + $header = jQuery('#toc__header'); + if(!$header.length) { + return; + } + $toc = jQuery('#toc__inside'); + $tocul = $toc.children('ul.toc'); - var setClicky = function(){ - if($toc.css('display') == 'none'){ + setClicky = function(hiding){ + if(hiding){ $clicky.html('+'); $clicky[0].className = 'toc_open'; }else{ @@ -114,18 +114,28 @@ dw_page = { } }; - var $clicky = jQuery(document.createElement('span')) - .attr('id','toc__toggle') + $clicky = jQuery(document.createElement('span')) + .attr('id','toc__toggle'); $header.css('cursor','pointer') - .click(function(){ - $toc.slideToggle(200,setClicky); + .click(function () { + var hidden; + + // Assert that $toc instantly takes the whole TOC space + $toc.css('height', $toc.height()).show(); + + hidden = $tocul.stop(true, true).is(':hidden'); + + setClicky(!hidden); + + // Start animation and assure that $toc is hidden/visible + $tocul.dw_toggle(hidden, function () { + $toc.toggle(hidden); + }); }) .prepend($clicky); setClicky(); } - - }; jQuery(dw_page.init); -- cgit v1.2.3 From cb42e5f1de77ce65441002c0b0b94d5855cab1f0 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 22 Aug 2011 15:25:15 +0200 Subject: Deprecate several helper functions, JSLINT helpers.js --- lib/scripts/compatibility.js | 172 +++++++++++++++++++++++++++++++++++++++++- lib/scripts/helpers.js | 176 ++----------------------------------------- 2 files changed, 174 insertions(+), 174 deletions(-) diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js index ddc8823d3..39f703c71 100644 --- a/lib/scripts/compatibility.js +++ b/lib/scripts/compatibility.js @@ -1,6 +1,3 @@ -/*jslint sloppy: true */ -/*global dw_index, dw_qsearch, DEPRECATED_WRAP */ - /** * Mark a JavaScript function as deprecated * @@ -209,4 +206,173 @@ function jsEscape(text){ return text; } +/** + * Simple function to check if a global var is defined + * + * @author Kae Verens + * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835 + */ +function isset(varname){ + DEPRECATED("Use `typeof var !== 'undefined'` instead"); + return(typeof(window[varname])!='undefined'); +} + +/** + * Checks if property is undefined + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isUndefined (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `typeof var === 'undefined'` instead"); + return (typeof prop == 'undefined'); +} + +/** + * Checks if property is function + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isFunction (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `typeof var === 'function'` instead"); + return (typeof prop == 'function'); +} +/** + * Checks if property is string + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isString (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `typeof var === 'string'` instead"); + return (typeof prop == 'string'); +} + +/** + * Checks if property is number + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isNumber (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `typeof var === 'number'` instead"); + return (typeof prop == 'number'); +} + +/** + * Checks if property is the calculable number + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isNumeric (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `typeof var === 'number' && !isNaN(var) && isFinite(var)` instead"); + return isNumber(prop)&&!isNaN(prop)&&isFinite(prop); +} + +/** + * Checks if property is array + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isArray (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `var instanceof Array` instead"); + return (prop instanceof Array); +} + +/** + * Checks if property is regexp + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isRegExp (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `var instanceof RegExp` instead"); + return (prop instanceof RegExp); +} + +/** + * Checks if property is a boolean value + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isBoolean (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `typeof var === 'boolean'` instead"); + return ('boolean' == typeof prop); +} + +/** + * Checks if property is a scalar value (value that could be used as the hash key) + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isScalar (prop /* :Object */) /* :Boolean */ { + DEPRECATED("Use `typeof var === 'string' || (typeof var === 'number' &&" + + " !isNaN(var) && isFinite(var))` instead"); + return isNumeric(prop)||isString(prop); +} + +/** + * Checks if property is empty + * + * @param {Object} prop value to check + * @return {Boolean} true if matched + * @scope public + * @author Ilya Lebedev + */ +function isEmpty (prop /* :Object */) /* :Boolean */ { + DEPRECATED(); + var i; + if (isBoolean(prop)) { + return false; + } else if (isRegExp(prop) && new RegExp("").toString() == prop.toString()) { + return true; + } else if (isString(prop) || isNumber(prop)) { + return !prop; + } else if (Boolean(prop) && false != prop) { + for (i in prop) { + if(prop.hasOwnProperty(i)) { + return false; + } + } + } + return true; +} + +/** + * Get the computed style of a node. + * + * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/ + * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js + */ +function gcs(node){ + DEPRECATED('Use jQuery(node).style() instead'); + if(node.currentStyle){ + return node.currentStyle; + }else{ + return node.ownerDocument.defaultView.getComputedStyle(node, null); + } +} diff --git a/lib/scripts/helpers.js b/lib/scripts/helpers.js index b0f76cdb0..d6f36967d 100644 --- a/lib/scripts/helpers.js +++ b/lib/scripts/helpers.js @@ -2,156 +2,6 @@ * Various helper functions */ - -/** - * Simple function to check if a global var is defined - * - * @author Kae Verens - * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835 - */ -function isset(varname){ - return(typeof(window[varname])!='undefined'); -} - -/** - * Checks if property is undefined - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isUndefined (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'undefined'); -} - -/** - * Checks if property is function - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isFunction (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'function'); -} -/** - * Checks if property is string - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isString (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'string'); -} - -/** - * Checks if property is number - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isNumber (prop /* :Object */) /* :Boolean */ { - return (typeof prop == 'number'); -} - -/** - * Checks if property is the calculable number - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isNumeric (prop /* :Object */) /* :Boolean */ { - return isNumber(prop)&&!isNaN(prop)&&isFinite(prop); -} - -/** - * Checks if property is array - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isArray (prop /* :Object */) /* :Boolean */ { - return (prop instanceof Array); -} - -/** - * Checks if property is regexp - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isRegExp (prop /* :Object */) /* :Boolean */ { - return (prop instanceof RegExp); -} - -/** - * Checks if property is a boolean value - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isBoolean (prop /* :Object */) /* :Boolean */ { - return ('boolean' == typeof prop); -} - -/** - * Checks if property is a scalar value (value that could be used as the hash key) - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isScalar (prop /* :Object */) /* :Boolean */ { - return isNumeric(prop)||isString(prop); -} - -/** - * Checks if property is empty - * - * @param {Object} prop value to check - * @return {Boolean} true if matched - * @scope public - * @author Ilya Lebedev - */ -function isEmpty (prop /* :Object */) /* :Boolean */ { - if (isBoolean(prop)) return false; - if (isRegExp(prop) && new RegExp("").toString() == prop.toString()) return true; - if (isString(prop) || isNumber(prop)) return !prop; - if (Boolean(prop)&&false != prop) { - for (var i in prop) if(prop.hasOwnProperty(i)) return false; - } - return true; -} - -/** - * Checks if property is derived from prototype, applies method if it is not exists - * - * @param string property name - * @return bool true if prototyped - * @access public - * @author Ilya Lebedev - */ -if ('undefined' == typeof Object.hasOwnProperty) { - Object.prototype.hasOwnProperty = function (prop) { - return !('undefined' == typeof this[prop] || this.constructor && this.constructor.prototype[prop] && this[prop] === this.constructor.prototype[prop]); - }; -} - /** * Very simplistic Flash plugin check, probably works for Flash 8 and higher only * @@ -163,13 +13,12 @@ function hasFlash(version){ if(navigator.plugins != null && navigator.plugins.length > 0){ ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0]; }else{ - var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - ver = axo.GetVariable("$version").split(' ')[1].split(',')[0]; + ver = (new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) + .GetVariable("$version").split(' ')[1].split(',')[0]; } }catch(e){ } - if(ver >= version) return true; - return false; + return ver >= version; } /** @@ -204,11 +53,11 @@ function substr_replace(str, replace, start, length) { * @returns functionref */ function bind(fnc/*, ... */) { - var Aps = Array.prototype.slice; + var Aps = Array.prototype.slice, // Store passed arguments in this scope. // Since arguments is no Array nor has an own slice method, // we have to apply the slice method from the Array.prototype - var static_args = Aps.call(arguments, 1); + static_args = Aps.call(arguments, 1); // Return a function evaluating the passed function with the // given args and optional arguments passed on invocation. @@ -219,18 +68,3 @@ function bind(fnc/*, ... */) { static_args.concat(Aps.call(arguments, 0))); }; } - -/** - * Get the computed style of a node. - * - * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/ - * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js - */ -function gcs(node){ - if(node.currentStyle){ - return node.currentStyle; - }else{ - return node.ownerDocument.defaultView.getComputedStyle(node, null); - } -} - -- cgit v1.2.3 From 511885ddd1d0f56b93fe6ad9ad0fbdc3836cf892 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 22 Aug 2011 15:34:47 +0200 Subject: Add missing callback param to dw_toggle --- lib/scripts/behaviour.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index d7c3d2975..afb210840 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -1,6 +1,3 @@ -/*jslint sloppy: true */ -/*global jQuery, LANG, document, alert */ - /** * Automatic behaviours * @@ -170,13 +167,13 @@ jQuery.fn.dw_show = function(fn) { * * @param bool the current state of the element (optional) */ -jQuery.fn.dw_toggle = function(bool) { +jQuery.fn.dw_toggle = function(bool, fn) { return this.each(function() { var $this = jQuery(this); if (typeof bool === 'undefined') { bool = $this.is(':hidden'); } - $this[bool ? "dw_show" : "dw_hide" ](); + $this[bool ? "dw_show" : "dw_hide" ](fn); }); }; -- cgit v1.2.3 From 1c5f7481f4e685ad3ffe9ba48ed47ed75196e64a Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 22 Aug 2011 16:10:05 +0200 Subject: Update jquery-cookie, cleanup dw_cookie Pulled the current jquery-cookie version from https://github.com/carhartl/jquery-cookie. --- lib/scripts/cookie.js | 73 ++++++------------------ lib/scripts/jquery/jquery.cookie.js | 111 +++++++++--------------------------- 2 files changed, 45 insertions(+), 139 deletions(-) diff --git a/lib/scripts/cookie.js b/lib/scripts/cookie.js index f7d9b5ffb..f97882855 100644 --- a/lib/scripts/cookie.js +++ b/lib/scripts/cookie.js @@ -2,7 +2,7 @@ * Handles the cookie used by several JavaScript functions * * Only a single cookie is written and read. You may only save -* sime name-value pairs - no complex types! +* simple name-value pairs - no complex types! * * You should only use the getValue and setValue methods * @@ -10,7 +10,7 @@ * @author Michal Rezler */ DokuCookie = { - data: Array(), + data: {}, name: 'DOKU_PREFS', /** @@ -19,21 +19,17 @@ DokuCookie = { * @author Andreas Gohr */ setValue: function(key,val){ + var text = ''; this.init(); this.data[key] = val; - // prepare expire date - var now = new Date(); - this.fixDate(now); - now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); //expire in a year - //save the whole data array - var text = ''; - for(var key in this.data){ - if (!this.data.hasOwnProperty(key)) continue; - text += '#'+escape(key)+'#'+this.data[key]; - } - this.setCookie(this.name,text.substr(1),now,DOKU_BASE); + jQuery.each(this.data, function (val, key) { + if (this.data.hasOwnProperty(key)) { + text += '#'+encodeURIComponent(key)+'#'+encodeURIComponent(val); + } + }); + jQuery.cookie(this.name,text.substr(1), {expires: 365, path: DOKU_BASE}); }, /** @@ -52,51 +48,16 @@ DokuCookie = { * @author Andreas Gohr */ init: function(){ - if(this.data.length) return; - var text = this.getCookie(this.name); + var text, parts, i; + if(!jQuery.isEmptyObject(this.data)) { + return; + } + text = jQuery.cookie(this.name); if(text){ - var parts = text.split('#'); - for(var i=0; i 0){ - date.setTime(date.getTime() - skew); - } } }; diff --git a/lib/scripts/jquery/jquery.cookie.js b/lib/scripts/jquery/jquery.cookie.js index 6df1faca2..6a3e394b4 100644 --- a/lib/scripts/jquery/jquery.cookie.js +++ b/lib/scripts/jquery/jquery.cookie.js @@ -1,96 +1,41 @@ /** - * Cookie plugin + * jQuery Cookie plugin * - * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Copyright (c) 2010 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ +jQuery.cookie = function (key, value, options) { -/** - * Create a cookie with the given name and value and other optional parameters. - * - * @example $.cookie('the_cookie', 'the_value'); - * @desc Set the value of a cookie. - * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); - * @desc Create a cookie with all available options. - * @example $.cookie('the_cookie', 'the_value'); - * @desc Create a session cookie. - * @example $.cookie('the_cookie', null); - * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain - * used when the cookie was set. - * - * @param String name The name of the cookie. - * @param String value The value of the cookie. - * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. - * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. - * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. - * If set to null or omitted, the cookie will be a session cookie and will not be retained - * when the the browser exits. - * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). - * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). - * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will - * require a secure protocol (like HTTPS). - * @type undefined - * - * @name $.cookie - * @cat Plugins/Cookie - * @author Klaus Hartl/klaus.hartl@stilbuero.de - */ + // key and at least value given, set cookie... + if (arguments.length > 1 && String(value) !== "[object Object]") { + options = jQuery.extend({}, options); -/** - * Get the value of a cookie with the given name. - * - * @example $.cookie('the_cookie'); - * @desc Get the value of a cookie. - * - * @param String name The name of the cookie. - * @return The value of the cookie. - * @type String - * - * @name $.cookie - * @cat Plugins/Cookie - * @author Klaus Hartl/klaus.hartl@stilbuero.de - */ -jQuery.cookie = function(name, value, options) { - if (typeof value != 'undefined') { // name and value given, set cookie - options = options || {}; - if (value === null) { - value = ''; + if (value === null || value === undefined) { options.expires = -1; } - var expires = ''; - if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { - var date; - if (typeof options.expires == 'number') { - date = new Date(); - date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); - } else { - date = options.expires; - } - expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE - } - // CAUTION: Needed to parenthesize options.path and options.domain - // in the following expressions, otherwise they evaluate to undefined - // in the packed version for some reason... - var path = options.path ? '; path=' + (options.path) : ''; - var domain = options.domain ? '; domain=' + (options.domain) : ''; - var secure = options.secure ? '; secure' : ''; - document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); - } else { // only name given, get cookie - var cookieValue = null; - if (document.cookie && document.cookie != '') { - var cookies = document.cookie.split(';'); - for (var i = 0; i < cookies.length; i++) { - var cookie = jQuery.trim(cookies[i]); - // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); - break; - } - } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); } - return cookieValue; + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); } -}; \ No newline at end of file + + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +}; -- cgit v1.2.3