Commit 846e0b0c authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Ajout d'une propriété "autoShow" au popover afin de pouvoir l'afficher dès son...

Ajout d'une propriété "autoShow" au popover afin de pouvoir l'afficher dès son initialisation en Javascript
parent 16573eb2
Loading
Loading
Loading
Loading
+14 −4
Changes for public/js/unicaen.js: 14 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -82,7 +82,8 @@ WidgetInitializer = {
                WidgetInitializer.widgets[className].initialized = true;
            }
            if (widgetName) {
                widgets.each(function(){
                widgets.each(function ()
                {
                    $(this)[widgetName]($(this).data('widget'));
                });
            }
@@ -887,7 +888,8 @@ $.widget("unicaen.popAjax", {
        maxHeight: 'none',
        loadingTitle: 'Chargement...',
        loadingContent: '<div class="loading"></div>',
        title: undefined
        title: undefined,
        autoShow: false
    },


@@ -921,6 +923,10 @@ $.widget("unicaen.popAjax", {
        if (typeof attr !== typeof undefined && attr !== false) {
            this.options.url = this.element.attr('href');
        }

        if (this.options.autoShow) {
            setTimeout(function() { that.show(); }, 100);
        }
    },


@@ -945,7 +951,8 @@ $.widget("unicaen.popAjax", {
            maxHeight: 'max-height',
            loadingTitle: 'loading-title',
            loadingContent: 'loading-content',
            title: 'title'
            title: 'title',
            autoShow: 'auto-show'
        };

        for (var k in optionsKeys) {
@@ -1002,7 +1009,8 @@ $.widget("unicaen.popAjax", {
        if (this.options.animation) {
            this.makePopDiv().fadeIn(this.options.delay);
        } else {
            this.makePopDiv().show();
            this.makePopDiv()
            this.show();
        }
        this.inChange = false;
        this.posPop();
@@ -1169,6 +1177,7 @@ $.widget("unicaen.popAjax", {

        this.inChange = true;

        if (pc) {
            pc.hide();

            pc.html(content);
@@ -1177,6 +1186,7 @@ $.widget("unicaen.popAjax", {
            this._trigger('change', null, this);

            pc.show();
        }
        this.inChange = false;
        this.posPop();
        this.posPop();