
commit
06aa676464
317 changed files with 8724 additions and 0 deletions
@ -0,0 +1,312 @@
|
||||
* text=auto !eol |
||||
/articles-links-json.html -text |
||||
/auteurs-links-json.html -text |
||||
/breves-links-json.html -text |
||||
ckeditor-plugin/spip/dialogs/spip.js -text |
||||
ckeditor-plugin/spip/lang/ar.js -text |
||||
ckeditor-plugin/spip/lang/en.js -text |
||||
ckeditor-plugin/spip/lang/fr.js -text |
||||
ckeditor-plugin/spip/plugin.js -text |
||||
ckeditor-plugin/spip/spip.gif -text |
||||
ckeditor-plugin/spipdoc/dialogs/spipdoc.js -text |
||||
ckeditor-plugin/spipdoc/lang/ar.js -text |
||||
ckeditor-plugin/spipdoc/lang/en.js -text |
||||
ckeditor-plugin/spipdoc/lang/fr.js -text |
||||
ckeditor-plugin/spipdoc/plugin.js -text |
||||
ckeditor-plugin/spipdoc/spipdoc.gif -text |
||||
ckeditor-plugin/spipdoc/spipdoc.png -text svneol=unset#image/png |
||||
ckeditor-plugin/spipmodeles/dialogs/spipmodeles.js -text |
||||
ckeditor-plugin/spipmodeles/lang/fr.js -text |
||||
ckeditor-plugin/spipmodeles/plugin.js -text |
||||
ckeditor-plugin/spipsave/plugin.js -text |
||||
ckeditor-plugin/zpippreview/plugin.js -text |
||||
ckeditor-plugin/zpippreview/preview.png -text svneol=unset#image/png |
||||
/ckeditor_administrations.php -text |
||||
/ckeditor_autorisations.php -text |
||||
/ckeditor_fonctions.php -text |
||||
/ckeditor_options.php -text |
||||
/ckeditor_pipelines.php -text |
||||
/ckspip_convert.html -text |
||||
css/cked-cfg.css -text |
||||
css/cked-editor.css -text |
||||
css/ckeditor.css.html -text |
||||
css/filebrowser.css -text |
||||
/filebrowser.html -text |
||||
fonds/ckeditor4spip.js.html -text |
||||
formulaires/configurer_ckeditor.html -text |
||||
formulaires/configurer_ckeditor.php -text |
||||
formulaires/configurer_ckeditor_p2.html -text |
||||
formulaires/configurer_ckeditor_p2.php -text |
||||
formulaires/configurer_ckeditor_p3.html -text |
||||
formulaires/configurer_ckeditor_p3.php -text |
||||
formulaires/configurer_ckeditor_p4.html -text |
||||
formulaires/configurer_ckeditor_p4.php -text |
||||
formulaires/configurer_ckeditor_p5.html -text |
||||
formulaires/configurer_ckeditor_p5.php -text |
||||
formulaires/configurer_ckeditor_p6.html -text |
||||
formulaires/configurer_ckeditor_p6.php -text |
||||
formulaires/configurer_ckeditor_p7.html -text |
||||
formulaires/configurer_ckeditor_p7.php -text |
||||
formulaires/configurer_ckeditor_p8.html -text |
||||
formulaires/configurer_ckeditor_p8.php -text |
||||
/groupemots-links-json.html -text |
||||
images/aide.gif -text |
||||
images/ckeditor.png -text svneol=unset#image/png |
||||
images/ckeditor_spip.png -text svneol=unset#image/png |
||||
images/ckspip-icone.png -text svneol=unset#image/png |
||||
images/ckspip-logo.png -text svneol=unset#image/png |
||||
images/document-new.png -text svneol=unset#image/png |
||||
images/folder-new.png -text svneol=unset#image/png |
||||
images/folder.png -text svneol=unset#image/png |
||||
images/icons/ckeditor-icons.png -text svneol=unset#image/png |
||||
images/icons/icon-00.png -text svneol=unset#image/png |
||||
images/icons/icon-01.png -text svneol=unset#image/png |
||||
images/icons/icon-02.png -text svneol=unset#image/png |
||||
images/icons/icon-03.png -text svneol=unset#image/png |
||||
images/icons/icon-04.png -text svneol=unset#image/png |
||||
images/icons/icon-05.png -text svneol=unset#image/png |
||||
images/icons/icon-06.png -text svneol=unset#image/png |
||||
images/icons/icon-07.png -text svneol=unset#image/png |
||||
images/icons/icon-08.png -text svneol=unset#image/png |
||||
images/icons/icon-09.png -text svneol=unset#image/png |
||||
images/icons/icon-10.png -text svneol=unset#image/png |
||||
images/icons/icon-11.png -text svneol=unset#image/png |
||||
images/icons/icon-12.png -text svneol=unset#image/png |
||||
images/icons/icon-13.png -text svneol=unset#image/png |
||||
images/icons/icon-14.png -text svneol=unset#image/png |
||||
images/icons/icon-15.png -text svneol=unset#image/png |
||||
images/icons/icon-16.png -text svneol=unset#image/png |
||||
images/icons/icon-17.png -text svneol=unset#image/png |
||||
images/icons/icon-18.png -text svneol=unset#image/png |
||||
images/icons/icon-19.png -text svneol=unset#image/png |
||||
images/icons/icon-20.png -text svneol=unset#image/png |
||||
images/icons/icon-21.png -text svneol=unset#image/png |
||||
images/icons/icon-22.png -text svneol=unset#image/png |
||||
images/icons/icon-23.png -text svneol=unset#image/png |
||||
images/icons/icon-24.png -text svneol=unset#image/png |
||||
images/icons/icon-25.png -text svneol=unset#image/png |
||||
images/icons/icon-26.png -text svneol=unset#image/png |
||||
images/icons/icon-27.png -text svneol=unset#image/png |
||||
images/icons/icon-28.png -text svneol=unset#image/png |
||||
images/icons/icon-29.png -text svneol=unset#image/png |
||||
images/icons/icon-30.png -text svneol=unset#image/png |
||||
images/icons/icon-31.png -text svneol=unset#image/png |
||||
images/icons/icon-32.png -text svneol=unset#image/png |
||||
images/icons/icon-33.png -text svneol=unset#image/png |
||||
images/icons/icon-34.png -text svneol=unset#image/png |
||||
images/icons/icon-35.png -text svneol=unset#image/png |
||||
images/icons/icon-36.png -text svneol=unset#image/png |
||||
images/icons/icon-37.png -text svneol=unset#image/png |
||||
images/icons/icon-38.png -text svneol=unset#image/png |
||||
images/icons/icon-39.png -text svneol=unset#image/png |
||||
images/icons/icon-40.png -text svneol=unset#image/png |
||||
images/icons/icon-41.png -text svneol=unset#image/png |
||||
images/icons/icon-42.png -text svneol=unset#image/png |
||||
images/icons/icon-43.png -text svneol=unset#image/png |
||||
images/icons/icon-44.png -text svneol=unset#image/png |
||||
images/icons/icon-45.png -text svneol=unset#image/png |
||||
images/icons/icon-46.png -text svneol=unset#image/png |
||||
images/icons/icon-47.png -text svneol=unset#image/png |
||||
images/icons/icon-48.png -text svneol=unset#image/png |
||||
images/icons/icon-49.png -text svneol=unset#image/png |
||||
images/icons/icon-50.png -text svneol=unset#image/png |
||||
images/icons/icon-51.png -text svneol=unset#image/png |
||||
images/icons/icon-52.png -text svneol=unset#image/png |
||||
images/icons/icon-53.png -text svneol=unset#image/png |
||||
images/icons/icon-54.png -text svneol=unset#image/png |
||||
images/icons/icon-55.png -text svneol=unset#image/png |
||||
images/icons/icon-56.png -text svneol=unset#image/png |
||||
images/icons/icon-57.png -text svneol=unset#image/png |
||||
images/icons/icon-58.png -text svneol=unset#image/png |
||||
images/icons/icon-59.png -text svneol=unset#image/png |
||||
images/icons/icon-60.png -text svneol=unset#image/png |
||||
images/icons/icon-61.png -text svneol=unset#image/png |
||||
images/icons/icon-62.png -text svneol=unset#image/png |
||||
images/icons/icon-63.png -text svneol=unset#image/png |
||||
images/icons/icon-64.png -text svneol=unset#image/png |
||||
images/icons/icon-65.png -text svneol=unset#image/png |
||||
images/icons/icon-66.png -text svneol=unset#image/png |
||||
images/icons/icon-67.png -text svneol=unset#image/png |
||||
images/icons/icon-68.png -text svneol=unset#image/png |
||||
images/icons/icon-69.png -text svneol=unset#image/png |
||||
images/icons/icon-70.png -text svneol=unset#image/png |
||||
images/icons/icon-71.png -text svneol=unset#image/png |
||||
images/icons/icon-72.png -text svneol=unset#image/png |
||||
images/icons/icon-73.png -text svneol=unset#image/png |
||||
images/icons/icon-74.png -text svneol=unset#image/png |
||||
images/icons/icon-75.png -text svneol=unset#image/png |
||||
images/icons/icon-76.png -text svneol=unset#image/png |
||||
images/icons/icon-77.png -text svneol=unset#image/png |
||||
images/icons/icon-78.png -text svneol=unset#image/png |
||||
images/icons/icon-79.png -text svneol=unset#image/png |
||||
images/icons/icon-80.png -text svneol=unset#image/png |
||||
images/icons/icon-81.png -text svneol=unset#image/png |
||||
images/icons/icon-82.png -text svneol=unset#image/png |
||||
images/searching.gif -text |
||||
images/templates/template1.gif -text |
||||
images/templates/template2.gif -text |
||||
images/templates/template3.gif -text |
||||
images/templates/template4.gif -text |
||||
images/templates/template5.gif -text |
||||
images/templates/template6.gif -text |
||||
images/templates/template7.gif -text |
||||
inc/ckeditor_cfgtools.php -text |
||||
inc/ckeditor_constantes.php -text |
||||
inc/ckeditor_constantes_inc.php -text |
||||
inc/ckeditor_constantes_inc.php.bak -text |
||||
inc/ckeditor_install.php -text |
||||
inc/ckeditor_lire_config.php -text |
||||
inc/ckeditor_spipv2.php -text |
||||
inc/ckeditor_tools.php -text |
||||
inc/json_encode.php -text |
||||
inc/toolbars.php -text |
||||
js/vardump.js -text |
||||
/lang.inc.php -text |
||||
lang/ckeditor_ar.php -text |
||||
lang/ckeditor_en.php -text |
||||
lang/ckeditor_fr.php -text |
||||
lang/paquet-ckeditor_fr.php -text |
||||
modeles/inc-aucun-document.html -text |
||||
modeles/inc-documents-articles.html -text |
||||
modeles/inc-documents-rubriques.html -text |
||||
modeles/inc-documents-tous.html -text |
||||
/mots-links-json.html -text |
||||
/paquet.xml -text |
||||
/plugin.xml -text |
||||
prive/exec/configurer_ckeditor.html -text |
||||
prive/exec/configurer_ckeditor_p2.html -text |
||||
prive/exec/configurer_ckeditor_p3.html -text |
||||
prive/exec/configurer_ckeditor_p4.html -text |
||||
prive/exec/configurer_ckeditor_p5.html -text |
||||
prive/exec/configurer_ckeditor_p6.html -text |
||||
prive/exec/configurer_ckeditor_p7.html -text |
||||
prive/exec/configurer_ckeditor_p8.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor_p2.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor_p3.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor_p4.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor_p5.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor_p6.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor_p7.html -text |
||||
prive/squelettes/contenu/configurer_ckeditor_p8.html -text |
||||
prive/squelettes/head/configurer_ckeditor-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p2-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p3-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p3.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p4-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p4.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p5-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p5.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p6-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p6.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p7-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p7.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p8-v2.html -text |
||||
prive/squelettes/head/configurer_ckeditor_p8.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor_p2.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor_p3.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor_p4.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor_p5.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor_p6.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor_p7.html -text |
||||
prive/squelettes/navigation/configurer_ckeditor_p8.html -text |
||||
prive/themes/spip/images/ckspip-logo-16.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/ckspip-logo-24.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/ckspip-logo.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/ckeditor-icons.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-00.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-01.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-02.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-03.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-04.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-05.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-06.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-07.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-08.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-09.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-10.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-11.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-12.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-13.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-14.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-15.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-16.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-17.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-18.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-19.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-20.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-21.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-22.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-23.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-24.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-25.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-26.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-27.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-28.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-29.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-30.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-31.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-32.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-33.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-34.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-35.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-36.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-37.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-38.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-39.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-40.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-41.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-42.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-43.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-44.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-45.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-46.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-47.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-48.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-49.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-50.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-51.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-52.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-53.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-54.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-55.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-56.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-57.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-58.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-59.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-60.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-61.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-62.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-63.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-64.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-65.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-66.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-67.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-68.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-69.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-70.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-71.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-72.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-73.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-74.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-75.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-76.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-77.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-78.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-79.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-80.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-81.png -text svneol=unset#image/png |
||||
prive/themes/spip/images/icons/icon-82.png -text svneol=unset#image/png |
||||
/rubriques-links-json.html -text |
||||
saisies/case_image.html -text |
||||
saisies/explication_spip.html -text |
||||
saisies/selecteur_images.html -text |
||||
/select_documents.html -text |
||||
/spip-styles.html -text |
||||
/spiplinks-json.html -text |
||||
/spiplistes-json.html -text |
||||
/spiptags-json.html -text |
||||
/templates.js.html -text |
@ -0,0 +1,11 @@
|
||||
#CACHE{0} |
||||
[(#HTTP_HEADER{Content-type: application/json[; charset=(#CHARSET)]})] |
||||
<BOUCLE_si(CONDITION){si #SESSION{statut}|<{2}}> |
||||
[<BOUCLE_articles(ARTICLES) {id_rubrique=#ENV{id_rubrique}} {par num titre, titre}{inverse}> |
||||
{ |
||||
"titre": [(#TITRE|strip_tags|couper{30}|json_encode)], |
||||
"url": [(#URL_PAGE{article}|parametre_url{id_article,#ID_ARTICLE}|json_encode)], |
||||
"id": [(#ID_ARTICLE|json_encode)] |
||||
}[(#COMPTEUR_BOUCLE|!={#TOTAL_BOUCLE}|?{',',''})] |
||||
</BOUCLE_articles>] |
||||
</BOUCLE_si> |
@ -0,0 +1,11 @@
|
||||
#CACHE{0} |
||||
[(#HTTP_HEADER{Content-type: application/json[; charset=(#CHARSET)]})] |
||||
<BOUCLE_si(CONDITION){si #SESSION{statut}|<{2}}> |
||||
[<BOUCLE_auteurs(AUTEURS) {par nom}{inverse}> |
||||
{ |
||||
"titre": [(#NOM|strip_tags|couper{30}|json_encode)], |
||||
"url": [(#URL_PAGE{auteur}|parametre_url{id_auteur,#ID_AUTEUR}|json_encode)], |
||||
"id": [(#ID_AUTEUR|json_encode)] |
||||
}[(#COMPTEUR_BOUCLE|!={#TOTAL_BOUCLE}|?{',',''})] |
||||
</BOUCLE_auteurs>] |
||||
</BOUCLE_si> |
@ -0,0 +1,11 @@
|
||||
#CACHE{0} |
||||
[(#HTTP_HEADER{Content-type: application/json[; charset=(#CHARSET)]})] |
||||
<BOUCLE_si(CONDITION){si #SESSION{statut}|<{2}}> |
||||
[<BOUCLE_breves(BREVES) {id_rubrique=#ENV{id_rubrique}} {par num titre, titre}{inverse}> |
||||
{ |
||||
"titre": [(#TITRE|strip_tags|couper{30}|json_encode)], |
||||
"url": [(#URL_PAGE{breve}|parametre_url{id_breve,#ID_BREVE}|json_encode)], |
||||
"id": "#ID_BREVE" |
||||
}[(#COMPTEUR_BOUCLE|!={#TOTAL_BOUCLE}|?{',',''})] |
||||
</BOUCLE_breves>] |
||||
</BOUCLE_si> |
@ -0,0 +1,219 @@
|
||||
/* |
||||
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/ |
||||
|
||||
function numericEntitiesDecode(st) { |
||||
return st.replace(/&#(\d+);/g, |
||||
function() { return String.fromCharCode(arguments[1]); } |
||||
).replace(/ /ig, '\u00a0') ; |
||||
} |
||||
|
||||
var spipDialog ; |
||||
var spipLinks ;
|
||||
|
||||
function loadSelectFromSpipJSON(dialog, page, tabId, itemId) { |
||||
jQuery.getJSON(CKEDITOR.spipurl+page, function (data) { |
||||
var mySelect = dialog.getContentElement(tabId, itemId) ; |
||||
mySelect.clear() ; |
||||
dialog.options[tabId][itemId] = { } ; |
||||
jQuery.each(data, function(ndx, item) { |
||||
if (item.id != "-1") { |
||||
var level,pretitre = '' ; |
||||
level = item.level ; |
||||
while(level-->0) { pretitre = pretitre + '\u00a0\u00a0' ; } // deux espaces insécables
|
||||
if (pretitre) { pretitre = pretitre + '\u21b3' ; } // fleche
|
||||
mySelect.add(pretitre + numericEntitiesDecode(item.titre), ndx) ; |
||||
dialog.options[tabId][itemId][ndx] = item ; |
||||
} |
||||
}) ; |
||||
if (itemId == 'selectCategorie') { |
||||
updateItem(dialog) ; |
||||
} |
||||
}) ; |
||||
} |
||||
|
||||
function ucfirst(st) { |
||||
var parts = st.match(/^(.)(.*)$/) ; |
||||
return parts[1].toUpperCase() + parts[2] ; |
||||
} |
||||
|
||||
function updateItem(dialog) { |
||||
if (dialog) { |
||||
var type = dialog.getValueOf('tab1', 'selectType') ; |
||||
var selectCategorie = dialog.getContentElement('tab1', 'selectCategorie') ; |
||||
var selectItem = dialog.getContentElement('tab1', 'selectItem') ; |
||||
var editor = dialog.getParentEditor() ; |
||||
if(selectCategorie.getLabel() != numericEntitiesDecode(spipLinks[type].nomCategorie)) { |
||||
selectCategorie.setLabel(numericEntitiesDecode(spipLinks[type].nomCategorie)) ; |
||||
loadSelectFromSpipJSON(dialog, spipLinks[type].selectCategorie, 'tab1', 'selectCategorie') ; |
||||
}
|
||||
if (spipLinks[type].selectItem) { |
||||
selectItem.setLabel(numericEntitiesDecode(spipLinks[type].nomItem)) ; |
||||
selectItem.getElement().show() ; |
||||
var rubrique = dialog.getValueOf('tab1', 'selectCategorie') ; |
||||
if (dialog.options['tab1']['selectCategorie'][rubrique]) { |
||||
loadSelectFromSpipJSON(dialog, spipLinks[type].selectItem + dialog.options['tab1']['selectCategorie'][rubrique].id, 'tab1', 'selectItem') ; |
||||
} |
||||
} else { |
||||
selectItem.setLabel('') ; |
||||
selectItem.getElement().hide() ; |
||||
} |
||||
} |
||||
} |
||||
|
||||
CKEDITOR.dialog.add( 'spip', function( editor ) |
||||
{ |
||||
var dialog ; |
||||
|
||||
return { |
||||
title : editor.lang.spip.title, |
||||
minWidth : 360, |
||||
minHeight : 150, |
||||
onLoad : function() // tiré de uiColor
|
||||
{ |
||||
spipDialog = dialog = this; |
||||
this.options = {'tab1' : { 'selectCategorie' : {}, 'selectItem' : {} } } ; |
||||
this.setupContent() ; |
||||
|
||||
// #3808
|
||||
if ( CKEDITOR.env.ie7Compat ) |
||||
dialog.parts.contents.setStyle( 'overflow', 'hidden' ); |
||||
|
||||
}, |
||||
onShow : function () { |
||||
var editor = this.getParentEditor() ; |
||||
if (editor.getSelection()) { |
||||
var selection ; |
||||
if (CKEDITOR.env.ie) { |
||||
selection = editor.getSelection().document.$.selection.createRange().text; |
||||
} else { |
||||
selection = editor.getSelection().getNative(); |
||||
}
|
||||
this.setValueOf('tab1', 'linkText', selection) ; |
||||
} |
||||
jQuery.getJSON(CKEDITOR.spipurl + '?page=spiplinks-json', function (json) { |
||||
var selectType = dialog.getContentElement('tab1', 'selectType') ; |
||||
selectType.clear() ; |
||||
spipLinks = json ; |
||||
jQuery.each(spipLinks, function(type, item) { |
||||
selectType.add(numericEntitiesDecode(item.label), type) ; |
||||
}) ; |
||||
updateItem(dialog) ; |
||||
}) ; |
||||
}, |
||||
onOk : function () { |
||||
|
||||
var idUrl, urlSpip, defaultText ; |
||||
if (spipLinks[this.getValueOf('tab1', 'selectType')].selectItem) { |
||||
idUrl = this.getValueOf('tab1', 'selectItem') ; |
||||
defaultText = this.options['tab1']['selectItem'][idUrl].titre ; |
||||
urlSpip = this.options['tab1']['selectItem'][idUrl].url ; |
||||
} else { |
||||
idUrl = this.getValueOf('tab1', 'selectCategorie') ; |
||||
defaultText = this.options['tab1']['selectCategorie'][idUrl].titre ; |
||||
urlSpip = this.options['tab1']['selectCategorie'][idUrl].url ; |
||||
} |
||||
defaultText = defaultText.replace(/^(\s| )+/g, '') ; |
||||
|
||||
var editor = this.getParentEditor() ; |
||||
var sel = editor.getSelection() ; |
||||
var element = sel.getSelectedElement() ; |
||||
var linktext = this.getValueOf('tab1', 'linkText') ; |
||||
var text=( linktext ? linktext : defaultText ) ; |
||||
|
||||
|
||||
if (element && (element.getName() == 'a')) { // on a déja un <a >, on l'utilise :
|
||||
if (linktext) { element.setText(linktext) ; } |
||||
element.setAttribute('href', urlSpip) ; |
||||
editor.insertElement(element) ; |
||||
} else if (element && (element.getParent().getName() == 'a')) { // le parent est un <a, on l'utilise :
|
||||
var elparent = element.getParent() ; |
||||
if (linktext) { elparent.setText(linktext) ; } |
||||
elparent.setAttribute('href', urlSpip) ; |
||||
editor.insertElement(elparent) ; |
||||
} else if (element && (element.getName() == 'img')) { |
||||
var link = editor.document.createElement( 'a' ); |
||||
link.setAttribute('href', urlSpip) ; |
||||
if (linktext) link.setText(linktext) ; |
||||
link.append(element.clone()) ; |
||||
editor.insertElement(link) ; |
||||
} else { // sinon, on en crée un :
|
||||
var parentNode = editor.getSelection().getRanges()[0].startContainer.getParent() ; |
||||
if (parentNode.getName() == 'a') { |
||||
if (linktext) { parentNode.setText(linktext) ; } |
||||
parentNode.setAttribute('href', urlSpip) ; |
||||
} else { |
||||
var link = editor.document.createElement( 'a' ); |
||||
link.setAttribute('href', urlSpip) ; |
||||
link.setText(numericEntitiesDecode(text)) ; |
||||
editor.insertElement(link) ; |
||||
} |
||||
} |
||||
}, |
||||
contents : [ |
||||
{ |
||||
id : 'tab1', |
||||
label : '', |
||||
title : '', |
||||
expand : true, |
||||
padding : 0, |
||||
elements : |
||||
[ |
||||
{ |
||||
id : '', |
||||
type : 'vbox', |
||||
children : |
||||
[ |
||||
{ |
||||
id : 'linkText', |
||||
type : 'text', |
||||
label : editor.lang.spip.linktext |
||||
}, |
||||
{ |
||||
id : '', |
||||
type : 'hbox', |
||||
children : |
||||
[ |
||||
{ |
||||
id : 'selectType', |
||||
label : editor.lang.spip.linktype, |
||||
type : 'select', |
||||
items : [], |
||||
onChange: function() { |
||||
updateItem(dialog) ; |
||||
} |
||||
}, |
||||
{ |
||||
id : '', |
||||
type : 'vbox', |
||||
children : |
||||
[ |
||||
{ |
||||
id : 'selectCategorie', |
||||
label : '_', |
||||
type : 'select', |
||||
items : [], |
||||
onChange: function() { |
||||
updateItem(dialog) ; |
||||
} |
||||
|
||||
}, |
||||
{ |
||||
id : 'selectItem', |
||||
label : '_', |
||||
type : 'select', |
||||
items : [] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
], |
||||
buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ] |
||||
}; |
||||
} ); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/ |
||||
|
||||
CKEDITOR.plugins.setLang( 'spip', 'ar', |
||||
{ |
||||
spip : |
||||
{ |
||||
title : 'إضافةرابط SPIP', |
||||
linktext : 'نص الرابط:', |
||||
linktype : 'نوع الرابط:', |
||||
article : 'مقال', |
||||
section : 'قسم', |
||||
shortnews : 'خبر', |
||||
checkconfig : 'You should check site url of your site in CKeditor spip plugin.' |
||||
} |
||||
}); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/ |
||||
|
||||
CKEDITOR.plugins.setLang( 'spip', 'en', |
||||
{ |
||||
spip : |
||||
{ |
||||
title : 'Insert a SPIP link', |
||||
linktext : 'Link text :', |
||||
linktype : 'Link type :', |
||||
article : 'Article', |
||||
section : 'Section', |
||||
shortnews : 'Short news', |
||||
checkconfig : 'You should check site url of your site in CKeditor spip plugin.' |
||||
} |
||||
}); |
@ -0,0 +1,27 @@
|
||||
/* |
||||
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/ |
||||
|
||||
CKEDITOR.plugins.setLang( 'spip', 'fr', |
||||
{ |
||||
spip : |
||||
{ |
||||
title : 'Insérer un lien SPIP', |
||||
linktext : 'Texte du lien :', |
||||
linktype : 'Type de lien :', |
||||
article : 'Article', |
||||
section : 'Rubrique', |
||||
shortnews : 'Brêve', |
||||
groupemots : 'Groupe de mots clés', |
||||
mot : 'Mot clé' , |
||||
auteur : 'Auteur', |
||||
articleLabel : 'Article :', |
||||
sectionLabel : 'Rubrique :', |
||||
shortnewsLabel : 'Brêve :', |
||||
groupemotsLabel : 'Groupe de mots clés :', |
||||
motLabel : 'Mot clé :', |
||||
auteurLabel : 'Auteur :', |
||||
checkconfig : 'Vous devriez vérifier que l\'adresse de votre site est correctement configurer pour le plugin CKeditor de spip.' |
||||
} |
||||
}); |
@ -0,0 +1,26 @@
|
||||
/* |
||||
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/ |
||||
|
||||
CKEDITOR.plugins.add( 'spip', |
||||
{ |
||||
requires : [ 'dialog' ], |
||||
lang : [ 'ar', 'en', 'fr' ], |
||||
|
||||
init : function( editor ) |
||||
{ |
||||
if ( CKEDITOR.env.ie6Compat ) |
||||
return; |
||||
|
||||
editor.addCommand( 'spip', new CKEDITOR.dialogCommand( 'spip' ) ); |
||||
editor.ui.addButton( 'Spip', |
||||
{ |
||||
label : editor.lang.spip.title, |
||||
command : 'spip', |
||||
icon : this.path + 'spip.gif' |
||||
}); |
||||
CKEDITOR.dialog.add( 'spip', this.path + 'dialogs/spip.js' ); |
||||
|
||||
} |
||||
} ); |
After Width: | Height: | Size: 605 B |
@ -0,0 +1,770 @@
|
||||
/* |
||||
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/ |
||||
|
||||
|
||||
(function() |
||||
{ |
||||
// Load image preview.
|
||||
var IMAGE = 1, |
||||
PREVIEW = 4, |
||||
CLEANUP = 8, |
||||
regexGetSize = /^\s*(\d+)((px)|\%)?\s*$/i, |
||||
regexGetSizeOrEmpty = /(^\s*(\d+)((px)|\%)?\s*$)|^$/i, |
||||
regexGetSpipDoc = /^(.*)\?docid=(\d+)(?:(&|&)doctype=(\w+))?((&|&)docparam=(.*))?$/, |
||||
urlUpdating = false ; |
||||
|
||||
var updateUrl = function(item, editor, caller) { |
||||
if (!urlUpdating) { |
||||
urlUpdating = true ; |
||||
var dialog = item.getDialog() ; |
||||
|
||||
var docId = dialog.getValueOf('info', 'docId'), |
||||
docType = dialog.getValueOf('info', 'docType'), |
||||
docParam = dialog.getValueOf('info', 'docParam'), |
||||
url = dialog.getValueOf('info', 'txtUrl'), |
||||
doctypeRegex = /^.*\/([^-]+).*?\.(png|gif|jpe?g)$/ ; |
||||
|
||||
if (url) { |
||||
var docMatch = url.match( regexGetSpipDoc ) ; |
||||
if (docMatch) { |
||||
var m = docMatch[1].match( doctypeRegex ) ; |
||||
if ( m && ( (m[1].toLowerCase() == 'mp3') || (m[1].toLowerCase() == 'flv') ) &&
|
||||
(!docParam.match( /^(.*\|)?player(\|.*)?$/ )) ) { |
||||
if ((caller == 'txtUrl') && confirm( editor.lang.spipdoc.multimedia_content_add_player ) ) { |
||||
dialog.setValueOf('info','docType', 'doc') ; |
||||
docType = 'doc'; // ne pas tenir compte du docType, on souhaite un player, donc un 'doc'
|
||||
if (docParam) { |
||||
docParam = 'player|'+docParam ; |
||||
} else {
|
||||
docParam = 'player' ; |
||||
} |
||||
dialog.setValueOf('info', 'docParam', docParam) ; |
||||
} |
||||
} |
||||
if (docMatch[7] == undefined) { docMatch[7] = '' ; } |
||||
var mustUpdate = (docId != docMatch[2]) || (docType != docMatch[4]) || (docParam != docMatch[7]) ; |
||||
if (true) { |
||||
var newUrl = docMatch[1]+"?docid="+docId+"&doctype="+docType ; |
||||
if (docParam) { |
||||
newUrl = newUrl+"&docparam="+encodeURI(docParam) ; |
||||
}
|
||||
dialog.setValueOf('info', 'txtUrl', newUrl) ; |
||||
} |
||||
} |
||||
} |
||||
urlUpdating = false ; |
||||
} |
||||
return true ; |
||||
} |
||||
var onSizeChange = function() |
||||
{ |
||||
var value = this.getValue(), // This = input element.
|
||||
dialog = this.getDialog(), |
||||
aMatch = value.match( regexGetSize ); // Check value
|
||||
if ( aMatch ) |
||||
{ |
||||
if ( aMatch[2] == '%' ) // % is allowed - > unlock ratio.
|
||||
switchLockRatio( dialog, false ); // Unlock.
|
||||
value = aMatch[1]; |
||||
} |
||||
|
||||
// Only if ratio is locked
|
||||
if ( dialog.lockRatio ) |
||||
{ |
||||
var oImageOriginal = dialog.originalElement; |
||||
if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' ) |
||||
{ |
||||
if ( this.id == 'txtHeight' ) |
||||
{ |
||||
if ( value && value != '0' ) |
||||
value = Math.round( oImageOriginal.$.width * ( value / oImageOriginal.$.height ) ); |
||||
if ( !isNaN( value ) ) |
||||
dialog.setValueOf( 'info', 'txtWidth', value ); |
||||
} |
||||
else //this.id = txtWidth.
|
||||
{ |
||||
if ( value && value != '0' ) |
||||
value = Math.round( oImageOriginal.$.height * ( value / oImageOriginal.$.width ) ); |
||||
if ( !isNaN( value ) ) |
||||
dialog.setValueOf( 'info', 'txtHeight', value ); |
||||
} |
||||
} |
||||
} |
||||
updatePreview( dialog ); |
||||
}; |
||||
|
||||
var updatePreview = function( dialog ) |
||||
{ |
||||
//Don't load before onShow.
|
||||
if ( !dialog.originalElement || !dialog.preview ) |
||||
return 1; |
||||
|
||||
// Read attributes and update imagePreview;
|
||||
dialog.commitContent( PREVIEW, dialog.preview ); |
||||
return 0; |
||||
}; |
||||
|
||||
var switchLockRatio = function( dialog, value ) |
||||
{ |
||||
var oImageOriginal = dialog.originalElement, |
||||
ratioButton = CKEDITOR.document.getById( 'btnLockSizes' ); |
||||
|
||||
if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' ) |
||||
{ |
||||
if ( value == 'check' ) // Check image ratio and original image ratio.
|
||||
{ |
||||
var width = dialog.getValueOf( 'info', 'txtWidth' ), |
||||
height = dialog.getValueOf( 'info', 'txtHeight' ), |
||||
originalRatio = oImageOriginal.$.width * 1000 / oImageOriginal.$.height, |
||||
thisRatio = width * 1000 / height; |
||||
dialog.lockRatio = false; // Default: unlock ratio
|
||||
|
||||
if ( !width && !height ) |
||||
dialog.lockRatio = true; |
||||
else if ( !isNaN( originalRatio ) && !isNaN( thisRatio ) ) |
||||
{ |
||||
if ( Math.round( originalRatio ) == Math.round( thisRatio ) ) |
||||
dialog.lockRatio = true; |
||||
} |
||||
} |
||||
else if ( value != undefined ) |
||||
dialog.lockRatio = value; |
||||
else |
||||
dialog.lockRatio = !dialog.lockRatio; |
||||
} |
||||
else if ( value != 'check' ) // I can't lock ratio if ratio is unknown.
|
||||
dialog.lockRatio = false; |
||||
|
||||
if ( dialog.lockRatio ) |
||||
ratioButton.removeClass( 'cke_btn_unlocked' ); |
||||
else |
||||
ratioButton.addClass( 'cke_btn_unlocked' ); |
||||
|
||||
return dialog.lockRatio; |
||||
}; |
||||
|
||||
var resetSize = function( dialog ) |
||||
{ |
||||
var oImageOriginal = dialog.originalElement; |
||||
if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' ) |
||||
{ |
||||
dialog.setValueOf( 'info', 'txtWidth', oImageOriginal.$.width ); |
||||
dialog.setValueOf( 'info', 'txtHeight', oImageOriginal.$.height ); |
||||
} |
||||
updatePreview( dialog ); |
||||
}; |
||||
|
||||
var setupDimension = function( type, element ) |
||||
{ |
||||
if ( type != IMAGE ) |
||||
return; |
||||
|
||||
function checkDimension( size, defaultValue ) |
||||
{ |
||||
var aMatch = size.match( regexGetSize ); |
||||
if ( aMatch ) |
||||
{ |
||||
if ( aMatch[2] == '%' ) // % is allowed.
|
||||
{ |
||||
aMatch[1] += '%'; |
||||
switchLockRatio( dialog, false ); // Unlock ratio
|
||||
} |
||||
return aMatch[1]; |
||||
} |
||||
return defaultValue; |
||||
} |
||||
|
||||
var dialog = this.getDialog(), |
||||
value = '', |
||||
dimension = (( this.id == 'txtWidth' )? 'width' : 'height' ), |
||||
size = element.getAttribute( dimension ); |
||||
|
||||
if ( size ) |
||||
value = checkDimension( size, value ); |
||||
value = checkDimension( element.$.style[ dimension ], value ); |
||||
|
||||
this.setValue( value ); |
||||
}; |
||||
|
||||
var spipdocDialog = function( editor, dialogType ) |
||||
{ |
||||
var onImgLoadEvent = function() |
||||
{ |
||||
// Image is ready.
|
||||
var original = this.originalElement; |
||||
original.setCustomData( 'isReady', 'true' ); |
||||
original.removeListener( 'load', onImgLoadEvent ); |
||||
original.removeListener( 'error', onImgLoadErrorEvent ); |
||||
original.removeListener( 'abort', onImgLoadErrorEvent ); |
||||
|
||||
// Hide loader
|
||||
CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' ); |
||||
|
||||
// New image -> new domensions
|
||||
if ( !this.dontResetSize ) |
||||
resetSize( this ); |
||||
|
||||
if ( this.firstLoad ) |
||||
switchLockRatio( this, 'check' ); |
||||
this.firstLoad = false; |
||||
this.dontResetSize = false; |
||||
}; |
||||
|
||||
var onImgLoadErrorEvent = function() |
||||
{ |
||||
// Error. Image is not loaded.
|
||||
var original = this.originalElement; |
||||
original.removeListener( 'load', onImgLoadEvent ); |
||||
original.removeListener( 'error', onImgLoadErrorEvent ); |
||||
original.removeListener( 'abort', onImgLoadErrorEvent ); |
||||
|
||||
// Set Error image.
|
||||
var noimage = CKEDITOR.getUrl( editor.skinPath + 'images/noimage.png' ); |
||||
|
||||
if ( this.preview ) |
||||
this.preview.setAttribute( 'src', noimage ); |
||||
|
||||
// Hide loader
|
||||
CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' ); |
||||
switchLockRatio( this, false ); // Unlock.
|
||||
}; |
||||
return { |
||||
title : editor.lang.spipdoc.title, |
||||
minWidth : 420, |
||||
minHeight : 360, |
||||
onShow : function() |
||||
{ |
||||
this.imageElement = false; |
||||
|
||||
// Default: create a new element.
|
||||
this.imageEditMode = false; |
||||
|
||||
this.lockRatio = true; |
||||
this.dontResetSize = false; |
||||
this.firstLoad = true; |
||||
|
||||
//Hide loader.
|
||||
CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' ); |
||||
// Preview
|
||||
this.preview = CKEDITOR.document.getById( 'previewImage' ); |
||||
|
||||
var editor = this.getParentEditor(), |
||||
sel = this.getParentEditor().getSelection(), |
||||
element = sel.getSelectedElement() ; |
||||
|
||||
// Copy of the image
|
||||
this.originalElement = editor.document.createElement( 'img' ); |
||||
this.originalElement.setAttribute( 'alt', '' ); |
||||
this.originalElement.setCustomData( 'isReady', 'false' ); |
||||
|
||||
if ( element && element.getName() == 'img' && !element.getAttribute( '_cke_protected_html' ) ) |
||||
this.imageEditMode = 'img'; |
||||
|
||||
if ( this.imageEditMode || this.imageElement ) |
||||
{ |
||||
if ( !this.imageElement ) |
||||
this.imageElement = element; |
||||
|
||||
// Fill out all fields.
|
||||
this.setupContent( IMAGE, this.imageElement ); |
||||
|
||||
// Refresh LockRatio button
|
||||
switchLockRatio ( this, true ); |
||||
} |
||||
}, |
||||
onOk : function() |
||||
{ |
||||
// Create a new image.
|
||||
this.imageElement = editor.document.createElement( 'img' ); |
||||
this.imageElement.setAttribute( 'alt', '' ); |
||||
// Set attributes.
|
||||
this.commitContent( IMAGE, this.imageElement ); |
||||
if (CKEDITOR.ckConfig.vignette) { |
||||
this.imageElement.setStyle('max-width', CKEDITOR.ckConfig.vignette+'px') ; |
||||
this.imageElement.setStyle('max-height', CKEDITOR.ckConfig.vignette+'px') ; |
||||
this.imageElement.setStyle('width', '') ; |
||||
this.imageElement.setStyle('height','') ; |
||||
this.imageElement.setAttribute('width', '') ; |
||||
this.imageElement.setAttribute('height','') ; |
||||
} |
||||
editor.insertElement( this.imageElement ); |
||||
|
||||
}, |
||||
onLoad : function() |
||||
{ |
||||
var doc = this._.element.getDocument(); |
||||
this.addFocusable( doc.getById( 'btnResetSize' ), 5 ); |
||||
this.addFocusable( doc.getById( 'btnLockSizes' ), 5 ); |
||||
}, |
||||
onHide : function() |
||||
{ |
||||
if ( this.preview ) |
||||
this.commitContent( CLEANUP, this.preview ); |
||||
|
||||
if ( this.originalElement ) |
||||
{ |
||||
this.originalElement.removeListener( 'load', onImgLoadEvent ); |
||||
this.originalElement.removeListener( 'error', onImgLoadErrorEvent ); |
||||
this.originalElement.removeListener( 'abort', onImgLoadErrorEvent ); |
||||
this.originalElement.remove(); |
||||
this.originalElement = false; // Dialog is closed.
|
||||
} |
||||
}, |
||||
contents : [ |
||||
{ |
||||
id : 'info', |
||||
label : editor.lang.spipdoc.infoTab, |
||||
accessKey : 'I', |
||||
elements : |
||||
[ |
||||
{ |
||||
type : 'vbox', |
||||
padding : 0, |
||||
children : |
||||
[ |
||||
{ |
||||
type : 'html', |
||||
html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.spipdoc.url ) + '</span>' |
||||
}, |
||||
{ |
||||
type : 'hbox', |
||||
widths : [ '280px', '110px' ], |
||||
align : 'right', |
||||
children : |
||||
[ |
||||
{ |
||||
id : 'txtUrl', |
||||
type : 'text', |
||||
label : '', |
||||
onChange : function() |
||||
{ |
||||
var dialog = this.getDialog(), |
||||
newUrl = this.getValue(); |
||||
|
||||
//Update original image
|
||||
if ( newUrl.length > 0 ) //Prevent from load before onShow
|
||||
{ |
||||
dialog = this.getDialog(); |
||||
|
||||
if (!urlUpdating) { |
||||
urlUpdating = true ; |
||||
var docMatch = newUrl.match( regexGetSpipDoc ) ; |
||||
if (docMatch) { |
||||
if (docMatch[7]) // Change docParam only if there's a docParam
|
||||
dialog.setValueOf('info', 'docParam', decodeURI(docMatch[7])) ; |
||||
if (docMatch[4]) // Change docType only, if thers's a docType
|
||||
dialog.setValueOf('info', 'docType', docMatch[4]) ; |
||||
dialog.setValueOf('info', 'docId', docMatch[2]) ; |
||||
} else { |
||||
dialog.setValueOf('info', 'docParam', '') ; |
||||
dialog.setValueOf('info', 'docType', '') ; |
||||
dialog.setValueOf('info', 'docId', '') ; |
||||
alert('là'); |
||||
} |
||||
urlUpdating = false ; |
||||
updateUrl(this, editor, 'txtUrl') ; |
||||
} |
||||
|
||||
var original = dialog.originalElement; |
||||
|
||||
if (original) { |
||||
|
||||
original.setCustomData( 'isReady', 'false' ); |
||||
// Show loader
|
||||
var loader = CKEDITOR.document.getById( 'ImagePreviewLoader' ); |
||||
if ( loader ) |
||||
loader.setStyle( 'display', '' ); |
||||
|
||||
original.on( 'load', onImgLoadEvent, dialog ); |
||||
original.on( 'error', onImgLoadErrorEvent, dialog ); |
||||
original.on( 'abort', onImgLoadErrorEvent, dialog ); |
||||
original.setAttribute( 'src', newUrl ); |
||||
} |
||||
|
||||
dialog.preview.setAttribute( 'src', newUrl ); |
||||
updatePreview( dialog ); |
||||
} |
||||
}, |
||||
setup : function( type, element ) |
||||
{ |
||||
if ( type == IMAGE ) |
||||
{ |
||||
var url = element.getAttribute( 'src' ); |
||||
var field = this; |
||||
|
||||
this.getDialog().dontResetSize = true; |
||||
|
||||
// In IE7 the dialog is being rendered improperly when loading
|
||||
// an image with a long URL. So we need to delay it a bit. (#4122)
|
||||
setTimeout( function() |
||||
{ |
||||
field.setValue( url ); // And call this.onChange()
|
||||
field.focus(); |
||||
}, 0 ); |
||||
} |
||||
}, |
||||
commit : function( type, element ) |
||||
{ |
||||
if ( type == IMAGE && ( this.getValue() || this.isChanged() ) ) |
||||
{ |
||||
element.setAttribute( 'src', decodeURI( this.getValue() ) ); |
||||
} |
||||
else if ( type == CLEANUP ) |
||||
{ |
||||
element.setAttribute( 'src', '' ); // If removeAttribute doesn't work.
|
||||
element.removeAttribute( 'src' ); |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
type : 'button', |
||||
id : 'browse', |
||||
align : 'center', |
||||
label : editor.lang.spipdoc.browseServer, |
||||
hidden : true, |
||||
filebrowser : 'info:txtUrl' |
||||
} |
||||
] |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
type : 'hbox', |
||||
widths : [ '140px', '240px' ], |
||||
children : |
||||
[ |
||||
{ |
||||
type : 'vbox', |
||||
padding : 10, |
||||
children : |
||||
[ |
||||
{ |
||||
type : 'hbox', |
||||
widths : [ '70%', '30%' ], |
||||
children : |
||||
[ |
||||
{ |
||||
type : 'vbox', |
||||
padding : 1, |
||||
children : |
||||
[ |
||||
{ |
||||
type : 'text', |
||||
width: '40px', |
||||
id : 'txtWidth', |
||||
labelLayout : 'horizontal', |
||||
label : editor.lang.spipdoc.width, |
||||
onKeyUp : onSizeChange, |
||||
validate: function() |
||||
{ |
||||
var aMatch = this.getValue().match( regexGetSizeOrEmpty ); |
||||
if ( !aMatch ) |
||||
alert( editor.lang.common.validateNumberFailed ); |
||||
return !!aMatch; |
||||
}, |
||||
setup : setupDimension, |
||||
commit : function( type, element ) |
||||
{ |
||||
if ( type == IMAGE ) |
||||
{ |
||||
var value = this.getValue(); |
||||
if ( value ) |
||||
element.setAttribute( 'width', value ); |
||||
else if ( !value && this.isChanged() ) |
||||
element.removeAttribute( 'width' ); |
||||
} |
||||
else if ( type == PREVIEW ) |
||||
{ |
||||
value = this.getValue(); |
||||
var aMatch = value.match( regexGetSize ); |
||||
if ( !aMatch ) |
||||
{ |
||||
var oImageOriginal = this.getDialog().originalElement; |
||||
if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' ) |
||||
element.setStyle( 'width', oImageOriginal.$.width + 'px'); |
||||
} |
||||
else |
||||
element.setStyle( 'width', value + 'px'); |
||||
} |
||||
else if ( type == CLEANUP ) |
||||
{ |
||||
element.setStyle( 'width', '0px' ); // If removeAttribute doesn't work.
|
||||
element.removeAttribute( 'width' ); |
||||
element.removeStyle( 'width' ); |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
type : 'text', |
||||
id : 'txtHeight', |
||||
width: '40px', |
||||
labelLayout : 'horizontal', |
||||
label : editor.lang.spipdoc.height, |
||||
onKeyUp : onSizeChange, |
||||
validate: function() |
||||
{ |
||||
var aMatch = this.getValue().match( regexGetSizeOrEmpty ); |
||||
if ( !aMatch ) |
||||
alert( editor.lang.common.validateNumberFailed ); |
||||
return !!aMatch; |
||||
}, |
||||
setup : setupDimension, |
||||
commit : function( type, element ) |
||||
{ |
||||
if ( type == IMAGE ) |
||||
{ |
||||
var value = this.getValue(); |
||||
if ( value ) |
||||
element.setAttribute( 'height', value ); |
||||
else if ( !value && this.isChanged() ) |
||||
element.removeAttribute( 'height' ); |
||||
} |
||||
else if ( type == PREVIEW ) |
||||
{ |
||||
value = this.getValue(); |
||||
var aMatch = value.match( regexGetSize ); |
||||
if ( !aMatch ) |
||||
{ |
||||
var oImageOriginal = this.getDialog().originalElement; |
||||
if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' ) |
||||
element.setStyle( 'height', oImageOriginal.$.height + 'px'); |
||||
} |
||||
else |
||||
element.setStyle( 'height', value + 'px'); |
||||
} |
||||
else if ( type == CLEANUP ) |
||||
{ |
||||
element.setStyle( 'height', '0px' ); // If removeAttribute doesn't work.
|
||||
element.removeAttribute( 'height' ); |
||||
element.removeStyle( 'height' ); |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
type : 'html', |
||||
style : 'margin-top:10px;width:40px;height:40px;', |
||||
onLoad : function() |
||||
{ |
||||
// Activate Reset button
|
||||
var resetButton = CKEDITOR.document.getById( 'btnResetSize' ), |
||||
ratioButton = CKEDITOR.document.getById( 'btnLockSizes' ); |
||||
if ( resetButton ) |
||||
{ |
||||
resetButton.on( 'click', function() |
||||
{ |
||||
resetSize( this ); |
||||
}, this.getDialog() ); |
||||
resetButton.on( 'mouseover', function() |
||||
{ |
||||
this.addClass( 'cke_btn_over' ); |
||||
}, resetButton ); |
||||
resetButton.on( 'mouseout', function() |
||||
{ |
||||
this.removeClass( 'cke_btn_over' ); |
||||
}, resetButton ); |
||||
} |
||||
// Activate (Un)LockRatio button
|
||||
if ( ratioButton ) |
||||
{ |
||||
ratioButton.on( 'click', function() |
||||
{ |
||||
var locked = switchLockRatio( this ), |
||||
oImageOriginal = this.originalElement, |
||||
width = this.getValueOf( 'info', 'txtWidth' ); |
||||
|
||||
if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' && width ) |
||||
{ |
||||
var height = oImageOriginal.$.height / oImageOriginal.$.width * width; |
||||
if ( !isNaN( height ) ) |
||||
{ |
||||
this.setValueOf( 'info', 'txtHeight', Math.round( height ) ); |
||||
updatePreview( this ); |
||||
} |
||||
} |
||||
}, this.getDialog() ); |
||||
ratioButton.on( 'mouseover', function() |
||||
{ |
||||
this.addClass( 'cke_btn_over' ); |
||||
}, ratioButton ); |
||||
ratioButton.on( 'mouseout', function() |
||||
{ |
||||
this.removeClass( 'cke_btn_over' ); |
||||
}, ratioButton ); |
||||
} |
||||
}, |
||||
html : '<div>'+ |
||||
'<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.spipdoc.lockRatio + |
||||
'" class="cke_btn_locked" id="btnLockSizes"></a>' + |
||||
'<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.spipdoc.resetSize + |
||||
'" class="cke_btn_reset" id="btnResetSize"></a>'+ |
||||
'</div>' |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
type : 'html', |
||||
html : '<div style="width:250px;white-space:normal;margin:0;padding:0;">Les informations de largeur et hauteur ne servent que pour la prévisualisation dans l\'éditeur.<br/>Pour les modifier effectivement, il faut utiliser l\'interface de SPIP.</div>' |
||||
}, |
||||
{ |
||||
type : 'vbox', |
||||
padding : 1, |
||||
children : |
||||
[ |
||||
{ |
||||
id : 'cmbAlign', |
||||
type : 'select', |
||||
labelLayout : 'horizontal', |
||||
widths : [ '35%','65%' ], |
||||
style : 'width:90px', |
||||
label : editor.lang.spipdoc.align, |
||||
'default' : '', |
||||
items : |
||||
[ |
||||
[ editor.lang.spipdoc.alignMiddle , 'middle'], |
||||
[ editor.lang.spipdoc.alignLeft , 'left'], |
||||
[ editor.lang.spipdoc.alignRight , 'right'] |
||||
], |
||||
onChange : function() |
||||
{ |
||||
updatePreview( this.getDialog() ); |
||||
}, |
||||
setup : function( type, element ) |
||||
{ |
||||
if ( type == IMAGE ) |
||||
this.setValue( element.getAttribute( 'align' ) ); |
||||
}, |
||||
commit : function( type, element ) |
||||
{ |
||||
var value = this.getValue(); |
||||
if ( type == IMAGE ) |
||||
{ |
||||
if ( value || this.isChanged() ) |
||||
element.setAttribute( 'align', value ); |
||||
if ( value == 'middle') { |
||||
element.setStyle ('display', 'block') ; |
||||
element.setStyle ('margin-left', 'auto') ; |
||||
element.setStyle ('margin-right', 'auto') ; |
||||
} else { |
||||
element.setStyle ('display', '') ; |
||||
element.setStyle ('margin-left', '') ; |
||||
element.setStyle ('margin-right', '') ; |
||||
} |
||||
|
||||
} |
||||
else if ( type == PREVIEW ) |
||||
{ |
||||
element.setAttribute( 'align', this.getValue() ); |
||||
|
||||
if ( value == 'absMiddle' || value == 'middle' ) |
||||
element.setStyle( 'vertical-align', 'middle' ); |
||||
else if ( value == 'top' || value == 'textTop' ) |
||||
element.setStyle( 'vertical-align', 'top' ); |
||||
else |
||||
element.removeStyle( 'vertical-align' ); |
||||
|
||||
if ( value == 'right' || value == 'left' ) |
||||
element.setStyle( 'styleFloat', value ); |
||||
else |
||||
element.removeStyle( 'styleFloat' ); |
||||
|
||||
if (value == 'middle') { |
||||
element.setStyle ('display', 'block') ; |
||||
element.setStyle ('margin-left', 'auto') ; |
||||
element.setStyle ('margin-right', 'auto') ; |
||||
} else { |
||||
element.setStyle ('display', '') ; |
||||
element.setStyle ('margin-left', '') ; |
||||
element.setStyle ('margin-right', '') ; |
||||
} |
||||
|
||||
|
||||
} |
||||
else if ( type == CLEANUP ) |
||||
{ |
||||
element.removeAttribute( 'align' ); |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
type : 'vbox', |
||||
height : '250px', |
||||
children : |
||||
[ |
||||
{ |
||||
type : 'html', |
||||
style : 'width:95%;', |
||||
html : '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.spipdoc.preview ) +'<br>'+ |
||||
'<div id="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div>'+ |
||||
'<div style="width:200px;height:200px;overflow:scroll;"><div id="ImagePreviewBox" style="white-space:normal;">'+ |
||||
'<a href="javascript:void(0)" target="_blank" onclick="return false;" id="previewLink">'+ |
||||
'<img id="previewImage" src="" alt="" /></a>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. '+ |
||||
'Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, '+ |
||||
'nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.' + |
||||
'</div></div>'+'</div>' |
||||
} |
||||
] |
||||
} |
||||