Sha256: aa68ae25f80e747ee14a69d9ff41e6b01ed44eb7d9043ba05ce73faa50072f0b

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

window.addEvent('domready', function()
{
    $$('table:not(.no_sort)').each(function(table)
    {
        new Zen.HtmlTable(table);
    });

    // Create a new instance of the Tabs class. This will create a regular tab
    // system for the CSS selector "div.tabs ul".
    if ( $$('div.tabs ul').length > 0 && Zen.Tabs )
    {
        new Zen.Tabs('div.tabs ul');
    }

    // Initialize our editor for all elements with a class of "text_editor"
    // and retrieve the editor format from the attribute "data-format".
    $$('.text_editor').each(function(editor)
    {
        var markup = editor.get('data-format');

        if ( typeOf(markup) === 'undefined' )
        {
            markup = 'html';
        }

        Zen.Editor.create(markup, editor);
    });

    // Initializes a datepicker object whenever it's loaded and the correct
    // element was found.
    var date_elements = $$('input[type="text"].date');

    if ( date_elements.length > 0 )
    {
        new Picker.Date(date_elements,
        {
            timePicker:  true,
            pickerClass: 'datepicker',
            format:      Zen.date_format
        });
    }
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zen-0.3 lib/zen/public/admin/js/zen/index.js
zen-0.3b1 lib/zen/public/admin/js/zen/index.js
zen-0.3b lib/zen/public/admin/js/zen/index.js