Changeset 93539 in spip-zone


Ignore:
Timestamp:
Dec 11, 2015, 3:28:37 PM (4 years ago)
Author:
kent1@…
Message:

Mettre des trim sur les valeurs de conf pour éviter qu'il y ait des sauts de ligne qui pètent le js (cas avec des multis par exemple)

On supprimer également les balises sur les valeurs de config aussi

On trim le fichier

L'entête du fichier dans un #REM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/cookiebar/trunk/jquery.cookiebar.js.html

    r91846 r93539  
    11#HTTP_HEADER{Content-Type: text/javascript; charset=#CHARSET}
    2 /*
    3  * Copyright (C) 2012 PrimeBox (info@primebox.co.uk)
    4  *
    5  * This work is licensed under the Creative Commons
    6  * Attribution 3.0 Unported License. To view a copy
    7  * of this license, visit
    8  * http://creativecommons.org/licenses/by/3.0/.
    9  *
    10  * Documentation available at:
    11  * http://www.primebox.co.uk/projects/cookie-bar/
    12  *
    13  * When using this software you use it at your own risk. We hold
    14  * no responsibility for any damage caused by using this plugin
    15  * or the documentation provided.
    16  */
     2[(#REM)
     3        Initialisation de cookiebar
     4       
     5        Voir la documentation ici :
     6        http://www.primebox.co.uk/projects/cookie-bar/
     7]
    178[(#CONFIG{cookiebar/message_txt}|?{
    18     [(#SET{message,#CONFIG{cookiebar/message_txt}|typo|texte_script})],
    19     [(#SET{message,<:cookiebar:message_message|texte_script:>})]
     9        [(#SET{message,#CONFIG{cookiebar/message_txt}|supprimer_tags|typo|trim|texte_script})],
     10        [(#SET{message,<:cookiebar:message_message|supprimer_tags|trim|texte_script:>})]
    2011})]
    2112[(#CONFIG{cookiebar/accept_txt}|?{
    22     [(#SET{accepttext,#CONFIG{cookiebar/accept_txt}|typo|texte_script})],
    23     [(#SET{accepttext,<:cookiebar:message_accepttext|texte_script:>})]
     13        [(#SET{accepttext,#CONFIG{cookiebar/accept_txt}|supprimer_tags|typo|trim|texte_script})],
     14        [(#SET{accepttext,<:cookiebar:message_accepttext|supprimer_tags|trim|texte_script:>})]
    2415})]
    2516[(#CONFIG{cookiebar/decline_txt}|?{
    26     [(#SET{declinetext,#CONFIG{cookiebar/decline_txt}|typo|texte_script})],
    27     [(#SET{declinetext,<:cookiebar:message_declinetext|texte_script:>})]
     17        [(#SET{declinetext,#CONFIG{cookiebar/decline_txt}|supprimer_tags|typo|trim|texte_script})],
     18        [(#SET{declinetext,<:cookiebar:message_declinetext|supprimer_tags|trim|texte_script:>})]
    2819})]
    2920[(#CONFIG{cookiebar/policy_txt}|?{
    30     [(#SET{policytext,#CONFIG{cookiebar/policy_txt}|typo|texte_script})],
    31     [(#SET{policytext,<:cookiebar:message_policytext|texte_script:>})]
     21        [(#SET{policytext,#CONFIG{cookiebar/policy_txt}|supprimer_tags|typo|trim|texte_script})],
     22        [(#SET{policytext,<:cookiebar:message_policytext|supprimer_tags|trim|texte_script:>})]
    3223})]
    33 
    34 
    3524
    3625(function($){
     
    4534                var defaults = {
    4635                        message: '<span class="cb-msg">#GET{message}</span>', //Message displayed on bar
    47                         acceptButton:  #CONFIG{cookiebar/accept_button,true} , //Set to true to show accept/enable button
     36                        acceptButton:  #CONFIG{cookiebar/accept_button,true}, //Set to true to show accept/enable button
    4837                        acceptText: '#GET{accepttext}', //Text on accept/enable button
    4938                        declineButton: #CONFIG{cookiebar/decline_button,true}, //Set to true to show decline/disable button
     
    202191        };
    203192})(jQuery);
     193
     194#FILTRE{trim}
Note: See TracChangeset for help on using the changeset viewer.