diff options
Diffstat (limited to 'lib')
24 files changed, 189 insertions, 41 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index c96dedd37..f273b7ee4 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -456,8 +456,9 @@ class DokuCssFile { if (defined('DOKU_UNITTEST')) { $basedir[] = realpath(TMP_DIR); } - $regex = '#^('.join('|',$basedir).')#'; + $basedir = array_map('preg_quote_cb', $basedir); + $regex = '/^('.join('|',$basedir).')/'; $this->relative_path = preg_replace($regex, '', dirname($this->filepath)); } diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index f33b3f2f8..5f82ad0e0 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -89,7 +89,7 @@ if (defined('SIMPLE_TEST')) { // finally send the file to the client $evt = new Doku_Event('MEDIA_SENDFILE', $data); if($evt->advise_before()) { - sendFile($data['file'], $data['mime'], $data['download'], $data['cache'], $data['ispublic']); + sendFile($data['file'], $data['mime'], $data['download'], $data['cache'], $data['ispublic'], $data['orig']); } // Do something after the download finished. $evt->advise_after(); // will not be emitted on 304 or x-sendfile diff --git a/lib/exe/js.php b/lib/exe/js.php index 040b8874d..04413b409 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -44,6 +44,7 @@ function js_out(){ DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC."lib/scripts/jquery/jquery-ui$min.js", DOKU_INC."lib/scripts/jquery/jquery-migrate$min.js", + DOKU_INC.'inc/lang/'.$conf['lang'].'/jquery.ui.datepicker.js', DOKU_INC."lib/scripts/fileuploader.js", DOKU_INC."lib/scripts/fileuploaderextended.js", DOKU_INC.'lib/scripts/helpers.js', @@ -112,6 +113,7 @@ function js_out(){ // load files foreach($files as $file){ + if(!file_exists($file)) continue; $ismin = (substr($file,-7) == '.min.js'); $debugjs = ($conf['allowdebug'] && strpos($file, DOKU_INC.'lib/scripts/') !== 0); diff --git a/lib/images/fileicons/mp4.png b/lib/images/fileicons/mp4.png Binary files differnew file mode 100644 index 000000000..b89fc5299 --- /dev/null +++ b/lib/images/fileicons/mp4.png diff --git a/lib/images/fileicons/ogv.png b/lib/images/fileicons/ogv.png Binary files differnew file mode 100644 index 000000000..b89fc5299 --- /dev/null +++ b/lib/images/fileicons/ogv.png diff --git a/lib/images/fileicons/webm.png b/lib/images/fileicons/webm.png Binary files differnew file mode 100644 index 000000000..b89fc5299 --- /dev/null +++ b/lib/images/fileicons/webm.png diff --git a/lib/plugins/authad/lang/sl/settings.php b/lib/plugins/authad/lang/sl/settings.php new file mode 100644 index 000000000..bae467d6d --- /dev/null +++ b/lib/plugins/authad/lang/sl/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author matej <mateju@svn.gnome.org> + */ +$lang['debug'] = 'Ali naj bodo prikazane dodatne podrobnosti napak?'; diff --git a/lib/plugins/authldap/lang/sl/settings.php b/lib/plugins/authldap/lang/sl/settings.php new file mode 100644 index 000000000..f180226fc --- /dev/null +++ b/lib/plugins/authldap/lang/sl/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author matej <mateju@svn.gnome.org> + */ +$lang['starttls'] = 'Ali naj se uporabijo povezave TLS?'; diff --git a/lib/plugins/authpgsql/lang/sl/settings.php b/lib/plugins/authpgsql/lang/sl/settings.php index 4c369abc0..08d3cbca3 100644 --- a/lib/plugins/authpgsql/lang/sl/settings.php +++ b/lib/plugins/authpgsql/lang/sl/settings.php @@ -4,5 +4,14 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Matej Urbančič <mateju@svn.gnome.org> + * @author matej <mateju@svn.gnome.org> */ $lang['database'] = 'Podatkovna zbirka za uporabo'; +$lang['addUserGroup'] = 'Ukaz SQL za dodajanje uporabnika v obstoječo skupino'; +$lang['delGroup'] = 'Ukaz SQL za odstranitev skupine'; +$lang['getUserID'] = 'Ukaz SQL za pridobitev osnovnega ključa uporabnika'; +$lang['delUser'] = 'Ukaz SQL za izbris uporabnika'; +$lang['delUserRefs'] = 'Ukaz SQL za odstranitev uporabnika iz vseh skupin'; +$lang['updateUser'] = 'Ukaz SQL za posodobitev profila uporabnika'; +$lang['delUserGroup'] = 'Ukaz SQL za odstranitev uporabnika iz podane skupine'; +$lang['getGroupID'] = 'Ukaz SQL za pridobitev osnovnega ključa podane skupine'; diff --git a/lib/plugins/config/lang/ko/intro.txt b/lib/plugins/config/lang/ko/intro.txt index d0b85606c..979bbcb14 100644 --- a/lib/plugins/config/lang/ko/intro.txt +++ b/lib/plugins/config/lang/ko/intro.txt @@ -6,4 +6,3 @@ 이 페이지를 떠나기 전에 **저장** 버튼을 누르지 않으면 바뀜이 사라지는 것에 주의하세요. - diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 8cc303fbe..01a5c516a 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -406,7 +406,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default); $return .= '</bdi></dd>'; - if($extension->getCompatibleVersions()) { + if(!$extension->isBundled() && $extension->getCompatibleVersions()) { $return .= '<dt>'.$this->getLang('compatible').'</dt>'; $return .= '<dd>'; foreach ($extension->getCompatibleVersions() as $date => $version) { @@ -539,20 +539,23 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @return string The description of all relevant statusses */ function make_status(helper_plugin_extension_extension $extension) { - $return = ''; + $status = array(); + + if ($extension->isInstalled()) { - $return .= $this->getLang('status_installed').' '; + $status[] = $this->getLang('status_installed'); if ($extension->isProtected()) { - $return .= $this->getLang('status_protected').' '; + $status[] = $this->getLang('status_protected'); } else { - $return .= $extension->isEnabled() ? $this->getLang('status_enabled').' ' : $this->getLang('status_disabled').' '; + $status[] = $extension->isEnabled() ? $this->getLang('status_enabled') : $this->getLang('status_disabled'); } } else { - $return .= $this->getLang('status_not_installed').' '; + $status[] = $this->getLang('status_not_installed'); } - $return .= !$extension->canModify() ? $this->getLang('status_unmodifiable').' ' : ''; - $return .= $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); - return $return; + if(!$extension->canModify()) $status[] = $this->getLang('status_unmodifiable'); + if($extension->isBundled()) $status[] = $this->getLang('status_bundled'); + $status[] = $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); + return join(', ', $status); } } diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index c0550c951..5224f694a 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -65,6 +65,7 @@ $lang['status_disabled'] = 'disabled'; $lang['status_unmodifiable'] = 'unmodifiable'; $lang['status_plugin'] = 'plugin'; $lang['status_template'] = 'template'; +$lang['status_bundled'] = 'bundled'; $lang['msg_enabled'] = 'Plugin %s enabled'; $lang['msg_disabled'] = 'Plugin %s disabled'; diff --git a/lib/plugins/plugin/lang/id/lang.php b/lib/plugins/plugin/lang/id/lang.php new file mode 100644 index 000000000..2653b075e --- /dev/null +++ b/lib/plugins/plugin/lang/id/lang.php @@ -0,0 +1,32 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Irwan Butar Butar <irwansah.putra@gmail.com> + * @author Yustinus Waruwu <juswaruwu@gmail.com> + */ +$lang['btn_info'] = 'Info'; +$lang['btn_update'] = 'Baharui'; +$lang['btn_delete'] = 'Hapus'; +$lang['btn_settings'] = 'Pengaturan'; +$lang['btn_download'] = 'Unduh'; +$lang['btn_enable'] = 'Simpan'; +$lang['url'] = 'URL'; +$lang['installed'] = 'Instal'; +$lang['lastupdate'] = 'Pembaharuan terakhir:'; +$lang['source'] = 'Sumber:'; +$lang['unknown'] = 'Tidak kenal'; +$lang['updating'] = 'Terbaharui ...'; +$lang['update_none'] = 'Tidak ditemukan pembaharuan'; +$lang['deleting'] = 'Terhapus ...'; +$lang['deleted'] = 'Hapus Plugin %s.'; +$lang['downloading'] = 'Unduh ...'; +$lang['plugin'] = 'Plugin:'; +$lang['components'] = 'Komponen'; +$lang['name'] = 'Nama:'; +$lang['date'] = 'Tanggal:'; +$lang['type'] = 'Tipe:'; +$lang['desc'] = 'Penjelasan:'; +$lang['author'] = 'Autor:'; +$lang['www'] = 'Web:'; diff --git a/lib/plugins/plugin/lang/sl/admin_plugin.txt b/lib/plugins/plugin/lang/sl/admin_plugin.txt new file mode 100644 index 000000000..5fd02e1ba --- /dev/null +++ b/lib/plugins/plugin/lang/sl/admin_plugin.txt @@ -0,0 +1,3 @@ +====== Upravljanje vstavkov ====== + +Na tej strani je mogoče spreminjati in prilagajati nastavitve DokuWiki [[doku>plugins|vstavkov]]. Za prejemanje in nameščanje vstavkov v ustrezne mape, morajo imeti te določena ustrezna dovoljenja za pisanje spletnega strežnika. diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php new file mode 100644 index 000000000..e205c57f5 --- /dev/null +++ b/lib/plugins/plugin/lang/sl/lang.php @@ -0,0 +1,55 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Dejan Levec <webphp@gmail.com> + * @author Boštjan Seničar <senicar@gmail.com> + * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) + */ +$lang['menu'] = 'Upravljanje vstavkov'; +$lang['download'] = 'Prejmi in namesti nov vstavek'; +$lang['manage'] = 'Nameščeni vstavki'; +$lang['btn_info'] = 'Podrobnosti'; +$lang['btn_update'] = 'Posodobi'; +$lang['btn_delete'] = 'Izbriši'; +$lang['btn_settings'] = 'Nastavitve'; +$lang['btn_download'] = 'Prejmi'; +$lang['btn_enable'] = 'Shrani'; +$lang['url'] = 'URL'; +$lang['installed'] = 'Nameščeno:'; +$lang['lastupdate'] = 'Nazadnje posodobljeno:'; +$lang['source'] = 'Vir:'; +$lang['unknown'] = 'neznano'; +$lang['updating'] = 'Posodabljanje ...'; +$lang['updated'] = 'Vstavek %s je uspešno posodobljen'; +$lang['updates'] = 'Navedeni vstavki so uspešno posodobljeni'; +$lang['update_none'] = 'Posodobitev ni mogoče najti.'; +$lang['deleting'] = 'Brisanje ...'; +$lang['deleted'] = 'Vstavek %s je izbrisan.'; +$lang['downloading'] = 'Prejemanje ...'; +$lang['downloaded'] = 'Vstavek %s je uspešno nameščen'; +$lang['downloads'] = 'Navedeni vstavki so uspešno nameščeni:'; +$lang['download_none'] = 'Vstavkov ni mogoče najti ali pa je prišlo do napake med prejemanjem in nameščanjem.'; +$lang['plugin'] = 'Vstavek:'; +$lang['components'] = 'Sestavni deli'; +$lang['noinfo'] = 'Vstavek nima vpisanih podrobnih podatkov, kar pomeni, da je morda neveljaven.'; +$lang['name'] = 'Ime:'; +$lang['date'] = 'Datum:'; +$lang['type'] = 'Vrsta:'; +$lang['desc'] = 'Opis:'; +$lang['author'] = 'Avtor:'; +$lang['www'] = 'Spletna stran:'; +$lang['error'] = 'Prišlo je do neznane napake.'; +$lang['error_download'] = 'Ni mogoče prejeti datoteke vstavka: %s'; +$lang['error_badurl'] = 'Napaka naslova URL - ni mogoče določiti imena datoteke iz naslova URL'; +$lang['error_dircreate'] = 'Ni mogoče ustvariti začasne mape za prejemanje'; +$lang['error_decompress'] = 'Z upravljalnikom vstavkov ni mogoče razširiti prejetega arhiva vstavka. Najverjetneje je prišlo do napake med prejemanjem datoteke ali pa zapis arhiva ni znan. Poskusite znova ali pa napako odpravite z ročnim nameščanjem vstavka.'; +$lang['error_copy'] = 'Prišlo je do napake med nameščanjem datotek vstavka <em>%s</em>: najverjetneje so težave s prostorom za namestitev ali pa ni ustreznih dovoljenj za nameščanje. Zaradi nepopolne namestitve lahko nastopijo težave v delovanju sistema Wiki.'; +$lang['error_delete'] = 'Prišlo je do napake med brisanjem vstavka <em>%s</em>: najverjetneje ni ustreznih dovoljenj za dostop do datoteke ali mape'; +$lang['enabled'] = 'Vstavek %s je omogočen.'; +$lang['notenabled'] = 'Vstavka %s ni mogoče omogočiti zaradi neustreznih dovoljen.'; +$lang['disabled'] = 'Vstavek %s je onemogočen.'; +$lang['notdisabled'] = 'Vstavka %s ni mogoče onemogočiti zaradi neustreznih dovoljen.'; +$lang['packageinstalled'] = 'Paket vstavka (%d vstavkov: %s) je uspešno nameščen.'; diff --git a/lib/plugins/usermanager/lang/sl/lang.php b/lib/plugins/usermanager/lang/sl/lang.php index dc2de375e..a10488e75 100644 --- a/lib/plugins/usermanager/lang/sl/lang.php +++ b/lib/plugins/usermanager/lang/sl/lang.php @@ -8,6 +8,7 @@ * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) * @author Matej Urbančič <mateju@svn.gnome.org> + * @author matej <mateju@svn.gnome.org> */ $lang['menu'] = 'Upravljanje uporabnikov'; $lang['noauth'] = '(overjanje istovetnosti uporabnikov ni na voljo)'; @@ -30,6 +31,8 @@ $lang['search'] = 'Iskanje'; $lang['search_prompt'] = 'Poišči'; $lang['clear'] = 'Počisti filter iskanja'; $lang['filter'] = 'Filter'; +$lang['export_all'] = 'Izvozi seznam vseh uporabnikov (CSV)'; +$lang['export_filtered'] = 'Izvozi filtriran seznam uporabnikov (CSV)'; $lang['import'] = 'Uvozi nove uporabnike'; $lang['line'] = 'Številka vrstice'; $lang['error'] = 'Sporočilo napake'; @@ -53,6 +56,10 @@ $lang['add_ok'] = 'Uporabnik je uspešno dodan'; $lang['add_fail'] = 'Dodajanje uporabnika je spodletelo'; $lang['notify_ok'] = 'Obvestilno sporočilo je poslano.'; $lang['notify_fail'] = 'Obvestilnega sporočila ni mogoče poslati.'; +$lang['import_userlistcsv'] = 'Datoteka seznama uporabnikov (CSV)'; +$lang['import_header'] = 'Zadnji uvoz podatkov – napake'; +$lang['import_success_count'] = 'Uvoz uporabnikov: %d najdenih, %d uspešno uvoženih.'; +$lang['import_failure_count'] = 'Uvoz uporabnikov: %d spodletelih. Napake so izpisane spodaj.'; $lang['import_error_fields'] = 'Neustrezno število polj; najdenih je %d, zahtevana pa so 4.'; $lang['import_error_baduserid'] = 'Manjka ID uporabnika'; $lang['import_error_badname'] = 'Napačno navedeno ime'; @@ -61,3 +68,4 @@ $lang['import_error_upload'] = 'Uvoz je spodletel. Datoteke CSV ni mogoče nal $lang['import_error_readfail'] = 'Uvoz je spodletel. Ni mogoče prebrati vsebine datoteke.'; $lang['import_error_create'] = 'Ni mogoče ustvariti računa uporabnika'; $lang['import_notify_fail'] = 'Obvestilnega sporočila za uvoženega uporabnika %s z elektronskim naslovom %s ni mogoče poslati.'; +$lang['import_downloadfailures'] = 'Prejmi podatke o napakah v datoteki CSV'; diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 85ddf503e..6b46add07 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -109,7 +109,7 @@ var dw_behaviour = { * @author Michael Klier <chi@chimeric.de> */ checkWindowsShares: function() { - if(!LANG.nosmblinks || typeof(document.all) !== 'undefined') { + if(!LANG.nosmblinks || navigator.userAgent.match(/(Trident|MSIE)/)) { // No warning requested or none necessary return; } diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index b1dbff683..56c185db7 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -148,7 +148,7 @@ function addBtnActionSignature($btn, props, edid) { function currentHeadlineLevel(textboxId){ var field = jQuery('#' + textboxId)[0], s = false, - opts = [field.value.substr(0,getSelection(field).start)]; + opts = [field.value.substr(0,DWgetSelection(field).start)]; if (field.form.prefix) { // we need to look in prefix context opts.push(field.form.prefix.value); @@ -217,10 +217,10 @@ jQuery(function () { } // set focus and place cursor at the start - var sel = getSelection($edit_text[0]); + var sel = DWgetSelection($edit_text[0]); sel.start = 0; sel.end = 0; - setSelection(sel); + DWsetSelection(sel); $edit_text.focus(); } diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js index 2c0924eb7..74919cb98 100644 --- a/lib/scripts/editor.js +++ b/lib/scripts/editor.js @@ -134,7 +134,7 @@ var dw_editor = { if(jQuery.inArray(e.keyCode,[8, 13, 32]) === -1) { return; } - var selection = getSelection(this); + var selection = DWgetSelection(this); if(selection.getLength() > 0) { return; //there was text selected, keep standard behavior } @@ -155,7 +155,7 @@ var dw_editor = { this.value.substr(selection.start); selection.start = linestart + 1; selection.end = linestart + 1; - setSelection(selection); + DWsetSelection(selection); } else { insertAtCarret(this.id,match[1]); } @@ -180,7 +180,7 @@ var dw_editor = { selection.start = linestart; selection.end = linestart; } - setSelection(selection); + DWsetSelection(selection); e.preventDefault(); // prevent backspace return false; } @@ -192,7 +192,7 @@ var dw_editor = { this.value.substr(linestart); selection.start = selection.start + 2; selection.end = selection.start; - setSelection(selection); + DWsetSelection(selection); e.preventDefault(); // prevent space return false; } diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh index 749b0f4e2..b0de441f9 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -7,15 +7,15 @@ # @author Andreas Gohr <andi@splitbrain.org> # @author Stefan Grönke <stefan@gronke.net> # @link https://code.google.com/apis/libraries/devguide.html#jquery - + # load jQuery wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js -O jquery.min.js wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js -O jquery.js - + # load jQuery-UI wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js -O jquery-ui.min.js wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js -O jquery-ui.js - + # load the smoothness theme mkdir -p jquery-ui-theme/images wget -nv -qO- https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css | sed "s/font-family:[^;]*;//" > jquery-ui-theme/smoothness.css @@ -23,4 +23,21 @@ images=`gawk 'match($0, /url\("?(images\/[^\)"]+)"?\)/, m) { print m[1] }' jquer for img in $images do wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/$img -O jquery-ui-theme/$img -done
\ No newline at end of file +done + +# load the localization data for jquery ui +for LNG in ../../../inc/lang/* +do + CODE=`basename $LNG` + wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-$CODE.js -O $LNG/jquery.ui.datepicker.js + if [ ! -s "$LNG/jquery.ui.datepicker.js" ]; then + rm -f $LNG/jquery.ui.datepicker.js + fi +done + +# some custom language codes +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-de.js -O ../../../inc/lang/de-informal/jquery.ui.datepicker.js +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-pt-BR.js -O ../../../inc/lang/pt-br/jquery.ui.datepicker.js +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-CN.js -O ../../../inc/lang/zh/jquery.ui.datepicker.js +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-TW.js -O ../../../inc/lang/zh-tw/jquery.ui.datepicker.js + diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js index f6ac9b032..e8191dbcb 100644 --- a/lib/scripts/linkwiz.js +++ b/lib/scripts/linkwiz.js @@ -214,7 +214,7 @@ var dw_linkwiz = { return; } - sel = getSelection(dw_linkwiz.textArea); + sel = DWgetSelection(dw_linkwiz.textArea); if(sel.start == 0 && sel.end == 0) { sel = dw_linkwiz.selection; } @@ -295,7 +295,7 @@ var dw_linkwiz = { * Show the link wizard */ show: function(){ - dw_linkwiz.selection = getSelection(dw_linkwiz.textArea); + dw_linkwiz.selection = DWgetSelection(dw_linkwiz.textArea); dw_linkwiz.$wiz.show(); dw_linkwiz.$entry.focus(); dw_linkwiz.autocomplete(); diff --git a/lib/scripts/textselection.js b/lib/scripts/textselection.js index 26b4196f2..818d5d950 100644 --- a/lib/scripts/textselection.js +++ b/lib/scripts/textselection.js @@ -5,7 +5,7 @@ /** * selection prototype * - * Object that capsulates the selection in a textarea. Returned by getSelection. + * Object that capsulates the selection in a textarea. Returned by DWgetSelection. * * @author Andreas Gohr <andi@splitbrain.org> */ @@ -34,7 +34,7 @@ function selection_class(){ * @link http://linebyline.blogspot.com/2006/11/textarea-cursor-position-in-internet.html * @returns object - a selection object */ -function getSelection(textArea) { +function DWgetSelection(textArea) { var sel = new selection_class(); sel.obj = textArea; @@ -119,14 +119,14 @@ function getSelection(textArea) { /** * Set the selection * - * You need to get a selection object via getSelection() first, then modify the + * You need to get a selection object via DWgetSelection() first, then modify the * start and end properties and pass it back to this function. * * @link http://groups.drupal.org/node/1210 * @author Andreas Gohr <andi@splitbrain.org> - * @param object selection - a selection object as returned by getSelection() + * @param {selection_class} selection a selection object as returned by DWgetSelection() */ -function setSelection(selection){ +function DWsetSelection(selection){ if(document.getSelection){ // FF // what a pleasure in FF ;) selection.obj.setSelectionRange(selection.start,selection.end); @@ -144,11 +144,11 @@ function setSelection(selection){ * selection * * @author Andreas Gohr <andi@splitbrain.org> - * @param string text - the new text to be pasted - * @param objct selecttion - selection object returned by getSelection - * @param int opts.startofs - number of charcters at the start to skip from new selection - * @param int opts.endofs - number of characters at the end to skip from new selection - * @param bool opts.nosel - set true if new text should not be selected + * @param {string} text the new text to be pasted + * @param {selection_class} selection selection object returned by DWgetSelection + * @param {int} opts.startofs number of charcters at the start to skip from new selection + * @param {int} opts.endofs number of characters at the end to skip from new selection + * @param {boolean} opts.nosel set true if new text should not be selected */ function pasteText(selection,text,opts){ if(!opts) opts = {}; @@ -173,7 +173,7 @@ function pasteText(selection,text,opts){ // no selection wanted? set cursor to end position if(opts.nosel) selection.start = selection.end; - setSelection(selection); + DWsetSelection(selection); } @@ -188,7 +188,7 @@ function pasteText(selection,text,opts){ function insertTags(textAreaID, tagOpen, tagClose, sampleText){ var txtarea = jQuery('#' + textAreaID)[0]; - var selection = getSelection(txtarea); + var selection = DWgetSelection(txtarea); var text = selection.getText(); var opts; @@ -226,6 +226,6 @@ function insertTags(textAreaID, tagOpen, tagClose, sampleText){ */ function insertAtCarret(textAreaID, text){ var txtarea = jQuery('#' + textAreaID)[0]; - var selection = getSelection(txtarea); + var selection = DWgetSelection(txtarea); pasteText(selection,text,{nosel: true}); } diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 88cae1e8c..09c374bc4 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -101,7 +101,7 @@ function tb_format(btn, props, edid) { function tb_formatln(btn, props, edid) { var sample = props.sample || props.title, opts, - selection = getSelection(jQuery('#'+edid)[0]); + selection = DWgetSelection(jQuery('#'+edid)[0]); sample = fixtxt(sample); props.open = fixtxt(props.open); diff --git a/lib/tpl/dokuwiki/css/basic.less b/lib/tpl/dokuwiki/css/basic.less index 5886889fd..c296185e9 100644 --- a/lib/tpl/dokuwiki/css/basic.less +++ b/lib/tpl/dokuwiki/css/basic.less @@ -101,7 +101,9 @@ address { padding: 0; } -div { +div, +video, +audio { margin: 0; padding: 0; } |