diff --git a/CHANGELOG.md b/CHANGELOG.md
index a2b6a8c..101b187 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
### Modulsammlung - Changelog
___
+### 11.07.2023 Version 4.17
+
+removed mblock mform demos
+removed formular generator do form!
### 11.03.2023 Version 4.16.1
diff --git a/do_form.md b/do_form.md
deleted file mode 100644
index 565671f..0000000
--- a/do_form.md
+++ /dev/null
@@ -1,297 +0,0 @@
----
-title: Modulsammlung Formulargenerator
-authors: [skerbis]
-prio:
----
-
-# Formulargenerator
-
-Das Modul ist Teil der Modulsammlung
-
-Basiert auf den Formular-Generator aus REDAXO 3.2 und do form!
-
-- Es werden E-Mails wahlweise im HTML oder Text-Format erstellt.
-- Eine automatische (personalisierbare) Bestätigungs-E-Mail an den Absender steht als Option zur Verfügung.
-- Die Danke-Meldung auf der Website kann mittels WYSIWYG-Editor frei gestaltet werden.
-- Es gibt verschiedene Spamschutz-Lösungen, die verwendet werden können.
-- do form! unterstützt per SSL verschlüsselte E-Mails.
-- Die Übergabe von Post- oder Session-Variablen ist möglich.
-- Auch eine Übertragung von Dateien vom und zum Absender ist möglich.
-- Die Dateien werden wahlweise per E-Mail mit verschickt.
-
-Das Modul ist sehr flexibel in der Konfiguration und Gestaltung.
-
-## Mindest-Systemvoraussetzungen:
-
-- REDAXO 5.x
-- AddOn PHPMailer
-- YForm (nur wg. einer einzigen Funktion)
-- Addon: ein WYSIWYG-Editor, default ist cke5, ist einstellbar in der Modulausgabe
-
-## Konfiguration
-
-### Konfiguration der Eingabe
-
-Die Moduleingabe bietet Möglichkeit Funktionen ein- bzw. auszublenden.
-
-- UPLOADS true oder false
-- SESSIONS AKTIVIEREN true oder false
-- BCC AKTIVIEREN true oder false
-- SSL-Umschalter - Muss in der Ausgabe angepasst werden (nicht in do form! 6.x)
-
-### Konfiguration der Ausgabe
-
-Bitte Kommentare im Quellcode oder in der Eingabe beachten.
-
-
-## Hinweise
-
-Absender-Adresse / WICHTIG!
-Die Absendermail sollte unbedingt festgelegt werden wenn die E-Mail automatisch (optional) beantwortet werden soll. Das geht über die Validierungseinstellung `sender`.
-
-Schreibweise:
-
-```
-text|E-Mail|1|||sender
-```
-
-## Feldaufbau
-
-typ|bezeichnung|pflicht|default|value|validierung
-
-- An erster Stelle definiert man den Feldtyp
-- Pflichtfelder werden mit einer 1 an der 3. Stelle deklariert.
-- Defaultwerte können an 4. Stelle eingegeben werden.
-- Bei einigen Feldern (z.B. date und select) haben die Stellen 4 und 5 eine andere Bedeutung.
-- An letzter Stelle kann bei Textfeldern die Validierung festgelegt werden. (Textfelder sind u.a. auch date, email, IBAN)
-
-## Beispiel einer Formulardefinition
-
-```
-fieldstart|Kontaktdaten
-text|Name|1|||checkfield
-text|Vorname|1|||name
-text|Firma |
-text|Straße|
-text|PLZ|1|||plz
-text|Ort|1|||
-text|Telefon||||tel
-text|Telefax||||tel
-email|E-Mail|1|||sender
-fieldend|
-radio|Geschlecht|0|Mann;Frau|m;w|
-url|Website|1|||url
-IBAN|Ihre IBAN|1|DE||iban
-BIC|BIC|1|||bic
-date|Datum der Meldung|1|today||date
-textarea|Ihre Nachricht:|1|
-upload|ZIP-Upload|0||zip||12.5m
-upload|Bild-Upload|0||png;jpg;gif||5.0m
-text|Bitte geben Sie nochmals Ihren Namen ein|1|||check
-info|Felder mit * sind Pflichtfelder
-hidden|Produkt:|1|GET_produkt
-```
-
-## Textfelder im Formulargenerator
-
-CSS-Klasse: `.formtext` / Je nach Feld kommen noch die Klassen: `.ftext`, `.fIBAN`, `.fIBAN`, `.femail`,`.fplz` usw. hinzu.
-
-Die Textfelder mit der Bezeichnung "Vorname" und "Nachname" können in der Bestätigungsmail mit den Platzhaltern %Vorname% und %Nachname% eingesetzt werden.
-
-```
-text|Name|1|||checkfield
-text|Vorname|1|||name
-text|Firma |
-text|Straße|
-text|PLZ|1|||plz
-text|Ort|1|||
-text|Telefon||||tel
-text|Telefax||||tel
-email|E-Mail|1|||sender
-```
-
-### GET-Variablen können
-
-über ein Textfeld ausgelesen werden
-
-```
-text|Titel:|1|GET_Variablenname|
-```
-
-Alternativ kann man die Variable versteckt übertragen
-
-```
-hidden|Titel:|1|GET_Variablenname|
-```
-
-### Passwörter
-
-```
-password|Ihre Passwort|1|||
-```
-
-### Textfelder für Bankdaten
-
-Die IBAN wird in der Bestätigungsmail anonymisiert
-
-```
-IBAN|Ihre IBAN|1|DE||iban
-BIC|BIC|1|||bic
-```
-
-### URL-Texteingabe
-
-Prüft eine URL http://*
-
-```
-url|Website|1|||url
-```
-
- ### Datumsfeld
-
-Durch Eingabe von „today“ wird das aktuelle Datum als Default-Wert gesetzt.
-HTML5-fähige Browser zeigen auch den Placeholder dd.mm.jjjj an.
-
-```
-date|Datum der Meldung|1|today||date
-```
-
-
-## Texarea
-
-Textblock z.B. zur Erfassung einer Nachricht, CSS-Klasse: `.formtextfield`
-
-```
-textarea|Ihre Nachricht:|1|
-```
-
-## Radio-Buttons und Select-Felder
-
-## Radio-Buttons
-
-Hiermit kann man den Besuchern eine Optionsauswahl präsentieren. Die Werte werden per Semikolon getrennt.
-
-CSS-Klasse: `.formradio`
-
-```
-radio|Geschlecht|0|Mann;Frau|m;w|
-```
-
-### Select-Felder
-
-Hiermit kann man den Besuchern ein Auswahlmenü präsentieren. Die Werte werden per Semikolon getrennt.
-Wird das Select wie nachfolgend als Anrede-Auswahl genutzt, kann in der Bestätigungsmail %Anrede% als Platzhalter verwendet werden.
-
-CSS-Klasse: `.formselect`
-
-```
-select|Anrede|1||;Herr;Frau
-```
-
-
-## Upload durch User
-
-*upload* stellt eine Upload-Möglichkeit zur Verfügung.
-Diese Funktion muss im Eingabe-Modul aktiviert sein. (siehe Quellcode)
-Bei den erlaubten Dateien kann jede beliebige Endung angegeben werden. Die Werte werden per Semikolon getrennt. Bei der Angabe zur Dateigröße können die Kürzel k = Kilobyte, m = Megabyte und g = Gigabyte verwendet werden. Die maximal mögliche Uploadgröße wird aus der php.ini-Datei ermittelt und in der Moduleingabe unterhalb der Angabe zum Uploadordner eingeblendet.
-
-```
-upload|ZIP-Upload|0||zip||12.5m
-upload|Bild-Upload|0||png;jpg;gif||5.0m
-```
-
-## Spezielles:
-
-Sessionvariable do form! kann den Inhalt einer Sessionvariable in einem hidden-Field übertragen. Diese muss in der Eingabe definiert werden. (Aktivierung erforderlich)
-
-```
-svar|bezeichnung
-```
-
-Die Validierung `check`
-prüft ob die Eingabe dem Feld mit der Validierung „checkfield“ oder "Sendercheck" entspricht.
-
-```
-text|Bitte geben Sie nochmals Ihren Namen ein|1|||check
-info Hinweis an den Erfasser (wird nicht übertragen) CSS-Klasse: .formhinweis
-info|Felder mit * sind Pflichtfelder
-```
-
-### ilink / exlink
-
-Interner Link: ilink
-
-Link im neuen Fenster: exlink
-
-CSS-Klasse: `.formlink`
-
-Anwendung:
-
-Der Aufbau unterscheidet sich stark von den anderen Feldern:
-
-`ilink|id|parameter(& = & amp;)|CSS-Klasse|Bezeichnung`
-
-Beispiel: `exlink|24|Unsere AGB`
-
-### trennelement
-
-Mit diesem Feld kann man einen Abstand zwischen den einzelnen Feldern schaffen.
-
-CSS-Klasse: `.formtrenn`
-
-Verwendung: trennelement|
-
-
-### headline / info
-
-Hiermit können Sie Zwischenüberschriften oder Hinweise erstellen headline kann auch verwendet werden um die endgültige E-Mail zu strukturieren. headline dient hierbei als Zwischenüberschrift der 2. Ebene (h2) in der E-Mail
-Info wird nur auf der Website angezeigt
-
-Verwendung:
-
-```
-headline|text der erscheinen soll
-info|text der erscheinen soll
-```
-
-
-## Gestaltungsmöglichkeiten
-
-Das Formular hat die Klasse .formgen. Die CSS-Klassen der Eingabefelder entnehmen Sie bitte den Feldbeschreibungen. Jedes Feld inkl. Label ist zudem innerhalb eines DIVs mit der CSS-Kalsse .formfiled untergebracht. Dieses DIV wird bei einem Fehler (wie auch die Label) mit einer zusätzlichen CSS-Klasse belegt. Standard: .formerror. Die Klassenbezeichnung lässt sich in der Ausgabe des Moduls leicht anpassen.
-
-### Fieldset
-
-`fieldstart|Kontaktdaten`
-
-`fieldend|` beendet ein fieldset
-
-
-### DIV
-
-`divstart|cssklasse` oder `divstart|#cssID`
-
-`divend|` beendet ein DIV
-
-
-## Validierung von Text-Feldern
-
-(text, IBAN, BIC, email, date, url...) Validierungen werden auch durchgeführt, wenn das Feld kein Pflichtfeld ist.
-
-Zur Validierung stehen folgende Funktionen zur Verfügung:
-
-- url - prüft die eingegebene URL
-- date - prüft das Datum
-- time - prüft die eingegebene Uhrzeit
-- name - prüft ob ein Name eingegeben wurden (bestimmte Zeichen wie - und . sind erlaubt)
-- alpha - prüft ob "nur" Buchstaben eingegeben wurden
-- digit - prüft ob eine Zahl eingegeben wurde
-- plz - 5-stellige Postleitzahlen
-- plz4 - 4-stellige Postleitzahlen (z.B. Schweiz)
-- tel - prüft ob mindestens 6 Zahlen eingegeben wurden
-- email - prüft ob eine korrekte E-Mail-Adresse eingegeben wurde
-- sender - prüft und legt die Absenderadresse des Besuchers fest
-- bic - Prüft eine BIC-Eingabe
-- iban - Prüft eine IBAN-Eingabe
-- checkfield - Festlegung des Feldes das wiederholt werden soll
-- sendercheck - Festlegung des E-Mail-Feldes das wiederholt werden soll und als Absender (sender) definiert werden soll
-- check - Prüft ob die Eingabe dem checkfield entspricht
diff --git a/lib/module/0036_text_kontaktformular_generator/config.inc b/lib/module/0036_text_kontaktformular_generator/config.inc
deleted file mode 100644
index 0fa9001..0000000
--- a/lib/module/0036_text_kontaktformular_generator/config.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-modulname = "0036 - Text / Kontaktformular-Generator (do form!)"
-status = 1; 0 = geplant, 1 = fertig, 2 = in Bearbeitung
diff --git a/lib/module/0036_text_kontaktformular_generator/info.inc b/lib/module/0036_text_kontaktformular_generator/info.inc
deleted file mode 100644
index 2cf5e8a..0000000
--- a/lib/module/0036_text_kontaktformular_generator/info.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-
Formulargenerator-Modul
-
Kompatibel mit UiKit
-
Dieser Generator ermöglicht das Erstellen und Versenden von E-Mail-Formularen. Etwas einfacher als mit yForm.
-
Ein Standardformular ist direkt beim ersten Aufruf vorkonfiguriert
-
Eine ausführliche Hilfe findet man in den REDAXO tricks
-
-
Die beiliegenden CSS-Stile sind nur ein Beispiel und werden bei UiKit nicht vollständig benötigt.
diff --git a/lib/module/0036_text_kontaktformular_generator/input.inc b/lib/module/0036_text_kontaktformular_generator/input.inc
deleted file mode 100644
index 20be78d..0000000
--- a/lib/module/0036_text_kontaktformular_generator/input.inc
+++ /dev/null
@@ -1,325 +0,0 @@
-Datenschutzerklärung gelesen|1|
-info|Geben Sie bitte nochmal Ihren Vornamen ein
-text|Nachname|1|||check
-';
-$sessionson = false;
-
-
-/**
- * Convert a shorthand byte value from a PHP configuration directive to an integer value
- * @param string $value
- * @return int
- */
-if (!function_exists('convertBytes')) {
-function convertBytes( $value ) {
- if ( is_numeric( $value ) ) {
- return $value;
- } else {
- $value = trim ($value);
- $value_length = strlen( $value );
- $qty = substr( $value, 0, $value_length - 1 );
- $unit = strtolower( substr( $value, $value_length - 1 ) );
- switch ( $unit ) {
- case 'g':
- $qty *= 1024;
- case 'm':
- $qty *= 1024;
- case 'k':
- $qty *= 1024;
- }
- return $qty;
- }
-}
-}
-?>
-
-
-
-
-
-
-
-
- do form! basiert auf den in Redaxo 3.2 mitgelieferten Formular-Generator.
- Beim ersten Aufruf erstellt das Modul eine Konfiguration für ein Standard-Kontaktformular.
- Im Beispiel-Formular sehen Sie Möglichkeiten zur Konfiguration.
-Empfehlung:
- Wir empfehlen im PHP-Mailer die Einstellung SMTP-AUTH zu verwenden.
-
-
Validierung von Textfeldern
-
-
-
alpha (nur engl.Buchstaben)
-
url (URL)
-
date
-
time
-
IBAN
-
BIC
-
digit (nur Zahlen)
-
plz (5 Zahlen)
-
plz4 (4 Zahlen)
-
tel
-
name prüft Namen und z.B. übliche Firmenbezeichnungen
-
mail (prüft eingegebene E-Mail-Adressen)
-
sender (diese Adresse wird als Absendermail eingesetzt und geprüft)
-
check - Prüfen der Spamschutzeingabe (captchapic oder checkfield)
- entspricht sonst der Validierung: name
-
checkfield (legt ein Vergleichsfeld fest das als Spamschutzcode gilt)
-*'; // Markierung von Pflichtfeldern
-$form_bcc = "REX_VALUE[11]"; // BCC-Feld
-$form_deliver_org = "REX_VALUE[13]"; //Original senden an Bestätigungsmail anhängen
-$form_submit_title = "REX_VALUE[7]"; // Bezeichnung des Sende-Buttons
-$form_attachment = rex_path::media(). "REX_MEDIA[id=1 output=1]"; // Pfad zum Dateianhang bei Bestätigungs-E-Mail
-$form_upload_folder = rex_path::media(). "upload/"; // Pfad für Dateien, die über das Formular hochgeladen werden
-$form_send_path = false; // true, wenn der Pfad zum Anhang mitgesendet werden soll
-// FROMMODE: true entspricht der Absender der E-Mail dem Empfänger der Mail
-// Bei false wird der Absender aus den PHPMailer-Addon-Einstellungen übernommen
-$form_from_mode = true; // Standard=true umgeht Spamfilter
-// Welche Felder sollen nicht in der E-Mail übertragen werden?
-$form_ignore_fields = array(
- 'captcha',
- 'sicherheitscode',
- 'ilink',
- 'link',
- 'divstart',
- 'divend',
- 'fieldend',
- 'info',
- 'exlink'
-);
-// Captcha
-$captchaID = 000; // ID zum Captcha-Artikel der das Captcha-Template nutzt
-$captchasource = htmlspecialchars(rex_getUrl($captchaID));
-// Alternative: Externe Einbindung eines Captchas
-// $captchasource="/redaxo/captcha/captcha.php";
-// Fehlermeldungen / Mehrsprachig
-// Sprache 0 -- Hier Deutsch
-if (rex_clang::getCurrentId() == 1) {
- //### Achtung! Hinter <<< EOD darf kein Leerzeichen stehen.
- $form_error = << Bitte überprüfen Sie Ihre Eingaben.
-EOD;
- $form_iban_info = << Zu Ihrer Sicherheit wurde die IBAN anonymisiert.
-EOD;
- $form_iban_info = <<Sie haben versucht die Seite neu zu laden. Ihre Nachricht wurde bereits verschickt";
-}
-// Sprache 1 -- z.B. Englisch
-if (rex_clang::getCurrentId() == 2) {
- $form_error = <<
-Please check the information you have provided.
-EOD;
- $form_notice_reload = " You have tried to reload this page. Your message has already been sent.";
-}
-// Sprache 2 -- z.B. Niederlande
-if (rex_clang::getCurrentId() == 3) {
- $form_error = <<
-Controleer uw gegevens.
-EOD;
- $form_notice_reload = " You have tried to reload this page. Your message has been already sent.";
-}
-// E-Mail-HEADER
-$form_template_html = '
-
-
-
-NACHRICHTEN-ÜBERMITTLUNG
-
-
-
-
-
- ' . $form_subject . '
-
-';
-// E-Mail-Footer
-$form_template_html_footer = '
- ';
-$nonhtmlfooter = "\n----------------------------------\n
- ";
-// Ende der allgemeinen Konfiguration
-
-$sselect = $absendermail = "";
-$cupload = 0;
-$fcounter = $xcounter = 1;
-
-
-if (!function_exists('is_old_android')) {
- function is_old_android($version = '4.2.0')
- {
-
- if (strstr($_SERVER['HTTP_USER_AGENT'], 'Android')) {
-
- preg_match('/Android (\d+(?:\.\d+)+)[;)]/', $_SERVER['HTTP_USER_AGENT'], $matches);
-
- return version_compare($matches[1], $version, '<=');
-
- }
-
- }
-}
-
-
-/**
- * prueft ob die Mindestanzahl an Argumenten mit der Vorgabe uebereinstimmt
- *
- * Achtung! Die Mindestanzahl an Elementen muss mit Array-Zaehlweise angegeben werden.
- * D.h., die Zahlung beginnt inkl. der Null.
- *
- * @param int $mustHave - Mindestanzahl an Elementen
- * @param array $elements - Elementa-Array
- * @param string $formelement - Name des Elementes in dem der Check ausgefuehrt wird
- * @return string
- */
-
-
-if (!function_exists('form_checkElements')) {
- function form_checkElements($mustHave, $elements, $formelement)
- {
- // Diese Information ist nur im Backend zu sehen
- if (rex::isBackend()) {
- // $formelement darf nicht leer sein
- if ($formelement == '') {
- return 'Der Formelementename wurde nicht erkannt. Siehe Funktion "form_checkElements" ';
- }
- // $mustHave muss mind. 2 sein
- if ((int) $mustHave < 2) {
- return $formelement . ': Die Vorgabezahl darf nicht kleiner als 2 sein! ';
- }
- // $elements muss ein Array sein
- if (!is_array($elements)) {
- return $formelement . ': Das ubergebene Element ist kein Array. ';
- }
- $anzahlElemente = count($elements);
- if ($mustHave > count($elements)) {
- $fehlermeldung = 'Es wurden nicht genuegend Argumente fuer das Formualarfeld "' . $formelement . '" angegeben. ';
- $fehlermeldung .= 'Angegeben wurden ' . $anzahlElemente . ' Argumente, benoetigt werden aber mind. ' . $mustHave . ' Argumente! ' . "\n";
- return $fehlermeldung;
- } else {
- return '';
- }
- } else {
- return '';
- }
- }
-}
-/**
- * Gibt eine Fehlermeldung vom Upload zurueck
- *
- * @param $error_code
- * @see http://de.php.net/manual/en/features.file-upload.errors.php
- * @return string Fehlermeldung
- */
-if (!function_exists('file_upload_error_message')) {
- function file_upload_error_message($error_code)
- {
- switch ($error_code) {
- case UPLOAD_ERR_INI_SIZE: // Fehler Nr.: 1
- return 'The uploaded file exceeds the upload_max_filesize directive in php.ini';
- case UPLOAD_ERR_FORM_SIZE: // Fehler Nr.: 2
- return 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form';
- case UPLOAD_ERR_PARTIAL: // Fehler Nr.: 3
- return 'The uploaded file was only partially uploaded';
- case UPLOAD_ERR_NO_FILE: // Fehler Nr.: 4
- return 'No file was uploaded';
- case UPLOAD_ERR_NO_TMP_DIR: // Fehler Nr.: 6 (Introduced in PHP 4.3.10 and PHP 5.0.3.)
- return 'Missing a temporary folder';
- case UPLOAD_ERR_CANT_WRITE: // Fehler Nr.: 7 (Introduced in PHP 5.1.0.)
- return 'Failed to write file to disk';
- case UPLOAD_ERR_EXTENSION: // Fehler Nr.: 8 (Introduced in PHP 5.2.0.)
- return 'File upload stopped by extension';
- default:
- return 'Unknown upload error';
- }
- }
-}
-
-
-
-if (!function_exists('getValidIban')) {
- function getValidIban($iban)
- {
- // normalize
- $iban = str_replace(array(
- ' ',
- '-',
- '.',
- ','
- ), '', strtoupper($iban));
- // define the pattern
- $pattern = '#(?P((?=[0-9A-Z]{28}$)AL\d{10}[0-9A-Z]{16}$|^(?=[0-9A-Z]{24}$)AD\d{10}[0-9A-Z]{12}$|^(?=[0-9A-Z]{20}$)AT\d{18}$|^(?=[0-9A-Z]{22}$)BH\d{2}[A-Z]{4}[0-9A-Z]{14}$|^(?=[0-9A-Z]{16}$)BE\d{14}$|^(?=[0-9A-Z]{20}$)BA\d{18}$|^(?=[0-9A-Z]{22}$)BG\d{2}[A-Z]{4}\d{6}[0-9A-Z]{8}$|^(?=[0-9A-Z]{21}$)HR\d{19}$|^(?=[0-9A-Z]{28}$)CY\d{10}[0-9A-Z]{16}$|^(?=[0-9A-Z]{24}$)CZ\d{22}$|^(?=[0-9A-Z]{18}$)DK\d{16}$|^FO\d{16}$|^GL\d{16}$|^(?=[0-9A-Z]{28}$)DO\d{2}[0-9A-Z]{4}\d{20}$|^(?=[0-9A-Z]{20}$)EE\d{18}$|^(?=[0-9A-Z]{18}$)FI\d{16}$|^(?=[0-9A-Z]{27}$)FR\d{12}[0-9A-Z]{11}\d{2}$|^(?=[0-9A-Z]{22}$)GE\d{2}[A-Z]{2}\d{16}$|^(?=[0-9A-Z]{22}$)DE\d{20}$|^(?=[0-9A-Z]{23}$)GI\d{2}[A-Z]{4}[0-9A-Z]{15}$|^(?=[0-9A-Z]{27}$)GR\d{9}[0-9A-Z]{16}$|^(?=[0-9A-Z]{28}$)HU\d{26}$|^(?=[0-9A-Z]{26}$)IS\d{24}$|^(?=[0-9A-Z]{22}$)IE\d{2}[A-Z]{4}\d{14}$|^(?=[0-9A-Z]{23}$)IL\d{21}$|^(?=[0-9A-Z]{27}$)IT\d{2}[A-Z]\d{10}[0-9A-Z]{12}$|^(?=[0-9A-Z]{20}$)[A-Z]{2}\d{5}[0-9A-Z]{13}$|^(?=[0-9A-Z]{30}$)KW\d{2}[A-Z]{4}22!$|^(?=[0-9A-Z]{21}$)LV\d{2}[A-Z]{4}[0-9A-Z]{13}$|^(?=[0-9A-Z]{,28}$)LB\d{6}[0-9A-Z]{20}$|^(?=[0-9A-Z]{21}$)LI\d{7}[0-9A-Z]{12}$|^(?=[0-9A-Z]{20}$)LT\d{18}$|^(?=[0-9A-Z]{20}$)LU\d{5}[0-9A-Z]{13}$|^(?=[0-9A-Z]{19}$)MK\d{5}[0-9A-Z]{10}\d{2}$|^(?=[0-9A-Z]{31}$)MT\d{2}[A-Z]{4}\d{5}[0-9A-Z]{18}$|^(?=[0-9A-Z]{27}$)MR13\d{23}$|^(?=[0-9A-Z]{30}$)MU\d{2}[A-Z]{4}\d{19}[A-Z]{3}$|^(?=[0-9A-Z]{27}$)MC\d{12}[0-9A-Z]{11}\d{2}$|^(?=[0-9A-Z]{22}$)ME\d{20}$|^(?=[0-9A-Z]{18}$)NL\d{2}[A-Z]{4}\d{10}$|^(?=[0-9A-Z]{15}$)NO\d{13}$|^(?=[0-9A-Z]{28}$)PL\d{10}[0-9A-Z]{,16}n$|^(?=[0-9A-Z]{25}$)PT\d{23}$|^(?=[0-9A-Z]{24}$)RO\d{2}[A-Z]{4}[0-9A-Z]{16}$|^(?=[0-9A-Z]{27}$)SM\d{2}[A-Z]\d{10}[0-9A-Z]{12}$|^(?=[0-9A-Z]{,24}$)SA\d{4}[0-9A-Z]{18}$|^(?=[0-9A-Z]{22}$)RS\d{20}$|^(?=[0-9A-Z]{24}$)SK\d{22}$|^(?=[0-9A-Z]{19}$)SI\d{17}$|^(?=[0-9A-Z]{24}$)ES\d{22}$|^(?=[0-9A-Z]{24}$)SE\d{22}$|^(?=[0-9A-Z]{21}$)CH\d{7}[0-9A-Z]{12}$|^(?=[0-9A-Z]{24}$)TN59\d{20}$|^(?=[0-9A-Z]{26}$)TR\d{7}[0-9A-Z]{17}$|^(?=[0-9A-Z]{,23}$)AE\d{21}$|^(?=[0-9A-Z]{22}$)GB\d{2}[A-Z]{4}\d{14}))#';
- // check
- if (preg_match($pattern, $iban, $matches)) {
- return true;
- } else {
- return false;
- }
- }
-}
-if (!function_exists('convertBytes')) {
- function convertBytes($value)
- {
- if (is_numeric($value)) {
- return $value;
- }
-
- $value = trim($value);
- $unit = strtolower(substr($value, -1));
- $qty = (int)substr($value, 0, -1);
-
- switch ($unit) {
- case 'g':
- $qty *= 1024;
- case 'm':
- $qty *= 1024;
- case 'k':
- $qty *= 1024;
- break;
- }
-
- return $qty;
- }
-}
-
-$rex_form_data = <<","",rex_yform::unhtmlentities($rex_form_data)));
-
-$mailbody = << tempFile )
- * @var array
- */
-$upload_File = array();
-for ($i = 0; $i < count($form_elements); $i++) {
- // ueberspringe Leerzeilen
- if (trim($form_elements[$i]) == '') {
- continue;
- }
- $element = explode("|", $form_elements[$i]);
- $AFE[$i] = $element;
- $formfield = 0;
-
-
- switch ($element[0]) {
- case "svar":
- case "session":
- $formoutput[] = '
- ';
- break;
- // Gestaltungselemente
- case "headline":
- $formoutput[] = '
' . $element[1] . '
';
- break;
- case "info":
- $formoutput[] = '
' . $element[1] . '
';
- break;
- case "HTML":
- case "html":
- $formoutput[] = '
Diese Modul dient dazu Bilder mittels des Owl Carousel 2 auszugeben.
-
-
-Voraussetzungen
-
-
-
MBlock Addon
-
MForm Addon
-
Redactor 2
-
jQuery im Frontend
-
OWL Dateien (JS / CSS)
-
-
-
-
Bitte beachten
-
Es werden nicht automatisch die benötigeten JS und CSS Dateien eingebunden!
-
Es werden die Dateien des JavaScript Plugins OwlCarousel in den Ordner ./assets/owlcarousel kopiert. Somit stehen dort die erforderlichen JS und CSS Dateien zur Verfügung.
-
-
Die benötigten Dateien müssen also von Hand in das/die Frontend-Template/s eingebunden werden.
Grundsätzlich basiert der Output auf dem Bootstrap Carousel. Das Element im Slider-Markup ist nur ein Beispiel, wei man weitere gestalterische Elemente individuell pro Slide einbinden kann.
-
Die Inhalte der Formular-Blöcke lassen sich, nach dem ersten Hinzufügen des Moduls, mit Klick auf die Head Sliderbild einklappen, damit die Blöcke sich leichter sortieren lassen. Die Expertenoptionen für das Owl Carousel lassen sich auch so ausklappen.
-
-
-
Es ist natürlich möglich die Dateien "von Hand" an anderer Stelle zu kopieren und auch auf andere Weise einzubinden...
'.PHP_EOL;
-
- //let the owls have it
- print $output;
-
-}
-
-?>
-
-
-
-
\ No newline at end of file
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/LICENSE b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/LICENSE
deleted file mode 100644
index 699398c..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright (c) 2014 Owl
-Modified work Copyright 2016 David Deutsch
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/README.md b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/README.md
deleted file mode 100644
index 21be1f5..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/README.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# OwlCarousel2 is currently being transferred to a new owner
-
-Stay tuned while the new owner sorts through some stuff. (Oh, hi, I'm [David](https://github.com/daviddeutsch)!)
-
-## Owl Carousel 2 Beta
-
-Touch enabled [jQuery](https://jquery.com/) plugin that lets you create a beautiful, responsive carousel slider. **To get started, check out https://owlcarousel2.github.io/OwlCarousel2/.**
-
-Please consider that the project is still in beta. The current status of the milestones can be found [here](https://github.com/owlcarousel2/OwlCarousel2/milestones). If you want to use the [latest development](https://github.com/owlcarousel2/OwlCarousel2/archive/develop.zip) see [building](#building).
-
-## Quick start
-
-### Install
-
-This package can be installed with:
-
-- [npm](https://www.npmjs.com/package/owl.carousel): `npm install --save owl.carousel`
-- [bower](http://bower.io/search/?q=owl.carousel): `bower install --save owl.carousel`
-
-Or download the [latest release](https://github.com/OwlCarousel2/OwlCarousel2/releases).
-
-### Load
-
-#### Webpack
-
-Load the required stylesheet and JS:
-
-```js
-import 'owl.carousel/dist/assets/owl.carousel.css';
-import $ from 'jquery';
-import 'imports?jQuery=jquery!owl.carousel';
-```
-
-#### Static HTML
-
-Put the required stylesheet at the [top](https://developer.yahoo.com/performance/rules.html#css_top) of your markup:
-
-```html
-
-```
-
-```html
-
-```
-
-**NOTE:** If you want to use the default navigation styles, you will also need to include `owl.theme.default.css`.
-
-
-Put the script at the [bottom](https://developer.yahoo.com/performance/rules.html#js_bottom) of your markup right after jQuery:
-
-```html
-
-
-```
-
-```html
-
-
-```
-
-### Usage
-
-Wrap your items (`div`, `a`, `img`, `span`, `li` etc.) with a container element (`div`, `ul` etc.). Only the class `owl-carousel` is mandatory to apply proper styles:
-
-```html
-
-
Your Content
-
Your Content
-
Your Content
-
Your Content
-
Your Content
-
Your Content
-
Your Content
-
-```
-**NOTE:** The `owl-theme` class is optional, but without it, you will need to style navigation features on your own.
-
-
-Call the [plugin](https://learn.jquery.com/plugins/) function and your carousel is ready.
-
-```javascript
-$(document).ready(function(){
- $('.owl-carousel').owlCarousel();
-});
-```
-
-## Documentation
-
-The documentation, included in this repo in the root directory, is built with [Assemble](http://assemble.io/) and publicly available at https://owlcarousel2.github.io/OwlCarousel2/. The documentation may also be run locally.
-
-## Building
-
-This package comes with [Grunt](http://gruntjs.com/) and [Bower](http://bower.io/). The following tasks are available:
-
- * `default` compiles the CSS and JS into `/dist` and builds the doc.
- * `dist` compiles the CSS and JS into `/dist` only.
- * `watch` watches source files and builds them automatically whenever you save.
- * `test` runs [JSHint](http://www.jshint.com/) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/).
-
-To define which plugins are build into the distribution just edit `/_config.json` to fit your needs.
-
-## Contributing
-
-Please read [CONTRIBUTING.md](CONTRIBUTING.md).
-
-## License
-
-The code and the documentation are released under the [MIT License](LICENSE).
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/ajax-loader.gif b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/ajax-loader.gif
deleted file mode 100644
index a152509..0000000
Binary files a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/ajax-loader.gif and /dev/null differ
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.carousel.css b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.carousel.css
deleted file mode 100644
index 26ea527..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.carousel.css
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * Owl Carousel v2.2.0
- * Copyright 2013-2016 David Deutsch
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
- */
-/*
- * Owl Carousel - Core
- */
-.owl-carousel {
- display: none;
- width: 100%;
- -webkit-tap-highlight-color: transparent;
- /* position relative and z-index fix webkit rendering fonts issue */
- position: relative;
- z-index: 1; }
- .owl-carousel .owl-stage {
- position: relative;
- -ms-touch-action: pan-Y; }
- .owl-carousel .owl-stage:after {
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0; }
- .owl-carousel .owl-stage-outer {
- position: relative;
- overflow: hidden;
- /* fix for flashing background */
- -webkit-transform: translate3d(0px, 0px, 0px); }
- .owl-carousel .owl-item {
- position: relative;
- min-height: 1px;
- float: left;
- -webkit-backface-visibility: hidden;
- -webkit-tap-highlight-color: transparent;
- -webkit-touch-callout: none; }
- .owl-carousel .owl-item img {
- display: block;
- width: 100%;
- -webkit-transform-style: preserve-3d; }
- .owl-carousel .owl-nav.disabled,
- .owl-carousel .owl-dots.disabled {
- display: none; }
- .owl-carousel .owl-nav .owl-prev,
- .owl-carousel .owl-nav .owl-next,
- .owl-carousel .owl-dot {
- cursor: pointer;
- cursor: hand;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none; }
- .owl-carousel.owl-loaded {
- display: block; }
- .owl-carousel.owl-loading {
- opacity: 0;
- display: block; }
- .owl-carousel.owl-hidden {
- opacity: 0; }
- .owl-carousel.owl-refresh .owl-item {
- visibility: hidden; }
- .owl-carousel.owl-drag .owl-item {
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none; }
- .owl-carousel.owl-grab {
- cursor: move;
- cursor: grab; }
- .owl-carousel.owl-rtl {
- direction: rtl; }
- .owl-carousel.owl-rtl .owl-item {
- float: right; }
-
-/* No Js */
-.no-js .owl-carousel {
- display: block; }
-
-/*
- * Owl Carousel - Animate Plugin
- */
-.owl-carousel .animated {
- -webkit-animation-duration: 1000ms;
- animation-duration: 1000ms;
- -webkit-animation-fill-mode: both;
- animation-fill-mode: both; }
-
-.owl-carousel .owl-animated-in {
- z-index: 0; }
-
-.owl-carousel .owl-animated-out {
- z-index: 1; }
-
-.owl-carousel .fadeOut {
- -webkit-animation-name: fadeOut;
- animation-name: fadeOut; }
-
-@-webkit-keyframes fadeOut {
- 0% {
- opacity: 1; }
- 100% {
- opacity: 0; } }
-
-@keyframes fadeOut {
- 0% {
- opacity: 1; }
- 100% {
- opacity: 0; } }
-
-/*
- * Owl Carousel - Auto Height Plugin
- */
-.owl-height {
- transition: height 500ms ease-in-out; }
-
-/*
- * Owl Carousel - Lazy Load Plugin
- */
-.owl-carousel .owl-item .owl-lazy {
- opacity: 0;
- transition: opacity 400ms ease; }
-
-.owl-carousel .owl-item img.owl-lazy {
- -webkit-transform-style: preserve-3d;
- transform-style: preserve-3d; }
-
-/*
- * Owl Carousel - Video Plugin
- */
-.owl-carousel .owl-video-wrapper {
- position: relative;
- height: 100%;
- background: #000; }
-
-.owl-carousel .owl-video-play-icon {
- position: absolute;
- height: 80px;
- width: 80px;
- left: 50%;
- top: 50%;
- margin-left: -40px;
- margin-top: -40px;
- background: url("owl.video.play.png") no-repeat;
- cursor: pointer;
- z-index: 1;
- -webkit-backface-visibility: hidden;
- transition: -webkit-transform 100ms ease;
- transition: transform 100ms ease; }
-
-.owl-carousel .owl-video-play-icon:hover {
- -webkit-transform: scale(1.3, 1.3);
- -ms-transform: scale(1.3, 1.3);
- transform: scale(1.3, 1.3); }
-
-.owl-carousel .owl-video-playing .owl-video-tn,
-.owl-carousel .owl-video-playing .owl-video-play-icon {
- display: none; }
-
-.owl-carousel .owl-video-tn {
- opacity: 0;
- height: 100%;
- background-position: center center;
- background-repeat: no-repeat;
- background-size: contain;
- transition: opacity 400ms ease; }
-
-.owl-carousel .owl-video-frame {
- position: relative;
- z-index: 1;
- height: 100%;
- width: 100%; }
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.carousel.min.css b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.carousel.min.css
deleted file mode 100644
index 7420bb1..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.carousel.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * Owl Carousel v2.2.0
- * Copyright 2013-2016 David Deutsch
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
- */
-.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:-webkit-transform .1s ease;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transform:scale(1.3,1.3);-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
\ No newline at end of file
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.default.css b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.default.css
deleted file mode 100644
index bcff309..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.default.css
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Owl Carousel v2.2.0
- * Copyright 2013-2016 David Deutsch
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
- */
-/*
- * Default theme - Owl Carousel CSS File
- */
-.owl-theme .owl-nav {
- margin-top: 10px;
- text-align: center;
- -webkit-tap-highlight-color: transparent; }
- .owl-theme .owl-nav [class*='owl-'] {
- color: #FFF;
- font-size: 14px;
- margin: 5px;
- padding: 4px 7px;
- background: #D6D6D6;
- display: inline-block;
- cursor: pointer;
- border-radius: 3px; }
- .owl-theme .owl-nav [class*='owl-']:hover {
- background: #869791;
- color: #FFF;
- text-decoration: none; }
- .owl-theme .owl-nav .disabled {
- opacity: 0.5;
- cursor: default; }
-
-.owl-theme .owl-nav.disabled + .owl-dots {
- margin-top: 10px; }
-
-.owl-theme .owl-dots {
- text-align: center;
- -webkit-tap-highlight-color: transparent; }
- .owl-theme .owl-dots .owl-dot {
- display: inline-block;
- zoom: 1;
- *display: inline; }
- .owl-theme .owl-dots .owl-dot span {
- width: 10px;
- height: 10px;
- margin: 5px 7px;
- background: #D6D6D6;
- display: block;
- -webkit-backface-visibility: visible;
- transition: opacity 200ms ease;
- border-radius: 30px; }
- .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span {
- background: #869791; }
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.default.min.css b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.default.min.css
deleted file mode 100644
index 150d01c..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.default.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * Owl Carousel v2.2.0
- * Copyright 2013-2016 David Deutsch
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
- */
-.owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791}
\ No newline at end of file
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.green.css b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.green.css
deleted file mode 100644
index cf870d6..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.green.css
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Owl Carousel v2.2.0
- * Copyright 2013-2016 David Deutsch
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
- */
-/*
- * Green theme - Owl Carousel CSS File
- */
-.owl-theme .owl-nav {
- margin-top: 10px;
- text-align: center;
- -webkit-tap-highlight-color: transparent; }
- .owl-theme .owl-nav [class*='owl-'] {
- color: #FFF;
- font-size: 14px;
- margin: 5px;
- padding: 4px 7px;
- background: #D6D6D6;
- display: inline-block;
- cursor: pointer;
- border-radius: 3px; }
- .owl-theme .owl-nav [class*='owl-']:hover {
- background: #4DC7A0;
- color: #FFF;
- text-decoration: none; }
- .owl-theme .owl-nav .disabled {
- opacity: 0.5;
- cursor: default; }
-
-.owl-theme .owl-nav.disabled + .owl-dots {
- margin-top: 10px; }
-
-.owl-theme .owl-dots {
- text-align: center;
- -webkit-tap-highlight-color: transparent; }
- .owl-theme .owl-dots .owl-dot {
- display: inline-block;
- zoom: 1;
- *display: inline; }
- .owl-theme .owl-dots .owl-dot span {
- width: 10px;
- height: 10px;
- margin: 5px 7px;
- background: #D6D6D6;
- display: block;
- -webkit-backface-visibility: visible;
- transition: opacity 200ms ease;
- border-radius: 30px; }
- .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span {
- background: #4DC7A0; }
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.green.min.css b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.green.min.css
deleted file mode 100644
index 2c51e13..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.theme.green.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * Owl Carousel v2.2.0
- * Copyright 2013-2016 David Deutsch
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
- */
-.owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#4DC7A0;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#4DC7A0}
\ No newline at end of file
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.video.play.png b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.video.play.png
deleted file mode 100644
index 98a8ea8..0000000
Binary files a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/assets/owl.video.play.png and /dev/null differ
diff --git a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/owl.carousel.js b/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/owl.carousel.js
deleted file mode 100644
index b112f2f..0000000
--- a/lib/module_mform_mblock/0820_mblock_mform_owl_carousel/owlcarousel/owl.carousel.js
+++ /dev/null
@@ -1,3273 +0,0 @@
-/**
- * Owl Carousel v2.2.0
- * Copyright 2013-2016 David Deutsch
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
- */
-/**
- * Owl carousel
- * @version 2.1.6
- * @author Bartosz Wojciechowski
- * @author David Deutsch
- * @license The MIT License (MIT)
- * @todo Lazy Load Icon
- * @todo prevent animationend bubling
- * @todo itemsScaleUp
- * @todo Test Zepto
- * @todo stagePadding calculate wrong active classes
- */
-;(function($, window, document, undefined) {
-
- /**
- * Creates a carousel.
- * @class The Owl Carousel.
- * @public
- * @param {HTMLElement|jQuery} element - The element to create the carousel for.
- * @param {Object} [options] - The options
- */
- function Owl(element, options) {
-
- /**
- * Current settings for the carousel.
- * @public
- */
- this.settings = null;
-
- /**
- * Current options set by the caller including defaults.
- * @public
- */
- this.options = $.extend({}, Owl.Defaults, options);
-
- /**
- * Plugin element.
- * @public
- */
- this.$element = $(element);
-
- /**
- * Proxied event handlers.
- * @protected
- */
- this._handlers = {};
-
- /**
- * References to the running plugins of this carousel.
- * @protected
- */
- this._plugins = {};
-
- /**
- * Currently suppressed events to prevent them from beeing retriggered.
- * @protected
- */
- this._supress = {};
-
- /**
- * Absolute current position.
- * @protected
- */
- this._current = null;
-
- /**
- * Animation speed in milliseconds.
- * @protected
- */
- this._speed = null;
-
- /**
- * Coordinates of all items in pixel.
- * @todo The name of this member is missleading.
- * @protected
- */
- this._coordinates = [];
-
- /**
- * Current breakpoint.
- * @todo Real media queries would be nice.
- * @protected
- */
- this._breakpoint = null;
-
- /**
- * Current width of the plugin element.
- */
- this._width = null;
-
- /**
- * All real items.
- * @protected
- */
- this._items = [];
-
- /**
- * All cloned items.
- * @protected
- */
- this._clones = [];
-
- /**
- * Merge values of all items.
- * @todo Maybe this could be part of a plugin.
- * @protected
- */
- this._mergers = [];
-
- /**
- * Widths of all items.
- */
- this._widths = [];
-
- /**
- * Invalidated parts within the update process.
- * @protected
- */
- this._invalidated = {};
-
- /**
- * Ordered list of workers for the update process.
- * @protected
- */
- this._pipe = [];
-
- /**
- * Current state information for the drag operation.
- * @todo #261
- * @protected
- */
- this._drag = {
- time: null,
- target: null,
- pointer: null,
- stage: {
- start: null,
- current: null
- },
- direction: null
- };
-
- /**
- * Current state information and their tags.
- * @type {Object}
- * @protected
- */
- this._states = {
- current: {},
- tags: {
- 'initializing': [ 'busy' ],
- 'animating': [ 'busy' ],
- 'dragging': [ 'interacting' ]
- }
- };
-
- $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {
- this._handlers[handler] = $.proxy(this[handler], this);
- }, this));
-
- $.each(Owl.Plugins, $.proxy(function(key, plugin) {
- this._plugins[key.charAt(0).toLowerCase() + key.slice(1)]
- = new plugin(this);
- }, this));
-
- $.each(Owl.Workers, $.proxy(function(priority, worker) {
- this._pipe.push({
- 'filter': worker.filter,
- 'run': $.proxy(worker.run, this)
- });
- }, this));
-
- this.setup();
- this.initialize();
- }
-
- /**
- * Default options for the carousel.
- * @public
- */
- Owl.Defaults = {
- items: 3,
- loop: false,
- center: false,
- rewind: false,
-
- mouseDrag: true,
- touchDrag: true,
- pullDrag: true,
- freeDrag: false,
-
- margin: 0,
- stagePadding: 0,
-
- merge: false,
- mergeFit: true,
- autoWidth: false,
-
- startPosition: 0,
- rtl: false,
-
- smartSpeed: 250,
- fluidSpeed: false,
- dragEndSpeed: false,
-
- responsive: {},
- responsiveRefreshRate: 200,
- responsiveBaseElement: window,
-
- fallbackEasing: 'swing',
-
- info: false,
-
- nestedItemSelector: false,
- itemElement: 'div',
- stageElement: 'div',
-
- refreshClass: 'owl-refresh',
- loadedClass: 'owl-loaded',
- loadingClass: 'owl-loading',
- rtlClass: 'owl-rtl',
- responsiveClass: 'owl-responsive',
- dragClass: 'owl-drag',
- itemClass: 'owl-item',
- stageClass: 'owl-stage',
- stageOuterClass: 'owl-stage-outer',
- grabClass: 'owl-grab'
- };
-
- /**
- * Enumeration for width.
- * @public
- * @readonly
- * @enum {String}
- */
- Owl.Width = {
- Default: 'default',
- Inner: 'inner',
- Outer: 'outer'
- };
-
- /**
- * Enumeration for types.
- * @public
- * @readonly
- * @enum {String}
- */
- Owl.Type = {
- Event: 'event',
- State: 'state'
- };
-
- /**
- * Contains all registered plugins.
- * @public
- */
- Owl.Plugins = {};
-
- /**
- * List of workers involved in the update process.
- */
- Owl.Workers = [ {
- filter: [ 'width', 'settings' ],
- run: function() {
- this._width = this.$element.width();
- }
- }, {
- filter: [ 'width', 'items', 'settings' ],
- run: function(cache) {
- cache.current = this._items && this._items[this.relative(this._current)];
- }
- }, {
- filter: [ 'items', 'settings' ],
- run: function() {
- this.$stage.children('.cloned').remove();
- }
- }, {
- filter: [ 'width', 'items', 'settings' ],
- run: function(cache) {
- var margin = this.settings.margin || '',
- grid = !this.settings.autoWidth,
- rtl = this.settings.rtl,
- css = {
- 'width': 'auto',
- 'margin-left': rtl ? margin : '',
- 'margin-right': rtl ? '' : margin
- };
-
- !grid && this.$stage.children().css(css);
-
- cache.css = css;
- }
- }, {
- filter: [ 'width', 'items', 'settings' ],
- run: function(cache) {
- var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,
- merge = null,
- iterator = this._items.length,
- grid = !this.settings.autoWidth,
- widths = [];
-
- cache.items = {
- merge: false,
- width: width
- };
-
- while (iterator--) {
- merge = this._mergers[iterator];
- merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;
-
- cache.items.merge = merge > 1 || cache.items.merge;
-
- widths[iterator] = !grid ? this._items[iterator].width() : width * merge;
- }
-
- this._widths = widths;
- }
- }, {
- filter: [ 'items', 'settings' ],
- run: function() {
- var clones = [],
- items = this._items,
- settings = this.settings,
- view = Math.max(settings.items * 2, 4),
- size = Math.ceil(items.length / 2) * 2,
- repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,
- append = '',
- prepend = '';
-
- repeat /= 2;
-
- while (repeat--) {
- clones.push(this.normalize(clones.length / 2, true));
- append = append + items[clones[clones.length - 1]][0].outerHTML;
- clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
- prepend = items[clones[clones.length - 1]][0].outerHTML + prepend;
- }
-
- this._clones = clones;
-
- $(append).addClass('cloned').appendTo(this.$stage);
- $(prepend).addClass('cloned').prependTo(this.$stage);
- }
- }, {
- filter: [ 'width', 'items', 'settings' ],
- run: function() {
- var rtl = this.settings.rtl ? 1 : -1,
- size = this._clones.length + this._items.length,
- iterator = -1,
- previous = 0,
- current = 0,
- coordinates = [];
-
- while (++iterator < size) {
- previous = coordinates[iterator - 1] || 0;
- current = this._widths[this.relative(iterator)] + this.settings.margin;
- coordinates.push(previous + current * rtl);
- }
-
- this._coordinates = coordinates;
- }
- }, {
- filter: [ 'width', 'items', 'settings' ],
- run: function() {
- var padding = this.settings.stagePadding,
- coordinates = this._coordinates,
- css = {
- 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
- 'padding-left': padding || '',
- 'padding-right': padding || ''
- };
-
- this.$stage.css(css);
- }
- }, {
- filter: [ 'width', 'items', 'settings' ],
- run: function(cache) {
- var iterator = this._coordinates.length,
- grid = !this.settings.autoWidth,
- items = this.$stage.children();
-
- if (grid && cache.items.merge) {
- while (iterator--) {
- cache.css.width = this._widths[this.relative(iterator)];
- items.eq(iterator).css(cache.css);
- }
- } else if (grid) {
- cache.css.width = cache.items.width;
- items.css(cache.css);
- }
- }
- }, {
- filter: [ 'items' ],
- run: function() {
- this._coordinates.length < 1 && this.$stage.removeAttr('style');
- }
- }, {
- filter: [ 'width', 'items', 'settings' ],
- run: function(cache) {
- cache.current = cache.current ? this.$stage.children().index(cache.current) : 0;
- cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
- this.reset(cache.current);
- }
- }, {
- filter: [ 'position' ],
- run: function() {
- this.animate(this.coordinates(this._current));
- }
- }, {
- filter: [ 'width', 'position', 'items', 'settings' ],
- run: function() {
- var rtl = this.settings.rtl ? 1 : -1,
- padding = this.settings.stagePadding * 2,
- begin = this.coordinates(this.current()) + padding,
- end = begin + this.width() * rtl,
- inner, outer, matches = [], i, n;
-
- for (i = 0, n = this._coordinates.length; i < n; i++) {
- inner = this._coordinates[i - 1] || 0;
- outer = Math.abs(this._coordinates[i]) + padding * rtl;
-
- if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))
- || (this.op(outer, '<', begin) && this.op(outer, '>', end))) {
- matches.push(i);
- }
- }
-
- this.$stage.children('.active').removeClass('active');
- this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');
-
- if (this.settings.center) {
- this.$stage.children('.center').removeClass('center');
- this.$stage.children().eq(this.current()).addClass('center');
- }
- }
- } ];
-
- /**
- * Initializes the carousel.
- * @protected
- */
- Owl.prototype.initialize = function() {
- this.enter('initializing');
- this.trigger('initialize');
-
- this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);
-
- if (this.settings.autoWidth && !this.is('pre-loading')) {
- var imgs, nestedSelector, width;
- imgs = this.$element.find('img');
- nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
- width = this.$element.children(nestedSelector).width();
-
- if (imgs.length && width <= 0) {
- this.preloadAutoWidthImages(imgs);
- }
- }
-
- this.$element.addClass(this.options.loadingClass);
-
- // create stage
- this.$stage = $('<' + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>')
- .wrap('');
-
- // append stage
- this.$element.append(this.$stage.parent());
-
- // append content
- this.replace(this.$element.children().not(this.$stage.parent()));
-
- // check visibility
- if (this.$element.is(':visible')) {
- // update view
- this.refresh();
- } else {
- // invalidate width
- this.invalidate('width');
- }
-
- this.$element
- .removeClass(this.options.loadingClass)
- .addClass(this.options.loadedClass);
-
- // register event handlers
- this.registerEventHandlers();
-
- this.leave('initializing');
- this.trigger('initialized');
- };
-
- /**
- * Setups the current settings.
- * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?
- * @todo Support for media queries by using `matchMedia` would be nice.
- * @public
- */
- Owl.prototype.setup = function() {
- var viewport = this.viewport(),
- overwrites = this.options.responsive,
- match = -1,
- settings = null;
-
- if (!overwrites) {
- settings = $.extend({}, this.options);
- } else {
- $.each(overwrites, function(breakpoint) {
- if (breakpoint <= viewport && breakpoint > match) {
- match = Number(breakpoint);
- }
- });
-
- settings = $.extend({}, this.options, overwrites[match]);
- if (typeof settings.stagePadding === 'function') {
- settings.stagePadding = settings.stagePadding();
- }
- delete settings.responsive;
-
- // responsive class
- if (settings.responsiveClass) {
- this.$element.attr('class',
- this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match)
- );
- }
- }
-
- this.trigger('change', { property: { name: 'settings', value: settings } });
- this._breakpoint = match;
- this.settings = settings;
- this.invalidate('settings');
- this.trigger('changed', { property: { name: 'settings', value: this.settings } });
- };
-
- /**
- * Updates option logic if necessery.
- * @protected
- */
- Owl.prototype.optionsLogic = function() {
- if (this.settings.autoWidth) {
- this.settings.stagePadding = false;
- this.settings.merge = false;
- }
- };
-
- /**
- * Prepares an item before add.
- * @todo Rename event parameter `content` to `item`.
- * @protected
- * @returns {jQuery|HTMLElement} - The item container.
- */
- Owl.prototype.prepare = function(item) {
- var event = this.trigger('prepare', { content: item });
-
- if (!event.data) {
- event.data = $('<' + this.settings.itemElement + '/>')
- .addClass(this.options.itemClass).append(item)
- }
-
- this.trigger('prepared', { content: event.data });
-
- return event.data;
- };
-
- /**
- * Updates the view.
- * @public
- */
- Owl.prototype.update = function() {
- var i = 0,
- n = this._pipe.length,
- filter = $.proxy(function(p) { return this[p] }, this._invalidated),
- cache = {};
-
- while (i < n) {
- if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {
- this._pipe[i].run(cache);
- }
- i++;
- }
-
- this._invalidated = {};
-
- !this.is('valid') && this.enter('valid');
- };
-
- /**
- * Gets the width of the view.
- * @public
- * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.
- * @returns {Number} - The width of the view in pixel.
- */
- Owl.prototype.width = function(dimension) {
- dimension = dimension || Owl.Width.Default;
- switch (dimension) {
- case Owl.Width.Inner:
- case Owl.Width.Outer:
- return this._width;
- default:
- return this._width - this.settings.stagePadding * 2 + this.settings.margin;
- }
- };
-
- /**
- * Refreshes the carousel primarily for adaptive purposes.
- * @public
- */
- Owl.prototype.refresh = function() {
- this.enter('refreshing');
- this.trigger('refresh');
-
- this.setup();
-
- this.optionsLogic();
-
- this.$element.addClass(this.options.refreshClass);
-
- this.update();
-
- this.$element.removeClass(this.options.refreshClass);
-
- this.leave('refreshing');
- this.trigger('refreshed');
- };
-
- /**
- * Checks window `resize` event.
- * @protected
- */
- Owl.prototype.onThrottledResize = function() {
- window.clearTimeout(this.resizeTimer);
- this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);
- };
-
- /**
- * Checks window `resize` event.
- * @protected
- */
- Owl.prototype.onResize = function() {
- if (!this._items.length) {
- return false;
- }
-
- if (this._width === this.$element.width()) {
- return false;
- }
-
- if (!this.$element.is(':visible')) {
- return false;
- }
-
- this.enter('resizing');
-
- if (this.trigger('resize').isDefaultPrevented()) {
- this.leave('resizing');
- return false;
- }
-
- this.invalidate('width');
-
- this.refresh();
-
- this.leave('resizing');
- this.trigger('resized');
- };
-
- /**
- * Registers event handlers.
- * @todo Check `msPointerEnabled`
- * @todo #261
- * @protected
- */
- Owl.prototype.registerEventHandlers = function() {
- if ($.support.transition) {
- this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));
- }
-
- if (this.settings.responsive !== false) {
- this.on(window, 'resize', this._handlers.onThrottledResize);
- }
-
- if (this.settings.mouseDrag) {
- this.$element.addClass(this.options.dragClass);
- this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
- this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });
- }
-
- if (this.settings.touchDrag){
- this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));
- this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));
- }
- };
-
- /**
- * Handles `touchstart` and `mousedown` events.
- * @todo Horizontal swipe threshold as option
- * @todo #261
- * @protected
- * @param {Event} event - The event arguments.
- */
- Owl.prototype.onDragStart = function(event) {
- var stage = null;
-
- if (event.which === 3) {
- return;
- }
-
- if ($.support.transform) {
- stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
- stage = {
- x: stage[stage.length === 16 ? 12 : 4],
- y: stage[stage.length === 16 ? 13 : 5]
- };
- } else {
- stage = this.$stage.position();
- stage = {
- x: this.settings.rtl ?
- stage.left + this.$stage.width() - this.width() + this.settings.margin :
- stage.left,
- y: stage.top
- };
- }
-
- if (this.is('animating')) {
- $.support.transform ? this.animate(stage.x) : this.$stage.stop()
- this.invalidate('position');
- }
-
- this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown');
-
- this.speed(0);
-
- this._drag.time = new Date().getTime();
- this._drag.target = $(event.target);
- this._drag.stage.start = stage;
- this._drag.stage.current = stage;
- this._drag.pointer = this.pointer(event);
-
- $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));
-
- $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {
- var delta = this.difference(this._drag.pointer, this.pointer(event));
-
- $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));
-
- if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) {
- return;
- }
-
- event.preventDefault();
-
- this.enter('dragging');
- this.trigger('drag');
- }, this));
- };
-
- /**
- * Handles the `touchmove` and `mousemove` events.
- * @todo #261
- * @protected
- * @param {Event} event - The event arguments.
- */
- Owl.prototype.onDragMove = function(event) {
- var minimum = null,
- maximum = null,
- pull = null,
- delta = this.difference(this._drag.pointer, this.pointer(event)),
- stage = this.difference(this._drag.stage.start, delta);
-
- if (!this.is('dragging')) {
- return;
- }
-
- event.preventDefault();
-
- if (this.settings.loop) {
- minimum = this.coordinates(this.minimum());
- maximum = this.coordinates(this.maximum() + 1) - minimum;
- stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
- } else {
- minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
- maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
- pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;
- stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);
- }
-
- this._drag.stage.current = stage;
-
- this.animate(stage.x);
- };
-
- /**
- * Handles the `touchend` and `mouseup` events.
- * @todo #261
- * @todo Threshold for click event
- * @protected
- * @param {Event} event - The event arguments.
- */
- Owl.prototype.onDragEnd = function(event) {
- var delta = this.difference(this._drag.pointer, this.pointer(event)),
- stage = this._drag.stage.current,
- direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';
-
- $(document).off('.owl.core');
-
- this.$element.removeClass(this.options.grabClass);
-
- if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {
- this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
- this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));
- this.invalidate('position');
- this.update();
-
- this._drag.direction = direction;
-
- if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) {
- this._drag.target.one('click.owl.core', function() { return false; });
- }
- }
-
- if (!this.is('dragging')) {
- return;
- }
-
- this.leave('dragging');
- this.trigger('dragged');
- };
-
- /**
- * Gets absolute position of the closest item for a coordinate.
- * @todo Setting `freeDrag` makes `closest` not reusable. See #165.
- * @protected
- * @param {Number} coordinate - The coordinate in pixel.
- * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.
- * @return {Number} - The absolute position of the closest item.
- */
- Owl.prototype.closest = function(coordinate, direction) {
- var position = -1,
- pull = 30,
- width = this.width(),
- coordinates = this.coordinates();
-
- if (!this.settings.freeDrag) {
- // check closest item
- $.each(coordinates, $.proxy(function(index, value) {
- // on a left pull, check on current index
- if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {
- position = index;
- // on a right pull, check on previous index
- // to do so, subtract width from value and set position = index + 1
- } else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {
- position = index + 1;
- } else if (this.op(coordinate, '<', value)
- && this.op(coordinate, '>', coordinates[index + 1] || value - width)) {
- position = direction === 'left' ? index + 1 : index;
- }
- return position === -1;
- }, this));
- }
-
- if (!this.settings.loop) {
- // non loop boundries
- if (this.op(coordinate, '>', coordinates[this.minimum()])) {
- position = coordinate = this.minimum();
- } else if (this.op(coordinate, '<', coordinates[this.maximum()])) {
- position = coordinate = this.maximum();
- }
- }
-
- return position;
- };
-
- /**
- * Animates the stage.
- * @todo #270
- * @public
- * @param {Number} coordinate - The coordinate in pixels.
- */
- Owl.prototype.animate = function(coordinate) {
- var animate = this.speed() > 0;
-
- this.is('animating') && this.onTransitionEnd();
-
- if (animate) {
- this.enter('animating');
- this.trigger('translate');
- }
-
- if ($.support.transform3d && $.support.transition) {
- this.$stage.css({
- transform: 'translate3d(' + coordinate + 'px,0px,0px)',
- transition: (this.speed() / 1000) + 's'
- });
- } else if (animate) {
- this.$stage.animate({
- left: coordinate + 'px'
- }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
- } else {
- this.$stage.css({
- left: coordinate + 'px'
- });
- }
- };
-
- /**
- * Checks whether the carousel is in a specific state or not.
- * @param {String} state - The state to check.
- * @returns {Boolean} - The flag which indicates if the carousel is busy.
- */
- Owl.prototype.is = function(state) {
- return this._states.current[state] && this._states.current[state] > 0;
- };
-
- /**
- * Sets the absolute position of the current item.
- * @public
- * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.
- * @returns {Number} - The absolute position of the current item.
- */
- Owl.prototype.current = function(position) {
- if (position === undefined) {
- return this._current;
- }
-
- if (this._items.length === 0) {
- return undefined;
- }
-
- position = this.normalize(position);
-
- if (this._current !== position) {
- var event = this.trigger('change', { property: { name: 'position', value: position } });
-
- if (event.data !== undefined) {
- position = this.normalize(event.data);
- }
-
- this._current = position;
-
- this.invalidate('position');
-
- this.trigger('changed', { property: { name: 'position', value: this._current } });
- }
-
- return this._current;
- };
-
- /**
- * Invalidates the given part of the update routine.
- * @param {String} [part] - The part to invalidate.
- * @returns {Array.} - The invalidated parts.
- */
- Owl.prototype.invalidate = function(part) {
- if ($.type(part) === 'string') {
- this._invalidated[part] = true;
- this.is('valid') && this.leave('valid');
- }
- return $.map(this._invalidated, function(v, i) { return i });
- };
-
- /**
- * Resets the absolute position of the current item.
- * @public
- * @param {Number} position - The absolute position of the new item.
- */
- Owl.prototype.reset = function(position) {
- position = this.normalize(position);
-
- if (position === undefined) {
- return;
- }
-
- this._speed = 0;
- this._current = position;
-
- this.suppress([ 'translate', 'translated' ]);
-
- this.animate(this.coordinates(position));
-
- this.release([ 'translate', 'translated' ]);
- };
-
- /**
- * Normalizes an absolute or a relative position of an item.
- * @public
- * @param {Number} position - The absolute or relative position to normalize.
- * @param {Boolean} [relative=false] - Whether the given position is relative or not.
- * @returns {Number} - The normalized position.
- */
- Owl.prototype.normalize = function(position, relative) {
- var n = this._items.length,
- m = relative ? 0 : this._clones.length;
-
- if (!this.isNumeric(position) || n < 1) {
- position = undefined;
- } else if (position < 0 || position >= n + m) {
- position = ((position - m / 2) % n + n) % n + m / 2;
- }
-
- return position;
- };
-
- /**
- * Converts an absolute position of an item into a relative one.
- * @public
- * @param {Number} position - The absolute position to convert.
- * @returns {Number} - The converted position.
- */
- Owl.prototype.relative = function(position) {
- position -= this._clones.length / 2;
- return this.normalize(position, true);
- };
-
- /**
- * Gets the maximum position for the current item.
- * @public
- * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
- * @returns {Number}
- */
- Owl.prototype.maximum = function(relative) {
- var settings = this.settings,
- maximum = this._coordinates.length,
- iterator,
- reciprocalItemsWidth,
- elementWidth;
-
- if (settings.loop) {
- maximum = this._clones.length / 2 + this._items.length - 1;
- } else if (settings.autoWidth || settings.merge) {
- iterator = this._items.length;
- reciprocalItemsWidth = this._items[--iterator].width();
- elementWidth = this.$element.width();
- while (iterator--) {
- reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin;
- if (reciprocalItemsWidth > elementWidth) {
- break;
- }
- }
- maximum = iterator + 1;
- } else if (settings.center) {
- maximum = this._items.length - 1;
- } else {
- maximum = this._items.length - settings.items;
- }
-
- if (relative) {
- maximum -= this._clones.length / 2;
- }
-
- return Math.max(maximum, 0);
- };
-
- /**
- * Gets the minimum position for the current item.
- * @public
- * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
- * @returns {Number}
- */
- Owl.prototype.minimum = function(relative) {
- return relative ? 0 : this._clones.length / 2;
- };
-
- /**
- * Gets an item at the specified relative position.
- * @public
- * @param {Number} [position] - The relative position of the item.
- * @return {jQuery|Array.} - The item at the given position or all items if no position was given.
- */
- Owl.prototype.items = function(position) {
- if (position === undefined) {
- return this._items.slice();
- }
-
- position = this.normalize(position, true);
- return this._items[position];
- };
-
- /**
- * Gets an item at the specified relative position.
- * @public
- * @param {Number} [position] - The relative position of the item.
- * @return {jQuery|Array.} - The item at the given position or all items if no position was given.
- */
- Owl.prototype.mergers = function(position) {
- if (position === undefined) {
- return this._mergers.slice();
- }
-
- position = this.normalize(position, true);
- return this._mergers[position];
- };
-
- /**
- * Gets the absolute positions of clones for an item.
- * @public
- * @param {Number} [position] - The relative position of the item.
- * @returns {Array.} - The absolute positions of clones for the item or all if no position was given.
- */
- Owl.prototype.clones = function(position) {
- var odd = this._clones.length / 2,
- even = odd + this._items.length,
- map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };
-
- if (position === undefined) {
- return $.map(this._clones, function(v, i) { return map(i) });
- }
-
- return $.map(this._clones, function(v, i) { return v === position ? map(i) : null });
- };
-
- /**
- * Sets the current animation speed.
- * @public
- * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.
- * @returns {Number} - The current animation speed in milliseconds.
- */
- Owl.prototype.speed = function(speed) {
- if (speed !== undefined) {
- this._speed = speed;
- }
-
- return this._speed;
- };
-
- /**
- * Gets the coordinate of an item.
- * @todo The name of this method is missleanding.
- * @public
- * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.
- * @returns {Number|Array.} - The coordinate of the item in pixel or all coordinates.
- */
- Owl.prototype.coordinates = function(position) {
- var multiplier = 1,
- newPosition = position - 1,
- coordinate;
-
- if (position === undefined) {
- return $.map(this._coordinates, $.proxy(function(coordinate, index) {
- return this.coordinates(index);
- }, this));
- }
-
- if (this.settings.center) {
- if (this.settings.rtl) {
- multiplier = -1;
- newPosition = position + 1;
- }
-
- coordinate = this._coordinates[position];
- coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;
- } else {
- coordinate = this._coordinates[newPosition] || 0;
- }
-
- coordinate = Math.ceil(coordinate);
-
- return coordinate;
- };
-
- /**
- * Calculates the speed for a translation.
- * @protected
- * @param {Number} from - The absolute position of the start item.
- * @param {Number} to - The absolute position of the target item.
- * @param {Number} [factor=undefined] - The time factor in milliseconds.
- * @returns {Number} - The time in milliseconds for the translation.
- */
- Owl.prototype.duration = function(from, to, factor) {
- if (factor === 0) {
- return 0;
- }
-
- return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));
- };
-
- /**
- * Slides to the specified item.
- * @public
- * @param {Number} position - The position of the item.
- * @param {Number} [speed] - The time in milliseconds for the transition.
- */
- Owl.prototype.to = function(position, speed) {
- var current = this.current(),
- revert = null,
- distance = position - this.relative(current),
- direction = (distance > 0) - (distance < 0),
- items = this._items.length,
- minimum = this.minimum(),
- maximum = this.maximum();
-
- if (this.settings.loop) {
- if (!this.settings.rewind && Math.abs(distance) > items / 2) {
- distance += direction * -1 * items;
- }
-
- position = current + distance;
- revert = ((position - minimum) % items + items) % items + minimum;
-
- if (revert !== position && revert - distance <= maximum && revert - distance > 0) {
- current = revert - distance;
- position = revert;
- this.reset(current);
- }
- } else if (this.settings.rewind) {
- maximum += 1;
- position = (position % maximum + maximum) % maximum;
- } else {
- position = Math.max(minimum, Math.min(maximum, position));
- }
-
- this.speed(this.duration(current, position, speed));
- this.current(position);
-
- if (this.$element.is(':visible')) {
- this.update();
- }
- };
-
- /**
- * Slides to the next item.
- * @public
- * @param {Number} [speed] - The time in milliseconds for the transition.
- */
- Owl.prototype.next = function(speed) {
- speed = speed || false;
- this.to(this.relative(this.current()) + 1, speed);
- };
-
- /**
- * Slides to the previous item.
- * @public
- * @param {Number} [speed] - The time in milliseconds for the transition.
- */
- Owl.prototype.prev = function(speed) {
- speed = speed || false;
- this.to(this.relative(this.current()) - 1, speed);
- };
-
- /**
- * Handles the end of an animation.
- * @protected
- * @param {Event} event - The event arguments.
- */
- Owl.prototype.onTransitionEnd = function(event) {
-
- // if css2 animation then event object is undefined
- if (event !== undefined) {
- event.stopPropagation();
-
- // Catch only owl-stage transitionEnd event
- if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {
- return false;
- }
- }
-
- this.leave('animating');
- this.trigger('translated');
- };
-
- /**
- * Gets viewport width.
- * @protected
- * @return {Number} - The width in pixel.
- */
- Owl.prototype.viewport = function() {
- var width;
- if (this.options.responsiveBaseElement !== window) {
- width = $(this.options.responsiveBaseElement).width();
- } else if (window.innerWidth) {
- width = window.innerWidth;
- } else if (document.documentElement && document.documentElement.clientWidth) {
- width = document.documentElement.clientWidth;
- } else {
- throw 'Can not detect viewport width.';
- }
- return width;
- };
-
- /**
- * Replaces the current content.
- * @public
- * @param {HTMLElement|jQuery|String} content - The new content.
- */
- Owl.prototype.replace = function(content) {
- this.$stage.empty();
- this._items = [];
-
- if (content) {
- content = (content instanceof jQuery) ? content : $(content);
- }
-
- if (this.settings.nestedItemSelector) {
- content = content.find('.' + this.settings.nestedItemSelector);
- }
-
- content.filter(function() {
- return this.nodeType === 1;
- }).each($.proxy(function(index, item) {
- item = this.prepare(item);
- this.$stage.append(item);
- this._items.push(item);
- this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
- }, this));
-
- this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
-
- this.invalidate('items');
- };
-
- /**
- * Adds an item.
- * @todo Use `item` instead of `content` for the event arguments.
- * @public
- * @param {HTMLElement|jQuery|String} content - The item content to add.
- * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
- */
- Owl.prototype.add = function(content, position) {
- var current = this.relative(this._current);
-
- position = position === undefined ? this._items.length : this.normalize(position, true);
- content = content instanceof jQuery ? content : $(content);
-
- this.trigger('add', { content: content, position: position });
-
- content = this.prepare(content);
-
- if (this._items.length === 0 || position === this._items.length) {
- this._items.length === 0 && this.$stage.append(content);
- this._items.length !== 0 && this._items[position - 1].after(content);
- this._items.push(content);
- this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
- } else {
- this._items[position].before(content);
- this._items.splice(position, 0, content);
- this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
- }
-
- this._items[current] && this.reset(this._items[current].index());
-
- this.invalidate('items');
-
- this.trigger('added', { content: content, position: position });
- };
-
- /**
- * Removes an item by its position.
- * @todo Use `item` instead of `content` for the event arguments.
- * @public
- * @param {Number} position - The relative position of the item to remove.
- */
- Owl.prototype.remove = function(position) {
- position = this.normalize(position, true);
-
- if (position === undefined) {
- return;
- }
-
- this.trigger('remove', { content: this._items[position], position: position });
-
- this._items[position].remove();
- this._items.splice(position, 1);
- this._mergers.splice(position, 1);
-
- this.invalidate('items');
-
- this.trigger('removed', { content: null, position: position });
- };
-
- /**
- * Preloads images with auto width.
- * @todo Replace by a more generic approach
- * @protected
- */
- Owl.prototype.preloadAutoWidthImages = function(images) {
- images.each($.proxy(function(i, element) {
- this.enter('pre-loading');
- element = $(element);
- $(new Image()).one('load', $.proxy(function(e) {
- element.attr('src', e.target.src);
- element.css('opacity', 1);
- this.leave('pre-loading');
- !this.is('pre-loading') && !this.is('initializing') && this.refresh();
- }, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));
- }, this));
- };
-
- /**
- * Destroys the carousel.
- * @public
- */
- Owl.prototype.destroy = function() {
-
- this.$element.off('.owl.core');
- this.$stage.off('.owl.core');
- $(document).off('.owl.core');
-
- if (this.settings.responsive !== false) {
- window.clearTimeout(this.resizeTimer);
- this.off(window, 'resize', this._handlers.onThrottledResize);
- }
-
- for (var i in this._plugins) {
- this._plugins[i].destroy();
- }
-
- this.$stage.children('.cloned').remove();
-
- this.$stage.unwrap();
- this.$stage.children().contents().unwrap();
- this.$stage.children().unwrap();
-
- this.$element
- .removeClass(this.options.refreshClass)
- .removeClass(this.options.loadingClass)
- .removeClass(this.options.loadedClass)
- .removeClass(this.options.rtlClass)
- .removeClass(this.options.dragClass)
- .removeClass(this.options.grabClass)
- .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
- .removeData('owl.carousel');
- };
-
- /**
- * Operators to calculate right-to-left and left-to-right.
- * @protected
- * @param {Number} [a] - The left side operand.
- * @param {String} [o] - The operator.
- * @param {Number} [b] - The right side operand.
- */
- Owl.prototype.op = function(a, o, b) {
- var rtl = this.settings.rtl;
- switch (o) {
- case '<':
- return rtl ? a > b : a < b;
- case '>':
- return rtl ? a < b : a > b;
- case '>=':
- return rtl ? a <= b : a >= b;
- case '<=':
- return rtl ? a >= b : a <= b;
- default:
- break;
- }
- };
-
- /**
- * Attaches to an internal event.
- * @protected
- * @param {HTMLElement} element - The event source.
- * @param {String} event - The event name.
- * @param {Function} listener - The event handler to attach.
- * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.
- */
- Owl.prototype.on = function(element, event, listener, capture) {
- if (element.addEventListener) {
- element.addEventListener(event, listener, capture);
- } else if (element.attachEvent) {
- element.attachEvent('on' + event, listener);
- }
- };
-
- /**
- * Detaches from an internal event.
- * @protected
- * @param {HTMLElement} element - The event source.
- * @param {String} event - The event name.
- * @param {Function} listener - The attached event handler to detach.
- * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.
- */
- Owl.prototype.off = function(element, event, listener, capture) {
- if (element.removeEventListener) {
- element.removeEventListener(event, listener, capture);
- } else if (element.detachEvent) {
- element.detachEvent('on' + event, listener);
- }
- };
-
- /**
- * Triggers a public event.
- * @todo Remove `status`, `relatedTarget` should be used instead.
- * @protected
- * @param {String} name - The event name.
- * @param {*} [data=null] - The event data.
- * @param {String} [namespace=carousel] - The event namespace.
- * @param {String} [state] - The state which is associated with the event.
- * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.
- * @returns {Event} - The event arguments.
- */
- Owl.prototype.trigger = function(name, data, namespace, state, enter) {
- var status = {
- item: { count: this._items.length, index: this.current() }
- }, handler = $.camelCase(
- $.grep([ 'on', name, namespace ], function(v) { return v })
- .join('-').toLowerCase()
- ), event = $.Event(
- [ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(),
- $.extend({ relatedTarget: this }, status, data)
- );
-
- if (!this._supress[name]) {
- $.each(this._plugins, function(name, plugin) {
- if (plugin.onTrigger) {
- plugin.onTrigger(event);
- }
- });
-
- this.register({ type: Owl.Type.Event, name: name });
- this.$element.trigger(event);
-
- if (this.settings && typeof this.settings[handler] === 'function') {
- this.settings[handler].call(this, event);
- }
- }
-
- return event;
- };
-
- /**
- * Enters a state.
- * @param name - The state name.
- */
- Owl.prototype.enter = function(name) {
- $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
- if (this._states.current[name] === undefined) {
- this._states.current[name] = 0;
- }
-
- this._states.current[name]++;
- }, this));
- };
-
- /**
- * Leaves a state.
- * @param name - The state name.
- */
- Owl.prototype.leave = function(name) {
- $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
- this._states.current[name]--;
- }, this));
- };
-
- /**
- * Registers an event or state.
- * @public
- * @param {Object} object - The event or state to register.
- */
- Owl.prototype.register = function(object) {
- if (object.type === Owl.Type.Event) {
- if (!$.event.special[object.name]) {
- $.event.special[object.name] = {};
- }
-
- if (!$.event.special[object.name].owl) {
- var _default = $.event.special[object.name]._default;
- $.event.special[object.name]._default = function(e) {
- if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {
- return _default.apply(this, arguments);
- }
- return e.namespace && e.namespace.indexOf('owl') > -1;
- };
- $.event.special[object.name].owl = true;
- }
- } else if (object.type === Owl.Type.State) {
- if (!this._states.tags[object.name]) {
- this._states.tags[object.name] = object.tags;
- } else {
- this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);
- }
-
- this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {
- return $.inArray(tag, this._states.tags[object.name]) === i;
- }, this));
- }
- };
-
- /**
- * Suppresses events.
- * @protected
- * @param {Array.} events - The events to suppress.
- */
- Owl.prototype.suppress = function(events) {
- $.each(events, $.proxy(function(index, event) {
- this._supress[event] = true;
- }, this));
- };
-
- /**
- * Releases suppressed events.
- * @protected
- * @param {Array.} events - The events to release.
- */
- Owl.prototype.release = function(events) {
- $.each(events, $.proxy(function(index, event) {
- delete this._supress[event];
- }, this));
- };
-
- /**
- * Gets unified pointer coordinates from event.
- * @todo #261
- * @protected
- * @param {Event} - The `mousedown` or `touchstart` event.
- * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.
- */
- Owl.prototype.pointer = function(event) {
- var result = { x: null, y: null };
-
- event = event.originalEvent || event || window.event;
-
- event = event.touches && event.touches.length ?
- event.touches[0] : event.changedTouches && event.changedTouches.length ?
- event.changedTouches[0] : event;
-
- if (event.pageX) {
- result.x = event.pageX;
- result.y = event.pageY;
- } else {
- result.x = event.clientX;
- result.y = event.clientY;
- }
-
- return result;
- };
-
- /**
- * Determines if the input is a Number or something that can be coerced to a Number
- * @protected
- * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested
- * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number
- */
- Owl.prototype.isNumeric = function(number) {
- return !isNaN(parseFloat(number));
- };
-
- /**
- * Gets the difference of two vectors.
- * @todo #261
- * @protected
- * @param {Object} - The first vector.
- * @param {Object} - The second vector.
- * @returns {Object} - The difference.
- */
- Owl.prototype.difference = function(first, second) {
- return {
- x: first.x - second.x,
- y: first.y - second.y
- };
- };
-
- /**
- * The jQuery Plugin for the Owl Carousel
- * @todo Navigation plugin `next` and `prev`
- * @public
- */
- $.fn.owlCarousel = function(option) {
- var args = Array.prototype.slice.call(arguments, 1);
-
- return this.each(function() {
- var $this = $(this),
- data = $this.data('owl.carousel');
-
- if (!data) {
- data = new Owl(this, typeof option == 'object' && option);
- $this.data('owl.carousel', data);
-
- $.each([
- 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
- ], function(i, event) {
- data.register({ type: Owl.Type.Event, name: event });
- data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {
- if (e.namespace && e.relatedTarget !== this) {
- this.suppress([ event ]);
- data[event].apply(this, [].slice.call(arguments, 1));
- this.release([ event ]);
- }
- }, data));
- });
- }
-
- if (typeof option == 'string' && option.charAt(0) !== '_') {
- data[option].apply(data, args);
- }
- });
- };
-
- /**
- * The constructor for the jQuery Plugin
- * @public
- */
- $.fn.owlCarousel.Constructor = Owl;
-
-})(window.Zepto || window.jQuery, window, document);
-
-/**
- * AutoRefresh Plugin
- * @version 2.1.0
- * @author Artus Kolanowski
- * @author David Deutsch
- * @license The MIT License (MIT)
- */
-;(function($, window, document, undefined) {
-
- /**
- * Creates the auto refresh plugin.
- * @class The Auto Refresh Plugin
- * @param {Owl} carousel - The Owl Carousel
- */
- var AutoRefresh = function(carousel) {
- /**
- * Reference to the core.
- * @protected
- * @type {Owl}
- */
- this._core = carousel;
-
- /**
- * Refresh interval.
- * @protected
- * @type {number}
- */
- this._interval = null;
-
- /**
- * Whether the element is currently visible or not.
- * @protected
- * @type {Boolean}
- */
- this._visible = null;
-
- /**
- * All event handlers.
- * @protected
- * @type {Object}
- */
- this._handlers = {
- 'initialized.owl.carousel': $.proxy(function(e) {
- if (e.namespace && this._core.settings.autoRefresh) {
- this.watch();
- }
- }, this)
- };
-
- // set default options
- this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);
-
- // register event handlers
- this._core.$element.on(this._handlers);
- };
-
- /**
- * Default options.
- * @public
- */
- AutoRefresh.Defaults = {
- autoRefresh: true,
- autoRefreshInterval: 500
- };
-
- /**
- * Watches the element.
- */
- AutoRefresh.prototype.watch = function() {
- if (this._interval) {
- return;
- }
-
- this._visible = this._core.$element.is(':visible');
- this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
- };
-
- /**
- * Refreshes the element.
- */
- AutoRefresh.prototype.refresh = function() {
- if (this._core.$element.is(':visible') === this._visible) {
- return;
- }
-
- this._visible = !this._visible;
-
- this._core.$element.toggleClass('owl-hidden', !this._visible);
-
- this._visible && (this._core.invalidate('width') && this._core.refresh());
- };
-
- /**
- * Destroys the plugin.
- */
- AutoRefresh.prototype.destroy = function() {
- var handler, property;
-
- window.clearInterval(this._interval);
-
- for (handler in this._handlers) {
- this._core.$element.off(handler, this._handlers[handler]);
- }
- for (property in Object.getOwnPropertyNames(this)) {
- typeof this[property] != 'function' && (this[property] = null);
- }
- };
-
- $.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh;
-
-})(window.Zepto || window.jQuery, window, document);
-
-/**
- * Lazy Plugin
- * @version 2.1.0
- * @author Bartosz Wojciechowski
- * @author David Deutsch
- * @license The MIT License (MIT)
- */
-;(function($, window, document, undefined) {
-
- /**
- * Creates the lazy plugin.
- * @class The Lazy Plugin
- * @param {Owl} carousel - The Owl Carousel
- */
- var Lazy = function(carousel) {
-
- /**
- * Reference to the core.
- * @protected
- * @type {Owl}
- */
- this._core = carousel;
-
- /**
- * Already loaded items.
- * @protected
- * @type {Array.}
- */
- this._loaded = [];
-
- /**
- * Event handlers.
- * @protected
- * @type {Object}
- */
- this._handlers = {
- 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) {
- if (!e.namespace) {
- return;
- }
-
- if (!this._core.settings || !this._core.settings.lazyLoad) {
- return;
- }
-
- if ((e.property && e.property.name == 'position') || e.type == 'initialized') {
- var settings = this._core.settings,
- n = (settings.center && Math.ceil(settings.items / 2) || settings.items),
- i = ((settings.center && n * -1) || 0),
- position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i,
- clones = this._core.clones().length,
- load = $.proxy(function(i, v) { this.load(v) }, this);
-
- while (i++ < n) {
- this.load(clones / 2 + this._core.relative(position));
- clones && $.each(this._core.clones(this._core.relative(position)), load);
- position++;
- }
- }
- }, this)
- };
-
- // set the default options
- this._core.options = $.extend({}, Lazy.Defaults, this._core.options);
-
- // register event handler
- this._core.$element.on(this._handlers);
- };
-
- /**
- * Default options.
- * @public
- */
- Lazy.Defaults = {
- lazyLoad: false
- };
-
- /**
- * Loads all resources of an item at the specified position.
- * @param {Number} position - The absolute position of the item.
- * @protected
- */
- Lazy.prototype.load = function(position) {
- var $item = this._core.$stage.children().eq(position),
- $elements = $item && $item.find('.owl-lazy');
-
- if (!$elements || $.inArray($item.get(0), this._loaded) > -1) {
- return;
- }
-
- $elements.each($.proxy(function(index, element) {
- var $element = $(element), image,
- url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src');
-
- this._core.trigger('load', { element: $element, url: url }, 'lazy');
-
- if ($element.is('img')) {
- $element.one('load.owl.lazy', $.proxy(function() {
- $element.css('opacity', 1);
- this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
- }, this)).attr('src', url);
- } else {
- image = new Image();
- image.onload = $.proxy(function() {
- $element.css({
- 'background-image': 'url(' + url + ')',
- 'opacity': '1'
- });
- this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
- }, this);
- image.src = url;
- }
- }, this));
-
- this._loaded.push($item.get(0));
- };
-
- /**
- * Destroys the plugin.
- * @public
- */
- Lazy.prototype.destroy = function() {
- var handler, property;
-
- for (handler in this.handlers) {
- this._core.$element.off(handler, this.handlers[handler]);
- }
- for (property in Object.getOwnPropertyNames(this)) {
- typeof this[property] != 'function' && (this[property] = null);
- }
- };
-
- $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
-
-})(window.Zepto || window.jQuery, window, document);
-
-/**
- * AutoHeight Plugin
- * @version 2.1.0
- * @author Bartosz Wojciechowski
- * @author David Deutsch
- * @license The MIT License (MIT)
- */
-;(function($, window, document, undefined) {
-
- /**
- * Creates the auto height plugin.
- * @class The Auto Height Plugin
- * @param {Owl} carousel - The Owl Carousel
- */
- var AutoHeight = function(carousel) {
- /**
- * Reference to the core.
- * @protected
- * @type {Owl}
- */
- this._core = carousel;
-
- /**
- * All event handlers.
- * @protected
- * @type {Object}
- */
- this._handlers = {
- 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
- if (e.namespace && this._core.settings.autoHeight) {
- this.update();
- }
- }, this),
- 'changed.owl.carousel': $.proxy(function(e) {
- if (e.namespace && this._core.settings.autoHeight && e.property.name == 'position'){
- this.update();
- }
- }, this),
- 'loaded.owl.lazy': $.proxy(function(e) {
- if (e.namespace && this._core.settings.autoHeight
- && e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {
- this.update();
- }
- }, this)
- };
-
- // set default options
- this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);
-
- // register event handlers
- this._core.$element.on(this._handlers);
- };
-
- /**
- * Default options.
- * @public
- */
- AutoHeight.Defaults = {
- autoHeight: false,
- autoHeightClass: 'owl-height'
- };
-
- /**
- * Updates the view.
- */
- AutoHeight.prototype.update = function() {
- var start = this._core._current,
- end = start + this._core.settings.items,
- visible = this._core.$stage.children().toArray().slice(start, end),
- heights = [],
- maxheight = 0;
-
- $.each(visible, function(index, item) {
- heights.push($(item).height());
- });
-
- maxheight = Math.max.apply(null, heights);
-
- this._core.$stage.parent()
- .height(maxheight)
- .addClass(this._core.settings.autoHeightClass);
- };
-
- AutoHeight.prototype.destroy = function() {
- var handler, property;
-
- for (handler in this._handlers) {
- this._core.$element.off(handler, this._handlers[handler]);
- }
- for (property in Object.getOwnPropertyNames(this)) {
- typeof this[property] != 'function' && (this[property] = null);
- }
- };
-
- $.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;
-
-})(window.Zepto || window.jQuery, window, document);
-
-/**
- * Video Plugin
- * @version 2.1.0
- * @author Bartosz Wojciechowski
- * @author David Deutsch
- * @license The MIT License (MIT)
- */
-;(function($, window, document, undefined) {
-
- /**
- * Creates the video plugin.
- * @class The Video Plugin
- * @param {Owl} carousel - The Owl Carousel
- */
- var Video = function(carousel) {
- /**
- * Reference to the core.
- * @protected
- * @type {Owl}
- */
- this._core = carousel;
-
- /**
- * Cache all video URLs.
- * @protected
- * @type {Object}
- */
- this._videos = {};
-
- /**
- * Current playing item.
- * @protected
- * @type {jQuery}
- */
- this._playing = null;
-
- /**
- * All event handlers.
- * @todo The cloned content removale is too late
- * @protected
- * @type {Object}
- */
- this._handlers = {
- 'initialized.owl.carousel': $.proxy(function(e) {
- if (e.namespace) {
- this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
- }
- }, this),
- 'resize.owl.carousel': $.proxy(function(e) {
- if (e.namespace && this._core.settings.video && this.isInFullScreen()) {
- e.preventDefault();
- }
- }, this),
- 'refreshed.owl.carousel': $.proxy(function(e) {
- if (e.namespace && this._core.is('resizing')) {
- this._core.$stage.find('.cloned .owl-video-frame').remove();
- }
- }, this),
- 'changed.owl.carousel': $.proxy(function(e) {
- if (e.namespace && e.property.name === 'position' && this._playing) {
- this.stop();
- }
- }, this),
- 'prepared.owl.carousel': $.proxy(function(e) {
- if (!e.namespace) {
- return;
- }
-
- var $element = $(e.content).find('.owl-video');
-
- if ($element.length) {
- $element.css('display', 'none');
- this.fetch($element, $(e.content));
- }
- }, this)
- };
-
- // set default options
- this._core.options = $.extend({}, Video.Defaults, this._core.options);
-
- // register event handlers
- this._core.$element.on(this._handlers);
-
- this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
- this.play(e);
- }, this));
- };
-
- /**
- * Default options.
- * @public
- */
- Video.Defaults = {
- video: false,
- videoHeight: false,
- videoWidth: false
- };
-
- /**
- * Gets the video ID and the type (YouTube/Vimeo/vzaar only).
- * @protected
- * @param {jQuery} target - The target containing the video data.
- * @param {jQuery} item - The item containing the video.
- */
- Video.prototype.fetch = function(target, item) {
- var type = (function() {
- if (target.attr('data-vimeo-id')) {
- return 'vimeo';
- } else if (target.attr('data-vzaar-id')) {
- return 'vzaar'
- } else {
- return 'youtube';
- }
- })(),
- id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),
- width = target.attr('data-width') || this._core.settings.videoWidth,
- height = target.attr('data-height') || this._core.settings.videoHeight,
- url = target.attr('href');
-
- if (url) {
-
- /*
- Parses the id's out of the following urls (and probably more):
- https://www.youtube.com/watch?v=:id
- https://youtu.be/:id
- https://vimeo.com/:id
- https://vimeo.com/channels/:channel/:id
- https://vimeo.com/groups/:group/videos/:id
- https://app.vzaar.com/videos/:id
-
- Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F
- */
-
- id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
-
- if (id[3].indexOf('youtu') > -1) {
- type = 'youtube';
- } else if (id[3].indexOf('vimeo') > -1) {
- type = 'vimeo';
- } else if (id[3].indexOf('vzaar') > -1) {
- type = 'vzaar';
- } else {
- throw new Error('Video URL not supported.');
- }
- id = id[6];
- } else {
- throw new Error('Missing video URL.');
- }
-
- this._videos[url] = {
- type: type,
- id: id,
- width: width,
- height: height
- };
-
- item.attr('data-video', url);
-
- this.thumbnail(target, this._videos[url]);
- };
-
- /**
- * Creates video thumbnail.
- * @protected
- * @param {jQuery} target - The target containing the video data.
- * @param {Object} info - The video info object.
- * @see `fetch`
- */
- Video.prototype.thumbnail = function(target, video) {
- var tnLink,
- icon,
- path,
- dimensions = video.width && video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"' : '',
- customTn = target.find('img'),
- srcType = 'src',
- lazyClass = '',
- settings = this._core.settings,
- create = function(path) {
- icon = '';
-
- if (settings.lazyLoad) {
- tnLink = '';
- } else {
- tnLink = '';
- }
- target.after(tnLink);
- target.after(icon);
- };
-
- // wrap video content into owl-video-wrapper div
- target.wrap('');
-
- if (this._core.settings.lazyLoad) {
- srcType = 'data-src';
- lazyClass = 'owl-lazy';
- }
-
- // custom thumbnail
- if (customTn.length) {
- create(customTn.attr(srcType));
- customTn.remove();
- return false;
- }
-
- if (video.type === 'youtube') {
- path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
- create(path);
- } else if (video.type === 'vimeo') {
- $.ajax({
- type: 'GET',
- url: '//vimeo.com/api/v2/video/' + video.id + '.json',
- jsonp: 'callback',
- dataType: 'jsonp',
- success: function(data) {
- path = data[0].thumbnail_large;
- create(path);
- }
- });
- } else if (video.type === 'vzaar') {
- $.ajax({
- type: 'GET',
- url: '//vzaar.com/api/videos/' + video.id + '.json',
- jsonp: 'callback',
- dataType: 'jsonp',
- success: function(data) {
- path = data.framegrab_url;
- create(path);
- }
- });
- }
- };
-
- /**
- * Stops the current video.
- * @public
- */
- Video.prototype.stop = function() {
- this._core.trigger('stop', null, 'video');
- this._playing.find('.owl-video-frame').remove();
- this._playing.removeClass('owl-video-playing');
- this._playing = null;
- this._core.leave('playing');
- this._core.trigger('stopped', null, 'video');
- };
-
- /**
- * Starts the current video.
- * @public
- * @param {Event} event - The event arguments.
- */
- Video.prototype.play = function(event) {
- var target = $(event.target),
- item = target.closest('.' + this._core.settings.itemClass),
- video = this._videos[item.attr('data-video')],
- width = video.width || '100%',
- height = video.height || this._core.$stage.height(),
- html;
-
- if (this._playing) {
- return;
- }
-
- this._core.enter('playing');
- this._core.trigger('play', null, 'video');
-
- item = this._core.items(this._core.relative(item.index()));
-
- this._core.reset(item.index());
-
- if (video.type === 'youtube') {
- html = '';
- } else if (video.type === 'vimeo') {
- html = '';
- } else if (video.type === 'vzaar') {
- html = '';
- }
-
- $('