From 6bf02d8e0d308d5313dc3a8d616d6f4aeb71e5d5 Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Thu, 10 Jul 2025 21:54:53 +0200 Subject: [PATCH] =?UTF-8?q?[10/07/2025]=20Les=20coupons=20cr=C3=A9=C3=A9s?= =?UTF-8?q?=20dynamiquement=20seront=20automatiquement=20valables=20sur=20?= =?UTF-8?q?les=20produits=20en=20promo,=20suite=20=C3=A0=20pb=20rencontr?= =?UTF-8?q?=C3=A9=20par=20Alain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 1492 ++---------- .../EventListeners/OrderCreationListener.php | 2 +- .../default/Colissimo/assets/.source-stamp | 2 +- .../HookAdminHome/assets/.source-stamp | 2 +- .../HookAdminHome/assets/css/d61aaa9.css | 1 - .../assets/css/{493cca4.css => f4678ab.css} | 0 .../HookAnalytics/assets/.source-stamp | 2 +- .../HookAnalytics/assets/js/a872012.js | 29 - .../default/HookSocial/assets/.source-stamp | 2 +- .../default/Tinymce/assets/.source-stamp | 2 +- .../template-assets/assets/.source-stamp | 2 +- .../assets/css/{81a8e89.css => 0bcc446.css} | 0 .../assets/img/{4a09306.png => 693c572.png} | Bin .../assets/img/{ae3642c.png => cf5ddb5.png} | Bin .../assets/img/{2b1d1c1.ico => e051779.ico} | Bin .../assets/img/flags/1daecc0.png | Bin 0 -> 100 bytes .../img/flags/{619ba45.png => 4c24fe6.png} | Bin .../assets/img/flags/853a157.png | Bin 0 -> 303 bytes .../img/flags/{50b6bdf.png => e8c0e3c.png} | Bin .../assets/img/flags/fb1d7f2.png | Bin 0 -> 221 bytes .../template-assets/assets/js/3680266.js | 63 + .../assets/js/{ca24b29.js => 3fcc26c.js} | 0 .../assets/js/{f54a91d.js => 5d5f019.js} | 0 .../{ed6f569.css => 78758b2.css} | 0 .../{3cfb651.js => 8de8198.js} | 0 .../{a3deae4.js => b6eeeb3.js} | 0 .../assets/js/bootstrap-select/42aaed5.js | 709 ++++++ .../{9b99f95.js => 068e862.js} | 0 .../assets/js/bootstrap-switch/a701c2d.js | 382 ++++ .../js/bootstrap/{2c2cd6d.js => b95e034.js} | 0 .../assets/js/{fea7523.js => c38ea18.js} | 0 .../assets/js/{9f07f1b.js => ee67ec6.js} | 0 .../js/jqplot/{deab168.js => 7d624ea.js} | 0 .../jqplot/plugins/{597b185.js => 9e27f89.js} | 0 .../jqplot/plugins/{f74df2d.js => cee4914.js} | 0 .../assets/js/libs/{41af822.js => 2709527.js} | 0 .../assets/js/libs/{c2a5c40.js => 704bbd1.js} | 0 .../assets/js/libs/{1e8fc58.js => ab91bce.js} | 0 .../template-assets/assets/js/libs/b911bf2.js | 6 + .../assets/js/libs/{c4637e0.js => cff4738.js} | 0 .../template-assets/assets/.source-stamp | 2 +- .../template-assets/assets/.source-stamp | 2 +- .../assets/img/{3bc0f96.ico => 5b8f471.ico} | Bin .../template-assets/assets/img/6ff0745.ico | Bin 1150 -> 0 bytes .../assets/img/{571d8e4.png => 8f7bd27.png} | Bin .../template-assets/assets/img/972c3ce.png | Bin 953 -> 0 bytes .../img/flags/{c4461eb.png => 065813a.png} | Bin .../assets/img/flags/44c66fd.png | Bin 0 -> 303 bytes .../img/flags/{52730bd.png => 48c1e7e.png} | Bin .../assets/img/flags/551abb6.png | Bin 0 -> 221 bytes .../assets/img/flags/92d3846.png | Bin 100 -> 0 bytes .../assets/img/flags/e36eec2.png | Bin 353 -> 0 bytes .../template-assets/assets/js/4638ce3.js | 617 ----- .../assets/js/{2f8228e.js => 7219139.js} | 0 .../js/bootstrap/{5bc8ef5.js => 97f5aa1.js} | 0 .../assets/js/bootstrap/d01b4e2.js | 1999 ----------------- .../assets/js/libs/{8b313c8.js => 21f555d.js} | 0 .../template-assets/assets/js/libs/d8ecf0a.js | 6 - .../bootbox/{515e12f.js => 5964c20.js} | 0 .../assets/js/plugins/bootbox/99df859.js | 604 ----- .../template-assets/assets/less/b542842.css | 33 - .../assets/less/{51ab1cc.css => b88b813.css} | 0 .../template-assets/assets/img/34d1aab.png | Bin 0 -> 5373 bytes ...apture d’écran 2021-02-18 à 18.15.49 2.png | Bin 0 -> 17140 bytes .../Capture d’écran 2021-02-21 à 18.21.07.png | Bin 0 -> 24750 bytes .../Capture d’écran 2021-05-01 à 15.21.52.png | Bin 0 -> 21477 bytes .../Capture d’écran 2021-05-01 à 15.22.34.png | Bin 0 -> 19285 bytes .../Capture d’écran 2021-05-01 à 15.23.19.png | Bin 0 -> 12017 bytes web/media/thumbs/EIS/image002.png | Bin 0 -> 18432 bytes web/media/thumbs/EIS/image003.png | Bin 0 -> 17163 bytes web/media/thumbs/IMG_8595.jpeg | Bin 0 -> 3173 bytes web/media/thumbs/image003 (4).png | Bin 0 -> 10564 bytes ...apture d’écran 2021-02-18 à 18.15.49 2.png | Bin 0 -> 24217 bytes .../Capture d’écran 2021-02-21 à 18.21.07.png | Bin 0 -> 669802 bytes .../Capture d’écran 2021-05-01 à 15.21.52.png | Bin 0 -> 288796 bytes .../Capture d’écran 2021-05-01 à 15.22.34.png | Bin 0 -> 242210 bytes .../Capture d’écran 2021-05-01 à 15.23.19.png | Bin 0 -> 116201 bytes ...Initiation 1er decembre 2023 Programme.pdf | Bin 0 -> 400177 bytes ...itiation 1er decembre 2023 Programme_1.pdf | Bin 0 -> 400177 bytes ... et des télangiectasies _ 9 decembre 2023.pdf | Bin 0 -> 614232 bytes ...t des télangiectasies _ 9 decembre 2023_1.pdf | Bin 0 -> 614232 bytes ...à la Mousse _Expert 3 D_25 novembre 22.pdf | Bin 0 -> 194135 bytes ...a Mousse _Perfectionnement_7 octobre 22.pdf | Bin 0 -> 191984 bytes web/media/upload/EIS/image002.png | Bin 0 -> 133941 bytes web/media/upload/EIS/image003.png | Bin 0 -> 100908 bytes web/media/upload/IMG_8595.jpeg | Bin 0 -> 21497 bytes web/media/upload/INICIO/INICIO.rtf | 14 + web/media/upload/image003 (4).png | Bin 0 -> 118263 bytes 88 files changed, 1323 insertions(+), 4650 deletions(-) delete mode 100644 web/assets/backOffice/default/HookAdminHome/assets/css/d61aaa9.css rename web/assets/backOffice/default/HookAdminHome/assets/css/{493cca4.css => f4678ab.css} (100%) delete mode 100644 web/assets/backOffice/default/HookAnalytics/assets/js/a872012.js rename web/assets/backOffice/default/template-assets/assets/css/{81a8e89.css => 0bcc446.css} (100%) rename web/assets/backOffice/default/template-assets/assets/img/{4a09306.png => 693c572.png} (100%) rename web/assets/backOffice/default/template-assets/assets/img/{ae3642c.png => cf5ddb5.png} (100%) rename web/assets/backOffice/default/template-assets/assets/img/{2b1d1c1.ico => e051779.ico} (100%) create mode 100644 web/assets/backOffice/default/template-assets/assets/img/flags/1daecc0.png rename web/assets/backOffice/default/template-assets/assets/img/flags/{619ba45.png => 4c24fe6.png} (100%) create mode 100644 web/assets/backOffice/default/template-assets/assets/img/flags/853a157.png rename web/assets/backOffice/default/template-assets/assets/img/flags/{50b6bdf.png => e8c0e3c.png} (100%) create mode 100644 web/assets/backOffice/default/template-assets/assets/img/flags/fb1d7f2.png create mode 100644 web/assets/backOffice/default/template-assets/assets/js/3680266.js rename web/assets/backOffice/default/template-assets/assets/js/{ca24b29.js => 3fcc26c.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/{f54a91d.js => 5d5f019.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/bootstrap-datetimepicker/{ed6f569.css => 78758b2.css} (100%) rename web/assets/backOffice/default/template-assets/assets/js/bootstrap-datetimepicker/{3cfb651.js => 8de8198.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/bootstrap-editable/{a3deae4.js => b6eeeb3.js} (100%) create mode 100644 web/assets/backOffice/default/template-assets/assets/js/bootstrap-select/42aaed5.js rename web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/{9b99f95.js => 068e862.js} (100%) create mode 100644 web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/a701c2d.js rename web/assets/backOffice/default/template-assets/assets/js/bootstrap/{2c2cd6d.js => b95e034.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/{fea7523.js => c38ea18.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/{9f07f1b.js => ee67ec6.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/jqplot/{deab168.js => 7d624ea.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/jqplot/plugins/{597b185.js => 9e27f89.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/jqplot/plugins/{f74df2d.js => cee4914.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/libs/{41af822.js => 2709527.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/libs/{c2a5c40.js => 704bbd1.js} (100%) rename web/assets/backOffice/default/template-assets/assets/js/libs/{1e8fc58.js => ab91bce.js} (100%) create mode 100644 web/assets/backOffice/default/template-assets/assets/js/libs/b911bf2.js rename web/assets/backOffice/default/template-assets/assets/js/libs/{c4637e0.js => cff4738.js} (100%) rename web/assets/frontOffice/sterivein/template-assets/assets/img/{3bc0f96.ico => 5b8f471.ico} (100%) delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/img/6ff0745.ico rename web/assets/frontOffice/sterivein/template-assets/assets/img/{571d8e4.png => 8f7bd27.png} (100%) delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/img/972c3ce.png rename web/assets/frontOffice/sterivein/template-assets/assets/img/flags/{c4461eb.png => 065813a.png} (100%) create mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/img/flags/44c66fd.png rename web/assets/frontOffice/sterivein/template-assets/assets/img/flags/{52730bd.png => 48c1e7e.png} (100%) create mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/img/flags/551abb6.png delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/img/flags/92d3846.png delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/img/flags/e36eec2.png delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/js/4638ce3.js rename web/assets/frontOffice/sterivein/template-assets/assets/js/{2f8228e.js => 7219139.js} (100%) rename web/assets/frontOffice/sterivein/template-assets/assets/js/bootstrap/{5bc8ef5.js => 97f5aa1.js} (100%) delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/js/bootstrap/d01b4e2.js rename web/assets/frontOffice/sterivein/template-assets/assets/js/libs/{8b313c8.js => 21f555d.js} (100%) delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/js/libs/d8ecf0a.js rename web/assets/frontOffice/sterivein/template-assets/assets/js/plugins/bootbox/{515e12f.js => 5964c20.js} (100%) delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/js/plugins/bootbox/99df859.js delete mode 100644 web/assets/frontOffice/sterivein/template-assets/assets/less/b542842.css rename web/assets/frontOffice/sterivein/template-assets/assets/less/{51ab1cc.css => b88b813.css} (100%) create mode 100644 web/assets/pdf/sterivein/template-assets/assets/img/34d1aab.png create mode 100644 web/media/thumbs/Capture d’écran 2021-02-18 à 18.15.49 2.png create mode 100644 web/media/thumbs/Capture d’écran 2021-02-21 à 18.21.07.png create mode 100644 web/media/thumbs/Capture d’écran 2021-05-01 à 15.21.52.png create mode 100644 web/media/thumbs/Capture d’écran 2021-05-01 à 15.22.34.png create mode 100644 web/media/thumbs/Capture d’écran 2021-05-01 à 15.23.19.png create mode 100644 web/media/thumbs/EIS/image002.png create mode 100644 web/media/thumbs/EIS/image003.png create mode 100644 web/media/thumbs/IMG_8595.jpeg create mode 100644 web/media/thumbs/image003 (4).png create mode 100644 web/media/upload/Capture d’écran 2021-02-18 à 18.15.49 2.png create mode 100644 web/media/upload/Capture d’écran 2021-02-21 à 18.21.07.png create mode 100644 web/media/upload/Capture d’écran 2021-05-01 à 15.21.52.png create mode 100644 web/media/upload/Capture d’écran 2021-05-01 à 15.22.34.png create mode 100644 web/media/upload/Capture d’écran 2021-05-01 à 15.23.19.png create mode 100644 web/media/upload/EIS Sclerotherapie Echoguidee Initiation 1er decembre 2023 Programme.pdf create mode 100644 web/media/upload/EIS Sclerotherapie Echoguidee Initiation 1er decembre 2023 Programme_1.pdf create mode 100644 web/media/upload/EIS _ Sclérothérapie des veines réticulaires et des télangiectasies _ 9 decembre 2023.pdf create mode 100644 web/media/upload/EIS _ Sclérothérapie des veines réticulaires et des télangiectasies _ 9 decembre 2023_1.pdf create mode 100644 web/media/upload/EIS/EIS _ 2022 _ Sclerotherapie Echoguidee à la Mousse _Expert 3 D_25 novembre 22.pdf create mode 100644 web/media/upload/EIS/EIS _ 2022 _ Sclerotherapie Echoguidee à la Mousse _Perfectionnement_7 octobre 22.pdf create mode 100644 web/media/upload/EIS/image002.png create mode 100644 web/media/upload/EIS/image003.png create mode 100644 web/media/upload/IMG_8595.jpeg create mode 100644 web/media/upload/INICIO/INICIO.rtf create mode 100644 web/media/upload/image003 (4).png diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 240bdeab1..3ead3c0f4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -8,1357 +8,93 @@ ' : ''; + var drop = + "
" + + "" + + "" + + "
"; + + return $(drop); + }, + + createView: function() { + var $drop = this.createDropdown(); + var $li = this.createLi(); + $drop.find('ul').append($li); + return $drop; + }, + + reloadLi: function() { + //Remove all children. + this.destroyLi(); + //Re build + var $li = this.createLi(); + this.$menu.find('ul').append( $li ); + }, + + destroyLi: function() { + this.$menu.find('li').remove(); + }, + + createLi: function() { + var that = this, + _liA = [], + _liHtml = ''; + + this.$element.find('option').each(function(index) { + var $this = $(this); + + //Get the class and text for the option + var optionClass = $this.attr("class") || ''; + var inline = $this.attr("style") || ''; + var text = $this.data('content') ? $this.data('content') : $this.html(); + var subtext = $this.data('subtext') !== undefined ? '' + $this.data('subtext') + '' : ''; + var icon = $this.data('icon') !== undefined ? ' ' : ''; + if (icon !== '' && ($this.is(':disabled') || $this.parent().is(':disabled'))) { + icon = ''+icon+''; + } + + if (!$this.data('content')) { + //Prepend any icon and append any subtext to the main text. + text = icon + '' + text + subtext + ''; + } + + if (that.options.hideDisabled && ($this.is(':disabled') || $this.parent().is(':disabled'))) { + _liA.push(''); + } else if ($this.parent().is('optgroup') && $this.data('divider') != true) { + if ($this.index() == 0) { + //Get the opt group label + var label = $this.parent().attr('label'); + var labelSubtext = $this.parent().data('subtext') !== undefined ? ''+$this.parent().data('subtext')+'' : ''; + var labelIcon = $this.parent().data('icon') ? ' ' : ''; + label = labelIcon + '' + label + labelSubtext + ''; + + if ($this[0].index != 0) { + _liA.push( + '
'+ + '
'+label+'
'+ + that.createA(text, "opt " + optionClass, inline ) + ); + } else { + _liA.push( + '
'+label+'
'+ + that.createA(text, "opt " + optionClass, inline )); + } + } else { + _liA.push(that.createA(text, "opt " + optionClass, inline )); + } + } else if ($this.data('divider') == true) { + _liA.push('
'); + } else if ($(this).data('hidden') == true) { + _liA.push(''); + } else { + _liA.push(that.createA(text, optionClass, inline )); + } + }); + + $.each(_liA, function(i, item) { + _liHtml += "
  • " + item + "
  • "; + }); + + //If we are not multiple, and we dont have a selected item, and we dont have a title, select the first element so something is set in the button + if (!this.multiple && this.$element.find('option:selected').length==0 && !this.options.title) { + this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected'); + } + + return $(_liHtml); + }, + + createA: function(text, classes, inline) { + return '' + + text + + '' + + ''; + }, + + render: function() { + var that = this; + + //Update the LI to match the SELECT + this.$element.find('option').each(function(index) { + that.setDisabled(index, $(this).is(':disabled') || $(this).parent().is(':disabled') ); + that.setSelected(index, $(this).is(':selected') ); + }); + + var selectedItems = this.$element.find('option:selected').map(function(index,value) { + var $this = $(this); + var icon = $this.data('icon') && that.options.showIcon ? ' ' : ''; + var subtext; + if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) { + subtext = ' '+$this.data('subtext') +''; + } else { + subtext = ''; + } + if ($this.data('content') && that.options.showContent) { + return $this.data('content'); + } else if ($this.attr('title') != undefined) { + return $this.attr('title'); + } else { + return icon + $this.html() + subtext; + } + }).toArray(); + + //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled + //Convert all the values into a comma delimited string + var title = !this.multiple ? selectedItems[0] : selectedItems.join(", "); + + //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc.. + if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) { + var max = this.options.selectedTextFormat.split(">"); + var notDisabled = this.options.hideDisabled ? ':not([disabled])' : ''; + if ( (max.length>1 && selectedItems.length > max[1]) || (max.length==1 && selectedItems.length>=2)) { + title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+notDisabled).length); + } + } + + //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text + if (!title) { + title = this.options.title != undefined ? this.options.title : this.options.noneSelectedText; + } + + this.$newElement.find('.filter-option').html(title); + }, + + setStyle: function(style, status) { + if (this.$element.attr('class')) { + this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device/gi, '')); + } + + var buttonClass = style ? style : this.options.style; + + if (status == 'add') { + this.$button.addClass(buttonClass); + } else if (status == 'remove') { + this.$button.removeClass(buttonClass); + } else { + this.$button.removeClass(this.options.style); + this.$button.addClass(buttonClass); + } + }, + + liHeight: function() { + var selectClone = this.$newElement.clone(); + selectClone.appendTo('body'); + var $menuClone = selectClone.addClass('open').find('> .dropdown-menu'); + var liHeight = $menuClone.find('li > a').outerHeight(); + var headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0; + selectClone.remove(); + this.$newElement.data('liHeight', liHeight).data('headerHeight', headerHeight); + }, + + setSize: function() { + var that = this, + menu = this.$menu, + menuInner = menu.find('.inner'), + menuA = menuInner.find('li > a'), + selectHeight = this.$newElement.outerHeight(), + liHeight = this.$newElement.data('liHeight'), + headerHeight = this.$newElement.data('headerHeight'), + divHeight = menu.find('li .divider').outerHeight(true), + menuPadding = parseInt(menu.css('padding-top')) + + parseInt(menu.css('padding-bottom')) + + parseInt(menu.css('border-top-width')) + + parseInt(menu.css('border-bottom-width')), + notDisabled = this.options.hideDisabled ? ':not(.disabled)' : '', + $window = $(window), + menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2, + menuHeight, + selectOffsetTop, + selectOffsetBot, + posVert = function() { + selectOffsetTop = that.$newElement.offset().top - $window.scrollTop(); + selectOffsetBot = $window.height() - selectOffsetTop - selectHeight; + }; + posVert(); + if (this.options.header) menu.css('padding-top', 0); + + if (this.options.size == 'auto') { + var getSize = function() { + var minHeight; + posVert(); + menuHeight = selectOffsetBot - menuExtras; + that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && (menuHeight - menuExtras) < menu.height() && that.options.dropupAuto); + if (that.$newElement.hasClass('dropup')) { + menuHeight = selectOffsetTop - menuExtras; + } + if ((menu.find('li').length + menu.find('dt').length) > 3) { + minHeight = liHeight*3 + menuExtras - 2; + } else { + minHeight = 0; + } + menu.css({'max-height' : menuHeight + 'px', 'overflow' : 'hidden', 'min-height' : minHeight + 'px'}); + menuInner.css({'max-height' : menuHeight - headerHeight- menuPadding + 'px', 'overflow-y' : 'auto', 'min-height' : minHeight - menuPadding + 'px'}); + } + getSize(); + $(window).resize(getSize); + $(window).scroll(getSize); + } else if (this.options.size && this.options.size != 'auto' && menu.find('li'+notDisabled).length > this.options.size) { + var optIndex = menu.find("li"+notDisabled+" > *").filter(':not(.div-contain)').slice(0,this.options.size).last().parent().index(); + var divLength = menu.find("li").slice(0,optIndex + 1).find('.div-contain').length; + menuHeight = liHeight*this.options.size + divLength*divHeight + menuPadding; + this.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && menuHeight < menu.height() && this.options.dropupAuto); + menu.css({'max-height' : menuHeight + headerHeight + 'px', 'overflow' : 'hidden'}); + menuInner.css({'max-height' : menuHeight - menuPadding + 'px', 'overflow-y' : 'auto'}); + } + }, + + setWidth: function() { + if (this.options.width == 'auto') { + this.$menu.css('min-width', '0'); + + // Get correct width if element hidden + var selectClone = this.$newElement.clone().appendTo('body'); + var ulWidth = selectClone.find('> .dropdown-menu').css('width'); + selectClone.remove(); + + this.$newElement.css('width', ulWidth); + } else if (this.options.width == 'fit') { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', '').addClass('fit-width'); + } else if (this.options.width) { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', this.options.width); + } else { + // Remove inline min-width/width so width can be changed + this.$menu.css('min-width', ''); + this.$newElement.css('width', ''); + } + // Remove fit-width class if width is changed programmatically + if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') { + this.$newElement.removeClass('fit-width'); + } + }, + + selectPosition: function() { + var that = this, + drop = "
    ", + $drop = $(drop), + pos, + actualHeight, + getPlacement = function($element) { + $drop.addClass($element.attr('class')).toggleClass('dropup', $element.hasClass('dropup')); + pos = $element.offset(); + actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight; + $drop.css({'top' : pos.top + actualHeight, 'left' : pos.left, 'width' : $element[0].offsetWidth, 'position' : 'absolute'}); + }; + this.$newElement.on('click', function(e) { + getPlacement($(this)); + $drop.appendTo(that.options.container); + $drop.toggleClass('open', !$(this).hasClass('open')); + $drop.append(that.$menu); + }); + $(window).resize(function() { + getPlacement(that.$newElement); + }); + $(window).on('scroll', function(e) { + getPlacement(that.$newElement); + }); + $('html').on('click', function(e) { + if ($(e.target).closest(that.$newElement).length < 1) { + $drop.removeClass('open'); + } + }); + }, + + mobile: function() { + this.$element.addClass('mobile-device').appendTo(this.$newElement); + if (this.options.container) this.$menu.hide(); + }, + + refresh: function() { + this.reloadLi(); + this.render(); + this.setWidth(); + this.setStyle(); + this.checkDisabled(); + this.liHeight(); + }, + + setSelected: function(index, selected) { + this.$menu.find('li').eq(index).toggleClass('selected', selected); + }, + + setDisabled: function(index, disabled) { + if (disabled) { + this.$menu.find('li').eq(index).addClass('disabled').find('a').attr('href','#').attr('tabindex',-1); + } else { + this.$menu.find('li').eq(index).removeClass('disabled').find('a').removeAttr('href').attr('tabindex',0); + } + }, + + isDisabled: function() { + return this.$element.is(':disabled'); + }, + + checkDisabled: function() { + var that = this; + if (this.isDisabled()) { + this.$button.addClass('disabled'); + this.$button.attr('tabindex','-1'); + } else if (this.$button.hasClass('disabled')) { + this.$button.removeClass('disabled'); + this.$button.removeAttr('tabindex'); + } + this.$button.click(function() { + return !that.isDisabled(); + }); + }, + + checkTabIndex: function() { + if (this.$element.is('[tabindex]')) { + var tabindex = this.$element.attr("tabindex"); + this.$button.attr('tabindex', tabindex); + } + }, + + clickListener: function() { + var that = this; + + $('body').on('touchstart.dropdown', '.dropdown-menu', function(e) { + e.stopPropagation(); + }); + + this.$newElement.on('click', function() { + that.setSize(); + }); + + this.$menu.on('click', 'li a', function(e) { + var clickedIndex = $(this).parent().index(), + $this = $(this).parent(), + prevValue = that.$element.val(); + + //Dont close on multi choice menu + if (that.multiple) { + e.stopPropagation(); + } + + e.preventDefault(); + + //Dont run if we have been disabled + if (!that.isDisabled() && !$(this).parent().hasClass('disabled')) { + var $options = that.$element.find('option'); + var $option = $options.eq(clickedIndex); + + //Deselect all others if not multi select box + if (!that.multiple) { + $options.prop('selected', false); + $option.prop('selected', true); + } + //Else toggle the one we have chosen if we are multi select. + else { + var state = $option.prop('selected'); + + $option.prop('selected', !state); + } + + that.$button.focus(); + + // Trigger select 'change' + if (prevValue != that.$element.val()) { + that.$element.change(); + } + } + }); + + this.$menu.on('click', 'li.disabled a, li dt, li .div-contain, h3.popover-title', function(e) { + if (e.target == this) { + e.preventDefault(); + e.stopPropagation(); + that.$button.focus(); + } + }); + + this.$searchbox.on('click', function(e) { + e.stopPropagation(); + }); + + this.$element.change(function() { + that.render() + }); + }, + + liveSearchListener: function() { + var that = this; + + this.$newElement.on('click.dropdown.data-api', function(e){ + if(that.options.liveSearch) { + setTimeout(function() { + that.$searchbox.focus(); + }, 10); + } + }); + + this.$searchbox.on('input', function() { + that.$newElement.find('li').show().not(':icontains(' + that.$searchbox.val() + ')').hide(); + }); + }, + + val: function(value) { + + if (value != undefined) { + this.$element.val( value ); + + this.$element.change(); + return this.$element; + } else { + return this.$element.val(); + } + }, + + selectAll: function() { + this.$element.find('option').prop('selected', true).attr('selected', 'selected'); + this.render(); + }, + + deselectAll: function() { + this.$element.find('option').prop('selected', false).removeAttr('selected'); + this.render(); + }, + + keydown: function(e) { + var $this, + $items, + $parent, + index, + next, + first, + last, + prev, + nextPrev, + that; + + $this = $(this); + + $parent = $this.parent(); + + that = $parent.data('this'); + + if (that.options.container) $parent = that.$menu; + + $items = $('[role=menu] li:not(.divider):visible a', $parent); + + if (!$items.length) return; + + if (/(38|40)/.test(e.keyCode)) { + + index = $items.index($items.filter(':focus')); + first = $items.parent(':not(.disabled)').first().index(); + last = $items.parent(':not(.disabled)').last().index(); + next = $items.eq(index).parent().nextAll(':not(.disabled)').eq(0).index(); + prev = $items.eq(index).parent().prevAll(':not(.disabled)').eq(0).index(); + nextPrev = $items.eq(next).parent().prevAll(':not(.disabled)').eq(0).index(); + + if (e.keyCode == 38) { + if (index != nextPrev && index > prev) index = prev; + if (index < first) index = first; + } + + if (e.keyCode == 40) { + if (index != nextPrev && index < next) index = next; + if (index > last) index = last; + if (index == -1) index = 0; + } + + $items.eq(index).focus(); + } else { + var keyCodeMap = { + 48:"0", 49:"1", 50:"2", 51:"3", 52:"4", 53:"5", 54:"6", 55:"7", 56:"8", 57:"9", 59:";", + 65:"a", 66:"b", 67:"c", 68:"d", 69:"e", 70:"f", 71:"g", 72:"h", 73:"i", 74:"j", 75:"k", 76:"l", + 77:"m", 78:"n", 79:"o", 80:"p", 81:"q", 82:"r", 83:"s", 84:"t", 85:"u", 86:"v", 87:"w", 88:"x", 89:"y", 90:"z", + 96:"0", 97:"1", 98:"2", 99:"3", 100:"4", 101:"5", 102:"6", 103:"7", 104:"8", 105:"9" + } + + var keyIndex = []; + + $items.each(function() { + if ($(this).parent().is(':not(.disabled)')) { + if ($.trim($(this).text().toLowerCase()).substring(0,1) == keyCodeMap[e.keyCode]) { + keyIndex.push($(this).parent().index()); + } + } + }); + + var count = $(document).data('keycount'); + count++; + $(document).data('keycount',count); + + var prevKey = $.trim($(':focus').text().toLowerCase()).substring(0,1); + + if (prevKey != keyCodeMap[e.keyCode]) { + count = 1; + $(document).data('keycount',count); + } else if (count >= keyIndex.length) { + $(document).data('keycount',0); + } + + $items.eq(keyIndex[count - 1]).focus(); + } + + // select focused option if "Enter" or "Spacebar" are pressed + if (/(13|32)/.test(e.keyCode)) { + e.preventDefault(); + $(':focus').click(); + $(document).data('keycount',0); + } + }, + + hide: function() { + this.$newElement.hide(); + }, + + show: function() { + this.$newElement.show(); + }, + + destroy: function() { + this.$newElement.remove(); + this.$element.remove(); + } + }; + + $.fn.selectpicker = function(option, event) { + //get the args of the outer function.. + var args = arguments; + var value; + var chain = this.each(function() { + if ($(this).is('select')) { + var $this = $(this), + data = $this.data('selectpicker'), + options = typeof option == 'object' && option; + + if (!data) { + $this.data('selectpicker', (data = new Selectpicker(this, options, event))); + } else if (options) { + for(var i in options) { + data.options[i] = options[i]; + } + } + + if (typeof option == 'string') { + //Copy the value of option, as once we shift the arguments + //it also shifts the value of option. + var property = option; + if (data[property] instanceof Function) { + [].shift.apply(args); + value = data[property].apply(data, args); + } else { + value = data.options[property]; + } + } + } + }); + + if (value != undefined) { + return value; + } else { + return chain; + } + }; + + $.fn.selectpicker.defaults = { + style: 'btn-default', + size: 'auto', + title: null, + selectedTextFormat : 'values', + noneSelectedText : 'Nothing selected', + countSelectedText: '{0} of {1} selected', + width: false, + container: false, + hideDisabled: false, + showSubtext: false, + showIcon: true, + showContent: true, + dropupAuto: true, + header: false, + liveSearch: false + } + + $(document) + .data('keycount', 0) + .on('keydown', '[data-toggle=dropdown], [role=menu]' , Selectpicker.prototype.keydown) + +}(window.jQuery); diff --git a/web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/9b99f95.js b/web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/068e862.js similarity index 100% rename from web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/9b99f95.js rename to web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/068e862.js diff --git a/web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/a701c2d.js b/web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/a701c2d.js new file mode 100644 index 000000000..1538f9df1 --- /dev/null +++ b/web/assets/backOffice/default/template-assets/assets/js/bootstrap-switch/a701c2d.js @@ -0,0 +1,382 @@ +/*! ============================================================ + * bootstrapSwitch v1.8 by Larentis Mattia @SpiritualGuru + * http://www.larentis.eu/ + * + * Enhanced for radiobuttons by Stein, Peter @BdMdesigN + * http://www.bdmdesign.org/ + * + * Project site: + * http://www.larentis.eu/switch/ + * ============================================================ + * Licensed under the Apache License, Version 2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * ============================================================ */ + +!function ($) { + "use strict"; + + $.fn['bootstrapSwitch'] = function (method) { + var inputSelector = 'input[type!="hidden"]'; + var methods = { + init: function () { + return this.each(function () { + var $element = $(this) + , $div + , $switchLeft + , $switchRight + , $label + , $form = $element.closest('form') + , myClasses = "" + , classes = $element.attr('class') + , color + , moving + , onLabel = "ON" + , offLabel = "OFF" + , icon = false + , textLabel = false; + + $.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) { + if (classes.indexOf(el) >= 0) + myClasses = el; + }); + + $element.addClass('has-switch'); + + if ($element.data('on') !== undefined) + color = "switch-" + $element.data('on'); + + if ($element.data('on-label') !== undefined) + onLabel = $element.data('on-label'); + + if ($element.data('off-label') !== undefined) + offLabel = $element.data('off-label'); + + if ($element.data('label-icon') !== undefined) + icon = $element.data('label-icon'); + + if ($element.data('text-label') !== undefined) + textLabel = $element.data('text-label'); + + $switchLeft = $('') + .addClass("switch-left") + .addClass(myClasses) + .addClass(color) + .html(onLabel); + + color = ''; + if ($element.data('off') !== undefined) + color = "switch-" + $element.data('off'); + + $switchRight = $('') + .addClass("switch-right") + .addClass(myClasses) + .addClass(color) + .html(offLabel); + + $label = $('