1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How add custom code in admin template ?

Discussion in 'XenForo Development Discussions' started by Zephyr, Mar 13, 2013.

  1. Zephyr

    Zephyr Well-Known Member

    Hello, I have created an options page and I want add: css, html and js (jquery) code, you know how I can do to include this code in the page please ?

    My code to add:

    HTML:
        <head>
            <link rel="stylesheet" href="styles/XenCrea.com/AdminColorPicker/css/colorpicker.css" type="text/css" />
            <script type="text/javascript" src="styles/XenCrea.com/AdminColorPicker/js/jquery.js"></script>
            <script type="text/javascript" src="styles/XenCrea.com/AdminColorPicker/js/colorpicker.js"></script>
        </head>
     
        <script>
            $('#ctrl_optionsXenCrea_ColorList').ColorPicker({
                onChange: function (hsb, hex, rgb)
                {
                    $('#ctrl_optionsXenCrea_ColorList').css('backgroundColor', '#' + hex);
                    $('#ctrl_optionsXenCrea_ColorList').val(rgb.r + ', ' + rgb.g + ', ' + rgb.b);
                },
                onSubmit: function (hsb, hex, rgb)
                {
                    $('#ctrl_optionsXenCrea_ColorList').css('backgroundColor', '#' + hex);
                    $('#ctrl_optionsXenCrea_ColorList').val(rgb.r + ', ' + rgb.g + ', ' + rgb.b);
                }
            });
        </script>
    For this page:

    [​IMG]

    Can you help me please ? Thanks.
     

Share This Page