diff --git a/autoload/admin/controls/class.Articles.php b/autoload/admin/controls/class.Articles.php index b5d8380..376df2d 100644 --- a/autoload/admin/controls/class.Articles.php +++ b/autoload/admin/controls/class.Articles.php @@ -27,17 +27,7 @@ class Articles public static function article_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania artykułu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\Articles::article_save( $values['id'], $values['title'], $values['main_image'], $values['entry'], $values['text'], $values['table_of_contents'], $values['status'], $values['show_title'], $values['show_table_of_contents'], $values['show_date_add'], $values['date_add'], $values['show_date_modify'], $values['date_modify'], $values['seo_link'], $values['meta_title'], diff --git a/autoload/admin/controls/class.Banners.php b/autoload/admin/controls/class.Banners.php index 54ec06d..4914355 100644 --- a/autoload/admin/controls/class.Banners.php +++ b/autoload/admin/controls/class.Banners.php @@ -15,17 +15,7 @@ class Banners public static function banner_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania baneru wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $banner_id = \admin\factory\Banners::banner_save( $values['id'], $values['name'], $values['status'], $values['date_start'], $values['date_end'], $values['home_page'], $values['src'], $values['url'], $values['html'], $values['text'] ) ) diff --git a/autoload/admin/controls/class.Dictionaries.php b/autoload/admin/controls/class.Dictionaries.php index 7f47ae9..365795f 100644 --- a/autoload/admin/controls/class.Dictionaries.php +++ b/autoload/admin/controls/class.Dictionaries.php @@ -18,17 +18,7 @@ class Dictionaries { static public function unit_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania jednostki miary wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\Dictionaries::unit_save( $values['id'], $values['text']) ) $response = [ 'status' => 'ok', 'msg' => 'Jednostka miary została zapisana.', 'id' => $id ]; diff --git a/autoload/admin/controls/class.Languages.php b/autoload/admin/controls/class.Languages.php index ef3c8e3..e282212 100644 --- a/autoload/admin/controls/class.Languages.php +++ b/autoload/admin/controls/class.Languages.php @@ -14,17 +14,7 @@ class Languages public static function language_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania języka wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( \admin\factory\Languages::language_save( $values['id'], $values['name'], $values['status'], @@ -60,17 +50,7 @@ class Languages public static function translation_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania tłumaczenia wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); $languages_list = \admin\factory\Languages::languages_list(); if ( is_array( $languages_list ) and !empty( $languages_list ) ) foreach ( $languages_list as $language ) diff --git a/autoload/admin/controls/class.Layouts.php b/autoload/admin/controls/class.Layouts.php index a8ed88a..9325906 100644 --- a/autoload/admin/controls/class.Layouts.php +++ b/autoload/admin/controls/class.Layouts.php @@ -14,17 +14,7 @@ class Layouts public static function layout_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania szablonu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\Layouts::layout_save( $values['id'], $values['name'], $values['status'], $values['pages'], $values['html'], $values['css'], $values['js'], $values['m_html'], $values['m_css'], $values['m_js'], $values['categories'], $values['categories_default'] ) diff --git a/autoload/admin/controls/class.Newsletter.php b/autoload/admin/controls/class.Newsletter.php index 242a80c..17ebe58 100644 --- a/autoload/admin/controls/class.Newsletter.php +++ b/autoload/admin/controls/class.Newsletter.php @@ -27,17 +27,7 @@ class Newsletter public static function settings_save() { $settings = \admin\factory\Settings::settings_details(); - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); \admin\factory\Settings::settings_update( 'newsletter_footer', $values['newsletter_footer'] ); \admin\factory\Settings::settings_update( 'newsletter_header', $values['newsletter_header'] ); @@ -91,17 +81,7 @@ class Newsletter public static function template_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\Newsletter::template_save( $values['id'], $values['name'], $values['text'] ) ) $response = [ 'status' => 'ok', 'msg' => 'Zmiany zostały zapisane.', 'id' => $id ]; diff --git a/autoload/admin/controls/class.Pages.php b/autoload/admin/controls/class.Pages.php index 9ed6105..4ec7b89 100644 --- a/autoload/admin/controls/class.Pages.php +++ b/autoload/admin/controls/class.Pages.php @@ -46,17 +46,7 @@ class Pages public static function page_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania strony wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\Pages::page_save( $values['id'], $values['title'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['menu_id'], $values['parent_id'], $values['page_type'], @@ -84,17 +74,7 @@ class Pages public static function menu_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania menu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( \admin\factory\Pages::menu_save( $values['id'], $values['name'], $values['status'] ) ) $response = [ 'status' => 'ok', 'msg' => 'Menu zostało zapisane.' ]; diff --git a/autoload/admin/controls/class.Scontainers.php b/autoload/admin/controls/class.Scontainers.php index 7163f53..3fa2279 100644 --- a/autoload/admin/controls/class.Scontainers.php +++ b/autoload/admin/controls/class.Scontainers.php @@ -14,17 +14,7 @@ class Scontainers public static function container_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kontenera wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\Scontainers::container_save( $values['id'], $values['title'], $values['text'], $values['status'], $values['show_title'] ) ) $response = [ 'status' => 'ok', 'msg' => 'Kontener został zapisany.', 'id' => $id ]; diff --git a/autoload/admin/controls/class.Settings.php b/autoload/admin/controls/class.Settings.php index 4e35bd0..23fbdbc 100644 --- a/autoload/admin/controls/class.Settings.php +++ b/autoload/admin/controls/class.Settings.php @@ -5,17 +5,7 @@ class Settings { public static function settings_save() { - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); $settings = \admin\factory\Settings::settings_details( true ); diff --git a/autoload/admin/controls/class.ShopAttribute.php b/autoload/admin/controls/class.ShopAttribute.php index db14345..ec7e043 100644 --- a/autoload/admin/controls/class.ShopAttribute.php +++ b/autoload/admin/controls/class.ShopAttribute.php @@ -17,18 +17,8 @@ class ShopAttribute static public function values_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania wartości atrybutu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); + $values = json_decode( \S::get( 'values' ), true ); - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } -; if ( $id = \admin\factory\ShopAttribute::values_save( (int) \S::get( 'attribute_id' ), $values['name'], $values['value'], $values['ids'], $values['default_value'], $values['impact_on_the_price'] ) ) $response = [ 'status' => 'ok', 'msg' => 'Wartości atrybutu zostały zapisane.', 'id' => $id ]; @@ -57,17 +47,7 @@ class ShopAttribute public static function attribute_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania atrybutu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\ShopAttribute::attribute_save( (int) $values['id'], $values['name'], $values['status'] == 'on' ? 1 : 0, (int) $values['type'], (int) $values['o'] ) ) $response = [ 'status' => 'ok', 'msg' => 'Atrybut został zapisany.', 'id' => $id ]; diff --git a/autoload/admin/controls/class.ShopCategory.php b/autoload/admin/controls/class.ShopCategory.php index 61c0fcf..f3dd42f 100644 --- a/autoload/admin/controls/class.ShopCategory.php +++ b/autoload/admin/controls/class.ShopCategory.php @@ -32,17 +32,7 @@ class ShopCategory static public function save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kategorii wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\ShopCategory::save( $values['id'], $values['title'], $values['text'], $values['text_hidden'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['parent_id'], $values['status'], diff --git a/autoload/admin/controls/class.ShopCoupon.php b/autoload/admin/controls/class.ShopCoupon.php index 19f8cc5..2ce1ea2 100644 --- a/autoload/admin/controls/class.ShopCoupon.php +++ b/autoload/admin/controls/class.ShopCoupon.php @@ -15,17 +15,7 @@ class ShopCoupon public static function coupon_save() { $response = ['status' => 'error', 'msg' => 'Podczas zapisywania kuponu wystąpił błąd. Proszę spróbować ponownie.']; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $values['categories'] != null ) $categories = is_array( $values['categories'] ) ? json_encode( $values['categories'] ) : json_encode( [ $values['categories'] ] ); diff --git a/autoload/admin/controls/class.ShopProducer.php b/autoload/admin/controls/class.ShopProducer.php index 31182ce..932cbc1 100644 --- a/autoload/admin/controls/class.ShopProducer.php +++ b/autoload/admin/controls/class.ShopProducer.php @@ -13,17 +13,7 @@ class ShopProducer static public function save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania producenta wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $producer_id = \admin\factory\ShopProducer::save( $values['id'], $values['name'], $values['status'] == 'on' ? 1 : 0, $values['img'], $values['description'], $values['meta_title'] ) ) $response = [ 'status' => 'ok', 'msg' => 'Producent został zapisany.', 'id' => $producer_id ]; diff --git a/autoload/admin/controls/class.ShopProduct.php b/autoload/admin/controls/class.ShopProduct.php index 7373090..71e2ba4 100644 --- a/autoload/admin/controls/class.ShopProduct.php +++ b/autoload/admin/controls/class.ShopProduct.php @@ -180,17 +180,7 @@ class ShopProduct public static function save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania produktu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\ShopProduct::save( $values['id'], $values['name'], $values['short_description'], $values['description'], $values['status'], $values['meta_description'], $values['meta_keywords'], $values['seo_link'], diff --git a/autoload/admin/controls/class.ShopProductSets.php b/autoload/admin/controls/class.ShopProductSets.php index 4514bc4..757a2d5 100644 --- a/autoload/admin/controls/class.ShopProductSets.php +++ b/autoload/admin/controls/class.ShopProductSets.php @@ -16,17 +16,7 @@ class ShopProductSets static public function save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kompletu produktów wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\ShopProductSet::save( (int)$values['id'], $values['name'], (string) $values['status'], $values['set_products_id'] diff --git a/autoload/admin/controls/class.ShopPromotion.php b/autoload/admin/controls/class.ShopPromotion.php index 3ce3e67..ae27a20 100644 --- a/autoload/admin/controls/class.ShopPromotion.php +++ b/autoload/admin/controls/class.ShopPromotion.php @@ -17,17 +17,7 @@ class ShopPromotion static public function save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania promocji wystąpił błąd. Proszę spróbować ponownie' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\ShopPromotion::save( $values['id'], diff --git a/autoload/admin/controls/class.ShopStatuses.php b/autoload/admin/controls/class.ShopStatuses.php index 23331b4..fa14645 100644 --- a/autoload/admin/controls/class.ShopStatuses.php +++ b/autoload/admin/controls/class.ShopStatuses.php @@ -7,17 +7,7 @@ class ShopStatuses { public static function status_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania statusu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\ShopStatuses::status_save( $values['id'], $values['color'], $values['apilo_status_id'], $values['sellasist_status_id'], $values['baselinker_status_id'] ) ) $response = [ 'status' => 'ok', 'msg' => 'Status został zapisany.', 'id' => $id ]; diff --git a/autoload/admin/controls/class.ShopTransport.php b/autoload/admin/controls/class.ShopTransport.php index 443dcf5..cbe05fb 100644 --- a/autoload/admin/controls/class.ShopTransport.php +++ b/autoload/admin/controls/class.ShopTransport.php @@ -5,17 +5,7 @@ class ShopTransport public static function transport_save() { $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania rodzaju transportu wystąpił błąd. Proszę spróbować ponownie.' ]; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); if ( $id = \admin\factory\ShopTransport::transport_save( $values['id'], $values['name'], $values['name_visible'], $values['description'], $values['status'], $values['cost'], $values['payment_methods'], $values['max_wp'], $values['default'], $values['apilo_carrier_account_id'], $values['sellasist_shipment_method_id'], $values['delivery_free'] diff --git a/autoload/admin/controls/class.Users.php b/autoload/admin/controls/class.Users.php index 25a1af0..45e6994 100644 --- a/autoload/admin/controls/class.Users.php +++ b/autoload/admin/controls/class.Users.php @@ -13,17 +13,7 @@ class Users public static function user_save() { - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); $response = \admin\factory\Users::user_save( $values['id'], $values['login'], $values['status'], $values['password'], $values['password_re'], $values['admin'] ); echo json_encode( $response ); diff --git a/autoload/admin/factory/class.ShopProduct.php b/autoload/admin/factory/class.ShopProduct.php index c372c3f..0c57f4a 100644 --- a/autoload/admin/factory/class.ShopProduct.php +++ b/autoload/admin/factory/class.ShopProduct.php @@ -1108,11 +1108,12 @@ class ShopProduct { $order = self::max_order() + 1; - $mdb -> insert('pp_shop_products_categories', [ - 'product_id' => (int) $product_id, - 'category_id' => (int) $category, - 'o' => (int) $order, - ]); + if ( $product_id and $category ) + $mdb -> insert( 'pp_shop_products_categories', [ + 'product_id' => (int)$product_id, + 'category_id' => (int)$category, + 'o' => (int) $order, + ] ); } } diff --git a/autoload/front/controls/class.ShopProduct.php b/autoload/front/controls/class.ShopProduct.php index ffe7e2a..26e55bb 100644 --- a/autoload/front/controls/class.ShopProduct.php +++ b/autoload/front/controls/class.ShopProduct.php @@ -26,17 +26,7 @@ class ShopProduct { global $lang_id; - $values_tmp = json_decode( \S::get( 'values' ), true ); - - $values = []; - - foreach ( $values_tmp as $item ) - { - $name = $item['name']; - $value = $item['value']; - $keys = \S::parse_name( $name ); - \S::set_array_value( $values, $keys, $value ); - } + $values = json_decode( \S::get( 'values' ), true ); foreach( $values as $key => $val ) { diff --git a/libraries/filemanager-9.12.1/UploadHandler.php b/libraries/filemanager-9.12.1/UploadHandler.php deleted file mode 100644 index b9424ea..0000000 --- a/libraries/filemanager-9.12.1/UploadHandler.php +++ /dev/null @@ -1,1543 +0,0 @@ - 'The uploaded file exceeds the upload_max_filesize directive in php.ini', - 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', - 3 => 'The uploaded file was only partially uploaded', - 4 => 'No file was uploaded', - 6 => 'Missing a temporary folder', - 7 => 'Failed to write file to disk', - 8 => 'A PHP extension stopped the file upload', - 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini', - 'max_file_size' => 'File is too big', - 'min_file_size' => 'File is too small', - 'accept_file_types' => 'Filetype not allowed', - 'max_number_of_files' => 'Maximum number of files exceeded', - 'max_width' => 'Image exceeds maximum width', - 'min_width' => 'Image requires a minimum width', - 'max_height' => 'Image exceeds maximum height', - 'min_height' => 'Image requires a minimum height', - 'abort' => 'File upload aborted', - 'image_resize' => 'Failed to resize image' - ); - - protected $image_objects = array(); - - public function __construct($options = null, $initialize = true, $error_messages = null) { - $this->response = array(); - $this->options = array( - 'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')), - 'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/', - 'upload_url' => $this->get_full_url().'/files/', - 'input_stream' => 'php://input', - 'user_dirs' => false, - 'mkdir_mode' => 0777, - 'param_name' => 'files', - // Set the following option to 'POST', if your server does not support - // DELETE requests. This is a parameter sent to the client: - 'delete_type' => 'DELETE', - 'access_control_allow_origin' => '*', - 'access_control_allow_credentials' => false, - 'access_control_allow_methods' => array( - 'OPTIONS', - 'HEAD', - 'GET', - 'POST', - 'PUT', - 'PATCH', - 'DELETE' - ), - 'access_control_allow_headers' => array( - 'Content-Type', - 'Content-Range', - 'Content-Disposition' - ), - // By default, allow redirects to the referer protocol+host: - 'redirect_allow_target' => '/^'.preg_quote( - parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_SCHEME) - .'://' - .parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_HOST) - .'/', // Trailing slash to not match subdomains by mistake - '/' // preg_quote delimiter param - ).'/', - // Enable to provide file downloads via GET requests to the PHP script: - // 1. Set to 1 to download files via readfile method through PHP - // 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache - // 3. Set to 3 to send a X-Accel-Redirect header for nginx - // If set to 2 or 3, adjust the upload_url option to the base path of - // the redirect parameter, e.g. '/files/'. - 'download_via_php' => false, - // Read files in chunks to avoid memory limits when download_via_php - // is enabled, set to 0 to disable chunked reading of files: - 'readfile_chunk_size' => 2 * 1024 * 1024, // 10 MiB - // Defines which files can be displayed inline when downloaded: - 'inline_file_types' => '/\.(gif|jpe?g|png)$/i', - // Defines which files (based on their names) are accepted for upload: - 'accept_file_types' => '/.+$/i', - // The php.ini settings upload_max_filesize and post_max_size - // take precedence over the following max_file_size setting: - 'max_file_size' => null, - 'min_file_size' => 1, - // The maximum number of files for the upload directory: - 'max_number_of_files' => null, - // Defines which files are handled as image files: - 'image_file_types' => '/\.(gif|jpe?g|png)$/i', - // Use exif_imagetype on all files to correct file extensions: - 'correct_image_extensions' => true, - // Image resolution restrictions: - 'max_width' => null, - 'max_height' => null, - 'min_width' => 1, - 'min_height' => 1, - // Set the following option to false to enable resumable uploads: - 'discard_aborted_uploads' => true, - // Set to 0 to use the GD library to scale and orient images, - // set to 1 to use imagick (if installed, falls back to GD), - // set to 2 to use the ImageMagick convert binary directly: - 'image_library' => 1, - // Uncomment the following to define an array of resource limits - // for imagick: - /* - 'imagick_resource_limits' => array( - imagick::RESOURCETYPE_MAP => 32, - imagick::RESOURCETYPE_MEMORY => 32 - ), - */ - // Command or path for to the ImageMagick convert binary: - 'convert_bin' => 'convert', - // Uncomment the following to add parameters in front of each - // ImageMagick convert call (the limit constraints seem only - // to have an effect if put in front): - /* - 'convert_params' => '-limit memory 32MiB -limit map 32MiB', - */ - // Command or path for to the ImageMagick identify binary: - 'identify_bin' => 'identify', - 'image_versions' => array( - // The empty image version key defines options for the original image: - // Keep in mind that these options are inherited by all other image versions! - '' => array( - // Automatically rotate images based on EXIF meta data: - 'auto_orient' => true - ), - // Uncomment the following to create medium sized images: - /* - 'medium' => array( - 'max_width' => 800, - 'max_height' => 600 - ), - 'thumbnail' => array( - // Uncomment the following to use a defined directory for the thumbnails - // instead of a subdirectory based on the version identifier. - // Make sure that this directory doesn't allow execution of files if you - // don't pose any restrictions on the type of uploaded files, e.g. by - // copying the .htaccess file from the files directory for Apache: - //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/', - 'upload_url' => $this->get_full_url().'/thumb/', - // Uncomment the following to force the max - // dimensions and e.g. create square thumbnails: - 'crop' => true, - 'max_width' => 80, - 'max_height' => 80 - ) - */ - ), - 'print_response' => true - ); - if ($options) { - $this->options = $options + $this->options; - } - if ($error_messages) { - $this->error_messages = $error_messages + $this->error_messages; - } - if ($initialize) { - $this->initialize(); - } - } - - protected function initialize() { - switch ($this->get_server_var('REQUEST_METHOD')) { - case 'OPTIONS': - case 'HEAD': - $this->head(); - break; - case 'GET': - $this->get($this->options['print_response']); - break; - case 'PATCH': - case 'PUT': - case 'POST': - $this->post($this->options['print_response']); - break; - case 'DELETE': - $this->delete($this->options['print_response']); - break; - default: - $this->header('HTTP/1.1 405 Method Not Allowed'); - } - } - - protected function get_full_url() { - $https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 || - !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && - strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0; - return - ($https ? 'https://' : 'http://'). - (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : ''). - (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME']. - ($https && $_SERVER['SERVER_PORT'] === 443 || - $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))). - substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/')); - } - - protected function get_user_id() { - @session_start(); - return session_id(); - } - - protected function get_user_path() { - if ($this->options['user_dirs']) { - return $this->get_user_id().'/'; - } - return ''; - } - - protected function get_upload_path($file_name = null, $version = null) { - $file_name = $file_name ? $file_name : ''; - if (empty($version)) { - $version_path = ''; - } else { - $version_dir = @$this->options['image_versions'][$version]['upload_dir']; - if ($version_dir) { - return $version_dir.$this->get_user_path().$file_name; - } - $version_path = $version.'/'; - } - return $this->options['upload_dir'].$this->get_user_path() - .$version_path.$file_name; - } - - protected function get_query_separator($url) { - return strpos($url, '?') === false ? '?' : '&'; - } - - protected function get_download_url($file_name, $version = null, $direct = false) { - if (!$direct && $this->options['download_via_php']) { - $url = $this->options['script_url'] - .$this->get_query_separator($this->options['script_url']) - .$this->get_singular_param_name() - .'='.rawurlencode($file_name); - if ($version) { - $url .= '&version='.rawurlencode($version); - } - return $url.'&download=1'; - } - if (empty($version)) { - $version_path = ''; - } else { - $version_url = @$this->options['image_versions'][$version]['upload_url']; - if ($version_url) { - return $version_url.$this->get_user_path().rawurlencode($file_name); - } - $version_path = rawurlencode($version).'/'; - } - return $this->options['upload_url'].$this->get_user_path() - .$version_path.rawurlencode($file_name); - } - - protected function set_additional_file_properties($file) { - $file->deleteUrl = $this->options['script_url'] - .$this->get_query_separator($this->options['script_url']) - .$this->get_singular_param_name() - .'='.rawurlencode($file->name); - $file->deleteType = $this->options['delete_type']; - if ($file->deleteType !== 'DELETE') { - $file->deleteUrl .= '&_method=DELETE'; - } - if ($this->options['access_control_allow_credentials']) { - $file->deleteWithCredentials = true; - } - } - - // Fix for overflowing signed 32 bit integers, - // works for sizes up to 2^32-1 bytes (4 GiB - 1): - protected function fix_integer_overflow($size) { - if ($size < 0) { - $size += 2.0 * (PHP_INT_MAX + 1); - } - return $size; - } - - protected function get_file_size($file_path, $clear_stat_cache = false) { - if ($clear_stat_cache) { - if (version_compare(PHP_VERSION, '5.3.0') >= 0) { - clearstatcache(true, $file_path); - } else { - clearstatcache(); - } - } - return $this->fix_integer_overflow(filesize($file_path)); - } - - protected function is_valid_file_object($file_name) { - $file_path = $this->get_upload_path($file_name); - if (is_file($file_path) && $file_name[0] !== '.') { - return true; - } - return false; - } - - protected function get_file_object($file_name) { - if ($this->is_valid_file_object($file_name)) { - $file = new \stdClass(); - $file->name = $file_name; - $file->size = $this->get_file_size( - $this->get_upload_path($file_name) - ); - $file->url = $this->get_download_url($file->name); - foreach ($this->options['image_versions'] as $version => $options) { - if (!empty($version)) { - if (is_file($this->get_upload_path($file_name, $version))) { - $file->{$version.'Url'} = $this->get_download_url( - $file->name, - $version - ); - } - } - } - $this->set_additional_file_properties($file); - return $file; - } - return null; - } - - protected function get_file_objects($iteration_method = 'get_file_object') { - $upload_dir = $this->get_upload_path(); - if (!is_dir($upload_dir)) { - return array(); - } - return array_values(array_filter(array_map( - array($this, $iteration_method), - scandir($upload_dir) - ))); - } - - protected function count_file_objects() { - return count($this->get_file_objects('is_valid_file_object')); - } - - protected function get_error_message($error) { - return isset($this->error_messages[$error]) ? - $this->error_messages[$error] : $error; - } - - public function get_config_bytes($val) { - $val = trim($val); - $last = strtolower($val[strlen($val)-1]); - $val = (int)$val; - switch ($last) { - case 'g': - $val *= 1024; - case 'm': - $val *= 1024; - case 'k': - $val *= 1024; - } - return $this->fix_integer_overflow($val); - } - - protected function validate($uploaded_file, $file, $error, $index) { - if ($error) { - $file->error = $this->get_error_message($error); - return false; - } - $content_length = $this->fix_integer_overflow( - (int)$this->get_server_var('CONTENT_LENGTH') - ); - $post_max_size = $this->get_config_bytes(ini_get('post_max_size')); - if ($post_max_size && ($content_length > $post_max_size)) { - $file->error = $this->get_error_message('post_max_size'); - return false; - } - if (!preg_match($this->options['accept_file_types'], $file->name)) { - $file->error = $this->get_error_message('accept_file_types'); - return false; - } - if ($uploaded_file && is_uploaded_file($uploaded_file)) { - $file_size = $this->get_file_size($uploaded_file); - } else { - $file_size = $content_length; - } - if ($this->options['max_file_size'] && ( - $file_size > $this->options['max_file_size'] || - $file->size > $this->options['max_file_size']) - ) { - $file->error = $this->get_error_message('max_file_size'); - return false; - } - if ($this->options['min_file_size'] && - $file_size < $this->options['min_file_size']) { - $file->error = $this->get_error_message('min_file_size'); - return false; - } - if (is_int($this->options['max_number_of_files']) && - ($this->count_file_objects() >= $this->options['max_number_of_files']) && - // Ignore additional chunks of existing files: - !is_file($this->get_upload_path($file->name))) { - $file->error = $this->get_error_message('max_number_of_files'); - return false; - } - $max_width = @$this->options['max_width']; - $max_height = @$this->options['max_height']; - $min_width = @$this->options['min_width']; - $min_height = @$this->options['min_height']; - if (($max_width || $max_height || $min_width || $min_height) - && preg_match($this->options['image_file_types'], $file->name)) { - list($img_width, $img_height) = $this->get_image_size($uploaded_file); - - // If we are auto rotating the image by default, do the checks on - // the correct orientation - if ( - @$this->options['image_versions']['']['auto_orient'] && - function_exists('exif_read_data') && - ($exif = @exif_read_data($uploaded_file)) && - (((int) @$exif['Orientation']) >= 5) - ) { - $tmp = $img_width; - $img_width = $img_height; - $img_height = $tmp; - unset($tmp); - } - - } - if (!empty($img_width)) { - if ($max_width && $img_width > $max_width) { - $file->error = $this->get_error_message('max_width'); - return false; - } - if ($max_height && $img_height > $max_height) { - $file->error = $this->get_error_message('max_height'); - return false; - } - if ($min_width && $img_width < $min_width) { - $file->error = $this->get_error_message('min_width'); - return false; - } - if ($min_height && $img_height < $min_height) { - $file->error = $this->get_error_message('min_height'); - return false; - } - } - return true; - } - - protected function upcount_name_callback($matches) { - $index = isset($matches[1]) ? ((int)$matches[1]) + 1 : 1; - $ext = isset($matches[2]) ? $matches[2] : ''; - return ' ('.$index.')'.$ext; - } - - protected function upcount_name($name) { - return preg_replace_callback( - '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/', - array($this, 'upcount_name_callback'), - $name, - 1 - ); - } - - protected function get_unique_filename($file_path, $name, $size, $type, $error, - $index, $content_range) { - while(is_dir($this->get_upload_path($name))) { - $name = $this->upcount_name($name); - } - // Keep an existing filename if this is part of a chunked upload: - $uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]); - while (is_file($this->get_upload_path($name))) { - if ($uploaded_bytes === $this->get_file_size( - $this->get_upload_path($name))) { - break; - } - $name = $this->upcount_name($name); - } - return $name; - } - - protected function fix_file_extension($file_path, $name, $size, $type, $error, - $index, $content_range) { - // Add missing file extension for known image types: - if (strpos($name, '.') === false && - preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { - $name .= '.'.$matches[1]; - } - if ($this->options['correct_image_extensions'] && - function_exists('exif_imagetype')) { - switch (@exif_imagetype($file_path)){ - case IMAGETYPE_JPEG: - $extensions = array('jpg', 'jpeg'); - break; - case IMAGETYPE_PNG: - $extensions = array('png'); - break; - case IMAGETYPE_GIF: - $extensions = array('gif'); - break; - } - // Adjust incorrect image file extensions: - if (!empty($extensions)) { - $parts = explode('.', $name); - $extIndex = count($parts) - 1; - $ext = strtolower(@$parts[$extIndex]); - if (!in_array($ext, $extensions)) { - $parts[$extIndex] = $extensions[0]; - $name = implode('.', $parts); - } - } - } - return $name; - } - - protected function trim_file_name($file_path, $name, $size, $type, $error, - $index, $content_range) { - // Remove path information and dots around the filename, to prevent uploading - // into different directories or replacing hidden system files. - // Also remove control characters and spaces (\x00..\x20) around the filename: - $name = trim($this->basename(stripslashes($name)), ".\x00..\x20"); - // Use a timestamp for empty filenames: - if (!$name) { - $name = str_replace('.', '-', microtime(true)); - } - return $name; - } - - protected function get_file_name($file_path, $name, $size, $type, $error, - $index, $content_range) { - $name = $this->trim_file_name($file_path, $name, $size, $type, $error, - $index, $content_range); - return $this->get_unique_filename( - $file_path, - $this->fix_file_extension($file_path, $name, $size, $type, $error, - $index, $content_range), - $size, - $type, - $error, - $index, - $content_range - ); - } - - protected function get_scaled_image_file_paths($file_name, $version) { - $file_path = $this->get_upload_path($file_name); - if (!empty($version)) { - $version_dir = $this->get_upload_path(null, $version); - if (!is_dir($version_dir)) { - mkdir($version_dir, $this->options['mkdir_mode'], true); - } - $new_file_path = $version_dir.'/'.$file_name; - } else { - $new_file_path = $file_path; - } - return array($file_path, $new_file_path); - } - - protected function gd_get_image_object($file_path, $func, $no_cache = false) { - if (empty($this->image_objects[$file_path]) || $no_cache) { - $this->gd_destroy_image_object($file_path); - $this->image_objects[$file_path] = $func($file_path); - } - return $this->image_objects[$file_path]; - } - - protected function gd_set_image_object($file_path, $image) { - $this->gd_destroy_image_object($file_path); - $this->image_objects[$file_path] = $image; - } - - protected function gd_destroy_image_object($file_path) { - $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ; - return $image && imagedestroy($image); - } - - protected function gd_imageflip($image, $mode) { - if (function_exists('imageflip')) { - return imageflip($image, $mode); - } - $new_width = $src_width = imagesx($image); - $new_height = $src_height = imagesy($image); - $new_img = imagecreatetruecolor($new_width, $new_height); - $src_x = 0; - $src_y = 0; - switch ($mode) { - case '1': // flip on the horizontal axis - $src_y = $new_height - 1; - $src_height = -$new_height; - break; - case '2': // flip on the vertical axis - $src_x = $new_width - 1; - $src_width = -$new_width; - break; - case '3': // flip on both axes - $src_y = $new_height - 1; - $src_height = -$new_height; - $src_x = $new_width - 1; - $src_width = -$new_width; - break; - default: - return $image; - } - imagecopyresampled( - $new_img, - $image, - 0, - 0, - $src_x, - $src_y, - $new_width, - $new_height, - $src_width, - $src_height - ); - return $new_img; - } - - protected function gd_orient_image($file_path, $src_img) { - if (!function_exists('exif_read_data')) { - return false; - } - $exif = @exif_read_data($file_path); - if ($exif === false) { - return false; - } - $orientation = (int)@$exif['Orientation']; - if ($orientation < 2 || $orientation > 8) { - return false; - } - switch ($orientation) { - case 2: - $new_img = $this->gd_imageflip( - $src_img, - defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2 - ); - break; - case 3: - $new_img = imagerotate($src_img, 180, 0); - break; - case 4: - $new_img = $this->gd_imageflip( - $src_img, - defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1 - ); - break; - case 5: - $tmp_img = $this->gd_imageflip( - $src_img, - defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1 - ); - $new_img = imagerotate($tmp_img, 270, 0); - imagedestroy($tmp_img); - break; - case 6: - $new_img = imagerotate($src_img, 270, 0); - break; - case 7: - $tmp_img = $this->gd_imageflip( - $src_img, - defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2 - ); - $new_img = imagerotate($tmp_img, 270, 0); - imagedestroy($tmp_img); - break; - case 8: - $new_img = imagerotate($src_img, 90, 0); - break; - default: - return false; - } - $this->gd_set_image_object($file_path, $new_img); - return true; - } - - protected function gd_create_scaled_image($file_name, $version, $options) { - if (!function_exists('imagecreatetruecolor')) { - error_log('Function not found: imagecreatetruecolor'); - return false; - } - list($file_path, $new_file_path) = - $this->get_scaled_image_file_paths($file_name, $version); - $type = strtolower(substr(strrchr($file_name, '.'), 1)); - switch ($type) { - case 'jpg': - case 'jpeg': - $src_func = 'imagecreatefromjpeg'; - $write_func = 'imagejpeg'; - $image_quality = isset($options['jpeg_quality']) ? - $options['jpeg_quality'] : 75; - break; - case 'gif': - $src_func = 'imagecreatefromgif'; - $write_func = 'imagegif'; - $image_quality = null; - break; - case 'png': - $src_func = 'imagecreatefrompng'; - $write_func = 'imagepng'; - $image_quality = isset($options['png_quality']) ? - $options['png_quality'] : 9; - break; - default: - return false; - } - $src_img = $this->gd_get_image_object( - $file_path, - $src_func, - !empty($options['no_cache']) - ); - $image_oriented = false; - if (!empty($options['auto_orient']) && $this->gd_orient_image( - $file_path, - $src_img - )) { - $image_oriented = true; - $src_img = $this->gd_get_image_object( - $file_path, - $src_func - ); - } - $max_width = $img_width = imagesx($src_img); - $max_height = $img_height = imagesy($src_img); - if (!empty($options['max_width'])) { - $max_width = $options['max_width']; - } - if (!empty($options['max_height'])) { - $max_height = $options['max_height']; - } - $scale = min( - $max_width / $img_width, - $max_height / $img_height - ); - if ($scale >= 1) { - if ($image_oriented) { - return $write_func($src_img, $new_file_path, $image_quality); - } - if ($file_path !== $new_file_path) { - return copy($file_path, $new_file_path); - } - return true; - } - if (empty($options['crop'])) { - $new_width = $img_width * $scale; - $new_height = $img_height * $scale; - $dst_x = 0; - $dst_y = 0; - $new_img = imagecreatetruecolor($new_width, $new_height); - } else { - if (($img_width / $img_height) >= ($max_width / $max_height)) { - $new_width = $img_width / ($img_height / $max_height); - $new_height = $max_height; - } else { - $new_width = $max_width; - $new_height = $img_height / ($img_width / $max_width); - } - $dst_x = 0 - ($new_width - $max_width) / 2; - $dst_y = 0 - ($new_height - $max_height) / 2; - $new_img = imagecreatetruecolor($max_width, $max_height); - } - // Handle transparency in GIF and PNG images: - switch ($type) { - case 'gif': - case 'png': - imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0)); - case 'png': - imagealphablending($new_img, false); - imagesavealpha($new_img, true); - break; - } - $success = imagecopyresampled( - $new_img, - $src_img, - $dst_x, - $dst_y, - 0, - 0, - $new_width, - $new_height, - $img_width, - $img_height - ) && $write_func($new_img, $new_file_path, $image_quality); - $this->gd_set_image_object($file_path, $new_img); - return $success; - } - - protected function imagick_get_image_object($file_path, $no_cache = false) { - if (empty($this->image_objects[$file_path]) || $no_cache) { - $this->imagick_destroy_image_object($file_path); - $image = new \Imagick(); - if (!empty($this->options['imagick_resource_limits'])) { - foreach ($this->options['imagick_resource_limits'] as $type => $limit) { - $image->setResourceLimit($type, $limit); - } - } - $image->readImage($file_path); - $this->image_objects[$file_path] = $image; - } - return $this->image_objects[$file_path]; - } - - protected function imagick_set_image_object($file_path, $image) { - $this->imagick_destroy_image_object($file_path); - $this->image_objects[$file_path] = $image; - } - - protected function imagick_destroy_image_object($file_path) { - $image = (isset($this->image_objects[$file_path])) ? $this->image_objects[$file_path] : null ; - return $image && $image->destroy(); - } - - protected function imagick_orient_image($image) { - $orientation = $image->getImageOrientation(); - $background = new \ImagickPixel('none'); - switch ($orientation) { - case \imagick::ORIENTATION_TOPRIGHT: // 2 - $image->flopImage(); // horizontal flop around y-axis - break; - case \imagick::ORIENTATION_BOTTOMRIGHT: // 3 - $image->rotateImage($background, 180); - break; - case \imagick::ORIENTATION_BOTTOMLEFT: // 4 - $image->flipImage(); // vertical flip around x-axis - break; - case \imagick::ORIENTATION_LEFTTOP: // 5 - $image->flopImage(); // horizontal flop around y-axis - $image->rotateImage($background, 270); - break; - case \imagick::ORIENTATION_RIGHTTOP: // 6 - $image->rotateImage($background, 90); - break; - case \imagick::ORIENTATION_RIGHTBOTTOM: // 7 - $image->flipImage(); // vertical flip around x-axis - $image->rotateImage($background, 270); - break; - case \imagick::ORIENTATION_LEFTBOTTOM: // 8 - $image->rotateImage($background, 270); - break; - default: - return false; - } - $image->setImageOrientation(\imagick::ORIENTATION_TOPLEFT); // 1 - return true; - } - - protected function imagick_create_scaled_image($file_name, $version, $options) { - list($file_path, $new_file_path) = - $this->get_scaled_image_file_paths($file_name, $version); - $image = $this->imagick_get_image_object( - $file_path, - !empty($options['crop']) || !empty($options['no_cache']) - ); - if ($image->getImageFormat() === 'GIF') { - // Handle animated GIFs: - $images = $image->coalesceImages(); - foreach ($images as $frame) { - $image = $frame; - $this->imagick_set_image_object($file_name, $image); - break; - } - } - $image_oriented = false; - if (!empty($options['auto_orient'])) { - $image_oriented = $this->imagick_orient_image($image); - } - $new_width = $max_width = $img_width = $image->getImageWidth(); - $new_height = $max_height = $img_height = $image->getImageHeight(); - if (!empty($options['max_width'])) { - $new_width = $max_width = $options['max_width']; - } - if (!empty($options['max_height'])) { - $new_height = $max_height = $options['max_height']; - } - $image_strip = false; - if( !empty($options["strip"]) ) { - $image_strip = $options["strip"]; - } - if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) { - if ($file_path !== $new_file_path) { - return copy($file_path, $new_file_path); - } - return true; - } - $crop = !empty($options['crop']); - if ($crop) { - $x = 0; - $y = 0; - if (($img_width / $img_height) >= ($max_width / $max_height)) { - $new_width = 0; // Enables proportional scaling based on max_height - $x = ($img_width / ($img_height / $max_height) - $max_width) / 2; - } else { - $new_height = 0; // Enables proportional scaling based on max_width - $y = ($img_height / ($img_width / $max_width) - $max_height) / 2; - } - } - $success = $image->resizeImage( - $new_width, - $new_height, - isset($options['filter']) ? $options['filter'] : \imagick::FILTER_LANCZOS, - isset($options['blur']) ? $options['blur'] : 1, - $new_width && $new_height // fit image into constraints if not to be cropped - ); - if ($success && $crop) { - $success = $image->cropImage( - $max_width, - $max_height, - $x, - $y - ); - if ($success) { - $success = $image->setImagePage($max_width, $max_height, 0, 0); - } - } - $type = strtolower(substr(strrchr($file_name, '.'), 1)); - switch ($type) { - case 'jpg': - case 'jpeg': - if (!empty($options['jpeg_quality'])) { - $image->setImageCompression(\imagick::COMPRESSION_JPEG); - $image->setImageCompressionQuality($options['jpeg_quality']); - } - break; - } - if ( $image_strip ) { - $image->stripImage(); - } - return $success && $image->writeImage($new_file_path); - } - - protected function imagemagick_create_scaled_image($file_name, $version, $options) { - list($file_path, $new_file_path) = - $this->get_scaled_image_file_paths($file_name, $version); - $resize = @$options['max_width'] - .(empty($options['max_height']) ? '' : 'X'.$options['max_height']); - if (!$resize && empty($options['auto_orient'])) { - if ($file_path !== $new_file_path) { - return copy($file_path, $new_file_path); - } - return true; - } - $cmd = $this->options['convert_bin']; - if (!empty($this->options['convert_params'])) { - $cmd .= ' '.$this->options['convert_params']; - } - $cmd .= ' '.escapeshellarg($file_path); - if (!empty($options['auto_orient'])) { - $cmd .= ' -auto-orient'; - } - if ($resize) { - // Handle animated GIFs: - $cmd .= ' -coalesce'; - if (empty($options['crop'])) { - $cmd .= ' -resize '.escapeshellarg($resize.'>'); - } else { - $cmd .= ' -resize '.escapeshellarg($resize.'^'); - $cmd .= ' -gravity center'; - $cmd .= ' -crop '.escapeshellarg($resize.'+0+0'); - } - // Make sure the page dimensions are correct (fixes offsets of animated GIFs): - $cmd .= ' +repage'; - } - if (!empty($options['convert_params'])) { - $cmd .= ' '.$options['convert_params']; - } - $cmd .= ' '.escapeshellarg($new_file_path); - exec($cmd, $output, $error); - if ($error) { - error_log(implode('\n', $output)); - return false; - } - return true; - } - - protected function get_image_size($file_path) { - if ($this->options['image_library']) { - if (extension_loaded('imagick')) { - $image = new \Imagick(); - try { - if (@$image->pingImage($file_path)) { - $dimensions = array($image->getImageWidth(), $image->getImageHeight()); - $image->destroy(); - return $dimensions; - } - return false; - } catch (\Exception $e) { - error_log($e->getMessage()); - } - } - if ($this->options['image_library'] === 2) { - $cmd = $this->options['identify_bin']; - $cmd .= ' -ping '.escapeshellarg($file_path); - exec($cmd, $output, $error); - if (!$error && !empty($output)) { - // image.jpg JPEG 1920x1080 1920x1080+0+0 8-bit sRGB 465KB 0.000u 0:00.000 - $infos = preg_split('/\s+/', substr($output[0], strlen($file_path))); - $dimensions = preg_split('/x/', $infos[2]); - return $dimensions; - } - return false; - } - } - if (!function_exists('getimagesize')) { - error_log('Function not found: getimagesize'); - return false; - } - return @getimagesize($file_path); - } - - protected function create_scaled_image($file_name, $version, $options) { - if ($this->options['image_library'] === 2) { - return $this->imagemagick_create_scaled_image($file_name, $version, $options); - } - if ($this->options['image_library'] && extension_loaded('imagick')) { - return $this->imagick_create_scaled_image($file_name, $version, $options); - } - return $this->gd_create_scaled_image($file_name, $version, $options); - } - - protected function destroy_image_object($file_path) { - if ($this->options['image_library'] && extension_loaded('imagick')) { - return $this->imagick_destroy_image_object($file_path); - } - } - - protected function is_valid_image_file($file_path) { - if (!preg_match($this->options['image_file_types'], $file_path)) { - return false; - } - if (function_exists('exif_imagetype')) { - return @exif_imagetype($file_path); - } - $image_info = $this->get_image_size($file_path); - return $image_info && $image_info[0] && $image_info[1]; - } - - protected function handle_image_file($file_path, $file) { - $failed_versions = array(); - foreach ($this->options['image_versions'] as $version => $options) { - if ($this->create_scaled_image($file->name, $version, $options)) { - if (!empty($version)) { - $file->{$version.'Url'} = $this->get_download_url( - $file->name, - $version - ); - } else { - $file->size = $this->get_file_size($file_path, true); - } - } else { - $failed_versions[] = $version ? $version : 'original'; - } - } - if (count($failed_versions)) { - $file->error = $this->get_error_message('image_resize') - .' ('.implode($failed_versions, ', ').')'; - } - // Free memory: - $this->destroy_image_object($file_path); - } - - protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) { - $file = new \stdClass(); - $file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error, - $index, $content_range); - $file->size = $this->fix_integer_overflow((int)$size); - $file->type = $type; - if ($this->validate($uploaded_file, $file, $error, $index)) { - $this->handle_form_data($file, $index); - $upload_dir = $this->get_upload_path(); - if (!$this->options['ftp'] && !is_dir($upload_dir)) { - mkdir($upload_dir, $this->options['mkdir_mode'], true); - } - $file_path = $this->get_upload_path($file->name); - $append_file = $content_range && is_file($file_path) && - $file->size > $this->get_file_size($file_path); - if ($uploaded_file && is_uploaded_file($uploaded_file)) { - // multipart/formdata uploads (POST method uploads) - if ($append_file) { - file_put_contents( - $file_path, - fopen($uploaded_file, 'r'), - FILE_APPEND - ); - } else { - move_uploaded_file($uploaded_file, $file_path); - } - } else { - if($this->get_file_size($uploaded_file) == $file->size){ - copy($uploaded_file, $file_path); - }else{ - - // Non-multipart uploads (PUT method support) - file_put_contents( - $file_path, - fopen($this->options['input_stream'], 'r'), - $append_file ? FILE_APPEND : 0 - ); - } - } - $file_size = $this->get_file_size($file_path, $append_file); - $file->path = $file_path; - if ($file_size === $file->size) { - $file->url = $this->get_download_url($file->name); - if ($this->is_valid_image_file($file_path)) { - $this->handle_image_file($file_path, $file); - } - } else { - $file->size = $file_size; - if (!$content_range && $this->options['discard_aborted_uploads']) { - unlink($file_path); - $file->error = $this->get_error_message('abort'); - } - } - $this->set_additional_file_properties($file); - } - return $file; - } - - protected function readfile($file_path) { - $file_size = $this->get_file_size($file_path); - $chunk_size = $this->options['readfile_chunk_size']; - if ($chunk_size && $file_size > $chunk_size) { - $handle = fopen($file_path, 'rb'); - while (!feof($handle)) { - echo fread($handle, $chunk_size); - @ob_flush(); - @flush(); - } - fclose($handle); - return $file_size; - } - return readfile($file_path); - } - - protected function body($str) { - echo $str; - } - - protected function header($str) { - header($str); - } - - protected function get_upload_data($id) { - return @$_FILES[$id]; - } - - protected function get_post_param($id) { - return @$_POST[$id]; - } - - protected function get_query_param($id) { - return @$_GET[$id]; - } - - protected function get_server_var($id) { - return @$_SERVER[$id]; - } - - protected function handle_form_data($file, $index) { - // Handle form data, e.g. $_POST['description'][$index] - } - - protected function get_version_param() { - return $this->basename(stripslashes($this->get_query_param('version'))); - } - - protected function get_singular_param_name() { - return substr($this->options['param_name'], 0, -1); - } - - protected function get_file_name_param() { - $name = $this->get_singular_param_name(); - return $this->basename(stripslashes($this->get_query_param($name))); - } - - protected function get_file_names_params() { - $params = $this->get_query_param($this->options['param_name']); - if (!$params) { - return null; - } - foreach ($params as $key => $value) { - $params[$key] = $this->basename(stripslashes($value)); - } - return $params; - } - - protected function get_file_type($file_path) { - switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) { - case 'jpeg': - case 'jpg': - return 'image/jpeg'; - case 'png': - return 'image/png'; - case 'gif': - return 'image/gif'; - default: - return ''; - } - } - - protected function download() { - switch ($this->options['download_via_php']) { - case 1: - $redirect_header = null; - break; - case 2: - $redirect_header = 'X-Sendfile'; - break; - case 3: - $redirect_header = 'X-Accel-Redirect'; - break; - default: - return $this->header('HTTP/1.1 403 Forbidden'); - } - $file_name = $this->get_file_name_param(); - if (!$this->is_valid_file_object($file_name)) { - return $this->header('HTTP/1.1 404 Not Found'); - } - if ($redirect_header) { - return $this->header( - $redirect_header.': '.$this->get_download_url( - $file_name, - $this->get_version_param(), - true - ) - ); - } - $file_path = $this->get_upload_path($file_name, $this->get_version_param()); - // Prevent browsers from MIME-sniffing the content-type: - $this->header('X-Content-Type-Options: nosniff'); - if (!preg_match($this->options['inline_file_types'], $file_name)) { - $this->header('Content-Type: application/octet-stream'); - $this->header('Content-Disposition: attachment; filename="'.$file_name.'"'); - } else { - $this->header('Content-Type: '.$this->get_file_type($file_path)); - $this->header('Content-Disposition: inline; filename="'.$file_name.'"'); - } - $this->header('Content-Length: '.$this->get_file_size($file_path)); - $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path))); - $this->readfile($file_path); - } - - protected function send_content_type_header() { - $this->header('Vary: Accept'); - if (strpos($this->get_server_var('HTTP_ACCEPT'), 'application/json') !== false) { - $this->header('Content-type: application/json'); - } else { - $this->header('Content-type: text/plain'); - } - } - - protected function send_access_control_headers() { - $this->header('Access-Control-Allow-Origin: '.$this->options['access_control_allow_origin']); - $this->header('Access-Control-Allow-Credentials: ' - .($this->options['access_control_allow_credentials'] ? 'true' : 'false')); - $this->header('Access-Control-Allow-Methods: ' - .implode(', ', $this->options['access_control_allow_methods'])); - $this->header('Access-Control-Allow-Headers: ' - .implode(', ', $this->options['access_control_allow_headers'])); - } - - public function generate_response($content, $print_response = true) { - $this->response = $content; - if ($print_response) { - $json = json_encode($content); - $redirect = stripslashes($this->get_post_param('redirect')); - if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) { - $this->header('Location: '.sprintf($redirect, rawurlencode($json))); - return; - } - $this->head(); - if ($this->get_server_var('HTTP_CONTENT_RANGE')) { - $files = isset($content[$this->options['param_name']]) ? - $content[$this->options['param_name']] : null; - if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) { - $this->header('Range: 0-'.( - $this->fix_integer_overflow((int)$files[0]->size) - 1 - )); - } - } - $this->body($json); - } - return $content; - } - - public function get_response () { - return $this->response; - } - - public function head() { - $this->header('Pragma: no-cache'); - $this->header('Cache-Control: no-store, no-cache, must-revalidate'); - $this->header('Content-Disposition: inline; filename="files.json"'); - // Prevent Internet Explorer from MIME-sniffing the content-type: - $this->header('X-Content-Type-Options: nosniff'); - if ($this->options['access_control_allow_origin']) { - $this->send_access_control_headers(); - } - $this->send_content_type_header(); - } - - public function get($print_response = true) { - if ($print_response && $this->get_query_param('download')) { - return $this->download(); - } - $file_name = $this->get_file_name_param(); - if ($file_name) { - $response = array( - $this->get_singular_param_name() => $this->get_file_object($file_name) - ); - } else { - $response = array( - $this->options['param_name'] => $this->get_file_objects() - ); - } - - return $this->generate_response($response, $print_response); - } - - public function post($print_response = true) { - if ($this->get_query_param('_method') === 'DELETE') { - return $this->delete($print_response); - } - $upload = $this->get_upload_data($this->options['param_name']); - // Parse the Content-Disposition header, if available: - $content_disposition_header = $this->get_server_var('HTTP_CONTENT_DISPOSITION'); - $file_name = $content_disposition_header ? - rawurldecode(preg_replace( - '/(^[^"]+")|("$)/', - '', - $content_disposition_header - )) : null; - // Parse the Content-Range header, which has the following form: - // Content-Range: bytes 0-524287/2000000 - $content_range_header = $this->get_server_var('HTTP_CONTENT_RANGE'); - $content_range = $content_range_header ? - preg_split('/[^0-9]+/', $content_range_header) : null; - $size = $content_range ? $content_range[3] : null; - $files = array(); - if ($upload) { - if (is_array($upload['tmp_name'])) { - // param_name is an array identifier like "files[]", - // $upload is a multi-dimensional array: - foreach ($upload['tmp_name'] as $index => $value) { - if(!isset($upload['error'][$index])){ - $upload['error'][$index] = null; - } - $files[] = $this->handle_file_upload( - $upload['tmp_name'][$index], - $file_name ? $file_name : $upload['name'][$index], - $size ? $size : $upload['size'][$index], - $upload['type'][$index], - $upload['error'][$index], - $index, - $content_range - ); - } - } else { - // param_name is a single object identifier like "file", - // $upload is a one-dimensional array: - $files[] = $this->handle_file_upload( - isset($upload['tmp_name']) ? $upload['tmp_name'] : null, - $file_name ? $file_name : (isset($upload['name']) ? - $upload['name'] : null), - $size ? $size : (isset($upload['size']) ? - $upload['size'] : $this->get_server_var('CONTENT_LENGTH')), - isset($upload['type']) ? - $upload['type'] : $this->get_server_var('CONTENT_TYPE'), - isset($upload['error']) ? $upload['error'] : null, - null, - $content_range - ); - } - } - $response = array($this->options['param_name'] => $files); - $name = $file_name ? $file_name : $upload['name'][0]; - $res = $this->generate_response($response, $print_response); - if(is_file($this->get_upload_path($name))){ - $uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]); - $totalSize = $this->get_file_size($this->get_upload_path($name)); - if ($totalSize - $uploaded_bytes - $this->options['readfile_chunk_size'] < 0) { - $this->onUploadEnd($res); - }else{ - $this->head(); - $this->body(json_encode($res)); - } - }else{ - $this->head(); - $this->body(json_encode($res)); - } - return $res; - } - - public function onUploadEnd ($res){ - $targetPath = $this->options['storeFolder']; - $targetPathThumb = $this->options['storeFolderThumb']; - - if(!$this->options['ftp']){ - $targetFile = $targetPath. $res['files'][0]->name; - $targetFileThumb = $targetPathThumb. $res['files'][0]->name; - if (!is_dir($targetPathThumb)) { - mkdir($targetPathThumb, $this->options['mkdir_mode'], true); - } - if(is_file($targetFile)) { - chmod($targetFile, $this->options['config']['filePermission']); - }else{ - chmod($targetFile, $this->options['config']['folderPermission']); - } - }else{ - $targetFile = $this->options['config']['ftp_temp_folder'].$res['files'][0]->name; - $targetFileThumb = $this->options['config']['ftp_temp_folder']."thumbs/". $res['files'][0]->name; - } - - //check if image (and supported) - $is_img = FALSE; - if ($this->is_valid_image_file($targetFile)){ - $is_img = TRUE; - } - - if ($is_img) - { - if(isset($this->options['config']['image_watermark']) && $this->options['config']['image_watermark']){ - require_once('include/php_image_magician.php'); - - $magicianObj = new imageLib($targetFile); - $magicianObj -> addWatermark($this->options['config']['image_watermark'], $this->options['config']['image_watermark_position'], $this->options['config']['image_watermark_padding']); - - $magicianObj -> saveImage($targetFile); - } - - $thumbResult = create_img($targetFile, $targetFileThumb, 122, 91); - - if ( $thumbResult!==true) - { - if($thumbResult === false){ - $res['files'][0]->error = trans("Not enough Memory"); - }else{ - $res['files'][0]->error = $thumbResult; - } - } - else - { - if( !$this->options['ftp'] && ! new_thumbnails_creation($targetPath,$targetFile,$_FILES['files']['name'][0],$this->options['config']['current_path'],$this->options['config'])) - { - $res['files'][0]->error = trans("Not enough Memory"); - } - else - { - $imginfo = getimagesize($targetFile); - $srcWidth = $imginfo[0]; - $srcHeight = $imginfo[1]; - - // resize images if set - if ($this->options['config']['image_resizing']) - { - if ($this->options['config']['image_resizing_width'] == 0) // if width not set - { - if ($this->options['config']['image_resizing_height'] == 0) - { - $this->options['config']['image_resizing_width'] = $srcWidth; - $this->options['config']['image_resizing_height'] = $srcHeight; - } - else - { - $this->options['config']['image_resizing_width'] = $this->options['config']['image_resizing_height']*$srcWidth/$srcHeight; - } - } - elseif ($this->options['config']['image_resizing_height'] == 0) // if height not set - { - $this->options['config']['image_resizing_height'] = $this->options['config']['image_resizing_width']*$srcHeight/$srcWidth; - } - - // new dims and create - $srcWidth = $this->options['config']['image_resizing_width']; - $srcHeight = $this->options['config']['image_resizing_height']; - create_img($targetFile, $targetFile, $this->options['config']['image_resizing_width'], $this->options['config']['image_resizing_height'], $this->options['config']['image_resizing_mode']); - } - - //max resizing limit control - $resize = FALSE; - if ($this->options['config']['image_max_width'] != 0 && $srcWidth > $this->options['config']['image_max_width'] && $this->options['config']['image_resizing_override'] === FALSE) - { - $resize = TRUE; - $srcWidth = $this->options['config']['image_max_width']; - - if ($this->options['config']['image_max_height'] == 0) $srcHeight = $this->options['config']['image_max_width']*$srcHeight/$srcWidth; - } - - if ($this->options['config']['image_max_height'] != 0 && $srcHeight > $this->options['config']['image_max_height'] && $this->options['config']['image_resizing_override'] === FALSE){ - $resize = TRUE; - $srcHeight = $this->options['config']['image_max_height']; - - if ($this->options['config']['image_max_width'] == 0) $srcWidth = $this->options['config']['image_max_height']*$srcWidth/$srcHeight; - } - - if ($resize){ create_img($targetFile, $targetFile, $srcWidth, $srcHeight, $this->options['config']['image_max_mode']); } - } - } - } - - if($this->options['ftp']){ - - $this->options['ftp']->put($targetPath. $res['files'][0]->name, $targetFile, FTP_BINARY); - unlink($targetFile); - if ($is_img) - { - $this->options['ftp']->put($targetPathThumb. $res['files'][0]->name, $targetFileThumb, FTP_BINARY); - unlink($targetFileThumb); - } - } - $this->head(); - $this->body(json_encode($res)); - } - - public function delete($print_response = true) { - $file_names = $this->get_file_names_params(); - if (empty($file_names)) { - $file_names = array($this->get_file_name_param()); - } - $response = array(); - foreach ($file_names as $file_name) { - $file_path = $this->get_upload_path($file_name); - $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); - if ($success) { - foreach ($this->options['image_versions'] as $version => $options) { - if (!empty($version)) { - $file = $this->get_upload_path($file_name, $version); - if (is_file($file)) { - unlink($file); - } - } - } - } - $response[$file_name] = $success; - } - return $this->generate_response($response, $print_response); - } - - protected function basename($filepath, $suffix = null) { - $splited = preg_split('/\//', rtrim ($filepath, '/ ')); - return substr(basename('X'.$splited[count($splited)-1], $suffix), 1); - } -} diff --git a/libraries/filemanager-9.12.1/ajax_calls.php b/libraries/filemanager-9.12.1/ajax_calls.php deleted file mode 100644 index 025d5cf..0000000 --- a/libraries/filemanager-9.12.1/ajax_calls.php +++ /dev/null @@ -1,703 +0,0 @@ -send(); - exit; -} -$languages = include 'lang/languages.php'; - -if (isset($_SESSION['RF']['language']) && file_exists('lang/' . basename($_SESSION['RF']['language']) . '.php')) -{ - if(array_key_exists($_SESSION['RF']['language'],$languages)){ - include 'lang/' . basename($_SESSION['RF']['language']) . '.php'; - }else{ - response(trans('Lang_Not_Found').AddErrorLocation())->send(); - exit; - } -} else { - response(trans('Lang_Not_Found').AddErrorLocation())->send(); - exit; -} -$ftp = ftp_con($config); - -if(isset($_GET['action'])) -{ - switch($_GET['action']) - { - case 'new_file_form': - echo trans('Filename') . ':

'; - break; - case 'view': - if(isset($_GET['type'])) - { - $_SESSION['RF']["view_type"] = $_GET['type']; - } - else - { - response(trans('view type number missing').AddErrorLocation())->send(); - exit; - } - break; - case 'filter': - if (isset($_GET['type'])) - { - if (isset($remember_text_filter) && $remember_text_filter) - { - $_SESSION['RF']["filter"] = $_GET['type']; - } - } - else { - response(trans('view type number missing').AddErrorLocation())->send(); - exit; - } - break; - case 'sort': - if (isset($_GET['sort_by'])) - { - $_SESSION['RF']["sort_by"] = $_GET['sort_by']; - } - - if (isset($_GET['descending'])) - { - $_SESSION['RF']["descending"] = $_GET['descending']; - } - break; - case 'image_size': // not used - $pos = strpos($_POST['path'], $upload_dir); - if ($pos !== false) - { - $info = getimagesize(substr_replace($_POST['path'], $current_path, $pos, strlen($upload_dir))); - response($info)->send(); - exit; - } - break; - case 'save_img': - $info = pathinfo($_POST['name']); - - if ( - strpos($_POST['path'], '/') === 0 - || strpos($_POST['path'], '../') !== false - || strpos($_POST['path'], '..\\') !== false - || strpos($_POST['path'], './') === 0 - || (strpos($_POST['url'], 'http://s3.amazonaws.com/feather') !== 0 && strpos($_POST['url'], 'https://s3.amazonaws.com/feather') !== 0) - || $_POST['name'] != fix_filename($_POST['name'], $config) - || ! in_array(strtolower($info['extension']), array( 'jpg', 'jpeg', 'png' )) - ) - { - response(trans('wrong data').AddErrorLocation())->send(); - exit; - } - $image_data = get_file_by_url($_POST['url']); - if ($image_data === false) - { - response(trans('Aviary_No_Save').AddErrorLocation())->send(); - exit; - } - - if (!checkresultingsize(strlen($image_data))) { - response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send(); - exit; - } - if($ftp){ - - $temp = tempnam('/tmp','RF'); - unlink($temp); - $temp .=".".substr(strrchr($_POST['url'],'.'),1); - file_put_contents($temp,$image_data); - - $ftp->put($ftp_base_folder.$upload_dir . $_POST['path'] . $_POST['name'], $temp, FTP_BINARY); - - create_img($temp,$temp,122,91); - $ftp->put($ftp_base_folder.$ftp_thumbs_dir. $_POST['path'] . $_POST['name'], $temp, FTP_BINARY); - - unlink($temp); - }else{ - - file_put_contents($current_path . $_POST['path'] . $_POST['name'],$image_data); - create_img($current_path . $_POST['path'] . $_POST['name'], $thumbs_base_path.$_POST['path'].$_POST['name'], 122, 91); - // TODO something with this function cause its blowing my mind - new_thumbnails_creation( - $current_path.$_POST['path'], - $current_path.$_POST['path'].$_POST['name'], - $_POST['name'], - $current_path, - $config - ); - } - break; - case 'extract': - if ( strpos($_POST['path'], '/') === 0 - || strpos($_POST['path'], '../') !== false - || strpos($_POST['path'], '..\\') !== false - || strpos($_POST['path'], './') === 0) - { - response(trans('wrong path'.AddErrorLocation()))->send(); - exit; - } - - if($ftp){ - $path = $ftp_base_url.$upload_dir . $_POST['path']; - $base_folder = $ftp_base_url.$upload_dir . fix_dirname($_POST['path']) . "/"; - }else{ - $path = $current_path . $_POST['path']; - $base_folder = $current_path . fix_dirname($_POST['path']) . "/"; - } - - $info = pathinfo($path); - - if($ftp){ - $tempDir = tempdir(); - $temp = tempnam($tempDir,'RF'); - unlink($temp); - $temp .=".".$info['extension']; - $handle = fopen($temp, "w"); - fwrite($handle, file_get_contents($path)); - fclose($handle); - $path = $temp; - $base_folder = $tempDir."/"; - } - - $info = pathinfo($path); - - switch ($info['extension']) - { - case "zip": - $zip = new ZipArchive; - if ($zip->open($path) === true) - { - //get total size - $sizeTotalFinal = 0; - for ($i = 0; $i < $zip->numFiles; $i++) - { - $aStat = $zip->statIndex($i); - $sizeTotalFinal += $aStat['size']; - } - if (!checkresultingsize($sizeTotalFinal)) { - response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send(); - exit; - } - - //make all the folders - for ($i = 0; $i < $zip->numFiles; $i++) - { - $OnlyFileName = $zip->getNameIndex($i); - $FullFileName = $zip->statIndex($i); - if (substr($FullFileName['name'], -1, 1) == "/") - { - create_folder($base_folder . $FullFileName['name']); - } - } - //unzip into the folders - for ($i = 0; $i < $zip->numFiles; $i++) - { - $OnlyFileName = $zip->getNameIndex($i); - $FullFileName = $zip->statIndex($i); - - if ( ! (substr($FullFileName['name'], -1, 1) == "/")) - { - $fileinfo = pathinfo($OnlyFileName); - if (in_array(strtolower($fileinfo['extension']), $ext)) - { - copy('zip://' . $path . '#' . $OnlyFileName, $base_folder . $FullFileName['name']); - } - } - } - $zip->close(); - } else { - response(trans('Zip_No_Extract').AddErrorLocation())->send(); - exit; - } - - break; - - case "gz": - // No resulting size pre-control available - $p = new PharData($path); - $p->decompress(); // creates files.tar - - break; - - case "tar": - // No resulting size pre-control available - // unarchive from the tar - $phar = new PharData($path); - $phar->decompressFiles(); - $files = array(); - check_files_extensions_on_phar($phar, $files, '', $ext); - $phar->extractTo($base_folder, $files, true); - - break; - - default: - response(trans('Zip_Invalid').AddErrorLocation())->send(); - exit; - } - - if($ftp){ - unlink($path); - $ftp->putAll($base_folder, "/".$ftp_base_folder . $upload_dir . fix_dirname($_POST['path']), FTP_BINARY); - deleteDir($base_folder); - } - - - break; - case 'media_preview': - if($ftp){ - $preview_file = $ftp_base_url.$upload_dir . $_GET['file']; - }else{ - $preview_file = $current_path . $_GET["file"]; - } - $info = pathinfo($preview_file); - ob_start(); - ?> -
-
- - - -
-
- - - - - - - - - send(); - exit; - - break; - case 'copy_cut': - if ($_POST['sub_action'] != 'copy' && $_POST['sub_action'] != 'cut') - { - response(trans('wrong sub-action').AddErrorLocation())->send(); - exit; - } - - if (strpos($_POST['path'],'../') !== FALSE - || strpos($_POST['path'],'./') !== FALSE - || strpos($_POST['path'],'..\\') !== FALSE - || strpos($_POST['path'],'.\\') !== FALSE ) - { - response(trans('wrong path'.AddErrorLocation()))->send(); - exit; - } - - if (trim($_POST['path']) == '') - { - response(trans('no path').AddErrorLocation())->send(); - exit; - } - - $msg_sub_action = ($_POST['sub_action'] == 'copy' ? trans('Copy') : trans('Cut')); - $path = $current_path . $_POST['path']; - - if (is_dir($path)) - { - // can't copy/cut dirs - if ($copy_cut_dirs === false) - { - response(sprintf(trans('Copy_Cut_Not_Allowed'), $msg_sub_action, trans('Folders')).AddErrorLocation())->send(); - exit; - } - - list($sizeFolderToCopy,$fileNum,$foldersCount) = folder_info($path,false); - // size over limit - if ($copy_cut_max_size !== false && is_int($copy_cut_max_size)) { - if (($copy_cut_max_size * 1024 * 1024) < $sizeFolderToCopy) { - response(sprintf(trans('Copy_Cut_Size_Limit'), $msg_sub_action, $copy_cut_max_size).AddErrorLocation())->send(); - exit; - } - } - - // file count over limit - if ($copy_cut_max_count !== false && is_int($copy_cut_max_count)) - { - if ($copy_cut_max_count < $fileNum) - { - response(sprintf(trans('Copy_Cut_Count_Limit'), $msg_sub_action, $copy_cut_max_count).AddErrorLocation())->send(); - exit; - } - } - - if (!checkresultingsize($sizeFolderToCopy)) { - response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send(); - exit; - } - } else { - // can't copy/cut files - if ($copy_cut_files === false) - { - response(sprintf(trans('Copy_Cut_Not_Allowed'), $msg_sub_action, trans('Files')).AddErrorLocation())->send(); - exit; - } - } - - $_SESSION['RF']['clipboard']['path'] = $_POST['path']; - $_SESSION['RF']['clipboard_action'] = $_POST['sub_action']; - break; - case 'clear_clipboard': - $_SESSION['RF']['clipboard'] = null; - $_SESSION['RF']['clipboard_action'] = null; - break; - case 'chmod': - if($ftp){ - $path = $ftp_base_url . $upload_dir . $_POST['path']; - if ( - ($_POST['folder']==1 && $chmod_dirs === false) - || ($_POST['folder']==0 && $chmod_files === false) - || (is_function_callable("chmod") === false) ) - { - response(sprintf(trans('File_Permission_Not_Allowed'), (is_dir($path) ? trans('Folders') : trans('Files')), 403).AddErrorLocation())->send(); - exit; - } - $info = $_POST['permissions']; - }else{ - $path = $current_path . $_POST['path']; - if ( - (is_dir($path) && $chmod_dirs === false) - || (is_file($path) && $chmod_files === false) - || (is_function_callable("chmod") === false) ) - { - response(sprintf(trans('File_Permission_Not_Allowed'), (is_dir($path) ? trans('Folders') : trans('Files')), 403).AddErrorLocation())->send(); - exit; - } - - $perms = fileperms($path) & 0777; - - $info = '-'; - - // Owner - $info .= (($perms & 0x0100) ? 'r' : '-'); - $info .= (($perms & 0x0080) ? 'w' : '-'); - $info .= (($perms & 0x0040) ? - (($perms & 0x0800) ? 's' : 'x' ) : - (($perms & 0x0800) ? 'S' : '-')); - - // Group - $info .= (($perms & 0x0020) ? 'r' : '-'); - $info .= (($perms & 0x0010) ? 'w' : '-'); - $info .= (($perms & 0x0008) ? - (($perms & 0x0400) ? 's' : 'x' ) : - (($perms & 0x0400) ? 'S' : '-')); - - // World - $info .= (($perms & 0x0004) ? 'r' : '-'); - $info .= (($perms & 0x0002) ? 'w' : '-'); - $info .= (($perms & 0x0001) ? - (($perms & 0x0200) ? 't' : 'x' ) : - (($perms & 0x0200) ? 'T' : '-')); - - } - - - $ret = '
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r  w  x  
'.trans('User').'
'.trans('Group').'
'.trans('All').'
'; - - if ((!$ftp && is_dir($path)) ) - { - $ret .= '
'.trans('File_Permission_Recursive').'

-
    -
  • -
  • -
  • -
  • -
-
'; - } - - $ret .= '
'; - - response($ret)->send(); - exit; - - break; - case 'get_lang': - if ( ! file_exists('lang/languages.php')) - { - response(trans('Lang_Not_Found').AddErrorLocation())->send(); - exit; - } - - $languages = include 'lang/languages.php'; - if ( ! isset($languages) || ! is_array($languages)) - { - response(trans('Lang_Not_Found').AddErrorLocation())->send(); - exit; - } - - $curr = $_SESSION['RF']['language']; - - $ret = ''; - - response($ret)->send(); - exit; - - break; - case 'change_lang': - $choosen_lang = (!empty($_POST['choosen_lang']))? $_POST['choosen_lang']:"en_EN"; - - if(array_key_exists($choosen_lang,$languages)){ - if ( ! file_exists('lang/' . $choosen_lang . '.php')) - { - response(trans('Lang_Not_Found').AddErrorLocation())->send(); - exit; - }else{ - $_SESSION['RF']['language'] = $choosen_lang; - } - } - - break; - case 'cad_preview': - if($ftp){ - $selected_file = $ftp_base_url.$upload_dir . $_GET['file']; - }else{ - $selected_file = $current_path . $_GET['file']; - - if ( ! file_exists($selected_file)) - { - response(trans('File_Not_Found').AddErrorLocation())->send(); - exit; - } - } - if($ftp){ - $url_file = $selected_file; - }else{ - $url_file = $base_url . $upload_dir . str_replace($current_path, '', $_GET["file"]); - } - - $cad_url = urlencode($url_file); - $cad_html = ""; - $ret = $cad_html; - response($ret)->send(); - break; - case 'get_file': // preview or edit - $sub_action = $_GET['sub_action']; - $preview_mode = $_GET["preview_mode"]; - - if ($sub_action != 'preview' && $sub_action != 'edit') - { - response(trans('wrong action').AddErrorLocation())->send(); - exit; - } - - if($ftp){ - $selected_file = ($sub_action == 'preview' ? $ftp_base_url.$upload_dir . $_GET['file'] : $ftp_base_url.$upload_dir . $_POST['path']); - }else{ - $selected_file = ($sub_action == 'preview' ? $current_path . $_GET['file'] : $current_path . $_POST['path']); - - if ( ! file_exists($selected_file)) - { - response(trans('File_Not_Found').AddErrorLocation())->send(); - exit; - } - } - - $info = pathinfo($selected_file); - - if ($preview_mode == 'text') - { - $is_allowed = ($sub_action == 'preview' ? $preview_text_files : $edit_text_files); - $allowed_file_exts = ($sub_action == 'preview' ? $previewable_text_file_exts : $editable_text_file_exts); - }elseif($preview_mode == 'google') { - $is_allowed = $googledoc_enabled; - $allowed_file_exts = $googledoc_file_exts; - } - - if ( ! isset($allowed_file_exts) || ! is_array($allowed_file_exts)) - { - $allowed_file_exts = array(); - } - - if ( ! in_array($info['extension'], $allowed_file_exts) - || ! isset($is_allowed) - || $is_allowed === false - || (!$ftp && ! is_readable($selected_file)) - ) - { - response(sprintf(trans('File_Open_Edit_Not_Allowed'), ($sub_action == 'preview' ? strtolower(trans('Open')) : strtolower(trans('Edit')))).AddErrorLocation())->send(); - exit; - } - if ($sub_action == 'preview') - { - if ($preview_mode == 'text') - { - // get and sanities - $data = file_get_contents($selected_file); - $data = htmlspecialchars(htmlspecialchars_decode($data)); - $ret = ''; - - if ( ! in_array($info['extension'],$previewable_text_file_exts_no_prettify)) - { - $ret .= ''; - $ret .= '
'.$data.'
'; - } else { - $ret .= '
'.$data.'
'; - } - - } - elseif ($preview_mode == 'google') { - if($ftp){ - $url_file = $selected_file; - }else{ - $url_file = $base_url . $upload_dir . str_replace($current_path, '', $_GET["file"]); - } - - $googledoc_url = urlencode($url_file); - $googledoc_html = ""; - $ret = $googledoc_html; - } - } else { - $data = stripslashes(htmlspecialchars(file_get_contents($selected_file))); - $ret = ''; - } - - response($ret)->send(); - exit; - - break; - default: - response(trans('no action passed').AddErrorLocation())->send(); - exit; - } -} else { - response(trans('no action passed').AddErrorLocation())->send(); - exit; -} -?> \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/config/.htaccess b/libraries/filemanager-9.12.1/config/.htaccess deleted file mode 100644 index 14249c5..0000000 --- a/libraries/filemanager-9.12.1/config/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/config/config.php b/libraries/filemanager-9.12.1/config/config.php deleted file mode 100644 index 5c22119..0000000 --- a/libraries/filemanager-9.12.1/config/config.php +++ /dev/null @@ -1,450 +0,0 @@ - -| in tinymce a new parameter added: filemanager_access_key:"myPrivateKey" -| example tinymce config: -| -| tiny init ... -| external_filemanager_path:"../filemanager/", -| filemanager_title:"Filemanager" , -| filemanager_access_key:"myPrivateKey" , -| ... -| -*/ - -define('USE_ACCESS_KEYS', false); // TRUE or FALSE - -/* -|-------------------------------------------------------------------------- -| DON'T COPY THIS VARIABLES IN FOLDERS config.php FILES -|-------------------------------------------------------------------------- -*/ - -define('DEBUG_ERROR_MESSAGE', true); // TRUE or FALSE - -/* -|-------------------------------------------------------------------------- -| Path configuration -|-------------------------------------------------------------------------- -| In this configuration the folder tree is -| root -| |- source <- upload folder -| |- thumbs <- thumbnail folder [must have write permission (755)] -| |- filemanager -| |- js -| | |- tinymce -| | | |- plugins -| | | | |- responsivefilemanager -| | | | | |- plugin.min.js -*/ - -$config = array( - - /* - |-------------------------------------------------------------------------- - | DON'T TOUCH (base url (only domain) of site). - |-------------------------------------------------------------------------- - | - | without final / (DON'T TOUCH) - | - */ - 'base_url' => '', //((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"). "://". @$_SERVER['HTTP_HOST'], - /* - |-------------------------------------------------------------------------- - | path from base_url to base of upload folder - |-------------------------------------------------------------------------- - | - | with start and final / - | - */ - 'upload_dir' => '/upload/filemanager/', - /* - |-------------------------------------------------------------------------- - | relative path from filemanager folder to upload folder - |-------------------------------------------------------------------------- - | - | with final / - | - */ - 'current_path' => '../../upload/filemanager/', - - /* - |-------------------------------------------------------------------------- - | relative path from filemanager folder to thumbs folder - |-------------------------------------------------------------------------- - | - | with final / - | DO NOT put inside upload folder - | - */ - 'thumbs_base_path' => '../../temp/', - - - /* - |-------------------------------------------------------------------------- - | FTP configuration BETA VERSION - |-------------------------------------------------------------------------- - | - | If you want enable ftp use write these parametres otherwise leave empty - | Remember to set base_url properly to point in the ftp server domain and - | upload dir will be ftp_base_folder + upload_dir so without final / - | - */ - 'ftp_host' => false, //put the FTP host - 'ftp_user' => "user", - 'ftp_pass' => "pass", - 'ftp_base_folder' => "base_folder", - 'ftp_base_url' => "http://site to ftp root", - // Directory where place files before to send to FTP with final / - 'ftp_temp_folder' => "../temp/", - /* - |--------------------------------------------------------------------------- - | path from ftp_base_folder to base of thumbs folder with start and final / - |--------------------------------------------------------------------------- - */ - 'ftp_thumbs_dir' => '/thumbs/', - 'ftp_ssl' => false, - 'ftp_port' => 21, - - /* EXAMPLE - 'ftp_host' => "host.com", - 'ftp_user' => "test@host.com", - 'ftp_pass' => "pass.1", - 'ftp_base_folder' => "", - 'ftp_base_url' => "http://host.com/testFTP", - */ - - - /* - |-------------------------------------------------------------------------- - | Access keys - |-------------------------------------------------------------------------- - | - | add access keys eg: array('myPrivateKey', 'someoneElseKey'); - | keys should only containt (a-z A-Z 0-9 \ . _ -) characters - | if you are integrating lets say to a cms for admins, i recommend making keys randomized something like this: - | $username = 'Admin'; - | $salt = 'dsflFWR9u2xQa' (a hard coded string) - | $akey = md5($username.$salt); - | DO NOT use 'key' as access key! - | Keys are CASE SENSITIVE! - | - */ - - 'access_keys' => array( 'c3cb2537d25c0efc9e573d059d79c3b8' ), - - //-------------------------------------------------------------------------------------------------------- - // YOU CAN COPY AND CHANGE THESE VARIABLES INTO FOLDERS config.php FILES TO CUSTOMIZE EACH FOLDER OPTIONS - //-------------------------------------------------------------------------------------------------------- - - /* - |-------------------------------------------------------------------------- - | Maximum size of all files in source folder - |-------------------------------------------------------------------------- - | - | in Megabytes - | - */ - 'MaxSizeTotal' => true, - - /* - |-------------------------------------------------------------------------- - | Maximum upload size - |-------------------------------------------------------------------------- - | - | in Megabytes - | - */ - 'MaxSizeUpload' => 100, - - /* - |-------------------------------------------------------------------------- - | File and Folder permission - |-------------------------------------------------------------------------- - | - */ - 'filePermission' => 0755, - 'folderPermission' => 0777, - - - /* - |-------------------------------------------------------------------------- - | default language file name - |-------------------------------------------------------------------------- - */ - 'default_language' => "pl", - - /* - |-------------------------------------------------------------------------- - | Icon theme - |-------------------------------------------------------------------------- - | - | Default available: ico and ico_dark - | Can be set to custom icon inside filemanager/img - | - */ - 'icon_theme' => "ico", - - - //Show or not total size in filemanager (is possible to greatly increase the calculations) - 'show_total_size' => false, - //Show or not show folder size in list view feature in filemanager (is possible, if there is a large folder, to greatly increase the calculations) - 'show_folder_size' => false, - //Show or not show sorting feature in filemanager - 'show_sorting_bar' => true, - //Show or not show filters button in filemanager - 'show_filter_buttons' => true, - //Show or not language selection feature in filemanager - 'show_language_selection' => true, - //active or deactive the transliteration (mean convert all strange characters in A..Za..z0..9 characters) - 'transliteration' => true, - //convert all spaces on files name and folders name with $replace_with variable - 'convert_spaces' => true, - //convert all spaces on files name and folders name this value - 'replace_with' => "-", - //convert to lowercase the files and folders name - 'lower_case' => true, - - //Add ?484899493349 (time value) to returned images to prevent cache - 'add_time_to_img' => false, - - - //******************************************* - //Images limit and resizing configuration - //******************************************* - - // set maximum pixel width and/or maximum pixel height for all images - // If you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected - // if you don't need a limit set both to 0 - 'image_max_width' => 1920, - 'image_max_height' => 1080, - 'image_max_mode' => 'auto', - /* - # $option: 0 / exact = defined size; - # 1 / portrait = keep aspect set height; - # 2 / landscape = keep aspect set width; - # 3 / auto = auto; - # 4 / crop= resize and crop; - */ - - //Automatic resizing // - // If you set $image_resizing to TRUE the script converts all uploaded images exactly to image_resizing_width x image_resizing_height dimension - // If you set width or height to 0 the script automatically calculates the other dimension - // Is possible that if you upload very big images the script not work to overcome this increase the php configuration of memory and time limit - 'image_resizing' => true, - 'image_resizing_width' => 0, - 'image_resizing_height' => 0, - 'image_resizing_mode' => 'auto', // same as $image_max_mode - 'image_resizing_override' => false, - // If set to TRUE then you can specify bigger images than $image_max_width & height otherwise if image_resizing is - // bigger than $image_max_width or height then it will be converted to those values - - - //****************** - // - // WATERMARK IMAGE - // - //Watermark url or false - 'image_watermark' => false, - # Could be a pre-determined position such as: - # tl = top left, - # t = top (middle), - # tr = top right, - # l = left, - # m = middle, - # r = right, - # bl = bottom left, - # b = bottom (middle), - # br = bottom right - # Or, it could be a co-ordinate position such as: 50x100 - 'image_watermark_position' => 'br', - # padding: If using a pre-determined position you can - # adjust the padding from the edges by passing an amount - # in pixels. If using co-ordinates, this value is ignored. - 'image_watermark_padding' => 0, - - //****************** - // Default layout setting - // - // 0 => boxes - // 1 => detailed list (1 column) - // 2 => columns list (multiple columns depending on the width of the page) - // YOU CAN ALSO PASS THIS PARAMETERS USING SESSION VAR => $_SESSION['RF']["VIEW"]= - // - //****************** - 'default_view' => 0, - - //set if the filename is truncated when overflow first row - 'ellipsis_title_after_first_row' => true, - - //************************* - //Permissions configuration - //****************** - 'delete_files' => true, - 'create_folders' => true, - 'delete_folders' => true, - 'upload_files' => true, - 'rename_files' => true, - 'rename_folders' => true, - 'duplicate_files' => true, - 'copy_cut_files' => true, // for copy/cut files - 'copy_cut_dirs' => true, // for copy/cut directories - 'chmod_files' => true, // change file permissions - 'chmod_dirs' => true, // change folder permissions - 'preview_text_files' => true, // eg.: txt, log etc. - 'edit_text_files' => true, // eg.: txt, log etc. - 'create_text_files' => true, // only create files with exts. defined in $editable_text_file_exts - - // you can preview these type of files if $preview_text_files is true - 'previewable_text_file_exts' => array( "bsh", "c","css", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml","xsl" ), - 'previewable_text_file_exts_no_prettify' => array( 'txt', 'log' ), - - // you can edit these type of files if $edit_text_files is true (only text based files) - // you can create these type of files if $create_text_files is true (only text based files) - // if you want you can add html,css etc. - // but for security reasons it's NOT RECOMMENDED! - 'editable_text_file_exts' => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js' ), - - // Preview with Google Documents - 'googledoc_enabled' => true, - 'googledoc_file_exts' => array( 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx' , 'pdf', 'odt', 'odp', 'ods'), - - // defines size limit for paste in MB / operation - // set 'FALSE' for no limit - 'copy_cut_max_size' => 100, - // defines file count limit for paste / operation - // set 'FALSE' for no limit - 'copy_cut_max_count' => 200, - //IF any of these limits reached, operation won't start and generate warning - - //********************** - //Allowed extensions (lowercase insert) - //********************** - 'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg' ), //Images - 'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm'), //Files - 'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', "flv", "webm" ), //Video - 'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio - 'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives - - /****************** - * AVIARY config - *******************/ - 'aviary_active' => true, - 'aviary_apiKey' => "2444282ef4344e3dacdedc7a78f8877d", - 'aviary_language' => "en", - 'aviary_theme' => "light", - 'aviary_tools' => "all", - 'aviary_maxSize' => "1400", - // Add or modify the Aviary options below as needed - they will be json encoded when added to the configuration so arrays can be utilized as needed - - //The filter and sorter are managed through both javascript and php scripts because if you have a lot of - //file in a folder the javascript script can't sort all or filter all, so the filemanager switch to php script. - //The plugin automatic swich javascript to php when the current folder exceeds the below limit of files number - 'file_number_limit_js' => 500, - - //********************** - // Hidden files and folders - //********************** - // set the names of any folders you want hidden (eg "hidden_folder1", "hidden_folder2" ) Remember all folders with these names will be hidden (you can set any exceptions in config.php files on folders) - 'hidden_folders' => array(), - // set the names of any files you want hidden. Remember these names will be hidden in all folders (eg "this_document.pdf", "that_image.jpg" ) - 'hidden_files' => array( 'config.php' ), - - /******************* - * URL upload - *******************/ - 'url_upload' => true, - - - //************************************ - //Thumbnail for external use creation - //************************************ - - - // New image resized creation with fixed path from filemanager folder after uploading (thumbnails in fixed mode) - // If you want create images resized out of upload folder for use with external script you can choose this method, - // You can create also more than one image at a time just simply add a value in the array - // Remember than the image creation respect the folder hierarchy so if you are inside source/test/test1/ the new image will create at - // path_from_filemanager/test/test1/ - // PS if there isn't write permission in your destination folder you must set it - // - 'fixed_image_creation' => false, //activate or not the creation of one or more image resized with fixed path from filemanager folder - 'fixed_path_from_filemanager' => array( '../test/', '../test1/' ), //fixed path of the image folder from the current position on upload folder - 'fixed_image_creation_name_to_prepend' => array( '', 'test_' ), //name to prepend on filename - 'fixed_image_creation_to_append' => array( '_test', '' ), //name to appendon filename - 'fixed_image_creation_width' => array( 300, 400 ), //width of image (you can leave empty if you set height) - 'fixed_image_creation_height' => array( 200, '' ), //height of image (you can leave empty if you set width) - /* - # $option: 0 / exact = defined size; - # 1 / portrait = keep aspect set height; - # 2 / landscape = keep aspect set width; - # 3 / auto = auto; - # 4 / crop= resize and crop; - */ - 'fixed_image_creation_option' => array( 'crop', 'auto' ), //set the type of the crop - - - // New image resized creation with relative path inside to upload folder after uploading (thumbnails in relative mode) - // With Responsive filemanager you can create automatically resized image inside the upload folder, also more than one at a time - // just simply add a value in the array - // The image creation path is always relative so if i'm inside source/test/test1 and I upload an image, the path start from here - // - 'relative_image_creation' => false, //activate or not the creation of one or more image resized with relative path from upload folder - 'relative_path_from_current_pos' => array( './', './' ), //relative path of the image folder from the current position on upload folder - 'relative_image_creation_name_to_prepend' => array( '', '' ), //name to prepend on filename - 'relative_image_creation_name_to_append' => array( '_thumb', '_thumb1' ), //name to append on filename - 'relative_image_creation_width' => array( 300, 400 ), //width of image (you can leave empty if you set height) - 'relative_image_creation_height' => array( 200, '' ), //height of image (you can leave empty if you set width) - /* - # $option: 0 / exact = defined size; - # 1 / portrait = keep aspect set height; - # 2 / landscape = keep aspect set width; - # 3 / auto = auto; - # 4 / crop= resize and crop; - */ - 'relative_image_creation_option' => array( 'crop', 'crop' ), //set the type of the crop - - - // Remember text filter after close filemanager for future session - 'remember_text_filter' => false, - -); - -return array_merge( - $config, - array( - 'ext'=> array_merge( - $config['ext_img'], - $config['ext_file'], - $config['ext_misc'], - $config['ext_video'], - $config['ext_music'] - ), - // For a list of options see: https://developers.aviary.com/docs/web/setup-guide#constructor-config - 'aviary_defaults_config' => array( - 'apiKey' => $config['aviary_apiKey'], - 'language' => $config['aviary_language'], - 'theme' => $config['aviary_theme'], - 'tools' => $config['aviary_tools'], - 'maxSize' => $config['aviary_maxSize'] - ), - ) -); -?> diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload-noscript.css b/libraries/filemanager-9.12.1/css/jquery.fileupload-noscript.css deleted file mode 100644 index 2409bfb..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload-noscript.css +++ /dev/null @@ -1,22 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload Plugin NoScript CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileinput-button input { - position: static; - opacity: 1; - filter: none; - font-size: inherit !important; - direction: inherit; -} -.fileinput-button span { - display: none; -} diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui-noscript.css b/libraries/filemanager-9.12.1/css/jquery.fileupload-ui-noscript.css deleted file mode 100644 index 30651ac..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui-noscript.css +++ /dev/null @@ -1,17 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload UI Plugin NoScript CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2012, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileinput-button i, -.fileupload-buttonbar .delete, -.fileupload-buttonbar .toggle { - display: none; -} diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui.css b/libraries/filemanager-9.12.1/css/jquery.fileupload-ui.css deleted file mode 100644 index 5bb9e42..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload-ui.css +++ /dev/null @@ -1,53 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload UI Plugin CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2010, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileupload-buttonbar .btn, -.fileupload-buttonbar .toggle { - margin-bottom: 5px; -} - -.fileupload-process { - float: right; - display: none; -} -.fileupload-processing .fileupload-process, -.files .processing .preview { - display: block; - width: 32px; - height: 32px; - background: url("../img/loading.gif") center no-repeat; - background-size: contain; -} -.files audio, -.files video { - max-width: 300px; -} - -@media (max-width: 767px) { - .fileupload-buttonbar .toggle, - .files .toggle, - .files .btn span { - display: none; - } - .files .name { - width: 80px; - word-wrap: break-word; - } - .files audio, - .files video { - max-width: 80px; - } - .files img, - .files canvas { - max-width: 100%; - } -} diff --git a/libraries/filemanager-9.12.1/css/jquery.fileupload.css b/libraries/filemanager-9.12.1/css/jquery.fileupload.css deleted file mode 100644 index 8ae3b09..0000000 --- a/libraries/filemanager-9.12.1/css/jquery.fileupload.css +++ /dev/null @@ -1,37 +0,0 @@ -@charset "UTF-8"; -/* - * jQuery File Upload Plugin CSS - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -.fileinput-button { - position: relative; - overflow: hidden; - display: inline-block; -} -.fileinput-button input { - position: absolute; - top: 0; - right: 0; - margin: 0; - opacity: 0; - -ms-filter: 'alpha(opacity=0)'; - font-size: 200px !important; - direction: ltr; - cursor: pointer; -} - -/* Fixes for IE < 8 */ -@media screen\9 { - .fileinput-button input { - filter: alpha(opacity=0); - font-size: 100%; - height: 100%; - } -} diff --git a/libraries/filemanager-9.12.1/css/rtl-style.css b/libraries/filemanager-9.12.1/css/rtl-style.css deleted file mode 100644 index eb67f80..0000000 Binary files a/libraries/filemanager-9.12.1/css/rtl-style.css and /dev/null differ diff --git a/libraries/filemanager-9.12.1/css/style.css b/libraries/filemanager-9.12.1/css/style.css deleted file mode 100644 index b4a7bd9..0000000 --- a/libraries/filemanager-9.12.1/css/style.css +++ /dev/null @@ -1,40 +0,0 @@ -/*! - * Bootstrap v2.3.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:active,a:hover{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{max-width:100%;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button,input[type=button],input[type=checkbox],input[type=radio],input[type=reset],input[type=submit],label,select{cursor:pointer}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}@media print{*{text-shadow:none!important;color:#000!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:focus,a:hover{color:#005580;text-decoration:underline}.img-rounded{border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.1)}.img-circle{border-radius:500px}.row{margin-left:-20px}.row:after,.row:before{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:2.12765957%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.12765957%}.row-fluid .span12{width:100%}.row-fluid .span11{width:91.4893617%}.row-fluid .span10{width:82.9787234%}.row-fluid .span9{width:74.46808511%}.row-fluid .span8{width:65.95744681%}.row-fluid .span7{width:57.44680851%}.row-fluid .span6{width:48.93617021%}.row-fluid .span5{width:40.42553191%}.row-fluid .span4{width:31.91489362%}.row-fluid .span3{width:23.40425532%}.row-fluid .span2{width:14.89361702%}.row-fluid .span1{width:6.38297872%}.row-fluid .offset12{margin-left:104.25531915%}.row-fluid .offset12:first-child{margin-left:102.12765957%}.row-fluid .offset11{margin-left:95.74468085%}.row-fluid .offset11:first-child{margin-left:93.61702128%}.row-fluid .offset10{margin-left:87.23404255%}.row-fluid .offset10:first-child{margin-left:85.10638298%}.row-fluid .offset9{margin-left:78.72340426%}.row-fluid .offset9:first-child{margin-left:76.59574468%}.row-fluid .offset8{margin-left:70.21276596%}.row-fluid .offset8:first-child{margin-left:68.08510638%}.row-fluid .offset7{margin-left:61.70212766%}.row-fluid .offset7:first-child{margin-left:59.57446809%}.row-fluid .offset6{margin-left:53.19148936%}.row-fluid .offset6:first-child{margin-left:51.06382979%}.row-fluid .offset5{margin-left:44.68085106%}.row-fluid .offset5:first-child{margin-left:42.55319149%}.row-fluid .offset4{margin-left:36.17021277%}.row-fluid .offset4:first-child{margin-left:34.04255319%}.row-fluid .offset3{margin-left:27.65957447%}.row-fluid .offset3:first-child{margin-left:25.53191489%}.row-fluid .offset2{margin-left:19.14893617%}.row-fluid .offset2:first-child{margin-left:17.0212766%}.row-fluid .offset1{margin-left:10.63829787%}.row-fluid .offset1:first-child{margin-left:8.5106383%}.row-fluid [class*=span].hide,[class*=span].hide{display:none}.row-fluid [class*=span].pull-right,[class*=span].pull-right{float:right}.container{margin-right:auto;margin-left:auto}.container:after,.container:before{display:table;content:"";line-height:0}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px}.container-fluid:after,.container-fluid:before{display:table;content:"";line-height:0}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:700}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:focus,a.muted:hover{color:grey}.text-warning{color:#c09853}a.text-warning:focus,a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:focus,a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:focus,a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:focus,a.text-success:hover{color:#356635}.text-left{text-align:left}.text-right{text-align:right}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small,h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ol,ul{padding:0;margin:0 0 10px 25px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}li{line-height:20px}ol.inline,ol.unstyled,ul.inline,ul.unstyled{margin-left:0;list-style:none}ol.inline>li,ul.inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-bottom:20px}dd,dt{line-height:20px}dt{font-weight:700}dd{margin-left:10px}.dl-horizontal:after,.dl-horizontal:before{display:table;content:"";line-height:0}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:"\2014 \00A0"}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:""}blockquote.pull-right small:after{content:"\00A0 \2014"}blockquote:after,blockquote:before,q:after,q:before{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,Courier New,monospace;font-size:12px;color:#333;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:20px}button,input,select,textarea{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;border-radius:4px;vertical-align:middle}.uneditable-input,input,textarea{width:206px}textarea{height:auto}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],textarea{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border .2s linear,box-shadow .2s linear}.uneditable-input:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,textarea:focus{border-color:rgba(82,168,236,.8);outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=button],input[type=checkbox],input[type=file],input[type=image],input[type=radio],input[type=reset],input[type=submit]{width:auto}input[type=file],select{height:30px;line-height:30px}select{width:220px;border:1px solid #ccc;background-color:#fff}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;background-color:#fcfcfc;border-color:#ccc;box-shadow:inset 0 1px 2px rgba(0,0,0,.025);cursor:not-allowed}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.checkbox,.radio{min-height:20px;padding-left:20px}.checkbox input[type=checkbox],.radio input[type=radio]{float:left;margin-left:-20px}.controls>.checkbox:first-child,.controls>.radio:first-child{padding-top:5px}.checkbox.inline,.radio.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.checkbox.inline+.checkbox.inline,.radio.inline+.radio.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.uneditable-input[class*=span],input[class*=span],select[class*=span],textarea[class*=span]{float:none;margin-left:0}.input-append .uneditable-input[class*=span],.input-append input[class*=span],.input-prepend .uneditable-input[class*=span],.input-prepend input[class*=span],.row-fluid .input-append [class*=span],.row-fluid .input-prepend [class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span]{display:inline-block}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:926px}.uneditable-input.span11,input.span11,textarea.span11{width:846px}.uneditable-input.span10,input.span10,textarea.span10{width:766px}.uneditable-input.span9,input.span9,textarea.span9{width:686px}.uneditable-input.span8,input.span8,textarea.span8{width:606px}.uneditable-input.span7,input.span7,textarea.span7{width:526px}.uneditable-input.span6,input.span6,textarea.span6{width:446px}.uneditable-input.span5,input.span5,textarea.span5{width:366px}.uneditable-input.span4,input.span4,textarea.span4{width:286px}.uneditable-input.span3,input.span3,textarea.span3{width:206px}.uneditable-input.span2,input.span2,textarea.span2{width:126px}.uneditable-input.span1,input.span1,textarea.span1{width:46px}.controls-row:after,.controls-row:before{display:table;content:"";line-height:0}.controls-row:after{clear:both}.controls-row [class*=span],.row-fluid .controls-row [class*=span]{float:left}.controls-row .checkbox[class*=span],.controls-row .radio[class*=span]{padding-top:5px}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=checkbox][disabled],input[type=checkbox][readonly],input[type=radio][disabled],input[type=radio][readonly]{background-color:transparent}.control-group.warning .checkbox,.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-append .add-on,.control-group.warning .input-prepend .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .checkbox,.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-append .add-on,.control-group.error .input-prepend .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .checkbox,.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-append .add-on,.control-group.success .input-prepend .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .checkbox,.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-append .add-on,.control-group.info .input-prepend .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5}.form-actions:after,.form-actions:before{display:table;content:"";line-height:0}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{padding-left:5px}.help-inline,.input-append,.input-prepend{display:inline-block;vertical-align:middle}.input-append,.input-prepend{margin-bottom:10px;font-size:0;white-space:nowrap}.input-append .dropdown-menu,.input-append .popover,.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .dropdown-menu,.input-prepend .popover,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{font-size:14px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{position:relative;margin-bottom:0;vertical-align:top;border-radius:0 4px 4px 0}.input-append .uneditable-input:focus,.input-append input:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-prepend input:focus,.input-prepend select:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-append .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .add-on,.input-prepend .btn,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .add-on:first-child,.input-prepend .btn:first-child{border-radius:4px 0 0 4px}.input-append .uneditable-input+.btn-group .btn:last-child,.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child{border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{border-radius:0 4px 4px 0}.input-prepend.input-append .uneditable-input,.input-prepend.input-append input,.input-prepend.input-append select{border-radius:0}.input-prepend.input-append .uneditable-input+.btn-group .btn,.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn{border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-left:14px;margin-bottom:0;border-radius:15px}.form-search .input-append .search-query{border-radius:14px 0 0 14px}.form-search .input-append .btn,.form-search .input-prepend .search-query{border-radius:0 14px 14px 0}.form-search .input-prepend .btn{border-radius:14px 0 0 14px}.form-horizontal .help-inline,.form-horizontal .input-append,.form-horizontal .input-prepend,.form-horizontal .uneditable-input,.form-horizontal input,.form-horizontal select,.form-horizontal textarea,.form-inline .help-inline,.form-inline .input-append,.form-inline .input-prepend,.form-inline .uneditable-input,.form-inline input,.form-inline select,.form-inline textarea,.form-search .help-inline,.form-search .input-append,.form-search .input-prepend,.form-search .uneditable-input,.form-search input,.form-search select,.form-search textarea{display:inline-block;margin-bottom:0;vertical-align:middle}.form-horizontal .hide,.form-inline .hide,.form-search .hide{display:none}.form-inline .btn-group,.form-inline label,.form-search .btn-group,.form-search label{display:inline-block}.form-inline .input-append,.form-inline .input-prepend,.form-search .input-append,.form-search .input-prepend{margin-bottom:0}.form-inline .checkbox,.form-inline .radio,.form-search .checkbox,.form-search .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.form-search .checkbox input[type=checkbox],.form-search .radio input[type=radio]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px}.form-horizontal .control-group:after,.form-horizontal .control-group:before{display:table;content:"";line-height:0}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{margin-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal .input-append+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table td,.table th{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child td,.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child td,.table thead:first-child tr:first-child th{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed td,.table-condensed th{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;border-left:0;border-radius:4px}.table-bordered td,.table-bordered th{border-left:1px solid #ddd}.table-bordered caption+tbody tr:first-child td,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+thead tr:first-child th,.table-bordered tbody:first-child tr:first-child td,.table-bordered tbody:first-child tr:first-child th,.table-bordered thead:first-child tr:first-child th{border-top:0}.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child,.table-bordered thead:first-child tr:first-child>th:first-child{border-top-left-radius:4px}.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child,.table-bordered thead:first-child tr:first-child>th:last-child{border-top-right-radius:4px}.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child,.table-bordered thead:last-child tr:last-child>th:first-child{border-bottom-left-radius:4px}.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child,.table-bordered thead:last-child tr:last-child>th:last-child{border-bottom-right-radius:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{border-bottom-left-radius:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{border-bottom-right-radius:0}.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered caption+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child{border-top-left-radius:4px}.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered caption+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child{border-top-right-radius:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}.row-fluid table td[class*=span],.row-fluid table th[class*=span],table td[class*=span],table th[class*=span]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class*=" icon-"],[class^=icon-]{display:inline-block;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat;margin-top:1px}.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>li>a:focus>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-submenu:focus>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.icon-white,.nav-list>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-]{background-image:url(../img/glyphicons-halflings-white.png)}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{background-position:-216px -120px;width:16px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px;width:16px}.icon-folder-open{background-position:-408px -120px;width:16px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropdown,.dropup{position:relative}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover,.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{text-decoration:none;color:#fff;background-color:#0081c2;background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff0088cc",endColorstr="#ff0077b3",GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:default}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px}.typeahead{z-index:1051;margin-top:2px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;border-radius:6px}.well-small{padding:9px;border-radius:3px}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.btn{display:inline-block;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px hsla(0,0%,100%,.75);background-color:#f5f5f5;background-image:linear-gradient(180deg,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;border-bottom-color:#b3b3b3;border-radius:4px;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:linear-gradient(180deg,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:linear-gradient(180deg,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:linear-gradient(180deg,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:linear-gradient(180deg,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:focus,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:linear-gradient(180deg,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:focus,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:linear-gradient(180deg,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:focus,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#08c;border-radius:0}.btn-link:focus,.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;font-size:0;vertical-align:middle;white-space:nowrap}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn{margin-left:5px}.btn-group>.btn{position:relative;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{border-top-right-radius:4px;border-bottom-right-radius:4px}.btn-group>.btn.large:first-child{margin-left:0;border-top-left-radius:6px;border-bottom-left-radius:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{border-top-right-radius:6px;border-bottom-right-radius:6px}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;box-shadow:inset 1px 0 0 hsla(0,0%,100%,.125),inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px}.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px;border-left-width:5px;border-right-width:5px;border-top-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-danger .caret,.btn-info .caret,.btn-inverse .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;border-radius:0}.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px}.btn-group-vertical>.btn:first-child{border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 hsla(0,0%,100%,.5);background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success h4{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-info,.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-left:0;margin-bottom:20px;list-style:none}.nav>li>a{display:block}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0}.nav-list .nav-header,.nav-list>li>a{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:focus,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.2);background-color:#08c}.nav-list [class*=" icon-"],.nav-list [class^=icon-]{margin-right:2px}.nav-list .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-pills:after,.nav-pills:before,.nav-tabs:after,.nav-tabs:before{display:table;content:"";line-height:0}.nav-pills:after,.nav-tabs:after{clear:both}.nav-pills>li,.nav-tabs>li{float:left}.nav-pills>li>a,.nav-tabs>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:focus,.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:focus,.nav-tabs>.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:focus,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{border-top-right-radius:4px;border-top-left-radius:4px}.nav-tabs.nav-stacked>li:last-child>a{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.nav-tabs.nav-stacked>li>a:focus,.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{border-radius:6px}.nav .dropdown-toggle .caret{border-top-color:#08c;border-bottom-color:#08c;margin-top:6px}.nav .dropdown-toggle:focus .caret,.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:focus,.nav>.dropdown.active>a:hover{cursor:pointer}.nav-pills .open .dropdown-toggle,.nav-tabs .open .dropdown-toggle,.nav>li.dropdown.open.active>a:focus,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open.active .caret,.nav li.dropdown.open .caret,.nav li.dropdown.open a:focus .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:focus,.tabs-stacked .open>a:hover{border-color:#999}.tabbable:after,.tabbable:before{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-left>.nav-tabs,.tabs-right>.nav-tabs{border-bottom:0}.pill-content>.pill-pane,.tab-content>.tab-pane{display:none}.pill-content>.active,.tab-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:focus,.tabs-below>.nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:focus,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:focus,.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:focus,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:focus,.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:focus,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent}.nav>.disabled>a{color:#999}.nav>.disabled>a:focus,.nav>.disabled>a:hover{text-decoration:none;background-color:transparent;cursor:default}.navbar{overflow:visible;margin-bottom:20px}.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:linear-gradient(180deg,#fff,#f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffffff",endColorstr="#fff2f2f2",GradientType=0);border:1px solid #d4d4d4;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.065)}.navbar-inner:after,.navbar-inner:before{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{float:left;display:block;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:focus,.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:focus,.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-append .btn,.navbar .input-append .btn-group,.navbar .input-prepend .btn,.navbar .input-prepend .btn-group{margin-top:0}.navbar-form{margin-bottom:0}.navbar-form:after,.navbar-form:before{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form .checkbox,.navbar-form .radio,.navbar-form input,.navbar-form select{margin-top:5px}.navbar-form .btn,.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type=checkbox],.navbar-form input[type=image],.navbar-form input[type=radio]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{border-radius:0}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;border-radius:0}.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333;text-decoration:none}.navbar .nav>.active>a,.navbar .nav>.active>a:focus,.navbar .nav>.active>a:hover{color:#555;text-decoration:none;background-color:#e5e5e5;box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#ededed;background-image:linear-gradient(180deg,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.075)}.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar:active,.navbar .btn-navbar:focus,.navbar .btn-navbar:hover,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;border-radius:1px;box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{content:"";display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:9px}.navbar .nav>li>.dropdown-menu:after{content:"";display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:10px}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);border-bottom:0;bottom:-7px;top:auto}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #fff;border-bottom:0;bottom:-6px;top:auto}.navbar .nav li.dropdown>a:focus .caret,.navbar .nav li.dropdown>a:hover .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle,.navbar .nav li.dropdown.open>.dropdown-toggle{background-color:#e5e5e5;color:#555}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav>li>.dropdown-menu.pull-right,.navbar .pull-right>li>.dropdown-menu{left:auto;right:0}.navbar .nav>li>.dropdown-menu.pull-right:before,.navbar .pull-right>li>.dropdown-menu:before{left:auto;right:12px}.navbar .nav>li>.dropdown-menu.pull-right:after,.navbar .pull-right>li>.dropdown-menu:after{left:auto;right:13px}.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu,.navbar .pull-right>li>.dropdown-menu .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:linear-gradient(180deg,#222,#111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff222222",endColorstr="#ff111111",GradientType=0);border-color:#252525}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:focus,.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .brand,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#fff}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:focus,.navbar-inverse .nav .active>a:hover{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:focus,.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-left-color:#111;border-right-color:#222}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle{background-color:#111;color:#fff}.navbar-inverse .nav li.dropdown>a:focus .caret,.navbar-inverse .nav li.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 hsla(0,0%,100%,.15);transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query.focused,.navbar-inverse .navbar-search .search-query:focus{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;box-shadow:0 0 3px rgba(0,0,0,.15);outline:0}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:linear-gradient(180deg,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block;text-shadow:0 1px 0 #fff}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;margin-left:0;margin-bottom:0;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>.active>a,.pagination ul>.active>span,.pagination ul>li>a:focus,.pagination ul>li>a:hover{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>a,.pagination ul>.disabled>a:focus,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>span{color:#999;background-color:transparent;cursor:default}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-mini ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>a,.pagination-small ul>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-mini ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>a,.pagination-small ul>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;list-style:none;text-align:center}.pager:after,.pager:before{display:table;content:"";line-height:0}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#999;background-color:#fff;cursor:default}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);border-radius:6px;box-shadow:0 3px 7px rgba(0,0,0,.3);background-clip:padding-box;outline:0}.modal.fade{transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px}.modal-footer,.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;border-radius:0 0 6px 6px;box-shadow:inset 0 1px 0 #fff}.modal-footer:after,.modal-footer:before{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.thumbnails{margin-left:-20px;list-style:none}.thumbnails:after,.thumbnails:before{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.055);transition:all .2s ease-in-out}a.thumbnail:focus,a.thumbnail:hover{border-color:#08c;box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.badge,.label{display:inline-block;padding:2px 4px;font-size:11.84px;font-weight:700;line-height:14px;color:#fff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#999}.label{border-radius:3px}.badge{padding-left:9px;padding-right:9px;border-radius:9px}.badge:empty,.label:empty{display:none}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.badge-important,.label-important{background-color:#b94a48}.badge-important[href],.label-important[href]{background-color:#953b39}.badge-warning,.label-warning{background-color:#f89406}.badge-warning[href],.label-warning[href]{background-color:#c67605}.badge-success,.label-success{background-color:#468847}.badge-success[href],.label-success[href]{background-color:#356635}.badge-info,.label-info{background-color:#3a87ad}.badge-info[href],.label-info[href]{background-color:#2d6987}.badge-inverse,.label-inverse{background-color:#333}.badge-inverse[href],.label-inverse[href]{background-color:#1a1a1a}.btn .badge,.btn .label{position:relative;top:-1px}.btn-mini .badge,.btn-mini .label{top:0}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:linear-gradient(180deg,#f5f5f5,#f9f9f9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fff5f5f5",endColorstr="#fff9f9f9",GradientType=0);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border-radius:4px}.progress,.progress .bar{background-repeat:repeat-x}.progress .bar{width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-image:linear-gradient(180deg,#149bdf,#0480be);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff149bdf",endColorstr="#ff0480be",GradientType=0);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-sizing:border-box;transition:width .6s ease}.progress .bar+.bar{box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:linear-gradient(180deg,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffee5f5b",endColorstr="#ffc43c35",GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:linear-gradient(180deg,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff62c462",endColorstr="#ff57a957",GradientType=0)}.progress-striped .bar-success,.progress-success.progress-striped .bar{background-color:#62c462;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:linear-gradient(180deg,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff5bc0de",endColorstr="#ff339bb9",GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:linear-gradient(180deg,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fffbb450",endColorstr="#fff89406",GradientType=0)}.progress-striped .bar-warning,.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{overflow:hidden;width:100%;position:relative}.carousel-inner>.item{display:none;position:relative;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{left:auto;right:15px}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:hsla(0,0%,100%,.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{color:#fff;line-height:20px}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} -/*! - * Bootstrap Responsive v2.3.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.hidden-desktop,.visible-phone,.visible-tablet{display:none!important}.visible-desktop{display:inherit!important}@media (min-width:768px) and (max-width:839px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media (max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media (min-width:1200px){.row{margin-left:-30px}.row:after,.row:before{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:30px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:2.56410256%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.56410256%}.row-fluid .span12{width:100%}.row-fluid .span11{width:91.45299145%}.row-fluid .span10{width:82.90598291%}.row-fluid .span9{width:74.35897436%}.row-fluid .span8{width:65.81196581%}.row-fluid .span7{width:57.26495726%}.row-fluid .span6{width:48.71794872%}.row-fluid .span5{width:40.17094017%}.row-fluid .span4{width:31.62393162%}.row-fluid .span3{width:23.07692308%}.row-fluid .span2{width:14.52991453%}.row-fluid .span1{width:5.98290598%}.row-fluid .offset12{margin-left:105.12820513%}.row-fluid .offset12:first-child{margin-left:102.56410256%}.row-fluid .offset11{margin-left:96.58119658%}.row-fluid .offset11:first-child{margin-left:94.01709402%}.row-fluid .offset10{margin-left:88.03418803%}.row-fluid .offset10:first-child{margin-left:85.47008547%}.row-fluid .offset9{margin-left:79.48717949%}.row-fluid .offset9:first-child{margin-left:76.92307692%}.row-fluid .offset8{margin-left:70.94017094%}.row-fluid .offset8:first-child{margin-left:68.37606838%}.row-fluid .offset7{margin-left:62.39316239%}.row-fluid .offset7:first-child{margin-left:59.82905983%}.row-fluid .offset6{margin-left:53.84615385%}.row-fluid .offset6:first-child{margin-left:51.28205128%}.row-fluid .offset5{margin-left:45.2991453%}.row-fluid .offset5:first-child{margin-left:42.73504274%}.row-fluid .offset4{margin-left:36.75213675%}.row-fluid .offset4:first-child{margin-left:34.18803419%}.row-fluid .offset3{margin-left:28.20512821%}.row-fluid .offset3:first-child{margin-left:25.64102564%}.row-fluid .offset2{margin-left:19.65811966%}.row-fluid .offset2:first-child{margin-left:17.09401709%}.row-fluid .offset1{margin-left:11.11111111%}.row-fluid .offset1:first-child{margin-left:8.54700855%}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:30px}.uneditable-input.span12,input.span12,textarea.span12{width:1156px}.uneditable-input.span11,input.span11,textarea.span11{width:1056px}.uneditable-input.span10,input.span10,textarea.span10{width:956px}.uneditable-input.span9,input.span9,textarea.span9{width:856px}.uneditable-input.span8,input.span8,textarea.span8{width:756px}.uneditable-input.span7,input.span7,textarea.span7{width:656px}.uneditable-input.span6,input.span6,textarea.span6{width:556px}.uneditable-input.span5,input.span5,textarea.span5{width:456px}.uneditable-input.span4,input.span4,textarea.span4{width:356px}.uneditable-input.span3,input.span3,textarea.span3{width:256px}.uneditable-input.span2,input.span2,textarea.span2{width:156px}.uneditable-input.span1,input.span1,textarea.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media (min-width:768px) and (max-width:839px){.row{margin-left:-20px}.row:after,.row:before{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:2.76243094%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.76243094%}.row-fluid .span12{width:100%}.row-fluid .span11{width:91.43646409%}.row-fluid .span10{width:82.87292818%}.row-fluid .span9{width:74.30939227%}.row-fluid .span8{width:65.74585635%}.row-fluid .span7{width:57.18232044%}.row-fluid .span6{width:48.61878453%}.row-fluid .span5{width:40.05524862%}.row-fluid .span4{width:31.49171271%}.row-fluid .span3{width:22.9281768%}.row-fluid .span2{width:14.36464088%}.row-fluid .span1{width:5.80110497%}.row-fluid .offset12{margin-left:105.52486188%}.row-fluid .offset12:first-child{margin-left:102.76243094%}.row-fluid .offset11{margin-left:96.96132597%}.row-fluid .offset11:first-child{margin-left:94.19889503%}.row-fluid .offset10{margin-left:88.39779006%}.row-fluid .offset10:first-child{margin-left:85.63535912%}.row-fluid .offset9{margin-left:79.83425414%}.row-fluid .offset9:first-child{margin-left:77.0718232%}.row-fluid .offset8{margin-left:71.27071823%}.row-fluid .offset8:first-child{margin-left:68.50828729%}.row-fluid .offset7{margin-left:62.70718232%}.row-fluid .offset7:first-child{margin-left:59.94475138%}.row-fluid .offset6{margin-left:54.14364641%}.row-fluid .offset6:first-child{margin-left:51.38121547%}.row-fluid .offset5{margin-left:45.5801105%}.row-fluid .offset5:first-child{margin-left:42.81767956%}.row-fluid .offset4{margin-left:37.01657459%}.row-fluid .offset4:first-child{margin-left:34.25414365%}.row-fluid .offset3{margin-left:28.45303867%}.row-fluid .offset3:first-child{margin-left:25.69060773%}.row-fluid .offset2{margin-left:19.88950276%}.row-fluid .offset2:first-child{margin-left:17.12707182%}.row-fluid .offset1{margin-left:11.32596685%}.row-fluid .offset1:first-child{margin-left:8.56353591%}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:710px}.uneditable-input.span11,input.span11,textarea.span11{width:648px}.uneditable-input.span10,input.span10,textarea.span10{width:586px}.uneditable-input.span9,input.span9,textarea.span9{width:524px}.uneditable-input.span8,input.span8,textarea.span8{width:462px}.uneditable-input.span7,input.span7,textarea.span7{width:400px}.uneditable-input.span6,input.span6,textarea.span6{width:338px}.uneditable-input.span5,input.span5,textarea.span5{width:276px}.uneditable-input.span4,input.span4,textarea.span4{width:214px}.uneditable-input.span3,input.span3,textarea.span3{width:152px}.uneditable-input.span2,input.span2,textarea.span2{width:90px}.uneditable-input.span1,input.span1,textarea.span1{width:28px}}@media (max-width:767px){body{padding-left:20px;padding-right:20px}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{margin-left:-20px;margin-right:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;clear:none;width:auto;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}.row-fluid [class*=span],.uneditable-input[class*=span],[class*=span]{float:none;display:block;width:100%;margin-left:0;box-sizing:border-box}.row-fluid .span12,.span12{width:100%;box-sizing:border-box}.row-fluid [class*=offset]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,.uneditable-input,input[class*=span],select[class*=span],textarea[class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box}.input-append input,.input-append input[class*=span],.input-prepend input,.input-prepend input[class*=span]{display:inline-block;width:auto}.controls-row [class*=span]+[class*=span]{margin-left:0}.modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media (max-width:480px){.nav-collapse{-webkit-transform:translateZ(0)}.page-header h1 small{display:block;line-height:20px}input[type=checkbox],input[type=radio]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-left:10px;padding-right:10px}.media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;left:10px;right:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media (max-width:839px){body{padding-top:0}.navbar-fixed-bottom,.navbar-fixed-top{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .dropdown-menu a,.nav-collapse .nav>li>a{padding:9px 15px;font-weight:700;color:#777;border-radius:3px}.nav-collapse .btn{padding:4px 10px;font-weight:400;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .dropdown-menu a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .nav>li>a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .dropdown-menu a,.navbar-inverse .nav-collapse .nav>li>a{color:#999}.navbar-inverse .nav-collapse .dropdown-menu a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .nav>li>a:hover{background-color:#111}.nav-collapse.in .btn-group{margin-top:5px;padding:0}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:none;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;border-radius:0;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu .divider,.nav-collapse .dropdown-menu:after,.nav-collapse .dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after,.nav-collapse .nav>li>.dropdown-menu:before{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-left:10px;padding-right:10px}}@media (min-width:839px + 1){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}.lightbox{background-color:transparent;text-align:center;line-height:0;z-index:1050;position:relative;top:70px;outline:0}.lightbox .hide{display:none}.lightbox .in{display:block}.lightbox-content{display:inline-block;padding:10px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);border-radius:6px;box-shadow:0 3px 7px rgba(0,0,0,.3);background-clip:padding-box}.lightbox-content .lightbox-caption{padding:2%;position:absolute;left:11px;right:12px;bottom:11px;background:#000;background:rgba(0,0,0,.6);color:#fff;text-align:center;text-shadow:0 -1px 0 #000;text-shadow:0 -1px 0 rgba(0,0,0,.3);font-size:14px;line-height:18px}.lightbox-header .close{color:#fff;margin-right:-16px;margin-top:-16px;font-size:2em;opacity:.8;filter:alpha(opacity=80)}.lightbox-header .close :hover{opacity:.4;filter:alpha(opacity=40)} -/*! - * Bootstrap Modal - * - * Copyright Jordan Schroter - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - */.modal-open{overflow:hidden}.modal-open.page-overflow .modal-scrollable,.modal-open.page-overflow .page-container,.modal-open.page-overflow .page-container .navbar-fixed-bottom,.modal-open.page-overflow .page-container .navbar-fixed-top{overflow-y:scroll}@media (max-width:979px){.modal-open.page-overflow .page-container .navbar-fixed-bottom,.modal-open.page-overflow .page-container .navbar-fixed-top{overflow-y:visible}}.modal-scrollable{position:fixed;top:0;bottom:0;left:0;right:0;overflow:auto}.modal{outline:none;position:absolute;margin-top:0;top:50%;overflow:visible}.modal.fade{top:-100%;-webkit-transition:opacity .3s linear,top .3s ease-out,bottom .3s ease-out,margin-top .3s ease-out;transition:opacity .3s linear,top .3s ease-out,bottom .3s ease-out,margin-top .3s ease-out}.modal.fade.in{top:50%}.modal-body{max-height:none;overflow:visible}.modal.modal-absolute{position:absolute;z-index:950}.modal .loading-mask{position:absolute;top:0;bottom:0;left:0;right:0;background:#fff;border-radius:6px}.modal-backdrop.modal-absolute{position:absolute;z-index:940}.modal-backdrop,.modal-backdrop.fade.in{opacity:.7;filter:alpha(opacity=70);background:#fff}.modal.container{width:940px;margin-left:-470px}.modal-overflow.modal{top:1%}.modal-overflow.modal.fade{top:-100%}.modal-overflow.modal.fade.in{top:1%}.modal-overflow .modal-body{overflow:auto;-webkit-overflow-scrolling:touch}@media (min-width:1200px){.modal.container{width:1170px;margin-left:-585px}}@media (max-width:979px){.modal,.modal.container,.modal.modal-overflow{top:1%;right:1%;left:1%;bottom:auto;width:auto!important;height:auto!important;margin:0!important;padding:0!important}.modal.container.fade.in,.modal.fade.in,.modal.modal-overflow.fade.in{top:1%;bottom:auto}.modal-body,.modal-overflow .modal-body{position:static;margin:0;height:auto!important;max-height:none!important;overflow:visible!important}.modal-footer,.modal-overflow .modal-footer{position:static}}.loading-spinner{position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes shake{0%,to{-webkit-transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px)}}@keyframes shake{0%,to{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}.shake{-webkit-animation-name:shake;animation-name:shake} - -/*! - * jQuery contextMenu - Plugin for simple contextMenu handling - * - * Version: 1.6.6 - * - * Authors: Rodney Rehm, Addy Osmani (patches for FF) - * Web: http://medialize.github.com/jQuery-contextMenu/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * GPL v3 http://opensource.org/licenses/GPL-3.0 - * - */.context-menu-list{margin:0;padding:0;min-width:120px;max-width:250px;display:inline-block;position:absolute;list-style-type:none;border:1px solid #ddd;background:#eee;-ms-box-shadow:0 2px 5px rgba(0,0,0,.5);-o-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.context-menu-item{padding:2px 2px 2px 24px;background-color:#eee;position:relative;-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.hover{cursor:pointer;background-color:#39f}.context-menu-item.disabled{color:#666}.context-menu-submenu:after{content:">";color:#666;position:absolute;top:0;right:3px;z-index:1}.context-menu-item.icon{min-height:18px;background-repeat:no-repeat;background-position:4px 2px}.context-menu-item.icon-edit{background-image:url(images/page_white_edit.png)}.context-menu-item.icon-cut{background-image:url(images/cut.png)}.context-menu-item.icon-copy{background-image:url(images/page_white_copy.png)}.context-menu-item.icon-paste{background-image:url(images/page_white_paste.png)}.context-menu-item.icon-delete{background-image:url(images/page_white_delete.png)}.context-menu-item.icon-add{background-image:url(images/page_white_add.png)}.context-menu-item.icon-quit{background-image:url(images/door.png)}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type=checkbox],.context-menu-input>label>input[type=radio]{margin-left:-17px}.context-menu-input>label>span{margin-left:5px}.context-menu-input>label,.context-menu-input>label>input[type=text],.context-menu-input>label>select,.context-menu-input>label>textarea{display:block;width:100%;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:100px}.context-menu-item>.context-menu-list{display:none;right:-5px;top:5px}.context-menu-item.hover>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}*,:after,:before{box-sizing:border-box}body,html{font-family:Open Sans,sans-serif;font-size:100%;padding:0;margin:0;height:100%}body{padding-top:32px;font-weight:200;background:#ececec;overflow:-moz-scrollbars-vertical}.btn{background-image:none!important;text-shadow:none!important;border-color:none!important;box-shadow:none!important}.btn:focus{outline:none}.btn-inverse{background-image:none!important;background:#333}pre.no-prettify,pre.prettyprint{height:300px;margin:0!important;width:100%!important;overflow:scroll;border-radius:0!important;margin-top:4px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{border-radius:0!important}[class*=" rficon-"],[class^=rficon-]{display:inline-block;width:16px;height:16px;margin-top:1px;*margin-right:.3em;line-height:16px;vertical-align:text-top;background-position:0 0;background-repeat:no-repeat}.rficon-clipboard-apply{background-image:url(../img/clipboard_apply.png)}.rficon-clipboard-clear{background-image:url(../img/clipboard_clear.png)}.rficon-upload{background-image:url(../img/upload.png)}.btn{border-radius:0}.container-fluid{padding-right:0!important;margin-top:10px!important}.img-precontainer{width:100%;background:#fff}.img-container,.img-precontainer{margin:auto;text-align:center;border:none}.img-container{height:91px;width:122px;padding:0;overflow:hidden;display:table-cell;vertical-align:middle;background-image:url(../img/trans.jpg);background-size:13px}.img-container img{max-width:122px;max-height:91px}ul.breadcrumb{margin-bottom:5px;border-radius:0;padding-bottom:4px;padding-top:6px;background:#f0f0f0;box-shadow:0 1px 4px rgba(0,0,0,.065);border-bottom:1px solid #bbb}ul.breadcrumb .pull-left i{margin-top:2px}.alert{padding:8px 35px 8px 14px;margin-bottom:2px;border:1px solid #aaa;color:#666;font-weight:200;font-size:13px;border-radius:0;background:#fff}.img-container *,.img-container-mini *{vertical-align:middle}#help{display:none}.text-center{text-align:center}iframe{overflow:auto;-webkit-overflow-scrolling:touch}.uploader{position:fixed;top:6px;left:6px;right:6px;bottom:6px;z-index:9999;background:#eee;border:1px solid #ccc;display:none;box-shadow:0 0 10px 0 rgba(1,1,1,.5)}.uploader .flex{padding:10px;position:relative}.uploader .container1,.uploader .container2,.uploader .flex{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.uploader .upload-help{font-size:11px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff;text-align:center}.uploader .upload-tabbable{padding:2px;height:100%;overflow:hidden}.uploader .upload-tabbable .nav{margin:0}.uploader .upload-tabbable .nav li a{font-size:13px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.uploader .upload-tabbable #urlUpload{padding:5px 10px}.uploader .upload-tabbable .tab-content{padding:5px;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #ddd;background:#fff;-ms-flex-positive:2;flex-grow:2;position:relative}.uploader .upload-tabbable .tab-content .tab-pane{position:absolute;top:0;bottom:0;left:0;right:0;padding:5px}.uploader .upload-tabbable .tab-content form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.uploader .upload-tabbable .tab-content form #filesTable{-ms-flex-positive:2;flex-grow:2;overflow-y:scroll;background:#fff;font-size:.95em}.uploader .upload-tabbable .tab-content form #filesTable .progress{margin-bottom:4px}input#filter-input{margin:0;width:84px;height:26px;vertical-align:bottom;margin-bottom:2px;border-radius:0;font-size:12px;font-weight:200;position:relative;left:1px}.qq-uploader .span9{margin-left:14px!important;width:690px!important}.space10{clear:both;height:10px}h4{font-size:12px;margin:0;text-align:center;padding:0;margin-top:6px;line-height:18px}h3,h4{font-weight:200}h3{font-size:14px}.boxes{border:1px solid #ccc;word-wrap:break-word;background:#fff;box-shadow:1px 1px 2px 0 rgba(0,0,0,.2);min-height:115px;text-align:center}.container-fluid{padding:0 10px!important}body .avpw .avpw_primary_button,body .avpw .avpw_primary_button:active,body .avpw .avpw_primary_button:link,body .avpw .avpw_primary_button:visited{color:#fff;background:#999;border:none}body .avpw .avpw_primary_button:hover{border:none;background:#666}.download-form{margin-bottom:25px}.grid li i{margin-left:2px;margin-right:2px;z-index:0}.box,.boxx{text-align:center;word-wrap:break-word;vertical-align:top;text-align:left;position:relative;z-index:100;padding:4px}.box,.box .btn,.boxx{border:none;box-shadow:none}.box .btn{width:100%;background:none;z-index:200}.navbar{margin-bottom:0;border-bottom:1px solid #bbb}.navbar .navbar-inner{border:none;min-height:35px;border-radius:0;padding-bottom:2px;margin:0;padding-right:8px;padding-left:8px}.navbar .navbar-inner .container-fluid{margin:0;margin-top:0!important;padding:0}.navbar .navbar-inner .container-fluid .brand{display:none}.navbar .navbar-inner .container-fluid .filters span{margin-top:0;font-size:13px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}ul.sorting{position:absolute;left:-25px;top:20px;min-width:0;background:#eee}ul.sorting li a:hover{background:#aaa}.btn-group .dropdown-toggle.sorting-btn{position:relative;top:-5px;font-size:13px}.btn-group .dropdown-toggle.sorting-btn,.btn-group .dropdown-toggle.sorting-btn:hover{background:none;border:none;box-shadow:none;-webkit-box-shadow:none}ul.sorting.dropdown-menu>li>a{font-size:12px;text-shadow:none}ul.sorting.dropdown-menu>li>a.descending{background-image:url(../img/down.png);background-repeat:no-repeat;background-position:6px 8px}ul.sorting.dropdown-menu>li>a.ascending{background-image:url(../img/up.png);background-repeat:no-repeat;background-position:6px 8px}.sorter-container{margin-top:5px;margin-bottom:0;border-radius:0;padding-bottom:4px;padding-top:6px;box-shadow:0 1px 4px rgba(0,0,0,.065);background-color:#f5f5f5;position:relative;border-bottom:1px solid #bbb;height:24px}.sorter-container a.sorter{color:#000}.sorter-container a.descending{padding-left:9px;background-image:url(../img/down.png);background-repeat:no-repeat;background-position:0 3px}.sorter-container a.ascending{padding-left:9px;background-image:url(../img/up.png);background-repeat:no-repeat;background-position:0 4px}.sorter-container .file-date,.sorter-container .file-extension,.sorter-container .file-name,.sorter-container .file-operations,.sorter-container .file-size,.sorter-container .img-dimension{display:block;position:absolute;top:0;z-index:100;box-shadow:none;text-align:left;font-size:13px;margin-top:1px;color:#999}.sorter-container .file-operations{width:110px;right:0}.sorter-container .img-dimension{width:65px;right:123px}.sorter-container .file-date{width:70px;right:188px}.sorter-container .file-size{width:55px;right:258px}.sorter-container .file-extension{width:40px;right:313px}.sorter-container .file-name{width:50px;left:52px}.file-date,.file-extension,.file-name,.file-operations,.file-size,.img-dimension{font-size:12px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff;display:none}.view-controller{text-align:left}.view-controller .btn-group>.btn:first-child,.view-controller .btn-group>.btn:last-child{border-radius:0}.navbar .filters .btn{margin-bottom:2px;padding:2px 8px;margin-top:5px}.filters .types{text-align:right}.fileupload-buttonbar{margin-bottom:10px}.fileupload-buttonbar .progress{margin:0}@media (max-width:780px){#view2{display:none}}@media (min-width:840px){.mobile-inline-visible{display:none!important}}@media (max-width:839px){body{padding-top:0}.mobile-inline-visible{display:inline!important}.filters .types{text-align:left}.navbar .navbar-inner .container-fluid .brand{display:block}.navbar .navbar-inner{padding-bottom:4px}.filters div.span2.half,.filters div.span3.half,.filters div.span4.half{float:left;width:auto;margin-right:10px}.filters div.entire{float:none;width:100%;clear:both}.container-fluid{margin:0!important;padding:0}#qLbar{height:50px!important}}@media (min-width:400px) and (max-width:839px){.filters .row-fluid .half{width:48.61878453038674%;*width:48.56559304102504%;float:left}}.tooltip.in{opacity:1;filter:alpha(opacity=1)}.tooltip,.tooltip.in{z-index:10000;font-weight:700}.grid{padding:0;margin:0 auto;list-style:none;-webkit-overflow-scrolling:touch}.ui-draggable-helper{z-index:10}.grid li{display:inline-block;width:124px;border:none;margin:4px;margin-bottom:8px;padding:0;vertical-align:top}.grid figure{margin:0;position:relative;display:block;width:122px;margin:auto}.grid figure:hover{background:#e0e0e0!important}.list-view1.grid li,.list-view1.grid li figure{width:100%}.grid figcaption{text-align:center;padding:2px;padding-top:8px;color:#fff;height:30px;width:122px;margin-left:0;margin-right:0;position:absolute;top:auto;bottom:0;box-shadow:inset 0 0 8px 0 rgba(41,41,41,.5)}.grid figcaption a{margin:0;padding:3px}.grid figcaption h3{margin:0;padding:0;color:#fff}.grid h4{text-align:center;color:#000;padding:0;margin-bottom:4px;margin-top:4px}.grid figure .box{box-sizing:content-box;cursor:pointer}.list-view0.grid figure .box,.list-view1.grid figure .box,.list-view2.grid figure .box{max-width:100%;display:block;position:relative;overflow:hidden;z-index:1}.list-view0.grid figure .box h4.ellipsis,.list-view1.grid figure .box h4.ellipsis,.list-view2.grid figure .box h4.ellipsis{height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-view0.grid figure .box h4,.list-view0.grid figure .box h4 a,.list-view1.grid figure .box h4,.list-view1.grid figure .box h4 a,.list-view2.grid figure .box h4,.list-view2.grid figure .box h4 a{z-index:1}.no-touch .list-view0 figure .box{z-index:1;transition:transform .3s}.list-view0.grid .ui-state-highlight .img-precontainer{background:grey!important}.list-view0.grid .ui-state-highlight .img-precontainer .img-container{background:repeating-linear-gradient(45deg,transparent,transparent 5px,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.3) 10px);border:none;overflow:hidden}.list-view0.grid .ui-state-hover .img-precontainer .img-container{background:#666}.list-view1.grid .ui-state-highlight:nth-child(odd) figure,.list-view2.grid .ui-state-highlight:nth-child(odd) figure{background:#ddd!important;border-bottom-color:#444!important}.list-view1.grid .ui-state-highlight:nth-child(2n) figure,.list-view2.grid .ui-state-highlight:nth-child(2n) figure{background:#ccc!important;border-bottom-color:#aaa!important}.list-view1.grid .ui-state-highlight.ui-state-hover figure,.list-view2.grid .ui-state-highlight.ui-state-hover figure{background-color:#aaa!important}.no-touch .list-view0 figure.cs-hover .box,.no-touch .list-view0 figure:hover .box{box-shadow:0 0 4px 0 rgba(1,1,1,.5);transform:translateY(-26px)}.list-view0 figure.cs-hover .box.no-effect,.list-view0 figure:hover .box.no-effect,.no-effect{box-shadow:none;transform:none}.list-view0 .img-precontainer-mini{display:none;background:none}a,a:hover{color:#000;text-decoration:none}.back-directory .box,.back-directory .img-precontainer,.back-directory .img-precontainer-mini{background:none}form{margin:0;padding:0}.google-iframe,.viewer-iframe{width:100%;height:500px;border:none}.modal{width:60%;margin-left:-30%}.modal-body{padding:6px}.modal-body form,.modal-body input,.modal-body textarea{margin:0;border-radius:0}.modal-body .text-center{padding-bottom:6px}.modal-footer{padding:7px}.modal-header{padding:7px 8px!important}.modal-header h3{font-weight:300;font-size:20px}.list-view1.sorter-container{display:block}.list-view0.sorter-container,.list-view2.sorter-container{display:none}.list-view0.grid .img-precontainer .img-container img{max-width:122px!important;max-height:91px!important}.list-view0.grid .img-precontainer .img-container img.icon{width:122px;margin-top:0}.list-view0.grid .img-precontainer .filetype{position:absolute;top:0;width:122px;text-align:center;color:#fff;font-size:13px;line-height:22px}.list-view0.grid .cover{background:hsla(0,0%,100%,.25);width:122px;position:absolute;top:22px;right:0;height:69px}.list-view0.grid .box{background:#fff}.list-view0.grid .directory{background:#ddd}.list-view0.grid figure.back-directory .directory{background:#bbb}.list-view0.grid figcaption{background:#fff}.list-view0.grid .selected figure{border:none;height:126px}.list-view0.grid .selected figure .box,.list-view0.grid .selected figure>a,.list-view0.grid .selected figure figcaption{display:none}.list-view1.grid li,.list-view2.grid li{margin:0}.list-view1.grid li.back figure.back-directory,.list-view2.grid li.back figure.back-directory{height:34px}.list-view1.grid li:nth-child(odd) figure,.list-view2.grid li:nth-child(odd) figure{background:#f9f9f9}.list-view1.grid li:nth-child(odd) figure.directory,.list-view2.grid li:nth-child(odd) figure.directory{background:#eaeaea}.list-view1.grid li figure,.list-view2.grid li figure{border-bottom:1px solid #aaa;background:#fff}.list-view1.grid li figure.back-directory,.list-view2.grid li figure.back-directory{background:#bbb}.list-view1.grid li figure.back-directory .box,.list-view2.grid li figure.back-directory .box{background:none}.list-view1.grid li figure.directory,.list-view2.grid li figure.directory{background:#efefef}.list-view1.grid li figure.directory box,.list-view2.grid li figure.directory box{padding:0;min-height:10px}.list-view1.grid li figure .box,.list-view2.grid li figure .box{margin-left:50px;transition:none}.list-view1.grid li figure .box h4,.list-view2.grid li figure .box h4{padding-top:1px;font-size:13px;text-align:left}.list-view1.grid .img-precontainer-mini,.list-view2.grid .img-precontainer-mini{display:block;position:absolute;width:45px;height:34px;overflow:hidden;text-align:center}.list-view1.grid .img-precontainer-mini img,.list-view2.grid .img-precontainer-mini img{max-width:45px}.list-view1.grid .img-precontainer-mini .filetype,.list-view2.grid .img-precontainer-mini .filetype{position:absolute;top:1px;text-align:center;left:0;padding:1px 2px;font-size:13px;line-height:32px;width:45px;height:32px;color:#fff;background:#333}.list-view1.grid .cover,.list-view2.grid .cover{display:none}.list-view1.grid .img-container-mini,.list-view2.grid .img-container-mini{width:45px;height:34px;border:none;overflow:hidden;display:table-cell;text-align:center;vertical-align:middle;margin:auto}.list-view1.grid .img-precontainer-mini.original-thumb,.list-view2.grid .img-precontainer-mini.original-thumb{padding:0}.list-view1.grid .img-precontainer-mini.original-thumb img,.list-view2.grid .img-precontainer-mini.original-thumb img{width:auto;max-height:32px}.list-view1.grid .img-precontainer-mini.original-thumb img.original,.list-view2.grid .img-precontainer-mini.original-thumb img.original{width:auto;height:auto}.list-view1.grid .img-precontainer,.list-view2.grid .img-precontainer{display:none}.list-view1.grid figcaption,.list-view2.grid figcaption{background:none;width:120px;position:absolute;right:0;top:0;z-index:1;bottom:0;box-shadow:none;text-align:right}.list-view1.grid .selected figure,.list-view2.grid .selected figure{background:#ccc!important}.list-view1.grid .file-date,.list-view1.grid .file-extension,.list-view1.grid .file-size,.list-view1.grid .img-dimension{overflow:hidden;display:block;position:absolute;top:0;z-index:1;box-shadow:none;text-align:left;margin-top:7px}.list-view1.grid .img-dimension{width:65px;right:120px}.list-view1.grid .file-date{width:70px;right:185px}.list-view1.grid .file-size{width:55px;right:255px}.list-view1.grid .file-extension{width:40px;right:310px}.list-view1.grid figure .box{padding-right:352px}.list-view2.grid figure .box{padding-right:115px}@media (max-width:610px){.list-view1.grid figure .box{padding-right:312px}.list-view1.grid figure .file-extension,.sorter-container .file-extension{display:none}}@media (max-width:565px){.list-view1.grid figure .box{padding-right:257px}.list-view1.grid figure .file-size,.sorter-container .file-size{display:none}}@media (max-width:495px){.list-view1.grid figure .box{padding-right:187px}.list-view1.grid figure .file-date,.sorter-container .file-date{display:none}}@media (max-width:430px){.list-view1.grid figure .box{padding-right:115px}.list-view1.grid figure .img-dimension,.sorter-container .img-dimension{display:none}.breadcrumb{margin-left:0;margin-right:0}}.list-view1.grid .img-precontainer-mini .filetype.pdf,.list-view2.grid .img-precontainer-mini .filetype.pdf{background:#cb0011}.list-view1.grid .img-precontainer-mini .filetype.css,.list-view2.grid .img-precontainer-mini .filetype.css{background:#d10698}.list-view1.grid .img-precontainer-mini .filetype.ai,.list-view2.grid .img-precontainer-mini .filetype.ai{background:#d6772f}.list-view1.grid .img-precontainer-mini .filetype.psd,.list-view2.grid .img-precontainer-mini .filetype.psd{background:#0960a4}.list-view1.grid .img-precontainer-mini .filetype.html,.list-view1.grid .img-precontainer-mini .filetype.xhtml,.list-view2.grid .img-precontainer-mini .filetype.html,.list-view2.grid .img-precontainer-mini .filetype.xhtml{background:#035bc4}.list-view1.grid .img-precontainer-mini .filetype.fla,.list-view1.grid .img-precontainer-mini .filetype.flv,.list-view2.grid .img-precontainer-mini .filetype.fla,.list-view2.grid .img-precontainer-mini .filetype.flv{background:#cf302e}.list-view1.grid .img-precontainer-mini .filetype.ppt,.list-view1.grid .img-precontainer-mini .filetype.pptx,.list-view2.grid .img-precontainer-mini .filetype.ppt,.list-view2.grid .img-precontainer-mini .filetype.pptx{background:#da5b00}.list-view1.grid .img-precontainer-mini .filetype.css,.list-view1.grid .img-precontainer-mini .filetype.xls,.list-view1.grid .img-precontainer-mini .filetype.xlsx,.list-view2.grid .img-precontainer-mini .filetype.css,.list-view2.grid .img-precontainer-mini .filetype.xls,.list-view2.grid .img-precontainer-mini .filetype.xlsx{background:#1a712c}.list-view1.grid .img-precontainer-mini .filetype.doc,.list-view1.grid .img-precontainer-mini .filetype.docx,.list-view1.grid .img-precontainer-mini .filetype.rts,.list-view2.grid .img-precontainer-mini .filetype.doc,.list-view2.grid .img-precontainer-mini .filetype.docx,.list-view2.grid .img-precontainer-mini .filetype.rts{background:#002093}.list-view1.grid .img-precontainer-mini .filetype.gzip,.list-view1.grid .img-precontainer-mini .filetype.rar,.list-view1.grid .img-precontainer-mini .filetype.zip,.list-view2.grid .img-precontainer-mini .filetype.gzip,.list-view2.grid .img-precontainer-mini .filetype.rar,.list-view2.grid .img-precontainer-mini .filetype.zip{background:#fe9221}.list-view1.grid .img-precontainer-mini .filetype.avi,.list-view1.grid .img-precontainer-mini .filetype.mov,.list-view1.grid .img-precontainer-mini .filetype.mp4,.list-view1.grid .img-precontainer-mini .filetype.mpeg,.list-view1.grid .img-precontainer-mini .filetype.mpg,.list-view1.grid .img-precontainer-mini .filetype.webm,.list-view1.grid .img-precontainer-mini .filetype.wma,.list-view2.grid .img-precontainer-mini .filetype.avi,.list-view2.grid .img-precontainer-mini .filetype.mov,.list-view2.grid .img-precontainer-mini .filetype.mp4,.list-view2.grid .img-precontainer-mini .filetype.mpeg,.list-view2.grid .img-precontainer-mini .filetype.mpg,.list-view2.grid .img-precontainer-mini .filetype.webm,.list-view2.grid .img-precontainer-mini .filetype.wma{background:#31231e}.list-view1.grid .img-precontainer-mini .filetype.ac3,.list-view1.grid .img-precontainer-mini .filetype.aiff,.list-view1.grid .img-precontainer-mini .filetype.m4a,.list-view1.grid .img-precontainer-mini .filetype.mid,.list-view1.grid .img-precontainer-mini .filetype.mp3,.list-view1.grid .img-precontainer-mini .filetype.ogg,.list-view1.grid .img-precontainer-mini .filetype.wav,.list-view2.grid .img-precontainer-mini .filetype.ac3,.list-view2.grid .img-precontainer-mini .filetype.aiff,.list-view2.grid .img-precontainer-mini .filetype.m4a,.list-view2.grid .img-precontainer-mini .filetype.mid,.list-view2.grid .img-precontainer-mini .filetype.mp3,.list-view2.grid .img-precontainer-mini .filetype.ogg,.list-view2.grid .img-precontainer-mini .filetype.wav{background:#9f008b}.list-view1.grid .img-precontainer-mini .filetype.odb,.list-view1.grid .img-precontainer-mini .filetype.odf,.list-view1.grid .img-precontainer-mini .filetype.odg,.list-view1.grid .img-precontainer-mini .filetype.odp,.list-view1.grid .img-precontainer-mini .filetype.ods,.list-view1.grid .img-precontainer-mini .filetype.odt,.list-view1.grid .img-precontainer-mini .filetype.otg,.list-view1.grid .img-precontainer-mini .filetype.otp,.list-view1.grid .img-precontainer-mini .filetype.ots,.list-view1.grid .img-precontainer-mini .filetype.ott,.list-view2.grid .img-precontainer-mini .filetype.odb,.list-view2.grid .img-precontainer-mini .filetype.odf,.list-view2.grid .img-precontainer-mini .filetype.odg,.list-view2.grid .img-precontainer-mini .filetype.odp,.list-view2.grid .img-precontainer-mini .filetype.ods,.list-view2.grid .img-precontainer-mini .filetype.odt,.list-view2.grid .img-precontainer-mini .filetype.otg,.list-view2.grid .img-precontainer-mini .filetype.otp,.list-view2.grid .img-precontainer-mini .filetype.ots,.list-view2.grid .img-precontainer-mini .filetype.ott{background:#367bbe}.list-view1.grid .img-precontainer-mini .filetype.bmp,.list-view1.grid .img-precontainer-mini .filetype.gif,.list-view1.grid .img-precontainer-mini .filetype.jpeg,.list-view1.grid .img-precontainer-mini .filetype.jpg,.list-view1.grid .img-precontainer-mini .filetype.png,.list-view1.grid .img-precontainer-mini .filetype.svg,.list-view1.grid .img-precontainer-mini .filetype.tiff,.list-view2.grid .img-precontainer-mini .filetype.bmp,.list-view2.grid .img-precontainer-mini .filetype.gif,.list-view2.grid .img-precontainer-mini .filetype.jpeg,.list-view2.grid .img-precontainer-mini .filetype.jpg,.list-view2.grid .img-precontainer-mini .filetype.png,.list-view2.grid .img-precontainer-mini .filetype.svg,.list-view2.grid .img-precontainer-mini .filetype.tiff{background:#cfa554}.list-view1.grid .img-precontainer-mini .filetype.dmg,.list-view1.grid .img-precontainer-mini .filetype.iso,.list-view1.grid .img-precontainer-mini .filetype.log,.list-view1.grid .img-precontainer-mini .filetype.sql,.list-view1.grid .img-precontainer-mini .filetype.txt,.list-view1.grid .img-precontainer-mini .filetype.xml,.list-view2.grid .img-precontainer-mini .filetype.dmg,.list-view2.grid .img-precontainer-mini .filetype.iso,.list-view2.grid .img-precontainer-mini .filetype.log,.list-view2.grid .img-precontainer-mini .filetype.sql,.list-view2.grid .img-precontainer-mini .filetype.txt,.list-view2.grid .img-precontainer-mini .filetype.xml{background:#cacaca}.list-view1.grid .img-precontainer-mini .filetype.accdb,.list-view1.grid .img-precontainer-mini .filetype.ade,.list-view1.grid .img-precontainer-mini .filetype.adp,.list-view1.grid .img-precontainer-mini .filetype.mdb,.list-view2.grid .img-precontainer-mini .filetype.accdb,.list-view2.grid .img-precontainer-mini .filetype.ade,.list-view2.grid .img-precontainer-mini .filetype.adp,.list-view2.grid .img-precontainer-mini .filetype.mdb{background:#b61c19}.lightbox-content{overflow:hidden;padding:0;background:none;box-shadow:none;border-radius:0;border:0}.context-menu-list{font-family:Open Sans,sans-serif;width:200px;background:#fff;font-size:12px;margin:0;padding:5px}.context-menu-item{background-color:#fff;position:relative;height:auto;word-wrap:break-word;-webkit-user-select:none;-moz-user-select:0;-ms-user-select:none;user-select:none;padding:5px 5px 5px 30px}.context-menu-item:last-child{border:none}.context-menu-separator{padding-bottom:0;border-bottom:1px solid #ddd}.context-menu-item.hover{background-color:#ddd}.context-menu-input.hover,.context-menu-item.disabled.hover{cursor:default;background-color:#eee}.context-menu-item.icon{vertical-align:middle;background-position:4px 5px;width:auto;display:list-item}.context-menu-item.icon-edit{background-image:url(../img/file_edit.png)}.context-menu-item.icon-cut{background-image:url(../img/cut.png)}.context-menu-item.icon-copy{background-image:url(../img/copy.png)}.context-menu-item.icon-rename{background-image:url(../img/rename.png)}.context-menu-item.icon-preview{background-image:url(../img/preview.png)}.context-menu-item.icon-dimension{background-image:url(../img/dimension.png)}.context-menu-item.icon-date{background-image:url(../img/date.png)}.context-menu-item.icon-label{background-image:url(../img/label.png)}.context-menu-item.icon-size{background-image:url(../img/size.png)}.context-menu-item.icon-download{background-image:url(../img/download.png)}.context-menu-item.icon-paste{background-image:url(../img/page_white_paste.png)}.context-menu-item.icon-clipboard-apply{background-image:url(../img/clipboard_apply.png)}.context-menu-item.icon-delete{background-image:url(../img/page_white_delete.png)}.context-menu-item.icon-add{background-image:url(../img/page_white_add.png)}.context-menu-item.icon-quit{background-image:url(../img/door.png)}.context-menu-item.icon-info{background-image:url(../img/info.png)}.context-menu-item.icon-extract{background-image:url(../img/zip.png)}.context-menu-item.icon-url{background-image:url(../img/url.png)}.context-menu-item.icon-edit_img{background-image:url(../img/edit_img.png)}.context-menu-item.icon-duplicate{background-image:url(../img/duplicate.png)}.context-menu-item.icon-key{background-image:url(../img/key.png)}.dropzone{border:1px solid rgba(0,0,0,.03);min-height:360px;border-radius:3px;background:rgba(0,0,0,.03);padding:23px}.dropzone .dz-success *{cursor:pointer!important}.dropzone .dz-default.dz-message{opacity:1;-ms-filter:none;filter:none;transition:opacity .3s ease-in-out;background-repeat:no-repeat;background-position:0 0;position:absolute;width:428px;height:123px;margin-left:-214px;margin-top:-61.5px;top:50%;left:50%}.btn-primary,.btn-primary.disabled,.btn-primary[disabled]{background-color:#333}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover{background-color:#222} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/dialog.php b/libraries/filemanager-9.12.1/dialog.php deleted file mode 100644 index 425af26..0000000 --- a/libraries/filemanager-9.12.1/dialog.php +++ /dev/null @@ -1,1204 +0,0 @@ -isDir($ftp_base_folder.$upload_dir.$rfm_subfolder.$subdir)) || (!$ftp && !file_exists($current_path.$rfm_subfolder.$subdir))) -{ - $subdir = ''; - $rfm_subfolder = ""; -} - - -$cur_dir = $upload_dir.$rfm_subfolder.$subdir; -$cur_path = $current_path.$rfm_subfolder.$subdir; -$thumbs_path = $thumbs_base_path.$rfm_subfolder; -$parent = $rfm_subfolder.$subdir; - -if($ftp){ - $cur_dir = $ftp_base_folder.$cur_dir; - $cur_path = str_replace(array('/..','..'),'',$cur_dir); - $thumbs_path = str_replace(array('/..','..'),'',$ftp_base_folder.$ftp_thumbs_dir.$rfm_subfolder); - $parent = $ftp_base_folder.$parent; -} - -if(!$ftp){ - $cycle = TRUE; - $max_cycles = 50; - $i = 0; - while($cycle && $i < $max_cycles){ - $i++; - if ($parent=="./") $parent=""; - - if (file_exists($current_path.$parent."config.php")) - { - $configTemp = include $current_path.$parent.'config.php'; - $config = $config + $configTemp; - extract($config, EXTR_OVERWRITE); - $cycle = FALSE; - } - - if ($parent == "") $cycle = FALSE; - else $parent = fix_dirname($parent)."/"; - } - - if (!is_dir($thumbs_path.$subdir)) - { - create_folder(FALSE, $thumbs_path.$subdir); - } -} -if (isset($_GET['callback'])) -{ - $callback = strip_tags($_GET['callback']); -} -else $callback=0; -if (isset($_GET['popup'])) -{ - $popup = strip_tags($_GET['popup']); -} else $popup=0; -//Sanitize popup -$popup=!!$popup; - -if (isset($_GET['crossdomain'])) -{ - $crossdomain = strip_tags($_GET['crossdomain']); -} else $crossdomain=0; - -//Sanitize crossdomain -$crossdomain=!!$crossdomain; - -//view type -if(!isset($_SESSION['RF']["view_type"])) -{ - $view = $default_view; - $_SESSION['RF']["view_type"] = $view; -} - -if (isset($_GET['view'])) -{ - $view = fix_get_params($_GET['view']); - $_SESSION['RF']["view_type"] = $view; -} - -$view = $_SESSION['RF']["view_type"]; - -//filter -$filter = ""; -if(isset($_SESSION['RF']["filter"])) -{ - $filter = $_SESSION['RF']["filter"]; -} - -if(isset($_GET["filter"])) -{ - $filter = fix_get_params($_GET["filter"]); -} - -if (!isset($_SESSION['RF']['sort_by'])) -{ - $_SESSION['RF']['sort_by'] = 'name'; -} - -if (isset($_GET["sort_by"])) -{ - $sort_by = $_SESSION['RF']['sort_by'] = fix_get_params($_GET["sort_by"]); -} else $sort_by = $_SESSION['RF']['sort_by']; - - -if (!isset($_SESSION['RF']['descending'])) -{ - $_SESSION['RF']['descending'] = TRUE; -} - -if (isset($_GET["descending"])) -{ - $descending = $_SESSION['RF']['descending'] = fix_get_params($_GET["descending"])==1; -} else { - $descending = $_SESSION['RF']['descending']; -} - -$boolarray = Array(false => 'false', true => 'true'); - -$return_relative_url = isset($_GET['relative_url']) && $_GET['relative_url'] == "1" ? true : false; - -if (!isset($_GET['type'])){ - $_GET['type'] = 0; -} - -$extensions=null; -if (isset($_GET['extensions'])){ - $extensions = json_decode(urldecode($_GET['extensions'])); - if($extensions){ - $ext = $extensions; - $show_filter_buttons = false; - } -} - -if (isset($_GET['editor'])) -{ - $editor = strip_tags($_GET['editor']); -} else { - if($_GET['type']==0){ - $editor=false; - } else { - $editor='tinymce'; - } -} - -if (!isset($_GET['field_id'])) $_GET['field_id'] = ''; - -$field_id = isset($_GET['field_id']) ? fix_get_params($_GET['field_id']) : ''; -$type_param = fix_get_params($_GET['type']); - -if ($type_param==1) $apply = 'apply_img'; -elseif($type_param==2) $apply = 'apply_link'; -elseif($type_param==0 && $_GET['field_id']=='') $apply = 'apply_none'; -elseif($type_param==3) $apply = 'apply_video'; -else $apply = 'apply'; - -$get_params = array( - 'editor' => $editor, - 'type' => $type_param, - 'lang' => $lang, - 'popup' => $popup, - 'crossdomain' => $crossdomain, - 'extensions' => ($extensions) ? urlencode(json_encode($extensions)) : null , - 'field_id' => $field_id, - 'relative_url' => $return_relative_url, - 'akey' => (isset($_GET['akey']) && $_GET['akey'] != '' ? $_GET['akey'] : 'key') -); -if(isset($_GET['CKEditorFuncNum'])){ - $get_params['CKEditorFuncNum'] = $_GET['CKEditorFuncNum']; - $get_params['CKEditor'] = (isset($_GET['CKEditor'])? $_GET['CKEditor'] : ''); -} -$get_params['fldr'] =''; - -$get_params = http_build_query($get_params); -?> - - - - - - - - Responsive FileManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " /> - " /> - " /> - " /> - - - - -
-
-
- -
-
-
-
- -
-
- -
-
-
- -
- -
-
-
- -
-
-
- - - - - - - - - -
-
- -
- -
-
-
-
- - - - -
- -
-
-
-
- -
- -
-
-
-
- -
-
-
-
- -
-
-
-
-
- - - -
- -scanDir($ftp_base_folder.$upload_dir.$rfm_subfolder.$subdir); - if (!$ftp->isDir($ftp_base_folder.$ftp_thumbs_dir.$rfm_subfolder.$subdir)){ - create_folder(false,$ftp_base_folder.$ftp_thumbs_dir.$rfm_subfolder.$subdir,$ftp,$config); - } - }catch(FtpClient\FtpException $e){ - echo "Error: "; - echo $e->getMessage(); - echo "
Please check configurations"; - die(); - } -}else{ - $files = scandir($current_path.$rfm_subfolder.$subdir); -} - -$n_files= count($files); - -//php sorting -$sorted=array(); -//$current_folder=array(); -//$prev_folder=array(); -$current_files_number = 0; -$current_folders_number = 0; - -foreach($files as $k=>$file){ - if($ftp){ - $date = strtotime($file['day']." ".$file['month']." ".date('Y')." ".$file['time']); - $size = $file['size']; - if($file['type']=='file'){ - $current_files_number++; - $file_ext = substr(strrchr($file['name'],'.'),1); - }else{ - $current_folders_number++; - $file_ext=trans('Type_dir'); - } - $sorted[$k]=array( - 'file'=>$file['name'], - 'file_lcase'=>strtolower($file['name']), - 'date'=>$date, - 'size'=>$size, - 'permissions' => $file['permissions'], - 'extension'=>strtolower($file_ext) - ); - }else{ - - - if($file!="." && $file!=".."){ - if(is_dir($current_path.$rfm_subfolder.$subdir.$file)){ - $date=filemtime($current_path.$rfm_subfolder.$subdir. $file); - $current_folders_number++; - if($show_folder_size){ - list($size,$nfiles,$nfolders) = folder_info($current_path.$rfm_subfolder.$subdir.$file,false); - } else { - $size=0; - } - $file_ext=trans('Type_dir'); - $sorted[$k]=array( - 'file'=>$file, - 'file_lcase'=>strtolower($file), - 'date'=>$date, - 'size'=>$size, - 'permissions' =>'', - 'extension'=>strtolower($file_ext) - ); - if($show_folder_size){ - $sorted[$k]['nfiles'] = $nfiles; - $sorted[$k]['nfolders'] = $nfolders; - } - }else{ - $current_files_number++; - $file_path=$current_path.$rfm_subfolder.$subdir.$file; - $date=filemtime($file_path); - $size=filesize($file_path); - $file_ext = substr(strrchr($file,'.'),1); - $sorted[$k]=array( - 'file'=>$file, - 'file_lcase'=>strtolower($file), - 'date'=>$date, - 'size'=>$size, - 'permissions' =>'', - 'extension'=>strtolower($file_ext) - ); - } - } - } -} - - -function filenameSort($x, $y) { - return $x['file_lcase'] < $y['file_lcase']; -} -function dateSort($x, $y) { - return $x['date'] < $y['date']; -} -function sizeSort($x, $y) { - return $x['size'] < $y['size']; -} -function extensionSort($x, $y) { - return $x['extension'] < $y['extension']; -} - -switch($sort_by){ - case 'date': - usort($sorted, 'dateSort'); - break; - case 'size': - usort($sorted, 'sizeSort'); - break; - case 'extension': - usort($sorted, 'extensionSort'); - break; - default: - usort($sorted, 'filenameSort'); - break; -} - -if(!$descending){ - $sorted=array_reverse($sorted); -} - -if($subdir!=""){ - $sorted = array_merge(array(array('file'=>'..')),$sorted); -} -$files=$sorted; - -?> - - - - - - - -
- - -
- -
-
- isDir($ftp_base_folder.$upload_dir.$rfm_subfolder.$subdir)) || (!$ftp && @opendir($current_path.$rfm_subfolder.$subdir)===FALSE)){ ?> -
-
There is an error! The upload folder there isn't. Check your config.php file.
- -

- -
- - - - - - - - -
    " id="main-item-container"> - $file_number_limit_js && $file!=".." && stripos($file,$filter)===false)){ - continue; - } - $new_name=fix_filename($file,$config); - if($ftp && $file!='..' && $file!=$new_name){ - //rename - rename_folder($current_path.$subdir.$file,$new_name,$ftp,$config); - $file=$new_name; - } - //add in thumbs folder if not exist - if($file!='..'){ - if(!$ftp && !file_exists($thumbs_path.$subdir.$file)){ - create_folder(false,$thumbs_path.$subdir.$file,$ftp,$config); - } - } - - $class_ext = 3; - if($file=='..' && trim($subdir) != '' ){ - $src = explode("/",$subdir); - unset($src[count($src)-2]); - $src=implode("/",$src); - if($src=='') $src="/"; - } - elseif ($file!='..') { - $src = $subdir . $file."/"; - } - - ?> - - $file_array) { - $file=$file_array['file']; - - if($file == '.' || $file == '..' || $file_array['extension']==trans('Type_dir') || in_array($file, $hidden_files) || !in_array(fix_strtolower($file_array['extension']), $ext) || ($filter!='' && $n_files>$file_number_limit_js && stripos($file,$filter)===false)) - continue; - - $filename=substr($file, 0, '-' . (strlen($file_array['extension']) + 1)); - if(!$ftp){ - $file_path=$current_path.$rfm_subfolder.$subdir.$file; - //check if file have illegal caracter - - if($file!=fix_filename($file,$config)){ - $file1=fix_filename($file,$config); - $file_path1=($current_path.$rfm_subfolder.$subdir.$file1); - if(file_exists($file_path1)){ - $i = 1; - $info=pathinfo($file1); - while(file_exists($current_path.$rfm_subfolder.$subdir.$info['filename'].".[".$i."].".$info['extension'])) { - $i++; - } - $file1=$info['filename'].".[".$i."].".$info['extension']; - $file_path1=($current_path.$rfm_subfolder.$subdir.$file1); - } - - $filename=substr($file1, 0, '-' . (strlen($file_array['extension']) + 1)); - rename_file($file_path,fix_filename($filename,$config),$ftp,$config); - $file=$file1; - $file_array['extension']=fix_filename($file_array['extension'],$config); - $file_path=$file_path1; - } - }else{ - $file_path = $config['ftp_base_url'].$upload_dir.$rfm_subfolder.$subdir.$file; - } - - $is_img=false; - $is_video=false; - $is_audio=false; - $show_original=false; - $show_original_mini=false; - $mini_src=""; - $src_thumb=""; - if(in_array($file_array['extension'], $ext_img)){ - $src = $file_path; - $is_img=true; - - $img_width = $img_height = ""; - if($ftp){ - $mini_src = $src_thumb = $config['ftp_base_url'].$ftp_thumbs_dir.$subdir. $file; - $creation_thumb_path = "/".$config['ftp_base_folder'].$ftp_thumbs_dir.$subdir. $file; - }else{ - - $creation_thumb_path = $mini_src = $src_thumb = $thumbs_path.$subdir. $file; - - if(!file_exists($src_thumb) ){ - if(!create_img($file_path, $creation_thumb_path, 122, 91,'crop',$config)){ - $src_thumb=$mini_src=""; - }else{ - new_thumbnails_creation($current_path.$rfm_subfolder.$subdir,$file_path,$file,$current_path,$config); - } - } - //check if is smaller than thumb - list($img_width, $img_height, $img_type, $attr)=@getimagesize($file_path); - if($img_width<122 && $img_height<91){ - $src_thumb=$file_path; - $show_original=true; - } - - if($img_width<45 && $img_height<38){ - $mini_src=$current_path.$rfm_subfolder.$subdir.$file; - $show_original_mini=true; - } - } - } - $is_icon_thumb=false; - $is_icon_thumb_mini=false; - $no_thumb=false; - if($src_thumb==""){ - $no_thumb=true; - if(file_exists('img/'.$icon_theme.'/'.$file_array['extension'].".jpg")){ - $src_thumb ='img/'.$icon_theme.'/'.$file_array['extension'].".jpg"; - }else{ - $src_thumb = "img/".$icon_theme."/default.jpg"; - } - $is_icon_thumb=true; - } - if($mini_src==""){ - $is_icon_thumb_mini=false; - } - - $class_ext=0; - if (in_array($file_array['extension'], $ext_video)) { - $class_ext = 4; - $is_video=true; - }elseif (in_array($file_array['extension'], $ext_img)) { - $class_ext = 2; - }elseif (in_array($file_array['extension'], $ext_music)) { - $class_ext = 5; - $is_audio=true; - }elseif (in_array($file_array['extension'], $ext_misc)) { - $class_ext = 3; - }else{ - $class_ext = 1; - } - if((!($_GET['type']==1 && !$is_img) && !(($_GET['type']==3 && !$is_video) && ($_GET['type']==3 && !$is_audio))) && $class_ext>0){ -?> - -
- - -
-
- - - - - - - - - - - - - - - - - - diff --git a/libraries/filemanager-9.12.1/execute.php b/libraries/filemanager-9.12.1/execute.php deleted file mode 100644 index ad284fd..0000000 --- a/libraries/filemanager-9.12.1/execute.php +++ /dev/null @@ -1,528 +0,0 @@ -send(); - exit; -} - -if (strpos($_POST['path'],'/')===0 - || strpos($_POST['path'],'../')!==FALSE - || strpos($_POST['path'],'./')===0 - || strpos($_POST['path'],'..\\')!==FALSE - || strpos($_POST['path'],'.\\')===0) -{ - response(trans('wrong path'.AddErrorLocation()))->send(); - exit; -} - -if (isset($_SESSION['RF']['language']) && file_exists('lang/' . basename($_SESSION['RF']['language']) . '.php')) -{ - $languages = include 'lang/languages.php'; - if(array_key_exists($_SESSION['RF']['language'],$languages)){ - include 'lang/' . basename($_SESSION['RF']['language']) . '.php'; - }else{ - response(trans('Lang_Not_Found').AddErrorLocation())->send(); - exit; - } -} -else -{ - response(trans('Lang_Not_Found').AddErrorLocation())->send(); - exit; -} - -$ftp = ftp_con($config); - -$base = $current_path; -$path = $base.$_POST['path']; -$cycle = TRUE; -$max_cycles = 50; -$i = 0; -while($cycle && $i<$max_cycles) -{ - $i++; - if ($path == $base) $cycle=FALSE; - - if (file_exists($path."config.php")) - { - require_once $path."config.php"; - $cycle = FALSE; - } - $path = fix_dirname($path)."/"; -} - -$path = $current_path.$_POST['path']; -$path_thumb = $thumbs_base_path.$_POST['path']; - -if($ftp){ - $path = $ftp_base_folder.$upload_dir.$_POST['path']; - $path_thumb = $ftp_base_folder.$ftp_thumbs_dir.$_POST['path']; -} - -if (isset($_POST['name'])) -{ - $name = fix_filename($_POST['name'],$config); - if (strpos($name,'../') !== FALSE || strpos($name,'..\\') !== FALSE) - { - response(trans('wrong name').AddErrorLocation())->send(); - exit; - } -} - -$info = pathinfo($path); -if (isset($info['extension']) && !(isset($_GET['action']) && $_GET['action']=='delete_folder') && !in_array(strtolower($info['extension']), $ext) && $_GET['action'] != 'create_file') -{ - response(trans('wrong extension').AddErrorLocation())->send(); - exit; -} - -if (isset($_GET['action'])) -{ - switch($_GET['action']) - { - case 'delete_file': - if ($delete_files){ - if($ftp){ - try{ - $ftp->delete("/".$path); - @$ftp->delete("/".$path_thumb); - }catch(FtpClient\FtpException $e){ - return; - } - }else{ - - unlink($path); - if (file_exists($path_thumb)){ - unlink($path_thumb); - } - } - - $info=pathinfo($path); - if (!$ftp && $relative_image_creation){ - foreach($relative_path_from_current_pos as $k=>$path) - { - if ($path!="" && $path[strlen($path)-1]!="/") $path.="/"; - - if (file_exists($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension'])) - { - unlink($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']); - } - } - } - - if (!$ftp && $fixed_image_creation) - { - foreach($fixed_path_from_filemanager as $k=>$path) - { - if ($path!="" && $path[strlen($path)-1] != "/") $path.="/"; - - $base_dir=$path.substr_replace($info['dirname']."/", '', 0, strlen($current_path)); - if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'])) - { - unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']); - } - } - } - } - break; - case 'delete_folder': - if ($delete_folders){ - - if($ftp){ - deleteDir($path,$ftp,$config); - deleteDir($path_thumb,$ftp,$config); - }else{ - if (is_dir($path_thumb)) - { - deleteDir($path_thumb); - } - - if (is_dir($path)) - { - deleteDir($path); - if ($fixed_image_creation) - { - foreach($fixed_path_from_filemanager as $k=>$paths){ - if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.="/"; - - $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path)); - if (is_dir($base_dir)) deleteDir($base_dir); - } - } - } - } - } - break; - case 'create_folder': - if ($create_folders) - { - - $name = fix_filename($_POST['name'],$config); - $path .= $name; - $path_thumb .= $name; - create_folder(fix_path($path,$config),fix_path($path_thumb,$config),$ftp,$config); - } - break; - case 'rename_folder': - if ($rename_folders){ - if(!is_dir($path)) { - response(trans('wrong path'))->send(); - exit; - } - $name=fix_filename($name,$config); - $name=str_replace('.','',$name); - - if (!empty($name)){ - if (!rename_folder($path,$name,$ftp,$config)) - { - response(trans('Rename_existing_folder').AddErrorLocation())->send(); - exit; - } - rename_folder($path_thumb,$name,$ftp,$config); - if (!$ftp && $fixed_image_creation){ - foreach($fixed_path_from_filemanager as $k=>$paths){ - if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.="/"; - - $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path)); - rename_folder($base_dir,$name,$ftp,$config); - } - } - } else { - response(trans('Empty_name').AddErrorLocation())->send(); - exit; - } - } - break; - case 'create_file': - if ($create_text_files === FALSE) { - response(sprintf(trans('File_Open_Edit_Not_Allowed'), strtolower(trans('Edit'))).AddErrorLocation())->send(); - exit; - } - - if (!isset($editable_text_file_exts) || !is_array($editable_text_file_exts)){ - $editable_text_file_exts = array(); - } - - // check if user supplied extension - if (strpos($name, '.') === FALSE){ - response(trans('No_Extension').' '.sprintf(trans('Valid_Extensions'), implode(', ', $editable_text_file_exts)).AddErrorLocation())->send(); - exit; - } - - // correct name - $old_name = $name; - $name=fix_filename($name,$config); - if (empty($name)) - { - response(trans('Empty_name').AddErrorLocation())->send(); - exit; - } - - // check extension - $parts = explode('.', $name); - if (!in_array(end($parts), $editable_text_file_exts)) { - response(trans('Error_extension').' '.sprintf(trans('Valid_Extensions'), implode(', ', $editable_text_file_exts)), 400)->send(); - exit; - } - - $content = $_POST['new_content']; - - if($ftp){ - $temp = tempnam('/tmp','RF'); - file_put_contents($temp, $content); - $ftp->put("/".$path.$name, $temp, FTP_BINARY); - unlink($temp); - response(trans('File_Save_OK'))->send(); - }else{ - if (!checkresultingsize(strlen($content))) { - response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send(); - exit; - } - // file already exists - if (file_exists($path.$name)) { - response(trans('Rename_existing_file').AddErrorLocation())->send(); - exit; - } - - if (@file_put_contents($path.$name, $content) === FALSE) { - response(trans('File_Save_Error').AddErrorLocation())->send(); - exit; - } else { - if (is_function_callable('chmod') !== FALSE){ - chmod($path.$name, 0644); - } - response(trans('File_Save_OK'))->send(); - exit; - } - } - - break; - case 'rename_file': - if ($rename_files){ - $name=fix_filename($name,$config); - if (!empty($name)) - { - if (!rename_file($path,$name,$ftp,$config)) - { - response(trans('Rename_existing_file').AddErrorLocation())->send(); - exit; - } - - rename_file($path_thumb,$name,$ftp,$config); - - if ($fixed_image_creation) - { - $info=pathinfo($path); - - foreach($fixed_path_from_filemanager as $k=>$paths) - { - if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.="/"; - - $base_dir = $paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path)); - if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'])) - { - rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k],$ftp,$config); - } - } - } - } else { - response(trans('Empty_name').AddErrorLocation())->send(); - exit; - } - } - break; - case 'duplicate_file': - if ($duplicate_files) - { - $name=fix_filename($name,$config); - if (!empty($name)) - { - if (!$ftp && !checkresultingsize(filesize($path))) { - response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send(); - exit; - } - if (!duplicate_file($path,$name,$ftp,$config)) - { - response(trans('Rename_existing_file').AddErrorLocation())->send(); - exit; - } - - duplicate_file($path_thumb,$name,$ftp,$config); - - if (!$ftp && $fixed_image_creation) - { - $info=pathinfo($path); - foreach($fixed_path_from_filemanager as $k=>$paths) - { - if ($paths!="" && $paths[strlen($paths)-1] != "/") $paths.= "/"; - - $base_dir=$paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path)); - - if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'])) - { - duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]); - } - } - } - } else { - response(trans('Empty_name').AddErrorLocation())->send(); - exit; - } - } - break; - - case 'paste_clipboard': - if ( ! isset($_SESSION['RF']['clipboard_action'], $_SESSION['RF']['clipboard']['path']) - || $_SESSION['RF']['clipboard_action'] == '' - || $_SESSION['RF']['clipboard']['path'] == '') - { - response()->send(); - exit; - } - - $action = $_SESSION['RF']['clipboard_action']; - $data = $_SESSION['RF']['clipboard']; - - - if($ftp){ - if($_POST['path']!=""){ - $path.=DIRECTORY_SEPARATOR; - $path_thumb.=DIRECTORY_SEPARATOR; - } - $path_thumb .= basename($data['path']); - $path .= basename($data['path']) ; - $data['path_thumb'] = DIRECTORY_SEPARATOR.$config['ftp_base_folder'].$config['ftp_thumbs_dir'].$data['path']; - $data['path'] = DIRECTORY_SEPARATOR.$config['ftp_base_folder'].$config['upload_dir'].$data['path']; - }else{ - $data['path_thumb'] = $thumbs_base_path.$data['path']; - $data['path'] = $current_path.$data['path']; - } - - $pinfo = pathinfo($data['path']); - - // user wants to paste to the same dir. nothing to do here... - if ($pinfo['dirname'] == rtrim($path, DIRECTORY_SEPARATOR)) { - response()->send(); - exit; - } - - // user wants to paste folder to it's own sub folder.. baaaah. - if (is_dir($data['path']) && strpos($path, $data['path']) !== FALSE){ - response()->send(); - exit; - } - - // something terribly gone wrong - if ($action != 'copy' && $action != 'cut'){ - response(trans('wrong action').AddErrorLocation())->send(); - exit; - } - if($ftp){ - if ($action == 'copy') - { - $tmp = time().basename($data['path']); - $ftp->get($tmp, $data['path'], FTP_BINARY); - $ftp->put(DIRECTORY_SEPARATOR.$path, $tmp, FTP_BINARY); - unlink($tmp); - - if(url_exists($data['path_thumb'])){ - $tmp = time().basename($data['path_thumb']); - @$ftp->get($tmp, $data['path_thumb'], FTP_BINARY); - @$ftp->put(DIRECTORY_SEPARATOR.$path_thumb, $tmp, FTP_BINARY); - unlink($tmp); - } - - } elseif ($action == 'cut') { - $ftp->rename($data['path'], DIRECTORY_SEPARATOR.$path); - if(url_exists($data['path_thumb'])){ - @$ftp->rename($data['path_thumb'], DIRECTORY_SEPARATOR.$path_thumb); - } - } - }else{ - // check for writability - if (is_really_writable($path) === FALSE || is_really_writable($path_thumb) === FALSE){ - response(trans('Dir_No_Write').'
'.str_replace('../','',$path).'
'.str_replace('../','',$path_thumb).AddErrorLocation())->send(); - exit; - } - - // check if server disables copy or rename - if (is_function_callable(($action == 'copy' ? 'copy' : 'rename')) === FALSE){ - response(sprintf(trans('Function_Disabled'), ($action == 'copy' ? (trans('Copy')) : (trans('Cut')))).AddErrorLocation())->send(); - exit; - } - if ($action == 'copy') - { - list($sizeFolderToCopy,$fileNum,$foldersCount) = folder_info($path,false); - if (!checkresultingsize($sizeFolderToCopy)) { - response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send(); - exit; - } - rcopy($data['path'], $path); - rcopy($data['path_thumb'], $path_thumb); - } elseif ($action == 'cut') { - rrename($data['path'], $path); - rrename($data['path_thumb'], $path_thumb); - - // cleanup - if (is_dir($data['path']) === TRUE){ - rrename_after_cleaner($data['path']); - rrename_after_cleaner($data['path_thumb']); - } - } - } - - // cleanup - $_SESSION['RF']['clipboard']['path'] = NULL; - $_SESSION['RF']['clipboard_action'] = NULL; - - break; - case 'chmod': - $mode = $_POST['new_mode']; - $rec_option = $_POST['is_recursive']; - $valid_options = array('none', 'files', 'folders', 'both'); - $chmod_perm = ($_POST['folder'] ? $chmod_dirs : $chmod_files); - - // check perm - if ($chmod_perm === FALSE) { - response(sprintf(trans('File_Permission_Not_Allowed'), (is_dir($path) ? (trans('Folders')) : (trans('Files')) )).AddErrorLocation())->send(); - exit; - } - // check mode - if (!preg_match("/^[0-7]{3}$/", $mode)){ - response(trans('File_Permission_Wrong_Mode').AddErrorLocation())->send(); - exit; - } - // check recursive option - if (!in_array($rec_option, $valid_options)){ - response(trans("wrong option").AddErrorLocation())->send(); - exit; - } - // check if server disabled chmod - if (!$ftp && is_function_callable('chmod') === FALSE){ - response(sprintf(trans('Function_Disabled'), 'chmod').AddErrorLocation())->send(); - exit; - } - - $mode = "0".$mode; - $mode = octdec($mode); - if($ftp){ - $ftp->chmod($mode, "/".$path); - }else{ - rchmod($path, $mode, $rec_option); - } - - break; - case 'save_text_file': - $content = $_POST['new_content']; - // $content = htmlspecialchars($content); not needed - // $content = stripslashes($content); - - if($ftp){ - $tmp = time(); - file_put_contents($tmp, $content); - try{ - $ftp->put("/".$path, $tmp, FTP_BINARY); - }catch(FtpClient\FtpException $e){ - echo $e->getMessage(); - } - unlink($tmp); - response(trans('File_Save_OK'))->send(); - }else{ - // no file - if (!file_exists($path)) { - response(trans('File_Not_Found').AddErrorLocation())->send(); - exit; - } - - // not writable or edit not allowed - if (!is_writable($path) || $edit_text_files === FALSE) { - response(sprintf(trans('File_Open_Edit_Not_Allowed'), strtolower(trans('Edit'))).AddErrorLocation())->send(); - exit; - } - - if (!checkresultingsize(strlen($content))) { - response(sprintf(trans('max_size_reached'),$MaxSizeTotal).AddErrorLocation())->send(); - exit; - } - if (@file_put_contents($path, $content) === FALSE) { - response(trans('File_Save_Error').AddErrorLocation())->send(); - exit; - } else { - response(trans('File_Save_OK'))->send(); - exit; - } - } - - break; - default: - response(trans('wrong action').AddErrorLocation())->send(); - exit; - } -} -?> \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/force_download.php b/libraries/filemanager-9.12.1/force_download.php deleted file mode 100644 index 111c53e..0000000 --- a/libraries/filemanager-9.12.1/force_download.php +++ /dev/null @@ -1,151 +0,0 @@ -send(); - exit; -} - -include 'include/mime_type_lib.php'; - - -if ( - strpos($_POST['path'], '/') === 0 - || strpos($_POST['path'], '../') !== false - || strpos($_POST['path'], './') === 0 - || strpos($_POST['path'], '..\\') !== false - || strpos($_POST['path'], '.\\') === 0 -) -{ - response(trans('wrong path'.AddErrorLocation()), 400)->send(); - exit; -} - - -if (strpos($_POST['name'], '/') !== false) -{ - response(trans('wrong path'.AddErrorLocation()), 400)->send(); - exit; -} -if($ftp){ - $path = $ftp_base_url . $upload_dir . $_POST['path']; -}else{ - $path = $current_path . $_POST['path']; -} - -$name = $_POST['name']; - -$info = pathinfo($name); - -if ( ! in_array(fix_strtolower($info['extension']), $ext)) -{ - response(trans('wrong extension'.AddErrorLocation()), 400)->send(); - exit; -} - - - -$file_name = $info['basename']; -$file_ext = $info['extension']; -$file_path = $path . $name; - -// make sure the file exists -if($ftp){ - $file_url = 'http://www.myremoteserver.com/file.exe'; - header('Content-Type: application/octet-stream'); - header("Content-Transfer-Encoding: Binary"); - header("Content-disposition: attachment; filename=\"" . $file_name . "\""); - readfile($file_path); -}elseif (is_file($file_path) && is_readable($file_path)) -{ - if ( ! file_exists($path . $name)) - { - response(trans('File_Not_Found'.AddErrorLocation()), 404)->send(); - exit; - } - - $size = filesize($file_path); - $file_name = rawurldecode($file_name); - if (function_exists('mime_content_type')){ - $mime_type = mime_content_type($file_path); - }elseif(function_exists('finfo_open')){ - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mime_type = finfo_file($finfo, $file_path); - }else{ - include 'include/mime_type_lib.php'; - $mime_type = get_file_mime_type($file_path); - } - - @ob_end_clean(); - if(ini_get('zlib.output_compression')){ - ini_set('zlib.output_compression', 'Off'); - } - header('Content-Type: ' . $mime_type); - header('Content-Disposition: attachment; filename="'.$file_name.'"'); - header("Content-Transfer-Encoding: binary"); - header('Accept-Ranges: bytes'); - - if(isset($_SERVER['HTTP_RANGE'])) - { - list($a, $range) = explode("=",$_SERVER['HTTP_RANGE'],2); - list($range) = explode(",",$range,2); - list($range, $range_end) = explode("-", $range); - $range=intval($range); - if(!$range_end) { - $range_end=$size-1; - } else { - $range_end=intval($range_end); - } - - $new_length = $range_end-$range+1; - header("HTTP/1.1 206 Partial Content"); - header("Content-Length: $new_length"); - header("Content-Range: bytes $range-$range_end/$size"); - } else { - $new_length=$size; - header("Content-Length: ".$size); - } - - $chunksize = 1*(1024*1024); - $bytes_send = 0; - if ($file = fopen($file_path, 'r')) - { - if(isset($_SERVER['HTTP_RANGE'])) - fseek($file, $range); - - while(!feof($file) && - (!connection_aborted()) && - ($bytes_send<$new_length) - ) - { - $buffer = fread($file, $chunksize); - echo($buffer); - flush(); - $bytes_send += strlen($buffer); - } - fclose($file); - } else { - die('Error - can not open file.'); - } - - die(); - -} -else -{ - // file does not exist - header("HTTP/1.0 404 Not Found"); - exit; -} - -exit; \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/img/clipboard_apply.png b/libraries/filemanager-9.12.1/img/clipboard_apply.png deleted file mode 100644 index d470c44..0000000 Binary files a/libraries/filemanager-9.12.1/img/clipboard_apply.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/clipboard_clear.png b/libraries/filemanager-9.12.1/img/clipboard_clear.png deleted file mode 100644 index e7fb903..0000000 Binary files a/libraries/filemanager-9.12.1/img/clipboard_clear.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/copy.png b/libraries/filemanager-9.12.1/img/copy.png deleted file mode 100644 index e1d8911..0000000 Binary files a/libraries/filemanager-9.12.1/img/copy.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/cut.png b/libraries/filemanager-9.12.1/img/cut.png deleted file mode 100644 index a139267..0000000 Binary files a/libraries/filemanager-9.12.1/img/cut.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/date.png b/libraries/filemanager-9.12.1/img/date.png deleted file mode 100644 index ef310f4..0000000 Binary files a/libraries/filemanager-9.12.1/img/date.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/dimension.png b/libraries/filemanager-9.12.1/img/dimension.png deleted file mode 100644 index 43dcc10..0000000 Binary files a/libraries/filemanager-9.12.1/img/dimension.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/down.png b/libraries/filemanager-9.12.1/img/down.png deleted file mode 100644 index 7651122..0000000 Binary files a/libraries/filemanager-9.12.1/img/down.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/download.png b/libraries/filemanager-9.12.1/img/download.png deleted file mode 100644 index 76125f2..0000000 Binary files a/libraries/filemanager-9.12.1/img/download.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/duplicate.png b/libraries/filemanager-9.12.1/img/duplicate.png deleted file mode 100644 index faa0f97..0000000 Binary files a/libraries/filemanager-9.12.1/img/duplicate.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/edit_img.png b/libraries/filemanager-9.12.1/img/edit_img.png deleted file mode 100644 index ca55e58..0000000 Binary files a/libraries/filemanager-9.12.1/img/edit_img.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/file_edit.png b/libraries/filemanager-9.12.1/img/file_edit.png deleted file mode 100644 index 4bcd072..0000000 Binary files a/libraries/filemanager-9.12.1/img/file_edit.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/glyphicons-halflings-white.png b/libraries/filemanager-9.12.1/img/glyphicons-halflings-white.png deleted file mode 100644 index a92969a..0000000 Binary files a/libraries/filemanager-9.12.1/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/glyphicons-halflings.png b/libraries/filemanager-9.12.1/img/glyphicons-halflings.png deleted file mode 100644 index f43139a..0000000 Binary files a/libraries/filemanager-9.12.1/img/glyphicons-halflings.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ac3.jpg b/libraries/filemanager-9.12.1/img/ico/ac3.jpg deleted file mode 100644 index 3ce97c7..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ac3.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/accdb.jpg b/libraries/filemanager-9.12.1/img/ico/accdb.jpg deleted file mode 100644 index 4581e5e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/accdb.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ade.jpg b/libraries/filemanager-9.12.1/img/ico/ade.jpg deleted file mode 100644 index b653b3d..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ade.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/adp.jpg b/libraries/filemanager-9.12.1/img/ico/adp.jpg deleted file mode 100644 index b653b3d..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/adp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ai.jpg b/libraries/filemanager-9.12.1/img/ico/ai.jpg deleted file mode 100644 index e469be3..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ai.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/aiff.jpg b/libraries/filemanager-9.12.1/img/ico/aiff.jpg deleted file mode 100644 index 053ff30..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/aiff.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/avi.jpg b/libraries/filemanager-9.12.1/img/ico/avi.jpg deleted file mode 100644 index b9ddc2d..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/avi.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/bmp.jpg b/libraries/filemanager-9.12.1/img/ico/bmp.jpg deleted file mode 100644 index 8c771ca..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/bmp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/c4d.jpg b/libraries/filemanager-9.12.1/img/ico/c4d.jpg deleted file mode 100644 index 62994da..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/c4d.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/css.jpg b/libraries/filemanager-9.12.1/img/ico/css.jpg deleted file mode 100644 index e1673b0..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/css.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/csv.jpg b/libraries/filemanager-9.12.1/img/ico/csv.jpg deleted file mode 100644 index ca93201..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/csv.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/default.jpg b/libraries/filemanager-9.12.1/img/ico/default.jpg deleted file mode 100644 index 94ca669..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/default.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/dmg.jpg b/libraries/filemanager-9.12.1/img/ico/dmg.jpg deleted file mode 100644 index 2494e87..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/dmg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/doc.jpg b/libraries/filemanager-9.12.1/img/ico/doc.jpg deleted file mode 100644 index c0e14b3..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/doc.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/docx.jpg b/libraries/filemanager-9.12.1/img/ico/docx.jpg deleted file mode 100644 index c0e14b3..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/docx.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/dwg.jpg b/libraries/filemanager-9.12.1/img/ico/dwg.jpg deleted file mode 100644 index bf5d63f..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/dwg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/dxf.jpg b/libraries/filemanager-9.12.1/img/ico/dxf.jpg deleted file mode 100644 index 7041cbe..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/dxf.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/favicon.ico b/libraries/filemanager-9.12.1/img/ico/favicon.ico deleted file mode 100644 index 7383707..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/favicon.ico and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/fla.jpg b/libraries/filemanager-9.12.1/img/ico/fla.jpg deleted file mode 100644 index 41bd2ec..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/fla.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/flv.jpg b/libraries/filemanager-9.12.1/img/ico/flv.jpg deleted file mode 100644 index 75aff12..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/flv.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/folder.png b/libraries/filemanager-9.12.1/img/ico/folder.png deleted file mode 100644 index d56b85e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/folder.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/folder_back.png b/libraries/filemanager-9.12.1/img/ico/folder_back.png deleted file mode 100644 index dc0786e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/folder_back.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/gif.jpg b/libraries/filemanager-9.12.1/img/ico/gif.jpg deleted file mode 100644 index 8c771ca..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/gif.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/gz.jpg b/libraries/filemanager-9.12.1/img/ico/gz.jpg deleted file mode 100644 index 36d1591..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/gz.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/html.jpg b/libraries/filemanager-9.12.1/img/ico/html.jpg deleted file mode 100644 index a1af20d..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/html.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/iso.jpg b/libraries/filemanager-9.12.1/img/ico/iso.jpg deleted file mode 100644 index 379f506..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/iso.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/jpeg.jpg b/libraries/filemanager-9.12.1/img/ico/jpeg.jpg deleted file mode 100644 index 0be5ac5..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/jpeg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/jpg.jpg b/libraries/filemanager-9.12.1/img/ico/jpg.jpg deleted file mode 100644 index 8c771ca..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/jpg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/log.jpg b/libraries/filemanager-9.12.1/img/ico/log.jpg deleted file mode 100644 index ec6d3e3..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/log.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/m4a.jpg b/libraries/filemanager-9.12.1/img/ico/m4a.jpg deleted file mode 100644 index 5c6417c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/m4a.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/mdb.jpg b/libraries/filemanager-9.12.1/img/ico/mdb.jpg deleted file mode 100644 index 4581e5e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/mdb.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/mid.jpg b/libraries/filemanager-9.12.1/img/ico/mid.jpg deleted file mode 100644 index 176cd71..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/mid.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/mov.jpg b/libraries/filemanager-9.12.1/img/ico/mov.jpg deleted file mode 100644 index 78a2ffa..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/mov.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/mp3.jpg b/libraries/filemanager-9.12.1/img/ico/mp3.jpg deleted file mode 100644 index b79ba99..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/mp3.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/mp4.jpg b/libraries/filemanager-9.12.1/img/ico/mp4.jpg deleted file mode 100644 index 50184ef..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/mp4.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/mpeg.jpg b/libraries/filemanager-9.12.1/img/ico/mpeg.jpg deleted file mode 100644 index 50f99ff0a..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/mpeg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/mpg.jpg b/libraries/filemanager-9.12.1/img/ico/mpg.jpg deleted file mode 100644 index daa2bc4..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/mpg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/odb.jpg b/libraries/filemanager-9.12.1/img/ico/odb.jpg deleted file mode 100644 index 1a4157e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/odb.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/odf.jpg b/libraries/filemanager-9.12.1/img/ico/odf.jpg deleted file mode 100644 index da290dc..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/odf.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/odg.jpg b/libraries/filemanager-9.12.1/img/ico/odg.jpg deleted file mode 100644 index 1a4157e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/odg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/odp.jpg b/libraries/filemanager-9.12.1/img/ico/odp.jpg deleted file mode 100644 index da290dc..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/odp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ods.jpg b/libraries/filemanager-9.12.1/img/ico/ods.jpg deleted file mode 100644 index 1a4157e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ods.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/odt.jpg b/libraries/filemanager-9.12.1/img/ico/odt.jpg deleted file mode 100644 index 1a4157e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/odt.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ogg.jpg b/libraries/filemanager-9.12.1/img/ico/ogg.jpg deleted file mode 100644 index e20ab2f..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ogg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/otg.jpg b/libraries/filemanager-9.12.1/img/ico/otg.jpg deleted file mode 100644 index af44482..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/otg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/otp.jpg b/libraries/filemanager-9.12.1/img/ico/otp.jpg deleted file mode 100644 index 802e78c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/otp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ots.jpg b/libraries/filemanager-9.12.1/img/ico/ots.jpg deleted file mode 100644 index 1a4157e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ots.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ott.jpg b/libraries/filemanager-9.12.1/img/ico/ott.jpg deleted file mode 100644 index 1a4157e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ott.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/pdf.jpg b/libraries/filemanager-9.12.1/img/ico/pdf.jpg deleted file mode 100644 index 2080921..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/pdf.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/png.jpg b/libraries/filemanager-9.12.1/img/ico/png.jpg deleted file mode 100644 index 8c771ca..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/png.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/ppt.jpg b/libraries/filemanager-9.12.1/img/ico/ppt.jpg deleted file mode 100644 index aa13f73..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/ppt.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/pptx.jpg b/libraries/filemanager-9.12.1/img/ico/pptx.jpg deleted file mode 100644 index 8504969..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/pptx.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/psd.jpg b/libraries/filemanager-9.12.1/img/ico/psd.jpg deleted file mode 100644 index 53028c5..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/psd.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/rar.jpg b/libraries/filemanager-9.12.1/img/ico/rar.jpg deleted file mode 100644 index 36d1591..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/rar.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/rtf.jpg b/libraries/filemanager-9.12.1/img/ico/rtf.jpg deleted file mode 100644 index c0e14b3..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/rtf.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/skp.jpg b/libraries/filemanager-9.12.1/img/ico/skp.jpg deleted file mode 100644 index 6ebcde0..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/skp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/sql.jpg b/libraries/filemanager-9.12.1/img/ico/sql.jpg deleted file mode 100644 index 46794ad..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/sql.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/stp.jpg b/libraries/filemanager-9.12.1/img/ico/stp.jpg deleted file mode 100644 index cab6077..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/stp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/svg.jpg b/libraries/filemanager-9.12.1/img/ico/svg.jpg deleted file mode 100644 index 8c771ca..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/svg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/tar.jpg b/libraries/filemanager-9.12.1/img/ico/tar.jpg deleted file mode 100644 index 665cd03..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/tar.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/tiff.jpg b/libraries/filemanager-9.12.1/img/ico/tiff.jpg deleted file mode 100644 index afe2cde..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/tiff.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/txt.jpg b/libraries/filemanager-9.12.1/img/ico/txt.jpg deleted file mode 100644 index ec6d3e3..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/txt.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/vwx.jpg b/libraries/filemanager-9.12.1/img/ico/vwx.jpg deleted file mode 100644 index c56cad7..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/vwx.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/wav.jpg b/libraries/filemanager-9.12.1/img/ico/wav.jpg deleted file mode 100644 index e20ab2f..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/wav.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/webm.jpg b/libraries/filemanager-9.12.1/img/ico/webm.jpg deleted file mode 100644 index b9ddc2d..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/webm.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/wma.jpg b/libraries/filemanager-9.12.1/img/ico/wma.jpg deleted file mode 100644 index b9ddc2d..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/wma.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/xhtml.jpg b/libraries/filemanager-9.12.1/img/ico/xhtml.jpg deleted file mode 100644 index 5979c91..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/xhtml.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/xls.jpg b/libraries/filemanager-9.12.1/img/ico/xls.jpg deleted file mode 100644 index 4f656f7..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/xls.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/xlsx.jpg b/libraries/filemanager-9.12.1/img/ico/xlsx.jpg deleted file mode 100644 index b4c33ff..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/xlsx.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/xml.jpg b/libraries/filemanager-9.12.1/img/ico/xml.jpg deleted file mode 100644 index 73301e7..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/xml.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico/zip.jpg b/libraries/filemanager-9.12.1/img/ico/zip.jpg deleted file mode 100644 index 36d1591..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico/zip.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ac3.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ac3.jpg deleted file mode 100644 index 0530f28..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ac3.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/accdb.jpg b/libraries/filemanager-9.12.1/img/ico_dark/accdb.jpg deleted file mode 100644 index 13607b1..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/accdb.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ade.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ade.jpg deleted file mode 100644 index 92d67d9..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ade.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/adp.jpg b/libraries/filemanager-9.12.1/img/ico_dark/adp.jpg deleted file mode 100644 index 92d67d9..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/adp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ai.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ai.jpg deleted file mode 100644 index b7c353b..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ai.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/aiff.jpg b/libraries/filemanager-9.12.1/img/ico_dark/aiff.jpg deleted file mode 100644 index f0422da..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/aiff.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/avi.jpg b/libraries/filemanager-9.12.1/img/ico_dark/avi.jpg deleted file mode 100644 index 9dfa9fe..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/avi.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/bmp.jpg b/libraries/filemanager-9.12.1/img/ico_dark/bmp.jpg deleted file mode 100644 index f479380..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/bmp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/css.jpg b/libraries/filemanager-9.12.1/img/ico_dark/css.jpg deleted file mode 100644 index 8c80e15..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/css.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/csv.jpg b/libraries/filemanager-9.12.1/img/ico_dark/csv.jpg deleted file mode 100644 index b81a32b..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/csv.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/default.jpg b/libraries/filemanager-9.12.1/img/ico_dark/default.jpg deleted file mode 100644 index 433adcf..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/default.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/dmg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/dmg.jpg deleted file mode 100644 index 509039e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/dmg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/doc.jpg b/libraries/filemanager-9.12.1/img/ico_dark/doc.jpg deleted file mode 100644 index 122d382..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/doc.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/docx.jpg b/libraries/filemanager-9.12.1/img/ico_dark/docx.jpg deleted file mode 100644 index 9b0bc4b..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/docx.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/favicon.ico b/libraries/filemanager-9.12.1/img/ico_dark/favicon.ico deleted file mode 100644 index 7383707..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/favicon.ico and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/fla.jpg b/libraries/filemanager-9.12.1/img/ico_dark/fla.jpg deleted file mode 100644 index e8757e6..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/fla.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/flv.jpg b/libraries/filemanager-9.12.1/img/ico_dark/flv.jpg deleted file mode 100644 index c53f135..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/flv.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/folder.png b/libraries/filemanager-9.12.1/img/ico_dark/folder.png deleted file mode 100644 index a5fac96..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/folder.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/folder_back.png b/libraries/filemanager-9.12.1/img/ico_dark/folder_back.png deleted file mode 100644 index dc0786e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/folder_back.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/gif.jpg b/libraries/filemanager-9.12.1/img/ico_dark/gif.jpg deleted file mode 100644 index f479380..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/gif.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/gz.jpg b/libraries/filemanager-9.12.1/img/ico_dark/gz.jpg deleted file mode 100644 index 414d5da..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/gz.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/html.jpg b/libraries/filemanager-9.12.1/img/ico_dark/html.jpg deleted file mode 100644 index 6bb6743..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/html.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/iso.jpg b/libraries/filemanager-9.12.1/img/ico_dark/iso.jpg deleted file mode 100644 index aaf5d5b..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/iso.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/jpeg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/jpeg.jpg deleted file mode 100644 index b4f258a..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/jpeg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/jpg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/jpg.jpg deleted file mode 100644 index f479380..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/jpg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/log.jpg b/libraries/filemanager-9.12.1/img/ico_dark/log.jpg deleted file mode 100644 index c2fe0e7..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/log.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/m4a.jpg b/libraries/filemanager-9.12.1/img/ico_dark/m4a.jpg deleted file mode 100644 index f3997e6..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/m4a.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/mdb.jpg b/libraries/filemanager-9.12.1/img/ico_dark/mdb.jpg deleted file mode 100644 index 13607b1..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/mdb.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/mid.jpg b/libraries/filemanager-9.12.1/img/ico_dark/mid.jpg deleted file mode 100644 index 966b39c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/mid.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/mov.jpg b/libraries/filemanager-9.12.1/img/ico_dark/mov.jpg deleted file mode 100644 index 2e98f5e..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/mov.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/mp3.jpg b/libraries/filemanager-9.12.1/img/ico_dark/mp3.jpg deleted file mode 100644 index fd66149..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/mp3.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/mp4.jpg b/libraries/filemanager-9.12.1/img/ico_dark/mp4.jpg deleted file mode 100644 index 0b045ed..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/mp4.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/mpeg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/mpeg.jpg deleted file mode 100644 index f075cc3..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/mpeg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/mpg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/mpg.jpg deleted file mode 100644 index 0da2aad..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/mpg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/odb.jpg b/libraries/filemanager-9.12.1/img/ico_dark/odb.jpg deleted file mode 100644 index eb6522c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/odb.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/odf.jpg b/libraries/filemanager-9.12.1/img/ico_dark/odf.jpg deleted file mode 100644 index 8f40c74..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/odf.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/odg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/odg.jpg deleted file mode 100644 index eb6522c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/odg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/odp.jpg b/libraries/filemanager-9.12.1/img/ico_dark/odp.jpg deleted file mode 100644 index 8f40c74..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/odp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ods.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ods.jpg deleted file mode 100644 index eb6522c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ods.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/odt.jpg b/libraries/filemanager-9.12.1/img/ico_dark/odt.jpg deleted file mode 100644 index eb6522c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/odt.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ogg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ogg.jpg deleted file mode 100644 index 23ed22b..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ogg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/otg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/otg.jpg deleted file mode 100644 index b36cae5..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/otg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/otp.jpg b/libraries/filemanager-9.12.1/img/ico_dark/otp.jpg deleted file mode 100644 index fc995f5..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/otp.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ots.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ots.jpg deleted file mode 100644 index eb6522c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ots.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ott.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ott.jpg deleted file mode 100644 index eb6522c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ott.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/pdf.jpg b/libraries/filemanager-9.12.1/img/ico_dark/pdf.jpg deleted file mode 100644 index 809b5e6..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/pdf.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/png.jpg b/libraries/filemanager-9.12.1/img/ico_dark/png.jpg deleted file mode 100644 index f479380..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/png.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/ppt.jpg b/libraries/filemanager-9.12.1/img/ico_dark/ppt.jpg deleted file mode 100644 index b87590a..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/ppt.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/pptx.jpg b/libraries/filemanager-9.12.1/img/ico_dark/pptx.jpg deleted file mode 100644 index 62cbe2f..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/pptx.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/psd.jpg b/libraries/filemanager-9.12.1/img/ico_dark/psd.jpg deleted file mode 100644 index 312af5c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/psd.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/rar.jpg b/libraries/filemanager-9.12.1/img/ico_dark/rar.jpg deleted file mode 100644 index 6057cbc..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/rar.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/rtf.jpg b/libraries/filemanager-9.12.1/img/ico_dark/rtf.jpg deleted file mode 100644 index 122d382..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/rtf.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/sql.jpg b/libraries/filemanager-9.12.1/img/ico_dark/sql.jpg deleted file mode 100644 index 73485f1..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/sql.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/svg.jpg b/libraries/filemanager-9.12.1/img/ico_dark/svg.jpg deleted file mode 100644 index f479380..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/svg.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/tar.jpg b/libraries/filemanager-9.12.1/img/ico_dark/tar.jpg deleted file mode 100644 index bb5adaf..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/tar.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/tiff.jpg b/libraries/filemanager-9.12.1/img/ico_dark/tiff.jpg deleted file mode 100644 index e25985d..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/tiff.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/txt.jpg b/libraries/filemanager-9.12.1/img/ico_dark/txt.jpg deleted file mode 100644 index c2fe0e7..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/txt.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/wav.jpg b/libraries/filemanager-9.12.1/img/ico_dark/wav.jpg deleted file mode 100644 index 23ed22b..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/wav.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/webm.jpg b/libraries/filemanager-9.12.1/img/ico_dark/webm.jpg deleted file mode 100644 index b6c568c..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/webm.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/wma.jpg b/libraries/filemanager-9.12.1/img/ico_dark/wma.jpg deleted file mode 100644 index 9dfa9fe..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/wma.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/xhtml.jpg b/libraries/filemanager-9.12.1/img/ico_dark/xhtml.jpg deleted file mode 100644 index 3420b33..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/xhtml.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/xls.jpg b/libraries/filemanager-9.12.1/img/ico_dark/xls.jpg deleted file mode 100644 index 62e21dd..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/xls.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/xlsx.jpg b/libraries/filemanager-9.12.1/img/ico_dark/xlsx.jpg deleted file mode 100644 index c1728bc..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/xlsx.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/xml.jpg b/libraries/filemanager-9.12.1/img/ico_dark/xml.jpg deleted file mode 100644 index 7b2d75b..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/xml.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/ico_dark/zip.jpg b/libraries/filemanager-9.12.1/img/ico_dark/zip.jpg deleted file mode 100644 index 414d5da..0000000 Binary files a/libraries/filemanager-9.12.1/img/ico_dark/zip.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/info.png b/libraries/filemanager-9.12.1/img/info.png deleted file mode 100644 index 6baffc3..0000000 Binary files a/libraries/filemanager-9.12.1/img/info.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/key.png b/libraries/filemanager-9.12.1/img/key.png deleted file mode 100644 index 463d082..0000000 Binary files a/libraries/filemanager-9.12.1/img/key.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/label.png b/libraries/filemanager-9.12.1/img/label.png deleted file mode 100644 index fa65317..0000000 Binary files a/libraries/filemanager-9.12.1/img/label.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/loading.gif b/libraries/filemanager-9.12.1/img/loading.gif deleted file mode 100644 index 6fba776..0000000 Binary files a/libraries/filemanager-9.12.1/img/loading.gif and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/logo.png b/libraries/filemanager-9.12.1/img/logo.png deleted file mode 100644 index 2d2c0b2..0000000 Binary files a/libraries/filemanager-9.12.1/img/logo.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/preview.png b/libraries/filemanager-9.12.1/img/preview.png deleted file mode 100644 index b124752..0000000 Binary files a/libraries/filemanager-9.12.1/img/preview.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/processing.gif b/libraries/filemanager-9.12.1/img/processing.gif deleted file mode 100644 index 7c99504..0000000 Binary files a/libraries/filemanager-9.12.1/img/processing.gif and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/rename.png b/libraries/filemanager-9.12.1/img/rename.png deleted file mode 100644 index a425ee7..0000000 Binary files a/libraries/filemanager-9.12.1/img/rename.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/size.png b/libraries/filemanager-9.12.1/img/size.png deleted file mode 100644 index fcc302f..0000000 Binary files a/libraries/filemanager-9.12.1/img/size.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/sort.png b/libraries/filemanager-9.12.1/img/sort.png deleted file mode 100644 index 0a029be..0000000 Binary files a/libraries/filemanager-9.12.1/img/sort.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/storing_animation.gif b/libraries/filemanager-9.12.1/img/storing_animation.gif deleted file mode 100644 index eca3a53..0000000 Binary files a/libraries/filemanager-9.12.1/img/storing_animation.gif and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/trans.jpg b/libraries/filemanager-9.12.1/img/trans.jpg deleted file mode 100644 index 147175e..0000000 Binary files a/libraries/filemanager-9.12.1/img/trans.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/up.png b/libraries/filemanager-9.12.1/img/up.png deleted file mode 100644 index 680dade..0000000 Binary files a/libraries/filemanager-9.12.1/img/up.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/upload.png b/libraries/filemanager-9.12.1/img/upload.png deleted file mode 100644 index 7380e8f..0000000 Binary files a/libraries/filemanager-9.12.1/img/upload.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/url.png b/libraries/filemanager-9.12.1/img/url.png deleted file mode 100644 index f18499a..0000000 Binary files a/libraries/filemanager-9.12.1/img/url.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/img/zip.png b/libraries/filemanager-9.12.1/img/zip.png deleted file mode 100644 index 9ef55c7..0000000 Binary files a/libraries/filemanager-9.12.1/img/zip.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/include/FtpClient.php b/libraries/filemanager-9.12.1/include/FtpClient.php deleted file mode 100644 index 4283b8a..0000000 --- a/libraries/filemanager-9.12.1/include/FtpClient.php +++ /dev/null @@ -1,884 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * @copyright Nicolas Tallefourtane http://nicolab.net - */ -namespace FtpClient; - -use \Countable; - -/** - * The FTP and SSL-FTP client for PHP. - * - * @method bool alloc() alloc(int $filesize, string &$result = null) Allocates space for a file to be uploaded - * @method bool cdup() cdup() Changes to the parent directory - * @method bool chdir() chdir(string $directory) Changes the current directory on a FTP server - * @method int chmod() chmod(int $mode, string $filename) Set permissions on a file via FTP - * @method bool delete() delete(string $path) Deletes a file on the FTP server - * @method bool exec() exec(string $command) Requests execution of a command on the FTP server - * @method bool fget() fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server and saves to an open file - * @method bool fput() fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Uploads from an open file to the FTP server - * @method mixed get_option() get_option(int $option) Retrieves various runtime behaviours of the current FTP stream - * @method bool get() get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server - * @method int mdtm() mdtm(string $remote_file) Returns the last modified time of the given file - * @method int nb_continue() nb_continue() Continues retrieving/sending a file (non-blocking) - * @method int nb_fget() nb_fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to an open file (non-blocking) - * @method int nb_fput() nb_fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Stores a file from an open file to the FTP server (non-blocking) - * @method int nb_get() nb_get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to a local file (non-blocking) - * @method int nb_put() nb_put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Stores a file on the FTP server (non-blocking) - * @method bool pasv() pasv(bool $pasv) Turns passive mode on or off - * @method bool put() put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Uploads a file to the FTP server - * @method string pwd() pwd() Returns the current directory name - * @method bool quit() quit() Closes an FTP connection - * @method array raw() raw(string $command) Sends an arbitrary command to an FTP server - * @method bool rename() rename(string $oldname, string $newname) Renames a file or a directory on the FTP server - * @method bool set_option() set_option(int $option, mixed $value) Set miscellaneous runtime FTP options - * @method bool site() site(string $command) Sends a SITE command to the server - * @method int size() size(string $remote_file) Returns the size of the given file - * @method string systype() systype() Returns the system type identifier of the remote FTP server - * - * @author Nicolas Tallefourtane - */ -class FtpClient implements Countable -{ - /** - * The connection with the server. - * - * @var resource - */ - protected $conn; - - /** - * PHP FTP functions wrapper. - * - * @var FtpWrapper - */ - private $ftp; - - /** - * Constructor. - * - * @param resource|null $connection - * @throws FtpException If FTP extension is not loaded. - */ - public function __construct($connection = null) - { - if (!extension_loaded('ftp')) { - throw new FtpException('FTP extension is not loaded!'); - } - - if ($connection) { - $this->conn = $connection; - } - - $this->setWrapper(new FtpWrapper($this->conn)); - } - - /** - * Close the connection when the object is destroyed. - */ - public function __destruct() - { - if ($this->conn) { - $this->ftp->close(); - } - } - - /** - * Call an internal method or a FTP method handled by the wrapper. - * - * Wrap the FTP PHP functions to call as method of FtpClient object. - * The connection is automaticaly passed to the FTP PHP functions. - * - * @param string $method - * @param array $arguments - * @return mixed - * @throws FtpException When the function is not valid - */ - public function __call($method, array $arguments) - { - return $this->ftp->__call($method, $arguments); - } - - /** - * Overwrites the PHP limit - * - * @param string|null $memory The memory limit, if null is not modified - * @param int $time_limit The max execution time, unlimited by default - * @param bool $ignore_user_abort Ignore user abort, true by default - * @return FtpClient - */ - public function setPhpLimit($memory = null, $time_limit = 0, $ignore_user_abort = true) - { - if (null !== $memory) { - ini_set('memory_limit', $memory); - } - - ignore_user_abort(true); - set_time_limit($time_limit); - - return $this; - } - - /** - * Get the help information of the remote FTP server. - * - * @return array - */ - public function help() - { - return $this->ftp->raw('help'); - } - - /** - * Open a FTP connection. - * - * @param string $host - * @param bool $ssl - * @param int $port - * @param int $timeout - * - * @return FTPClient - * @throws FtpException If unable to connect - */ - public function connect($host, $ssl = false, $port = 21, $timeout = 90) - { - if ($ssl) { - $this->conn = @$this->ftp->ssl_connect($host, $port, $timeout); - } else { - $this->conn = @$this->ftp->connect($host, $port, $timeout); - } - - if (!$this->conn) { - throw new FtpException('Unable to connect'); - } - - return $this; - } - - /** - * Closes the current FTP connection. - * - * @return bool - */ - public function close() - { - if ($this->conn) { - $this->ftp->close(); - $this->conn = null; - } - } - - /** - * Get the connection with the server. - * - * @return resource - */ - public function getConnection() - { - return $this->conn; - } - - /** - * Get the wrapper. - * - * @return FtpWrapper - */ - public function getWrapper() - { - return $this->ftp; - } - - /** - * Logs in to an FTP connection. - * - * @param string $username - * @param string $password - * - * @return FtpClient - * @throws FtpException If the login is incorrect - */ - public function login($username = 'anonymous', $password = '') - { - $result = $this->ftp->login($username, $password); - - if ($result === false) { - throw new FtpException('Login incorrect'); - } - - return $this; - } - - /** - * Returns the last modified time of the given file. - * Return -1 on error - * - * @param string $remoteFile - * @param string|null $format - * - * @return int - */ - public function modifiedTime($remoteFile, $format = null) - { - $time = $this->ftp->mdtm($remoteFile); - - if ($time !== -1 && $format !== null) { - return date($format, $time); - } - - return $time; - } - - /** - * Changes to the parent directory. - * - * @throws FtpException - * @return FtpClient - */ - public function up() - { - $result = @$this->ftp->cdup(); - - if ($result === false) { - throw new FtpException('Unable to get parent folder'); - } - - return $this; - } - - /** - * Returns a list of files in the given directory. - * - * @param string $directory The directory, by default is "." the current directory - * @param bool $recursive - * @param callable $filter A callable to filter the result, by default is asort() PHP function. - * The result is passed in array argument, - * must take the argument by reference ! - * The callable should proceed with the reference array - * because is the behavior of several PHP sorting - * functions (by reference ensure directly the compatibility - * with all PHP sorting functions). - * - * @return array - * @throws FtpException If unable to list the directory - */ - public function nlist($directory = '.', $recursive = false, $filter = 'sort') - { - if (!$this->isDir($directory)) { - throw new FtpException('"'.$directory.'" is not a directory'); - } - - $files = $this->ftp->nlist($directory); - - if ($files === false) { - throw new FtpException('Unable to list directory'); - } - - $result = array(); - $dir_len = strlen($directory); - - // if it's the current - if (false !== ($kdot = array_search('.', $files))) { - unset($files[$kdot]); - } - - // if it's the parent - if(false !== ($kdot = array_search('..', $files))) { - unset($files[$kdot]); - } - - if (!$recursive) { - foreach ($files as $file) { - $result[] = $directory.'/'.$file; - } - - // working with the reference (behavior of several PHP sorting functions) - $filter($result); - - return $result; - } - - // utils for recursion - $flatten = function (array $arr) use (&$flatten) { - - $flat = []; - - foreach ($arr as $k => $v) { - if (is_array($v)) { - $flat = array_merge($flat, $flatten($v)); - } else { - $flat[] = $v; - } - } - - return $flat; - }; - - foreach ($files as $file) { - $file = $directory.'/'.$file; - - // if contains the root path (behavior of the recursivity) - if (0 === strpos($file, $directory, $dir_len)) { - $file = substr($file, $dir_len); - } - - if ($this->isDir($file)) { - $result[] = $file; - $items = $flatten($this->nlist($file, true, $filter)); - - foreach ($items as $item) { - $result[] = $item; - } - - } else { - $result[] = $file; - } - } - - $result = array_unique($result); - - $filter($result); - - return $result; - } - - /** - * Creates a directory. - * - * @see FtpClient::rmdir() - * @see FtpClient::remove() - * @see FtpClient::put() - * @see FtpClient::putAll() - * - * @param string $directory The directory - * @param bool $recursive - * @return array - */ - public function mkdir($directory, $recursive = false) - { - if (!$recursive or $this->isDir($directory)) { - return $this->ftp->mkdir($directory); - } - - $result = false; - $pwd = $this->ftp->pwd(); - $parts = explode('/', $directory); - - foreach ($parts as $part) { - - if (!@$this->ftp->chdir($part)) { - $result = $this->ftp->mkdir($part); - $this->ftp->chdir($part); - } - } - - $this->ftp->chdir($pwd); - - return $result; - } - - /** - * Remove a directory. - * - * @see FtpClient::mkdir() - * @see FtpClient::cleanDir() - * @see FtpClient::remove() - * @see FtpClient::delete() - * @param string $directory - * @param bool $recursive Forces deletion if the directory is not empty - * @return bool - * @throws FtpException If unable to list the directory to remove - */ - public function rmdir($directory, $recursive = true) - { - if ($recursive) { - $files = $this->nlist($directory, false, 'rsort'); - - // remove children - foreach ($files as $file) { - $this->remove($file, true); - } - } - - // remove the directory - return $this->ftp->rmdir($directory); - } - - /** - * Empty directory. - * - * @see FtpClient::remove() - * @see FtpClient::delete() - * @see FtpClient::rmdir() - * - * @param string $directory - * @return bool - */ - public function cleanDir($directory) - { - if(!$files = $this->nlist($directory)) { - return $this->isEmpty($directory); - } - - // remove children - foreach ($files as $file) { - $this->remove($file, true); - } - - return $this->isEmpty($directory); - } - - /** - * Remove a file or a directory. - * - * @see FtpClient::rmdir() - * @see FtpClient::cleanDir() - * @see FtpClient::delete() - * @param string $path The path of the file or directory to remove - * @param bool $recursive Is effective only if $path is a directory, {@see FtpClient::rmdir()} - * @return bool - */ - public function remove($path, $recursive = false) - { - try { - if (@$this->ftp->delete($path) - or ($this->isDir($path) and @$this->rmdir($path, $recursive))) { - return true; - } - - return false; - } catch (\Exception $e) { - return false; - } - } - - /** - * Check if a directory exist. - * - * @param string $directory - * @return bool - * @throws FtpException - */ - public function isDir($directory) - { - $pwd = $this->ftp->pwd(); - - if ($pwd === false) { - throw new FtpException('Unable to resolve the current directory'); - } - - if (@$this->ftp->chdir($directory)) { - $this->ftp->chdir($pwd); - return true; - } - - $this->ftp->chdir($pwd); - - return false; - } - - /** - * Check if a directory is empty. - * - * @param string $directory - * @return bool - */ - public function isEmpty($directory) - { - return $this->count($directory, null, false) === 0 ? true : false; - } - - /** - * Scan a directory and returns the details of each item. - * - * @see FtpClient::nlist() - * @see FtpClient::rawlist() - * @see FtpClient::parseRawList() - * @see FtpClient::dirSize() - * @param string $directory - * @param bool $recursive - * @return array - */ - public function scanDir($directory = '.', $recursive = false) - { - return $this->parseRawList($this->rawlist($directory, $recursive)); - } - - /** - * Returns the total size of the given directory in bytes. - * - * @param string $directory The directory, by default is the current directory. - * @param bool $recursive true by default - * @return int The size in bytes. - */ - public function dirSize($directory = '.', $recursive = true) - { - $items = $this->scanDir($directory, $recursive); - $size = 0; - - foreach ($items as $item) { - $size += (int) $item['size']; - } - - return $size; - } - - /** - * Count the items (file, directory, link, unknown). - * - * @param string $directory The directory, by default is the current directory. - * @param string|null $type The type of item to count (file, directory, link, unknown) - * @param bool $recursive true by default - * @return int - */ - public function count($directory = '.', $type = null, $recursive = true) - { - $items = (null === $type ? $this->nlist($directory, $recursive) - : $this->scanDir($directory, $recursive)); - - $count = 0; - foreach ($items as $item) { - if (null === $type or $item['type'] == $type) { - $count++; - } - } - - return $count; - } - - /** - * Uploads a file to the server from a string. - * - * @param string $remote_file - * @param string $content - * @return FtpClient - * @throws FtpException When the transfer fails - */ - public function putFromString($remote_file, $content) - { - $handle = fopen('php://temp', 'w'); - - fwrite($handle, $content); - rewind($handle); - - if ($this->ftp->fput($remote_file, $handle, FTP_BINARY)) { - return $this; - } - - throw new FtpException('Unable to put the file "'.$remote_file.'"'); - } - - /** - * Uploads a file to the server. - * - * @param string $local_file - * @return FtpClient - * @throws FtpException When the transfer fails - */ - public function putFromPath($local_file) - { - $remote_file = basename($local_file); - $handle = fopen($local_file, 'r'); - - if ($this->ftp->fput($remote_file, $handle, FTP_BINARY)) { - rewind($handle); - return $this; - } - - throw new FtpException( - 'Unable to put the remote file from the local file "'.$local_file.'"' - ); - } - - /** - * Upload files. - * - * @param string $source_directory - * @param string $target_directory - * @param int $mode - * @return FtpClient - */ - public function putAll($source_directory, $target_directory, $mode = FTP_BINARY) - { - $d = dir($source_directory); - - // do this for each file in the directory - while ($file = $d->read()) { - - // to prevent an infinite loop - if ($file != "." && $file != "..") { - - // do the following if it is a directory - if (is_dir($source_directory.'/'.$file)) { - - if (!$this->isDir($target_directory.'/'.$file)) { - - // create directories that do not yet exist - $this->ftp->mkdir($target_directory.'/'.$file); - } - - // recursive part - $this->putAll( - $source_directory.'/'.$file, $target_directory.'/'.$file, - $mode - ); - } else { - - // put the files - $this->ftp->put( - $target_directory.'/'.$file, $source_directory.'/'.$file, - $mode - ); - } - } - } - - return $this; - } - - /** - * Returns a detailed list of files in the given directory. - * - * @see FtpClient::nlist() - * @see FtpClient::scanDir() - * @see FtpClient::dirSize() - * @param string $directory The directory, by default is the current directory - * @param bool $recursive - * @return array - * @throws FtpException - */ - public function rawlist($directory = '.', $recursive = false) - { - if (!$this->isDir($directory)) { - throw new FtpException('"'.$directory.'" is not a directory.'); - } - - $list = $this->ftp->rawlist($directory); - $items = array(); - - if (!$list) { - return $items; - } - - if (false == $recursive) { - - foreach ($list as $path => $item) { - $chunks = preg_split("/\s+/", $item); - - // if not "name" - if (empty($chunks[8]) || $chunks[8] == '.' || $chunks[8] == '..') { - continue; - } - - $path = $directory.'/'.$chunks[8]; - - if (isset($chunks[9])) { - $nbChunks = count($chunks); - - for ($i = 9; $i < $nbChunks; $i++) { - $path .= ' '.$chunks[$i]; - } - } - - - if (substr($path, 0, 2) == './') { - $path = substr($path, 2); - } - - $items[ $this->rawToType($item).'#'.$path ] = $item; - } - - return $items; - } - - $path = ''; - - foreach ($list as $item) { - $len = strlen($item); - - if (!$len - - // "." - || ($item[$len-1] == '.' && $item[$len-2] == ' ' - - // ".." - or $item[$len-1] == '.' && $item[$len-2] == '.' && $item[$len-3] == ' ') - ){ - - continue; - } - - $chunks = preg_split("/\s+/", $item); - - // if not "name" - if (empty($chunks[8]) || $chunks[8] == '.' || $chunks[8] == '..') { - continue; - } - - $path = $directory.'/'.$chunks[8]; - - if (isset($chunks[9])) { - $nbChunks = count($chunks); - - for ($i = 9; $i < $nbChunks; $i++) { - $path .= ' '.$chunks[$i]; - } - } - - if (substr($path, 0, 2) == './') { - $path = substr($path, 2); - } - - $items[$this->rawToType($item).'#'.$path] = $item; - - if ($item[0] == 'd') { - $sublist = $this->rawlist($path, true); - - foreach ($sublist as $subpath => $subitem) { - $items[$subpath] = $subitem; - } - } - } - - return $items; - } - - /** - * Parse raw list. - * - * @see FtpClient::rawlist() - * @see FtpClient::scanDir() - * @see FtpClient::dirSize() - * @param array $rawlist - * @return array - */ - public function parseRawList(array $rawlist) - { - $items = array(); - $path = ''; - - foreach ($rawlist as $key => $child) { - $chunks = preg_split("/\s+/", $child); - - if (isset($chunks[8]) && ($chunks[8] == '.' or $chunks[8] == '..')) { - continue; - } - - if (count($chunks) === 1) { - $len = strlen($chunks[0]); - - if ($len && $chunks[0][$len-1] == ':') { - $path = substr($chunks[0], 0, -1); - } - - continue; - } - - $item = [ - 'permissions' => $chunks[0], - 'number' => $chunks[1], - 'owner' => $chunks[2], - 'group' => $chunks[3], - 'size' => $chunks[4], - 'month' => $chunks[5], - 'day' => $chunks[6], - 'time' => $chunks[7], - 'name' => $chunks[8], - 'type' => $this->rawToType($chunks[0]), - ]; - - unset($chunks[0]); - unset($chunks[1]); - unset($chunks[2]); - unset($chunks[3]); - unset($chunks[4]); - unset($chunks[5]); - unset($chunks[6]); - unset($chunks[7]); - $item['name'] = implode(' ', $chunks); - - if ($item['type'] == 'link') { - $item['target'] = $chunks[10]; // 9 is "->" - } - - // if the key is not the path, behavior of ftp_rawlist() PHP function - if (is_int($key) || false === strpos($key, $item['name'])) { - array_splice($chunks, 0, 8); - - $key = $item['type'].'#' - .($path ? $path.'/' : '') - .implode(" ", $chunks); - - if ($item['type'] == 'link') { - - // get the first part of 'link#the-link.ext -> /path/of/the/source.ext' - $exp = explode(' ->', $key); - $key = rtrim($exp[0]); - } - - $items[$key] = $item; - - } else { - - // the key is the path, behavior of FtpClient::rawlist() method() - $items[$key] = $item; - } - } - - return $items; - } - - /** - * Convert raw info (drwx---r-x ...) to type (file, directory, link, unknown). - * Only the first char is used for resolving. - * - * @param string $permission Example : drwx---r-x - * - * @return string The file type (file, directory, link, unknown) - * @throws FtpException - */ - public function rawToType($permission) - { - if (!is_string($permission)) { - throw new FtpException('The "$permission" argument must be a string, "' - .gettype($permission).'" given.'); - } - - if (empty($permission[0])) { - return 'unknown'; - } - - switch ($permission[0]) { - case '-': - return 'file'; - - case 'd': - return 'directory'; - - case 'l': - return 'link'; - - default: - return 'unknown'; - } - } - - /** - * Set the wrapper which forward the PHP FTP functions to use in FtpClient instance. - * - * @param FtpWrapper $wrapper - * @return FtpClient - */ - protected function setWrapper(FtpWrapper $wrapper) - { - $this->ftp = $wrapper; - - return $this; - } -} diff --git a/libraries/filemanager-9.12.1/include/FtpException.php b/libraries/filemanager-9.12.1/include/FtpException.php deleted file mode 100644 index f17ed7f..0000000 --- a/libraries/filemanager-9.12.1/include/FtpException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * @copyright Nicolas Tallefourtane http://nicolab.net - */ -namespace FtpClient; - -/** - * The FtpException class. - * Exception thrown if an error on runtime of the FTP client occurs. - * @inheritDoc - * @author Nicolas Tallefourtane - */ -class FtpException extends \Exception {} diff --git a/libraries/filemanager-9.12.1/include/FtpWrapper.php b/libraries/filemanager-9.12.1/include/FtpWrapper.php deleted file mode 100644 index cd12de0..0000000 --- a/libraries/filemanager-9.12.1/include/FtpWrapper.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * @copyright Nicolas Tallefourtane http://nicolab.net - */ -namespace FtpClient; - -/** - * Wrap the PHP FTP functions - * - * @method bool alloc() alloc(int $filesize, string &$result = null) Allocates space for a file to be uploaded - * @method bool cdup() cdup() Changes to the parent directory - * @method bool chdir() chdir(string $directory) Changes the current directory on a FTP server - * @method int chmod() chmod(int $mode, string $filename) Set permissions on a file via FTP - * @method bool close() close() Closes an FTP connection - * @method bool delete() delete(string $path) Deletes a file on the FTP server - * @method bool exec() exec(string $command) Requests execution of a command on the FTP server - * @method bool fget() fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server and saves to an open file - * @method bool fput() fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Uploads from an open file to the FTP server - * @method mixed get_option() get_option(int $option) Retrieves various runtime behaviours of the current FTP stream - * @method bool get() get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Downloads a file from the FTP server - * @method bool login() login(string $username, string $password) Logs in to an FTP connection - * @method int mdtm() mdtm(string $remote_file) Returns the last modified time of the given file - * @method string mkdir() mkdir(string $directory) Creates a directory - * @method int nb_continue() nb_continue() Continues retrieving/sending a file (non-blocking) - * @method int nb_fget() nb_fget(resource $handle, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to an open file (non-blocking) - * @method int nb_fput() nb_fput(string $remote_file, resource $handle, int $mode, int $startpos = 0) Stores a file from an open file to the FTP server (non-blocking) - * @method int nb_get() nb_get(string $local_file, string $remote_file, int $mode, int $resumepos = 0) Retrieves a file from the FTP server and writes it to a local file (non-blocking) - * @method int nb_put() nb_put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Stores a file on the FTP server (non-blocking) - * @method array nlist() nlist(string $directory) Returns a list of files in the given directory - * @method bool pasv() pasv(bool $pasv) Turns passive mode on or off - * @method bool put() put(string $remote_file, string $local_file, int $mode, int $startpos = 0) Uploads a file to the FTP server - * @method string pwd() pwd() Returns the current directory name - * @method bool quit() quit() Closes an FTP connection - * @method array raw() raw(string $command) Sends an arbitrary command to an FTP server - * @method array rawlist() rawlist(string $directory, bool $recursive = false) Returns a detailed list of files in the given directory - * @method bool rename() rename(string $oldname, string $newname) Renames a file or a directory on the FTP server - * @method bool rmdir() rmdir(string $directory) Removes a directory - * @method bool set_option() set_option(int $option, mixed $value) Set miscellaneous runtime FTP options - * @method bool site() site(string $command) Sends a SITE command to the server - * @method int size() size(string $remote_file) Returns the size of the given file - * @method string systype() systype() Returns the system type identifier of the remote FTP server - * - * @author Nicolas Tallefourtane - */ -class FtpWrapper -{ - /** - * The connection with the server - * - * @var resource - */ - protected $conn; - - /** - * Constructor. - * - * @param resource &$connection The FTP (or SSL-FTP) connection (takes by reference). - */ - public function __construct(&$connection) - { - $this->conn = &$connection; - } - - /** - * Forward the method call to FTP functions - * - * @param string $function - * @param array $arguments - * @return mixed - * @throws FtpException When the function is not valid - */ - public function __call($function, array $arguments) - { - $function = 'ftp_' . $function; - - if (function_exists($function)) { - array_unshift($arguments, $this->conn); - return call_user_func_array($function, $arguments); - } - - throw new FtpException("{$function} is not a valid FTP function"); - } - - /** - * Opens a FTP connection - * - * @param string $host - * @param int $port - * @param int $timeout - * @return resource - */ - public function connect($host, $port = 21, $timeout = 90) - { - return ftp_connect($host, $port, $timeout); - } - - /** - * Opens a Secure SSL-FTP connection - * @param string $host - * @param int $port - * @param int $timeout - * @return resource - */ - public function ssl_connect($host, $port = 21, $timeout = 90) - { - return ftp_ssl_connect($host, $port, $timeout); - } -} diff --git a/libraries/filemanager-9.12.1/include/Response.php b/libraries/filemanager-9.12.1/include/Response.php deleted file mode 100644 index ae9f10c..0000000 --- a/libraries/filemanager-9.12.1/include/Response.php +++ /dev/null @@ -1,365 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', // RFC2518 - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', // RFC4918 - 208 => 'Already Reported', // RFC5842 - 226 => 'IM Used', // RFC3229 - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Reserved', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', // RFC7238 - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', // RFC2324 - 422 => 'Unprocessable Entity', // RFC4918 - 423 => 'Locked', // RFC4918 - 424 => 'Failed Dependency', // RFC4918 - 425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817 - 426 => 'Upgrade Required', // RFC2817 - 428 => 'Precondition Required', // RFC6585 - 429 => 'Too Many Requests', // RFC6585 - 431 => 'Request Header Fields Too Large', // RFC6585 - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates (Experimental)', // RFC2295 - 507 => 'Insufficient Storage', // RFC4918 - 508 => 'Loop Detected', // RFC5842 - 510 => 'Not Extended', // RFC2774 - 511 => 'Network Authentication Required', // RFC6585 - ); - - /** - * @var string - */ - protected $content; - - /** - * @var int - */ - protected $statusCode; - - /** - * @var string - */ - protected $statusText; - - /** - * @var array - */ - public $headers; - - /** - * @var string - */ - protected $version; - - /** - * Construct the response - * - * @param mixed $content - * @param int $statusCode - * @param array $headers - */ - public function __construct($content = '', $statusCode = 200, $headers = array()) - { - $this->setContent($content); - $this->setStatusCode($statusCode); - $this->headers = $headers; - $this->version = '1.1'; - } - - /** - * Set the content on the response. - * - * @param mixed $content - * @return $this - */ - public function setContent($content) - { - if ($content instanceof ArrayObject || is_array($content)) - { - $this->headers['Content-Type'] = array('application/json'); - - $content = json_encode($content); - } - - $this->content = $content; - } - - /** - * Returns the Response as an HTTP string. - * - * The string representation of the Response is the same as the - * one that will be sent to the client only if the prepare() method - * has been called before. - * - * @return string The Response as an HTTP string - * - * @see prepare() - */ - public function __toString() - { - return - sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n". - $this->headers."\r\n". - $this->getContent(); - } - - /** - * Sets the response status code. - * - * @param int $code HTTP status code - * @param mixed $text HTTP status text - * - * If the status text is null it will be automatically populated for the known - * status codes and left empty otherwise. - * - * @return Response - * - * @throws \InvalidArgumentException When the HTTP status code is not valid - * - * @api - */ - public function setStatusCode($code, $text = null) - { - $this->statusCode = $code = (int) $code; - if ($this->isInvalid()) { - throw new InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code)); - } - - if (null === $text) { - $this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : ''; - - return $this; - } - - if (false === $text) { - $this->statusText = ''; - - return $this; - } - - $this->statusText = $text; - - return $this; - } - - // http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - /** - * Is response invalid? - * - * @return bool - * - * @api - */ - public function isInvalid() - { - return $this->statusCode < 100 || $this->statusCode >= 600; - } - - /** - * Set a header on the Response. - * - * @param string $key - * @param string $value - * @param bool $replace - * @return $this - */ - public function header($key, $value, $replace = true) - { - if (empty($this->headers[$key])) - { - $this->headers[$key] = array(); - } - if ($replace) - { - $this->headers[$key] = array($value); - } - else - { - $this->headers[$key][] = $value; - } - - return $this; - } - - /** - * Sends HTTP headers and content. - * - * @return Response - * - * @api - */ - public function send() - { - $this->sendHeaders(); - $this->sendContent(); - - if (function_exists('fastcgi_finish_request')) { - fastcgi_finish_request(); - } - - return $this; - } - - /** - * Sends content for the current web response. - * - * @return Response - */ - public function sendContent() - { - echo $this->content; - - return $this; - } - - /** - * Sends HTTP headers. - * - * @return Response - */ - public function sendHeaders() - { - // headers have already been sent by the developer - if (headers_sent()) { - return $this; - } - - // status - header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); - - // headers - foreach ($this->headers as $name => $values) { - if (is_array($values)) - { - foreach ($values as $value) - { - header($name . ': ' . $value, false, $this->statusCode); - } - } - else - { - header($name . ': ' . $values, false, $this->statusCode); - } - } - - return $this; - } -} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/include/ftp_class.php b/libraries/filemanager-9.12.1/include/ftp_class.php deleted file mode 100644 index 9c2ae22..0000000 --- a/libraries/filemanager-9.12.1/include/ftp_class.php +++ /dev/null @@ -1,82 +0,0 @@ -messageArray[] = $message; - } - - public function getMessages() - { - return $this->messageArray; - } - - public function connect ($server, $ftpUser, $ftpPassword, $isPassive = false) - { - - // *** Set up basic connection - $this->connectionId = ftp_connect($server); - - // *** Login with username and password - $loginResult = ftp_login($this->connectionId, $ftpUser, $ftpPassword); - - // *** Sets passive mode on/off (default off) - ftp_pasv($this->connectionId, $isPassive); - - // *** Check connection - if ((!$this->connectionId) || (!$loginResult)) { - $this->logMessage('FTP connection has failed!'); - $this->logMessage('Attempted to connect to ' . $server . ' for user ' . $ftpUser, true); - return false; - } else { - $this->logMessage('Connected to ' . $server . ', for user ' . $ftpUser); - $this->loginOk = true; - return true; - } - } - public function makeDir($directory) - { - // *** If creating a directory is successful... - if (ftp_mkdir($this->connectionId, $directory)) { - - $this->logMessage('Directory "' . $directory . '" created successfully'); - return true; - - } else { - - // *** ...Else, FAIL. - $this->logMessage('Failed creating directory "' . $directory . '"'); - return false; - } - } - - public function changeDir($directory) - { - if (ftp_chdir($this->connectionId, $directory)) { - $this->logMessage('Current directory is now: ' . ftp_pwd($this->connectionId)); - return true; - } else { - $this->logMessage('Couldn\'t change directory'); - return false; - } - } - - public function getDirListing($directory = '.', $parameters = '-la') - { - echo shell_exec('whoami')." is who i am
"; - echo "Current directory is now: " . ftp_pwd($this->connectionId) . "
"; - - // get contents of the current directory - $contentsArray = ftp_rawlist($this->connectionId, $parameters . ' ' . $directory); - echo error_get_last(); - return $contentsArray; - } -} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/include/mime_type_lib.php b/libraries/filemanager-9.12.1/include/mime_type_lib.php deleted file mode 100644 index 86f192e..0000000 --- a/libraries/filemanager-9.12.1/include/mime_type_lib.php +++ /dev/null @@ -1,265 +0,0 @@ - "ps", - "audio/x-aiff" => "aiff", - "text/plain" => "txt", - "video/x-ms-asf" => "asx", - "audio/basic" => "snd", - "video/x-msvideo" => "avi", - "application/x-bcpio" => "bcpio", - "application/octet-stream" => "so", - "image/bmp" => "bmp", - "application/x-bzip2" => "bz2", - "application/x-netcdf" => "nc", - "application/x-kchart" => "chrt", - "application/x-cpio" => "cpio", - "application/mac-compactpro" => "cpt", - "application/x-csh" => "csh", - "text/css" => "css", - "application/x-director" => "dxr", - "image/vnd.djvu" => "djvu", - "application/x-dvi" => "dvi", - "image/vnd.dwg" => "dwg", - "application/epub" => "epub", - "application/epub+zip" => "epub", - "text/x-setext" => "etx", - "application/andrew-inset" => "ez", - "video/x-flv" => "flv", - "image/gif" => "gif", - "application/x-gtar" => "gtar", - "application/x-gzip" => "tgz", - "application/x-hdf" => "hdf", - "application/mac-binhex40" => "hqx", - "text/html" => "html", - "text/htm" => "htm", - "x-conference/x-cooltalk" => "ice", - "image/ief" => "ief", - "model/iges" => "igs", - "text/vnd.sun.j2me.app-descriptor" => "jad", - "application/x-java-archive" => "jar", - "application/x-java-jnlp-file" => "jnlp", - "image/jpeg" => "jpg", - "application/x-javascript" => "js", - "audio/midi" => "midi", - "application/x-killustrator" => "kil", - "application/x-kpresenter" => "kpt", - "application/x-kspread" => "ksp", - "application/x-kword" => "kwt", - "application/vnd.google-earth.kml+xml" => "kml", - "application/vnd.google-earth.kmz" => "kmz", - "application/x-latex" => "latex", - "audio/x-mpegurl" => "m3u", - "application/x-troff-man" => "man", - "application/x-troff-me" => "me", - "model/mesh" => "silo", - "application/vnd.mif" => "mif", - "video/quicktime" => "qt", - "video/x-sgi-movie" => "movie", - "audio/mpeg" => "mp3", - "video/mp4" => "mp4", - "video/mpeg" => "mpeg", - "application/x-troff-ms" => "ms", - "video/vnd.mpegurl" => "mxu", - "application/vnd.oasis.opendocument.database" => "odb", - "application/vnd.oasis.opendocument.chart" => "odc", - "application/vnd.oasis.opendocument.formula" => "odf", - "application/vnd.oasis.opendocument.graphics" => "odg", - "application/vnd.oasis.opendocument.image" => "odi", - "application/vnd.oasis.opendocument.text-master" => "odm", - "application/vnd.oasis.opendocument.presentation" => "odp", - "application/vnd.oasis.opendocument.spreadsheet" => "ods", - "application/vnd.oasis.opendocument.text" => "odt", - "application/ogg" => "ogg", - "video/ogg" => "ogv", - "application/vnd.oasis.opendocument.graphics-template" => "otg", - "application/vnd.oasis.opendocument.text-web" => "oth", - "application/vnd.oasis.opendocument.presentation-template" => "otp", - "application/vnd.oasis.opendocument.spreadsheet-template" => "ots", - "application/vnd.oasis.opendocument.text-template" => "ott", - "image/x-portable-bitmap" => "pbm", - "chemical/x-pdb" => "pdb", - "application/pdf" => "pdf", - "image/x-portable-graymap" => "pgm", - "application/x-chess-pgn" => "pgn", - "text/x-php" => "php", - "image/png" => "png", - "image/x-portable-anymap" => "pnm", - "image/x-portable-pixmap" => "ppm", - "application/vnd.ms-powerpoint" => "ppt", - "audio/x-realaudio" => "ra", - "audio/x-pn-realaudio" => "rm", - "image/x-cmu-raster" => "ras", - "image/x-rgb" => "rgb", - "application/x-troff" => "tr", - "application/x-rpm" => "rpm", - "text/rtf" => "rtf", - "text/richtext" => "rtx", - "text/sgml" => "sgml", - "application/x-sh" => "sh", - "application/x-shar" => "shar", - "application/vnd.symbian.install" => "sis", - "application/x-stuffit" => "sit", - "application/x-koan" => "skt", - "application/smil" => "smil", - "image/svg+xml" => "svg", - "application/x-futuresplash" => "spl", - "application/x-wais-source" => "src", - "application/vnd.sun.xml.calc.template" => "stc", - "application/vnd.sun.xml.draw.template" => "std", - "application/vnd.sun.xml.impress.template" => "sti", - "application/vnd.sun.xml.writer.template" => "stw", - "application/x-sv4cpio" => "sv4cpio", - "application/x-sv4crc" => "sv4crc", - "application/x-shockwave-flash" => "swf", - "application/vnd.sun.xml.calc" => "sxc", - "application/vnd.sun.xml.draw" => "sxd", - "application/vnd.sun.xml.writer.global" => "sxg", - "application/vnd.sun.xml.impress" => "sxi", - "application/vnd.sun.xml.math" => "sxm", - "application/vnd.sun.xml.writer" => "sxw", - "application/x-tar" => "tar", - "application/x-tcl" => "tcl", - "application/x-tex" => "tex", - "application/x-texinfo" => "texinfo", - "image/tiff" => "tiff", - "application/x-bittorrent" => "torrent", - "text/tab-separated-values" => "tsv", - "application/x-ustar" => "ustar", - "application/x-cdlink" => "vcd", - "model/vrml" => "wrl", - "audio/x-wav" => "wav", - "audio/x-ms-wax" => "wax", - "image/vnd.wap.wbmp" => "wbmp", - "application/vnd.wap.wbxml" => "wbxml", - "video/x-ms-wm" => "wm", - "audio/x-ms-wma" => "wma", - "text/vnd.wap.wml" => "wml", - "application/vnd.wap.wmlc" => "wmlc", - "text/vnd.wap.wmlscript" => "wmls", - "application/vnd.wap.wmlscriptc" => "wmlsc", - "video/x-ms-wmv" => "wmv", - "video/x-ms-wmx" => "wmx", - "video/x-ms-wvx" => "wvx", - "image/x-xbitmap" => "xbm", - "application/xhtml+xml" => "xhtml", - "application/xml" => "xml", - "image/x-xpixmap" => "xpm", - "text/xsl" => "xsl", - "image/x-xwindowdump" => "xwd", - "chemical/x-xyz" => "xyz", - "application/zip" => "zip", - "application/msword" => "doc", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document" => "docx", - "application/vnd.openxmlformats-officedocument.wordprocessingml.template" => "dotx", - "application/vnd.ms-word.document.macroEnabled.12" => "docm", - "application/vnd.ms-excel" => "xls", - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" => "xlsx", - "application/vnd.openxmlformats-officedocument.spreadsheetml.template" => "xltx", - "application/vnd.ms-excel.sheet.macroEnabled.12" => "xlsm", - "application/vnd.ms-excel.template.macroEnabled.12" => "xltm", - "application/vnd.ms-excel.addin.macroEnabled.12" => "xlam", - "application/vnd.ms-excel.sheet.binary.macroEnabled.12" => "xlsb", - "application/vnd.openxmlformats-officedocument.presentationml.presentation" => "pptx", - "application/vnd.openxmlformats-officedocument.presentationml.template" => "potx", - "application/vnd.openxmlformats-officedocument.presentationml.slideshow" => "ppsx", - "application/vnd.ms-powerpoint.addin.macroEnabled.12" => "ppam", - "application/vnd.ms-powerpoint.presentation.macroEnabled.12" => "pptm", - "application/vnd.ms-powerpoint.template.macroEnabled.12" => "potm", - "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" => "ppsm", -); - - -if ( ! function_exists('get_extension_from_mime')) -{ - function get_extension_from_mime($mime){ - global $mime_types; - if(strpos($mime, ';')!==FALSE){ - $mime = substr($mime, 0,strpos($mime, ';')); - } - if(isset($mime_types[$mime])){ - return $mime_types[$mime]; - } - return ''; - } -} - -if ( ! function_exists('get_file_mime_type')) -{ - function get_file_mime_type($filename, $debug = false) - { - if (function_exists('finfo_open') && function_exists('finfo_file') && function_exists('finfo_close')) - { - $fileinfo = finfo_open(FILEINFO_MIME_TYPE); - $mime_type = finfo_file($fileinfo, $filename); - finfo_close($fileinfo); - - if ( ! empty($mime_type)) - { - if (true === $debug) - { - return array( 'mime_type' => $mime_type, 'method' => 'fileinfo' ); - } - - return $mime_type; - } - } - - if (function_exists('mime_content_type')) - { - $mime_type = mime_content_type($filename); - - if ( ! empty($mime_type)) - { - if (true === $debug) - { - return array( 'mime_type' => $mime_type, 'method' => 'mime_content_type' ); - } - - return $mime_type; - } - } - - global $mime_types; - $mime_types = array_flip($mime_types); - - $tmp_array = explode('.', $filename); - $ext = strtolower(array_pop($tmp_array)); - - if ( ! empty($mime_types[ $ext ])) - { - if (true === $debug) - { - return array( 'mime_type' => $mime_types[ $ext ], 'method' => 'from_array' ); - } - - return $mime_types[ $ext ]; - } - - if (true === $debug) - { - return array( 'mime_type' => 'application/octet-stream', 'method' => 'last_resort' ); - } - - return 'application/octet-stream'; - } -} - - -/******************** - * The following code can be used to test the function. - * First put a plain text file named "test.txt" and a - * JPEG image file named "image.jpg" in the same folder - * as this file. - * - * Simply remove the "REMOVE ME TO TEST" lines below to have - * the code run when this file runs. - * - * Run the code with this command: - * php mime_type_lib.php - ********************/ - - -/* REMOVE ME TO TEST -echo get_file_mime_type( 'test.txt' ) . "\n"; -echo print_r( get_file_mime_type( 'image.jpg', true ), true ) . "\n"; -REMOVE ME TO TEST */ diff --git a/libraries/filemanager-9.12.1/include/php_image_magician.php b/libraries/filemanager-9.12.1/include/php_image_magician.php deleted file mode 100644 index 2dcf402..0000000 --- a/libraries/filemanager-9.12.1/include/php_image_magician.php +++ /dev/null @@ -1,3963 +0,0 @@ - resizeImage(150, 100, 0); -# $magicianObj -> saveImage('images/car_small.jpg', 100); -# -# - See end of doc for more examples - -# -# Supported file types include: jpg, png, gif, bmp, psd (read) -# -# -# -# The following functions are taken from phpThumb() [available from -# http://phpthumb.sourceforge.net], and are used with written permission -# from James Heinrich. -# - GD2BMPstring -# - GetPixelColor -# - LittleEndian2String -# -# The following functions are from Marc Hibbins and are used with written -# permission (are also under the Attribution-ShareAlike -# [http://creativecommons.org/licenses/by-sa/3.0/] license. -# - -# -# PhpPsdReader is used with written permission from Tim de Koning. -# [http://www.kingsquare.nl/phppsdreader] -# -# -# -# Modificatoin history -# Date Initials Ver Description -# 10-05-11 J.C.O 0.0 Initial build -# 01-06-11 J.C.O 0.1.1 * Added reflections -# * Added Rounded corners -# * You can now use PNG interlacing -# * Added shadow -# * Added caption box -# * Added vintage filter -# * Added dynamic image resizing (resize on the fly) -# * minor bug fixes -# 05-06-11 J.C.O 0.1.1.1 * Fixed undefined variables -# 17-06-11 J.C.O 0.1.2 * Added image_batch_class.php class -# * Minor bug fixes -# 26-07-11 J.C.O 0.1.4 * Added support for external images -# * Can now set the crop poisition -# 03-08-11 J.C.O 0.1.5 * Added reset() method to reset resource to -# original input file. -# * Added method addTextToCaptionBox() to -# simplify adding text to a caption box. -# * Added experimental writeIPTC. (not finished) -# * Added experimental readIPTC. (not finished) -# 11-08-11 J.C.O * Added initial border presets. -# 30-08-11 J.C.O * Added 'auto' crop option to crop portrait -# images near the top. -# 08-09-11 J.C.O * Added cropImage() method to allow standalone -# cropping. -# 17-09-11 J.C.O * Added setCropFromTop() set method - set the -# percentage to crop from the top when using -# crop 'auto' option. -# * Added setTransparency() set method - allows you -# to turn transparency off (like when saving -# as a jpg). -# * Added setFillColor() set method - set the -# background color to use instead of transparency. -# 05-11-11 J.C.O 0.1.5.1 * Fixed interlacing option -# 0-07-12 J.C.O 1.0 -# -# Known issues & Limitations: -# ------------------------------- -# Not so much an issue, the image is destroyed on the deconstruct rather than -# when we have finished with it. The reason for this is that we don't know -# when we're finished with it as you can both save the image and display -# it directly to the screen (imagedestroy($this->imageResized)) -# -# Opening BMP files is slow. A test with 884 bmp files processed in a loop -# takes forever - over 5 min. This test inlcuded opening the file, then -# getting and displaying its width and height. -# -# $forceStretch: -# ------------------------------- -# On by default. -# $forceStretch can be disabled by calling method setForceStretch with false -# parameter. If disabled, if an images original size is smaller than the size -# specified by the user, the original size will be used. This is useful when -# dealing with small images. -# -# If enabled, images smaller than the size specified will be stretched to -# that size. -# -# Tips: -# ------------------------------- -# * If you're resizing a transparent png and saving it as a jpg, set -# $keepTransparency to false with: $magicianObj->setTransparency(false); -# -# FEATURES: -# * EASY TO USE -# * BMP SUPPORT (read & write) -# * PSD (photoshop) support (read) -# * RESIZE IMAGES -# - Preserve transparency (png, gif) -# - Apply sharpening (jpg) (requires PHP >= 5.1.0) -# - Set image quality (jpg, png) -# - Resize modes: -# - exact size -# - resize by width (auto height) -# - resize by height (auto width) -# - auto (automatically determine the best of the above modes to use) -# - crop - resize as best as it can then crop the rest -# - Force stretching of smaller images (upscale) -# * APPLY FILTERS -# - Convert to grey scale -# - Convert to black and white -# - Convert to sepia -# - Convert to negative -# * ROTATE IMAGES -# - Rotate using predefined "left", "right", or "180"; or any custom degree amount -# * EXTRACT EXIF DATA (requires exif module) -# - make -# - model -# - date -# - exposure -# - aperture -# - f-stop -# - iso -# - focal length -# - exposure program -# - metering mode -# - flash status -# - creator -# - copyright -# * ADD WATERMARK -# - Specify exact x, y placement -# - Or, specify using one of the 9 pre-defined placements such as "tl" -# (for top left), "m" (for middle), "br" (for bottom right) -# - also specify padding from edge amount (optional). -# - Set opacity of watermark (png). -# * ADD BORDER -# * USE HEX WHEN SPECIFYING COLORS (eg: #ffffff) -# * SAVE IMAGE OR OUTPUT TO SCREEN -# -# -# ========================================================================# - - -class imageLib { - - private $fileName; - private $image; - protected $imageResized; - private $widthOriginal; # Always be the original width - private $heightOriginal; - private $width; # Current width (width after resize) - private $height; - private $imageSize; - private $fileExtension; - - private $debug = true; - private $errorArray = array(); - - private $forceStretch = true; - private $aggresiveSharpening = false; - - private $transparentArray = array( '.png', '.gif' ); - private $keepTransparency = true; - private $fillColorArray = array( 'r' => 255, 'g' => 255, 'b' => 255 ); - - private $sharpenArray = array( 'jpg' ); - - private $psdReaderPath; - private $filterOverlayPath; - - private $isInterlace; - - private $captionBoxPositionArray = array(); - - private $fontDir = 'fonts'; - - private $cropFromTopPercent = 10; - - -## -------------------------------------------------------- - - function __construct($fileName) - # Author: Jarrod Oberto - # Date: 27-02-08 - # Purpose: Constructor - # Param in: $fileName: File name and path. - # Param out: n/a - # Reference: - # Notes: - # - { - if ( ! $this->testGDInstalled()) - { - if ($this->debug) - { - throw new Exception('The GD Library is not installed.'); - } - else - { - throw new Exception(); - } - }; - - $this->initialise(); - - // *** Save the image file name. Only store this incase you want to display it - $this->fileName = $fileName; - $this->fileExtension = fix_strtolower(strrchr($fileName, '.')); - - // *** Open up the file - $this->image = $this->openImage($fileName); - - - // *** Assign here so we don't modify the original - $this->imageResized = $this->image; - - // *** If file is an image - if ($this->testIsImage($this->image)) - { - // *** Get width and height - $this->width = imagesx($this->image); - $this->widthOriginal = imagesx($this->image); - $this->height = imagesy($this->image); - $this->heightOriginal = imagesy($this->image); - - - /* Added 15-09-08 - * Get the filesize using this build in method. - * Stores an array of size - * - * $this->imageSize[1] = width - * $this->imageSize[2] = height - * $this->imageSize[3] = width x height - * - */ - $this->imageSize = getimagesize($this->fileName); - - } - else - { - $this->errorArray[] = 'File is not an image'; - } - } - -## -------------------------------------------------------- - - private function initialise() - { - - $this->psdReaderPath = dirname(__FILE__) . '/classPhpPsdReader.php'; - $this->filterOverlayPath = dirname(__FILE__) . '/filters'; - - // *** Set if image should be interlaced or not. - $this->isInterlace = false; - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Resize -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - - public function resizeImage($newWidth, $newHeight, $option = 0, $sharpen = false, $autoRotate = false) - # Author: Jarrod Oberto - # Date: 27-02-08 - # Purpose: Resizes the image - # Param in: $newWidth: - # $newHeight: - # $option: 0 / exact = defined size; - # 1 / portrait = keep aspect set height; - # 2 / landscape = keep aspect set width; - # 3 / auto = auto; - # 4 / crop= resize and crop; - # - # $option can also be an array containing options for - # cropping. E.G., array('crop', 'r') - # - # This array only applies to 'crop' and the 'r' refers to - # "crop right". Other value include; tl, t, tr, l, m (default), - # r, bl, b, br, or you can specify your own co-ords (which - # isn't recommended. - # - # $sharpen: true: sharpen (jpg only); - # false: don't sharpen - # Param out: n/a - # Reference: - # Notes: To clarify the $option input: - # 0 = The exact height and width dimensions you set. - # 1 = Whatever height is passed in will be the height that - # is set. The width will be calculated and set automatically - # to a the value that keeps the original aspect ratio. - # 2 = The same but based on the width. We try make the image the - # biggest size we can while stil fitting inside the box size - # 3 = Depending whether the image is landscape or portrait, this - # will automatically determine whether to resize via - # dimension 1,2 or 0 - # 4 = Will resize and then crop the image for best fit - # - # forceStretch can be applied to options 1,2,3 and 4 - # - { - - // *** We can pass in an array of options to change the crop position - $cropPos = 'm'; - if (is_array($option) && fix_strtolower($option[0]) == 'crop') - { - $cropPos = $option[1]; # get the crop option - } - else - { - if (strpos($option, '-') !== false) - { - // *** Or pass in a hyphen seperated option - $optionPiecesArray = explode('-', $option); - $cropPos = end($optionPiecesArray); - } - } - - // *** Check the option is valid - $option = $this->prepOption($option); - - // *** Make sure the file passed in is valid - if ( ! $this->image) - { - if ($this->debug) - { - throw new Exception('file ' . $this->getFileName() . ' is missing or invalid'); - } - else - { - throw new Exception(); - } - }; - - // *** Get optimal width and height - based on $option - $dimensionsArray = $this->getDimensions($newWidth, $newHeight, $option); - - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - - // *** Resample - create image canvas of x, y size - $this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight); - $this->keepTransparancy($optimalWidth, $optimalHeight, $this->imageResized); - imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height); - - - // *** If '4', then crop too - if ($option == 4 || $option == 'crop') - { - - if (($optimalWidth >= $newWidth && $optimalHeight >= $newHeight)) - { - $this->crop($optimalWidth, $optimalHeight, $newWidth, $newHeight, $cropPos); - } - } - - // *** If Rotate. - if ($autoRotate) - { - - $exifData = $this->getExif(false); - if (count($exifData) > 0) - { - - switch ($exifData['orientation']) - { - case 8: - $this->imageResized = imagerotate($this->imageResized, 90, 0); - break; - case 3: - $this->imageResized = imagerotate($this->imageResized, 180, 0); - break; - case 6: - $this->imageResized = imagerotate($this->imageResized, -90, 0); - break; - } - } - } - - // *** Sharpen image (if jpg and the user wishes to do so) - if ($sharpen && in_array($this->fileExtension, $this->sharpenArray)) - { - - // *** Sharpen - $this->sharpen(); - } - } - -## -------------------------------------------------------- - - public function cropImage($newWidth, $newHeight, $cropPos = 'm') - # Author: Jarrod Oberto - # Date: 08-09-11 - # Purpose: Crops the image - # Param in: $newWidth: crop with - # $newHeight: crop height - # $cropPos: Can be any of the following: - # tl, t, tr, l, m, r, bl, b, br, auto - # Or: - # a custom position such as '30x50' - # Param out: n/a - # Reference: - # Notes: - # - { - - // *** Make sure the file passed in is valid - if ( ! $this->image) - { - if ($this->debug) - { - throw new Exception('file ' . $this->getFileName() . ' is missing or invalid'); - } - else - { - throw new Exception(); - } - }; - - $this->imageResized = $this->image; - $this->crop($this->width, $this->height, $newWidth, $newHeight, $cropPos); - - } - -## -------------------------------------------------------- - - private function keepTransparancy($width, $height, $im) - # Author: Jarrod Oberto - # Date: 08-04-11 - # Purpose: Keep transparency for png and gif image - # Param in: - # Param out: n/a - # Reference: - # Notes: - # - { - // *** If PNG, perform some transparency retention actions (gif untested) - if (in_array($this->fileExtension, $this->transparentArray) && $this->keepTransparency) - { - imagealphablending($im, false); - imagesavealpha($im, true); - $transparent = imagecolorallocatealpha($im, 255, 255, 255, 127); - imagefilledrectangle($im, 0, 0, $width, $height, $transparent); - } - else - { - $color = imagecolorallocate($im, $this->fillColorArray['r'], $this->fillColorArray['g'], $this->fillColorArray['b']); - imagefilledrectangle($im, 0, 0, $width, $height, $color); - } - } - -## -------------------------------------------------------- - - private function crop($optimalWidth, $optimalHeight, $newWidth, $newHeight, $cropPos) - # Author: Jarrod Oberto - # Date: 15-09-08 - # Purpose: Crops the image - # Param in: $newWidth: - # $newHeight: - # Param out: n/a - # Reference: - # Notes: - # - { - - // *** Get cropping co-ordinates - $cropArray = $this->getCropPlacing($optimalWidth, $optimalHeight, $newWidth, $newHeight, $cropPos); - $cropStartX = $cropArray['x']; - $cropStartY = $cropArray['y']; - - // *** Crop this bad boy - $crop = imagecreatetruecolor($newWidth, $newHeight); - $this->keepTransparancy($optimalWidth, $optimalHeight, $crop); - imagecopyresampled($crop, $this->imageResized, 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight, $newWidth, $newHeight); - - $this->imageResized = $crop; - - // *** Set new width and height to our variables - $this->width = $newWidth; - $this->height = $newHeight; - - } - -## -------------------------------------------------------- - - private function getCropPlacing($optimalWidth, $optimalHeight, $newWidth, $newHeight, $pos = 'm') - # - # Author: Jarrod Oberto - # Date: July 11 - # Purpose: Set the cropping area. - # Params in: - # Params out: (array) the crop x and y co-ordinates. - # Notes: When specifying the exact pixel crop position (eg 10x15), be - # very careful as it's easy to crop out of the image leaving - # black borders. - # - { - $pos = fix_strtolower($pos); - - // *** If co-ords have been entered - if (strstr($pos, 'x')) - { - $pos = str_replace(' ', '', $pos); - - $xyArray = explode('x', $pos); - list($cropStartX, $cropStartY) = $xyArray; - - } - else - { - - switch ($pos) - { - case 'tl': - $cropStartX = 0; - $cropStartY = 0; - break; - - case 't': - $cropStartX = ($optimalWidth / 2) - ($newWidth / 2); - $cropStartY = 0; - break; - - case 'tr': - $cropStartX = $optimalWidth - $newWidth; - $cropStartY = 0; - break; - - case 'l': - $cropStartX = 0; - $cropStartY = ($optimalHeight / 2) - ($newHeight / 2); - break; - - case 'm': - $cropStartX = ($optimalWidth / 2) - ($newWidth / 2); - $cropStartY = ($optimalHeight / 2) - ($newHeight / 2); - break; - - case 'r': - $cropStartX = $optimalWidth - $newWidth; - $cropStartY = ($optimalHeight / 2) - ($newHeight / 2); - break; - - case 'bl': - $cropStartX = 0; - $cropStartY = $optimalHeight - $newHeight; - break; - - case 'b': - $cropStartX = ($optimalWidth / 2) - ($newWidth / 2); - $cropStartY = $optimalHeight - $newHeight; - break; - - case 'br': - $cropStartX = $optimalWidth - $newWidth; - $cropStartY = $optimalHeight - $newHeight; - break; - - case 'auto': - // *** If image is a portrait crop from top, not center. v1.5 - if ($optimalHeight > $optimalWidth) - { - $cropStartX = ($optimalWidth / 2) - ($newWidth / 2); - $cropStartY = ($this->cropFromTopPercent / 100) * $optimalHeight; - } - else - { - - // *** Else crop from the center - $cropStartX = ($optimalWidth / 2) - ($newWidth / 2); - $cropStartY = ($optimalHeight / 2) - ($newHeight / 2); - } - break; - - default: - // *** Default to center - $cropStartX = ($optimalWidth / 2) - ($newWidth / 2); - $cropStartY = ($optimalHeight / 2) - ($newHeight / 2); - break; - } - } - - return array( 'x' => $cropStartX, 'y' => $cropStartY ); - } - -## -------------------------------------------------------- - - private function getDimensions($newWidth, $newHeight, $option) - # Author: Jarrod Oberto - # Date: 17-11-09 - # Purpose: Get new image dimensions based on user specificaions - # Param in: $newWidth: - # $newHeight: - # Param out: Array of new width and height values - # Reference: - # Notes: If $option = 3 then this function is call recursivly - # - # To clarify the $option input: - # 0 = The exact height and width dimensions you set. - # 1 = Whatever height is passed in will be the height that - # is set. The width will be calculated and set automatically - # to a the value that keeps the original aspect ratio. - # 2 = The same but based on the width. - # 3 = Depending whether the image is landscape or portrait, this - # will automatically determine whether to resize via - # dimension 1,2 or 0. - # 4 = Resize the image as much as possible, then crop the - # remainder. - { - - switch (strval($option)) - { - case '0': - case 'exact': - $optimalWidth = $newWidth; - $optimalHeight = $newHeight; - break; - case '1': - case 'portrait': - $dimensionsArray = $this->getSizeByFixedHeight($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - break; - case '2': - case 'landscape': - $dimensionsArray = $this->getSizeByFixedWidth($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - break; - case '3': - case 'auto': - $dimensionsArray = $this->getSizeByAuto($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - break; - case '4': - case 'crop': - $dimensionsArray = $this->getOptimalCrop($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - break; - } - - return array( 'optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight ); - } - -## -------------------------------------------------------- - - private function getSizeByFixedHeight($newWidth, $newHeight) - { - // *** If forcing is off... - if ( ! $this->forceStretch) - { - - // *** ...check if actual height is less than target height - if ($this->height < $newHeight) - { - return array( 'optimalWidth' => $this->width, 'optimalHeight' => $this->height ); - } - } - - $ratio = $this->width / $this->height; - - $newWidth = $newHeight * $ratio; - - //return $newWidth; - return array( 'optimalWidth' => $newWidth, 'optimalHeight' => $newHeight ); - } - -## -------------------------------------------------------- - - private function getSizeByFixedWidth($newWidth, $newHeight) - { - // *** If forcing is off... - if ( ! $this->forceStretch) - { - - // *** ...check if actual width is less than target width - if ($this->width < $newWidth) - { - return array( 'optimalWidth' => $this->width, 'optimalHeight' => $this->height ); - } - } - - $ratio = $this->height / $this->width; - - $newHeight = $newWidth * $ratio; - - //return $newHeight; - return array( 'optimalWidth' => $newWidth, 'optimalHeight' => $newHeight ); - } - -## -------------------------------------------------------- - - private function getSizeByAuto($newWidth, $newHeight) - # Author: Jarrod Oberto - # Date: 19-08-08 - # Purpose: Depending on the height, choose to resize by 0, 1, or 2 - # Param in: The new height and new width - # Notes: - # - { - // *** If forcing is off... - if ( ! $this->forceStretch) - { - - // *** ...check if actual size is less than target size - if ($this->width < $newWidth && $this->height < $newHeight) - { - return array( 'optimalWidth' => $this->width, 'optimalHeight' => $this->height ); - } - } - - if ($this->height < $this->width) - // *** Image to be resized is wider (landscape) - { - //$optimalWidth = $newWidth; - //$optimalHeight= $this->getSizeByFixedWidth($newWidth); - - $dimensionsArray = $this->getSizeByFixedWidth($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - } - elseif ($this->height > $this->width) - // *** Image to be resized is taller (portrait) - { - //$optimalWidth = $this->getSizeByFixedHeight($newHeight); - //$optimalHeight= $newHeight; - - $dimensionsArray = $this->getSizeByFixedHeight($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - } - else - // *** Image to be resizerd is a square - { - - if ($newHeight < $newWidth) - { - //$optimalWidth = $newWidth; - //$optimalHeight= $this->getSizeByFixedWidth($newWidth); - $dimensionsArray = $this->getSizeByFixedWidth($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - } - else - { - if ($newHeight > $newWidth) - { - //$optimalWidth = $this->getSizeByFixedHeight($newHeight); - //$optimalHeight= $newHeight; - $dimensionsArray = $this->getSizeByFixedHeight($newWidth, $newHeight); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; - } - else - { - // *** Sqaure being resized to a square - $optimalWidth = $newWidth; - $optimalHeight = $newHeight; - } - } - } - - return array( 'optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight ); - } - -## -------------------------------------------------------- - - private function getOptimalCrop($newWidth, $newHeight) - # Author: Jarrod Oberto - # Date: 17-11-09 - # Purpose: Get optimal crop dimensions - # Param in: width and height as requested by user (fig 3) - # Param out: Array of optimal width and height (fig 2) - # Reference: - # Notes: The optimal width and height return are not the same as the - # same as the width and height passed in. For example: - # - # - # |-----------------| |------------| |-------| - # | | => |**| |**| => | | - # | | |**| |**| | | - # | | |------------| |-------| - # |-----------------| - # original optimal crop - # size size size - # Fig 1 2 3 - # - # 300 x 250 150 x 125 150 x 100 - # - # The optimal size is the smallest size (that is closest to the crop size) - # while retaining proportion/ratio. - # - # The crop size is the optimal size that has been cropped on one axis to - # make the image the exact size specified by the user. - # - # * represent cropped area - # - { - - // *** If forcing is off... - if ( ! $this->forceStretch) - { - - // *** ...check if actual size is less than target size - if ($this->width < $newWidth && $this->height < $newHeight) - { - return array( 'optimalWidth' => $this->width, 'optimalHeight' => $this->height ); - } - } - - $heightRatio = $this->height / $newHeight; - $widthRatio = $this->width / $newWidth; - - if ($heightRatio < $widthRatio) - { - $optimalRatio = $heightRatio; - } - else - { - $optimalRatio = $widthRatio; - } - - $optimalHeight = round($this->height / $optimalRatio); - $optimalWidth = round($this->width / $optimalRatio); - - return array( 'optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight ); - } - -## -------------------------------------------------------- - - private function sharpen() - # Author: Jarrod Oberto - # Date: 08 04 2011 - # Purpose: Sharpen image - # Param in: n/a - # Param out: n/a - # Reference: - # Notes: - # Credit: Incorporates Joe Lencioni (August 6, 2008) code - { - - if (version_compare(PHP_VERSION, '5.1.0') >= 0) - { - - // *** - if ($this->aggresiveSharpening) - { # A more aggressive sharpening solution - - $sharpenMatrix = array( array( -1, -1, -1 ), - array( -1, 16, -1 ), - array( -1, -1, -1 ) ); - $divisor = 8; - $offset = 0; - - imageconvolution($this->imageResized, $sharpenMatrix, $divisor, $offset); - } - else # More subtle and personally more desirable - { - $sharpness = $this->findSharp($this->widthOriginal, $this->width); - - $sharpenMatrix = array( - array( -1, -2, -1 ), - array( -2, $sharpness + 12, -2 ), //Lessen the effect of a filter by increasing the value in the center cell - array( -1, -2, -1 ) - ); - $divisor = $sharpness; // adjusts brightness - $offset = 0; - imageconvolution($this->imageResized, $sharpenMatrix, $divisor, $offset); - } - } - else - { - if ($this->debug) - { - throw new Exception('Sharpening required PHP 5.1.0 or greater.'); - } - } - } - - ## -------------------------------------------------------- - - private function sharpen2($level) - { - $sharpenMatrix = array( - array( $level, $level, $level ), - array( $level, (8 * $level) + 1, $level ), //Lessen the effect of a filter by increasing the value in the center cell - array( $level, $level, $level ) - ); - - } - -## -------------------------------------------------------- - - private function findSharp($orig, $final) - # Author: Ryan Rud (http://adryrun.com) - # Purpose: Find optimal sharpness - # Param in: n/a - # Param out: n/a - # Reference: - # Notes: - # - { - $final = $final * (750.0 / $orig); - $a = 52; - $b = -0.27810650887573124; - $c = .00047337278106508946; - - $result = $a + $b * $final + $c * $final * $final; - - return max(round($result), 0); - } - -## -------------------------------------------------------- - - private function prepOption($option) - # Author: Jarrod Oberto - # Purpose: Prep option like change the passed in option to lowercase - # Param in: (str/int) $option: eg. 'exact', 'crop'. 0, 4 - # Param out: lowercase string - # Reference: - # Notes: - # - { - if (is_array($option)) - { - if (fix_strtolower($option[0]) == 'crop' && count($option) == 2) - { - return 'crop'; - } - else - { - throw new Exception('Crop resize option array is badly formatted.'); - } - } - else - { - if (strpos($option, 'crop') !== false) - { - return 'crop'; - } - } - - if (is_string($option)) - { - return fix_strtolower($option); - } - - return $option; - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Presets -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - -# -# Preset are pre-defined templates you can apply to your image. -# -# These are inteded to be applied to thumbnail images. -# - - - public function borderPreset($preset) - { - switch ($preset) - { - - case 'simple': - $this->addBorder(7, '#fff'); - $this->addBorder(6, '#f2f1f0'); - $this->addBorder(2, '#fff'); - $this->addBorder(1, '#ccc'); - break; - default: - break; - } - - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Draw border -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function addBorder($thickness = 1, $rgbArray = array( 255, 255, 255 )) - # Author: Jarrod Oberto - # Date: 05-05-11 - # Purpose: Add a border to the image - # Param in: - # Param out: - # Reference: - # Notes: This border is added to the INSIDE of the image - # - { - if ($this->imageResized) - { - - $rgbArray = $this->formatColor($rgbArray); - $r = $rgbArray['r']; - $g = $rgbArray['g']; - $b = $rgbArray['b']; - - - $x1 = 0; - $y1 = 0; - $x2 = ImageSX($this->imageResized) - 1; - $y2 = ImageSY($this->imageResized) - 1; - - $rgbArray = ImageColorAllocate($this->imageResized, $r, $g, $b); - - - for ($i = 0; $i < $thickness; $i++) - { - ImageRectangle($this->imageResized, $x1++, $y1++, $x2--, $y2--, $rgbArray); - } - } - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Gray Scale -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function greyScale() - # Author: Jarrod Oberto - # Date: 07-05-2011 - # Purpose: Make image greyscale - # Param in: n/a - # Param out: - # Reference: - # Notes: - # - { - if ($this->imageResized) - { - imagefilter($this->imageResized, IMG_FILTER_GRAYSCALE); - } - - } - - ## -------------------------------------------------------- - - public function greyScaleEnhanced() - # Author: Jarrod Oberto - # Date: 07-05-2011 - # Purpose: Make image greyscale - # Param in: n/a - # Param out: - # Reference: - # Notes: - # - { - if ($this->imageResized) - { - imagefilter($this->imageResized, IMG_FILTER_GRAYSCALE); - imagefilter($this->imageResized, IMG_FILTER_CONTRAST, -15); - imagefilter($this->imageResized, IMG_FILTER_BRIGHTNESS, 2); - $this->sharpen($this->width); - } - } - - ## -------------------------------------------------------- - - public function greyScaleDramatic() - # Alias of gd_filter_monopin - { - $this->gd_filter_monopin(); - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Black 'n White -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function blackAndWhite() - # Author: Jarrod Oberto - # Date: 07-05-2011 - # Purpose: Make image black and white - # Param in: n/a - # Param out: - # Reference: - # Notes: - # - { - if ($this->imageResized) - { - - imagefilter($this->imageResized, IMG_FILTER_GRAYSCALE); - imagefilter($this->imageResized, IMG_FILTER_CONTRAST, -1000); - } - - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Negative -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function negative() - # Author: Jarrod Oberto - # Date: 07-05-2011 - # Purpose: Make image negative - # Param in: n/a - # Param out: - # Reference: - # Notes: - # - { - if ($this->imageResized) - { - - imagefilter($this->imageResized, IMG_FILTER_NEGATE); - } - - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Sepia -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function sepia() - # Author: Jarrod Oberto - # Date: 07-05-2011 - # Purpose: Make image sepia - # Param in: n/a - # Param out: - # Reference: - # Notes: - # - { - if ($this->imageResized) - { - imagefilter($this->imageResized, IMG_FILTER_GRAYSCALE); - imagefilter($this->imageResized, IMG_FILTER_BRIGHTNESS, -10); - imagefilter($this->imageResized, IMG_FILTER_CONTRAST, -20); - imagefilter($this->imageResized, IMG_FILTER_COLORIZE, 60, 30, -15); - } - } - - ## -------------------------------------------------------- - - public function sepia2() - - { - if ($this->imageResized) - { - - $total = imagecolorstotal($this->imageResized); - for ($i = 0; $i < $total; $i++) - { - $index = imagecolorsforindex($this->imageResized, $i); - $red = ($index["red"] * 0.393 + $index["green"] * 0.769 + $index["blue"] * 0.189) / 1.351; - $green = ($index["red"] * 0.349 + $index["green"] * 0.686 + $index["blue"] * 0.168) / 1.203; - $blue = ($index["red"] * 0.272 + $index["green"] * 0.534 + $index["blue"] * 0.131) / 2.140; - imagecolorset($this->imageResized, $i, $red, $green, $blue); - } - - - } - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Vintage -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function vintage() - # Alias of gd_filter_monopin - { - $this->gd_filter_vintage(); - } - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Presets By Marc Hibbins -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - - /** Apply 'Monopin' preset */ - public function gd_filter_monopin() - { - - if ($this->imageResized) - { - imagefilter($this->imageResized, IMG_FILTER_GRAYSCALE); - imagefilter($this->imageResized, IMG_FILTER_BRIGHTNESS, -15); - imagefilter($this->imageResized, IMG_FILTER_CONTRAST, -15); - $this->imageResized = $this->gd_apply_overlay($this->imageResized, 'vignette', 100); - } - } - - ## -------------------------------------------------------- - - public function gd_filter_vintage() - { - if ($this->imageResized) - { - $this->imageResized = $this->gd_apply_overlay($this->imageResized, 'vignette', 45); - imagefilter($this->imageResized, IMG_FILTER_BRIGHTNESS, 20); - imagefilter($this->imageResized, IMG_FILTER_CONTRAST, -35); - imagefilter($this->imageResized, IMG_FILTER_COLORIZE, 60, -10, 35); - imagefilter($this->imageResized, IMG_FILTER_SMOOTH, 7); - $this->imageResized = $this->gd_apply_overlay($this->imageResized, 'scratch', 10); - } - } - - ## -------------------------------------------------------- - - /** Apply a PNG overlay */ - private function gd_apply_overlay($im, $type, $amount) - # - # Original Author: Marc Hibbins - # License: Attribution-ShareAlike 3.0 - # Purpose: - # Params in: - # Params out: - # Notes: - # - { - $width = imagesx($im); - $height = imagesy($im); - $filter = imagecreatetruecolor($width, $height); - - imagealphablending($filter, false); - imagesavealpha($filter, true); - - $transparent = imagecolorallocatealpha($filter, 255, 255, 255, 127); - imagefilledrectangle($filter, 0, 0, $width, $height, $transparent); - - // *** Resize overlay - $overlay = $this->filterOverlayPath . '/' . $type . '.png'; - $png = imagecreatefrompng($overlay); - imagecopyresampled($filter, $png, 0, 0, 0, 0, $width, $height, imagesx($png), imagesy($png)); - - $comp = imagecreatetruecolor($width, $height); - imagecopy($comp, $im, 0, 0, 0, 0, $width, $height); - imagecopy($comp, $filter, 0, 0, 0, 0, $width, $height); - imagecopymerge($im, $comp, 0, 0, 0, 0, $width, $height, $amount); - - imagedestroy($comp); - - return $im; - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Colorise -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function image_colorize($rgb) - { - imageTrueColorToPalette($this->imageResized, true, 256); - $numColors = imageColorsTotal($this->imageResized); - - for ($x = 0; $x < $numColors; $x++) - { - list($r, $g, $b) = array_values(imageColorsForIndex($this->imageResized, $x)); - - // calculate grayscale in percent - $grayscale = ($r + $g + $b) / 3 / 0xff; - - imageColorSet($this->imageResized, $x, - $grayscale * $rgb[0], - $grayscale * $rgb[1], - $grayscale * $rgb[2] - ); - - } - - return true; - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Reflection -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function addReflection($reflectionHeight = 50, $startingTransparency = 30, $inside = false, $bgColor = '#fff', $stretch = false, $divider = 0) - { - - // *** Convert color - $rgbArray = $this->formatColor($bgColor); - $r = $rgbArray['r']; - $g = $rgbArray['g']; - $b = $rgbArray['b']; - - $im = $this->imageResized; - $li = imagecreatetruecolor($this->width, 1); - - $bgc = imagecolorallocate($li, $r, $g, $b); - imagefilledrectangle($li, 0, 0, $this->width, 1, $bgc); - - $bg = imagecreatetruecolor($this->width, $reflectionHeight); - $wh = imagecolorallocate($im, 255, 255, 255); - - $im = imagerotate($im, -180, $wh); - imagecopyresampled($bg, $im, 0, 0, 0, 0, $this->width, $this->height, $this->width, $this->height); - - $im = $bg; - - $bg = imagecreatetruecolor($this->width, $reflectionHeight); - - for ($x = 0; $x < $this->width; $x++) - { - imagecopy($bg, $im, $x, 0, $this->width - $x - 1, 0, 1, $reflectionHeight); - } - $im = $bg; - - $transaprencyAmount = $this->invertTransparency($startingTransparency, 100); - - - // *** Fade - if ($stretch) - { - $step = 100 / ($reflectionHeight + $startingTransparency); - } - else - { - $step = 100 / $reflectionHeight; - } - for ($i = 0; $i <= $reflectionHeight; $i++) - { - - if ($startingTransparency > 100) - { - $startingTransparency = 100; - } - if ($startingTransparency < 1) - { - $startingTransparency = 1; - } - imagecopymerge($bg, $li, 0, $i, 0, 0, $this->width, 1, $startingTransparency); - $startingTransparency += $step; - } - - // *** Apply fade - imagecopymerge($im, $li, 0, 0, 0, 0, $this->width, $divider, 100); // Divider - - - // *** width, height of reflection. - $x = imagesx($im); - $y = imagesy($im); - - - // *** Determines if the reflection should be displayed inside or outside the image - if ($inside) - { - - // Create new blank image with sizes. - $final = imagecreatetruecolor($this->width, $this->height); - - imagecopymerge($final, $this->imageResized, 0, 0, 0, $reflectionHeight, $this->width, $this->height - $reflectionHeight, 100); - imagecopymerge($final, $im, 0, $this->height - $reflectionHeight, 0, 0, $x, $y, 100); - - } - else - { - - // Create new blank image with sizes. - $final = imagecreatetruecolor($this->width, $this->height + $y); - - imagecopymerge($final, $this->imageResized, 0, 0, 0, 0, $this->width, $this->height, 100); - imagecopymerge($final, $im, 0, $this->height, 0, 0, $x, $y, 100); - } - - $this->imageResized = $final; - - imagedestroy($li); - imagedestroy($im); - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Rotate -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function rotate($value = 90, $bgColor = 'transparent') - # Author: Jarrod Oberto - # Date: 07-05-2011 - # Purpose: Rotate image - # Param in: (mixed) $degrees: (int) number of degress to rotate image - # (str) param "left": rotate left - # (str) param "right": rotate right - # (str) param "upside": upside-down image - # Param out: - # Reference: - # Notes: The default direction of imageRotate() is counter clockwise. - # - { - if ($this->imageResized) - { - - if (is_integer($value)) - { - $degrees = $value; - } - - // *** Convert color - $rgbArray = $this->formatColor($bgColor); - $r = $rgbArray['r']; - $g = $rgbArray['g']; - $b = $rgbArray['b']; - if (isset($rgbArray['a'])) - { - $a = $rgbArray['a']; - } - - if (is_string($value)) - { - - $value = fix_strtolower($value); - - switch ($value) - { - case 'left': - $degrees = 90; - break; - case 'right': - $degrees = 270; - break; - case 'upside': - $degrees = 180; - break; - default: - break; - } - - } - - // *** The default direction of imageRotate() is counter clockwise - // * This makes it clockwise - $degrees = 360 - $degrees; - - // *** Create background color - $bg = ImageColorAllocateAlpha($this->imageResized, $r, $g, $b, $a); - - // *** Fill with background - ImageFill($this->imageResized, 0, 0, $bg); - - // *** Rotate - $this->imageResized = imagerotate($this->imageResized, $degrees, $bg); // Rotate 45 degrees and allocated the transparent colour as the one to make transparent (obviously) - - // Ensure alpha transparency - ImageSaveAlpha($this->imageResized, true); - - } - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Round corners -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function roundCorners($radius = 5, $bgColor = 'transparent') - # Author: Jarrod Oberto - # Date: 19-05-2011 - # Purpose: Create rounded corners on your image - # Param in: (int) radius = the amount of curvature - # (mixed) $bgColor = the corner background color - # Param out: n/a - # Reference: - # Notes: - # - { - - // *** Check if the user wants transparency - $isTransparent = false; - if ( ! is_array($bgColor)) - { - if (fix_strtolower($bgColor) == 'transparent') - { - $isTransparent = true; - } - } - - - // *** If we use transparency, we need to color our curved mask with a unique color - if ($isTransparent) - { - $bgColor = $this->findUnusedGreen(); - } - - // *** Convert color - $rgbArray = $this->formatColor($bgColor); - $r = $rgbArray['r']; - $g = $rgbArray['g']; - $b = $rgbArray['b']; - if (isset($rgbArray['a'])) - { - $a = $rgbArray['a']; - } - - - // *** Create top-left corner mask (square) - $cornerImg = imagecreatetruecolor($radius, $radius); - //$cornerImg = imagecreate($radius, $radius); - - //imagealphablending($cornerImg, true); - //imagesavealpha($cornerImg, true); - - //imagealphablending($this->imageResized, false); - //imagesavealpha($this->imageResized, true); - - // *** Give it a color - $maskColor = imagecolorallocate($cornerImg, 0, 0, 0); - - - // *** Replace the mask color (black) to transparent - imagecolortransparent($cornerImg, $maskColor); - - - // *** Create the image background color - $imagebgColor = imagecolorallocate($cornerImg, $r, $g, $b); - - - // *** Fill the corner area to the user defined color - imagefill($cornerImg, 0, 0, $imagebgColor); - - - imagefilledellipse($cornerImg, $radius, $radius, $radius * 2, $radius * 2, $maskColor); - - - // *** Map to top left corner - imagecopymerge($this->imageResized, $cornerImg, 0, 0, 0, 0, $radius, $radius, 100); #tl - - // *** Map rounded corner to other corners by rotating and applying the mask - $cornerImg = imagerotate($cornerImg, 90, 0); - imagecopymerge($this->imageResized, $cornerImg, 0, $this->height - $radius, 0, 0, $radius, $radius, 100); #bl - - $cornerImg = imagerotate($cornerImg, 90, 0); - imagecopymerge($this->imageResized, $cornerImg, $this->width - $radius, $this->height - $radius, 0, 0, $radius, $radius, 100); #br - - $cornerImg = imagerotate($cornerImg, 90, 0); - imagecopymerge($this->imageResized, $cornerImg, $this->width - $radius, 0, 0, 0, $radius, $radius, 100); #tr - - - // *** If corners are to be transparent, we fill our chromakey color as transparent. - if ($isTransparent) - { - //imagecolortransparent($this->imageResized, $imagebgColor); - $this->imageResized = $this->transparentImage($this->imageResized); - imagesavealpha($this->imageResized, true); - } - - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Shadow -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function addShadow($shadowAngle = 45, $blur = 15, $bgColor = 'transparent') - # - # Author: Jarrod Oberto (Adapted from Pascal Naidon) - # Ref: http://www.les-stooges.org/pascal/webdesign/vignettes/index.php?la=en - # Purpose: Add a drop shadow to your image - # Params in: (int) $angle: the angle of the shadow - # (int) $blur: the blur distance - # (mixed) $bgColor: the color of the background - # Params out: - # Notes: - # - { - // *** A higher number results in a smoother shadow - define('STEPS', $blur * 2); - - // *** Set the shadow distance - $shadowDistance = $blur * 0.25; - - // *** Set blur width and height - $blurWidth = $blurHeight = $blur; - - - if ($shadowAngle == 0) - { - $distWidth = 0; - $distHeight = 0; - } - else - { - $distWidth = $shadowDistance * cos(deg2rad($shadowAngle)); - $distHeight = $shadowDistance * sin(deg2rad($shadowAngle)); - } - - - // *** Convert color - if (fix_strtolower($bgColor) != 'transparent') - { - $rgbArray = $this->formatColor($bgColor); - $r0 = $rgbArray['r']; - $g0 = $rgbArray['g']; - $b0 = $rgbArray['b']; - } - - - $image = $this->imageResized; - $width = $this->width; - $height = $this->height; - - - $newImage = imagecreatetruecolor($width, $height); - imagecopyresampled($newImage, $image, 0, 0, 0, 0, $width, $height, $width, $height); - - - // *** RGB - $rgb = imagecreatetruecolor($width + $blurWidth, $height + $blurHeight); - $colour = imagecolorallocate($rgb, 0, 0, 0); - imagefilledrectangle($rgb, 0, 0, $width + $blurWidth, $height + $blurHeight, $colour); - $colour = imagecolorallocate($rgb, 255, 255, 255); - //imagefilledrectangle($rgb, $blurWidth*0.5-$distWidth, $blurHeight*0.5-$distHeight, $width+$blurWidth*0.5-$distWidth, $height+$blurWidth*0.5-$distHeight, $colour); - imagefilledrectangle($rgb, $blurWidth * 0.5 - $distWidth, $blurHeight * 0.5 - $distHeight, $width + $blurWidth * 0.5 - $distWidth, $height + $blurWidth * 0.5 - $distHeight, $colour); - //imagecopymerge($rgb, $newImage, 1+$blurWidth*0.5-$distWidth, 1+$blurHeight*0.5-$distHeight, 0,0, $width, $height, 100); - imagecopymerge($rgb, $newImage, $blurWidth * 0.5 - $distWidth, $blurHeight * 0.5 - $distHeight, 0, 0, $width + $blurWidth, $height + $blurHeight, 100); - - - // *** Shadow (alpha) - $shadow = imagecreatetruecolor($width + $blurWidth, $height + $blurHeight); - imagealphablending($shadow, false); - $colour = imagecolorallocate($shadow, 0, 0, 0); - imagefilledrectangle($shadow, 0, 0, $width + $blurWidth, $height + $blurHeight, $colour); - - - for ($i = 0; $i <= STEPS; $i++) - { - - $t = ((1.0 * $i) / STEPS); - $intensity = 255 * $t * $t; - - $colour = imagecolorallocate($shadow, $intensity, $intensity, $intensity); - $points = array( - $blurWidth * $t, $blurHeight, // Point 1 (x, y) - $blurWidth, $blurHeight * $t, // Point 2 (x, y) - $width, $blurHeight * $t, // Point 3 (x, y) - $width + $blurWidth * (1 - $t), $blurHeight, // Point 4 (x, y) - $width + $blurWidth * (1 - $t), $height, // Point 5 (x, y) - $width, $height + $blurHeight * (1 - $t), // Point 6 (x, y) - $blurWidth, $height + $blurHeight * (1 - $t), // Point 7 (x, y) - $blurWidth * $t, $height // Point 8 (x, y) - ); - imagepolygon($shadow, $points, 8, $colour); - } - - for ($i = 0; $i <= STEPS; $i++) - { - - $t = ((1.0 * $i) / STEPS); - $intensity = 255 * $t * $t; - - $colour = imagecolorallocate($shadow, $intensity, $intensity, $intensity); - imagefilledarc($shadow, $blurWidth - 1, $blurHeight - 1, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 180, 268, $colour, IMG_ARC_PIE); - imagefilledarc($shadow, $width, $blurHeight - 1, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 270, 358, $colour, IMG_ARC_PIE); - imagefilledarc($shadow, $width, $height, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 0, 90, $colour, IMG_ARC_PIE); - imagefilledarc($shadow, $blurWidth - 1, $height, 2 * (1 - $t) * $blurWidth, 2 * (1 - $t) * $blurHeight, 90, 180, $colour, IMG_ARC_PIE); - } - - - $colour = imagecolorallocate($shadow, 255, 255, 255); - imagefilledrectangle($shadow, $blurWidth, $blurHeight, $width, $height, $colour); - imagefilledrectangle($shadow, $blurWidth * 0.5 - $distWidth, $blurHeight * 0.5 - $distHeight, $width + $blurWidth * 0.5 - 1 - $distWidth, $height + $blurHeight * 0.5 - 1 - $distHeight, $colour); - - - // *** The magic - imagealphablending($rgb, false); - - for ($theX = 0; $theX < imagesx($rgb); $theX++) - { - for ($theY = 0; $theY < imagesy($rgb); $theY++) - { - - // *** Get the RGB values for every pixel of the RGB image - $colArray = imagecolorat($rgb, $theX, $theY); - $r = ($colArray >> 16) & 0xFF; - $g = ($colArray >> 8) & 0xFF; - $b = $colArray & 0xFF; - - // *** Get the alpha value for every pixel of the shadow image - $colArray = imagecolorat($shadow, $theX, $theY); - $a = $colArray & 0xFF; - $a = 127 - floor($a / 2); - $t = $a / 128.0; - - // *** Create color - if (fix_strtolower($bgColor) == 'transparent') - { - $myColour = imagecolorallocatealpha($rgb, $r, $g, $b, $a); - } - else - { - $myColour = imagecolorallocate($rgb, $r * (1.0 - $t) + $r0 * $t, $g * (1.0 - $t) + $g0 * $t, $b * (1.0 - $t) + $b0 * $t); - } - - // *** Add color to new rgb image - imagesetpixel($rgb, $theX, $theY, $myColour); - } - } - - imagealphablending($rgb, true); - imagesavealpha($rgb, true); - - $this->imageResized = $rgb; - - imagedestroy($image); - imagedestroy($newImage); - imagedestroy($shadow); - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Add Caption Box -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function addCaptionBox($side = 'b', $thickness = 50, $padding = 0, $bgColor = '#000', $transaprencyAmount = 30) - # - # Author: Jarrod Oberto - # Date: 26 May 2011 - # Purpose: Add a caption box - # Params in: (str) $side: the side to add the caption box (t, r, b, or l). - # (int) $thickness: how thick you want the caption box to be. - # (mixed) $bgColor: The color of the caption box. - # (int) $transaprencyAmount: The amount of transparency to be - # applied. - # Params out: n/a - # Notes: - # - { - $side = fix_strtolower($side); - - // *** Convert color - $rgbArray = $this->formatColor($bgColor); - $r = $rgbArray['r']; - $g = $rgbArray['g']; - $b = $rgbArray['b']; - - $positionArray = $this->calculateCaptionBoxPosition($side, $thickness, $padding); - - // *** Store incase we want to use method addTextToCaptionBox() - $this->captionBoxPositionArray = $positionArray; - - - $transaprencyAmount = $this->invertTransparency($transaprencyAmount, 127, false); - $transparent = imagecolorallocatealpha($this->imageResized, $r, $g, $b, $transaprencyAmount); - imagefilledrectangle($this->imageResized, $positionArray['x1'], $positionArray['y1'], $positionArray['x2'], $positionArray['y2'], $transparent); - } - - ## -------------------------------------------------------- - - public function addTextToCaptionBox($text, $fontColor = '#fff', $fontSize = 12, $angle = 0, $font = null) - # - # Author: Jarrod Oberto - # Date: 03 Aug 11 - # Purpose: Simplify adding text to a caption box by automatically - # locating the center of the caption box - # Params in: The usually text paams (less a couple) - # Params out: n/a - # Notes: - # - { - - // *** Get the caption box measurements - if (count($this->captionBoxPositionArray) == 4) - { - $x1 = $this->captionBoxPositionArray['x1']; - $x2 = $this->captionBoxPositionArray['x2']; - $y1 = $this->captionBoxPositionArray['y1']; - $y2 = $this->captionBoxPositionArray['y2']; - } - else - { - if ($this->debug) - { - throw new Exception('No caption box found.'); - } - else - { - return false; - } - } - - - // *** Get text font - $font = $this->getTextFont($font); - - // *** Get text size - $textSizeArray = $this->getTextSize($fontSize, $angle, $font, $text); - $textWidth = $textSizeArray['width']; - $textHeight = $textSizeArray['height']; - - // *** Find the width/height middle points - $boxXMiddle = (($x2 - $x1) / 2); - $boxYMiddle = (($y2 - $y1) / 2); - - // *** Box middle - half the text width/height - $xPos = ($x1 + $boxXMiddle) - ($textWidth / 2); - $yPos = ($y1 + $boxYMiddle) - ($textHeight / 2); - - $pos = $xPos . 'x' . $yPos; - - $this->addText($text, $pos, $padding = 0, $fontColor, $fontSize, $angle, $font); - - } - - ## -------------------------------------------------------- - - private function calculateCaptionBoxPosition($side, $thickness, $padding) - { - $positionArray = array(); - - switch ($side) - { - case 't': - $positionArray['x1'] = 0; - $positionArray['y1'] = $padding; - $positionArray['x2'] = $this->width; - $positionArray['y2'] = $thickness + $padding; - break; - case 'r': - $positionArray['x1'] = $this->width - $thickness - $padding; - $positionArray['y1'] = 0; - $positionArray['x2'] = $this->width - $padding; - $positionArray['y2'] = $this->height; - break; - case 'b': - $positionArray['x1'] = 0; - $positionArray['y1'] = $this->height - $thickness - $padding; - $positionArray['x2'] = $this->width; - $positionArray['y2'] = $this->height - $padding; - break; - case 'l': - $positionArray['x1'] = $padding; - $positionArray['y1'] = 0; - $positionArray['x2'] = $thickness + $padding; - $positionArray['y2'] = $this->height; - break; - - default: - break; - } - - return $positionArray; - - } - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Get EXIF Data -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function getExif($debug = false) - # Author: Jarrod Oberto - # Date: 07-05-2011 - # Purpose: Get image EXIF data - # Param in: n/a - # Param out: An associate array of EXIF data - # Reference: - # Notes: - # 23 May 13 : added orientation flag -jco - # - { - - if ( ! $this->debug || ! $debug) - { - $debug = false; - } - - // *** Check all is good - check the EXIF library exists and the file exists, too. - if ( ! $this->testEXIFInstalled()) - { - if ($debug) - { - throw new Exception('The EXIF Library is not installed.'); - } - else - { - return array(); - } - }; - if ( ! file_exists($this->fileName)) - { - if ($debug) - { - throw new Exception('Image not found.'); - } - else - { - return array(); - } - }; - if ($this->fileExtension != '.jpg') - { - if ($debug) - { - throw new Exception('Metadata not supported for this image type.'); - } - else - { - return array(); - } - }; - $exifData = exif_read_data($this->fileName, 'IFD0'); - - // *** Format the apperture value - $ev = $exifData['ApertureValue']; - $apPeicesArray = explode('/', $ev); - if (count($apPeicesArray) == 2) - { - $apertureValue = round($apPeicesArray[0] / $apPeicesArray[1], 2, PHP_ROUND_HALF_DOWN) . ' EV'; - } - else - { - $apertureValue = ''; - } - - // *** Format the focal length - $focalLength = $exifData['FocalLength']; - $flPeicesArray = explode('/', $focalLength); - if (count($flPeicesArray) == 2) - { - $focalLength = $flPeicesArray[0] / $flPeicesArray[1] . '.0 mm'; - } - else - { - $focalLength = ''; - } - - // *** Format fNumber - $fNumber = $exifData['FNumber']; - $fnPeicesArray = explode('/', $fNumber); - if (count($fnPeicesArray) == 2) - { - $fNumber = $fnPeicesArray[0] / $fnPeicesArray[1]; - } - else - { - $fNumber = ''; - } - - // *** Resolve ExposureProgram - if (isset($exifData['ExposureProgram'])) - { - $ep = $exifData['ExposureProgram']; - } - if (isset($ep)) - { - $ep = $this->resolveExposureProgram($ep); - } - - - // *** Resolve MeteringMode - $mm = $exifData['MeteringMode']; - $mm = $this->resolveMeteringMode($mm); - - // *** Resolve Flash - $flash = $exifData['Flash']; - $flash = $this->resolveFlash($flash); - - - if (isset($exifData['Make'])) - { - $exifDataArray['make'] = $exifData['Make']; - } - else - { - $exifDataArray['make'] = ''; - } - - if (isset($exifData['Model'])) - { - $exifDataArray['model'] = $exifData['Model']; - } - else - { - $exifDataArray['model'] = ''; - } - - if (isset($exifData['DateTime'])) - { - $exifDataArray['date'] = $exifData['DateTime']; - } - else - { - $exifDataArray['date'] = ''; - } - - if (isset($exifData['ExposureTime'])) - { - $exifDataArray['exposure time'] = $exifData['ExposureTime'] . ' sec.'; - } - else - { - $exifDataArray['exposure time'] = ''; - } - - if ($apertureValue != '') - { - $exifDataArray['aperture value'] = $apertureValue; - } - else - { - $exifDataArray['aperture value'] = ''; - } - - if (isset($exifData['COMPUTED']['ApertureFNumber'])) - { - $exifDataArray['f-stop'] = $exifData['COMPUTED']['ApertureFNumber']; - } - else - { - $exifDataArray['f-stop'] = ''; - } - - if (isset($exifData['FNumber'])) - { - $exifDataArray['fnumber'] = $exifData['FNumber']; - } - else - { - $exifDataArray['fnumber'] = ''; - } - - if ($fNumber != '') - { - $exifDataArray['fnumber value'] = $fNumber; - } - else - { - $exifDataArray['fnumber value'] = ''; - } - - if (isset($exifData['ISOSpeedRatings'])) - { - $exifDataArray['iso'] = $exifData['ISOSpeedRatings']; - } - else - { - $exifDataArray['iso'] = ''; - } - - if ($focalLength != '') - { - $exifDataArray['focal length'] = $focalLength; - } - else - { - $exifDataArray['focal length'] = ''; - } - - if (isset($ep)) - { - $exifDataArray['exposure program'] = $ep; - } - else - { - $exifDataArray['exposure program'] = ''; - } - - if ($mm != '') - { - $exifDataArray['metering mode'] = $mm; - } - else - { - $exifDataArray['metering mode'] = ''; - } - - if ($flash != '') - { - $exifDataArray['flash status'] = $flash; - } - else - { - $exifDataArray['flash status'] = ''; - } - - if (isset($exifData['Artist'])) - { - $exifDataArray['creator'] = $exifData['Artist']; - } - else - { - $exifDataArray['creator'] = ''; - } - - if (isset($exifData['Copyright'])) - { - $exifDataArray['copyright'] = $exifData['Copyright']; - } - else - { - $exifDataArray['copyright'] = ''; - } - - // *** Orientation - if (isset($exifData['Orientation'])) - { - $exifDataArray['orientation'] = $exifData['Orientation']; - } - else - { - $exifDataArray['orientation'] = ''; - } - - return $exifDataArray; - } - - ## -------------------------------------------------------- - - private function resolveExposureProgram($ep) - { - switch ($ep) - { - case 0: - $ep = ''; - break; - case 1: - $ep = 'manual'; - break; - case 2: - $ep = 'normal program'; - break; - case 3: - $ep = 'aperture priority'; - break; - case 4: - $ep = 'shutter priority'; - break; - case 5: - $ep = 'creative program'; - break; - case 6: - $ep = 'action program'; - break; - case 7: - $ep = 'portrait mode'; - break; - case 8: - $ep = 'landscape mode'; - break; - - default: - break; - } - - return $ep; - } - - ## -------------------------------------------------------- - - private function resolveMeteringMode($mm) - { - switch ($mm) - { - case 0: - $mm = 'unknown'; - break; - case 1: - $mm = 'average'; - break; - case 2: - $mm = 'center weighted average'; - break; - case 3: - $mm = 'spot'; - break; - case 4: - $mm = 'multi spot'; - break; - case 5: - $mm = 'pattern'; - break; - case 6: - $mm = 'partial'; - break; - case 255: - $mm = 'other'; - break; - - default: - break; - } - - return $mm; - } - - ## -------------------------------------------------------- - - private function resolveFlash($flash) - { - switch ($flash) - { - case 0: - $flash = 'flash did not fire'; - break; - case 1: - $flash = 'flash fired'; - break; - case 5: - $flash = 'strobe return light not detected'; - break; - case 7: - $flash = 'strobe return light detected'; - break; - case 9: - $flash = 'flash fired, compulsory flash mode'; - break; - case 13: - $flash = 'flash fired, compulsory flash mode, return light not detected'; - break; - case 15: - $flash = 'flash fired, compulsory flash mode, return light detected'; - break; - case 16: - $flash = 'flash did not fire, compulsory flash mode'; - break; - case 24: - $flash = 'flash did not fire, auto mode'; - break; - case 25: - $flash = 'flash fired, auto mode'; - break; - case 29: - $flash = 'flash fired, auto mode, return light not detected'; - break; - case 31: - $flash = 'flash fired, auto mode, return light detected'; - break; - case 32: - $flash = 'no flash function'; - break; - case 65: - $flash = 'flash fired, red-eye reduction mode'; - break; - case 69: - $flash = 'flash fired, red-eye reduction mode, return light not detected'; - break; - case 71: - $flash = 'flash fired, red-eye reduction mode, return light detected'; - break; - case 73: - $flash = 'flash fired, compulsory flash mode, red-eye reduction mode'; - break; - case 77: - $flash = 'flash fired, compulsory flash mode, red-eye reduction mode, return light not detected'; - break; - case 79: - $flash = 'flash fired, compulsory flash mode, red-eye reduction mode, return light detected'; - break; - case 89: - $flash = 'flash fired, auto mode, red-eye reduction mode'; - break; - case 93: - $flash = 'flash fired, auto mode, return light not detected, red-eye reduction mode'; - break; - case 95: - $flash = 'flash fired, auto mode, return light detected, red-eye reduction mode'; - break; - - default: - break; - } - - return $flash; - - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Get IPTC Data -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Write IPTC Data -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function writeIPTCcaption($value) - # Caption - { - $this->writeIPTC(120, $value); - } - - ## -------------------------------------------------------- - - public function writeIPTCwriter($value) - { - //$this->writeIPTC(65, $value); - } - - ## -------------------------------------------------------- - - private function writeIPTC($dat, $value) - { - - # LIMIT TO JPG - - $caption_block = $this->iptc_maketag(2, $dat, $value); - $image_string = iptcembed($caption_block, $this->fileName); - file_put_contents('iptc.jpg', $image_string); - } - -## -------------------------------------------------------- - - private function iptc_maketag($rec, $dat, $val) - # Author: Thies C. Arntzen - # Purpose: Function to format the new IPTC text - # Param in: $rec: Application record. (We’re working with #2) - # $dat: Index. (120 for caption, 118 for contact. See the IPTC IIM - # specification: - # http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf - # $val: Value/data/text. Make sure this is within the length - # constraints of the IPTC IIM specification - # Ref: http://blog.peterhaza.no/working-with-image-meta-data-in-exif-and-iptc-headers-from-php/ - # http://php.net/manual/en/function.iptcembed.php - # - { - $len = strlen($val); - if ($len < 0x8000) - { - return chr(0x1c) . chr($rec) . chr($dat) . - chr($len >> 8) . - chr($len & 0xff) . - $val; - } - else - { - return chr(0x1c) . chr($rec) . chr($dat) . - chr(0x80) . chr(0x04) . - chr(($len >> 24) & 0xff) . - chr(($len >> 16) & 0xff) . - chr(($len >> 8) & 0xff) . - chr(($len) & 0xff) . - $val; - } - } - - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Write XMP Data -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - //http://xmpphptoolkit.sourceforge.net/ - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Add Text -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function addText($text, $pos = '20x20', $padding = 0, $fontColor = '#fff', $fontSize = 12, $angle = 0, $font = null) - # Author: Jarrod Oberto - # Date: 18-11-09 - # Purpose: Add text to an image - # Param in: - # Param out: - # Reference: http://php.net/manual/en/function.imagettftext.php - # Notes: Make sure you supply the font. - # - { - - // *** Convert color - $rgbArray = $this->formatColor($fontColor); - $r = $rgbArray['r']; - $g = $rgbArray['g']; - $b = $rgbArray['b']; - - // *** Get text font - $font = $this->getTextFont($font); - - // *** Get text size - $textSizeArray = $this->getTextSize($fontSize, $angle, $font, $text); - $textWidth = $textSizeArray['width']; - $textHeight = $textSizeArray['height']; - - // *** Find co-ords to place text - $posArray = $this->calculatePosition($pos, $padding, $textWidth, $textHeight, false); - $x = $posArray['width']; - $y = $posArray['height']; - - $fontColor = imagecolorallocate($this->imageResized, $r, $g, $b); - - // *** Add text - imagettftext($this->imageResized, $fontSize, $angle, $x, $y, $fontColor, $font, $text); - } - - ## -------------------------------------------------------- - - private function getTextFont($font) - { - // *** Font path (shou - $fontPath = dirname(__FILE__) . '/' . $this->fontDir; - - - // *** The below is/may be needed depending on your version (see ref) - putenv('GDFONTPATH=' . realpath('.')); - - // *** Check if the passed in font exsits... - if ($font == null || ! file_exists($font)) - { - - // *** ...If not, default to this font. - $font = $fontPath . '/arimo.ttf'; - - // *** Check our default font exists... - if ( ! file_exists($font)) - { - - // *** If not, return false - if ($this->debug) - { - throw new Exception('Font not found'); - } - else - { - return false; - } - } - } - - return $font; - - } - - ## -------------------------------------------------------- - - private function getTextSize($fontSize, $angle, $font, $text) - { - - // *** Define box (so we can get the width) - $box = @imageTTFBbox($fontSize, $angle, $font, $text); - - // *** Get width of text from dimensions - $textWidth = abs($box[4] - $box[0]); - - // *** Get height of text from dimensions (should also be same as $fontSize) - $textHeight = abs($box[5] - $box[1]); - - return array( 'height' => $textHeight, 'width' => $textWidth ); - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - Add Watermark -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - public function addWatermark($watermarkImage, $pos, $padding = 0, $opacity = 0) - # Author: Jarrod Oberto - # Date: 18-11-09 - # Purpose: Add watermark image - # Param in: (str) $watermark: The watermark image - # (str) $pos: Could be a pre-determined position such as: - # tl = top left, - # t = top (middle), - # tr = top right, - # l = left, - # m = middle, - # r = right, - # bl = bottom left, - # b = bottom (middle), - # br = bottom right - # Or, it could be a co-ordinate position such as: 50x100 - # - # (int) $padding: If using a pre-determined position you can - # adjust the padding from the edges by passing an amount - # in pixels. If using co-ordinates, this value is ignored. - # Param out: - # Reference: http://www.php.net/manual/en/image.examples-watermark.php - # Notes: Based on example in reference. - # - # - { - - // Load the stamp and the photo to apply the watermark to - $stamp = $this->openImage($watermarkImage); # stamp - $im = $this->imageResized; # photo - - // *** Get stamps width and height - $sx = imagesx($stamp); - $sy = imagesy($stamp); - - // *** Find co-ords to place image - $posArray = $this->calculatePosition($pos, $padding, $sx, $sy); - $x = $posArray['width']; - $y = $posArray['height']; - - // *** Set watermark opacity - if (fix_strtolower(strrchr($watermarkImage, '.')) == '.png') - { - - $opacity = $this->invertTransparency($opacity, 100); - $this->filterOpacity($stamp, $opacity); - } - - // Copy the watermark image onto our photo - imagecopy($im, $stamp, $x, $y, 0, 0, imagesx($stamp), imagesy($stamp)); - - } - - ## -------------------------------------------------------- - - private function calculatePosition($pos, $padding, $assetWidth, $assetHeight, $upperLeft = true) - # - # Author: Jarrod Oberto - # Date: 08-05-11 - # Purpose: Calculate the x, y pixel cordinates of the asset to place - # Params in: (str) $pos: Either something like: "tl", "l", "br" or an - # exact position like: "100x50" - # (int) $padding: The amount of padding from the edge. Only - # used for the predefined $pos. - # (int) $assetWidth: The width of the asset to add to the image - # (int) $assetHeight: The height of the asset to add to the image - # (bol) $upperLeft: if true, the asset will be positioned based - # on the upper left x, y coords. If false, it means you're - # using the lower left as the basepoint and this will - # convert it to the upper left position - # Params out: - # NOTE: this is done from the UPPER left corner!! But will convert lower - # left basepoints to upper left if $upperleft is set to false - # - # - { - $pos = fix_strtolower($pos); - - // *** If co-ords have been entered - if (strstr($pos, 'x')) - { - $pos = str_replace(' ', '', $pos); - - $xyArray = explode('x', $pos); - list($width, $height) = $xyArray; - - } - else - { - - switch ($pos) - { - case 'tl': - $width = 0 + $padding; - $height = 0 + $padding; - break; - - case 't': - $width = ($this->width / 2) - ($assetWidth / 2); - $height = 0 + $padding; - break; - - case 'tr': - $width = $this->width - $assetWidth - $padding; - $height = 0 + $padding;; - break; - - case 'l': - $width = 0 + $padding; - $height = ($this->height / 2) - ($assetHeight / 2); - break; - - case 'm': - $width = ($this->width / 2) - ($assetWidth / 2); - $height = ($this->height / 2) - ($assetHeight / 2); - break; - - case 'r': - $width = $this->width - $assetWidth - $padding; - $height = ($this->height / 2) - ($assetHeight / 2); - break; - - case 'bl': - $width = 0 + $padding; - $height = $this->height - $assetHeight - $padding; - break; - - case 'b': - $width = ($this->width / 2) - ($assetWidth / 2); - $height = $this->height - $assetHeight - $padding; - break; - - case 'br': - $width = $this->width - $assetWidth - $padding; - $height = $this->height - $assetHeight - $padding; - break; - - default: - $width = 0; - $height = 0; - break; - } - } - - if ( ! $upperLeft) - { - $height = $height + $assetHeight; - } - - return array( 'width' => $width, 'height' => $height ); - } - - - ## -------------------------------------------------------- - - private function filterOpacity(&$img, $opacity = 75) - # - # Author: aiden dot mail at freemail dot hu - # Author date: 29-03-08 08:16 - # Date added: 08-05-11 - # Purpose: Change opacity of image - # Params in: $img: Image resource id - # (int) $opacity: the opacity amount: 0-100, 100 being not opaque. - # Params out: (bool) true on success, else false - # Ref: http://www.php.net/manual/en/function.imagefilter.php#82162 - # Notes: png only - # - { - - if ( ! isset($opacity)) - { - return false; - } - - if ($opacity == 100) - { - return true; - } - - $opacity /= 100; - - //get image width and height - $w = imagesx($img); - $h = imagesy($img); - - //turn alpha blending off - imagealphablending($img, false); - - //find the most opaque pixel in the image (the one with the smallest alpha value) - $minalpha = 127; - for ($x = 0; $x < $w; $x++) - { - for ($y = 0; $y < $h; $y++) - { - $alpha = (imagecolorat($img, $x, $y) >> 24) & 0xFF; - if ($alpha < $minalpha) - { - $minalpha = $alpha; - } - } - } - - //loop through image pixels and modify alpha for each - for ($x = 0; $x < $w; $x++) - { - for ($y = 0; $y < $h; $y++) - { - //get current alpha value (represents the TANSPARENCY!) - $colorxy = imagecolorat($img, $x, $y); - $alpha = ($colorxy >> 24) & 0xFF; - //calculate new alpha - if ($minalpha !== 127) - { - $alpha = 127 + 127 * $opacity * ($alpha - 127) / (127 - $minalpha); - } - else - { - $alpha += 127 * $opacity; - } - //get the color index with new alpha - $alphacolorxy = imagecolorallocatealpha($img, ($colorxy >> 16) & 0xFF, ($colorxy >> 8) & 0xFF, $colorxy & 0xFF, $alpha); - //set pixel with the new color + opacity - if ( ! imagesetpixel($img, $x, $y, $alphacolorxy)) - { - - return false; - } - } - } - - return true; - } - -## -------------------------------------------------------- - - private function openImage($file) - # Author: Jarrod Oberto - # Date: 27-02-08 - # Purpose: - # Param in: - # Param out: n/a - # Reference: - # Notes: - # - { - - if ( ! file_exists($file) && ! $this->checkStringStartsWith('http://', $file) && ! $this->checkStringStartsWith('https://', $file) ) - { - if ($this->debug) - { - throw new Exception('Image not found.'); - } - else - { - throw new Exception(); - } - }; - - - // *** Get extension / image type - if ( !function_exists( 'mime_content_type' ) ) - { - - function mime_content_type( $filename ) - { - $idx = explode( '.', $filename ); - $count_explode = count( $idx ); - $idx = strtolower( $idx[$count_explode - 1] ); - - $mimet = array( - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'asc' => 'text/plain', - 'atom' => 'application/atom+xml', - 'avi' => 'video/x-msvideo', - 'bcpio' => 'application/x-bcpio', - 'bmp' => 'image/bmp', - 'cdf' => 'application/x-netcdf', - 'cgm' => 'image/cgm', - 'cpio' => 'application/x-cpio', - 'cpt' => 'application/mac-compactpro', - 'crl' => 'application/x-pkcs7-crl', - 'crt' => 'application/x-x509-ca-cert', - 'csh' => 'application/x-csh', - 'css' => 'text/css', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'djv' => 'image/vnd.djvu', - 'djvu' => 'image/vnd.djvu', - 'doc' => 'application/msword', - 'dtd' => 'application/xml-dtd', - 'dvi' => 'application/x-dvi', - 'dxr' => 'application/x-director', - 'eps' => 'application/postscript', - 'etx' => 'text/x-setext', - 'ez' => 'application/andrew-inset', - 'gif' => 'image/gif', - 'gram' => 'application/srgs', - 'grxml' => 'application/srgs+xml', - 'gtar' => 'application/x-gtar', - 'hdf' => 'application/x-hdf', - 'hqx' => 'application/mac-binhex40', - 'html' => 'text/html', - 'html' => 'text/html', - 'ice' => 'x-conference/x-cooltalk', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ief' => 'image/ief', - 'ifb' => 'text/calendar', - 'iges' => 'model/iges', - 'igs' => 'model/iges', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'js' => 'application/x-javascript', - 'kar' => 'audio/midi', - 'latex' => 'application/x-latex', - 'm3u' => 'audio/x-mpegurl', - 'man' => 'application/x-troff-man', - 'mathml' => 'application/mathml+xml', - 'me' => 'application/x-troff-me', - 'mesh' => 'model/mesh', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mif' => 'application/vnd.mif', - 'mov' => 'video/quicktime', - 'movie' => 'video/x-sgi-movie', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpga' => 'audio/mpeg', - 'ms' => 'application/x-troff-ms', - 'msh' => 'model/mesh', - 'mxu m4u' => 'video/vnd.mpegurl', - 'nc' => 'application/x-netcdf', - 'oda' => 'application/oda', - 'ogg' => 'application/ogg', - 'pbm' => 'image/x-portable-bitmap', - 'pdb' => 'chemical/x-pdb', - 'pdf' => 'application/pdf', - 'pgm' => 'image/x-portable-graymap', - 'pgn' => 'application/x-chess-pgn', - 'php' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php3' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'ppm' => 'image/x-portable-pixmap', - 'ppt' => 'application/vnd.ms-powerpoint', - 'ps' => 'application/postscript', - 'qt' => 'video/quicktime', - 'ra' => 'audio/x-pn-realaudio', - 'ram' => 'audio/x-pn-realaudio', - 'ras' => 'image/x-cmu-raster', - 'rdf' => 'application/rdf+xml', - 'rgb' => 'image/x-rgb', - 'rm' => 'application/vnd.rn-realmedia', - 'roff' => 'application/x-troff', - 'rtf' => 'text/rtf', - 'rtx' => 'text/richtext', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'sh' => 'application/x-sh', - 'shar' => 'application/x-shar', - 'shtml' => 'text/html', - 'silo' => 'model/mesh', - 'sit' => 'application/x-stuffit', - 'skd' => 'application/x-koan', - 'skm' => 'application/x-koan', - 'skp' => 'application/x-koan', - 'skt' => 'application/x-koan', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'snd' => 'audio/basic', - 'spl' => 'application/x-futuresplash', - 'src' => 'application/x-wais-source', - 'sv4cpio' => 'application/x-sv4cpio', - 'sv4crc' => 'application/x-sv4crc', - 'svg' => 'image/svg+xml', - 'swf' => 'application/x-shockwave-flash', - 't' => 'application/x-troff', - 'tar' => 'application/x-tar', - 'tcl' => 'application/x-tcl', - 'tex' => 'application/x-tex', - 'texi' => 'application/x-texinfo', - 'texinfo' => 'application/x-texinfo', - 'tgz' => 'application/x-tar', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'tr' => 'application/x-troff', - 'tsv' => 'text/tab-separated-values', - 'txt' => 'text/plain', - 'ustar' => 'application/x-ustar', - 'vcd' => 'application/x-cdlink', - 'vrml' => 'model/vrml', - 'vxml' => 'application/voicexml+xml', - 'wav' => 'audio/x-wav', - 'wbmp' => 'image/vnd.wap.wbmp', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wml' => 'text/vnd.wap.wml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'wmlc' => 'application/vnd.wap.wmlc', - 'wmls' => 'text/vnd.wap.wmlscript', - 'wmlsc' => 'application/vnd.wap.wmlscriptc', - 'wmlsc' => 'application/vnd.wap.wmlscriptc', - 'wrl' => 'model/vrml', - 'xbm' => 'image/x-xbitmap', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'xls' => 'application/vnd.ms-excel', - 'xml xsl' => 'application/xml', - 'xpm' => 'image/x-xpixmap', - 'xslt' => 'application/xslt+xml', - 'xul' => 'application/vnd.mozilla.xul+xml', - 'xwd' => 'image/x-xwindowdump', - 'xyz' => 'chemical/x-xyz', - 'zip' => 'application/zip' - ); - - if ( isset( $mimet[$idx] ) ) - { - return $mimet[$idx]; - } - else - { - return 'application/octet-stream'; - } - } - - } - - $extension = mime_content_type($file); - $extension = fix_strtolower($extension); - $extension = str_replace('image/', '', $extension); - switch ($extension) - { - case 'jpg': - case 'jpeg': - $img = @imagecreatefromjpeg($file); - break; - case 'gif': - $img = @imagecreatefromgif($file); - break; - case 'png': - $img = @imagecreatefrompng($file); - break; - case 'bmp': - $img = @$this->imagecreatefrombmp($file); - break; - case 'psd': - case 'vnd.adobe.photoshop': - $img = @$this->imagecreatefrompsd($file); - break; - - - // ... etc - - default: - $img = false; - break; - } - - return $img; - } - -## -------------------------------------------------------- - - public function reset() - # - # Author: Jarrod Oberto - # Date: 30-08-11 - # Purpose: Reset the resource (allow further editing) - # Params in: - # Params out: - # Notes: - # - { - $this->__construct($this->fileName); - } - -## -------------------------------------------------------- - - public function saveImage($savePath, $imageQuality = "100") - # Author: Jarrod Oberto - # Date: 27-02-08 - # Purpose: Saves the image - # Param in: $savePath: Where to save the image including filename: - # $imageQuality: image quality you want the image saved at 0-100 - # Param out: n/a - # Reference: - # Notes: * gif doesn't have a quality parameter - # * jpg has a quality setting 0-100 (100 being the best) - # * png has a quality setting 0-9 (0 being the best) - # - # * bmp files have no native support for bmp files. We use a - # third party class to save as bmp. - { - - // *** Perform a check or two. - if ( ! is_resource($this->imageResized)) - { - if ($this->debug) - { - throw new Exception('saveImage: This is not a resource.'); - } - else - { - throw new Exception(); - } - } - $fileInfoArray = pathInfo($savePath); - clearstatcache(); - if ( ! is_writable($fileInfoArray['dirname'])) - { - if ($this->debug) - { - throw new Exception('The path is not writable. Please check your permissions.'); - } - else - { - throw new Exception(); - } - } - - // *** Get extension - $extension = strrchr($savePath, '.'); - $extension = fix_strtolower($extension); - - $error = ''; - - switch ($extension) - { - case '.jpg': - case '.jpeg': - $this->checkInterlaceImage($this->isInterlace); - if (imagetypes() & IMG_JPG) - { - imagejpeg($this->imageResized, $savePath, $imageQuality); - } - else - { - $error = 'jpg'; - } - break; - - case '.gif': - $this->checkInterlaceImage($this->isInterlace); - if (imagetypes() & IMG_GIF) - { - imagegif($this->imageResized, $savePath); - } - else - { - $error = 'gif'; - } - break; - - case '.png': - // *** Scale quality from 0-100 to 0-9 - $scaleQuality = round(($imageQuality / 100) * 9); - - // *** Invert qualit setting as 0 is best, not 9 - $invertScaleQuality = 9 - $scaleQuality; - - $this->checkInterlaceImage($this->isInterlace); - if (imagetypes() & IMG_PNG) - { - imagepng($this->imageResized, $savePath, $invertScaleQuality); - } - else - { - $error = 'png'; - } - break; - - case '.bmp': - file_put_contents($savePath, $this->GD2BMPstring($this->imageResized)); - break; - - - // ... etc - - default: - // *** No extension - No save. - $this->errorArray[] = 'This file type (' . $extension . ') is not supported. File not saved.'; - break; - } - - //imagedestroy($this->imageResized); - - // *** Display error if a file type is not supported. - if ($error != '') - { - $this->errorArray[] = $error . ' support is NOT enabled. File not saved.'; - } - } - -## -------------------------------------------------------- - - public function displayImage($fileType = 'jpg', $imageQuality = "100") - # Author: Jarrod Oberto - # Date: 18-11-09 - # Purpose: Display images directly to the browser - # Param in: The image type you want to display - # Param out: - # Reference: - # Notes: - # - { - - if ( ! is_resource($this->imageResized)) - { - if ($this->debug) - { - throw new Exception('saveImage: This is not a resource.'); - } - else - { - throw new Exception(); - } - } - - switch ($fileType) - { - case 'jpg': - case 'jpeg': - header('Content-type: image/jpeg'); - imagejpeg($this->imageResized, '', $imageQuality); - break; - case 'gif': - header('Content-type: image/gif'); - imagegif($this->imageResized); - break; - case 'png': - header('Content-type: image/png'); - - // *** Scale quality from 0-100 to 0-9 - $scaleQuality = round(($imageQuality / 100) * 9); - - // *** Invert qualit setting as 0 is best, not 9 - $invertScaleQuality = 9 - $scaleQuality; - - imagepng($this->imageResized, '', $invertScaleQuality); - break; - case 'bmp': - echo 'bmp file format is not supported.'; - break; - - // ... etc - - default: - // *** No extension - No save. - break; - } - - - //imagedestroy($this->imageResized); - } - -## -------------------------------------------------------- - - public function setTransparency($bool) - # Sep 2011 - { - $this->keepTransparency = $bool; - } - -## -------------------------------------------------------- - - public function setFillColor($value) - # Sep 2011 - # Param in: (mixed) $value: (array) Could be an array of RGB - # (str) Could be hex #ffffff or #fff, fff, ffffff - # - # If the keepTransparency is set to false, then no transparency is to be used. - # This is ideal when you want to save as jpg. - # - # this method allows you to set the background color to use instead of - # transparency. - # - { - $colorArray = $this->formatColor($value); - $this->fillColorArray = $colorArray; - } - -## -------------------------------------------------------- - - public function setCropFromTop($value) - # Sep 2011 - { - $this->cropFromTopPercent = $value; - } - -## -------------------------------------------------------- - - public function testGDInstalled() - # Author: Jarrod Oberto - # Date: 27-02-08 - # Purpose: Test to see if GD is installed - # Param in: n/a - # Param out: (bool) True is gd extension loaded otherwise false - # Reference: - # Notes: - # - { - if (extension_loaded('gd') && function_exists('gd_info')) - { - $gdInstalled = true; - } - else - { - $gdInstalled = false; - } - - return $gdInstalled; - } - -## -------------------------------------------------------- - - public function testEXIFInstalled() - # Author: Jarrod Oberto - # Date: 08-05-11 - # Purpose: Test to see if EXIF is installed - # Param in: n/a - # Param out: (bool) True is exif extension loaded otherwise false - # Reference: - # Notes: - # - { - if (extension_loaded('exif')) - { - $exifInstalled = true; - } - else - { - $exifInstalled = false; - } - - return $exifInstalled; - } - -## -------------------------------------------------------- - - public function testIsImage($image) - # Author: Jarrod Oberto - # Date: 27-02-08 - # Purpose: Test if file is an image - # Param in: n/a - # Param out: n/a - # Reference: - # Notes: - # - { - if ($image) - { - $fileIsImage = true; - } - else - { - $fileIsImage = false; - } - - return $fileIsImage; - } - -## -------------------------------------------------------- - - public function testFunct() - # Author: Jarrod Oberto - # Date: 27-02-08 - # Purpose: Test Function - # Param in: n/a - # Param out: n/a - # Reference: - # Notes: - # - { - echo $this->height; - } - -## -------------------------------------------------------- - - public function setForceStretch($value) - # Author: Jarrod Oberto - # Date: 23-12-10 - # Purpose: - # Param in: (bool) $value - # Param out: n/a - # Reference: - # Notes: - # - { - $this->forceStretch = $value; - } - -## -------------------------------------------------------- - - public function setFile($fileName) - # Author: Jarrod Oberto - # Date: 28-02-08 - # Purpose: - # Param in: n/a - # Param out: n/a - # Reference: - # Notes: - # - { - self::__construct($fileName); - } - -## -------------------------------------------------------- - - public function getFileName() - # Author: Jarrod Oberto - # Date: 10-09-08 - # Purpose: - # Param in: n/a - # Param out: n/a - # Reference: - # Notes: - # - { - return $this->fileName; - } - -## -------------------------------------------------------- - - public function getHeight() - { - return $this->height; - } - -## -------------------------------------------------------- - - public function getWidth() - { - return $this->width; - } - -## -------------------------------------------------------- - - public function getOriginalHeight() - { - return $this->heightOriginal; - } - -## -------------------------------------------------------- - - public function getOriginalWidth() - { - return $this->widthOriginal; - } - -## -------------------------------------------------------- - - public function getErrors() - # Author: Jarrod Oberto - # Date: 19-11-09 - # Purpose: Returns the error array - # Param in: n/a - # Param out: Array of errors - # Reference: - # Notes: - # - { - return $this->errorArray; - } - -## -------------------------------------------------------- - - private function checkInterlaceImage($isEnabled) - # jpg will use progressive (they don't use interace) - { - if ($isEnabled) - { - imageinterlace($this->imageResized, $isEnabled); - } - } - -## -------------------------------------------------------- - - protected function formatColor($value) - # Author: Jarrod Oberto - # Date: 09-05-11 - # Purpose: Determine color method passed in and return color as RGB - # Param in: (mixed) $value: (array) Could be an array of RGB - # (str) Could be hex #ffffff or #fff, fff, ffffff - # Param out: - # Reference: - # Notes: - # - { - $rgbArray = array(); - - // *** If it's an array it should be R, G, B - if (is_array($value)) - { - - if (key($value) == 0 && count($value) == 3) - { - - $rgbArray['r'] = $value[0]; - $rgbArray['g'] = $value[1]; - $rgbArray['b'] = $value[2]; - - } - else - { - $rgbArray = $value; - } - } - else - { - if (fix_strtolower($value) == 'transparent') - { - - $rgbArray = array( - 'r' => 255, - 'g' => 255, - 'b' => 255, - 'a' => 127 - ); - - } - else - { - - // *** ...Else it should be hex. Let's make it RGB - $rgbArray = $this->hex2dec($value); - } - } - - return $rgbArray; - } - - ## -------------------------------------------------------- - - function hex2dec($hex) - # Purpose: Convert #hex color to RGB - { - $color = str_replace('#', '', $hex); - - if (strlen($color) == 3) - { - $color = $color . $color; - } - - $rgb = array( - 'r' => hexdec(substr($color, 0, 2)), - 'g' => hexdec(substr($color, 2, 2)), - 'b' => hexdec(substr($color, 4, 2)), - 'a' => 0 - ); - - return $rgb; - } - - ## -------------------------------------------------------- - - private function createImageColor($colorArray) - { - $r = $colorArray['r']; - $g = $colorArray['g']; - $b = $colorArray['b']; - - return imagecolorallocate($this->imageResized, $r, $g, $b); - } - - ## -------------------------------------------------------- - - private function testColorExists($colorArray) - { - $r = $colorArray['r']; - $g = $colorArray['g']; - $b = $colorArray['b']; - - if (imagecolorexact($this->imageResized, $r, $g, $b) == -1) - { - return false; - } - else - { - return true; - } - } - - ## -------------------------------------------------------- - - private function findUnusedGreen() - # Purpose: We find a green color suitable to use like green-screen effect. - # Therefore, the color must not exist in the image. - { - $green = 255; - - do - { - - $greenChroma = array( 0, $green, 0 ); - $colorArray = $this->formatColor($greenChroma); - $match = $this->testColorExists($colorArray); - $green--; - - } while ($match == false && $green > 0); - - // *** If no match, just bite the bullet and use green value of 255 - if ( ! $match) - { - $greenChroma = array( 0, $green, 0 ); - } - - return $greenChroma; - } - - ## -------------------------------------------------------- - - private function findUnusedBlue() - # Purpose: We find a green color suitable to use like green-screen effect. - # Therefore, the color must not exist in the image. - { - $blue = 255; - - do - { - - $blueChroma = array( 0, 0, $blue ); - $colorArray = $this->formatColor($blueChroma); - $match = $this->testColorExists($colorArray); - $blue--; - - } while ($match == false && $blue > 0); - - // *** If no match, just bite the bullet and use blue value of 255 - if ( ! $match) - { - $blueChroma = array( 0, 0, $blue ); - } - - return $blueChroma; - } - - ## -------------------------------------------------------- - - private function invertTransparency($value, $originalMax, $invert = true) - # Purpose: This does two things: - # 1) Convert the range from 0-127 to 0-100 - # 2) Inverts value to 100 is not transparent while 0 is fully - # transparent (like Photoshop) - { - // *** Test max range - if ($value > $originalMax) - { - $value = $originalMax; - } - - // *** Test min range - if ($value < 0) - { - $value = 0; - } - - if ($invert) - { - return $originalMax - (($value / 100) * $originalMax); - } - else - { - return ($value / 100) * $originalMax; - } - } - - ## -------------------------------------------------------- - - private function transparentImage($src) - { - // *** making images with white bg transparent - $r1 = 0; - $g1 = 255; - $b1 = 0; - for ($x = 0; $x < imagesx($src); ++$x) - { - for ($y = 0; $y < imagesy($src); ++$y) - { - $color = imagecolorat($src, $x, $y); - $r = ($color >> 16) & 0xFF; - $g = ($color >> 8) & 0xFF; - $b = $color & 0xFF; - for ($i = 0; $i < 270; $i++) - { - //if ($r . $g . $b == ($r1 + $i) . ($g1 + $i) . ($b1 + $i)) { - if ($r == 0 && $g == 255 && $b == 0) - { - //if ($g == 255) { - $trans_colour = imagecolorallocatealpha($src, 0, 0, 0, 127); - imagefill($src, $x, $y, $trans_colour); - } - } - } - } - - return $src; - } - - ## -------------------------------------------------------- - - function checkStringStartsWith($needle, $haystack) - # Check if a string starts with a specific pattern - { - return (substr($haystack, 0, strlen($needle)) == $needle); - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - BMP SUPPORT (SAVING) - James Heinrich -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - private function GD2BMPstring(&$gd_image) - # Author: James Heinrich - # Purpose: Save file as type bmp - # Param in: The image canvas (passed as ref) - # Param out: - # Reference: - # Notes: This code was stripped out of two external files - # (phpthumb.bmp.php,phpthumb.functions.php) and added below to - # avoid dependancies. - # - { - $imageX = ImageSX($gd_image); - $imageY = ImageSY($gd_image); - - $BMP = ''; - for ($y = ($imageY - 1); $y >= 0; $y--) - { - $thisline = ''; - for ($x = 0; $x < $imageX; $x++) - { - $argb = $this->GetPixelColor($gd_image, $x, $y); - $thisline .= chr($argb['blue']) . chr($argb['green']) . chr($argb['red']); - } - while (strlen($thisline) % 4) - { - $thisline .= "\x00"; - } - $BMP .= $thisline; - } - - $bmpSize = strlen($BMP) + 14 + 40; - // BITMAPFILEHEADER [14 bytes] - http://msdn.microsoft.com/library/en-us/gdi/bitmaps_62uq.asp - $BITMAPFILEHEADER = 'BM'; // WORD bfType; - $BITMAPFILEHEADER .= $this->LittleEndian2String($bmpSize, 4); // DWORD bfSize; - $BITMAPFILEHEADER .= $this->LittleEndian2String(0, 2); // WORD bfReserved1; - $BITMAPFILEHEADER .= $this->LittleEndian2String(0, 2); // WORD bfReserved2; - $BITMAPFILEHEADER .= $this->LittleEndian2String(54, 4); // DWORD bfOffBits; - - // BITMAPINFOHEADER - [40 bytes] http://msdn.microsoft.com/library/en-us/gdi/bitmaps_1rw2.asp - $BITMAPINFOHEADER = $this->LittleEndian2String(40, 4); // DWORD biSize; - $BITMAPINFOHEADER .= $this->LittleEndian2String($imageX, 4); // LONG biWidth; - $BITMAPINFOHEADER .= $this->LittleEndian2String($imageY, 4); // LONG biHeight; - $BITMAPINFOHEADER .= $this->LittleEndian2String(1, 2); // WORD biPlanes; - $BITMAPINFOHEADER .= $this->LittleEndian2String(24, 2); // WORD biBitCount; - $BITMAPINFOHEADER .= $this->LittleEndian2String(0, 4); // DWORD biCompression; - $BITMAPINFOHEADER .= $this->LittleEndian2String(0, 4); // DWORD biSizeImage; - $BITMAPINFOHEADER .= $this->LittleEndian2String(2835, 4); // LONG biXPelsPerMeter; - $BITMAPINFOHEADER .= $this->LittleEndian2String(2835, 4); // LONG biYPelsPerMeter; - $BITMAPINFOHEADER .= $this->LittleEndian2String(0, 4); // DWORD biClrUsed; - $BITMAPINFOHEADER .= $this->LittleEndian2String(0, 4); // DWORD biClrImportant; - - return $BITMAPFILEHEADER . $BITMAPINFOHEADER . $BMP; - } - -## -------------------------------------------------------- - - private function GetPixelColor(&$img, $x, $y) - # Author: James Heinrich - # Purpose: - # Param in: - # Param out: - # Reference: - # Notes: - # - { - if ( ! is_resource($img)) - { - return false; - } - - return @ImageColorsForIndex($img, @ImageColorAt($img, $x, $y)); - } - -## -------------------------------------------------------- - - private function LittleEndian2String($number, $minbytes = 1) - # Author: James Heinrich - # Purpose: BMP SUPPORT (SAVING) - # Param in: - # Param out: - # Reference: - # Notes: - # - { - $intstring = ''; - while ($number > 0) - { - $intstring = $intstring . chr($number & 255); - $number >>= 8; - } - - return str_pad($intstring, $minbytes, "\x00", STR_PAD_RIGHT); - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - BMP SUPPORT (READING) -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - private function ImageCreateFromBMP($filename) - # Author: DHKold - # Date: The 15th of June 2005 - # Version: 2.0B - # Purpose: To create an image from a BMP file. - # Param in: BMP file to open. - # Param out: Return a resource like the other ImageCreateFrom functions - # Reference: http://us3.php.net/manual/en/function.imagecreate.php#53879 - # Bug fix: Author: domelca at terra dot es - # Date: 06 March 2008 - # Fix: Correct 16bit BMP support - # Notes: - # - { - - //Ouverture du fichier en mode binaire - if ( ! $f1 = fopen($filename, "rb")) - { - return false; - } - - //1 : Chargement des ent�tes FICHIER - $FILE = unpack("vfile_type/Vfile_size/Vreserved/Vbitmap_offset", fread($f1, 14)); - if ($FILE['file_type'] != 19778) - { - return false; - } - - //2 : Chargement des ent�tes BMP - $BMP = unpack('Vheader_size/Vwidth/Vheight/vplanes/vbits_per_pixel' . - '/Vcompression/Vsize_bitmap/Vhoriz_resolution' . - '/Vvert_resolution/Vcolors_used/Vcolors_important', fread($f1, 40)); - $BMP['colors'] = pow(2, $BMP['bits_per_pixel']); - - if ($BMP['size_bitmap'] == 0) - { - $BMP['size_bitmap'] = $FILE['file_size'] - $FILE['bitmap_offset']; - } - - $BMP['bytes_per_pixel'] = $BMP['bits_per_pixel'] / 8; - $BMP['bytes_per_pixel2'] = ceil($BMP['bytes_per_pixel']); - $BMP['decal'] = ($BMP['width'] * $BMP['bytes_per_pixel'] / 4); - $BMP['decal'] -= floor($BMP['width'] * $BMP['bytes_per_pixel'] / 4); - $BMP['decal'] = 4 - (4 * $BMP['decal']); - - if ($BMP['decal'] == 4) - { - $BMP['decal'] = 0; - } - - //3 : Chargement des couleurs de la palette - $PALETTE = array(); - if ($BMP['colors'] < 16777216) - { - $PALETTE = unpack('V' . $BMP['colors'], fread($f1, $BMP['colors'] * 4)); - } - - //4 : Cr�ation de l'image - $IMG = fread($f1, $BMP['size_bitmap']); - $VIDE = chr(0); - - $res = imagecreatetruecolor($BMP['width'], $BMP['height']); - $P = 0; - $Y = $BMP['height'] - 1; - while ($Y >= 0) - { - $X = 0; - while ($X < $BMP['width']) - { - if ($BMP['bits_per_pixel'] == 24) - { - $COLOR = unpack("V", substr($IMG, $P, 3) . $VIDE); - } - elseif ($BMP['bits_per_pixel'] == 16) - { - - /* - * BMP 16bit fix - * ================= - * - * Ref: http://us3.php.net/manual/en/function.imagecreate.php#81604 - * - * Notes: - * "don't work with bmp 16 bits_per_pixel. change pixel - * generator for this." - * - */ - - // *** Original code (don't work) - //$COLOR = unpack("n",substr($IMG,$P,2)); - //$COLOR[1] = $PALETTE[$COLOR[1]+1]; - - $COLOR = unpack("v", substr($IMG, $P, 2)); - $blue = ($COLOR[1] & 0x001f) << 3; - $green = ($COLOR[1] & 0x07e0) >> 3; - $red = ($COLOR[1] & 0xf800) >> 8; - $COLOR[1] = $red * 65536 + $green * 256 + $blue; - - } - elseif ($BMP['bits_per_pixel'] == 8) - { - $COLOR = unpack("n", $VIDE . substr($IMG, $P, 1)); - $COLOR[1] = $PALETTE[ $COLOR[1] + 1 ]; - } - elseif ($BMP['bits_per_pixel'] == 4) - { - $COLOR = unpack("n", $VIDE . substr($IMG, floor($P), 1)); - if (($P * 2) % 2 == 0) - { - $COLOR[1] = ($COLOR[1] >> 4); - } - else - { - $COLOR[1] = ($COLOR[1] & 0x0F); - } - $COLOR[1] = $PALETTE[ $COLOR[1] + 1 ]; - } - elseif ($BMP['bits_per_pixel'] == 1) - { - $COLOR = unpack("n", $VIDE . substr($IMG, floor($P), 1)); - if (($P * 8) % 8 == 0) - { - $COLOR[1] = $COLOR[1] >> 7; - } - elseif (($P * 8) % 8 == 1) - { - $COLOR[1] = ($COLOR[1] & 0x40) >> 6; - } - elseif (($P * 8) % 8 == 2) - { - $COLOR[1] = ($COLOR[1] & 0x20) >> 5; - } - elseif (($P * 8) % 8 == 3) - { - $COLOR[1] = ($COLOR[1] & 0x10) >> 4; - } - elseif (($P * 8) % 8 == 4) - { - $COLOR[1] = ($COLOR[1] & 0x8) >> 3; - } - elseif (($P * 8) % 8 == 5) - { - $COLOR[1] = ($COLOR[1] & 0x4) >> 2; - } - elseif (($P * 8) % 8 == 6) - { - $COLOR[1] = ($COLOR[1] & 0x2) >> 1; - } - elseif (($P * 8) % 8 == 7) - { - $COLOR[1] = ($COLOR[1] & 0x1); - } - $COLOR[1] = $PALETTE[ $COLOR[1] + 1 ]; - } - else - { - return false; - } - - imagesetpixel($res, $X, $Y, $COLOR[1]); - $X++; - $P += $BMP['bytes_per_pixel']; - } - - $Y--; - $P += $BMP['decal']; - } - //Fermeture du fichier - fclose($f1); - - return $res; - } - - - /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*- - PSD SUPPORT (READING) -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*/ - - private function imagecreatefrompsd($fileName) - # Author: Tim de Koning - # Version: 1.3 - # Purpose: To create an image from a PSD file. - # Param in: PSD file to open. - # Param out: Return a resource like the other ImageCreateFrom functions - # Reference: http://www.kingsquare.nl/phppsdreader - # Notes: - # - { - if (file_exists($this->psdReaderPath)) - { - - - include_once($this->psdReaderPath); - - $psdReader = new PhpPsdReader($fileName); - - if (isset($psdReader->infoArray['error'])) - { - return ''; - } - else - { - return $psdReader->getImage(); - } - } - else - { - return false; - } - } - -## -------------------------------------------------------- - - public function __destruct() - { - if (is_resource($this->imageResized)) - { - imagedestroy($this->imageResized); - } - } - -## -------------------------------------------------------- - -} - - -/* - * Example with some API calls (outdated): - * - * - * =============================== - * Compulsary - * =============================== - * - * include("classes/resize_class.php"); - * - * // *** Initialise object - * $magicianObj = new resize('images/cars/large/a.jpg'); - * - * // *** Turn off stretching (optional) - * $magicianObj -> setForceStretch(false); - * - * // *** Resize object - * $magicianObj -> resizeImage(150, 100, 0); - * - * =============================== - * Image options - can run none, one, or all. - * =============================== - * - * // *** Add watermark - * $magicianObj -> addWatermark('stamp.png'); - * - * // *** Add text - * $magicianObj -> addText('testing...'); - * - * =============================== - * Output options - can run one, or the other, or both. - * =============================== - * - * // *** Save image to disk - * $magicianObj -> saveImage('images/cars/large/b.jpg', 100); - * - * // *** Or output to screen (params in can be jpg, gif, png) - * $magicianObj -> displayImage('png'); - * - * =============================== - * Return options - return errors. nice for debuggin. - * =============================== - * - * // *** Return error array - * $errorArray = $magicianObj -> getErrors(); - * - * - * =============================== - * Cleanup options - not really neccessary, but good practice - * =============================== - * - * // *** Free used memory - * $magicianObj -> __destruct(); - */ diff --git a/libraries/filemanager-9.12.1/include/utils.php b/libraries/filemanager-9.12.1/include/utils.php deleted file mode 100644 index ec78342..0000000 --- a/libraries/filemanager-9.12.1/include/utils.php +++ /dev/null @@ -1,1164 +0,0 @@ -send(); - exit; - } - - } - if(file_exists('lang/' . $lang . '.php')){ - $lang_vars = include 'lang/' . $lang . '.php'; - }else{ - $lang_vars = include '../lang/' . $lang . '.php'; - } - - if ( ! is_array($lang_vars)) - { - $lang_vars = array(); - } -} - -/** -* Delete directory -* -* @param string $dir -* -* @return bool -*/ -function deleteDir($dir,$ftp = null, $config = null) -{ - if($ftp){ - - try{ - $ftp->rmdir($dir); - return true; - - }catch(FtpClient\FtpException $e){ - return null; - } - - }else{ - if ( ! file_exists($dir)) - { - return false; - } - if ( ! is_dir($dir)) - { - return unlink($dir); - } - foreach (scandir($dir) as $item) - { - if ($item == '.' || $item == '..') - { - continue; - } - if ( ! deleteDir($dir . DIRECTORY_SEPARATOR . $item)) - { - return false; - } - } - } - - return rmdir($dir); -} - -/** -* Make a file copy -* -* @param string $old_path -* @param string $name New file name without extension -* -* @return bool -*/ -function duplicate_file( $old_path, $name, $ftp = null, $config = null ) -{ - $info = pathinfo($old_path); - $new_path = $info['dirname'] . "/" . $name . "." . $info['extension']; - if($ftp){ - try{ - $tmp = time().$name . "." . $info['extension']; - $ftp->get($tmp, "/".$old_path, FTP_BINARY); - $ftp->put("/".$new_path, $tmp, FTP_BINARY); - unlink($tmp); - return true; - - }catch(FtpClient\FtpException $e){ - return null; - } - }else{ - if (file_exists($old_path)) - { - if (file_exists($new_path) && $old_path == $new_path) - { - return false; - } - - return copy($old_path, $new_path); - } - } -} - - -/** -* Rename file -* -* @param string $old_path File to rename -* @param string $name New file name without extension -* @param bool $transliteration -* -* @return bool -*/ -function rename_file($old_path, $name, $ftp = null, $config = null) -{ - $name = fix_filename($name, $config); - $info = pathinfo($old_path); - $new_path = $info['dirname'] . "/" . $name . "." . $info['extension']; - if($ftp){ - try{ - return $ftp->rename("/".$old_path, "/".$new_path); - }catch(FtpClient\FtpException $e){ - return false; - } - }else{ - if (file_exists($old_path)) - { - $new_path = $info['dirname'] . "/" . $name . "." . $info['extension']; - if (file_exists($new_path) && $old_path == $new_path) - { - return false; - } - - return rename($old_path, $new_path); - } - } -} - - -function url_exists($url){ - if (!$fp = curl_init($url)) return false; - return true; -} - - -function tempdir() { - $tempfile=tempnam(sys_get_temp_dir(),''); - if (file_exists($tempfile)) { unlink($tempfile); } - mkdir($tempfile); - if (is_dir($tempfile)) { return $tempfile; } -} - - -/** -* Rename directory -* -* @param string $old_path Directory to rename -* @param string $name New directory name -* @param bool $transliteration -* -* @return bool -*/ -function rename_folder($old_path, $name, $ftp = null, $config = null) -{ - $name = fix_filename($name, $config, true); - $new_path = fix_dirname($old_path) . "/" . $name; - if($ftp){ - if($ftp->chdir("/".$old_path)){ - if(@$ftp->chdir($new_path)){ - return false; - } - return $ftp->rename("/".$old_path, "/".$new_path); - } - }else{ - if (file_exists($old_path)) - { - if (file_exists($new_path) && $old_path == $new_path) - { - return false; - } - - return rename($old_path, $new_path); - } - } -} - -function ftp_con($config){ - if(isset($config['ftp_host']) && $config['ftp_host']){ - // *** Include the class - include('include/FtpClient.php'); - include('include/FtpException.php'); - include('include/FtpWrapper.php'); - - $ftp = new \FtpClient\FtpClient(); - try{ - $ftp->connect($config['ftp_host'],$config['ftp_ssl'],$config['ftp_port']); - $ftp->login($config['ftp_user'], $config['ftp_pass']); - $ftp->pasv(true); - return $ftp; - }catch(FtpClient\FtpException $e){ - echo "Error: "; - echo $e->getMessage(); - echo " to server "; - $tmp = $e->getTrace(); - echo $tmp[0]['args'][0]; - echo "
Please check configurations"; - die(); - } - }else{ - return false; - } -} - -/** -* Create new image from existing file -* -* @param string $imgfile Source image file name -* @param string $imgthumb Thumbnail file name -* @param int $newwidth Thumbnail width -* @param int $newheight Optional thumbnail height -* @param string $option Type of resize -* -* @return bool -* @throws \Exception -*/ -function create_img($imgfile, $imgthumb, $newwidth, $newheight = null, $option = "crop",$config = array()) -{ - $result = false; - if(isset($config['ftp_host']) && $config['ftp_host']){ - if(url_exists($imgfile)){ - $temp = tempnam('/tmp','RF'); - unlink($temp); - $temp .=".".substr(strrchr($imgfile,'.'),1); - $handle = fopen($temp, "w"); - fwrite($handle, file_get_contents($imgfile)); - fclose($handle); - $imgfile= $temp; - $save_ftp = $imgthumb; - $imgthumb = $temp; - } - } - if(file_exists($imgfile) || strpos($imgfile,'http')===0){ - if (strpos($imgfile,'http')===0 || image_check_memory_usage($imgfile, $newwidth, $newheight)) - { - require_once('php_image_magician.php'); - try{ - $magicianObj = new imageLib($imgfile); - $magicianObj->resizeImage($newwidth, $newheight, $option); - $magicianObj->saveImage($imgthumb, 80); - }catch (Exception $e){ - return $e->getMessage(); - } - $result = true; - } - } - if($result && isset($config['ftp_host']) && $config['ftp_host'] ){ - $ftp->put($save_ftp, $imgthumb, FTP_BINARY); - unlink($imgthumb); - } - - return $result; -} - -/** -* Convert convert size in bytes to human readable -* -* @param int $size -* -* @return string -*/ -function makeSize($size) -{ - $units = array( 'B', 'KB', 'MB', 'GB', 'TB' ); - $u = 0; - while ((round($size / 1024) > 0) && ($u < 4)) - { - $size = $size / 1024; - $u++; - } - - return (number_format($size, 0) . " " . trans($units[ $u ])); -} - -/** -* Determine directory size -* -* @param string $path -* -* @return int -*/ -function folder_info($path,$count_hidden=true) -{ - global $hidden_folders,$hidden_files; - $total_size = 0; - $files = scandir($path); - $cleanPath = rtrim($path, '/') . '/'; - $files_count = 0; - $folders_count = 0; - foreach ($files as $t) - { - if ($t != "." && $t != "..") - { - if ($count_hidden or !(in_array($t,$hidden_folders) or in_array($t,$hidden_files))) - { - $currentFile = $cleanPath . $t; - if (is_dir($currentFile)) - { - list($size,$tmp,$tmp1) = folder_info($currentFile); - $total_size += $size; - $folders_count ++; - } - else - { - $size = filesize($currentFile); - $total_size += $size; - $files_count++; - } - } - } - } - - return array($total_size,$files_count,$folders_count); -} -/** -* Get number of files in a directory -* -* @param string $path -* -* @return int -*/ -function filescount($path,$count_hidden=true) -{ - global $hidden_folders,$hidden_files; - $total_count = 0; - $files = scandir($path); - $cleanPath = rtrim($path, '/') . '/'; - - foreach ($files as $t) - { - if ($t != "." && $t != "..") - { - if ($count_hidden or !(in_array($t,$hidden_folders) or in_array($t,$hidden_files))) - { - $currentFile = $cleanPath . $t; - if (is_dir($currentFile)) - { - $size = filescount($currentFile); - $total_count += $size; - } - else - { - $total_count += 1; - } - } - } - } - - return $total_count; -} -/** -* check if the current folder size plus the added size is over the overall size limite -* -* @param int $sizeAdded -* -* @return bool -*/ -function checkresultingsize($sizeAdded) -{ - global $MaxSizeTotal,$current_path; - if ($MaxSizeTotal !== false && is_int($MaxSizeTotal)) { - list($sizeCurrentFolder,$fileCurrentNum,$foldersCurrentCount) = folder_info($current_path,false); - // overall size over limit - if (($MaxSizeTotal * 1024 * 1024) < ($sizeCurrentFolder + $sizeAdded)) { - return false; - } - } - return true; -} - -/** -* Create directory for images and/or thumbnails -* -* @param string $path -* @param string $path_thumbs -*/ -function create_folder($path = null, $path_thumbs = null,$ftp = null,$config = null) -{ - if($ftp){ - $ftp->mkdir($path); - $ftp->mkdir($path_thumbs); - }else{ - $oldumask = umask(0); - if ($path && ! file_exists($path)) - { - mkdir($path, 0755, true); - } // or even 01777 so you get the sticky bit set - if ($path_thumbs && ! file_exists($path_thumbs)) - { - mkdir($path_thumbs, 0755, true) or die("$path_thumbs cannot be found"); - } // or even 01777 so you get the sticky bit set - umask($oldumask); - } -} - -/** -* Get file extension present in directory -* -* @param string $path -* @param string $ext -*/ -function check_files_extensions_on_path($path, $ext) -{ - if ( ! is_dir($path)) - { - $fileinfo = pathinfo($path); - if ( ! in_array(mb_strtolower($fileinfo['extension']), $ext)) - { - unlink($path); - } - } - else - { - $files = scandir($path); - foreach ($files as $file) - { - check_files_extensions_on_path(trim($path, '/') . "/" . $file, $ext); - } - } -} - -/** -* Get file extension present in PHAR file -* -* @param string $phar -* @param array $files -* @param string $basepath -* @param string $ext -*/ -function check_files_extensions_on_phar($phar, &$files, $basepath, $ext) -{ - foreach ($phar as $file) - { - if ($file->isFile()) - { - if (in_array(mb_strtolower($file->getExtension()), $ext)) - { - $files[] = $basepath . $file->getFileName(); - } - } - else - { - if ($file->isDir()) - { - $iterator = new DirectoryIterator($file); - check_files_extensions_on_phar($iterator, $files, $basepath . $file->getFileName() . '/', $ext); - } - } - } -} - -/** -* Cleanup input -* -* @param string $str -* -* @return string -*/ -function fix_get_params($str) -{ - return strip_tags(preg_replace("/[^a-zA-Z0-9\.\[\]_| -]/", '', $str)); -} - -/** -* Cleanup filename -* -* @param string $str -* @param bool $transliteration -* @param bool $convert_spaces -* @param string $replace_with -* @param bool $is_folder -* -* @return string -*/ -function fix_filename($str, $config, $is_folder = false) -{ - if ($config['convert_spaces']) - { - $str = str_replace(' ', $config['replace_with'], $str); - } - - if ($config['transliteration']) - { - if (!mb_detect_encoding($str, 'UTF-8', true)) - { - $str = utf8_encode($str); - } - if (function_exists('transliterator_transliterate')) - { - $str = transliterator_transliterate('Any-Latin; Latin-ASCII', $str); - } - else - { - $str = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str); - } - - $str = preg_replace("/[^a-zA-Z0-9\.\[\]_| -]/", '', $str); - } - - $str = str_replace(array( '"', "'", "/", "\\" ), "", $str); - $str = strip_tags($str); - - // Empty or incorrectly transliterated filename. - // Here is a point: a good file UNKNOWN_LANGUAGE.jpg could become .jpg in previous code. - // So we add that default 'file' name to fix that issue. - if (strpos($str, '.') === 0 && $is_folder === false) - { - $str = 'file' . $str; - } - - return trim($str); -} - -/** -* Cleanup directory name -* -* @param string $str -* -* @return string -*/ -function fix_dirname($str) -{ - return str_replace('~', ' ', dirname(str_replace(' ', '~', $str))); -} - -/** -* Correct strtoupper handling -* -* @param string $str -* -* @return string -*/ -function fix_strtoupper($str) -{ - if (function_exists('mb_strtoupper')) - { - return mb_strtoupper($str); - } - else - { - return strtoupper($str); - } -} - -/** -* Correct strtolower handling -* -* @param string $str -* -* @return string -*/ -function fix_strtolower($str) -{ - if (function_exists('mb_strtoupper')) - { - return mb_strtolower($str); - } - else - { - return strtolower($str); - } -} - -function fix_path($path, $config) -{ - $info = pathinfo($path); - $tmp_path = $info['dirname']; - $str = fix_filename($info['filename'], $config); - if ($tmp_path != "") - { - return $tmp_path . DIRECTORY_SEPARATOR . $str; - } - else - { - return $str; - } -} - -/** -* @param $current_path -* @param $fld -* -* @return bool -*/ -function config_loading($current_path, $fld) -{ - if (file_exists($current_path . $fld . ".config")) - { - require_once($current_path . $fld . ".config"); - - return true; - } - echo "!!!!" . $parent = fix_dirname($fld); - if ($parent != "." && ! empty($parent)) - { - config_loading($current_path, $parent); - } - - return false; -} - -/** -* Check if memory is enough to process image -* -* @param string $img -* @param int $max_breedte -* @param int $max_hoogte -* -* @return bool -*/ -function image_check_memory_usage($img, $max_breedte, $max_hoogte) -{ - if (file_exists($img)) - { - $K64 = 65536; // number of bytes in 64K - $memory_usage = memory_get_usage(); - if(ini_get('memory_limit') > 0 ){ - $memory_limit = abs(intval(str_replace('M', '', ini_get('memory_limit')) * 1024 * 1024)); - $image_properties = getimagesize($img); - $image_width = $image_properties[0]; - $image_height = $image_properties[1]; - if (isset($image_properties['bits'])) - $image_bits = $image_properties['bits']; - else - $image_bits = 0; - $image_memory_usage = $K64 + ($image_width * $image_height * ($image_bits >> 3) * 2); - $thumb_memory_usage = $K64 + ($max_breedte * $max_hoogte * ($image_bits >> 3) * 2); - $memory_needed = abs(intval($memory_usage + $image_memory_usage + $thumb_memory_usage)); - - if ($memory_needed > $memory_limit) - { - return false; - } - } - return true; - } - return false; -} - -/** -* Check is string is ended with needle -* -* @param string $haystack -* @param string $needle -* -* @return bool -*/ -function endsWith($haystack, $needle) -{ - return $needle === "" || substr($haystack, -strlen($needle)) === $needle; -} - -/** -* TODO REFACTOR THIS! -* -* @param $targetPath -* @param $targetFile -* @param $name -* @param $current_path -* @param $config -* relative_image_creation -* relative_path_from_current_pos -* relative_image_creation_name_to_prepend -* relative_image_creation_name_to_append -* relative_image_creation_width -* relative_image_creation_height -* relative_image_creation_option -* fixed_image_creation -* fixed_path_from_filemanager -* fixed_image_creation_name_to_prepend -* fixed_image_creation_to_append -* fixed_image_creation_width -* fixed_image_creation_height -* fixed_image_creation_option -* -* @return bool -*/ -function new_thumbnails_creation($targetPath, $targetFile, $name, $current_path, $config) -{ - //create relative thumbs - $all_ok = true; - - $info = pathinfo($name); - $info['filename'] = fix_filename($info['filename'],$config); - if ($config['relative_image_creation']) - { - foreach ($config['relative_path_from_current_pos'] as $k => $path) - { - if ($path != "" && $path[ strlen($path) - 1 ] != "/") - { - $path .= "/"; - } - if ( ! file_exists($targetPath . $path)) - { - create_folder($targetPath . $path, false); - } - if ( ! endsWith($targetPath, $path)) - { - if ( ! create_img($targetFile, $targetPath . $path . $config['relative_image_creation_name_to_prepend'][ $k ] . $info['filename'] . $config['relative_image_creation_name_to_append'][ $k ] . "." . $info['extension'], $config['relative_image_creation_width'][ $k ], $config['relative_image_creation_height'][ $k ], $config['relative_image_creation_option'][ $k ])) - { - $all_ok = false; - } - } - } - } - - //create fixed thumbs - if ($config['fixed_image_creation']) - { - foreach ($config['fixed_path_from_filemanager'] as $k => $path) - { - if ($path != "" && $path[ strlen($path) - 1 ] != "/") - { - $path .= "/"; - } - $base_dir = $path . substr_replace($targetPath, '', 0, strlen($current_path)); - if ( ! file_exists($base_dir)) - { - create_folder($base_dir, false); - } - if ( ! create_img($targetFile, $base_dir . $config['fixed_image_creation_name_to_prepend'][ $k ] . $info['filename'] . $config['fixed_image_creation_to_append'][ $k ] . "." . $info['extension'], $config['fixed_image_creation_width'][ $k ], $config['fixed_image_creation_height'][ $k ], $config['fixed_image_creation_option'][ $k ])) - { - $all_ok = false; - } - } - } - - return $all_ok; -} - - -/** -* Get a remote file, using whichever mechanism is enabled -* -* @param string $url -* -* @return bool|mixed|string -*/ -function get_file_by_url($url) -{ - if (ini_get('allow_url_fopen')) - { - $arrContextOptions=array( - "ssl"=>array( - "verify_peer"=>false, - "verify_peer_name"=>false, - ), - ); - return file_get_contents($url, false, stream_context_create($arrContextOptions)); - } - if ( ! function_exists('curl_version')) - { - return false; - } - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_URL, $url); - - $data = curl_exec($ch); - curl_close($ch); - - return $data; -} - -/** -* test for dir/file writability properly -* -* @param string $dir -* -* @return bool -*/ -function is_really_writable($dir) -{ - $dir = rtrim($dir, '/'); - // linux, safe off - if (DIRECTORY_SEPARATOR == '/' && @ini_get("safe_mode") == false) - { - return is_writable($dir); - } - - // Windows, safe ON. (have to write a file :S) - if (is_dir($dir)) - { - $dir = $dir . '/' . md5(mt_rand(1, 1000) . mt_rand(1, 1000)); - - if (($fp = @fopen($dir, 'ab')) === false) - { - return false; - } - - fclose($fp); - @chmod($dir, 0755); - @unlink($dir); - - return true; - } - elseif ( ! is_file($dir) || ($fp = @fopen($dir, 'ab')) === false) - { - return false; - } - - fclose($fp); - - return true; -} - -/** -* Check if a function is callable. -* Some servers disable copy,rename etc. -* -* @parm string $name -* -* @return bool -*/ -function is_function_callable($name) -{ - if (function_exists($name) === false) - { - return false; - } - $disabled = explode(',', ini_get('disable_functions')); - - return ! in_array($name, $disabled); -} - -/** -* recursivly copies everything -* -* @param string $source -* @param string $destination -* @param bool $is_rec -*/ -function rcopy($source, $destination, $is_rec = false) -{ - if (is_dir($source)) - { - if ($is_rec === false) - { - $pinfo = pathinfo($source); - $destination = rtrim($destination, '/') . DIRECTORY_SEPARATOR . $pinfo['basename']; - } - if (is_dir($destination) === false) - { - mkdir($destination, 0755, true); - } - - $files = scandir($source); - foreach ($files as $file) - { - if ($file != "." && $file != "..") - { - rcopy($source . DIRECTORY_SEPARATOR . $file, rtrim($destination, '/') . DIRECTORY_SEPARATOR . $file, true); - } - } - } - else - { - if (file_exists($source)) - { - if (is_dir($destination) === true) - { - $pinfo = pathinfo($source); - $dest2 = rtrim($destination, '/') . DIRECTORY_SEPARATOR . $pinfo['basename']; - } - else - { - $dest2 = $destination; - } - - copy($source, $dest2); - } - } -} - - - - -/** -* recursivly renames everything -* -* I know copy and rename could be done with just one function -* but i split the 2 because sometimes rename fails on windows -* Need more feedback from users and refactor if needed -* -* @param string $source -* @param string $destination -* @param bool $is_rec -*/ -function rrename($source, $destination, $is_rec = false) -{ - if (is_dir($source)) - { - if ($is_rec === false) - { - $pinfo = pathinfo($source); - $destination = rtrim($destination, '/') . DIRECTORY_SEPARATOR . $pinfo['basename']; - } - if (is_dir($destination) === false) - { - mkdir($destination, 0755, true); - } - - $files = scandir($source); - foreach ($files as $file) - { - if ($file != "." && $file != "..") - { - rrename($source . DIRECTORY_SEPARATOR . $file, rtrim($destination, '/') . DIRECTORY_SEPARATOR . $file, true); - } - } - } - else - { - if (file_exists($source)) - { - if (is_dir($destination) === true) - { - $pinfo = pathinfo($source); - $dest2 = rtrim($destination, '/') . DIRECTORY_SEPARATOR . $pinfo['basename']; - } - else - { - $dest2 = $destination; - } - - rename($source, $dest2); - } - } -} - -// On windows rename leaves folders sometime -// This will clear leftover folders -// After more feedback will merge it with rrename -function rrename_after_cleaner($source) -{ - $files = scandir($source); - - foreach ($files as $file) - { - if ($file != "." && $file != "..") - { - if (is_dir($source . DIRECTORY_SEPARATOR . $file)) - { - rrename_after_cleaner($source . DIRECTORY_SEPARATOR . $file); - } - else - { - unlink($source . DIRECTORY_SEPARATOR . $file); - } - } - } - - return rmdir($source); -} - -/** -* Recursive chmod -* @param string $source -* @param int $mode -* @param string $rec_option -* @param bool $is_rec -*/ -function rchmod($source, $mode, $rec_option = "none", $is_rec = false) -{ - if ($rec_option == "none") - { - chmod($source, $mode); - } - else - { - if ($is_rec === false) - { - chmod($source, $mode); - } - - $files = scandir($source); - - foreach ($files as $file) - { - if ($file != "." && $file != "..") - { - if (is_dir($source . DIRECTORY_SEPARATOR . $file)) - { - if ($rec_option == "folders" || $rec_option == "both") - { - chmod($source . DIRECTORY_SEPARATOR . $file, $mode); - } - rchmod($source . DIRECTORY_SEPARATOR . $file, $mode, $rec_option, true); - } - else - { - if ($rec_option == "files" || $rec_option == "both") - { - chmod($source . DIRECTORY_SEPARATOR . $file, $mode); - } - } - } - } - } -} - -/** -* @param string $input -* @param bool $trace -* @param bool $halt -*/ -function debugger($input, $trace = false, $halt = false) -{ - ob_start(); - - echo "
----- DEBUG DUMP -----"; - echo "
";
-	var_dump($input);
-	echo "
"; - - if ($trace) - { - if (is_php('5.3.6')) - { - $debug = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - } - else - { - $debug = debug_backtrace(false); - } - - echo "
-----STACK TRACE-----"; - echo "
";
-		var_dump($debug);
-		echo "
"; - } - - echo ""; - echo "---------------------------
"; - - $ret = ob_get_contents(); - ob_end_clean(); - - echo $ret; - - if ($halt == true) - { - exit(); - } -} - -/** -* @param string $version -* -* @return bool -*/ -function is_php($version = '5.0.0') -{ - static $phpVer; - $version = (string) $version; - - if ( ! isset($phpVer[ $version ])) - { - $phpVer[ $version ] = (version_compare(PHP_VERSION, $version) < 0) ? false : true; - } - - return $phpVer[ $version ]; -} - -/** -* Return the caller location if set in config.php -* @param string $version -* -* @return bool -*/ -function AddErrorLocation() -{ - if (defined('DEBUG_ERROR_MESSAGE') and DEBUG_ERROR_MESSAGE) { - $pile=debug_backtrace(); - return " (@".$pile[0]["file"]."#".$pile[0]["line"].")"; - } - return ""; -} -?> diff --git a/libraries/filemanager-9.12.1/js/cors/jquery.postmessage-transport.js b/libraries/filemanager-9.12.1/js/cors/jquery.postmessage-transport.js deleted file mode 100644 index 2a0c38c..0000000 --- a/libraries/filemanager-9.12.1/js/cors/jquery.postmessage-transport.js +++ /dev/null @@ -1,126 +0,0 @@ -/* - * jQuery postMessage Transport Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* global define, require, window, document */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define(['jquery'], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory(require('jquery')); - } else { - // Browser globals: - factory(window.jQuery); - } -}(function ($) { - 'use strict'; - - var counter = 0, - names = [ - 'accepts', - 'cache', - 'contents', - 'contentType', - 'crossDomain', - 'data', - 'dataType', - 'headers', - 'ifModified', - 'mimeType', - 'password', - 'processData', - 'timeout', - 'traditional', - 'type', - 'url', - 'username' - ], - convert = function (p) { - return p; - }; - - $.ajaxSetup({ - converters: { - 'postmessage text': convert, - 'postmessage json': convert, - 'postmessage html': convert - } - }); - - $.ajaxTransport('postmessage', function (options) { - if (options.postMessage && window.postMessage) { - var iframe, - loc = $('').prop('href', options.postMessage)[0], - target = loc.protocol + '//' + loc.host, - xhrUpload = options.xhr().upload; - // IE always includes the port for the host property of a link - // element, but not in the location.host or origin property for the - // default http port 80 and https port 443, so we strip it: - if (/^(http:\/\/.+:80)|(https:\/\/.+:443)$/.test(target)) { - target = target.replace(/:(80|443)$/, ''); - } - return { - send: function (_, completeCallback) { - counter += 1; - var message = { - id: 'postmessage-transport-' + counter - }, - eventName = 'message.' + message.id; - iframe = $( - '' - ).bind('load', function () { - $.each(names, function (i, name) { - message[name] = options[name]; - }); - message.dataType = message.dataType.replace('postmessage ', ''); - $(window).bind(eventName, function (e) { - e = e.originalEvent; - var data = e.data, - ev; - if (e.origin === target && data.id === message.id) { - if (data.type === 'progress') { - ev = document.createEvent('Event'); - ev.initEvent(data.type, false, true); - $.extend(ev, data); - xhrUpload.dispatchEvent(ev); - } else { - completeCallback( - data.status, - data.statusText, - {postmessage: data.result}, - data.headers - ); - iframe.remove(); - $(window).unbind(eventName); - } - } - }); - iframe[0].contentWindow.postMessage( - message, - target - ); - }).appendTo(document.body); - }, - abort: function () { - if (iframe) { - iframe.remove(); - } - } - }; - } - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/cors/jquery.xdr-transport.js b/libraries/filemanager-9.12.1/js/cors/jquery.xdr-transport.js deleted file mode 100644 index a4e2699..0000000 --- a/libraries/filemanager-9.12.1/js/cors/jquery.xdr-transport.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * jQuery XDomainRequest Transport Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - * - * Based on Julian Aubourg's ajaxHooks xdr.js: - * https://github.com/jaubourg/ajaxHooks/ - */ - -/* global define, require, window, XDomainRequest */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define(['jquery'], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory(require('jquery')); - } else { - // Browser globals: - factory(window.jQuery); - } -}(function ($) { - 'use strict'; - if (window.XDomainRequest && !$.support.cors) { - $.ajaxTransport(function (s) { - if (s.crossDomain && s.async) { - if (s.timeout) { - s.xdrTimeout = s.timeout; - delete s.timeout; - } - var xdr; - return { - send: function (headers, completeCallback) { - var addParamChar = /\?/.test(s.url) ? '&' : '?'; - function callback(status, statusText, responses, responseHeaders) { - xdr.onload = xdr.onerror = xdr.ontimeout = $.noop; - xdr = null; - completeCallback(status, statusText, responses, responseHeaders); - } - xdr = new XDomainRequest(); - // XDomainRequest only supports GET and POST: - if (s.type === 'DELETE') { - s.url = s.url + addParamChar + '_method=DELETE'; - s.type = 'POST'; - } else if (s.type === 'PUT') { - s.url = s.url + addParamChar + '_method=PUT'; - s.type = 'POST'; - } else if (s.type === 'PATCH') { - s.url = s.url + addParamChar + '_method=PATCH'; - s.type = 'POST'; - } - xdr.open(s.type, s.url); - xdr.onload = function () { - callback( - 200, - 'OK', - {text: xdr.responseText}, - 'Content-Type: ' + xdr.contentType - ); - }; - xdr.onerror = function () { - callback(404, 'Not Found'); - }; - if (s.xdrTimeout) { - xdr.ontimeout = function () { - callback(0, 'timeout'); - }; - xdr.timeout = s.xdrTimeout; - } - xdr.send((s.hasContent && s.data) || null); - }, - abort: function () { - if (xdr) { - xdr.onerror = $.noop(); - xdr.abort(); - } - } - }; - } - }); - } -})); diff --git a/libraries/filemanager-9.12.1/js/include.js b/libraries/filemanager-9.12.1/js/include.js deleted file mode 100644 index 7919d56..0000000 --- a/libraries/filemanager-9.12.1/js/include.js +++ /dev/null @@ -1,2 +0,0 @@ -var encodeURL,show_animation,hide_animation,apply,apply_none,apply_img,apply_any,apply_video,apply_link,apply_file_rename,apply_file_duplicate,apply_folder_rename;!function(e,a,r){"use strict";function t(e){show_animation();var a=new Image;a.src=e,jQuery(a).on("load",function(){hide_animation()})}function n(){jQuery("#textfile_create_area").parent().parent().remove(),e.ajax({type:"GET",url:"ajax_calls.php?action=new_file_form"}).done(function(a){bootbox.dialog(a,[{label:jQuery("#cancel").val(),"class":"btn"},{label:jQuery("#ok").val(),"class":"btn-inverse",callback:function(){var a=jQuery("#create_text_file_name").val()+jQuery("#create_text_file_extension").val(),r=jQuery("#textfile_create_area").val();if(null!==a){a=_(a);var t=jQuery("#sub_folder").val()+jQuery("#fldr_value").val();e.ajax({type:"POST",url:"execute.php?action=create_file",data:{path:t,name:a,new_content:r}}).done(function(e){""!=e&&bootbox.alert(e,function(){setTimeout(function(){window.location.href=jQuery("#refresh").attr("href")+"&"+(new Date).getTime()},500)})})}}}],{header:jQuery("#lang_new_file").val()})})}function i(a){jQuery("#textfile_edit_area").parent().parent().remove();var r=a.find(".rename-file-paths").attr("data-path");e.ajax({type:"POST",url:"ajax_calls.php?action=get_file&sub_action=edit&preview_mode=text",data:{path:r}}).done(function(t){bootbox.dialog(t,[{label:jQuery("#cancel").val(),"class":"btn"},{label:jQuery("#ok").val(),"class":"btn-inverse",callback:function(){var a=jQuery("#textfile_edit_area").val();e.ajax({type:"POST",url:"execute.php?action=save_text_file",data:{path:r,new_content:a}}).done(function(e){""!=e&&bootbox.alert(e)})}}],{header:a.find(".name_download").val()})})}function l(){e.ajax({type:"POST",url:"ajax_calls.php?action=get_lang",data:{}}).done(function(a){bootbox.dialog(a,[{label:jQuery("#cancel").val(),"class":"btn"},{label:jQuery("#ok").val(),"class":"btn-inverse",callback:function(){var a=jQuery("#new_lang_select").val();e.ajax({type:"POST",url:"ajax_calls.php?action=change_lang",data:{choosen_lang:a}}).done(function(e){""!=e?bootbox.alert(e):setTimeout(function(){window.location.href=jQuery("#refresh").attr("href").replace(/lang=[\w]*&/i,"lang="+a+"&")+"&"+(new Date).getTime()},100)})}}],{header:jQuery("#lang_lang_change").val()})})}function o(a){jQuery("#files_permission_start").parent().parent().remove();var r=a.find(".rename-file-paths"),t=r.attr("data-path"),n=r.attr("data-permissions"),i=r.attr("data-folder");e.ajax({type:"POST",url:"ajax_calls.php?action=chmod",data:{path:t,permissions:n,folder:i}}).done(function(a){bootbox.dialog(a,[{label:jQuery("#cancel").val(),"class":"btn"},{label:jQuery("#ok").val(),"class":"btn-inverse",callback:function(){var a="-";a+=jQuery("#u_4").is(":checked")?"r":"-",a+=jQuery("#u_2").is(":checked")?"w":"-",a+=jQuery("#u_1").is(":checked")?"x":"-",a+=jQuery("#g_4").is(":checked")?"r":"-",a+=jQuery("#g_2").is(":checked")?"w":"-",a+=jQuery("#g_1").is(":checked")?"x":"-",a+=jQuery("#a_4").is(":checked")?"r":"-",a+=jQuery("#a_2").is(":checked")?"w":"-",a+=jQuery("#a_1").is(":checked")?"x":"-";var n=jQuery("#chmod_form #chmod_value").val();if(""!=n&&"undefined"!=typeof n){var l=jQuery("#chmod_form input[name=apply_recursive]:checked").val();""!=l&&"undefined"!=typeof l||(l="none"),e.ajax({type:"POST",url:"execute.php?action=chmod",data:{path:t,new_mode:n,is_recursive:l,folder:i}}).done(function(e){""!=e?bootbox.alert(e):r.attr("data-permissions",a)})}}}],{header:jQuery("#lang_file_permission").val()}),setTimeout(function(){u(!1)},100)})}function u(a){var r=[];if(r.user=0,r.group=0,r.all=0,"undefined"!=typeof a&&1==a){var t=jQuery("#chmod_form #chmod_value").val();r.user=t.substr(0,1),r.group=t.substr(1,1),r.all=t.substr(2,1),e.each(r,function(a){(""==r[a]||0==e.isNumeric(r[a])||parseInt(r[a])<0||parseInt(r[a])>7)&&(r[a]="0")}),jQuery("#chmod_form input:checkbox").each(function(){var e=jQuery(this).attr("data-group"),a=jQuery(this).attr("data-value");c(r[e],a)?jQuery(this).prop("checked",!0):jQuery(this).prop("checked",!1)})}else jQuery("#chmod_form input:checkbox:checked").each(function(){var e=jQuery(this).attr("data-group"),a=jQuery(this).attr("data-value");r[e]=parseInt(r[e])+parseInt(a)}),jQuery("#chmod_form #chmod_value").val(r.user.toString()+r.group.toString()+r.all.toString())}function c(a,r){var t=[];return t[1]=[1,3,5,7],t[2]=[2,3,6,7],t[4]=[4,5,6,7],a=parseInt(a),r=parseInt(r),e.inArray(a,t[r])!=-1}function s(){bootbox.confirm(jQuery("#lang_clear_clipboard_confirm").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(a){1==a&&e.ajax({type:"POST",url:"ajax_calls.php?action=clear_clipboard",data:{}}).done(function(e){""!=e?bootbox.alert(e):jQuery("#clipboard").val("0"),y(!1)})})}function d(a,r){if("copy"==r||"cut"==r){var t;t=a.hasClass("directory")?a.find(".rename-file-paths").attr("data-path"):a.find(".rename-file-paths").attr("data-path"),e.ajax({type:"POST",url:"ajax_calls.php?action=copy_cut",data:{path:t,sub_action:r}}).done(function(e){""!=e?bootbox.alert(e):(jQuery("#clipboard").val("1"),y(!0))})}}function f(a){bootbox.confirm(jQuery("#lang_paste_confirm").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(r){if(1==r){var t;t="undefined"!=typeof a?a.find(".rename-folder").attr("data-path"):jQuery("#sub_folder").val()+jQuery("#fldr_value").val(),e.ajax({type:"POST",url:"execute.php?action=paste_clipboard",data:{path:t}}).done(function(e){""!=e?bootbox.alert(e):(jQuery("#clipboard").val("0"),y(!1),setTimeout(function(){window.location.href=jQuery("#refresh").attr("href")+"&"+(new Date).getTime()},300))})}})}function p(a,r){var t;t=a.hasClass("directory")?a.find(".rename-folder"):a.find(".rename-file");var n=t.attr("data-path");a.parent().hide(100),e.ajax({type:"POST",url:"ajax_calls.php?action=copy_cut",data:{path:n,sub_action:"cut"}}).done(function(t){if(""!=t)bootbox.alert(t);else{var n;n="undefined"!=typeof r?r.hasClass("back-directory")?r.find(".path").val():r.find(".rename-folder").attr("data-path"):jQuery("#sub_folder").val()+jQuery("#fldr_value").val(),e.ajax({type:"POST",url:"execute.php?action=paste_clipboard",data:{path:n}}).done(function(e){""!=e?(bootbox.alert(e),a.parent().show(100)):(jQuery("#clipboard").val("0"),y(!1),a.parent().remove())})}}).error(function(){a.parent().show(100)})}function y(e){1==e?jQuery(".paste-here-btn, .clear-clipboard-btn").removeClass("disabled"):jQuery(".paste-here-btn, .clear-clipboard-btn").addClass("disabled")}function v(e){var r=jQuery(".breadcrumb").width()+e,t=jQuery("#view"),n=jQuery("#help");if(t.val()>0){if(1==t.val())jQuery("ul.grid li, ul.grid figure").css("width","100%");else{var i=Math.floor(r/380);0==i&&(i=1,jQuery("h4").css("font-size",12)),r=Math.floor(r/i-3),jQuery("ul.grid li, ul.grid figure").css("width",r)}n.hide()}else a.touch&&n.show()}function m(){var e=jQuery(this);0==jQuery("#view").val()&&(1==e.attr("toggle")?(e.attr("toggle",0),e.animate({top:"0px"},{queue:!1,duration:300})):(e.attr("toggle",1),e.animate({top:"-30px"},{queue:!1,duration:300})))}function j(e){var a=new RegExp("(?:[?&]|&)"+e+"=([^&]+)","i"),r=window.location.search.match(a);return r&&r.length>1?r[1]:null}function Q(){1==jQuery("#popup").val()?window.close():("function"==typeof parent.jQuery(".modal:has(iframe)").modal&&parent.jQuery(".modal:has(iframe)").modal("hide"),"undefined"!=typeof parent.jQuery&&parent.jQuery?"object"==typeof parent.jQuery.fancybox?parent.jQuery.fancybox.getInstance().close():"function"==typeof parent.jQuery.fancybox&&parent.jQuery.fancybox.close():"function"==typeof parent.$.fancybox&&parent.$.fancybox.close())}function h(e){for(var e,a=[/[\300-\306]/g,/[\340-\346]/g,/[\310-\313]/g,/[\350-\353]/g,/[\314-\317]/g,/[\354-\357]/g,/[\322-\330]/g,/[\362-\370]/g,/[\331-\334]/g,/[\371-\374]/g,/[\321]/g,/[\361]/g,/[\307]/g,/[\347]/g],r=["A","a","E","e","I","i","O","o","U","u","N","n","C","c"],t=0;t]+(>|$)/g,""),e.trim(a)):null}function g(a,r,t,n,i){null!==t&&(t=_(t),e.ajax({type:"POST",url:"execute.php?action="+a,data:{path:r,name:t.replace("/","")}}).done(function(e){return""!=e?(bootbox.alert(e),!1):(""!=i&&window[i](n,t),!0)}))}function b(a,r){var t=jQuery("li.dir","ul.grid").filter(":visible"),n=jQuery("li.file","ul.grid").filter(":visible"),i=[],l=[],o=[],u=[];t.each(function(){var a=jQuery(this),t=a.find(r).val();if(e.isNumeric(t))for(t=parseFloat(t);"undefined"!=typeof i[t]&&i[t];)t=parseFloat(parseFloat(t)+parseFloat(.001));else t=t+"a"+a.find("h4 a").attr("data-file");i[t]=a.html(),l.push(t)}),n.each(function(){var a=jQuery(this),t=a.find(r).val();if(e.isNumeric(t))for(t=parseFloat(t);"undefined"!=typeof o[t]&&o[t];)t=parseFloat(parseFloat(t)+parseFloat(.001));else t=t+"a"+a.find("h4 a").attr("data-file");o[t]=a.html(),u.push(t)}),e.isNumeric(l[0])?l.sort(function(e,a){return parseFloat(e)-parseFloat(a)}):l.sort(),e.isNumeric(u[0])?u.sort(function(e,a){return parseFloat(e)-parseFloat(a)}):u.sort(),a&&(l.reverse(),u.reverse()),t.each(function(e){var a=jQuery(this);a.html(i[l[e]])}),n.each(function(e){var a=jQuery(this);a.html(o[u[e]])})}function w(e,a){return featherEditor.launch({image:e,url:a}),!1}function x(){T.update()}var k="9.12.1",C=!0,T=null,I=null,S=function(){var e=0;return function(a,r){clearTimeout(e),e=setTimeout(a,r)}}(),U=function(e){if(1==jQuery("#ftp").val())var a=jQuery("#ftp_base_url").val()+jQuery("#upload_dir").val()+jQuery("#fldr_value").val();else var a=jQuery("#base_url").val()+jQuery("#cur_dir").val();var r=e.find("a.link").attr("data-file");return""!=r&&null!=r&&(a+=r),r=e.find("h4 a.folder-link").attr("data-file"),""!=r&&null!=r&&(a+=r),a},R={contextActions:{copy_url:function(e){var a=U(e);bootbox.alert('URL:
")},unzip:function(a){var r=jQuery("#sub_folder").val()+jQuery("#fldr_value").val()+a.find("a.link").attr("data-file");show_animation(),e.ajax({type:"POST",url:"ajax_calls.php?action=extract",data:{path:r}}).done(function(e){hide_animation(),""!=e?bootbox.alert(e):window.location.href=jQuery("#refresh").attr("href")+"&"+(new Date).getTime()})},edit_img:function(e){var a=e.attr("data-name");if(1==jQuery("#ftp").val())var r=jQuery("#ftp_base_url").val()+jQuery("#upload_dir").val()+jQuery("#fldr_value").val()+a;else var r=jQuery("#base_url").val()+jQuery("#cur_dir").val()+a;var t=jQuery("#aviary_img");t.attr("data-name",a),show_animation(),t.attr("src",r).load(w(t.attr("id"),r))},duplicate:function(e){var a=e.find("h4").text().trim();bootbox.prompt(jQuery("#lang_duplicate").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(r){if(null!==r&&(r=_(r),r!=a)){var t=e.find(".rename-file");g("duplicate_file",t.attr("data-path"),r,t,"apply_file_duplicate")}},a)},select:function(e){var a,r=U(e),t=jQuery("#field_id").val(),n=jQuery("#return_relative_url").val();if(1==n&&(r=r.replace(jQuery("#base_url").val(),""),r=r.replace(jQuery("#cur_dir").val(),"")),a=1==jQuery("#popup").val()?window.opener:window.parent,""!=t)if(1==jQuery("#crossdomain").val())a.postMessage({sender:"responsivefilemanager",url:r,field_id:t},"*");else{var i=jQuery("#"+t,a.document);i.val(r).trigger("change"),"function"==typeof a.responsive_filemanager_callback&&a.responsive_filemanager_callback(t),Q()}else apply_any(r)},copy:function(e){d(e,"copy")},cut:function(e){d(e,"cut")},paste:function(){f()},chmod:function(e){o(e)},edit_text_file:function(e){i(e)}},makeContextMenu:function(){var a=this;e.contextMenu({selector:"figure:not(.back-directory), .list-view2 figure:not(.back-directory)",autoHide:!0,build:function(e){e.addClass("selected");var t={callback:function(r,t){a.contextActions[r](e)},items:{}};return(e.find(".img-precontainer-mini .filetype").hasClass("png")||e.find(".img-precontainer-mini .filetype").hasClass("jpg")||e.find(".img-precontainer-mini .filetype").hasClass("jpeg"))&&r&&(t.items.edit_img={name:jQuery("#lang_edit_image").val(),icon:"edit_img",disabled:!1}),e.hasClass("directory")&&0!=jQuery("#type_param").val()&&(t.items.select={name:jQuery("#lang_select").val(),icon:"",disabled:!1}),t.items.copy_url={name:jQuery("#lang_show_url").val(),icon:"url",disabled:!1},(e.find(".img-precontainer-mini .filetype").hasClass("zip")||e.find(".img-precontainer-mini .filetype").hasClass("tar")||e.find(".img-precontainer-mini .filetype").hasClass("gz"))&&(t.items.unzip={name:jQuery("#lang_extract").val(),icon:"extract",disabled:!1}),e.find(".img-precontainer-mini .filetype").hasClass("edit-text-file-allowed")&&(t.items.edit_text_file={name:jQuery("#lang_edit_file").val(),icon:"edit",disabled:!1}),e.hasClass("directory")||1!=jQuery("#duplicate").val()||(t.items.duplicate={name:jQuery("#lang_duplicate").val(),icon:"duplicate",disabled:!1}),e.hasClass("directory")||1!=jQuery("#copy_cut_files_allowed").val()?e.hasClass("directory")&&1==jQuery("#copy_cut_dirs_allowed").val()&&(t.items.copy={name:jQuery("#lang_copy").val(),icon:"copy",disabled:!1},t.items.cut={name:jQuery("#lang_cut").val(),icon:"cut",disabled:!1}):(t.items.copy={name:jQuery("#lang_copy").val(),icon:"copy",disabled:!1},t.items.cut={name:jQuery("#lang_cut").val(),icon:"cut",disabled:!1}),0==jQuery("#clipboard").val()||e.hasClass("directory")||(t.items.paste={name:jQuery("#lang_paste_here").val(),icon:"clipboard-apply",disabled:!1}),e.hasClass("directory")||1!=jQuery("#chmod_files_allowed").val()?e.hasClass("directory")&&1==jQuery("#chmod_dirs_allowed").val()&&(t.items.chmod={name:jQuery("#lang_file_permission").val(),icon:"key",disabled:!1}):t.items.chmod={name:jQuery("#lang_file_permission").val(),icon:"key",disabled:!1},t.items.sep="----",t.items.info={name:""+jQuery("#lang_file_info").val()+"",disabled:!0},t.items.name={name:e.attr("data-name"),icon:"label",disabled:!0},"img"==e.attr("data-type")&&(t.items.dimension={name:e.find(".img-dimension").html(),icon:"dimension",disabled:!0}),"true"!==jQuery("#show_folder_size").val()&&"true"!==jQuery("#show_folder_size").val()||(e.hasClass("directory")?t.items.size={name:e.find(".file-size").html()+" - "+e.find(".nfiles").val()+" "+jQuery("#lang_files").val()+" - "+e.find(".nfolders").val()+" "+jQuery("#lang_folders").val(),icon:"size",disabled:!0}:t.items.size={name:e.find(".file-size").html(),icon:"size",disabled:!0}),t.items.date={name:e.find(".file-date").html(),icon:"date",disabled:!0},t},events:{hide:function(){jQuery("figure").removeClass("selected")}}}),jQuery(document).on("contextmenu",function(e){if(!jQuery(e.target).is("figure"))return!1})},bindGridEvents:function(){function a(e){window[e.attr("data-function")](e.attr("data-file"),jQuery("#field_id").val())}var r=jQuery("ul.grid");r.on("click",".modalAV",function(a){var r=jQuery(this);a.preventDefault();var t=jQuery("#previewAV"),n=jQuery(".body-preview");t.removeData("modal"),t.modal({backdrop:"static",keyboard:!1}),r.hasClass("audio")?n.css("height","80px"):n.css("height","345px"),e.ajax({url:r.attr("data-url"),success:function(e){n.html(e)}})}),r.on("click",".file-preview-btn",function(a){var r=jQuery(this);a.preventDefault(),e.ajax({url:r.attr("data-url"),success:function(e){bootbox.modal(e," "+r.parent().parent().parent().find(".name").val())}})}),r.on("click",".preview",function(){var e=jQuery(this);return 0==e.hasClass("disabled")&&jQuery("#full-img").attr("src",decodeURIComponent(e.attr("data-url"))),!0}),r.on("click",".rename-file",function(){var a=jQuery(this),r=a.parent().parent().parent(),t=r.find("h4"),n=e.trim(t.text());bootbox.prompt(jQuery("#rename").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(e){null!==e&&(e=_(e),e!=n&&g("rename_file",a.attr("data-path"),e,r,"apply_file_rename"))},n)}),r.on("click",".rename-folder",function(){var a=jQuery(this),r=a.parent().parent().parent(),t=r.find("h4"),n=e.trim(t.text());bootbox.prompt(jQuery("#rename").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(e){null!==e&&(e=_(e).replace(".",""),e!=n&&g("rename_folder",a.attr("data-path"),e,r,"apply_folder_rename"))},n)}),r.on("click",".delete-file",function(){var e=jQuery(this);bootbox.confirm(e.attr("data-confirm"),jQuery("#cancel").val(),jQuery("#ok").val(),function(a){if(1==a){g("delete_file",e.attr("data-path"),"","","");var r=jQuery("#files_number");r.text(parseInt(r.text())-1),e.parent().parent().parent().parent().remove()}})}),r.on("click",".delete-folder",function(){var e=jQuery(this);bootbox.confirm(e.attr("data-confirm"),jQuery("#cancel").val(),jQuery("#ok").val(),function(a){if(1==a){g("delete_folder",e.attr("data-path"),"","","");var r=jQuery("#folders_number");r.text(parseInt(r.text())-1),e.parent().parent().parent().remove()}})}),jQuery("ul.grid").on("click",".link",function(){a(jQuery(this))}),jQuery("ul.grid").on("click","div.box",function(e){var r=jQuery(this).find(".link");if(0!==r.length)a(r);else{var t=jQuery(this).find(".folder-link");0!==t.length&&(document.location=jQuery(t).prop("href"))}})},makeFilters:function(a){jQuery("#filter-input").on("keyup",function(){jQuery(".filters label").removeClass("btn-inverse"),jQuery(".filters label").find("i").removeClass("icon-white"),jQuery("#ff-item-type-all").addClass("btn-inverse"),jQuery("#ff-item-type-all").find("i").addClass("icon-white");var r=_(jQuery(this).val()).toLowerCase();jQuery(this).val(r),a&&S(function(){jQuery("li","ul.grid ").each(function(){var e=jQuery(this);""!=r&&e.attr("data-name").toLowerCase().indexOf(r)==-1?e.hide(100):e.show(100)}),e.ajax({url:"ajax_calls.php?action=filter&type="+r}).done(function(e){""!=e&&bootbox.alert(e)}),S(function(){var e=0!=jQuery("#descending").val();b(e,"."+jQuery("#sort_by").val()),x()},500)},300)}).keypress(function(e){13==e.which&&jQuery("#filter").trigger("click")}),jQuery("#filter").on("click",function(){var e=_(jQuery("#filter-input").val()),a=jQuery("#current_url").val();a+=a.indexOf("?")>=0?"&":"?",window.location.href=a+"filter="+e})},makeUploader:function(){jQuery("#fileupload").fileupload({url:"upload.php",maxChunkSize:2097152}),jQuery("#fileupload").bind("fileuploaddrop",function(e,a){jQuery(".uploader").show(200)}),jQuery("#fileupload").bind("fileuploadsubmit",function(e,a){a.formData={fldr:jQuery("#sub_folder").val()+jQuery("#fldr_value").val()+a.files[0].relativePath}}),jQuery("#fileupload").addClass("fileupload-processing"),e.ajax({url:jQuery("#fileupload").fileupload("option","url"),dataType:"json",context:jQuery("#fileupload")[0]}).always(function(){jQuery(this).removeClass("fileupload-processing")}),jQuery(".upload-btn").on("click",function(){jQuery(".uploader").show(200)}),jQuery(".close-uploader").on("click",function(){jQuery(".uploader").hide(200),setTimeout(function(){window.location.href=jQuery("#refresh").attr("href")+"&"+(new Date).getTime()},420)})},uploadURL:function(){jQuery("#uploadURL").on("click",function(a){a.preventDefault();var r=jQuery("#url").val(),t=jQuery("#fldr_value").val();show_animation(),e.ajax({type:"POST",url:"upload.php",data:{fldr:t,url:r}}).done(function(e){hide_animation(),jQuery("#url").val("")}).fail(function(e){bootbox.alert(jQuery("#lang_error_upload").val()),hide_animation(),jQuery("#url").val("")})})},makeSort:function(a){jQuery("input[name=radio-sort]").on("click",function(){var e=jQuery(this).attr("data-item"),t=jQuery("#"+e),n=jQuery(".filters label");n.removeClass("btn-inverse"),n.find("i").removeClass("icon-white"),jQuery("#filter-input").val(""),t.addClass("btn-inverse"),t.find("i").addClass("icon-white"),"ff-item-type-all"==e?(a?jQuery(".grid li").show(300):window.location.href=jQuery("#current_url").val()+"&sort_by="+jQuery("#sort_by").val()+"&descending="+(r?1:0),"undefined"!=typeof Storage&&localStorage.setItem("sort","")):jQuery(this).is(":checked")&&(jQuery(".grid li").not("."+e).hide(300),jQuery(".grid li."+e).show(300),"undefined"!=typeof Storage&&localStorage.setItem("sort",e)),x()});var r=jQuery("#descending").val();jQuery(".sorter").on("click",function(){var t=jQuery(this);r=jQuery("#sort_by").val()!==t.attr("data-sort")||0==r,a?(e.ajax({url:"ajax_calls.php?action=sort&sort_by="+t.attr("data-sort")+"&descending="+(r?1:0)}),b(r,"."+t.attr("data-sort")),jQuery(" a.sorter").removeClass("descending").removeClass("ascending"),r?jQuery(".sort-"+t.attr("data-sort")).addClass("descending"):jQuery(".sort-"+t.attr("data-sort")).addClass("ascending"),jQuery("#sort_by").val(t.attr("data-sort")),jQuery("#descending").val(r?1:0),x()):window.location.href=jQuery("#current_url").val()+"&sort_by="+t.attr("data-sort")+"&descending="+(r?1:0)})}};jQuery(document).ready(function(){if(C&&R.makeContextMenu(),"undefined"!=typeof Storage&&1!=jQuery("#type_param").val()&&3!=jQuery("#type_param").val()){var r=localStorage.getItem("sort");if(r){var i=jQuery("#"+r);i.addClass("btn-inverse"),i.find("i").addClass("icon-white"),jQuery(".grid li").not("."+r).hide(300),jQuery(".grid li."+r).show(300)}}if(jQuery("#full-img").on("click",function(){jQuery("#previewLightbox").lightbox("hide")}),jQuery("body").on("click",function(){jQuery(".tip-right").tooltip("hide")}),R.bindGridEvents(),parseInt(jQuery("#file_number").val())>parseInt(jQuery("#file_number_limit_js").val()))var o=!1;else var o=!0;if(R.makeSort(o),R.makeFilters(o),R.uploadURL(),jQuery("#info").on("click",function(){bootbox.alert('

responsive filemanager

RESPONSIVE filemanager v.'+k+'
responsivefilemanager.com


Copyright © Tecrail - Alberto Peripolli. All rights reserved.


License
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

')}),jQuery("#change_lang_btn").on("click",function(){l()}),R.makeUploader(),jQuery("body").on("keypress",function(e){var a=String.fromCharCode(e.which);if("'"==a||'"'==a||"\\"==a||"/"==a)return!1}),jQuery("ul.grid li figcaption").on("click",'a[data-toggle="lightbox"]',function(){t(decodeURIComponent(jQuery(this).attr("data-url")))}),jQuery(".create-file-btn").on("click",function(){n()}),jQuery(".new-folder").on("click",function(){bootbox.prompt(jQuery("#insert_folder_name").val(),jQuery("#cancel").val(),jQuery("#ok").val(),function(a){if(null!==a){a=_(a).replace(".","");var r=jQuery("#sub_folder").val()+jQuery("#fldr_value").val();e.ajax({type:"POST",url:"execute.php?action=create_folder",data:{path:r,name:a}}).done(function(e){setTimeout(function(){window.location.href=jQuery("#refresh").attr("href")+"&"+(new Date).getTime()},300)})}})}),jQuery(".view-controller button").on("click",function(){var a=jQuery(this);jQuery(".view-controller button").removeClass("btn-inverse"),jQuery(".view-controller i").removeClass("icon-white"),a.addClass("btn-inverse"),a.find("i").addClass("icon-white"),e.ajax({url:"ajax_calls.php?action=view&type="+a.attr("data-value")}).done(function(e){""!=e&&bootbox.alert(e)}),"undefined"!=typeof jQuery("ul.grid")[0]&&jQuery("ul.grid")[0]&&(jQuery("ul.grid")[0].className=jQuery("ul.grid")[0].className.replace(/\blist-view.*?\b/g,"")),"undefined"!=typeof jQuery(".sorter-container")[0]&&jQuery(".sorter-container")[0]&&(jQuery(".sorter-container")[0].className=jQuery(".sorter-container")[0].className.replace(/\blist-view.*?\b/g,""));var r=a.attr("data-value");jQuery("#view").val(r),jQuery("ul.grid").addClass("list-view"+r),jQuery(".sorter-container").addClass("list-view"+r),a.attr("data-value")>=1?v(14):(jQuery("ul.grid li").css("width",126),jQuery("ul.grid figure").css("width",122)),x()}),a.touch?(jQuery("#help").show(),jQuery(".box:not(.no-effect)").swipe({swipeLeft:m,swipeRight:m,threshold:30})):(jQuery(".tip").tooltip({placement:"bottom"}),jQuery(".tip-top").tooltip({placement:"top"}),jQuery(".tip-left").tooltip({placement:"left"}),jQuery(".tip-right").tooltip({placement:"right"}),jQuery("body").addClass("no-touch")),jQuery(".paste-here-btn").on("click",function(){0==jQuery(this).hasClass("disabled")&&f()}),jQuery(".clear-clipboard-btn").on("click",function(){0==jQuery(this).hasClass("disabled")&&s()}),!a.csstransforms){var c=jQuery("figure");c.on("mouseover",function(){0==jQuery("#view").val()&&jQuery("#main-item-container").hasClass("no-effect-slide")===!1&&jQuery(this).find(".box:not(.no-effect)").animate({top:"-26px"},{queue:!1,duration:300})}),c.on("mouseout",function(){0==jQuery("#view").val()&&jQuery(this).find(".box:not(.no-effect)").animate({top:"0px"},{queue:!1,duration:300})})}jQuery(window).resize(function(){v(28)}),v(14),y(1==jQuery("#clipboard").val()?!0:!1),jQuery("li.dir, li.file").draggable({distance:20,cursor:"move",helper:function(){jQuery(this).find("figure").find(".box").css("top","0px");var e=jQuery(this).clone().css("z-index",1e3).find(".box").css("box-shadow","none").css("-webkit-box-shadow","none").parent().parent();return jQuery(this).addClass("selected"),e},start:function(e,a){jQuery(a.helper).addClass("ui-draggable-helper"),0==jQuery("#view").val()&&jQuery("#main-item-container").addClass("no-effect-slide")},stop:function(){jQuery(this).removeClass("selected"),0==jQuery("#view").val()&&jQuery("#main-item-container").removeClass("no-effect-slide")}}),jQuery("li.dir,li.back").droppable({accept:"ul.grid li",activeClass:"ui-state-highlight",hoverClass:"ui-state-hover",drop:function(e,a){p(a.draggable.find("figure"),jQuery(this).find("figure"))}}),jQuery(document).on("keyup","#chmod_form #chmod_value",function(){u(!0)}),jQuery(document).on("change","#chmod_form input",function(){u(!1)}),jQuery(document).on("focusout","#chmod_form #chmod_value",function(){var e=jQuery("#chmod_form #chmod_value");null==e.val().match(/^[0-7]{3}$/)&&(e.val(e.attr("data-def-value")),u(!0))}),T=new LazyLoad,I=new Clipboard(".btn")}),encodeURL=function(e){for(var a=e.split("/"),r=3;r-1?(f=f+"?"+(new Date).getTime(),c=''+o+''):e.inArray(u,d)>-1?c='":e.inArray(u,s)>-1?("mp3"==u&&(u="mpeg"),c='"):c=''+o+"",1==jQuery("#crossdomain").val()?t.postMessage({sender:"responsivefilemanager",url:f,field_id:null,html:c},"*"):parent.tinymce.majorVersion<4?(parent.tinymce.activeEditor.execCommand("mceInsertContent",!1,c),parent.tinymce.activeEditor.windowManager.close(parent.tinymce.activeEditor.windowManager.params.mce_window_id)):(parent.tinymce.activeEditor.insertContent(c),parent.tinymce.activeEditor.windowManager.close())},apply_link=function(e,a){if(1==jQuery("#popup").val())var r=window.opener;else var r=window.parent;var t=jQuery("#callback").val(),n=jQuery("#cur_dir").val();n=n.replace("\\","/");var i=jQuery("#subdir").val();i=i.replace("\\","/");var l=jQuery("#base_url").val();if(1==jQuery("#ftp").val())var o=encodeURL(jQuery("#ftp_base_url").val()+jQuery("#upload_dir").val()+jQuery("#fldr_value").val()+e);else var u=jQuery("#return_relative_url").val(),o=encodeURL((1==u?i:l+n)+e);if(""!=a)if(1==jQuery("#crossdomain").val())r.postMessage({sender:"responsivefilemanager",url:o,field_id:a},"*");else{var c=jQuery("#"+a,r.document);c.val(o).trigger("change"),0==t?"function"==typeof r.responsive_filemanager_callback&&r.responsive_filemanager_callback(a):"function"==typeof r[t]&&r[t](a),Q()}else apply_any(o)},apply_img=function(e,a){var r;r=1==jQuery("#popup").val()?window.opener:window.parent;var t=jQuery("#callback").val(),n=jQuery("#cur_dir").val();n=n.replace("\\","/");var i=jQuery("#subdir").val();i=i.replace("\\","/");var l=jQuery("#base_url").val();if(1==jQuery("#ftp").val())var o=encodeURL(jQuery("#ftp_base_url").val()+jQuery("#upload_dir").val()+jQuery("#fldr_value").val()+e);else var u=jQuery("#return_relative_url").val(),o=encodeURL((1==u?i:l+n)+e);if(""!=a)if(1==jQuery("#crossdomain").val())r.postMessage({sender:"responsivefilemanager",url:o,field_id:a},"*");else{var c=jQuery("#"+a,r.document);c.val(o).trigger("change"),0==t?"function"==typeof r.responsive_filemanager_callback&&r.responsive_filemanager_callback(a):"function"==typeof r[t]&&r[t](a),Q()}else jQuery("#add_time_to_img").val()&&(o=o+"?"+(new Date).getTime()),apply_any(o)},apply_video=function(e,a){var r;r=1==jQuery("#popup").val()?window.opener:window.parent;var t=jQuery("#callback").val(),n=jQuery("#cur_dir").val();n=n.replace("\\","/");var i=jQuery("#subdir").val();i=i.replace("\\","/");var l=jQuery("#base_url").val();if(1==jQuery("#ftp").val())var o=encodeURL(jQuery("#ftp_base_url").val()+jQuery("#upload_dir").val()+jQuery("#fldr_value").val()+e);else var u=jQuery("#return_relative_url").val(),o=encodeURL((1==u?i:l+n)+e);if(""!=a)if(1==jQuery("#crossdomain").val())r.postMessage({sender:"responsivefilemanager",url:o,field_id:a},"*");else{var c=jQuery("#"+a,r.document);c.val(o).trigger("change"),0==t?"function"==typeof r.responsive_filemanager_callback&&r.responsive_filemanager_callback(a):"function"==typeof r[t]&&r[t](a),Q()}else apply_any(o)},apply_none=function(e){var a=jQuery("ul.grid").find('li[data-name="'+e+'"] figcaption a');a[1].click(),jQuery(".tip-right").tooltip("hide")},apply_any=function(e){if(1==jQuery("#crossdomain").val())window.parent.postMessage({sender:"responsivefilemanager",url:e,field_id:null},"*");else{var a=jQuery("#editor").val();if("ckeditor"==a){var r=j("CKEditorFuncNum");window.opener.CKEDITOR.tools.callFunction(r,e),window.close()}else parent.tinymce.majorVersion<4?(parent.tinymce.activeEditor.windowManager.params.setUrl(e),parent.tinymce.activeEditor.windowManager.close(parent.tinymce.activeEditor.windowManager.params.mce_window_id)):(parent.tinymce.activeEditor.windowManager.getParams().setUrl(e),parent.tinymce.activeEditor.windowManager.close())}},apply_file_duplicate=function(e,a){var r=e.parent().parent().parent().parent();r.after("
  • "+r.html()+"
  • ");var t=r.next();apply_file_rename(t.find("figure"),a);var n=t.find(".download-form"),i="form"+(new Date).getTime();n.attr("id",i),n.find(".tip-right").attr("onclick","jQuery('#"+i+"').submit();")},apply_file_rename=function(e,a){var r;e.attr("data-name",a),e.parent().attr("data-name",a),e.find("h4").text(a);var t=e.find("a.link");r=t.attr("data-file"); -var n=r.substring(r.lastIndexOf("/")+1),i=r.substring(r.lastIndexOf(".")+1);t.each(function(){jQuery(this).attr("data-file",encodeURIComponent(a+"."+i))}),e.find("img").each(function(){var e=jQuery(this).attr("src");jQuery(this).attr("src",e.replace(n,a+"."+i)+"?time="+(new Date).getTime()),jQuery(this).attr("alt",a+" thumbnails")});var l=e.find("a.preview");r=l.attr("data-url"),"undefined"!=typeof r&&r&&l.attr("data-url",r.replace(encodeURIComponent(n),encodeURIComponent(a+"."+i))),e.parent().attr("data-name",a+"."+i),e.attr("data-name",a+"."+i),e.find(".name_download").val(a+"."+i);var o=e.find("a.rename-file"),u=e.find("a.delete-file"),c=o.attr("data-path"),s=c.replace(n,a+"."+i);o.attr("data-path",s),u.attr("data-path",s)},apply_folder_rename=function(e,a){e.attr("data-name",a),e.find("figure").attr("data-name",a);var r=e.find("h4").find("a").text();e.find("h4 > a").text(a);var t=e.find(".folder-link"),n=t.attr("href"),i=jQuery("#fldr_value").val(),l=n.replace("fldr="+i+encodeURIComponent(r),"fldr="+i+encodeURIComponent(a));t.each(function(){jQuery(this).attr("href",l)});var o=e.find("a.delete-folder"),u=e.find("a.rename-folder"),c=u.attr("data-path"),s=c.lastIndexOf("/"),d=c.substr(0,s+1)+a;o.attr("data-path",d),u.attr("data-path",d)},show_animation=function(){jQuery("#loading_container").css("display","block"),jQuery("#loading").css("opacity",".7")},hide_animation=function(){jQuery("#loading_container").fadeOut()}}(jQuery,Modernizr,image_editor),function(){function e(e,a){a=a||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,a.bubbles,a.cancelable,a.detail),r}return"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,void(window.CustomEvent=e))}(); \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/MIT-LICENSE.txt b/libraries/filemanager-9.12.1/js/jPlayer/MIT-LICENSE.txt deleted file mode 100644 index 741ccdf..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/MIT-LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2009 - 2013 Happyworm Ltd -http://happyworm.com -http://jplayer.org - -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. \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/README.md b/libraries/filemanager-9.12.1/js/jPlayer/README.md deleted file mode 100644 index a1b3011..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# [jPlayer](http://jplayer.org/) : HTML5 Audio & Video for [jQuery](http://jquery.com/) - -Support for [Zepto](http://zeptojs.com/) 1.0+ compiled with the data module. - -## What is jPlayer? - -### jPlayer is a jQuery/Zepto plugin that allows you to: -* **play and control media** files in your webpage. -* create a **consistent interface** and experience across all browsers. -* create and style a media player using **just HTML and CSS**. -* add **audio** and **video** to your jQuery/Zepto projects. -* support more devices using **HTML5**. -* support older browsers using a Flash _fall-back/forward_. -* control media on your website using a [JavaScript API](http://www.jplayer.org/latest/developer-guide/). - -### jPlayer supports: -* HTML5: **mp3, m4a (AAC), m4v (H.264),** ogv*, oga*, wav*, webm* -* Flash: **mp3, m4a (AAC), m4v (H.264),** rtmp, flv. - -_(*) Optional counterpart formats to increase HTML5 cross-browser support._ - -## License -[jPlayer](http://jplayer.org/) is licensed under the [MIT license](http://opensource.org/licenses/MIT). - -## More information: -* [jPlayer.org](http://jplayer.org/) -* [Quick Start Guide](http://www.jplayer.org/latest/quick-start-guide/) -* [Developer Guide and API Reference](http://www.jplayer.org/latest/developer-guide/) - -## Author: -Mark J Panaghiston [@thepag](http://twitter.com/thepag) -[happyworm.com](http://happyworm.com/) diff --git a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/Jplayer.as b/libraries/filemanager-9.12.1/js/jPlayer/actionscript/Jplayer.as deleted file mode 100644 index ab6940e..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/Jplayer.as +++ /dev/null @@ -1,638 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2013 Happyworm Ltd - * Licensed under the MIT. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Version: 2.4.0 - * Date: 5th June 2013 - * - * FlashVars expected: (AS3 property of: loaderInfo.parameters) - * id: (URL Encoded: String) Id of jPlayer instance - * vol: (Number) Sets the initial volume - * muted: (Boolean in a String) Sets the initial muted state - * jQuery: (URL Encoded: String) Sets the jQuery var name. Used with: someVar = jQuery.noConflict(true); The someVar name must contain jQuery in it. - * - * Compiled using: Adobe Flex Compiler (mxmlc) Version 4.5.1 build 21328 - */ - -package { - import flash.system.Security; - import flash.external.ExternalInterface; - - import flash.utils.Timer; - import flash.events.TimerEvent; - - import flash.text.TextField; - import flash.text.TextFormat; - - import flash.events.KeyboardEvent; - - import flash.display.Sprite; - import happyworm.jPlayer.*; - - import flash.display.StageAlign; - import flash.display.StageScaleMode; - import flash.events.Event; - import flash.net.LocalConnection; - import flash.events.StatusEvent; - - import flash.events.MouseEvent; - - import flash.ui.ContextMenu; - import flash.ui.ContextMenuItem; - import flash.events.ContextMenuEvent; - import flash.net.URLRequest; - import flash.net.navigateToURL; - import flash.media.Video; - - public class Jplayer extends Sprite { - private var jQuery:String; - private var sentNumberFractionDigits:uint = 2; - - public var commonStatus:JplayerStatus = new JplayerStatus(); // Used for inital ready event so volume is correct. - - private var myInitTimer:Timer = new Timer(100, 0); - - private var myMp3Player:JplayerMp3; - private var myMp4Player:JplayerMp4; - - private var myRtmpPlayer:JplayerRtmp; - - private var isRtmp:Boolean = false; - private var isMp4:Boolean = false; - - private var isMp3:Boolean = false; - private var isVideo:Boolean = false; - - private var securityIssue:Boolean = false; // On direct access and when SWF parameters contain illegal characters - - private var contextMenuFix:Sprite = new Sprite(); // A sprite that will be on top and fix the content menu over video bug. (A Flash plugin bug.) - - private var txLog:TextField; - private var debug:Boolean = false; // Set debug to false for release compile! - private var localAIRDebug:Boolean = false; // This is autodetermined by AIR app - leave false! - - private var traceOut:TraceOut; - - public function Jplayer() { - - flash.system.Security.allowDomain("*"); - traceOut = new TraceOut(); - - // Fix to the security exploit reported by Jason Calvert http://appsec.ws/ - checkFlashVars(loaderInfo.parameters); - - stage.scaleMode = StageScaleMode.NO_SCALE; - stage.align = StageAlign.TOP_LEFT; - - if(!securityIssue) { - // The jQuery param is the primary cause of security concerns. - jQuery = loaderInfo.parameters.jQuery + "('#" + loaderInfo.parameters.id + "').jPlayer"; - commonStatus.volume = Number(loaderInfo.parameters.vol); - commonStatus.muted = loaderInfo.parameters.muted == "true"; - - stage.addEventListener(Event.RESIZE, resizeHandler); - stage.addEventListener(MouseEvent.CLICK, clickHandler); - - var initialVolume:Number = commonStatus.volume; - if(commonStatus.muted) { - initialVolume = 0; - } - - myMp3Player = new JplayerMp3(initialVolume); - addChild(myMp3Player); - - myMp4Player = new JplayerMp4(initialVolume); - addChild(myMp4Player); - - myRtmpPlayer = new JplayerRtmp(initialVolume); - addChild(myRtmpPlayer); - - switchType("mp3"); // set default state to mp3 - } - - // The ContextMenu only partially works. The menu select events never occur. - // Investigated and it is something to do with the way jPlayer inserts the Flash on the page. - // A simple test inserting the Jplayer.swf on a page using: 1) SWFObject 2.2 works. 2) AC_FL_RunContent() works. - // jPlayer Flash insertion is based on SWFObject 2.2 and the resaon behind this failure is not clear. The Flash insertion HTML on the page looks similar. - var myContextMenu:ContextMenu = new ContextMenu(); - myContextMenu.hideBuiltInItems(); - var menuItem_jPlayer:ContextMenuItem = new ContextMenuItem("jPlayer " + JplayerStatus.VERSION); - var menuItem_happyworm:ContextMenuItem = new ContextMenuItem("© 2009-2013 Happyworm Ltd", true); - menuItem_jPlayer.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuSelectHandler_jPlayer); - menuItem_happyworm.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuSelectHandler_happyworm); - myContextMenu.customItems.push(menuItem_jPlayer, menuItem_happyworm); - contextMenu = myContextMenu; - - // Log console for dev compile option: debug - if(debug || securityIssue) { - txLog = new TextField(); - txLog.x = 5; - txLog.y = 5; - txLog.width = stage.stageWidth - 10; - txLog.height = stage.stageHeight - 10; - txLog.backgroundColor = 0xEEEEFF; - txLog.border = true; - txLog.background = true; - txLog.multiline = true; - txLog.text = "jPlayer " + JplayerStatus.VERSION; - - if(securityIssue) { - txLog.visible = true; - } else if(debug) { - txLog.visible = false; - } - - this.addChild(txLog); - - if(debug && !securityIssue) { - this.stage.addEventListener(KeyboardEvent.KEY_UP, keyboardHandler); - - myMp3Player.addEventListener(JplayerEvent.DEBUG_MSG, debugMsgHandler); - myMp4Player.addEventListener(JplayerEvent.DEBUG_MSG, debugMsgHandler); - myRtmpPlayer.addEventListener(JplayerEvent.DEBUG_MSG, debugMsgHandler); - } - } - - // Known Flash problem with contextMenu over video player. - // Add a transparent rectangle into the sprite. - contextMenuFix.graphics.beginFill(0x000000, 0); // Transparent black - contextMenuFix.graphics.drawRect(0, 0, 10, 10); // Arbitary rectangle - contextMenuFix.graphics.endFill(); - addChild(contextMenuFix); // Put the sprite on the top layer. - - if(!securityIssue) { - // Delay init() because Firefox 3.5.7+ developed a bug with local testing in Firebug. - myInitTimer.addEventListener(TimerEvent.TIMER, init); - myInitTimer.start(); - } - } - - private function switchType(playType:String):void { - switch(playType) { - case "rtmpa": - isRtmp=true; - isMp3=false; - isMp4=false; - isVideo=false; - break; - case "rtmpv": - isRtmp=true; - isMp3=false; - isMp4=false; - isVideo=true; - break; - case "mp3": - isRtmp=false; - isMp3=true; - isMp4=false; - isVideo=false; - break; - case "mp4": - isRtmp=false; - isMp3=false; - isMp4=true; - isVideo=false; - break; - case "m4v": - isRtmp=false; - isMp3=false; - isMp4=true; - isVideo=true; - break; - } - - listenToMp3(isMp3); - listenToMp4(isMp4); - listenToRtmp(isRtmp); - } - - private function init(e:TimerEvent):void { - myInitTimer.stop(); - if(ExternalInterface.available && !securityIssue) { - ExternalInterface.addCallback("fl_setAudio_mp3", fl_setAudio_mp3); - ExternalInterface.addCallback("fl_setAudio_m4a", fl_setAudio_m4a); - ExternalInterface.addCallback("fl_setVideo_m4v", fl_setVideo_m4v); - ExternalInterface.addCallback("fl_setAudio_rtmp", fl_setAudio_rtmp); - ExternalInterface.addCallback("fl_setVideo_rtmp", fl_setVideo_rtmp); - ExternalInterface.addCallback("fl_clearMedia", fl_clearMedia); - ExternalInterface.addCallback("fl_load", fl_load); - ExternalInterface.addCallback("fl_play", fl_play); - ExternalInterface.addCallback("fl_pause", fl_pause); - ExternalInterface.addCallback("fl_play_head", fl_play_head); - ExternalInterface.addCallback("fl_volume", fl_volume); - ExternalInterface.addCallback("fl_mute", fl_mute); - - ExternalInterface.call(jQuery, "jPlayerFlashEvent", JplayerEvent.JPLAYER_READY, extractStatusData(commonStatus)); // See JplayerStatus() class for version number. - } - } - private function checkFlashVars(p:Object):void { - // Check for direct access. Inspired by mediaelement.js - Also added name to HTML object for non-IE browsers. - if(ExternalInterface.objectID != null && ExternalInterface.objectID.toString() != "") { - for each (var s:String in p) { - if(illegalChar(s)) { - securityIssue = true; // Found a security concern. - } - } - if(!securityIssue) { - if(jQueryIllegal(p.jQuery)) { - securityIssue = true; // Found a security concern. - } - } - } else { - securityIssue = true; // Direct access disables the callbacks, which were a security concern. - } - } - private function illegalChar(s:String):Boolean { - // A whitelist of accepted chars. - var validParam:RegExp = /^[-A-Za-z0-9_.]+$/; - return !validParam.test(s); - } - private function jQueryIllegal(s:String):Boolean { - // Check param contains the term jQuery. - var validParam:RegExp = /(jQuery)/; - return !validParam.test(s); - } - // switchType() here - private function listenToMp3(active:Boolean):void { - if(active) { - myMp3Player.addEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent); - myMp3Player.addEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent); - myMp3Player.addEventListener(JplayerEvent.JPLAYER_TIMEUPDATE, jPlayerFlashEvent); - myMp3Player.addEventListener(JplayerEvent.JPLAYER_ENDED, jPlayerFlashEvent); - - myMp3Player.addEventListener(JplayerEvent.JPLAYER_PLAY, jPlayerFlashEvent); - myMp3Player.addEventListener(JplayerEvent.JPLAYER_PAUSE, jPlayerFlashEvent); - myMp3Player.addEventListener(JplayerEvent.JPLAYER_LOADSTART, jPlayerFlashEvent); - - myMp3Player.addEventListener(JplayerEvent.JPLAYER_SEEKING, jPlayerFlashEvent); - myMp3Player.addEventListener(JplayerEvent.JPLAYER_SEEKED, jPlayerFlashEvent); - - myMp3Player.addEventListener(JplayerEvent.JPLAYER_WAITING, jPlayerFlashEvent); // only MP3 atm - myMp3Player.addEventListener(JplayerEvent.JPLAYER_PLAYING, jPlayerFlashEvent); // only MP3 atm - - myMp3Player.addEventListener(JplayerEvent.JPLAYER_CANPLAY, jPlayerFlashEvent); // only MP3 atm - myMp3Player.addEventListener(JplayerEvent.JPLAYER_CANPLAYTHROUGH, jPlayerFlashEvent); // only MP3 atm - } else { - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent); - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent); - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_TIMEUPDATE, jPlayerFlashEvent); - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_ENDED, jPlayerFlashEvent); - - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_PLAY, jPlayerFlashEvent); - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_PAUSE, jPlayerFlashEvent); - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_LOADSTART, jPlayerFlashEvent); - - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_SEEKING, jPlayerFlashEvent); - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_SEEKED, jPlayerFlashEvent); - - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_WAITING, jPlayerFlashEvent); // only MP3 atm - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_PLAYING, jPlayerFlashEvent); // only MP3 atm - - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_CANPLAY, jPlayerFlashEvent); // only MP3 atm - myMp3Player.removeEventListener(JplayerEvent.JPLAYER_CANPLAYTHROUGH, jPlayerFlashEvent); // only MP3 atm - } - } - private function listenToMp4(active:Boolean):void { - if(active) { - myMp4Player.addEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent); - myMp4Player.addEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent); - myMp4Player.addEventListener(JplayerEvent.JPLAYER_TIMEUPDATE, jPlayerFlashEvent); - myMp4Player.addEventListener(JplayerEvent.JPLAYER_ENDED, jPlayerFlashEvent); - - myMp4Player.addEventListener(JplayerEvent.JPLAYER_PLAY, jPlayerFlashEvent); - myMp4Player.addEventListener(JplayerEvent.JPLAYER_PAUSE, jPlayerFlashEvent); - myMp4Player.addEventListener(JplayerEvent.JPLAYER_LOADSTART, jPlayerFlashEvent); - - myMp4Player.addEventListener(JplayerEvent.JPLAYER_SEEKING, jPlayerFlashEvent); - myMp4Player.addEventListener(JplayerEvent.JPLAYER_SEEKED, jPlayerFlashEvent); - - myMp4Player.addEventListener(JplayerEvent.JPLAYER_LOADEDMETADATA, jPlayerMetaDataHandler); // Note the unique handler - } else { - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent); - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent); - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_TIMEUPDATE, jPlayerFlashEvent); - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_ENDED, jPlayerFlashEvent); - - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_PLAY, jPlayerFlashEvent); - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_PAUSE, jPlayerFlashEvent); - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_LOADSTART, jPlayerFlashEvent); - - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_SEEKING, jPlayerFlashEvent); - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_SEEKED, jPlayerFlashEvent); - - myMp4Player.removeEventListener(JplayerEvent.JPLAYER_LOADEDMETADATA, jPlayerMetaDataHandler); // Note the unique handler - } - } - - private function listenToRtmp(active:Boolean):void { - if(active) { - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent); - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent); - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_TIMEUPDATE, jPlayerFlashEvent); - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_ENDED, jPlayerFlashEvent); - - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_PLAY, jPlayerFlashEvent); - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_PAUSE, jPlayerFlashEvent); - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_LOADSTART, jPlayerFlashEvent); - - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_CANPLAY, jPlayerFlashEvent); - - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_SEEKING, jPlayerFlashEvent); - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_SEEKED, jPlayerFlashEvent); - - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_LOADEDMETADATA, jPlayerMetaDataHandler); // Note the unique handler - } else { - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent); - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent); - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_TIMEUPDATE, jPlayerFlashEvent); - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_ENDED, jPlayerFlashEvent); - - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_PLAY, jPlayerFlashEvent); - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_PAUSE, jPlayerFlashEvent); - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_LOADSTART, jPlayerFlashEvent); - - myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_CANPLAY, jPlayerFlashEvent); - - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_SEEKING, jPlayerFlashEvent); - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_SEEKED, jPlayerFlashEvent); - - myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_LOADEDMETADATA, jPlayerMetaDataHandler); // Note the unique handler - } - } - - private function fl_setAudio_mp3(src:String):Boolean { - if (src != null) { - log("fl_setAudio_mp3: "+src); - switchType("mp3"); - myMp4Player.clearFile(); - myRtmpPlayer.clearFile(); - myMp3Player.setFile(src); - return true; - } else { - log("fl_setAudio_mp3: null"); - return false; - } - } - private function fl_setAudio_rtmp(src:String):Boolean { - tracer("SET RTMP: "+src); - if (src != null) { - log("fl_setAudio_rtmp: "+src); - switchType("rtmpa"); - myMp4Player.clearFile(); - myMp3Player.clearFile(); - myRtmpPlayer.setFile(src,false); - return true; - } else { - log("fl_setAudio_rtmp: null"); - return false; - } - } - - private function fl_setVideo_rtmp(src:String):Boolean { - tracer("SET RTMP: "+src); - if (src != null) { - log("fl_setVideo_rtmp: "+src); - switchType("rtmpv"); - myMp4Player.clearFile(); - myMp3Player.clearFile(); - myRtmpPlayer.setFile(src,true); - return true; - } else { - log("fl_setVideo_rtmp: null"); - return false; - } - } - private function fl_setAudio_m4a(src:String):Boolean { - if (src != null) { - log("fl_setAudio_m4a: "+src); - switchType("mp4") - myMp3Player.clearFile(); - myRtmpPlayer.clearFile(); - myMp4Player.setFile(src); - return true; - } else { - log("fl_setAudio_m4a: null"); - return false; - } - } - private function fl_setVideo_m4v(src:String):Boolean { - if (src != null) { - log("fl_setVideo_m4v: "+src); - switchType("m4v"); - myMp3Player.clearFile(); - myRtmpPlayer.clearFile(); - myMp4Player.setFile(src); - return true; - } else { - log("fl_setVideo_m4v: null"); - return false; - } - } - private function fl_clearMedia():void { - log("clearMedia."); - myMp3Player.clearFile(); - myMp4Player.clearFile(); - myRtmpPlayer.clearFile(); - } - - private function getType():Object { - var returnType:Object; - if(isMp3) { - returnType=myMp3Player; - } - if(isRtmp) { - returnType=myRtmpPlayer; - } - if(isMp4) { - returnType=myMp4Player; - } - return returnType; - } - - private function fl_load():Boolean { - log("load."); - var returnType:Object = getType(); - return returnType.load(); - } - private function fl_play(time:Number = NaN):Boolean { - log("play: time = " + time); - var returnType:Object = getType(); - return returnType.play(time * 1000); // Flash uses milliseconds - } - private function fl_pause(time:Number = NaN):Boolean { - log("pause: time = " + time); - var returnType:Object = getType(); - return returnType.pause(time * 1000); // Flash uses milliseconds - } - private function fl_play_head(percent:Number):Boolean { - log("play_head: "+percent+"%"); - var returnType:Object = getType(); - return returnType.playHead(percent); - } - private function fl_volume(v:Number):void { - log("volume: "+v); - commonStatus.volume = v; - if(!commonStatus.muted) { - myMp3Player.setVolume(v); - myMp4Player.setVolume(v); - myRtmpPlayer.setVolume(v); - } - } - private function fl_mute(mute:Boolean):void { - log("mute: "+mute); - commonStatus.muted = mute; - if(mute) { - myMp3Player.setVolume(0); - myMp4Player.setVolume(0); - myRtmpPlayer.setVolume(0); - } else { - myMp3Player.setVolume(commonStatus.volume); - myMp4Player.setVolume(commonStatus.volume); - myRtmpPlayer.setVolume(commonStatus.volume); - } - } - private function jPlayerFlashEvent(e:JplayerEvent):void { - log("jPlayer Flash Event: " + e.type + ": " + e.target); - //tracer("jPlayer Flash Event: " + e.type + ": " + e.target); - if(ExternalInterface.available && !securityIssue) { - ExternalInterface.call(jQuery, "jPlayerFlashEvent", e.type, extractStatusData(e.data)); - } - } - - private function tracer(msg:String):void { - traceOut.tracer(msg); - } - - private function extractStatusData(data:JplayerStatus):Object { - var myStatus:Object = { - version: JplayerStatus.VERSION, - src: data.src, - paused: !data.isPlaying, // Changing this name requires inverting all assignments and conditional statements. - srcSet: data.srcSet, - seekPercent: data.seekPercent, - currentPercentRelative: data.currentPercentRelative, - currentPercentAbsolute: data.currentPercentAbsolute, - currentTime: data.currentTime / 1000, // JavaScript uses seconds - duration: data.duration / 1000, // JavaScript uses seconds - videoWidth: data.videoWidth, - videoHeight: data.videoHeight, - volume: commonStatus.volume, - muted: commonStatus.muted - }; - log("extractStatusData: sp="+myStatus.seekPercent+" cpr="+myStatus.currentPercentRelative+" cpa="+myStatus.currentPercentAbsolute+" ct="+myStatus.currentTime+" d="+myStatus.duration); - return myStatus; - } - private function jPlayerMetaDataHandler(e:JplayerEvent):void { - log("jPlayerMetaDataHandler:" + e.target); - if(ExternalInterface.available && !securityIssue) { - resizeHandler(new Event(Event.RESIZE)); - ExternalInterface.call(jQuery, "jPlayerFlashEvent", e.type, extractStatusData(e.data)); - } - } - private function resizeHandler(e:Event):void { - log("resizeHandler: stageWidth = " + stage.stageWidth + " | stageHeight = " + stage.stageHeight); - - var mediaX:Number = 0; - var mediaY:Number = 0; - var mediaWidth:Number = 0; - var mediaHeight:Number = 0; - - var aspectRatioStage:Number = 0; - var aspectRatioVideo:Number = 0; - - var videoItem:*; - - if(isRtmp) { - videoItem = myRtmpPlayer; - } - if(isMp4) { - videoItem = myMp4Player; - } - - if(videoItem) { - if(stage.stageWidth > 0 && stage.stageHeight > 0 && videoItem.myVideo.width > 0 && videoItem.myVideo.height > 0) { - aspectRatioStage = stage.stageWidth / stage.stageHeight; - aspectRatioVideo = videoItem.myVideo.width / videoItem.myVideo.height; - if(aspectRatioStage < aspectRatioVideo) { - mediaWidth = stage.stageWidth; - mediaHeight = stage.stageWidth / aspectRatioVideo; - mediaX = 0; - mediaY = (stage.stageHeight - mediaHeight) / 2; - } else { - mediaWidth = stage.stageHeight * aspectRatioVideo; - mediaHeight = stage.stageHeight; - mediaX = (stage.stageWidth - mediaWidth) / 2; - mediaY = 0; - } - resizeEntity(videoItem, mediaX, mediaY, mediaWidth, mediaHeight); - } - } - if((debug || securityIssue) && stage.stageWidth > 20 && stage.stageHeight > 20) { - txLog.width = stage.stageWidth - 10; - txLog.height = stage.stageHeight - 10; - } - // Resize the sprite so it covers the entire stage area - contextMenuFix.x = 0; - contextMenuFix.y = 0; - contextMenuFix.width = stage.stageWidth; - contextMenuFix.height = stage.stageHeight; - } - private function resizeEntity(entity:Sprite, mediaX:Number, mediaY:Number, mediaWidth:Number, mediaHeight:Number):void { - entity.x = mediaX; - entity.y = mediaY; - entity.width = mediaWidth; - entity.height = mediaHeight; - } - private function clickHandler(e:MouseEvent):void { - // This needs to work with RTMP format too! - if(isMp3) { - jPlayerFlashEvent(new JplayerEvent(JplayerEvent.JPLAYER_CLICK, myMp3Player.myStatus, "click")) - } else { - jPlayerFlashEvent(new JplayerEvent(JplayerEvent.JPLAYER_CLICK, myMp4Player.myStatus, "click")) - } - } - // This event is never called. See comments in class constructor. - private function menuSelectHandler_jPlayer(e:ContextMenuEvent):void { - navigateToURL(new URLRequest("http://jplayer.org/"), "_blank"); - } - // This event is never called. See comments in class constructor. - private function menuSelectHandler_happyworm(e:ContextMenuEvent):void { - navigateToURL(new URLRequest("http://happyworm.com/"), "_blank"); - } - private function log(t:String):void { - if(debug) { - txLog.text = t + "\n" + txLog.text; - localAIRDebug = traceOut.localAIRDebug(); - if(localAIRDebug) { - tracer(t); - } - - if(ExternalInterface.available && !securityIssue) { - ExternalInterface.call("console.log", t); - } - } - } - private function debugMsgHandler(e:JplayerEvent):void { - log(e.msg); - } - private function keyboardHandler(e:KeyboardEvent):void { - log("keyboardHandler: e.keyCode = " + e.keyCode); - switch(e.keyCode) { - case 68 : // d - txLog.visible = !txLog.visible; - log("Toggled log display: " + txLog.visible); - break; - case 76 : // l - if(e.ctrlKey && e.shiftKey) { - txLog.text = "Cleared log."; - } - break; - } - } - } -} diff --git a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/Jplayer.fla b/libraries/filemanager-9.12.1/js/jPlayer/actionscript/Jplayer.fla deleted file mode 100644 index 61ae40d..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/Jplayer.fla and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/ConnectManager.as b/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/ConnectManager.as deleted file mode 100644 index 1baa032..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/ConnectManager.as +++ /dev/null @@ -1,295 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2013 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Robert M. Hall - * Date: 7th August 2012 - * Custom NetConnection Manager for more robust RTMP support - * Based in part on work by Will Law for the old Akamai NCManager.as - * and some of Will's new work in the OVP base classes (Open Video Player) - * as well as similar approaches by many other NetConnection managers - * - */ - - /* - TODO LIST 08/18/2011: - 1. Wired up errors to dispatch events to Jplayer events to allow them to bubble up to JS - 2. Rework event dispatch to handoff netconnection instead of a passed in reference - 3. Allow a customizeable list of protocols and ports to be used instead of entire list - 4. Allow a specific port/protocol (1 connect type) to be used first, and then optionally fallback on a custom list or the default list - 5. Remove some traces and check a few other items below where I've made notes - */ - -package happyworm.jPlayer { - - import flash.events.*; - import flash.net.*; - - import flash.utils.Timer; - import flash.utils.getTimer; - import flash.utils.clearInterval; - import flash.utils.setInterval; - - public class ConnectManager extends Object { - - private var protocols_arr:Array = new Array("rtmp","rtmpt","rtmpe","rtmpte","rtmps"); - private var ports_arr:Array = new Array("",":1935",":80",":443"); - private const protCount:Number = 5; - private const portCount:Number = 4; - - private var _ncRef:Object; - - private var _aNC:Array; - - private var k_TIMEOUT:Number = 30000; - private var k_startConns:Number; - private var m_connList:Array = []; - private var m_serverName:String; - private var m_appName:String; - private var m_streamName:String; - private var m_connListCounter:Number; - private var m_flashComConnectTimeOut:Number; - private var m_validNetConnection:NetConnection; - - private var connectSuccess:Boolean=false; - - private var negotiating:Boolean=false; - private var idleTimeOut:Boolean=false; - - public function ConnectManager() { - trace ("ConnectManager Initialized Version: 1.00 DT"); - createPortsProtocolsArray(); - } - - private function createPortsProtocolsArray():void { - var outerLoop:Number=0; - var innerLoop:Number=0; - for (outerLoop=0; outerLoop getDuration())) { - // Illegal seek time - seeking(false); - seekedEvent(); - pause(0); - } - } - private function seekingEvent():void { - myStatus.isSeeking = true; - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_SEEKING, myStatus)); - } - private function seekedEvent():void { - myStatus.isSeeking = false; - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_SEEKED, myStatus)); - } - private function playingHandler(e:TimerEvent):void { - checkPlaying(false); // Without forcing playing event. - } - private function checkPlaying(force:Boolean):void { - if(mySound.isBuffering) { - if(!myStatus.isWaiting) { - waitingEvent(); - } - } else { - if(myStatus.isWaiting || force) { - playingEvent(); - } - } - } - private function waitingEvent():void { - myStatus.isWaiting = true; - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_WAITING, myStatus)); - } - private function playingEvent():void { - myStatus.isWaiting = false; - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_CANPLAY, myStatus)); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PLAYING, myStatus)); - } - private function waitingHandler(e:TimerEvent):void { - waitingTimer.stop(); - if(myStatus.playOnLoad) { - waitingEvent(); - } - } - public function load():Boolean { - if(myStatus.loadRequired()) { - myStatus.startingDownload(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_LOADSTART, myStatus)); - waitingTimer.start(); - mySound.load(myRequest, myContext); - return true; - } else { - return false; - } - } - public function play(time:Number = NaN):Boolean { - var wasPlaying:Boolean = myStatus.isPlaying; - - if(!isNaN(time) && myStatus.srcSet) { - if(myStatus.isPlaying) { - myChannel.stop(); - myStatus.isPlaying = false; - } - myStatus.pausePosition = time; - } - - if(myStatus.isStartingDownload) { - myStatus.playOnLoad = true; // Raise flag, captured in loadOpen() - return true; - } else if(myStatus.loadRequired()) { - myStatus.playOnLoad = true; // Raise flag, captured in loadOpen() - return load(); - } else if((myStatus.isLoading || myStatus.isLoaded) && !myStatus.isPlaying) { - if(myStatus.isLoaded && myStatus.pausePosition > getDuration()) { // The time is invalid, ie., past the end. - myStatus.pausePosition = 0; - timeUpdates(false); - timeUpdateEvent(); - if(wasPlaying) { // For when playing and then get a play(huge) - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PAUSE, myStatus)); - } - } else if(myStatus.pausePosition > getDuration()) { - myStatus.playOnSeek = true; - seeking(true); - } else { - myStatus.isPlaying = true; // Set immediately before playing. Could affects events. - myChannel = mySound.play(myStatus.pausePosition); - myChannel.soundTransform = myTransform; - myChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); - timeUpdates(true); - if(!wasPlaying) { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PLAY, myStatus)); - } - checkPlaying(true); // Force the playing event unless waiting, which will be dealt with in the playingTimer. - } - return true; - } else { - return false; - } - } - public function pause(time:Number = NaN):Boolean { - myStatus.playOnLoad = false; // Reset flag in case load/play issued immediately before this command, ie., before loadOpen() event. - myStatus.playOnSeek = false; // Reset flag in case play(time) issued before the command and is still seeking to time set. - - var wasPlaying:Boolean = myStatus.isPlaying; - - // To avoid possible loops with timeupdate and pause(time). A pause() does not have the problem. - var alreadyPausedAtTime:Boolean = false; - if(!isNaN(time) && myStatus.pausePosition == time) { - alreadyPausedAtTime = true; - } - - if(myStatus.isPlaying) { - myStatus.isPlaying = false; - myChannel.stop(); - if(myChannel.position > 0) { // Required otherwise a fast play then pause causes myChannel.position to equal zero and not the correct value. ie., When it happens leave pausePosition alone. - myStatus.pausePosition = myChannel.position; - } - } - - if(!isNaN(time) && myStatus.srcSet) { - myStatus.pausePosition = time; - } - - if(wasPlaying) { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PAUSE, myStatus)); - } - - if(myStatus.isStartingDownload) { - return true; - } else if(myStatus.loadRequired()) { - if(time > 0) { // We do not want the stop() command, which does pause(0), causing a load operation. - return load(); - } else { - return true; // Technically the pause(0) succeeded. ie., It did nothing, since nothing was required. - } - } else if(myStatus.isLoading || myStatus.isLoaded) { - if(myStatus.isLoaded && myStatus.pausePosition > getDuration()) { // The time is invalid, ie., past the end. - myStatus.pausePosition = 0; - } else if(myStatus.pausePosition > getDuration()) { - seeking(true); - } - timeUpdates(false); - // Need to be careful with timeupdate event, otherwise a pause in a timeupdate event can cause a loop. - // Neither pause() nor pause(time) will cause a timeupdate loop. - if(wasPlaying || !isNaN(time) && !alreadyPausedAtTime) { - timeUpdateEvent(); - } - return true; - } else { - return false; - } - } - public function playHead(percent:Number):Boolean { - var time:Number = percent * getDuration() / 100; - if(myStatus.isPlaying || myStatus.playOnLoad || myStatus.playOnSeek) { - return play(time); - } else { - return pause(time); - } - } - public function setVolume(v:Number):void { - myStatus.volume = v; - myTransform.volume = v; - myChannel.soundTransform = myTransform; - } - private function updateStatusValues():void { - myStatus.seekPercent = 100 * getLoadRatio(); - myStatus.currentTime = getCurrentTime(); - myStatus.currentPercentRelative = 100 * getCurrentRatioRel(); - myStatus.currentPercentAbsolute = 100 * getCurrentRatioAbs(); - myStatus.duration = getDuration(); - } - public function getLoadRatio():Number { - if((myStatus.isLoading || myStatus.isLoaded) && mySound.bytesTotal > 0) { - return mySound.bytesLoaded / mySound.bytesTotal; - } else { - return 0; - } - } - public function getDuration():Number { - if(mySound.length > 0) { - return mySound.length; - } else { - return 0; - } - } - public function getCurrentTime():Number { - if(myStatus.isPlaying) { - return myChannel.position; - } else { - return myStatus.pausePosition; - } - } - public function getCurrentRatioRel():Number { - if((getDuration() > 0) && (getCurrentTime() <= getDuration())) { - return getCurrentTime() / getDuration(); - } else { - return 0; - } - } - public function getCurrentRatioAbs():Number { - return getCurrentRatioRel() * getLoadRatio(); - } - } -} diff --git a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerMp4.as b/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerMp4.as deleted file mode 100644 index a45e327..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerMp4.as +++ /dev/null @@ -1,412 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2013 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Date: 29th January 2013 - */ - -package happyworm.jPlayer { - import flash.display.Sprite; - - import flash.media.Video; - import flash.media.SoundTransform; - - import flash.net.NetConnection; - import flash.net.NetStream; - - import flash.utils.Timer; - - import flash.events.NetStatusEvent; - import flash.events.SecurityErrorEvent; - import flash.events.TimerEvent; - - public class JplayerMp4 extends Sprite { - - public var myVideo:Video = new Video(); - private var myConnection:NetConnection; - private var myStream:NetStream; - - private var myTransform:SoundTransform = new SoundTransform(); - - public var myStatus:JplayerStatus = new JplayerStatus(); - - private var timeUpdateTimer:Timer = new Timer(250, 0); // Matched to HTML event freq - private var progressTimer:Timer = new Timer(250, 0); // Matched to HTML event freq - private var seekingTimer:Timer = new Timer(100, 0); // Internal: How often seeking is checked to see if it is over. - - public function JplayerMp4(volume:Number) { - myConnection = new NetConnection(); - myConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); - myConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); - myVideo.smoothing = true; - this.addChild(myVideo); - - timeUpdateTimer.addEventListener(TimerEvent.TIMER, timeUpdateHandler); - progressTimer.addEventListener(TimerEvent.TIMER, progressHandler); - seekingTimer.addEventListener(TimerEvent.TIMER, seekingHandler); - - myStatus.volume = volume; - } - private function progressUpdates(active:Boolean):void { - if(active) { - progressTimer.start(); - } else { - progressTimer.stop(); - } - } - private function progressHandler(e:TimerEvent):void { - if(myStatus.isLoading) { - if(getLoadRatio() == 1) { // Close as can get to a loadComplete event since client.onPlayStatus only works with FMS - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "progressHandler: loadComplete")); - myStatus.loaded(); - progressUpdates(false); - } - } - progressEvent(); - } - private function progressEvent():void { - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "progressEvent:")); - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PROGRESS, myStatus)); - } - private function timeUpdates(active:Boolean):void { - if(active) { - timeUpdateTimer.start(); - } else { - timeUpdateTimer.stop(); - } - } - private function timeUpdateHandler(e:TimerEvent):void { - timeUpdateEvent(); - } - private function timeUpdateEvent():void { - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_TIMEUPDATE, myStatus)); - } - private function seeking(active:Boolean):void { - if(active) { - if(!myStatus.isSeeking) { - seekingEvent(); - } - seekingTimer.start(); - } else { - if(myStatus.isSeeking) { - seekedEvent(); - } - seekingTimer.stop(); - } - } - private function seekingHandler(e:TimerEvent):void { - if(getSeekTimeRatio() <= getLoadRatio()) { - seeking(false); - if(myStatus.playOnSeek) { - myStatus.playOnSeek = false; // Capture the flag. - play(myStatus.pausePosition); // Must pass time or the seek time is never set. - } else { - pause(myStatus.pausePosition); // Must pass time or the stream.time is read. - } - } else if(myStatus.metaDataReady && myStatus.pausePosition > myStatus.duration) { - // Illegal seek time - seeking(false); - pause(0); - } - } - private function seekingEvent():void { - myStatus.isSeeking = true; - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_SEEKING, myStatus)); - } - private function seekedEvent():void { - myStatus.isSeeking = false; - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_SEEKED, myStatus)); - } - private function netStatusHandler(e:NetStatusEvent):void { - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "netStatusHandler: '" + e.info.code + "'")); - switch(e.info.code) { - case "NetConnection.Connect.Success": - connectStream(); - break; - case "NetStream.Play.Start": - // This event code occurs once, when the media is opened. Equiv to loadOpen() in mp3 player. - myStatus.loading(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_LOADSTART, myStatus)); - progressUpdates(true); - // See onMetaDataHandler() for other condition, since duration is vital. - break; - case "NetStream.Play.Stop": - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "NetStream.Play.Stop: getDuration() - getCurrentTime() = " + (getDuration() - getCurrentTime()))); - - // Check if media is at the end (or close) otherwise this was due to download bandwidth stopping playback. ie., Download is not fast enough. - if(Math.abs(getDuration() - getCurrentTime()) < 150) { // Testing found 150ms worked best for M4A files, where playHead(99.9) caused a stuck state due to firing with ~116ms left to play. - endedEvent(); - } - break; - case "NetStream.Seek.InvalidTime": - // Used for capturing invalid set times and clicks on the end of the progress bar. - endedEvent(); - break; - case "NetStream.Play.StreamNotFound": - myStatus.error(); // Resets status except the src, and it sets srcError property. - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_ERROR, myStatus)); - break; - } - // "NetStream.Seek.Notify" event code is not very useful. It occurs after every seek(t) command issued and does not appear to wait for the media to be ready. - } - private function endedEvent():void { - var wasPlaying:Boolean = myStatus.isPlaying; - pause(0); - timeUpdates(false); - timeUpdateEvent(); - if(wasPlaying) { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_ENDED, myStatus)); - } - } - private function securityErrorHandler(event:SecurityErrorEvent):void { - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "securityErrorHandler.")); - } - private function connectStream():void { - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "connectStream.")); - var customClient:Object = new Object(); - customClient.onMetaData = onMetaDataHandler; - // customClient.onPlayStatus = onPlayStatusHandler; // According to the forums and my tests, onPlayStatus only works with FMS (Flash Media Server). - myStream = null; - myStream = new NetStream(myConnection); - myStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); - myStream.client = customClient; - myVideo.attachNetStream(myStream); - setVolume(myStatus.volume); - myStream.play(myStatus.src); - } - public function setFile(src:String):void { - if(myStream != null) { - myStream.close(); - } - myVideo.clear(); - progressUpdates(false); - timeUpdates(false); - - myStatus.reset(); - myStatus.src = src; - myStatus.srcSet = true; - timeUpdateEvent(); - } - public function clearFile():void { - setFile(""); - myStatus.srcSet = false; - } - public function load():Boolean { - if(myStatus.loadRequired()) { - myStatus.startingDownload(); - myConnection.connect(null); - return true; - } else { - return false; - } - } - public function play(time:Number = NaN):Boolean { - var wasPlaying:Boolean = myStatus.isPlaying; - - if(!isNaN(time) && myStatus.srcSet) { - if(myStatus.isPlaying) { - myStream.pause(); - myStatus.isPlaying = false; - } - myStatus.pausePosition = time; - } - - if(myStatus.isStartingDownload) { - myStatus.playOnLoad = true; // Raise flag, captured in onMetaDataHandler() - return true; - } else if(myStatus.loadRequired()) { - myStatus.playOnLoad = true; // Raise flag, captured in onMetaDataHandler() - return load(); - } else if((myStatus.isLoading || myStatus.isLoaded) && !myStatus.isPlaying) { - if(myStatus.metaDataReady && myStatus.pausePosition > myStatus.duration) { // The time is invalid, ie., past the end. - myStream.pause(); // Since it is playing by default at this point. - myStatus.pausePosition = 0; - myStream.seek(0); - timeUpdates(false); - timeUpdateEvent(); - if(wasPlaying) { // For when playing and then get a play(huge) - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PAUSE, myStatus)); - } - } else if(getSeekTimeRatio() > getLoadRatio()) { // Use an estimate based on the downloaded amount - myStatus.playOnSeek = true; - seeking(true); - myStream.pause(); // Since it is playing by default at this point. - } else { - if(!isNaN(time)) { // Avoid using seek() when it is already correct. - myStream.seek(myStatus.pausePosition/1000); // Since time is in ms and seek() takes seconds - } - myStatus.isPlaying = true; // Set immediately before playing. Could affects events. - myStream.resume(); - timeUpdates(true); - if(!wasPlaying) { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PLAY, myStatus)); - } - } - return true; - } else { - return false; - } - } - public function pause(time:Number = NaN):Boolean { - myStatus.playOnLoad = false; // Reset flag in case load/play issued immediately before this command, ie., before onMetadata() event. - myStatus.playOnSeek = false; // Reset flag in case play(time) issued before the command and is still seeking to time set. - - var wasPlaying:Boolean = myStatus.isPlaying; - - // To avoid possible loops with timeupdate and pause(time). A pause() does not have the problem. - var alreadyPausedAtTime:Boolean = false; - if(!isNaN(time) && myStatus.pausePosition == time) { - alreadyPausedAtTime = true; - } - - // Need to wait for metadata to load before ever issuing a pause. The metadata handler will call this function if needed, when ready. - if(myStream != null && myStatus.metaDataReady) { // myStream is a null until the 1st media is loaded. ie., The 1st ever setMedia being followed by a pause() or pause(t). - myStream.pause(); - } - if(myStatus.isPlaying) { - myStatus.isPlaying = false; - myStatus.pausePosition = myStream.time * 1000; - } - - if(!isNaN(time) && myStatus.srcSet) { - myStatus.pausePosition = time; - } - - if(wasPlaying) { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PAUSE, myStatus)); - } - - if(myStatus.isStartingDownload) { - return true; - } else if(myStatus.loadRequired()) { - if(time > 0) { // We do not want the stop() command, which does pause(0), causing a load operation. - return load(); - } else { - return true; // Technically the pause(0) succeeded. ie., It did nothing, since nothing was required. - } - } else if(myStatus.isLoading || myStatus.isLoaded) { - if(myStatus.metaDataReady && myStatus.pausePosition > myStatus.duration) { // The time is invalid, ie., past the end. - myStatus.pausePosition = 0; - myStream.seek(0); - seekedEvent(); // Deals with seeking effect when using setMedia() then pause(huge). NB: There is no preceeding seeking event. - } else if(!isNaN(time)) { - if(getSeekTimeRatio() > getLoadRatio()) { // Use an estimate based on the downloaded amount - seeking(true); - } else { - if(myStatus.metaDataReady) { // Otherwise seek(0) will stop the metadata loading. - myStream.seek(myStatus.pausePosition/1000); - } - } - } - timeUpdates(false); - // Need to be careful with timeupdate event, otherwise a pause in a timeupdate event can cause a loop. - // Neither pause() nor pause(time) will cause a timeupdate loop. - if(wasPlaying || !isNaN(time) && !alreadyPausedAtTime) { - timeUpdateEvent(); - } - return true; - } else { - return false; - } - } - public function playHead(percent:Number):Boolean { - var time:Number = percent * getDuration() * getLoadRatio() / 100; - if(myStatus.isPlaying || myStatus.playOnLoad || myStatus.playOnSeek) { - return play(time); - } else { - return pause(time); - } - } - public function setVolume(v:Number):void { - myStatus.volume = v; - myTransform.volume = v; - if(myStream != null) { - myStream.soundTransform = myTransform; - } - } - private function updateStatusValues():void { - myStatus.seekPercent = 100 * getLoadRatio(); - myStatus.currentTime = getCurrentTime(); - myStatus.currentPercentRelative = 100 * getCurrentRatioRel(); - myStatus.currentPercentAbsolute = 100 * getCurrentRatioAbs(); - myStatus.duration = getDuration(); - } - public function getLoadRatio():Number { - if((myStatus.isLoading || myStatus.isLoaded) && myStream.bytesTotal > 0) { - return myStream.bytesLoaded / myStream.bytesTotal; - } else { - return 0; - } - } - public function getDuration():Number { - return myStatus.duration; // Set from meta data. - } - public function getCurrentTime():Number { - if(myStatus.isPlaying) { - return myStream.time * 1000; - } else { - return myStatus.pausePosition; - } - } - public function getCurrentRatioRel():Number { - if((getLoadRatio() > 0) && (getCurrentRatioAbs() <= getLoadRatio())) { - return getCurrentRatioAbs() / getLoadRatio(); - } else { - return 0; - } - } - public function getCurrentRatioAbs():Number { - if(getDuration() > 0) { - return getCurrentTime() / getDuration(); - } else { - return 0; - } - } - public function getSeekTimeRatio():Number { - if(getDuration() > 0) { - return myStatus.pausePosition / getDuration(); - } else { - return 1; - } - } - public function onMetaDataHandler(info:Object):void { // Used in connectStream() in myStream.client object. - // This event occurs when jumping to the start of static files! ie., seek(0) will cause this event to occur. - if(!myStatus.metaDataReady) { - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "onMetaDataHandler: " + info.duration + " | " + info.width + "x" + info.height)); - - myStatus.metaDataReady = true; // Set flag so that this event only effects jPlayer the 1st time. - myStatus.metaData = info; - myStatus.duration = info.duration * 1000; // Only available via Meta Data. - if(info.width != undefined) { - myVideo.width = myStatus.videoWidth = info.width; - } - if(info.height != undefined) { - myVideo.height = myStatus.videoHeight = info.height; - } - - if(myStatus.playOnLoad) { - myStatus.playOnLoad = false; // Capture the flag - if(myStatus.pausePosition > 0 ) { // Important for setMedia followed by play(time). - play(myStatus.pausePosition); - } else { - play(); // Not always sending pausePosition avoids the extra seek(0) for a normal play() command. - } - } else { - pause(myStatus.pausePosition); // Always send the pausePosition. Important for setMedia() followed by pause(time). Deals with not reading stream.time with setMedia() and play() immediately followed by stop() or pause(0) - } - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_LOADEDMETADATA, myStatus)); - } else { - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG, myStatus, "onMetaDataHandler: Already read (NO EFFECT)")); - } - } - } -} diff --git a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerRtmp.as b/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerRtmp.as deleted file mode 100644 index aae8a4d..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerRtmp.as +++ /dev/null @@ -1,983 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2013 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Robert M. Hall - * Date: 29th January 2013 - * Based on JplayerMp4.as with modifications for rtmp - */ - -package happyworm.jPlayer -{ - import flash.display.Sprite; - - import flash.media.Video; - import flash.media.SoundTransform; - - import flash.net.NetConnection; - import flash.net.NetStream; - import flash.net.Responder; - - import flash.utils.Timer; - import flash.utils.getTimer; - - import flash.events.NetStatusEvent; - import flash.events.SecurityErrorEvent; - import flash.events.TimerEvent; - import flash.events.ErrorEvent; - import flash.events.UncaughtErrorEvent; - import flash.utils.clearInterval; - import flash.utils.setInterval; - import happyworm.jPlayer.ConnectManager; - - public class JplayerRtmp extends Sprite - { - - public var myVideo:Video = new Video; - private var myConnection:NetConnection; - private var myStream:NetStream; - - public var responder:Responder; - - private var streamName:String; - - private var connectString:Object; - - private var firstTime:Boolean = true; - - private var myTransform:SoundTransform = new SoundTransform ; - - public var myStatus:JplayerStatus = new JplayerStatus ; - - private var ConnMgr:ConnectManager=new ConnectManager(); - - private var timeUpdateTimer:Timer = new Timer(250,0);// Matched to HTML event freq - private var progressTimer:Timer = new Timer(250,0);// Matched to HTML event freq - private var seekingTimer:Timer = new Timer(100,0);// Internal: How often seeking is checked to see if it is over. - - private var startBuffer:Number = 3; - private var maxBuffer:Number = 12; - - public function JplayerRtmp(volume:Number) - { - myConnection = new NetConnection ; - myConnection.client = this; - - - // Moved the netconnection negotiation into the ConnectManager.as class - not needed for initial connection - // may need to add eventHandler back in for errors only or just dispatch from the ConnectManager..revisit... - - // myConnection.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); - // myConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHandler); - myVideo.smoothing = true; - this.addChild(myVideo); - - timeUpdateTimer.addEventListener(TimerEvent.TIMER,timeUpdateHandler); - progressTimer.addEventListener(TimerEvent.TIMER,progressHandler); - seekingTimer.addEventListener(TimerEvent.TIMER,seekingHandler); - - myStatus.volume = volume; - - addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler); - - - } - - - - private function uncaughtErrorHandler(event:UncaughtErrorEvent):void - { - trace("UNCAUGHT ERROR - try loading again"); - - if (event.error is Error) - { - var error:Error = event.error as Error; - trace(error); - // do something with the error - } - else if (event.error is ErrorEvent) - { - var errorEvent:ErrorEvent = event.error as ErrorEvent; - // do something with the error - trace(errorEvent); - } - else - { - // a non-Error, non-ErrorEvent type was thrown and uncaught - } - load(); - } - - - - private function progressUpdates(active:Boolean):void - { - if (active) - { - progressTimer.start(); - } - else - { - progressTimer.stop(); - } - } - - private function progressHandler(e:TimerEvent):void - { - if (myStatus.isLoading) - { - if ((getLoadRatio() == 1)) - {// Close as can get to a loadComplete event since client.onPlayStatus only works with FMS - this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"progressHandler: loadComplete")); - myStatus.loaded(); - progressUpdates(false); - } - } - progressEvent(); - } - - private function progressEvent():void - { - // temporarily disabled progress event dispatching - not really needed for rtmp - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"progressEvent:")); - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PROGRESS,myStatus)); - } - - private function timeUpdates(active:Boolean):void - { - if (active) - { - timeUpdateTimer.start(); - } - else - { - timeUpdateTimer.stop(); - } - } - - private function timeUpdateHandler(e:TimerEvent):void - { - timeUpdateEvent(); - } - - private function timeUpdateEvent():void - { - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_TIMEUPDATE,myStatus)); - } - private function seeking(active:Boolean):void - { - if (active) - { - if (! myStatus.isSeeking) - { - seekingEvent(); - } - seekingTimer.start(); - } - else - { - if (myStatus.isSeeking) - { - seekedEvent(); - } - seekingTimer.stop(); - } - } - private function seekingHandler(e:TimerEvent):void - { - if ((getSeekTimeRatio() <= getLoadRatio())) - { - seeking(false); - if (myStatus.playOnSeek) - { - myStatus.playOnSeek = false;// Capture the flag. - play(myStatus.pausePosition);// Must pass time or the seek time is never set. - } - else - { - pause(myStatus.pausePosition);// Must pass time or the stream.time is read. - } - } - else if (myStatus.metaDataReady && myStatus.pausePosition > myStatus.duration) - { - // Illegal seek time - seeking(false); - pause(0); - } - } - private function seekingEvent():void - { - myStatus.isSeeking = true; - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_SEEKING,myStatus)); - } - private function seekedEvent():void - { - myStatus.isSeeking = false; - updateStatusValues(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_SEEKED,myStatus)); - } - - - private function netStatusHandler(e:NetStatusEvent):void - { - trace(("netStatusHandler: " + e.info.code)); - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"netStatusHandler: '" + e.info.code + "'")); - //trace("BEFORE: bufferTime: "+myStream.bufferTime+" - bufferTimeMax: "+myStream.bufferTimeMax); - switch (e.info.code) - { - case "NetConnection.Connect.Success" : - // connectStream(); // This method did not do anything sensible anyway. - // Do not think this case occurs. This was for the static file connection. - // Which now seems to be handled by the Connection Manager. - break; - case "NetStream.Buffer.Full": - if(connectString.streamTYPE == "LIVE") { - myStream.bufferTime = startBuffer; - } else { - myStream.bufferTime = maxBuffer; - } - break; - case "NetStream.Buffer.Flush": - myStream.bufferTime = startBuffer; - break; - case "NetStream.Buffer.Empty": - myStream.bufferTime = startBuffer; - break; - case "NetStream.Seek.Notify": - myStream.bufferTime = startBuffer; - break; - case "NetStream.Play.Start" : - - if (firstTime) { - firstTime = false; // Capture flag - - myStatus.loading(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_LOADSTART,myStatus)); - - // NB: With MP4 player both audio and video types get connected to myVideo. - // NB: Had believed it was important for the audio too, otherwise what plays it? - if(videoBinding) { - myVideo.attachNetStream(myStream); - } - - setVolume(myStatus.volume); - - // Really the progress event just needs to be generated once, and should probably happen before now. - progressUpdates(true); - - // This is an ASSUMPTION! Made it so that the default GUI worked. - // Hence why this part should be refactored. - // Lots of commands sequences after setMedia would be corrupted by this assumption. - // Bascally, we assume that after a setMedia, you will play it. - // Doing setMedia and pause(15) cause the flag to be set incorrectly and the GUI locks up. - myStatus.isPlaying = true; // Should be handled elsewhere. - } - - // Under RTMP, this event code occurs every time the media starts playing and when a new position is seeked to, even when paused. - - // Since under RTMP the event behaviour is quite different, believe a refactor is best here. - // ie., Under RTMP we should be able to know a lot more info about the stream. - - // See onMetaDataHandler() for other condition, since duration is vital. - // See onResult() response handler too. - // Appears to be some duplication between onMetaDataHandler() and onResult(), along with a race between them occuring. - - break; - case "NetStream.Play.UnpublishNotify": - myStream.bufferTime = startBuffer; // was 3 - case "NetStream.Play.Stop" : - myStream.bufferTime = startBuffer; // was 3 - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"NetStream.Play.Stop: getDuration() - getCurrentTime() = " + (getDuration() - getCurrentTime()))); - - // Check if media is at the end (or close) otherwise this was due to download bandwidth stopping playback. ie., Download is not fast enough. - if (Math.abs((getDuration() - getCurrentTime())) < 150) - {// Testing found 150ms worked best for M4A files, where playHead(99.9) caused a stuck state due to firing with ~116ms left to play. - //endedEvent(); - } - break; - case "NetStream.Seek.InvalidTime" : - // Used for capturing invalid set times and clicks on the end of the progress bar. - endedEvent(); - break; - case "NetStream.Play.StreamNotFound" : - myStatus.error(); - // Resets status except the src, and it sets srcError property.; - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_ERROR,myStatus)); - break; - } - //trace("AFTER: bufferTime: "+myStream.bufferTime+" - bufferTimeMax: "+myStream.bufferTimeMax); - // "NetStream.Seek.Notify" event code is not very useful. It occurs after every seek(t) command issued and does not appear to wait for the media to be ready. - } - private function endedEvent():void - { - trace("ENDED STREAM EVENT"); - var wasPlaying:Boolean = myStatus.isPlaying; - - // timeUpdates(false); - // timeUpdateEvent(); - pause(0); - - if (wasPlaying) - { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_ENDED,myStatus)); - } - } - private function securityErrorHandler(event:SecurityErrorEvent):void - { - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"securityErrorHandler.")); - } - public function connectStream():void - { - trace("CONNECTING"); - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"connectStream.")); - //this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_CANPLAY,myStatus)); - - timeUpdates(true); - progressUpdates(true); - //myVideo.attachNetStream(myStream); - //setVolume(myStatus.volume); - } - - private function onResult(result:Object):void - { - trace("OnResult EVENT FIRED!"); - myStatus.duration = parseFloat(result.toString()) * 1000; - trace((("The stream length is " + result) + " seconds")); - - if(!myConnection.connected) { - load(); - } else { - //this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_CANPLAY,myStatus,"Rockit!")); - - //myStatus.loaded(); - //myStatus.isPlaying=true; - if (! myStatus.metaDataReady) - { - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"onMetaDataHandler: " + myStatus.duration)); - - // Allow multiple onResult Handlers to affect size. As per PR #131 and #98. - // myStatus.metaDataReady = true; - - /*var info:Object = new Object(); - info.duration=myStatus.duration - info.width=undefined; - info.height=undefined; - myStatus.metaData = info; - */ - if (myStatus.playOnLoad) - { - myStatus.playOnLoad = false;// Capture the flag - if (myStatus.pausePosition > 0) - {// Important for setMedia followed by play(time). - play(myStatus.pausePosition); - } - else - { - play();// Not always sending pausePosition avoids the extra seek(0) for a normal play() command. - } - - } - else - { - pause(myStatus.pausePosition);// Always send the pausePosition. Important for setMedia() followed by pause(time). Deals with not reading stream.time with setMedia() and play() immediately followed by stop() or pause(0) - } - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_LOADEDMETADATA,myStatus)); - } - else - { - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"onMetaDataHandler: Already read (NO EFFECT)")); - } - - myStream.play(streamName); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PLAY,myStatus)); - // timeUpdates(false); - } - - } - - private var overRideConnect:Boolean=false; - public function doneYet():void { - if(!myConnection.connected) { - // try again - ConnMgr.stopAll(true); - overRideConnect=true; - trace("Connected: "+myConnection.connected+" - "+myStatus.loadRequired()); - load(); - } - } - - private var videoBinding:Boolean=false; - public function setFile(src:String,videoSupport:Boolean=false):void - { - // videoSupport turns on/off video - by default no video, audio only - videoBinding=videoSupport; - /* Dont close the stream or netconnection here anymore so we can recycle if host/appname are the same - if ((myStream != null)) - { - myStream.close(); - myConnection.close(); - } - */ - if(ConnMgr.getNegotiating() == true) { - //ConnMgr.stopAll(); - ConnMgr.setNegotiating(false); - } - - myVideo.clear(); - - progressUpdates(false); - timeUpdates(false); - - myStatus.reset(); - myStatus.src = src; - myStatus.srcSet = true; - - firstTime = true; - - //myStatus.loaded(); - - if(src != "") { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_CANPLAY,myStatus)); - } - - //timeUpdateEvent(); - } - - public function shutDownNcNs():void { - trace("Connections Closed"); - timeUpdates(false); - progressUpdates(false); - myStream.close(); - myConnection.close(); - - myStatus.reset(); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_ENDED,myStatus)); - } - - public function clearFile():void - { - if (myStream != null) - { - myStream.close(); - // Dont close the netConnection here any longer, as we may recycle it later - // may need an extra way to close manually if switching media types after an rtmp session - revisit - // myConnection.close(); - myStatus.reset(); - } - setFile(""); - myStatus.srcSet = false; - } - - public function parseRTMPsrcConnect(rtmpSrc:String):Object - { - // rtmp://cp76372.live.edgefcs.net/live/Flash1Office@60204 - var appName:String = ""; - var streamFileName:String = ""; - var startIndex:uint = 2 + rtmpSrc.indexOf("//"); - var streamTYPE:String = "recorded"; - var host:String = rtmpSrc.substr(startIndex); - var port:String = ""; - host = host.substr(0,host.indexOf("/")); - var endHost:Number = startIndex + host.length + 1; - - // See if there is a host port specified - if(host.indexOf(":") != -1) { - port = host.substr(host.indexOf(":")+1); - host = host.substr(0,host.indexOf(":")); - } - - // Akamai specific live streams - if (rtmpSrc.lastIndexOf("/live/") != -1) - { - trace("LIVE!"); - - - appName = rtmpSrc.substring(endHost,rtmpSrc.lastIndexOf("/live/") + 6); - streamFileName = rtmpSrc.substr(rtmpSrc.lastIndexOf("/live/") + 6); - streamTYPE="LIVE"; - } else { - streamTYPE="RECORDED"; - - } - - // Mp3 streams with standard appname/no instance name, mp3: prefix - if (rtmpSrc.indexOf(".mp3") != -1) - { - appName = rtmpSrc.substring(endHost,rtmpSrc.indexOf("mp3:")); - streamFileName = rtmpSrc.substr(rtmpSrc.indexOf("mp3:")); - streamFileName = streamFileName.substr(0,streamFileName.length - 4); - } - // rtmp://cp83813.edgefcs.net/ondemand/rob_hall/bruce_campbell_oldspice.flv - - // Mp4 streams with standard appname/no instance name, mp4: prefix - if (rtmpSrc.indexOf("mp4:") != -1) - { - appName = rtmpSrc.substring(endHost,rtmpSrc.indexOf("mp4:")); - streamFileName = rtmpSrc.substr(rtmpSrc.indexOf("mp4:")); - streamFileName = streamFileName.substr(0,streamFileName.length - 4); - } - - // .f4v streams with standard appname/no instance name, .flv extension - if (rtmpSrc.indexOf(".flv") != -1) - { - // allow use of ^ in rtmp string to indicate break point for an appname or instance name that - // contains a / in it where it would require multiple connection attempts or manual configuratiom - // of the appname/instancename - var endApp:Number=0; - if(rtmpSrc.indexOf("^") != -1) { - endApp=rtmpSrc.indexOf("^"); - rtmpSrc.replace("^", "/"); - } else { - endApp = rtmpSrc.indexOf("/",endHost); - } - appName = rtmpSrc.substring(endHost,endApp) + "/"; - streamFileName = rtmpSrc.substr(endApp+1); - } - - if(port=="") { - port="MULTI"; - } - //rtmp, rtmpt, rtmps, rtmpe, rtmpte - - - trace(("\n\n*** HOST: " + host)); - trace(("*** PORT: " + port)); - trace(("*** APPNAME: " + appName)); - trace(("*** StreamName: " + streamFileName)); - - var streamParts:Object = new Object; - streamParts.streamTYPE=streamTYPE; - streamParts.appName = appName; - streamParts.streamFileName = streamFileName; - streamParts.hostName = host; - streamName = streamFileName; - - return streamParts; - } - - public function load():Boolean - { - //trace("LOAD: "+myStatus.src); - if (myStatus.loadRequired() || overRideConnect==true) - { - overRideConnect=false; - myStatus.startingDownload(); - var lastAppName:String; - var lastHostName:String; - - try{ - // we do a try, as these properties might not exist yet - if(connectString.appName != "" && connectString.appName != undefined) { - trace("PREVIOUS APP/HOST INFO AVAILABLE"); - lastAppName = connectString.appName; - lastHostName = connectString.hostName; - trace("LAST: "+lastAppName,lastHostName); - } - } catch (error:Error) { - //trace("*** Caught an error condition: "+error); - } - - connectString = parseRTMPsrcConnect(myStatus.src); - - - - trace("**** LOAD :: CONNECT SOURCE: " +connectString.hostName +" "+ connectString.appName); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_WAITING, myStatus)); - - if((connectString.appName == lastAppName && connectString.hostName == lastHostName) && (myConnection.connected)) { - // recycle the netConnection - trace("RECYCLING NETCONNECTION"); - if ((myStream != null)) - { - myStream.close(); - } - connectStream(); - onBWDone(null,myConnection); - } else { - // myConnection.connect(connectString.appName); - trace("NEW NetConnection Negotiation"); - if ((myStream != null)) - { - myStream.close(); - myConnection.close(); - } - - ConnMgr.stopAll(true); - ConnMgr.negotiateConnect(this,connectString.hostName,connectString.appName); - } - - trace("**** LOAD2 :: CONNECT SOURCE: " +connectString.hostName +" "+ connectString.appName); - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_WAITING, myStatus)); - return true; - } - else - { - return false; - } - } - - - - public function onFCUnsubscribe(info:Object):void - { - trace(("onFCUnSubscribe worked" + info)); - } - - public function onFCSubscribe(info:Object):void - { - trace(("onFCSubscribe worked" + info)); - } - - public function onBWDone(info:Object,nc:NetConnection):void - { - if(nc.connected) { - myConnection=nc; - trace(((("onBWDone " + info) + " :: ") + myStatus.src)); - - var customClient:Object = new Object ; - customClient.onMetaData = onMetaDataHandler; - customClient.onPlayStatus = onPlayStatusHandler;// According to the forums and my tests, onPlayStatus only works with FMS (Flash Media Server). - - myStream = null; - myStream = new NetStream(myConnection); - myStream.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); - myStream.client = customClient; - if(connectString.streamTYPE == "LIVE") { - myStream.bufferTime = 3; // was 3 - myStream.bufferTimeMax = 24; - startBuffer = 3; - maxBuffer = 12; - - } else { - myStream.bufferTime = .2; // was 3 - myStream.bufferTimeMax = 0; - startBuffer = .2; - maxBuffer = 12; - } - - - //streamName=""; - //var connectString:Object = parseRTMPsrcConnect(myStatus.src); - //streamName=connectString.streamFileName; - - responder = new Responder(onResult); - myConnection.call("getStreamLength",responder,streamName); - } else { - connectStream(); - } - - trace("PLAY SOURCE: "+connectString); - - } - - public function play(time:Number = NaN):Boolean { - //trace("PLAY: "+time+" - isPlaying: "+myStatus.isPlaying +" - myStatus.isStartingDownload:"+myStatus.isStartingDownload); - var wasPlaying:Boolean = myStatus.isPlaying; - - if(!isNaN(time) && myStatus.srcSet) { - if(myStatus.isPlaying) { - myStream.pause(); - myStatus.isPlaying = false; - } - myStatus.pausePosition = time; - } - - if(myStatus.isStartingDownload) { - myStatus.playOnLoad = true; // Raise flag, captured in onMetaDataHandler() - return true; - } else if(myStatus.loadRequired()) { - myStatus.playOnLoad = true; // Raise flag, captured in onMetaDataHandler() - return load(); - } else if((myStatus.isLoading || myStatus.isLoaded) && !myStatus.isPlaying) { - if(myStatus.metaDataReady && myStatus.pausePosition > myStatus.duration && connectString.streamTYPE != "LIVE") { // The time is invalid, ie., past the end. - myStream.pause(); // Since it is playing by default at this point. - myStatus.pausePosition = 0; - trace("SEEKER!"); - myStream.seek(0); - timeUpdates(false); - timeUpdateEvent(); - if(wasPlaying) { // For when playing and then get a play(huge) - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PAUSE, myStatus)); - } - } else if(getSeekTimeRatio() > getLoadRatio()) { // Use an estimate based on the downloaded amount - myStatus.playOnSeek = true; - seeking(true); - trace("SEEKER PAUSE!"); - myStream.pause(); // Since it is playing by default at this point. - } else { - if(!isNaN(time)) { // Avoid using seek() when it is already correct. - trace("SEEKER3"); - myStream.seek(myStatus.pausePosition/1000); // Since time is in ms and seek() takes seconds - } - myStatus.isPlaying = true; // Set immediately before playing. Could affects events. - trace("SHOULD GET RESUME!"); - myStream.resume(); - timeUpdates(true); - if(!wasPlaying) { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PLAY, myStatus)); - } - } - return true; - } else { - return false; - } - } - - public function pause(time:Number=NaN):Boolean - { - //trace("PAUSE: "+time); - myStatus.playOnLoad = false;// Reset flag in case load/play issued immediately before this command, ie., before onMetadata() event. - myStatus.playOnSeek = false;// Reset flag in case play(time) issued before the command and is still seeking to time set. - - var wasPlaying:Boolean = myStatus.isPlaying; - - - // To avoid possible loops with timeupdate and pause(time). A pause() does not have the problem. - var alreadyPausedAtTime:Boolean = false; - if(!isNaN(time) && myStatus.pausePosition == time) { - alreadyPausedAtTime = true; - } - - trace("!isNaN: "+!isNaN(time) +" isNaN: "+isNaN(time)); - - // Need to wait for metadata to load before ever issuing a pause. The metadata handler will call this function if needed, when ready. - if (((myStream != null) && myStatus.metaDataReady)) - {// myStream is a null until the 1st media is loaded. ie., The 1st ever setMedia being followed by a pause() or pause(t). - - if(connectString.streamTYPE == "LIVE") { - trace("PAUSING LIVE"); - myStream.play(false) - } else { - trace("PAUSING RECORDED"); - myStream.pause(); - } - } - if (myStatus.isPlaying) - { - myStatus.isPlaying = false; - myStatus.pausePosition = myStream.time * 1000; - } - - if (! isNaN(time) && myStatus.srcSet) - { - myStatus.pausePosition = time; - } - - if (wasPlaying) - { - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_PAUSE,myStatus)); - } - - if (myStatus.isStartingDownload) - { - return true; - } - else if (myStatus.loadRequired()) - { - if ((time > 0)) - {// We do not want the stop() command, which does pause(0), causing a load operation. - return load(); - } - else - { - return true;// Technically the pause(0) succeeded. ie., It did nothing, since nothing was required. - } - } - else if (myStatus.isLoading || myStatus.isLoaded) - { - if (myStatus.metaDataReady && myStatus.pausePosition > myStatus.duration && connectString.streamTYPE != "LIVE" ) - {// The time is invalid, ie., past the end. - myStatus.pausePosition = 0; - - trace("GOT HERE!"); - myStream.seek(0); - seekedEvent();// Deals with seeking effect when using setMedia() then pause(huge). NB: There is no preceeding seeking event. - } - else if (! isNaN(time)) - { - if ((getSeekTimeRatio() > getLoadRatio())) - {// Use an estimate based on the downloaded amount - seeking(true); - } - else - { - if (myStatus.metaDataReady && connectString.streamTYPE != "LIVE") - {// Otherwise seek(0) will stop the metadata loading. - trace("GOT HERE TOO!"); - myStream.seek(myStatus.pausePosition / 1000); - } - } - } - timeUpdates(false); - // Need to be careful with timeupdate event, otherwise a pause in a timeupdate event can cause a loop. - // Neither pause() nor pause(time) will cause a timeupdate loop. - if(wasPlaying || !isNaN(time) && !alreadyPausedAtTime) { - timeUpdateEvent(); - } - return true; - } - else - { - return false; - } - } - public function playHead(percent:Number):Boolean - { - var time:Number = percent * getDuration() * getLoadRatio() / 100; - if (myStatus.isPlaying || myStatus.playOnLoad || myStatus.playOnSeek) - { - return play(time); - } - else - { - return pause(time); - } - } - public function setVolume(v:Number):void - { - myStatus.volume = v; - myTransform.volume = v; - if ((myStream != null)) - { - myStream.soundTransform = myTransform; - } - } - private function updateStatusValues():void - { - //myStatus.seekPercent = 100 * getLoadRatio(); - myStatus.seekPercent = 100; - myStatus.currentTime = getCurrentTime(); - myStatus.currentPercentRelative = 100 * getCurrentRatioRel(); - myStatus.currentPercentAbsolute = 100 * getCurrentRatioAbs(); - myStatus.duration = getDuration(); - } - public function getLoadRatio():Number - { - return 1; - /*trace("LoadRatio:"+myStream.bytesLoaded, myStream.bytesTotal); - if((myStatus.isLoading || myStatus.isLoaded) && myStream.bytesTotal > 0) { - - return myStream.bytesLoaded / myStream.bytesTotal; - } else { - return 0; - } - */ - - } - public function getDuration():Number - { - return myStatus.duration;// Set from meta data. - } - public function getCurrentTime():Number - { - if (myStatus.isPlaying) - { - //trace(myStream.time * 1000); - return myStream.time * 1000; // was +1000 - } - else - { - return myStatus.pausePosition; - } - } - public function getCurrentRatioRel():Number - { - - if ((getCurrentRatioAbs() <= getLoadRatio())) - { - //if((getLoadRatio() > 0) && (getCurrentRatioAbs() <= getLoadRatio())) { - return getCurrentRatioAbs() / getLoadRatio(); - } - else - { - return 0; - } - } - public function getCurrentRatioAbs():Number - { - if ((getDuration() > 0)) - { - return getCurrentTime() / getDuration(); - } - else - { - return 0; - } - } - public function getSeekTimeRatio():Number - { - if ((getDuration() > 0)) - { - return myStatus.pausePosition / getDuration(); - } - else - { - return 1; - } - } - public function onPlayStatusHandler(infoObject:Object):void - { - trace((("OnPlayStatusHandler called: (" + getTimer()) + " ms)")); - for (var prop:* in infoObject) - { - trace(((("\t" + prop) + ":\t") + infoObject[prop])); - } - if (infoObject.code == "NetStream.Play.Complete") - { - endedEvent(); - } - } - - public function onMetaDataHandler(info:Object):void - {// Used in connectStream() in myStream.client object. - // This event occurs when jumping to the start of static files! ie., seek(0) will cause this event to occur. - - if (! myStatus.metaDataReady) - { - trace("\n\n*** METADATA FIRED! ***\n\n"); - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"onMetaDataHandler: " + info.duration + " | " + info.width + "x" + info.height)); - - myStatus.metaDataReady = true;// Set flag so that this event only effects jPlayer the 1st time. - myStatus.metaData = info; - myStatus.duration = info.duration * 1000;// Only available via Meta Data. - if (info.width != undefined) - { - myVideo.width = myStatus.videoWidth = info.width; - } - if (info.height != undefined) - { - myVideo.height = myStatus.videoHeight = info.height; - } - - if (myStatus.playOnLoad) - { - myStatus.playOnLoad = false;// Capture the flag - if (myStatus.pausePosition > 0) - {// Important for setMedia followed by play(time). - play(myStatus.pausePosition); - } - else - { - play();// Not always sending pausePosition avoids the extra seek(0) for a normal play() command. - } - } - else - { - pause(myStatus.pausePosition);// Always send the pausePosition. Important for setMedia() followed by pause(time). Deals with not reading stream.time with setMedia() and play() immediately followed by stop() or pause(0) - } - this.dispatchEvent(new JplayerEvent(JplayerEvent.JPLAYER_LOADEDMETADATA,myStatus)); - } - else - { - //this.dispatchEvent(new JplayerEvent(JplayerEvent.DEBUG_MSG,myStatus,"onMetaDataHandler: Already read (NO EFFECT)")); - } - } -} -} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerStatus.as b/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerStatus.as deleted file mode 100644 index da9f5ca..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/JplayerStatus.as +++ /dev/null @@ -1,110 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2013 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Date: 5th June 2013 - */ - -package happyworm.jPlayer { - public class JplayerStatus { - - public static const VERSION:String = "2.4.0"; // The version of the Flash jPlayer entity. - - public var volume:Number = 0.5; // Not affected by reset() - public var muted:Boolean = false; // Not affected by reset() - - public var src:String; - public var srcError:Boolean; - - public var srcSet:Boolean; - public var isPlaying:Boolean; - public var isSeeking:Boolean; - - public var isWaiting:Boolean; - - public var playOnLoad:Boolean; - public var playOnSeek:Boolean; - - public var isStartingDownload:Boolean; - public var isLoading:Boolean; - public var isLoaded:Boolean; - - public var pausePosition:Number; - - public var seekPercent:Number; - public var currentTime:Number; - public var currentPercentRelative:Number; - public var currentPercentAbsolute:Number; - public var duration:Number; - - public var videoWidth:Number; - public var videoHeight:Number; - - public var metaDataReady:Boolean; - public var metaData:Object; - - public function JplayerStatus() { - reset(); - } - public function reset():void { - src = ""; - srcError = false; - - srcSet = false; - isPlaying = false; - isSeeking = false; - - isWaiting = false; - - playOnLoad = false; - playOnSeek = false; - - isStartingDownload = false; - isLoading = false; - isLoaded = false; - - pausePosition = 0; - - seekPercent = 0; - currentTime = 0; - currentPercentRelative = 0; - currentPercentAbsolute = 0; - duration = 0; - - videoWidth = 0; - videoHeight = 0; - - metaDataReady = false; - metaData = {}; - } - public function error():void { - var srcSaved:String = src; - reset(); - src = srcSaved; - srcError = true; - } - public function loadRequired():Boolean { - return (srcSet && !isStartingDownload && !isLoading && !isLoaded); - } - public function startingDownload():void { - isStartingDownload = true; - isLoading = false; - isLoaded = false; - } - public function loading():void { - isStartingDownload = false; - isLoading = true; - isLoaded = false; - } - public function loaded():void { - isStartingDownload = false; - isLoading = false; - isLoaded = true; - } - } -} diff --git a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/TraceOut.as b/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/TraceOut.as deleted file mode 100644 index 75be070..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/actionscript/happyworm/jPlayer/TraceOut.as +++ /dev/null @@ -1,62 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2013 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Robert M. Hall - * Date: 7th August 2012 - */ - -package happyworm.jPlayer -{ - import flash.net.LocalConnection; - import flash.events.StatusEvent; - import flash.system.Capabilities; - import flash.utils.getTimer; - - public class TraceOut - { - - private var outgoing_lc:LocalConnection = new LocalConnection (); - private var firstEvent:Boolean = true; - private var _localAIRDebug:Boolean = false; - - public function TraceOut() - { - outgoing_lc.addEventListener(StatusEvent.STATUS, lcListener); - outgoing_lc.send("_log_output","startLogging",""); - } - - private function lcListener(event:StatusEvent):void - { - // Must have this listener to avoid errors - if (event.level == "error") - { - _localAIRDebug = false; - } - else if(event.level =="status" && firstEvent==true) - { - firstEvent = false; - tracer("<< Successful Connection To Event Logger >>"); - tracer("DEBUG INFO: \n<"+Capabilities.serverString + ">\nFlash Player Version: " + Capabilities.version + "\n"); - _localAIRDebug = true; - } - } - - public function localAIRDebug():Boolean - { - return _localAIRDebug; - } - - public function tracer(msg:String):void - { - trace(msg); - var outMsg:String = "[" + getTimer() + "ms] " + msg; - outgoing_lc.send("_log_output","displayMsg",outMsg); - - } - } -} diff --git a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jplayer.playlist.js b/libraries/filemanager-9.12.1/js/jPlayer/add-on/jplayer.playlist.js deleted file mode 100644 index 725caf0..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jplayer.playlist.js +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Playlist Object for the jPlayer Plugin - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2014 Happyworm Ltd - * Licensed under the MIT license. - * http://www.opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Version: 2.4.1 - * Date: 19th November 2014 - * - * Requires: - * - jQuery 1.7.0+ - * - jPlayer 2.8.2+ - */ - -/*global jPlayerPlaylist:true */ - -(function($, undefined) { - - jPlayerPlaylist = function(cssSelector, playlist, options) { - var self = this; - - this.current = 0; - this.loop = false; // Flag used with the jPlayer repeat event - this.shuffled = false; - this.removing = false; // Flag is true during remove animation, disabling the remove() method until complete. - - this.cssSelector = $.extend({}, this._cssSelector, cssSelector); // Object: Containing the css selectors for jPlayer and its cssSelectorAncestor - this.options = $.extend(true, { - keyBindings: { - next: { - key: 221, // ] - fn: function() { - self.next(); - } - }, - previous: { - key: 219, // [ - fn: function() { - self.previous(); - } - }, - shuffle: { - key: 83, // s - fn: function() { - self.shuffle(); - } - } - }, - stateClass: { - shuffled: "jp-state-shuffled" - } - }, this._options, options); // Object: The jPlayer constructor options for this playlist and the playlist options - - this.playlist = []; // Array of Objects: The current playlist displayed (Un-shuffled or Shuffled) - this.original = []; // Array of Objects: The original playlist - - this._initPlaylist(playlist); // Copies playlist to this.original. Then mirrors this.original to this.playlist. Creating two arrays, where the element pointers match. (Enables pointer comparison.) - - // Setup the css selectors for the extra interface items used by the playlist. - this.cssSelector.details = this.cssSelector.cssSelectorAncestor + " .jp-details"; // Note that jPlayer controls the text in the title element. - this.cssSelector.playlist = this.cssSelector.cssSelectorAncestor + " .jp-playlist"; - this.cssSelector.next = this.cssSelector.cssSelectorAncestor + " .jp-next"; - this.cssSelector.previous = this.cssSelector.cssSelectorAncestor + " .jp-previous"; - this.cssSelector.shuffle = this.cssSelector.cssSelectorAncestor + " .jp-shuffle"; - this.cssSelector.shuffleOff = this.cssSelector.cssSelectorAncestor + " .jp-shuffle-off"; - - // Override the cssSelectorAncestor given in options - this.options.cssSelectorAncestor = this.cssSelector.cssSelectorAncestor; - - // Override the default repeat event handler - this.options.repeat = function(event) { - self.loop = event.jPlayer.options.loop; - }; - - // Create a ready event handler to initialize the playlist - $(this.cssSelector.jPlayer).bind($.jPlayer.event.ready, function() { - self._init(); - }); - - // Create an ended event handler to move to the next item - $(this.cssSelector.jPlayer).bind($.jPlayer.event.ended, function() { - self.next(); - }); - - // Create a play event handler to pause other instances - $(this.cssSelector.jPlayer).bind($.jPlayer.event.play, function() { - $(this).jPlayer("pauseOthers"); - }); - - // Create a resize event handler to show the title in full screen mode. - $(this.cssSelector.jPlayer).bind($.jPlayer.event.resize, function(event) { - if(event.jPlayer.options.fullScreen) { - $(self.cssSelector.details).show(); - } else { - $(self.cssSelector.details).hide(); - } - }); - - // Create click handlers for the extra buttons that do playlist functions. - $(this.cssSelector.previous).click(function(e) { - e.preventDefault(); - self.previous(); - self.blur(this); - }); - - $(this.cssSelector.next).click(function(e) { - e.preventDefault(); - self.next(); - self.blur(this); - }); - - $(this.cssSelector.shuffle).click(function(e) { - e.preventDefault(); - if(self.shuffled && $(self.cssSelector.jPlayer).jPlayer("option", "useStateClassSkin")) { - self.shuffle(false); - } else { - self.shuffle(true); - } - self.blur(this); - }); - $(this.cssSelector.shuffleOff).click(function(e) { - e.preventDefault(); - self.shuffle(false); - self.blur(this); - }).hide(); - - // Put the title in its initial display state - if(!this.options.fullScreen) { - $(this.cssSelector.details).hide(); - } - - // Remove the empty
  • from the page HTML. Allows page to be valid HTML, while not interfereing with display animations - $(this.cssSelector.playlist + " ul").empty(); - - // Create .on() handlers for the playlist items along with the free media and remove controls. - this._createItemHandlers(); - - // Instance jPlayer - $(this.cssSelector.jPlayer).jPlayer(this.options); - }; - - jPlayerPlaylist.prototype = { - _cssSelector: { // static object, instanced in constructor - jPlayer: "#jquery_jplayer_1", - cssSelectorAncestor: "#jp_container_1" - }, - _options: { // static object, instanced in constructor - playlistOptions: { - autoPlay: false, - loopOnPrevious: false, - shuffleOnLoop: true, - enableRemoveControls: false, - displayTime: 'slow', - addTime: 'fast', - removeTime: 'fast', - shuffleTime: 'slow', - itemClass: "jp-playlist-item", - freeGroupClass: "jp-free-media", - freeItemClass: "jp-playlist-item-free", - removeItemClass: "jp-playlist-item-remove" - } - }, - option: function(option, value) { // For changing playlist options only - if(value === undefined) { - return this.options.playlistOptions[option]; - } - - this.options.playlistOptions[option] = value; - - switch(option) { - case "enableRemoveControls": - this._updateControls(); - break; - case "itemClass": - case "freeGroupClass": - case "freeItemClass": - case "removeItemClass": - this._refresh(true); // Instant - this._createItemHandlers(); - break; - } - return this; - }, - _init: function() { - var self = this; - this._refresh(function() { - if(self.options.playlistOptions.autoPlay) { - self.play(self.current); - } else { - self.select(self.current); - } - }); - }, - _initPlaylist: function(playlist) { - this.current = 0; - this.shuffled = false; - this.removing = false; - this.original = $.extend(true, [], playlist); // Copy the Array of Objects - this._originalPlaylist(); - }, - _originalPlaylist: function() { - var self = this; - this.playlist = []; - // Make both arrays point to the same object elements. Gives us 2 different arrays, each pointing to the same actual object. ie., Not copies of the object. - $.each(this.original, function(i) { - self.playlist[i] = self.original[i]; - }); - }, - _refresh: function(instant) { - /* instant: Can be undefined, true or a function. - * undefined -> use animation timings - * true -> no animation - * function -> use animation timings and excute function at half way point. - */ - var self = this; - - if(instant && !$.isFunction(instant)) { - $(this.cssSelector.playlist + " ul").empty(); - $.each(this.playlist, function(i) { - $(self.cssSelector.playlist + " ul").append(self._createListItem(self.playlist[i])); - }); - this._updateControls(); - } else { - var displayTime = $(this.cssSelector.playlist + " ul").children().length ? this.options.playlistOptions.displayTime : 0; - - $(this.cssSelector.playlist + " ul").slideUp(displayTime, function() { - var $this = $(this); - $(this).empty(); - - $.each(self.playlist, function(i) { - $this.append(self._createListItem(self.playlist[i])); - }); - self._updateControls(); - if($.isFunction(instant)) { - instant(); - } - if(self.playlist.length) { - $(this).slideDown(self.options.playlistOptions.displayTime); - } else { - $(this).show(); - } - }); - } - }, - _createListItem: function(media) { - var self = this; - - // Wrap the
  • contents in a
    - var listItem = "
  • "; - - // Create remove control - listItem += "×"; - - // Create links to free media - if(media.free) { - var first = true; - listItem += "("; - $.each(media, function(property,value) { - if($.jPlayer.prototype.format[property]) { // Check property is a media format. - if(first) { - first = false; - } else { - listItem += " | "; - } - listItem += "" + property + ""; - } - }); - listItem += ")"; - } - - // The title is given next in the HTML otherwise the float:right on the free media corrupts in IE6/7 - listItem += "" + media.title + (media.artist ? " " : "") + ""; - listItem += "
  • "; - - return listItem; - }, - _createItemHandlers: function() { - var self = this; - // Create live handlers for the playlist items - $(this.cssSelector.playlist).off("click", "a." + this.options.playlistOptions.itemClass).on("click", "a." + this.options.playlistOptions.itemClass, function(e) { - e.preventDefault(); - var index = $(this).parent().parent().index(); - if(self.current !== index) { - self.play(index); - } else { - $(self.cssSelector.jPlayer).jPlayer("play"); - } - self.blur(this); - }); - - // Create live handlers that disable free media links to force access via right click - $(this.cssSelector.playlist).off("click", "a." + this.options.playlistOptions.freeItemClass).on("click", "a." + this.options.playlistOptions.freeItemClass, function(e) { - e.preventDefault(); - $(this).parent().parent().find("." + self.options.playlistOptions.itemClass).click(); - self.blur(this); - }); - - // Create live handlers for the remove controls - $(this.cssSelector.playlist).off("click", "a." + this.options.playlistOptions.removeItemClass).on("click", "a." + this.options.playlistOptions.removeItemClass, function(e) { - e.preventDefault(); - var index = $(this).parent().parent().index(); - self.remove(index); - self.blur(this); - }); - }, - _updateControls: function() { - if(this.options.playlistOptions.enableRemoveControls) { - $(this.cssSelector.playlist + " ." + this.options.playlistOptions.removeItemClass).show(); - } else { - $(this.cssSelector.playlist + " ." + this.options.playlistOptions.removeItemClass).hide(); - } - - if(this.shuffled) { - $(this.cssSelector.jPlayer).jPlayer("addStateClass", "shuffled"); - } else { - $(this.cssSelector.jPlayer).jPlayer("removeStateClass", "shuffled"); - } - if($(this.cssSelector.shuffle).length && $(this.cssSelector.shuffleOff).length) { - if(this.shuffled) { - $(this.cssSelector.shuffleOff).show(); - $(this.cssSelector.shuffle).hide(); - } else { - $(this.cssSelector.shuffleOff).hide(); - $(this.cssSelector.shuffle).show(); - } - } - }, - _highlight: function(index) { - if(this.playlist.length && index !== undefined) { - $(this.cssSelector.playlist + " .jp-playlist-current").removeClass("jp-playlist-current"); - $(this.cssSelector.playlist + " li:nth-child(" + (index + 1) + ")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current"); - // $(this.cssSelector.details + " li").html("" + (this.playlist[index].artist ? " " : "")); - } - }, - setPlaylist: function(playlist) { - this._initPlaylist(playlist); - this._init(); - }, - add: function(media, playNow) { - $(this.cssSelector.playlist + " ul").append(this._createListItem(media)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime); - this._updateControls(); - this.original.push(media); - this.playlist.push(media); // Both array elements share the same object pointer. Comforms with _initPlaylist(p) system. - - if(playNow) { - this.play(this.playlist.length - 1); - } else { - if(this.original.length === 1) { - this.select(0); - } - } - }, - remove: function(index) { - var self = this; - - if(index === undefined) { - this._initPlaylist([]); - this._refresh(function() { - $(self.cssSelector.jPlayer).jPlayer("clearMedia"); - }); - return true; - } else { - - if(this.removing) { - return false; - } else { - index = (index < 0) ? self.original.length + index : index; // Negative index relates to end of array. - if(0 <= index && index < this.playlist.length) { - this.removing = true; - - $(this.cssSelector.playlist + " li:nth-child(" + (index + 1) + ")").slideUp(this.options.playlistOptions.removeTime, function() { - $(this).remove(); - - if(self.shuffled) { - var item = self.playlist[index]; - $.each(self.original, function(i) { - if(self.original[i] === item) { - self.original.splice(i, 1); - return false; // Exit $.each - } - }); - self.playlist.splice(index, 1); - } else { - self.original.splice(index, 1); - self.playlist.splice(index, 1); - } - - if(self.original.length) { - if(index === self.current) { - self.current = (index < self.original.length) ? self.current : self.original.length - 1; // To cope when last element being selected when it was removed - self.select(self.current); - } else if(index < self.current) { - self.current--; - } - } else { - $(self.cssSelector.jPlayer).jPlayer("clearMedia"); - self.current = 0; - self.shuffled = false; - self._updateControls(); - } - - self.removing = false; - }); - } - return true; - } - } - }, - select: function(index) { - index = (index < 0) ? this.original.length + index : index; // Negative index relates to end of array. - if(0 <= index && index < this.playlist.length) { - this.current = index; - this._highlight(index); - $(this.cssSelector.jPlayer).jPlayer("setMedia", this.playlist[this.current]); - } else { - this.current = 0; - } - }, - play: function(index) { - index = (index < 0) ? this.original.length + index : index; // Negative index relates to end of array. - if(0 <= index && index < this.playlist.length) { - if(this.playlist.length) { - this.select(index); - $(this.cssSelector.jPlayer).jPlayer("play"); - } - } else if(index === undefined) { - $(this.cssSelector.jPlayer).jPlayer("play"); - } - }, - pause: function() { - $(this.cssSelector.jPlayer).jPlayer("pause"); - }, - next: function() { - var index = (this.current + 1 < this.playlist.length) ? this.current + 1 : 0; - - if(this.loop) { - // See if we need to shuffle before looping to start, and only shuffle if more than 1 item. - if(index === 0 && this.shuffled && this.options.playlistOptions.shuffleOnLoop && this.playlist.length > 1) { - this.shuffle(true, true); // playNow - } else { - this.play(index); - } - } else { - // The index will be zero if it just looped round - if(index > 0) { - this.play(index); - } - } - }, - previous: function() { - var index = (this.current - 1 >= 0) ? this.current - 1 : this.playlist.length - 1; - - if(this.loop && this.options.playlistOptions.loopOnPrevious || index < this.playlist.length - 1) { - this.play(index); - } - }, - shuffle: function(shuffled, playNow) { - var self = this; - - if(shuffled === undefined) { - shuffled = !this.shuffled; - } - - if(shuffled || shuffled !== this.shuffled) { - - $(this.cssSelector.playlist + " ul").slideUp(this.options.playlistOptions.shuffleTime, function() { - self.shuffled = shuffled; - if(shuffled) { - self.playlist.sort(function() { - return 0.5 - Math.random(); - }); - } else { - self._originalPlaylist(); - } - self._refresh(true); // Instant - - if(playNow || !$(self.cssSelector.jPlayer).data("jPlayer").status.paused) { - self.play(0); - } else { - self.select(0); - } - - $(this).slideDown(self.options.playlistOptions.shuffleTime); - }); - } - }, - blur: function(that) { - if($(this.cssSelector.jPlayer).jPlayer("option", "autoBlur")) { - $(that).blur(); - } - } - }; -})(jQuery); diff --git a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jplayer.playlist.min.js b/libraries/filemanager-9.12.1/js/jPlayer/add-on/jplayer.playlist.min.js deleted file mode 100644 index 6a0e866..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jplayer.playlist.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jPlayerPlaylist for jPlayer 2.9.2 ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ -!function(a,b){jPlayerPlaylist=function(b,c,d){var e=this;this.current=0,this.loop=!1,this.shuffled=!1,this.removing=!1,this.cssSelector=a.extend({},this._cssSelector,b),this.options=a.extend(!0,{keyBindings:{next:{key:221,fn:function(){e.next()}},previous:{key:219,fn:function(){e.previous()}},shuffle:{key:83,fn:function(){e.shuffle()}}},stateClass:{shuffled:"jp-state-shuffled"}},this._options,d),this.playlist=[],this.original=[],this._initPlaylist(c),this.cssSelector.details=this.cssSelector.cssSelectorAncestor+" .jp-details",this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .jp-playlist",this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .jp-next",this.cssSelector.previous=this.cssSelector.cssSelectorAncestor+" .jp-previous",this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .jp-shuffle",this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .jp-shuffle-off",this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor,this.options.repeat=function(a){e.loop=a.jPlayer.options.loop},a(this.cssSelector.jPlayer).bind(a.jPlayer.event.ready,function(){e._init()}),a(this.cssSelector.jPlayer).bind(a.jPlayer.event.ended,function(){e.next()}),a(this.cssSelector.jPlayer).bind(a.jPlayer.event.play,function(){a(this).jPlayer("pauseOthers")}),a(this.cssSelector.jPlayer).bind(a.jPlayer.event.resize,function(b){b.jPlayer.options.fullScreen?a(e.cssSelector.details).show():a(e.cssSelector.details).hide()}),a(this.cssSelector.previous).click(function(a){a.preventDefault(),e.previous(),e.blur(this)}),a(this.cssSelector.next).click(function(a){a.preventDefault(),e.next(),e.blur(this)}),a(this.cssSelector.shuffle).click(function(b){b.preventDefault(),e.shuffle(e.shuffled&&a(e.cssSelector.jPlayer).jPlayer("option","useStateClassSkin")?!1:!0),e.blur(this)}),a(this.cssSelector.shuffleOff).click(function(a){a.preventDefault(),e.shuffle(!1),e.blur(this)}).hide(),this.options.fullScreen||a(this.cssSelector.details).hide(),a(this.cssSelector.playlist+" ul").empty(),this._createItemHandlers(),a(this.cssSelector.jPlayer).jPlayer(this.options)},jPlayerPlaylist.prototype={_cssSelector:{jPlayer:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_container_1"},_options:{playlistOptions:{autoPlay:!1,loopOnPrevious:!1,shuffleOnLoop:!0,enableRemoveControls:!1,displayTime:"slow",addTime:"fast",removeTime:"fast",shuffleTime:"slow",itemClass:"jp-playlist-item",freeGroupClass:"jp-free-media",freeItemClass:"jp-playlist-item-free",removeItemClass:"jp-playlist-item-remove"}},option:function(a,c){if(c===b)return this.options.playlistOptions[a];switch(this.options.playlistOptions[a]=c,a){case"enableRemoveControls":this._updateControls();break;case"itemClass":case"freeGroupClass":case"freeItemClass":case"removeItemClass":this._refresh(!0),this._createItemHandlers()}return this},_init:function(){var a=this;this._refresh(function(){a.options.playlistOptions.autoPlay?a.play(a.current):a.select(a.current)})},_initPlaylist:function(b){this.current=0,this.shuffled=!1,this.removing=!1,this.original=a.extend(!0,[],b),this._originalPlaylist()},_originalPlaylist:function(){var b=this;this.playlist=[],a.each(this.original,function(a){b.playlist[a]=b.original[a]})},_refresh:function(b){var c=this;if(b&&!a.isFunction(b))a(this.cssSelector.playlist+" ul").empty(),a.each(this.playlist,function(b){a(c.cssSelector.playlist+" ul").append(c._createListItem(c.playlist[b]))}),this._updateControls();else{var d=a(this.cssSelector.playlist+" ul").children().length?this.options.playlistOptions.displayTime:0;a(this.cssSelector.playlist+" ul").slideUp(d,function(){var d=a(this);a(this).empty(),a.each(c.playlist,function(a){d.append(c._createListItem(c.playlist[a]))}),c._updateControls(),a.isFunction(b)&&b(),c.playlist.length?a(this).slideDown(c.options.playlistOptions.displayTime):a(this).show()})}},_createListItem:function(b){var c=this,d="
  • ";if(d+="×",b.free){var e=!0;d+="(",a.each(b,function(b,f){a.jPlayer.prototype.format[b]&&(e?e=!1:d+=" | ",d+=""+b+"")}),d+=")"}return d+=""+b.title+(b.artist?" ":"")+"",d+="
  • "},_createItemHandlers:function(){var b=this;a(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.itemClass).on("click","a."+this.options.playlistOptions.itemClass,function(c){c.preventDefault();var d=a(this).parent().parent().index();b.current!==d?b.play(d):a(b.cssSelector.jPlayer).jPlayer("play"),b.blur(this)}),a(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.freeItemClass).on("click","a."+this.options.playlistOptions.freeItemClass,function(c){c.preventDefault(),a(this).parent().parent().find("."+b.options.playlistOptions.itemClass).click(),b.blur(this)}),a(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.removeItemClass).on("click","a."+this.options.playlistOptions.removeItemClass,function(c){c.preventDefault();var d=a(this).parent().parent().index();b.remove(d),b.blur(this)})},_updateControls:function(){this.options.playlistOptions.enableRemoveControls?a(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).show():a(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide(),this.shuffled?a(this.cssSelector.jPlayer).jPlayer("addStateClass","shuffled"):a(this.cssSelector.jPlayer).jPlayer("removeStateClass","shuffled"),a(this.cssSelector.shuffle).length&&a(this.cssSelector.shuffleOff).length&&(this.shuffled?(a(this.cssSelector.shuffleOff).show(),a(this.cssSelector.shuffle).hide()):(a(this.cssSelector.shuffleOff).hide(),a(this.cssSelector.shuffle).show()))},_highlight:function(c){this.playlist.length&&c!==b&&(a(this.cssSelector.playlist+" .jp-playlist-current").removeClass("jp-playlist-current"),a(this.cssSelector.playlist+" li:nth-child("+(c+1)+")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current"))},setPlaylist:function(a){this._initPlaylist(a),this._init()},add:function(b,c){a(this.cssSelector.playlist+" ul").append(this._createListItem(b)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime),this._updateControls(),this.original.push(b),this.playlist.push(b),c?this.play(this.playlist.length-1):1===this.original.length&&this.select(0)},remove:function(c){var d=this;return c===b?(this._initPlaylist([]),this._refresh(function(){a(d.cssSelector.jPlayer).jPlayer("clearMedia")}),!0):this.removing?!1:(c=0>c?d.original.length+c:c,c>=0&&cb?this.original.length+b:b,b>=0&&bc?this.original.length+c:c,c>=0&&c1?this.shuffle(!0,!0):this.play(a):a>0&&this.play(a)},previous:function(){var a=this.current-1>=0?this.current-1:this.playlist.length-1;(this.loop&&this.options.playlistOptions.loopOnPrevious||a' + (config.visible ? "Hide" : "Show") + ' jPlayer Inspector

    ' - + '
    ' - + '
    ' - + '
    ' - + '

    jPlayer events that have occurred over the past 1 second:' - + '
    (Backgrounds: Never occurred Occurred before Occurred Multiple occurrences reset)

    '; - - // MJP: Would use the next 3 lines for ease, but the events are just slapped on the page. - // $.each($.jPlayer.event, function(eventName,eventType) { - // structure += '
    ' + eventName + '
    '; - // }); - - var eventStyle = "float:left;margin:0 5px 5px 0;padding:0 5px;border:1px dotted #000;"; - // MJP: Doing it longhand so order and layout easier to control. - structure += - '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - - + '
    ' - + '
    ' - + '
    ' - + '
    ' - - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - - + '
    '; - - // MJP: Would like a check here in case we missed an event. - - // MJP: Check fails, since it is not on the page yet. -/* $.each($.jPlayer.event, function(eventName,eventType) { - if($("#" + config.eventId[eventType])[0] === undefined) { - structure += '
    ' + eventName + '
    '; - } - }); -*/ - structure += - '
    ' - + '

    Update jPlayer Inspector

    ' - + '
    ' - + '
    '; - $(this).html(structure); - - config.windowJq = $("#" + config.windowId); - config.statusJq = $("#" + config.statusId); - config.configJq = $("#" + config.configId); - config.toggleJq = $("#" + config.toggleId); - config.eventResetJq = $("#" + config.eventResetId); - config.updateJq = $("#" + config.updateId); - - $.each($.jPlayer.event, function(eventName,eventType) { - config.eventJq[eventType] = $("#" + config.eventId[eventType]); - config.eventJq[eventType].text(eventName + " (" + config.eventOccurrence[eventType] + ")"); // Sets the text to the event name and (0); - - config.jPlayer.bind(eventType + ".jPlayerInspector", function(e) { - config.eventOccurrence[e.type]++; - if(config.eventOccurrence[e.type] > 1) { - config.eventJq[e.type].css("background-color","#ff9"); - } else { - config.eventJq[e.type].css("background-color","#9f9"); - } - config.eventJq[e.type].text(eventName + " (" + config.eventOccurrence[e.type] + ")"); - // The timer to handle the color - clearTimeout(config.eventTimeout[e.type]); - config.eventTimeout[e.type] = setTimeout(function() { - config.eventJq[e.type].css("background-color","#fff"); - }, 1000); - // The timer to handle the occurences. - setTimeout(function() { - config.eventOccurrence[e.type]--; - config.eventJq[e.type].text(eventName + " (" + config.eventOccurrence[e.type] + ")"); - }, 1000); - if(config.visible) { // Update the status, if inspector open. - $this.jPlayerInspector("updateStatus"); - } - }); - }); - - config.jPlayer.bind($.jPlayer.event.ready + ".jPlayerInspector", function(e) { - $this.jPlayerInspector("updateConfig"); - }); - - config.toggleJq.click(function() { - if(config.visible) { - $(this).text("Show"); - config.windowJq.hide(); - config.statusJq.empty(); - config.configJq.empty(); - } else { - $(this).text("Hide"); - config.windowJq.show(); - config.updateJq.click(); - } - config.visible = !config.visible; - $(this).blur(); - return false; - }); - - config.eventResetJq.click(function() { - $.each($.jPlayer.event, function(eventName,eventType) { - config.eventJq[eventType].css("background-color","#eee"); - }); - $(this).blur(); - return false; - }); - - config.updateJq.click(function() { - $this.jPlayerInspector("updateStatus"); - $this.jPlayerInspector("updateConfig"); - return false; - }); - - if(!config.visible) { - config.windowJq.hide(); - } else { - // config.updateJq.click(); - } - - $.jPlayerInspector.i++; - - return this; - }, - destroy: function() { - $(this).data("jPlayerInspector") && $(this).data("jPlayerInspector").jPlayer.unbind(".jPlayerInspector"); - $(this).empty(); - }, - updateConfig: function() { // This displays information about jPlayer's configuration in inspector - - var jPlayerInfo = "

    This jPlayer instance is running in your browser where:
    " - - for(i = 0; i < $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions.length; i++) { - var solution = $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions[i]; - jPlayerInfo += " jPlayer's " + solution + " solution is"; - if($(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].used) { - jPlayerInfo += " being used and will support:"; - for(format in $(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].support) { - if($(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].support[format]) { - jPlayerInfo += " " + format; - } - } - jPlayerInfo += "
    "; - } else { - jPlayerInfo += " not required
    "; - } - } - jPlayerInfo += "

    "; - - if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.active) { - if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active) { - jPlayerInfo += "Problem with jPlayer since both HTML5 and Flash are active."; - } else { - jPlayerInfo += "The HTML5 is active."; - } - } else { - if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active) { - jPlayerInfo += "The Flash is active."; - } else { - jPlayerInfo += "No solution is currently active. jPlayer needs a setMedia()."; - } - } - jPlayerInfo += "

    "; - - var formatType = $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.formatType; - jPlayerInfo += "

    status.formatType = '" + formatType + "'
    "; - if(formatType) { - jPlayerInfo += "Browser canPlay('" + $.jPlayer.prototype.format[formatType].codec + "')"; - } else { - jPlayerInfo += "

    "; - } - - jPlayerInfo += "

    status.src = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src + "'

    "; - - jPlayerInfo += "

    status.media = {
    "; - for(prop in $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media) { - jPlayerInfo += " " + prop + ": " + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media[prop] + "
    "; // Some are strings - } - jPlayerInfo += "};

    " - - jPlayerInfo += "

    "; - jPlayerInfo += "status.videoWidth = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoWidth + "'"; - jPlayerInfo += " | status.videoHeight = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoHeight + "'"; - jPlayerInfo += "
    status.width = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.width + "'"; - jPlayerInfo += " | status.height = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.height + "'"; - jPlayerInfo += "

    "; - - + "

    Raw browser test for HTML5 support. Should equal a function if HTML5 is available.
    "; - if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.audio.available) { - jPlayerInfo += "htmlElement.audio.canPlayType = " + (typeof $(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.audio.canPlayType) +"
    " - } - if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.video.available) { - jPlayerInfo += "htmlElement.video.canPlayType = " + (typeof $(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.video.canPlayType) +""; - } - jPlayerInfo += "

    "; - - jPlayerInfo += "

    This instance is using the constructor options:
    " - + "$('#" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").internal.self.id + "').jPlayer({
    " - - + " swfPath: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "swfPath") + "',
    " - - + " solution: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "solution") + "',
    " - - + " supplied: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "supplied") + "',
    " - - + " preload: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "preload") + "',
    " - - + " volume: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "volume") + ",
    " - - + " muted: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "muted") + ",
    " - - + " backgroundColor: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "backgroundColor") + "',
    " - - + " cssSelectorAncestor: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelectorAncestor") + "',
    " - - + " cssSelector: {"; - - var cssSelector = $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector"); - for(prop in cssSelector) { - - // jPlayerInfo += "
      " + prop + ": '" + cssSelector[prop] + "'," // This works too of course, but want to use option method for deep keys. - jPlayerInfo += "
      " + prop + ": '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector." + prop) + "'," - } - - jPlayerInfo = jPlayerInfo.slice(0, -1); // Because the sloppy comma was bugging me. - - jPlayerInfo += "
     },
    " - - + " errorAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "errorAlerts") + ",
    " - - + " warningAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "warningAlerts") + "
    " - - + "});

    "; - $(this).data("jPlayerInspector").configJq.html(jPlayerInfo); - return this; - }, - updateStatus: function() { // This displays information about jPlayer's status in the inspector - $(this).data("jPlayerInspector").statusJq.html( - "

    jPlayer is " + - ($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.paused ? "paused" : "playing") + - " at time: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentTime*10)/10 + "s." + - " (d: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.duration*10)/10 + "s" + - ", sp: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.seekPercent) + "%" + - ", cpr: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentRelative) + "%" + - ", cpa: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentAbsolute) + "%)

    " - ); - return this; - } - }; - $.fn.jPlayerInspector = function( method ) { - // Method calling logic - if ( methods[method] ) { - return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); - } else if ( typeof method === 'object' || ! method ) { - return methods.init.apply( this, arguments ); - } else { - $.error( 'Method ' + method + ' does not exist on jQuery.jPlayerInspector' ); - } - }; -})(jQuery); diff --git a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jquery.jplayer.inspector.min.js b/libraries/filemanager-9.12.1/js/jPlayer/add-on/jquery.jplayer.inspector.min.js deleted file mode 100644 index 69925c8..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/add-on/jquery.jplayer.inspector.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jPlayerInspector for jPlayer 2.9.2 ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ -!function(a,b){a.jPlayerInspector={},a.jPlayerInspector.i=0,a.jPlayerInspector.defaults={jPlayer:b,idPrefix:"jplayer_inspector_",visible:!1};var c={init:function(b){var c=a(this),d=a.extend({},a.jPlayerInspector.defaults,b);a(this).data("jPlayerInspector",d),d.id=a(this).attr("id"),d.jPlayerId=d.jPlayer.attr("id"),d.windowId=d.idPrefix+"window_"+a.jPlayerInspector.i,d.statusId=d.idPrefix+"status_"+a.jPlayerInspector.i,d.configId=d.idPrefix+"config_"+a.jPlayerInspector.i,d.toggleId=d.idPrefix+"toggle_"+a.jPlayerInspector.i,d.eventResetId=d.idPrefix+"event_reset_"+a.jPlayerInspector.i,d.updateId=d.idPrefix+"update_"+a.jPlayerInspector.i,d.eventWindowId=d.idPrefix+"event_window_"+a.jPlayerInspector.i,d.eventId={},d.eventJq={},d.eventTimeout={},d.eventOccurrence={},a.each(a.jPlayer.event,function(b,c){d.eventId[c]=d.idPrefix+"event_"+b+"_"+a.jPlayerInspector.i,d.eventOccurrence[c]=0});var e='

    '+(d.visible?"Hide":"Show")+' jPlayer Inspector

    jPlayer events that have occurred over the past 1 second:
    (Backgrounds: Never occurred Occurred before Occurred Multiple occurrences reset)

    ',f="float:left;margin:0 5px 5px 0;padding:0 5px;border:1px dotted #000;";return e+='
    ',e+='

    Update jPlayer Inspector

    ',a(this).html(e),d.windowJq=a("#"+d.windowId),d.statusJq=a("#"+d.statusId),d.configJq=a("#"+d.configId),d.toggleJq=a("#"+d.toggleId),d.eventResetJq=a("#"+d.eventResetId),d.updateJq=a("#"+d.updateId),a.each(a.jPlayer.event,function(b,e){d.eventJq[e]=a("#"+d.eventId[e]),d.eventJq[e].text(b+" ("+d.eventOccurrence[e]+")"),d.jPlayer.bind(e+".jPlayerInspector",function(a){d.eventOccurrence[a.type]++,d.eventOccurrence[a.type]>1?d.eventJq[a.type].css("background-color","#ff9"):d.eventJq[a.type].css("background-color","#9f9"),d.eventJq[a.type].text(b+" ("+d.eventOccurrence[a.type]+")"),clearTimeout(d.eventTimeout[a.type]),d.eventTimeout[a.type]=setTimeout(function(){d.eventJq[a.type].css("background-color","#fff")},1e3),setTimeout(function(){d.eventOccurrence[a.type]--,d.eventJq[a.type].text(b+" ("+d.eventOccurrence[a.type]+")")},1e3),d.visible&&c.jPlayerInspector("updateStatus")})}),d.jPlayer.bind(a.jPlayer.event.ready+".jPlayerInspector",function(){c.jPlayerInspector("updateConfig")}),d.toggleJq.click(function(){return d.visible?(a(this).text("Show"),d.windowJq.hide(),d.statusJq.empty(),d.configJq.empty()):(a(this).text("Hide"),d.windowJq.show(),d.updateJq.click()),d.visible=!d.visible,a(this).blur(),!1}),d.eventResetJq.click(function(){return a.each(a.jPlayer.event,function(a,b){d.eventJq[b].css("background-color","#eee")}),a(this).blur(),!1}),d.updateJq.click(function(){return c.jPlayerInspector("updateStatus"),c.jPlayerInspector("updateConfig"),!1}),d.visible||d.windowJq.hide(),a.jPlayerInspector.i++,this},destroy:function(){a(this).data("jPlayerInspector")&&a(this).data("jPlayerInspector").jPlayer.unbind(".jPlayerInspector"),a(this).empty()},updateConfig:function(){var b="

    This jPlayer instance is running in your browser where:
    ";for(i=0;i"+c+" solution is",a(this).data("jPlayerInspector").jPlayer.data("jPlayer")[c].used){b+=" being used and will support:";for(format in a(this).data("jPlayerInspector").jPlayer.data("jPlayer")[c].support)a(this).data("jPlayerInspector").jPlayer.data("jPlayer")[c].support[format]&&(b+=" "+format);b+="
    "}else b+=" not required
    "}b+="

    ",b+=a(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.active?a(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active?"Problem with jPlayer since both HTML5 and Flash are active.":"The HTML5 is active.":a(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active?"The Flash is active.":"No solution is currently active. jPlayer needs a setMedia().",b+="

    ";var d=a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.formatType;b+="

    status.formatType = '"+d+"'
    ",b+=d?"Browser canPlay('"+a.jPlayer.prototype.format[d].codec+"')":"

    ",b+="

    status.src = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src+"'

    ",b+="

    status.media = {
    ";for(prop in a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media)b+=" "+prop+": "+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media[prop]+"
    ";b+="};

    ",b+="

    ",b+="status.videoWidth = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoWidth+"'",b+=" | status.videoHeight = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoHeight+"'",b+="
    status.width = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.width+"'",b+=" | status.height = '"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.height+"'",b+="

    ",a(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.audio.available&&(b+="htmlElement.audio.canPlayType = "+typeof a(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.audio.canPlayType+"
    "),a(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.video.available&&(b+="htmlElement.video.canPlayType = "+typeof a(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.video.canPlayType+""),b+="

    ",b+="

    This instance is using the constructor options:
    $('#"+a(this).data("jPlayerInspector").jPlayer.data("jPlayer").internal.self.id+"').jPlayer({
     swfPath: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","swfPath")+"',
     solution: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","solution")+"',
     supplied: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","supplied")+"',
     preload: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","preload")+"',
     volume: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","volume")+",
     muted: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","muted")+",
     backgroundColor: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","backgroundColor")+"',
     cssSelectorAncestor: '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelectorAncestor")+"',
     cssSelector: {";var e=a(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector");for(prop in e)b+="
      "+prop+": '"+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector."+prop)+"',";return b=b.slice(0,-1),b+="
     },
     errorAlerts: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","errorAlerts")+",
     warningAlerts: "+a(this).data("jPlayerInspector").jPlayer.jPlayer("option","warningAlerts")+"
    });

    ",a(this).data("jPlayerInspector").configJq.html(b),this},updateStatus:function(){return a(this).data("jPlayerInspector").statusJq.html("

    jPlayer is "+(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.paused?"paused":"playing")+" at time: "+Math.floor(10*a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentTime)/10+"s. (d: "+Math.floor(10*a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.duration)/10+"s, sp: "+Math.floor(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.seekPercent)+"%, cpr: "+Math.floor(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentRelative)+"%, cpa: "+Math.floor(a(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentAbsolute)+"%)

    "),this}};a.fn.jPlayerInspector=function(b){return c[b]?c[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.jPlayerInspector"):c.init.apply(this,arguments)}}(jQuery); \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jplayer.jquery.json b/libraries/filemanager-9.12.1/js/jPlayer/jplayer.jquery.json deleted file mode 100644 index 3b7b437..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/jplayer.jquery.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "jplayer", - "title": "jPlayer : HTML5 Audio & Video", - "description": "jPlayer allows you to create a media player with a consistent interface and experience across all browsers.", - "keywords": [ - "audio", - "video", - "media", - "player", - "jplayer", - "html5", - "streaming" - ], - "version": "2.4.0", - "author": { - "name": "Mark J Panaghiston", - "url": "http://happyworm.com/" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/happyworm/jPlayer/blob/master/MIT-LICENSE.txt" - } - ], - "dependencies": { - "jquery": ">=1.7" - }, - "homepage": "http://jplayer.org/", - "demo": "http://jplayer.org/latest/demos/", - "docs": "http://jplayer.org/latest/developer-guide/", - "download": "http://jplayer.org/download/", - "bugs": "https://github.com/happyworm/jPlayer/issues" -} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.js b/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.js deleted file mode 100644 index 842f31b..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.js +++ /dev/null @@ -1,3506 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2014 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Version: 2.9.2 - * Date: 14th December 2014 - */ - -/* Support for Zepto 1.0 compiled with optional data module. - * For AMD or NODE/CommonJS support, you will need to manually switch the related 2 lines in the code below. - * Search terms: "jQuery Switch" and "Zepto Switch" - */ - -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], factory); // jQuery Switch - // define(['zepto'], factory); // Zepto Switch - } else if (typeof exports === 'object') { - // Node/CommonJS - factory(require('jquery')); // jQuery Switch - //factory(require('zepto')); // Zepto Switch - } else { - // Browser globals - if(root.jQuery) { // Use jQuery if available - factory(root.jQuery); - } else { // Otherwise, use Zepto - factory(root.Zepto); - } - } -}(this, function ($, undefined) { - - // Adapted from jquery.ui.widget.js (1.8.7): $.widget.bridge - Tweaked $.data(this,XYZ) to $(this).data(XYZ) for Zepto - $.fn.jPlayer = function( options ) { - var name = "jPlayer"; - var isMethodCall = typeof options === "string", - args = Array.prototype.slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.extend.apply( null, [ true, options ].concat(args) ) : - options; - - // prevent calls to internal methods - if ( isMethodCall && options.charAt( 0 ) === "_" ) { - return returnValue; - } - - if ( isMethodCall ) { - this.each(function() { - var instance = $(this).data( name ), - methodValue = instance && $.isFunction( instance[options] ) ? - instance[ options ].apply( instance, args ) : - instance; - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $(this).data( name ); - if ( instance ) { - // instance.option( options || {} )._init(); // Orig jquery.ui.widget.js code: Not recommend for jPlayer. ie., Applying new options to an existing instance (via the jPlayer constructor) and performing the _init(). The _init() is what concerns me. It would leave a lot of event handlers acting on jPlayer instance and the interface. - instance.option( options || {} ); // The new constructor only changes the options. Changing options only has basic support atm. - } else { - $(this).data( name, new $.jPlayer( options, this ) ); - } - }); - } - - return returnValue; - }; - - $.jPlayer = function( options, element ) { - // allow instantiation without initializing for simple inheritance - if ( arguments.length ) { - this.element = $(element); - this.options = $.extend(true, {}, - this.options, - options - ); - var self = this; - this.element.bind( "remove.jPlayer", function() { - self.destroy(); - }); - this._init(); - } - }; - // End of: (Adapted from jquery.ui.widget.js (1.8.7)) - - // Zepto is missing one of the animation methods. - if(typeof $.fn.stop !== 'function') { - $.fn.stop = function() {}; - } - - // Emulated HTML5 methods and properties - $.jPlayer.emulateMethods = "load play pause"; - $.jPlayer.emulateStatus = "src readyState networkState currentTime duration paused ended playbackRate"; - $.jPlayer.emulateOptions = "muted volume"; - - // Reserved event names generated by jPlayer that are not part of the HTML5 Media element spec - $.jPlayer.reservedEvent = "ready flashreset resize repeat error warning"; - - // Events generated by jPlayer - $.jPlayer.event = {}; - $.each( - [ - 'ready', - 'setmedia', // Fires when the media is set - 'flashreset', // Similar to the ready event if the Flash solution is set to display:none and then shown again or if it's reloaded for another reason by the browser. For example, using CSS position:fixed on Firefox for the full screen feature. - 'resize', // Occurs when the size changes through a full/restore screen operation or if the size/sizeFull options are changed. - 'repeat', // Occurs when the repeat status changes. Usually through clicks on the repeat button of the interface. - 'click', // Occurs when the user clicks on one of the following: poster image, html video, flash video. - 'error', // Event error code in event.jPlayer.error.type. See $.jPlayer.error - 'warning', // Event warning code in event.jPlayer.warning.type. See $.jPlayer.warning - - // Other events match HTML5 spec. - 'loadstart', - 'progress', - 'suspend', - 'abort', - 'emptied', - 'stalled', - 'play', - 'pause', - 'loadedmetadata', - 'loadeddata', - 'waiting', - 'playing', - 'canplay', - 'canplaythrough', - 'seeking', - 'seeked', - 'timeupdate', - 'ended', - 'ratechange', - 'durationchange', - 'volumechange' - ], - function() { - $.jPlayer.event[ this ] = 'jPlayer_' + this; - } - ); - - $.jPlayer.htmlEvent = [ // These HTML events are bubbled through to the jPlayer event, without any internal action. - "loadstart", - // "progress", // jPlayer uses internally before bubbling. - // "suspend", // jPlayer uses internally before bubbling. - "abort", - // "error", // jPlayer uses internally before bubbling. - "emptied", - "stalled", - // "play", // jPlayer uses internally before bubbling. - // "pause", // jPlayer uses internally before bubbling. - "loadedmetadata", - // "loadeddata", // jPlayer uses internally before bubbling. - // "waiting", // jPlayer uses internally before bubbling. - // "playing", // jPlayer uses internally before bubbling. - "canplay", - "canplaythrough" - // "seeking", // jPlayer uses internally before bubbling. - // "seeked", // jPlayer uses internally before bubbling. - // "timeupdate", // jPlayer uses internally before bubbling. - // "ended", // jPlayer uses internally before bubbling. - // "ratechange" // jPlayer uses internally before bubbling. - // "durationchange" // jPlayer uses internally before bubbling. - // "volumechange" // jPlayer uses internally before bubbling. - ]; - - $.jPlayer.pause = function() { - $.jPlayer.prototype.destroyRemoved(); - $.each($.jPlayer.prototype.instances, function(i, element) { - if(element.data("jPlayer").status.srcSet) { // Check that media is set otherwise would cause error event. - element.jPlayer("pause"); - } - }); - }; - - // Default for jPlayer option.timeFormat - $.jPlayer.timeFormat = { - showHour: false, - showMin: true, - showSec: true, - padHour: false, - padMin: true, - padSec: true, - sepHour: ":", - sepMin: ":", - sepSec: "" - }; - var ConvertTime = function() { - this.init(); - }; - ConvertTime.prototype = { - init: function() { - this.options = { - timeFormat: $.jPlayer.timeFormat - }; - }, - time: function(s) { // function used on jPlayer.prototype._convertTime to enable per instance options. - s = (s && typeof s === 'number') ? s : 0; - - var myTime = new Date(s * 1000), - hour = myTime.getUTCHours(), - min = this.options.timeFormat.showHour ? myTime.getUTCMinutes() : myTime.getUTCMinutes() + hour * 60, - sec = this.options.timeFormat.showMin ? myTime.getUTCSeconds() : myTime.getUTCSeconds() + min * 60, - strHour = (this.options.timeFormat.padHour && hour < 10) ? "0" + hour : hour, - strMin = (this.options.timeFormat.padMin && min < 10) ? "0" + min : min, - strSec = (this.options.timeFormat.padSec && sec < 10) ? "0" + sec : sec, - strTime = ""; - - strTime += this.options.timeFormat.showHour ? strHour + this.options.timeFormat.sepHour : ""; - strTime += this.options.timeFormat.showMin ? strMin + this.options.timeFormat.sepMin : ""; - strTime += this.options.timeFormat.showSec ? strSec + this.options.timeFormat.sepSec : ""; - - return strTime; - } - }; - var myConvertTime = new ConvertTime(); - $.jPlayer.convertTime = function(s) { - return myConvertTime.time(s); - }; - - // Adapting jQuery 1.4.4 code for jQuery.browser. Required since jQuery 1.3.2 does not detect Chrome as webkit. - $.jPlayer.uaBrowser = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rwebkit = /(webkit)[ \/]([\w.]+)/; - var ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/; - var rmsie = /(msie) ([\w.]+)/; - var rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/; - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }; - - // Platform sniffer for detecting mobile devices - $.jPlayer.uaPlatform = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rplatform = /(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/; - var rtablet = /(ipad|playbook)/; - var randroid = /(android)/; - var rmobile = /(mobile)/; - - var platform = rplatform.exec( ua ) || []; - var tablet = rtablet.exec( ua ) || - !rmobile.exec( ua ) && randroid.exec( ua ) || - []; - - if(platform[1]) { - platform[1] = platform[1].replace(/\s/g, "_"); // Change whitespace to underscore. Enables dot notation. - } - - return { platform: platform[1] || "", tablet: tablet[1] || "" }; - }; - - $.jPlayer.browser = { - }; - $.jPlayer.platform = { - }; - - var browserMatch = $.jPlayer.uaBrowser(navigator.userAgent); - if ( browserMatch.browser ) { - $.jPlayer.browser[ browserMatch.browser ] = true; - $.jPlayer.browser.version = browserMatch.version; - } - var platformMatch = $.jPlayer.uaPlatform(navigator.userAgent); - if ( platformMatch.platform ) { - $.jPlayer.platform[ platformMatch.platform ] = true; - $.jPlayer.platform.mobile = !platformMatch.tablet; - $.jPlayer.platform.tablet = !!platformMatch.tablet; - } - - // Internet Explorer (IE) Browser Document Mode Sniffer. Based on code at: - // http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx#GetMode - $.jPlayer.getDocMode = function() { - var docMode; - if ($.jPlayer.browser.msie) { - if (document.documentMode) { // IE8 or later - docMode = document.documentMode; - } else { // IE 5-7 - docMode = 5; // Assume quirks mode unless proven otherwise - if (document.compatMode) { - if (document.compatMode === "CSS1Compat") { - docMode = 7; // standards mode - } - } - } - } - return docMode; - }; - $.jPlayer.browser.documentMode = $.jPlayer.getDocMode(); - - $.jPlayer.nativeFeatures = { - init: function() { - - /* Fullscreen function naming influenced by W3C naming. - * No support for: Mozilla Proposal: https://wiki.mozilla.org/Gecko:FullScreenAPI - */ - - var d = document, - v = d.createElement('video'), - spec = { - // http://www.w3.org/TR/fullscreen/ - w3c: [ - 'fullscreenEnabled', - 'fullscreenElement', - 'requestFullscreen', - 'exitFullscreen', - 'fullscreenchange', - 'fullscreenerror' - ], - // https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode - moz: [ - 'mozFullScreenEnabled', - 'mozFullScreenElement', - 'mozRequestFullScreen', - 'mozCancelFullScreen', - 'mozfullscreenchange', - 'mozfullscreenerror' - ], - // http://developer.apple.com/library/safari/#documentation/WebKit/Reference/ElementClassRef/Element/Element.html - // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html - webkit: [ - '', - 'webkitCurrentFullScreenElement', - 'webkitRequestFullScreen', - 'webkitCancelFullScreen', - 'webkitfullscreenchange', - '' - ], - // http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html - // https://developer.apple.com/library/safari/samplecode/HTML5VideoEventFlow/Listings/events_js.html#//apple_ref/doc/uid/DTS40010085-events_js-DontLinkElementID_5 - // Events: 'webkitbeginfullscreen' and 'webkitendfullscreen' - webkitVideo: [ - 'webkitSupportsFullscreen', - 'webkitDisplayingFullscreen', - 'webkitEnterFullscreen', - 'webkitExitFullscreen', - '', - '' - ], - ms: [ - '', - 'msFullscreenElement', - 'msRequestFullscreen', - 'msExitFullscreen', - 'MSFullscreenChange', - 'MSFullscreenError' - ] - }, - specOrder = [ - 'w3c', - 'moz', - 'webkit', - 'webkitVideo', - 'ms' - ], - fs, i, il; - - this.fullscreen = fs = { - support: { - w3c: !!d[spec.w3c[0]], - moz: !!d[spec.moz[0]], - webkit: typeof d[spec.webkit[3]] === 'function', - webkitVideo: typeof v[spec.webkitVideo[2]] === 'function', - ms: typeof v[spec.ms[2]] === 'function' - }, - used: {} - }; - - // Store the name of the spec being used and as a handy boolean. - for(i = 0, il = specOrder.length; i < il; i++) { - var n = specOrder[i]; - if(fs.support[n]) { - fs.spec = n; - fs.used[n] = true; - break; - } - } - - if(fs.spec) { - var s = spec[fs.spec]; - fs.api = { - fullscreenEnabled: true, - fullscreenElement: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[1]]; - }, - requestFullscreen: function(elem) { - return elem[s[2]](); // Chrome and Opera want parameter (Element.ALLOW_KEYBOARD_INPUT) but Safari fails if flag used. - }, - exitFullscreen: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[3]](); - } - }; - fs.event = { - fullscreenchange: s[4], - fullscreenerror: s[5] - }; - } else { - fs.api = { - fullscreenEnabled: false, - fullscreenElement: function() { - return null; - }, - requestFullscreen: function() {}, - exitFullscreen: function() {} - }; - fs.event = {}; - } - } - }; - $.jPlayer.nativeFeatures.init(); - - // The keyboard control system. - - // The current jPlayer instance in focus. - $.jPlayer.focus = null; - - // The list of element node names to ignore with key controls. - $.jPlayer.keyIgnoreElementNames = "A INPUT TEXTAREA SELECT BUTTON"; - - // The function that deals with key presses. - var keyBindings = function(event) { - var f = $.jPlayer.focus, - ignoreKey; - - // A jPlayer instance must be in focus. ie., keyEnabled and the last one played. - if(f) { - // What generated the key press? - $.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) { - // The strings should already be uppercase. - if(event.target.nodeName.toUpperCase() === name.toUpperCase()) { - ignoreKey = true; - return false; // exit each. - } - }); - if(!ignoreKey) { - // See if the key pressed matches any of the bindings. - $.each(f.options.keyBindings, function(action, binding) { - // The binding could be a null when the default has been disabled. ie., 1st clause in if() - if( - (binding && $.isFunction(binding.fn)) && - ((typeof binding.key === 'number' && event.which === binding.key) || - (typeof binding.key === 'string' && event.key === binding.key)) - ) { - event.preventDefault(); // Key being used by jPlayer, so prevent default operation. - binding.fn(f); - return false; // exit each. - } - }); - } - } - }; - - $.jPlayer.keys = function(en) { - var event = "keydown.jPlayer"; - // Remove any binding, just in case enabled more than once. - $(document.documentElement).unbind(event); - if(en) { - $(document.documentElement).bind(event, keyBindings); - } - }; - - // Enable the global key control handler ready for any jPlayer instance with the keyEnabled option enabled. - $.jPlayer.keys(true); - - $.jPlayer.prototype = { - count: 0, // Static Variable: Change it via prototype. - version: { // Static Object - script: "2.9.2", - needFlash: "2.9.0", - flash: "unknown" - }, - options: { // Instanced in $.jPlayer() constructor - swfPath: "js", // Path to jquery.jplayer.swf. Can be relative, absolute or server root relative. - solution: "html, flash", // Valid solutions: html, flash, aurora. Order defines priority. 1st is highest, - supplied: "mp3", // Defines which formats jPlayer will try and support and the priority by the order. 1st is highest, - auroraFormats: "wav", // List the aurora.js codecs being loaded externally. Its core supports "wav". Specify format in jPlayer context. EG., The aac.js codec gives the "m4a" format. - preload: 'metadata', // HTML5 Spec values: none, metadata, auto. - volume: 0.8, // The volume. Number 0 to 1. - muted: false, - remainingDuration: false, // When true, the remaining time is shown in the duration GUI element. - toggleDuration: false, // When true, clicks on the duration toggle between the duration and remaining display. - captureDuration: true, // When true, clicks on the duration are captured and no longer propagate up the DOM. - playbackRate: 1, - defaultPlaybackRate: 1, - minPlaybackRate: 0.5, - maxPlaybackRate: 4, - wmode: "opaque", // Valid wmode: window, transparent, opaque, direct, gpu. - backgroundColor: "#000000", // To define the jPlayer div and Flash background color. - cssSelectorAncestor: "#jp_container_1", - cssSelector: { // * denotes properties that should only be required when video media type required. _cssSelector() would require changes to enable splitting these into Audio and Video defaults. - videoPlay: ".jp-video-play", // * - play: ".jp-play", - pause: ".jp-pause", - stop: ".jp-stop", - seekBar: ".jp-seek-bar", - playBar: ".jp-play-bar", - mute: ".jp-mute", - unmute: ".jp-unmute", - volumeBar: ".jp-volume-bar", - volumeBarValue: ".jp-volume-bar-value", - volumeMax: ".jp-volume-max", - playbackRateBar: ".jp-playback-rate-bar", - playbackRateBarValue: ".jp-playback-rate-bar-value", - currentTime: ".jp-current-time", - duration: ".jp-duration", - title: ".jp-title", - fullScreen: ".jp-full-screen", // * - restoreScreen: ".jp-restore-screen", // * - repeat: ".jp-repeat", - repeatOff: ".jp-repeat-off", - gui: ".jp-gui", // The interface used with autohide feature. - noSolution: ".jp-no-solution" // For error feedback when jPlayer cannot find a solution. - }, - stateClass: { // Classes added to the cssSelectorAncestor to indicate the state. - playing: "jp-state-playing", - seeking: "jp-state-seeking", - muted: "jp-state-muted", - looped: "jp-state-looped", - fullScreen: "jp-state-full-screen", - noVolume: "jp-state-no-volume" - }, - useStateClassSkin: false, // A state class skin relies on the state classes to change the visual appearance. The single control toggles the effect, for example: play then pause, mute then unmute. - autoBlur: true, // GUI control handlers will drop focus after clicks. - smoothPlayBar: false, // Smooths the play bar transitions, which affects clicks and short media with big changes per second. - fullScreen: false, // Native Full Screen - fullWindow: false, - autohide: { - restored: false, // Controls the interface autohide feature. - full: true, // Controls the interface autohide feature. - fadeIn: 200, // Milliseconds. The period of the fadeIn anim. - fadeOut: 600, // Milliseconds. The period of the fadeOut anim. - hold: 1000 // Milliseconds. The period of the pause before autohide beings. - }, - loop: false, - repeat: function(event) { // The default jPlayer repeat event handler - if(event.jPlayer.options.loop) { - $(this).unbind(".jPlayerRepeat").bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() { - $(this).jPlayer("play"); - }); - } else { - $(this).unbind(".jPlayerRepeat"); - } - }, - nativeVideoControls: { - // Works well on standard browsers. - // Phone and tablet browsers can have problems with the controls disappearing. - }, - noFullWindow: { - msie: /msie [0-6]\./, - ipad: /ipad.*?os [0-4]\./, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android [0-3]\.(?!.*?mobile)/, - android_phone: /(?=.*android)(?!.*chrome)(?=.*mobile)/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/ - }, - noVolume: { - ipad: /ipad/, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android(?!.*?mobile)/, - android_phone: /android.*?mobile/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/, - playbook: /playbook/ - }, - timeFormat: { - // Specific time format for this instance. The supported options are defined in $.jPlayer.timeFormat - // For the undefined options we use the default from $.jPlayer.timeFormat - }, - keyEnabled: false, // Enables keyboard controls. - audioFullScreen: false, // Enables keyboard controls to enter full screen with audio media. - keyBindings: { // The key control object, defining the key codes and the functions to execute. - // The parameter, f = $.jPlayer.focus, will be checked truethy before attempting to call any of these functions. - // Properties may be added to this object, in key/fn pairs, to enable other key controls. EG, for the playlist add-on. - play: { - key: 80, // p - fn: function(f) { - if(f.status.paused) { - f.play(); - } else { - f.pause(); - } - } - }, - fullScreen: { - key: 70, // f - fn: function(f) { - if(f.status.video || f.options.audioFullScreen) { - f._setOption("fullScreen", !f.options.fullScreen); - } - } - }, - muted: { - key: 77, // m - fn: function(f) { - f._muted(!f.options.muted); - } - }, - volumeUp: { - key: 190, // . - fn: function(f) { - f.volume(f.options.volume + 0.1); - } - }, - volumeDown: { - key: 188, // , - fn: function(f) { - f.volume(f.options.volume - 0.1); - } - }, - loop: { - key: 76, // l - fn: function(f) { - f._loop(!f.options.loop); - } - } - }, - verticalVolume: false, // Calculate volume from the bottom of the volume bar. Default is from the left. Also volume affects either width or height. - verticalPlaybackRate: false, - globalVolume: false, // Set to make volume and muted changes affect all jPlayer instances with this option enabled - idPrefix: "jp", // Prefix for the ids of html elements created by jPlayer. For flash, this must not include characters: . - + * / \ - noConflict: "jQuery", - emulateHtml: false, // Emulates the HTML5 Media element on the jPlayer element. - consoleAlerts: true, // Alerts are sent to the console.log() instead of alert(). - errorAlerts: false, - warningAlerts: false - }, - optionsAudio: { - size: { - width: "0px", - height: "0px", - cssClass: "" - }, - sizeFull: { - width: "0px", - height: "0px", - cssClass: "" - } - }, - optionsVideo: { - size: { - width: "480px", - height: "270px", - cssClass: "jp-video-270p" - }, - sizeFull: { - width: "100%", - height: "100%", - cssClass: "jp-video-full" - } - }, - instances: {}, // Static Object - status: { // Instanced in _init() - src: "", - media: {}, - paused: true, - format: {}, - formatType: "", - waitForPlay: true, // Same as waitForLoad except in case where preloading. - waitForLoad: true, - srcSet: false, - video: false, // True if playing a video - seekPercent: 0, - currentPercentRelative: 0, - currentPercentAbsolute: 0, - currentTime: 0, - duration: 0, - remaining: 0, - videoWidth: 0, // Intrinsic width of the video in pixels. - videoHeight: 0, // Intrinsic height of the video in pixels. - readyState: 0, - networkState: 0, - playbackRate: 1, // Warning - Now both an option and a status property - ended: 0 - -/* Persistant status properties created dynamically at _init(): - width - height - cssClass - nativeVideoControls - noFullWindow - noVolume - playbackRateEnabled // Warning - Technically, we can have both Flash and HTML, so this might not be correct if the Flash is active. That is a niche case. -*/ - }, - - internal: { // Instanced in _init() - ready: false - // instance: undefined - // domNode: undefined - // htmlDlyCmdId: undefined - // autohideId: undefined - // mouse: undefined - // cmdsIgnored - }, - solution: { // Static Object: Defines the solutions built in jPlayer. - html: true, - aurora: true, - flash: true - }, - // 'MPEG-4 support' : canPlayType('video/mp4; codecs="mp4v.20.8"') - format: { // Static Object - mp3: { - codec: 'audio/mpeg', - flashCanPlay: true, - media: 'audio' - }, - m4a: { // AAC / MP4 - codec: 'audio/mp4; codecs="mp4a.40.2"', - flashCanPlay: true, - media: 'audio' - }, - m3u8a: { // AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="mp4a.40.2"', - flashCanPlay: false, - media: 'audio' - }, - m3ua: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'audio' - }, - oga: { // OGG - codec: 'audio/ogg; codecs="vorbis, opus"', - flashCanPlay: false, - media: 'audio' - }, - flac: { // FLAC - codec: 'audio/x-flac', - flashCanPlay: false, - media: 'audio' - }, - wav: { // PCM - codec: 'audio/wav; codecs="1"', - flashCanPlay: false, - media: 'audio' - }, - webma: { // WEBM - codec: 'audio/webm; codecs="vorbis"', - flashCanPlay: false, - media: 'audio' - }, - fla: { // FLV / F4A - codec: 'audio/x-flv', - flashCanPlay: true, - media: 'audio' - }, - rtmpa: { // RTMP AUDIO - codec: 'audio/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'audio' - }, - m4v: { // H.264 / MP4 - codec: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: true, - media: 'video' - }, - m3u8v: { // H.264 / AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: false, - media: 'video' - }, - m3uv: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'video' - }, - ogv: { // OGG - codec: 'video/ogg; codecs="theora, vorbis"', - flashCanPlay: false, - media: 'video' - }, - webmv: { // WEBM - codec: 'video/webm; codecs="vorbis, vp8"', - flashCanPlay: false, - media: 'video' - }, - flv: { // FLV / F4V - codec: 'video/x-flv', - flashCanPlay: true, - media: 'video' - }, - rtmpv: { // RTMP VIDEO - codec: 'video/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'video' - } - }, - _init: function() { - var self = this; - - this.element.empty(); - - this.status = $.extend({}, this.status); // Copy static to unique instance. - this.internal = $.extend({}, this.internal); // Copy static to unique instance. - - // Initialize the time format - this.options.timeFormat = $.extend({}, $.jPlayer.timeFormat, this.options.timeFormat); - - // On iOS, assume commands will be ignored before user initiates them. - this.internal.cmdsIgnored = $.jPlayer.platform.ipad || $.jPlayer.platform.iphone || $.jPlayer.platform.ipod; - - this.internal.domNode = this.element.get(0); - - // Add key bindings focus to 1st jPlayer instanced with key control enabled. - if(this.options.keyEnabled && !$.jPlayer.focus) { - $.jPlayer.focus = this; - } - - // A fix for Android where older (2.3) and even some 4.x devices fail to work when changing the *audio* SRC and then playing immediately. - this.androidFix = { - setMedia: false, // True when media set - play: false, // True when a progress event will instruct the media to play - pause: false, // True when a progress event will instruct the media to pause at a time. - time: NaN // The play(time) parameter - }; - if($.jPlayer.platform.android) { - this.options.preload = this.options.preload !== 'auto' ? 'metadata' : 'auto'; // Default to metadata, but allow auto. - } - - this.formats = []; // Array based on supplied string option. Order defines priority. - this.solutions = []; // Array based on solution string option. Order defines priority. - this.require = {}; // Which media types are required: video, audio. - - this.htmlElement = {}; // DOM elements created by jPlayer - this.html = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - this.html.audio = {}; - this.html.video = {}; - this.aurora = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - this.aurora.formats = []; - this.aurora.properties = []; - this.flash = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - - this.css = {}; - this.css.cs = {}; // Holds the css selector strings - this.css.jq = {}; // Holds jQuery selectors. ie., $(css.cs.method) - - this.ancestorJq = []; // Holds jQuery selector of cssSelectorAncestor. Init would use $() instead of [], but it is only 1.4+ - - this.options.volume = this._limitValue(this.options.volume, 0, 1); // Limit volume value's bounds. - - // Create the formats array, with prority based on the order of the supplied formats string - $.each(this.options.supplied.toLowerCase().split(","), function(index1, value1) { - var format = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.format[format]) { // Check format is valid. - var dupFound = false; - $.each(self.formats, function(index2, value2) { // Check for duplicates - if(format === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.formats.push(format); - } - } - }); - - // Create the solutions array, with prority based on the order of the solution string - $.each(this.options.solution.toLowerCase().split(","), function(index1, value1) { - var solution = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.solution[solution]) { // Check solution is valid. - var dupFound = false; - $.each(self.solutions, function(index2, value2) { // Check for duplicates - if(solution === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.solutions.push(solution); - } - } - }); - - // Create Aurora.js formats array - $.each(this.options.auroraFormats.toLowerCase().split(","), function(index1, value1) { - var format = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.format[format]) { // Check format is valid. - var dupFound = false; - $.each(self.aurora.formats, function(index2, value2) { // Check for duplicates - if(format === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.aurora.formats.push(format); - } - } - }); - - this.internal.instance = "jp_" + this.count; - this.instances[this.internal.instance] = this.element; - - // Check the jPlayer div has an id and create one if required. Important for Flash to know the unique id for comms. - if(!this.element.attr("id")) { - this.element.attr("id", this.options.idPrefix + "_jplayer_" + this.count); - } - - this.internal.self = $.extend({}, { - id: this.element.attr("id"), - jq: this.element - }); - this.internal.audio = $.extend({}, { - id: this.options.idPrefix + "_audio_" + this.count, - jq: undefined - }); - this.internal.video = $.extend({}, { - id: this.options.idPrefix + "_video_" + this.count, - jq: undefined - }); - this.internal.flash = $.extend({}, { - id: this.options.idPrefix + "_flash_" + this.count, - jq: undefined, - swf: this.options.swfPath + (this.options.swfPath.toLowerCase().slice(-4) !== ".swf" ? (this.options.swfPath && this.options.swfPath.slice(-1) !== "/" ? "/" : "") + "jquery.jplayer.swf" : "") - }); - this.internal.poster = $.extend({}, { - id: this.options.idPrefix + "_poster_" + this.count, - jq: undefined - }); - - // Register listeners defined in the constructor - $.each($.jPlayer.event, function(eventName,eventType) { - if(self.options[eventName] !== undefined) { - self.element.bind(eventType + ".jPlayer", self.options[eventName]); // With .jPlayer namespace. - self.options[eventName] = undefined; // Destroy the handler pointer copy on the options. Reason, events can be added/removed in other ways so this could be obsolete and misleading. - } - }); - - // Determine if we require solutions for audio, video or both media types. - this.require.audio = false; - this.require.video = false; - $.each(this.formats, function(priority, format) { - self.require[self.format[format].media] = true; - }); - - // Now required types are known, finish the options default settings. - if(this.require.video) { - this.options = $.extend(true, {}, - this.optionsVideo, - this.options - ); - } else { - this.options = $.extend(true, {}, - this.optionsAudio, - this.options - ); - } - this._setSize(); // update status and jPlayer element size - - // Determine the status for Blocklisted options. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - - // Create event handlers if native fullscreen is supported - if($.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled) { - this._fullscreenAddEventListeners(); - } - - // The native controls are only for video and are disabled when audio is also used. - this._restrictNativeVideoControls(); - - // Create the poster image. - this.htmlElement.poster = document.createElement('img'); - this.htmlElement.poster.id = this.internal.poster.id; - this.htmlElement.poster.onload = function() { // Note that this did not work on Firefox 3.6: poster.addEventListener("onload", function() {}, false); Did not investigate x-browser. - if(!self.status.video || self.status.waitForPlay) { - self.internal.poster.jq.show(); - } - }; - this.element.append(this.htmlElement.poster); - this.internal.poster.jq = $("#" + this.internal.poster.id); - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - this.internal.poster.jq.hide(); - this.internal.poster.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - - // Generate the required media elements - this.html.audio.available = false; - if(this.require.audio) { // If a supplied format is audio - this.htmlElement.audio = document.createElement('audio'); - this.htmlElement.audio.id = this.internal.audio.id; - this.html.audio.available = !!this.htmlElement.audio.canPlayType && this._testCanPlayType(this.htmlElement.audio); // Test is for IE9 on Win Server 2008. - } - this.html.video.available = false; - if(this.require.video) { // If a supplied format is video - this.htmlElement.video = document.createElement('video'); - this.htmlElement.video.id = this.internal.video.id; - this.html.video.available = !!this.htmlElement.video.canPlayType && this._testCanPlayType(this.htmlElement.video); // Test is for IE9 on Win Server 2008. - } - - this.flash.available = this._checkForFlash(10.1); - - this.html.canPlay = {}; - this.aurora.canPlay = {}; - this.flash.canPlay = {}; - $.each(this.formats, function(priority, format) { - self.html.canPlay[format] = self.html[self.format[format].media].available && "" !== self.htmlElement[self.format[format].media].canPlayType(self.format[format].codec); - self.aurora.canPlay[format] = ($.inArray(format, self.aurora.formats) > -1); - self.flash.canPlay[format] = self.format[format].flashCanPlay && self.flash.available; - }); - this.html.desired = false; - this.aurora.desired = false; - this.flash.desired = false; - $.each(this.solutions, function(solutionPriority, solution) { - if(solutionPriority === 0) { - self[solution].desired = true; - } else { - var audioCanPlay = false; - var videoCanPlay = false; - $.each(self.formats, function(formatPriority, format) { - if(self[self.solutions[0]].canPlay[format]) { // The other solution can play - if(self.format[format].media === 'video') { - videoCanPlay = true; - } else { - audioCanPlay = true; - } - } - }); - self[solution].desired = (self.require.audio && !audioCanPlay) || (self.require.video && !videoCanPlay); - } - }); - // This is what jPlayer will support, based on solution and supplied. - this.html.support = {}; - this.aurora.support = {}; - this.flash.support = {}; - $.each(this.formats, function(priority, format) { - self.html.support[format] = self.html.canPlay[format] && self.html.desired; - self.aurora.support[format] = self.aurora.canPlay[format] && self.aurora.desired; - self.flash.support[format] = self.flash.canPlay[format] && self.flash.desired; - }); - // If jPlayer is supporting any format in a solution, then the solution is used. - this.html.used = false; - this.aurora.used = false; - this.flash.used = false; - $.each(this.solutions, function(solutionPriority, solution) { - $.each(self.formats, function(formatPriority, format) { - if(self[solution].support[format]) { - self[solution].used = true; - return false; - } - }); - }); - - // Init solution active state and the event gates to false. - this._resetActive(); - this._resetGate(); - - // Set up the css selectors for the control and feedback entities. - this._cssSelectorAncestor(this.options.cssSelectorAncestor); - - // If neither html nor aurora nor flash are being used by this browser, then media playback is not possible. Trigger an error event. - if(!(this.html.used || this.aurora.used || this.flash.used)) { - this._error( { - type: $.jPlayer.error.NO_SOLUTION, - context: "{solution:'" + this.options.solution + "', supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SOLUTION, - hint: $.jPlayer.errorHint.NO_SOLUTION - }); - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.show(); - } - } else { - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.hide(); - } - } - - // Add the flash solution if it is being used. - if(this.flash.used) { - var htmlObj, - flashVars = 'jQuery=' + encodeURI(this.options.noConflict) + '&id=' + encodeURI(this.internal.self.id) + '&vol=' + this.options.volume + '&muted=' + this.options.muted; - - // Code influenced by SWFObject 2.2: http://code.google.com/p/swfobject/ - // Non IE browsers have an initial Flash size of 1 by 1 otherwise the wmode affected the Flash ready event. - - if($.jPlayer.browser.msie && (Number($.jPlayer.browser.version) < 9 || $.jPlayer.browser.documentMode < 9)) { - var objStr = ''; - - var paramStr = [ - '', - '', - '', - '', - '' - ]; - - htmlObj = document.createElement(objStr); - for(var i=0; i < paramStr.length; i++) { - htmlObj.appendChild(document.createElement(paramStr[i])); - } - } else { - var createParam = function(el, n, v) { - var p = document.createElement("param"); - p.setAttribute("name", n); - p.setAttribute("value", v); - el.appendChild(p); - }; - - htmlObj = document.createElement("object"); - htmlObj.setAttribute("id", this.internal.flash.id); - htmlObj.setAttribute("name", this.internal.flash.id); - htmlObj.setAttribute("data", this.internal.flash.swf); - htmlObj.setAttribute("type", "application/x-shockwave-flash"); - htmlObj.setAttribute("width", "1"); // Non-zero - htmlObj.setAttribute("height", "1"); // Non-zero - htmlObj.setAttribute("tabindex", "-1"); - createParam(htmlObj, "flashvars", flashVars); - createParam(htmlObj, "allowscriptaccess", "always"); - createParam(htmlObj, "bgcolor", this.options.backgroundColor); - createParam(htmlObj, "wmode", this.options.wmode); - } - - this.element.append(htmlObj); - this.internal.flash.jq = $(htmlObj); - } - - // Setup playbackRate ability before using _addHtmlEventListeners() - if(this.html.used && !this.flash.used) { // If only HTML - // Using the audio element capabilities for playbackRate. ie., Assuming video element is the same. - this.status.playbackRateEnabled = this._testPlaybackRate('audio'); - } else { - this.status.playbackRateEnabled = false; - } - - this._updatePlaybackRate(); - - // Add the HTML solution if being used. - if(this.html.used) { - - // The HTML Audio handlers - if(this.html.audio.available) { - this._addHtmlEventListeners(this.htmlElement.audio, this.html.audio); - this.element.append(this.htmlElement.audio); - this.internal.audio.jq = $("#" + this.internal.audio.id); - } - - // The HTML Video handlers - if(this.html.video.available) { - this._addHtmlEventListeners(this.htmlElement.video, this.html.video); - this.element.append(this.htmlElement.video); - this.internal.video.jq = $("#" + this.internal.video.id); - if(this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); // Using size 0x0 since a .hide() causes issues in iOS - } - this.internal.video.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - } - } - - // Add the Aurora.js solution if being used. - if(this.aurora.used) { - // Aurora.js player need to be created for each media, see setMedia function. - } - - // Create the bridge that emulates the HTML Media element on the jPlayer DIV - if( this.options.emulateHtml ) { - this._emulateHtmlBridge(); - } - - if((this.html.used || this.aurora.used) && !this.flash.used) { // If only HTML, then emulate flash ready() call after 100ms. - setTimeout( function() { - self.internal.ready = true; - self.version.flash = "n/a"; - self._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - self._trigger($.jPlayer.event.ready); - }, 100); - } - - // Initialize the interface components with the options. - this._updateNativeVideoControls(); - // The other controls are now setup in _cssSelectorAncestor() - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - - $.jPlayer.prototype.count++; // Change static variable via prototype. - }, - destroy: function() { - // MJP: The background change remains. Would need to store the original to restore it correctly. - // MJP: The jPlayer element's size change remains. - - // Clear the media to reset the GUI and stop any downloads. Streams on some browsers had persited. (Chrome) - this.clearMedia(); - // Remove the size/sizeFull cssClass from the cssSelectorAncestor - this._removeUiClass(); - // Remove the times from the GUI - if(this.css.jq.currentTime.length) { - this.css.jq.currentTime.text(""); - } - if(this.css.jq.duration.length) { - this.css.jq.duration.text(""); - } - // Remove any bindings from the interface controls. - $.each(this.css.jq, function(fn, jq) { - // Check selector is valid before trying to execute method. - if(jq.length) { - jq.unbind(".jPlayer"); - } - }); - // Remove the click handlers for $.jPlayer.event.click - this.internal.poster.jq.unbind(".jPlayer"); - if(this.internal.video.jq) { - this.internal.video.jq.unbind(".jPlayer"); - } - // Remove the fullscreen event handlers - this._fullscreenRemoveEventListeners(); - // Remove key bindings - if(this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - // Destroy the HTML bridge. - if(this.options.emulateHtml) { - this._destroyHtmlBridge(); - } - this.element.removeData("jPlayer"); // Remove jPlayer data - this.element.unbind(".jPlayer"); // Remove all event handlers created by the jPlayer constructor - this.element.empty(); // Remove the inserted child elements - - delete this.instances[this.internal.instance]; // Clear the instance on the static instance object - }, - destroyRemoved: function() { // Destroy any instances that have gone away. - var self = this; - $.each(this.instances, function(i, element) { - if(self.element !== element) { // Do not destroy this instance. - if(!element.data("jPlayer")) { // Check that element is a real jPlayer. - element.jPlayer("destroy"); - delete self.instances[i]; - } - } - }); - }, - enable: function() { // Plan to implement - // options.disabled = false - }, - disable: function () { // Plan to implement - // options.disabled = true - }, - _testCanPlayType: function(elem) { - // IE9 on Win Server 2008 did not implement canPlayType(), but it has the property. - try { - elem.canPlayType(this.format.mp3.codec); // The type is irrelevant. - return true; - } catch(err) { - return false; - } - }, - _testPlaybackRate: function(type) { - // type: String 'audio' or 'video' - var el, rate = 0.5; - type = typeof type === 'string' ? type : 'audio'; - el = document.createElement(type); - // Wrapping in a try/catch, just in case older HTML5 browsers throw and error. - try { - if('playbackRate' in el) { - el.playbackRate = rate; - return el.playbackRate === rate; - } else { - return false; - } - } catch(err) { - return false; - } - }, - _uaBlocklist: function(list) { - // list : object with properties that are all regular expressions. Property names are irrelevant. - // Returns true if the user agent is matched in list. - var ua = navigator.userAgent.toLowerCase(), - block = false; - - $.each(list, function(p, re) { - if(re && re.test(ua)) { - block = true; - return false; // exit $.each. - } - }); - return block; - }, - _restrictNativeVideoControls: function() { - // Fallback to noFullWindow when nativeVideoControls is true and audio media is being used. Affects when both media types are used. - if(this.require.audio) { - if(this.status.nativeVideoControls) { - this.status.nativeVideoControls = false; - this.status.noFullWindow = true; - } - } - }, - _updateNativeVideoControls: function() { - if(this.html.video.available && this.html.used) { - // Turn the HTML Video controls on/off - this.htmlElement.video.controls = this.status.nativeVideoControls; - // Show/hide the jPlayer GUI. - this._updateAutohide(); - // For when option changed. The poster image is not updated, as it is dealt with in setMedia(). Acceptable degradation since seriously doubt these options will change on the fly. Can again review later. - if(this.status.nativeVideoControls && this.require.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else if(this.status.waitForPlay && this.status.video) { - this.internal.poster.jq.show(); - this.internal.video.jq.css({'width': '0px', 'height': '0px'}); - } - } - }, - _addHtmlEventListeners: function(mediaElement, entity) { - var self = this; - mediaElement.preload = this.options.preload; - mediaElement.muted = this.options.muted; - mediaElement.volume = this.options.volume; - - if(this.status.playbackRateEnabled) { - mediaElement.defaultPlaybackRate = this.options.defaultPlaybackRate; - mediaElement.playbackRate = this.options.playbackRate; - } - - // Create the event listeners - // Only want the active entity to affect jPlayer and bubble events. - // Using entity.gate so that object is referenced and gate property always current - - mediaElement.addEventListener("progress", function() { - if(entity.gate) { - if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command - self.internal.cmdsIgnored = false; - } - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.progress); - } - }, false); - mediaElement.addEventListener("loadeddata", function() { - if(entity.gate) { - self.androidFix.setMedia = false; // Disable the fix after the first progress event. - if(self.androidFix.play) { // Play Android audio - performing the fix. - self.androidFix.play = false; - self.play(self.androidFix.time); - } - if(self.androidFix.pause) { // Pause Android audio at time - performing the fix. - self.androidFix.pause = false; - self.pause(self.androidFix.time); - } - self._trigger($.jPlayer.event.loadeddata); - } - }, false); - mediaElement.addEventListener("timeupdate", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.timeupdate); - } - }, false); - mediaElement.addEventListener("durationchange", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.durationchange); - } - }, false); - mediaElement.addEventListener("play", function() { - if(entity.gate) { - self._updateButtons(true); - self._html_checkWaitForPlay(); // So the native controls update this variable and puts the hidden interface in the correct state. Affects toggling native controls. - self._trigger($.jPlayer.event.play); - } - }, false); - mediaElement.addEventListener("playing", function() { - if(entity.gate) { - self._updateButtons(true); - self._seeked(); - self._trigger($.jPlayer.event.playing); - } - }, false); - mediaElement.addEventListener("pause", function() { - if(entity.gate) { - self._updateButtons(false); - self._trigger($.jPlayer.event.pause); - } - }, false); - mediaElement.addEventListener("waiting", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.waiting); - } - }, false); - mediaElement.addEventListener("seeking", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.seeking); - } - }, false); - mediaElement.addEventListener("seeked", function() { - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.seeked); - } - }, false); - mediaElement.addEventListener("volumechange", function() { - if(entity.gate) { - // Read the values back from the element as the Blackberry PlayBook shares the volume with the physical buttons master volume control. - // However, when tested 6th July 2011, those buttons do not generate an event. The physical play/pause button does though. - self.options.volume = mediaElement.volume; - self.options.muted = mediaElement.muted; - self._updateMute(); - self._updateVolume(); - self._trigger($.jPlayer.event.volumechange); - } - }, false); - mediaElement.addEventListener("ratechange", function() { - if(entity.gate) { - self.options.defaultPlaybackRate = mediaElement.defaultPlaybackRate; - self.options.playbackRate = mediaElement.playbackRate; - self._updatePlaybackRate(); - self._trigger($.jPlayer.event.ratechange); - } - }, false); - mediaElement.addEventListener("suspend", function() { // Seems to be the only way of capturing that the iOS4 browser did not actually play the media from the page code. ie., It needs a user gesture. - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.suspend); - } - }, false); - mediaElement.addEventListener("ended", function() { - if(entity.gate) { - // Order of the next few commands are important. Change the time and then pause. - // Solves a bug in Firefox, where issuing pause 1st causes the media to play from the start. ie., The pause is ignored. - if(!$.jPlayer.browser.webkit) { // Chrome crashes if you do this in conjunction with a setMedia command in an ended event handler. ie., The playlist demo. - self.htmlElement.media.currentTime = 0; // Safari does not care about this command. ie., It works with or without this line. (Both Safari and Chrome are Webkit.) - } - self.htmlElement.media.pause(); // Pause otherwise a click on the progress bar will play from that point, when it shouldn't, since it stopped playback. - self._updateButtons(false); - self._getHtmlStatus(mediaElement, true); // With override true. Otherwise Chrome leaves progress at full. - self._updateInterface(); - self._trigger($.jPlayer.event.ended); - } - }, false); - mediaElement.addEventListener("error", function() { - if(entity.gate) { - self._updateButtons(false); - self._seeked(); - if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event. - clearTimeout(self.internal.htmlDlyCmdId); // Clears any delayed commands used in the HTML solution. - self.status.waitForLoad = true; // Allows the load operation to try again. - self.status.waitForPlay = true; // Reset since a play was captured. - if(self.status.video && !self.status.nativeVideoControls) { - self.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) { - self.internal.poster.jq.show(); - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self._error( { - type: $.jPlayer.error.URL, - context: self.status.src, // this.src shows absolute urls. Want context to show the url given. - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - } - } - }, false); - // Create all the other event listeners that bubble up to a jPlayer event from html, without being used by jPlayer. - $.each($.jPlayer.htmlEvent, function(i, eventType) { - mediaElement.addEventListener(this, function() { - if(entity.gate) { - self._trigger($.jPlayer.event[eventType]); - } - }, false); - }); - }, - _addAuroraEventListeners : function(player, entity) { - var self = this; - //player.preload = this.options.preload; - //player.muted = this.options.muted; - player.volume = this.options.volume * 100; - - // Create the event listeners - // Only want the active entity to affect jPlayer and bubble events. - // Using entity.gate so that object is referenced and gate property always current - - player.on("progress", function() { - if(entity.gate) { - if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command - self.internal.cmdsIgnored = false; - } - self._getAuroraStatus(player); - self._updateInterface(); - self._trigger($.jPlayer.event.progress); - // Progress with song duration, we estimate timeupdate need to be triggered too. - if (player.duration > 0) { - self._trigger($.jPlayer.event.timeupdate); - } - } - }, false); - player.on("ready", function() { - if(entity.gate) { - self._trigger($.jPlayer.event.loadeddata); - } - }, false); - player.on("duration", function() { - if(entity.gate) { - self._getAuroraStatus(player); - self._updateInterface(); - self._trigger($.jPlayer.event.durationchange); - } - }, false); - player.on("end", function() { - if(entity.gate) { - // Order of the next few commands are important. Change the time and then pause. - self._updateButtons(false); - self._getAuroraStatus(player, true); - self._updateInterface(); - self._trigger($.jPlayer.event.ended); - } - }, false); - player.on("error", function() { - if(entity.gate) { - self._updateButtons(false); - self._seeked(); - if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event. - self.status.waitForLoad = true; // Allows the load operation to try again. - self.status.waitForPlay = true; // Reset since a play was captured. - if(self.status.video && !self.status.nativeVideoControls) { - self.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) { - self.internal.poster.jq.show(); - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self._error( { - type: $.jPlayer.error.URL, - context: self.status.src, // this.src shows absolute urls. Want context to show the url given. - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - } - } - }, false); - }, - _getHtmlStatus: function(media, override) { - var ct = 0, cpa = 0, sp = 0, cpr = 0; - - // Fixes the duration bug in iOS, where the durationchange event occurs when media.duration is not always correct. - // Fixes the initial duration bug in BB OS7, where the media.duration is infinity and displays as NaN:NaN due to Date() using inifity. - if(isFinite(media.duration)) { - this.status.duration = media.duration; - } - - ct = media.currentTime; - cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0; - if((typeof media.seekable === "object") && (media.seekable.length > 0)) { - sp = (this.status.duration > 0) ? 100 * media.seekable.end(media.seekable.length-1) / this.status.duration : 100; - cpr = (this.status.duration > 0) ? 100 * media.currentTime / media.seekable.end(media.seekable.length-1) : 0; // Duration conditional for iOS duration bug. ie., seekable.end is a NaN in that case. - } else { - sp = 100; - cpr = cpa; - } - - if(override) { - ct = 0; - cpr = 0; - cpa = 0; - } - - this.status.seekPercent = sp; - this.status.currentPercentRelative = cpr; - this.status.currentPercentAbsolute = cpa; - this.status.currentTime = ct; - - this.status.remaining = this.status.duration - this.status.currentTime; - - this.status.videoWidth = media.videoWidth; - this.status.videoHeight = media.videoHeight; - - this.status.readyState = media.readyState; - this.status.networkState = media.networkState; - this.status.playbackRate = media.playbackRate; - this.status.ended = media.ended; - }, - _getAuroraStatus: function(player, override) { - var ct = 0, cpa = 0, sp = 0, cpr = 0; - - this.status.duration = player.duration / 1000; - - ct = player.currentTime / 1000; - cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0; - if(player.buffered > 0) { - sp = (this.status.duration > 0) ? (player.buffered * this.status.duration) / this.status.duration : 100; - cpr = (this.status.duration > 0) ? ct / (player.buffered * this.status.duration) : 0; - } else { - sp = 100; - cpr = cpa; - } - - if(override) { - ct = 0; - cpr = 0; - cpa = 0; - } - - this.status.seekPercent = sp; - this.status.currentPercentRelative = cpr; - this.status.currentPercentAbsolute = cpa; - this.status.currentTime = ct; - - this.status.remaining = this.status.duration - this.status.currentTime; - - this.status.readyState = 4; // status.readyState; - this.status.networkState = 0; // status.networkState; - this.status.playbackRate = 1; // status.playbackRate; - this.status.ended = false; // status.ended; - }, - _resetStatus: function() { - this.status = $.extend({}, this.status, $.jPlayer.prototype.status); // Maintains the status properties that persist through a reset. - }, - _trigger: function(eventType, error, warning) { // eventType always valid as called using $.jPlayer.event.eventType - var event = $.Event(eventType); - event.jPlayer = {}; - event.jPlayer.version = $.extend({}, this.version); - event.jPlayer.options = $.extend(true, {}, this.options); // Deep copy - event.jPlayer.status = $.extend(true, {}, this.status); // Deep copy - event.jPlayer.html = $.extend(true, {}, this.html); // Deep copy - event.jPlayer.aurora = $.extend(true, {}, this.aurora); // Deep copy - event.jPlayer.flash = $.extend(true, {}, this.flash); // Deep copy - if(error) { - event.jPlayer.error = $.extend({}, error); - } - if(warning) { - event.jPlayer.warning = $.extend({}, warning); - } - this.element.trigger(event); - }, - jPlayerFlashEvent: function(eventType, status) { // Called from Flash - if(eventType === $.jPlayer.event.ready) { - if(!this.internal.ready) { - this.internal.ready = true; - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Once Flash generates the ready event, minimise to zero as it is not affected by wmode anymore. - - this.version.flash = status.version; - if(this.version.needFlash !== this.version.flash) { - this._error( { - type: $.jPlayer.error.VERSION, - context: this.version.flash, - message: $.jPlayer.errorMsg.VERSION + this.version.flash, - hint: $.jPlayer.errorHint.VERSION - }); - } - this._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - this._trigger(eventType); - } else { - // This condition occurs if the Flash is hidden and then shown again. - // Firefox also reloads the Flash if the CSS position changes. position:fixed is used for full screen. - - // Only do this if the Flash is the solution being used at the moment. Affects Media players where both solution may be being used. - if(this.flash.gate) { - - // Send the current status to the Flash now that it is ready (available) again. - if(this.status.srcSet) { - - // Need to read original status before issuing the setMedia command. - var currentTime = this.status.currentTime, - paused = this.status.paused; - - this.setMedia(this.status.media); - this.volumeWorker(this.options.volume); - if(currentTime > 0) { - if(paused) { - this.pause(currentTime); - } else { - this.play(currentTime); - } - } - } - this._trigger($.jPlayer.event.flashreset); - } - } - } - if(this.flash.gate) { - switch(eventType) { - case $.jPlayer.event.progress: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.timeupdate: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.play: - this._seeked(); - this._updateButtons(true); - this._trigger(eventType); - break; - case $.jPlayer.event.pause: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.ended: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.click: - this._trigger(eventType); // This could be dealt with by the default - break; - case $.jPlayer.event.error: - this.status.waitForLoad = true; // Allows the load operation to try again. - this.status.waitForPlay = true; // Reset since a play was captured. - if(this.status.video) { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); - } - if(this._validString(this.status.media.poster)) { - this.internal.poster.jq.show(); - } - if(this.css.jq.videoPlay.length && this.status.video) { - this.css.jq.videoPlay.show(); - } - if(this.status.video) { // Set up for another try. Execute before error event. - this._flash_setVideo(this.status.media); - } else { - this._flash_setAudio(this.status.media); - } - this._updateButtons(false); - this._error( { - type: $.jPlayer.error.URL, - context:status.src, - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - break; - case $.jPlayer.event.seeking: - this._seeking(); - this._trigger(eventType); - break; - case $.jPlayer.event.seeked: - this._seeked(); - this._trigger(eventType); - break; - case $.jPlayer.event.ready: - // The ready event is handled outside the switch statement. - // Captured here otherwise 2 ready events would be generated if the ready event handler used setMedia. - break; - default: - this._trigger(eventType); - } - } - return false; - }, - _getFlashStatus: function(status) { - this.status.seekPercent = status.seekPercent; - this.status.currentPercentRelative = status.currentPercentRelative; - this.status.currentPercentAbsolute = status.currentPercentAbsolute; - this.status.currentTime = status.currentTime; - this.status.duration = status.duration; - this.status.remaining = status.duration - status.currentTime; - - this.status.videoWidth = status.videoWidth; - this.status.videoHeight = status.videoHeight; - - // The Flash does not generate this information in this release - this.status.readyState = 4; // status.readyState; - this.status.networkState = 0; // status.networkState; - this.status.playbackRate = 1; // status.playbackRate; - this.status.ended = false; // status.ended; - }, - _updateButtons: function(playing) { - if(playing === undefined) { - playing = !this.status.paused; - } else { - this.status.paused = !playing; - } - // Apply the state classes. (For the useStateClassSkin:true option) - if(playing) { - this.addStateClass('playing'); - } else { - this.removeStateClass('playing'); - } - if(!this.status.noFullWindow && this.options.fullWindow) { - this.addStateClass('fullScreen'); - } else { - this.removeStateClass('fullScreen'); - } - if(this.options.loop) { - this.addStateClass('looped'); - } else { - this.removeStateClass('looped'); - } - // Toggle the GUI element pairs. (For the useStateClassSkin:false option) - if(this.css.jq.play.length && this.css.jq.pause.length) { - if(playing) { - this.css.jq.play.hide(); - this.css.jq.pause.show(); - } else { - this.css.jq.play.show(); - this.css.jq.pause.hide(); - } - } - if(this.css.jq.restoreScreen.length && this.css.jq.fullScreen.length) { - if(this.status.noFullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.hide(); - } else if(this.options.fullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.show(); - } else { - this.css.jq.fullScreen.show(); - this.css.jq.restoreScreen.hide(); - } - } - if(this.css.jq.repeat.length && this.css.jq.repeatOff.length) { - if(this.options.loop) { - this.css.jq.repeat.hide(); - this.css.jq.repeatOff.show(); - } else { - this.css.jq.repeat.show(); - this.css.jq.repeatOff.hide(); - } - } - }, - _updateInterface: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.width(this.status.seekPercent+"%"); - } - if(this.css.jq.playBar.length) { - if(this.options.smoothPlayBar) { - this.css.jq.playBar.stop().animate({ - width: this.status.currentPercentAbsolute+"%" - }, 250, "linear"); - } else { - this.css.jq.playBar.width(this.status.currentPercentRelative+"%"); - } - } - var currentTimeText = ''; - if(this.css.jq.currentTime.length) { - currentTimeText = this._convertTime(this.status.currentTime); - if(currentTimeText !== this.css.jq.currentTime.text()) { - this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)); - } - } - var durationText = '', - duration = this.status.duration, - remaining = this.status.remaining; - if(this.css.jq.duration.length) { - if(typeof this.status.media.duration === 'string') { - durationText = this.status.media.duration; - } else { - if(typeof this.status.media.duration === 'number') { - duration = this.status.media.duration; - remaining = duration - this.status.currentTime; - } - if(this.options.remainingDuration) { - durationText = (remaining > 0 ? '-' : '') + this._convertTime(remaining); - } else { - durationText = this._convertTime(duration); - } - } - if(durationText !== this.css.jq.duration.text()) { - this.css.jq.duration.text(durationText); - } - } - }, - _convertTime: ConvertTime.prototype.time, - _seeking: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.addClass("jp-seeking-bg"); - } - this.addStateClass('seeking'); - }, - _seeked: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.removeClass("jp-seeking-bg"); - } - this.removeStateClass('seeking'); - }, - _resetGate: function() { - this.html.audio.gate = false; - this.html.video.gate = false; - this.aurora.gate = false; - this.flash.gate = false; - }, - _resetActive: function() { - this.html.active = false; - this.aurora.active = false; - this.flash.active = false; - }, - _escapeHtml: function(s) { - return s.split('&').join('&').split('<').join('<').split('>').join('>').split('"').join('"'); - }, - _qualifyURL: function(url) { - var el = document.createElement('div'); - el.innerHTML= 'x'; - return el.firstChild.href; - }, - _absoluteMediaUrls: function(media) { - var self = this; - $.each(media, function(type, url) { - if(url && self.format[type] && url.substr(0, 5) !== "data:") { - media[type] = self._qualifyURL(url); - } - }); - return media; - }, - addStateClass: function(state) { - if(this.ancestorJq.length) { - this.ancestorJq.addClass(this.options.stateClass[state]); - } - }, - removeStateClass: function(state) { - if(this.ancestorJq.length) { - this.ancestorJq.removeClass(this.options.stateClass[state]); - } - }, - setMedia: function(media) { - - /* media[format] = String: URL of format. Must contain all of the supplied option's video or audio formats. - * media.poster = String: Video poster URL. - * media.track = Array: Of objects defining the track element: kind, src, srclang, label, def. - * media.stream = Boolean: * NOT IMPLEMENTED * Designating actual media streams. ie., "false/undefined" for files. Plan to refresh the flash every so often. - */ - - var self = this, - supported = false, - posterChanged = this.status.media.poster !== media.poster; // Compare before reset. Important for OSX Safari as this.htmlElement.poster.src is absolute, even if original poster URL was relative. - - this._resetMedia(); - this._resetGate(); - this._resetActive(); - - // Clear the Android Fix. - this.androidFix.setMedia = false; - this.androidFix.play = false; - this.androidFix.pause = false; - - // Convert all media URLs to absolute URLs. - media = this._absoluteMediaUrls(media); - - $.each(this.formats, function(formatPriority, format) { - var isVideo = self.format[format].media === 'video'; - $.each(self.solutions, function(solutionPriority, solution) { - if(self[solution].support[format] && self._validString(media[format])) { // Format supported in solution and url given for format. - var isHtml = solution === 'html'; - var isAurora = solution === 'aurora'; - - if(isVideo) { - if(isHtml) { - self.html.video.gate = true; - self._html_setVideo(media); - self.html.active = true; - } else { - self.flash.gate = true; - self._flash_setVideo(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self.status.video = true; - } else { - if(isHtml) { - self.html.audio.gate = true; - self._html_setAudio(media); - self.html.active = true; - - // Setup the Android Fix - Only for HTML audio. - if($.jPlayer.platform.android) { - self.androidFix.setMedia = true; - } - } else if(isAurora) { - self.aurora.gate = true; - self._aurora_setAudio(media); - self.aurora.active = true; - } else { - self.flash.gate = true; - self._flash_setAudio(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.hide(); - } - self.status.video = false; - } - - supported = true; - return false; // Exit $.each - } - }); - if(supported) { - return false; // Exit $.each - } - }); - - if(supported) { - if(!(this.status.nativeVideoControls && this.html.video.gate)) { - // Set poster IMG if native video controls are not being used - // Note: With IE the IMG onload event occurs immediately when cached. - // Note: Poster hidden by default in _resetMedia() - if(this._validString(media.poster)) { - if(posterChanged) { // Since some browsers do not generate img onload event. - this.htmlElement.poster.src = media.poster; - } else { - this.internal.poster.jq.show(); - } - } - } - if(typeof media.title === 'string') { - if(this.css.jq.title.length) { - this.css.jq.title.html(media.title); - } - if(this.htmlElement.audio) { - this.htmlElement.audio.setAttribute('title', media.title); - } - if(this.htmlElement.video) { - this.htmlElement.video.setAttribute('title', media.title); - } - } - this.status.srcSet = true; - this.status.media = $.extend({}, media); - this._updateButtons(false); - this._updateInterface(); - this._trigger($.jPlayer.event.setmedia); - } else { // jPlayer cannot support any formats provided in this browser - // Send an error event - this._error( { - type: $.jPlayer.error.NO_SUPPORT, - context: "{supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SUPPORT, - hint: $.jPlayer.errorHint.NO_SUPPORT - }); - } - }, - _resetMedia: function() { - this._resetStatus(); - this._updateButtons(false); - this._updateInterface(); - this._seeked(); - this.internal.poster.jq.hide(); - - clearTimeout(this.internal.htmlDlyCmdId); - - if(this.html.active) { - this._html_resetMedia(); - } else if(this.aurora.active) { - this._aurora_resetMedia(); - } else if(this.flash.active) { - this._flash_resetMedia(); - } - }, - clearMedia: function() { - this._resetMedia(); - - if(this.html.active) { - this._html_clearMedia(); - } else if(this.aurora.active) { - this._aurora_clearMedia(); - } else if(this.flash.active) { - this._flash_clearMedia(); - } - - this._resetGate(); - this._resetActive(); - }, - load: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_load(); - } else if(this.aurora.active) { - this._aurora_load(); - } else if(this.flash.active) { - this._flash_load(); - } - } else { - this._urlNotSetError("load"); - } - }, - focus: function() { - if(this.options.keyEnabled) { - $.jPlayer.focus = this; - } - }, - play: function(time) { - var guiAction = typeof time === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && !this.status.paused) { - this.pause(time); // The time would be the click event, but passing it over so info is not lost. - } else { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - this.focus(); - if(this.html.active) { - this._html_play(time); - } else if(this.aurora.active) { - this._aurora_play(time); - } else if(this.flash.active) { - this._flash_play(time); - } - } else { - this._urlNotSetError("play"); - } - } - }, - videoPlay: function() { // Handles clicks on the play button over the video poster - this.play(); - }, - pause: function(time) { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(time); - } else if(this.aurora.active) { - this._aurora_pause(time); - } else if(this.flash.active) { - this._flash_pause(time); - } - } else { - this._urlNotSetError("pause"); - } - }, - tellOthers: function(command, conditions) { - var self = this, - hasConditions = typeof conditions === 'function', - args = Array.prototype.slice.call(arguments); // Convert arguments to an Array. - - if(typeof command !== 'string') { // Ignore, since no command. - return; // Return undefined to maintain chaining. - } - if(hasConditions) { - args.splice(1, 1); // Remove the conditions from the arguments - } - - $.jPlayer.prototype.destroyRemoved(); - $.each(this.instances, function() { - // Remember that "this" is the instance's "element" in the $.each() loop. - if(self.element !== this) { // Do not tell my instance. - if(!hasConditions || conditions.call(this.data("jPlayer"), self)) { - this.jPlayer.apply(this, args); - } - } - }); - }, - pauseOthers: function(time) { - this.tellOthers("pause", function() { - // In the conditions function, the "this" context is the other instance's jPlayer object. - return this.status.srcSet; - }, time); - }, - stop: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(0); - } else if(this.aurora.active) { - this._aurora_pause(0); - } else if(this.flash.active) { - this._flash_pause(0); - } - } else { - this._urlNotSetError("stop"); - } - }, - playHead: function(p) { - p = this._limitValue(p, 0, 100); - if(this.status.srcSet) { - if(this.html.active) { - this._html_playHead(p); - } else if(this.aurora.active) { - this._aurora_playHead(p); - } else if(this.flash.active) { - this._flash_playHead(p); - } - } else { - this._urlNotSetError("playHead"); - } - }, - _muted: function(muted) { - this.mutedWorker(muted); - if(this.options.globalVolume) { - this.tellOthers("mutedWorker", function() { - // Check the other instance has global volume enabled. - return this.options.globalVolume; - }, muted); - } - }, - mutedWorker: function(muted) { - this.options.muted = muted; - if(this.html.used) { - this._html_setProperty('muted', muted); - } - if(this.aurora.used) { - this._aurora_mute(muted); - } - if(this.flash.used) { - this._flash_mute(muted); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateMute(muted); - this._updateVolume(this.options.volume); - this._trigger($.jPlayer.event.volumechange); - } - }, - mute: function(mute) { // mute is either: undefined (true), an event object (true) or a boolean (muted). - var guiAction = typeof mute === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.muted) { - this._muted(false); - } else { - mute = mute === undefined ? true : !!mute; - this._muted(mute); - } - }, - unmute: function(unmute) { // unmute is either: undefined (true), an event object (true) or a boolean (!muted). - unmute = unmute === undefined ? true : !!unmute; - this._muted(!unmute); - }, - _updateMute: function(mute) { - if(mute === undefined) { - mute = this.options.muted; - } - if(mute) { - this.addStateClass('muted'); - } else { - this.removeStateClass('muted'); - } - if(this.css.jq.mute.length && this.css.jq.unmute.length) { - if(this.status.noVolume) { - this.css.jq.mute.hide(); - this.css.jq.unmute.hide(); - } else if(mute) { - this.css.jq.mute.hide(); - this.css.jq.unmute.show(); - } else { - this.css.jq.mute.show(); - this.css.jq.unmute.hide(); - } - } - }, - volume: function(v) { - this.volumeWorker(v); - if(this.options.globalVolume) { - this.tellOthers("volumeWorker", function() { - // Check the other instance has global volume enabled. - return this.options.globalVolume; - }, v); - } - }, - volumeWorker: function(v) { - v = this._limitValue(v, 0, 1); - this.options.volume = v; - - if(this.html.used) { - this._html_setProperty('volume', v); - } - if(this.aurora.used) { - this._aurora_volume(v); - } - if(this.flash.used) { - this._flash_volume(v); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateVolume(v); - this._trigger($.jPlayer.event.volumechange); - } - }, - volumeBar: function(e) { // Handles clicks on the volumeBar - if(this.css.jq.volumeBar.length) { - // Using $(e.currentTarget) to enable multiple volume bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - y = $bar.height() - e.pageY + offset.top, - h = $bar.height(); - if(this.options.verticalVolume) { - this.volume(y/h); - } else { - this.volume(x/w); - } - } - if(this.options.muted) { - this._muted(false); - } - }, - _updateVolume: function(v) { - if(v === undefined) { - v = this.options.volume; - } - v = this.options.muted ? 0 : v; - - if(this.status.noVolume) { - this.addStateClass('noVolume'); - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.hide(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.hide(); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.hide(); - } - } else { - this.removeStateClass('noVolume'); - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.show(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.show(); - this.css.jq.volumeBarValue[this.options.verticalVolume ? "height" : "width"]((v*100)+"%"); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.show(); - } - } - }, - volumeMax: function() { // Handles clicks on the volume max - this.volume(1); - if(this.options.muted) { - this._muted(false); - } - }, - _cssSelectorAncestor: function(ancestor) { - var self = this; - this.options.cssSelectorAncestor = ancestor; - this._removeUiClass(); - this.ancestorJq = ancestor ? $(ancestor) : []; // Would use $() instead of [], but it is only 1.4+ - if(ancestor && this.ancestorJq.length !== 1) { // So empty strings do not generate the warning. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: ancestor, - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.ancestorJq.length + " found for cssSelectorAncestor.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - this._addUiClass(); - $.each(this.options.cssSelector, function(fn, cssSel) { - self._cssSelector(fn, cssSel); - }); - - // Set the GUI to the current state. - this._updateInterface(); - this._updateButtons(); - this._updateAutohide(); - this._updateVolume(); - this._updateMute(); - }, - _cssSelector: function(fn, cssSel) { - var self = this; - if(typeof cssSel === 'string') { - if($.jPlayer.prototype.options.cssSelector[fn]) { - if(this.css.jq[fn] && this.css.jq[fn].length) { - this.css.jq[fn].unbind(".jPlayer"); - } - this.options.cssSelector[fn] = cssSel; - this.css.cs[fn] = this.options.cssSelectorAncestor + " " + cssSel; - - if(cssSel) { // Checks for empty string - this.css.jq[fn] = $(this.css.cs[fn]); - } else { - this.css.jq[fn] = []; // To comply with the css.jq[fn].length check before its use. As of jQuery 1.4 could have used $() for an empty set. - } - - if(this.css.jq[fn].length && this[fn]) { - var handler = function(e) { - e.preventDefault(); - self[fn](e); - if(self.options.autoBlur) { - $(this).blur(); - } else { - $(this).focus(); // Force focus for ARIA. - } - }; - this.css.jq[fn].bind("click.jPlayer", handler); // Using jPlayer namespace - } - - if(cssSel && this.css.jq[fn].length !== 1) { // So empty strings do not generate the warning. ie., they just remove the old one. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: this.css.cs[fn], - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.css.jq[fn].length + " found for " + fn + " method.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_METHOD, - context: fn, - message: $.jPlayer.warningMsg.CSS_SELECTOR_METHOD, - hint: $.jPlayer.warningHint.CSS_SELECTOR_METHOD - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_STRING, - context: cssSel, - message: $.jPlayer.warningMsg.CSS_SELECTOR_STRING, - hint: $.jPlayer.warningHint.CSS_SELECTOR_STRING - }); - } - }, - duration: function(e) { - if(this.options.toggleDuration) { - if(this.options.captureDuration) { - e.stopPropagation(); - } - this._setOption("remainingDuration", !this.options.remainingDuration); - } - }, - seekBar: function(e) { // Handles clicks on the seekBar - if(this.css.jq.seekBar.length) { - // Using $(e.currentTarget) to enable multiple seek bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - p = 100 * x / w; - this.playHead(p); - } - }, - playbackRate: function(pbr) { - this._setOption("playbackRate", pbr); - }, - playbackRateBar: function(e) { // Handles clicks on the playbackRateBar - if(this.css.jq.playbackRateBar.length) { - // Using $(e.currentTarget) to enable multiple playbackRate bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - y = $bar.height() - e.pageY + offset.top, - h = $bar.height(), - ratio, pbr; - if(this.options.verticalPlaybackRate) { - ratio = y/h; - } else { - ratio = x/w; - } - pbr = ratio * (this.options.maxPlaybackRate - this.options.minPlaybackRate) + this.options.minPlaybackRate; - this.playbackRate(pbr); - } - }, - _updatePlaybackRate: function() { - var pbr = this.options.playbackRate, - ratio = (pbr - this.options.minPlaybackRate) / (this.options.maxPlaybackRate - this.options.minPlaybackRate); - if(this.status.playbackRateEnabled) { - if(this.css.jq.playbackRateBar.length) { - this.css.jq.playbackRateBar.show(); - } - if(this.css.jq.playbackRateBarValue.length) { - this.css.jq.playbackRateBarValue.show(); - this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate ? "height" : "width"]((ratio*100)+"%"); - } - } else { - if(this.css.jq.playbackRateBar.length) { - this.css.jq.playbackRateBar.hide(); - } - if(this.css.jq.playbackRateBarValue.length) { - this.css.jq.playbackRateBarValue.hide(); - } - } - }, - repeat: function(event) { // Handle clicks on the repeat button - var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.loop) { - this._loop(false); - } else { - this._loop(true); - } - }, - repeatOff: function() { // Handle clicks on the repeatOff button - this._loop(false); - }, - _loop: function(loop) { - if(this.options.loop !== loop) { - this.options.loop = loop; - this._updateButtons(); - this._trigger($.jPlayer.event.repeat); - } - }, - - // Options code adapted from ui.widget.js (1.8.7). Made changes so the key can use dot notation. To match previous getData solution in jPlayer 1. - option: function(key, value) { - var options = key; - - // Enables use: options(). Returns a copy of options object - if ( arguments.length === 0 ) { - return $.extend( true, {}, this.options ); - } - - if(typeof key === "string") { - var keys = key.split("."); - - // Enables use: options("someOption") Returns a copy of the option. Supports dot notation. - if(value === undefined) { - - var opt = $.extend(true, {}, this.options); - for(var i = 0; i < keys.length; i++) { - if(opt[keys[i]] !== undefined) { - opt = opt[keys[i]]; - } else { - this._warning( { - type: $.jPlayer.warning.OPTION_KEY, - context: key, - message: $.jPlayer.warningMsg.OPTION_KEY, - hint: $.jPlayer.warningHint.OPTION_KEY - }); - return undefined; - } - } - return opt; - } - - // Enables use: options("someOptionObject", someObject}). Creates: {someOptionObject:someObject} - // Enables use: options("someOption", someValue). Creates: {someOption:someValue} - // Enables use: options("someOptionObject.someOption", someValue). Creates: {someOptionObject:{someOption:someValue}} - - options = {}; - var opts = options; - - for(var j = 0; j < keys.length; j++) { - if(j < keys.length - 1) { - opts[keys[j]] = {}; - opts = opts[keys[j]]; - } else { - opts[keys[j]] = value; - } - } - } - - // Otherwise enables use: options(optionObject). Uses original object (the key) - - this._setOptions(options); - - return this; - }, - _setOptions: function(options) { - var self = this; - $.each(options, function(key, value) { // This supports the 2 level depth that the options of jPlayer has. Would review if we ever need more depth. - self._setOption(key, value); - }); - - return this; - }, - _setOption: function(key, value) { - var self = this; - - // The ability to set options is limited at this time. - - switch(key) { - case "volume" : - this.volume(value); - break; - case "muted" : - this._muted(value); - break; - case "globalVolume" : - this.options[key] = value; - break; - case "cssSelectorAncestor" : - this._cssSelectorAncestor(value); // Set and refresh all associations for the new ancestor. - break; - case "cssSelector" : - $.each(value, function(fn, cssSel) { - self._cssSelector(fn, cssSel); // NB: The option is set inside this function, after further validity checks. - }); - break; - case "playbackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate); - if(this.html.used) { - this._html_setProperty('playbackRate', value); - } - this._updatePlaybackRate(); - break; - case "defaultPlaybackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate); - if(this.html.used) { - this._html_setProperty('defaultPlaybackRate', value); - } - this._updatePlaybackRate(); - break; - case "minPlaybackRate" : - this.options[key] = value = this._limitValue(value, 0.1, this.options.maxPlaybackRate - 0.1); - this._updatePlaybackRate(); - break; - case "maxPlaybackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate + 0.1, 16); - this._updatePlaybackRate(); - break; - case "fullScreen" : - if(this.options[key] !== value) { // if changed - var wkv = $.jPlayer.nativeFeatures.fullscreen.used.webkitVideo; - if(!wkv || wkv && !this.status.waitForPlay) { - if(!wkv) { // No sensible way to unset option on these devices. - this.options[key] = value; - } - if(value) { - this._requestFullscreen(); - } else { - this._exitFullscreen(); - } - if(!wkv) { - this._setOption("fullWindow", value); - } - } - } - break; - case "fullWindow" : - if(this.options[key] !== value) { // if changed - this._removeUiClass(); - this.options[key] = value; - this._refreshSize(); - } - break; - case "size" : - if(!this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "sizeFull" : - if(this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "autohide" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._updateAutohide(); - break; - case "loop" : - this._loop(value); - break; - case "remainingDuration" : - this.options[key] = value; - this._updateInterface(); - break; - case "toggleDuration" : - this.options[key] = value; - break; - case "nativeVideoControls" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this._restrictNativeVideoControls(); - this._updateNativeVideoControls(); - break; - case "noFullWindow" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); // Need to check again as noFullWindow can depend on this flag and the restrict() can override it. - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this._restrictNativeVideoControls(); - this._updateButtons(); - break; - case "noVolume" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - this._updateVolume(); - this._updateMute(); - break; - case "emulateHtml" : - if(this.options[key] !== value) { // To avoid multiple event handlers being created, if true already. - this.options[key] = value; - if(value) { - this._emulateHtmlBridge(); - } else { - this._destroyHtmlBridge(); - } - } - break; - case "timeFormat" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - break; - case "keyEnabled" : - this.options[key] = value; - if(!value && this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - break; - case "keyBindings" : - this.options[key] = $.extend(true, {}, this.options[key], value); // store a merged DEEP copy of it, incase not all properties changed. - break; - case "audioFullScreen" : - this.options[key] = value; - break; - case "autoBlur" : - this.options[key] = value; - break; - } - - return this; - }, - // End of: (Options code adapted from ui.widget.js) - - _refreshSize: function() { - this._setSize(); // update status and jPlayer element size - this._addUiClass(); // update the ui class - this._updateSize(); // update internal sizes - this._updateButtons(); - this._updateAutohide(); - this._trigger($.jPlayer.event.resize); - }, - _setSize: function() { - // Determine the current size from the options - if(this.options.fullWindow) { - this.status.width = this.options.sizeFull.width; - this.status.height = this.options.sizeFull.height; - this.status.cssClass = this.options.sizeFull.cssClass; - } else { - this.status.width = this.options.size.width; - this.status.height = this.options.size.height; - this.status.cssClass = this.options.size.cssClass; - } - - // Set the size of the jPlayer area. - this.element.css({'width': this.status.width, 'height': this.status.height}); - }, - _addUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.addClass(this.status.cssClass); - } - }, - _removeUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.removeClass(this.status.cssClass); - } - }, - _updateSize: function() { - // The poster uses show/hide so can simply resize it. - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - - // Video html or flash resized if necessary at this time, or if native video controls being used. - if(!this.status.waitForPlay && this.html.active && this.status.video || this.html.video.available && this.html.used && this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - else if(!this.status.waitForPlay && this.flash.active && this.status.video) { - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - }, - _updateAutohide: function() { - var self = this, - event = "mousemove.jPlayer", - namespace = ".jPlayerAutohide", - eventType = event + namespace, - handler = function(event) { - var moved = false, - deltaX, deltaY; - if(typeof self.internal.mouse !== "undefined") { - //get the change from last position to this position - deltaX = self.internal.mouse.x - event.pageX; - deltaY = self.internal.mouse.y - event.pageY; - moved = (Math.floor(deltaX) > 0) || (Math.floor(deltaY)>0); - } else { - moved = true; - } - // store current position for next method execution - self.internal.mouse = { - x : event.pageX, - y : event.pageY - }; - // if mouse has been actually moved, do the gui fadeIn/fadeOut - if (moved) { - self.css.jq.gui.fadeIn(self.options.autohide.fadeIn, function() { - clearTimeout(self.internal.autohideId); - self.internal.autohideId = setTimeout( function() { - self.css.jq.gui.fadeOut(self.options.autohide.fadeOut); - }, self.options.autohide.hold); - }); - } - }; - - if(this.css.jq.gui.length) { - - // End animations first so that its callback is executed now. - // Otherwise an in progress fadeIn animation still has the callback to fadeOut again. - this.css.jq.gui.stop(true, true); - - // Removes the fadeOut operation from the fadeIn callback. - clearTimeout(this.internal.autohideId); - // undefine mouse - delete this.internal.mouse; - - this.element.unbind(namespace); - this.css.jq.gui.unbind(namespace); - - if(!this.status.nativeVideoControls) { - if(this.options.fullWindow && this.options.autohide.full || !this.options.fullWindow && this.options.autohide.restored) { - this.element.bind(eventType, handler); - this.css.jq.gui.bind(eventType, handler); - this.css.jq.gui.hide(); - } else { - this.css.jq.gui.show(); - } - } else { - this.css.jq.gui.hide(); - } - } - }, - fullScreen: function(event) { - var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.fullScreen) { - this._setOption("fullScreen", false); - } else { - this._setOption("fullScreen", true); - } - }, - restoreScreen: function() { - this._setOption("fullScreen", false); - }, - _fullscreenAddEventListeners: function() { - var self = this, - fs = $.jPlayer.nativeFeatures.fullscreen; - - if(fs.api.fullscreenEnabled) { - if(fs.event.fullscreenchange) { - // Create the event handler function and store it for removal. - if(typeof this.internal.fullscreenchangeHandler !== 'function') { - this.internal.fullscreenchangeHandler = function() { - self._fullscreenchange(); - }; - } - document.addEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - // No point creating handler for fullscreenerror. - // Either logic avoids fullscreen occurring (w3c/moz), or their is no event on the browser (webkit). - } - }, - _fullscreenRemoveEventListeners: function() { - var fs = $.jPlayer.nativeFeatures.fullscreen; - if(this.internal.fullscreenchangeHandler) { - document.removeEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - }, - _fullscreenchange: function() { - // If nothing is fullscreen, then we cannot be in fullscreen mode. - if(this.options.fullScreen && !$.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()) { - this._setOption("fullScreen", false); - } - }, - _requestFullscreen: function() { - // Either the container or the jPlayer div - var e = this.ancestorJq.length ? this.ancestorJq[0] : this.element[0], - fs = $.jPlayer.nativeFeatures.fullscreen; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.requestFullscreen(e); - } - }, - _exitFullscreen: function() { - - var fs = $.jPlayer.nativeFeatures.fullscreen, - e; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.exitFullscreen(e); - } - }, - _html_initMedia: function(media) { - // Remove any existing track elements - var $media = $(this.htmlElement.media).empty(); - - // Create any track elements given with the media, as an Array of track Objects. - $.each(media.track || [], function(i,v) { - var track = document.createElement('track'); - track.setAttribute("kind", v.kind ? v.kind : ""); - track.setAttribute("src", v.src ? v.src : ""); - track.setAttribute("srclang", v.srclang ? v.srclang : ""); - track.setAttribute("label", v.label ? v.label : ""); - if(v.def) { - track.setAttribute("default", v.def); - } - $media.append(track); - }); - - this.htmlElement.media.src = this.status.src; - - if(this.options.preload !== 'none') { - this._html_load(); // See function for comments - } - this._trigger($.jPlayer.event.timeupdate); // The flash generates this event for its solution. - }, - _html_setFormat: function(media) { - var self = this; - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.html.support[format] && media[format]) { - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - }, - _html_setAudio: function(media) { - this._html_setFormat(media); - this.htmlElement.media = this.htmlElement.audio; - this._html_initMedia(media); - }, - _html_setVideo: function(media) { - this._html_setFormat(media); - if(this.status.nativeVideoControls) { - this.htmlElement.video.poster = this._validString(media.poster) ? media.poster : ""; - } - this.htmlElement.media = this.htmlElement.video; - this._html_initMedia(media); - }, - _html_resetMedia: function() { - if(this.htmlElement.media) { - if(this.htmlElement.media.id === this.internal.video.id && !this.status.nativeVideoControls) { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - this.htmlElement.media.pause(); - } - }, - _html_clearMedia: function() { - if(this.htmlElement.media) { - this.htmlElement.media.src = "about:blank"; - // The following load() is only required for Firefox 3.6 (PowerMacs). - // Recent HTMl5 browsers only require the src change. Due to changes in W3C spec and load() effect. - this.htmlElement.media.load(); // Stops an old, "in progress" download from continuing the download. Triggers the loadstart, error and emptied events, due to the empty src. Also an abort event if a download was in progress. - } - }, - _html_load: function() { - // This function remains to allow the early HTML5 browsers to work, such as Firefox 3.6 - // A change in the W3C spec for the media.load() command means that this is no longer necessary. - // This command should be removed and actually causes minor undesirable effects on some browsers. Such as loading the whole file and not only the metadata. - if(this.status.waitForLoad) { - this.status.waitForLoad = false; - this.htmlElement.media.load(); - } - clearTimeout(this.internal.htmlDlyCmdId); - }, - _html_play: function(time) { - var self = this, - media = this.htmlElement.media; - - this.androidFix.pause = false; // Cancel the pause fix. - - this._html_load(); // Loads if required and clears any delayed commands. - - // Setup the Android Fix. - if(this.androidFix.setMedia) { - this.androidFix.play = true; - this.androidFix.time = time; - - } else if(!isNaN(time)) { - - // Attempt to play it, since iOS has been ignoring commands - if(this.internal.cmdsIgnored) { - media.play(); - } - - try { - // !media.seekable is for old HTML5 browsers, like Firefox 3.6. - // Checking seekable.length is important for iOS6 to work with setMedia().play(time) - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - media.play(); - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.play(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } else { - media.play(); - } - this._html_checkWaitForPlay(); - }, - _html_pause: function(time) { - var self = this, - media = this.htmlElement.media; - - this.androidFix.play = false; // Cancel the play fix. - - if(time > 0) { // We do not want the stop() command, which does pause(0), causing a load operation. - this._html_load(); // Loads if required and clears any delayed commands. - } else { - clearTimeout(this.internal.htmlDlyCmdId); - } - - // Order of these commands is important for Safari (Win) and IE9. Pause then change currentTime. - media.pause(); - - // Setup the Android Fix. - if(this.androidFix.setMedia) { - this.androidFix.pause = true; - this.androidFix.time = time; - - } else if(!isNaN(time)) { - try { - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.pause(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this._html_checkWaitForPlay(); - } - }, - _html_playHead: function(percent) { - var self = this, - media = this.htmlElement.media; - - this._html_load(); // Loads if required and clears any delayed commands. - - // This playHead() method needs a refactor to apply the android fix. - - try { - if(typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = percent * media.seekable.end(media.seekable.length-1) / 100; - } else if(media.duration > 0 && !isNaN(media.duration)) { - media.currentTime = percent * media.duration / 100; - } else { - throw "e"; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.playHead(percent); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - if(!this.status.waitForLoad) { - this._html_checkWaitForPlay(); - } - }, - _html_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _html_setProperty: function(property, value) { - if(this.html.audio.available) { - this.htmlElement.audio[property] = value; - } - if(this.html.video.available) { - this.htmlElement.video[property] = value; - } - }, - _aurora_setAudio: function(media) { - var self = this; - - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.aurora.support[format] && media[format]) { - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - - return false; - } - }); - - this.aurora.player = new AV.Player.fromURL(this.status.src); - this._addAuroraEventListeners(this.aurora.player, this.aurora); - - if(this.options.preload === 'auto') { - this._aurora_load(); - this.status.waitForLoad = false; - } - }, - _aurora_resetMedia: function() { - if (this.aurora.player) { - this.aurora.player.stop(); - } - }, - _aurora_clearMedia: function() { - // Nothing to clear. - }, - _aurora_load: function() { - if(this.status.waitForLoad) { - this.status.waitForLoad = false; - this.aurora.player.preload(); - } - }, - _aurora_play: function(time) { - if (!this.status.waitForLoad) { - if (!isNaN(time)) { - this.aurora.player.seek(time); - } - } - if (!this.aurora.player.playing) { - this.aurora.player.play(); - } - this.status.waitForLoad = false; - this._aurora_checkWaitForPlay(); - - // No event from the player, update UI now. - this._updateButtons(true); - this._trigger($.jPlayer.event.play); - }, - _aurora_pause: function(time) { - if (!isNaN(time)) { - this.aurora.player.seek(time * 1000); - } - this.aurora.player.pause(); - - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this._aurora_checkWaitForPlay(); - } - - // No event from the player, update UI now. - this._updateButtons(false); - this._trigger($.jPlayer.event.pause); - }, - _aurora_playHead: function(percent) { - if(this.aurora.player.duration > 0) { - // The seek() sould be in milliseconds, but the only codec that works with seek (aac.js) uses seconds. - this.aurora.player.seek(percent * this.aurora.player.duration / 100); // Using seconds - } - - if(!this.status.waitForLoad) { - this._aurora_checkWaitForPlay(); - } - }, - _aurora_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - } - }, - _aurora_volume: function(v) { - this.aurora.player.volume = v * 100; - }, - _aurora_mute: function(m) { - if (m) { - this.aurora.properties.lastvolume = this.aurora.player.volume; - this.aurora.player.volume = 0; - } else { - this.aurora.player.volume = this.aurora.properties.lastvolume; - } - this.aurora.properties.muted = m; - }, - _flash_setAudio: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4a" : - case "fla" : - self._getMovie().fl_setAudio_m4a(media[format]); - break; - case "mp3" : - self._getMovie().fl_setAudio_mp3(media[format]); - break; - case "rtmpa": - self._getMovie().fl_setAudio_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_setVideo: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4v" : - case "flv" : - self._getMovie().fl_setVideo_m4v(media[format]); - break; - case "rtmpv": - self._getMovie().fl_setVideo_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_resetMedia: function() { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Must do via CSS as setting attr() to zero causes a jQuery error in IE. - this._flash_pause(NaN); - }, - _flash_clearMedia: function() { - try { - this._getMovie().fl_clearMedia(); - } catch(err) { this._flashError(err); } - }, - _flash_load: function() { - try { - this._getMovie().fl_load(); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - }, - _flash_play: function(time) { - try { - this._getMovie().fl_play(time); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - }, - _flash_pause: function(time) { - try { - this._getMovie().fl_pause(time); - } catch(err) { this._flashError(err); } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - } - }, - _flash_playHead: function(p) { - try { - this._getMovie().fl_play_head(p); - } catch(err) { this._flashError(err); } - if(!this.status.waitForLoad) { - this._flash_checkWaitForPlay(); - } - }, - _flash_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _flash_volume: function(v) { - try { - this._getMovie().fl_volume(v); - } catch(err) { this._flashError(err); } - }, - _flash_mute: function(m) { - try { - this._getMovie().fl_mute(m); - } catch(err) { this._flashError(err); } - }, - _getMovie: function() { - return document[this.internal.flash.id]; - }, - _getFlashPluginVersion: function() { - - // _getFlashPluginVersion() code influenced by: - // - FlashReplace 1.01: http://code.google.com/p/flashreplace/ - // - SWFObject 2.2: http://code.google.com/p/swfobject/ - - var version = 0, - flash; - if(window.ActiveXObject) { - try { - flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - if (flash) { // flash will return null when ActiveX is disabled - var v = flash.GetVariable("$version"); - if(v) { - v = v.split(" ")[1].split(","); - version = parseInt(v[0], 10) + "." + parseInt(v[1], 10); - } - } - } catch(e) {} - } - else if(navigator.plugins && navigator.mimeTypes.length > 0) { - flash = navigator.plugins["Shockwave Flash"]; - if(flash) { - version = navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/, "$1"); - } - } - return version * 1; // Converts to a number - }, - _checkForFlash: function (version) { - var flashOk = false; - if(this._getFlashPluginVersion() >= version) { - flashOk = true; - } - return flashOk; - }, - _validString: function(url) { - return (url && typeof url === "string"); // Empty strings return false - }, - _limitValue: function(value, min, max) { - return (value < min) ? min : ((value > max) ? max : value); - }, - _urlNotSetError: function(context) { - this._error( { - type: $.jPlayer.error.URL_NOT_SET, - context: context, - message: $.jPlayer.errorMsg.URL_NOT_SET, - hint: $.jPlayer.errorHint.URL_NOT_SET - }); - }, - _flashError: function(error) { - var errorType; - if(!this.internal.ready) { - errorType = "FLASH"; - } else { - errorType = "FLASH_DISABLED"; - } - this._error( { - type: $.jPlayer.error[errorType], - context: this.internal.flash.swf, - message: $.jPlayer.errorMsg[errorType] + error.message, - hint: $.jPlayer.errorHint[errorType] - }); - // Allow the audio player to recover if display:none and then shown again, or with position:fixed on Firefox. - // This really only affects audio in a media player, as an audio player could easily move the jPlayer element away from such issues. - this.internal.flash.jq.css({'width':'1px', 'height':'1px'}); - }, - _error: function(error) { - this._trigger($.jPlayer.event.error, error); - if(this.options.errorAlerts) { - this._alert("Error!" + (error.message ? "\n" + error.message : "") + (error.hint ? "\n" + error.hint : "") + "\nContext: " + error.context); - } - }, - _warning: function(warning) { - this._trigger($.jPlayer.event.warning, undefined, warning); - if(this.options.warningAlerts) { - this._alert("Warning!" + (warning.message ? "\n" + warning.message : "") + (warning.hint ? "\n" + warning.hint : "") + "\nContext: " + warning.context); - } - }, - _alert: function(message) { - var msg = "jPlayer " + this.version.script + " : id='" + this.internal.self.id +"' : " + message; - if(!this.options.consoleAlerts) { - alert(msg); - } else if(window.console && window.console.log) { - window.console.log(msg); - } - }, - _emulateHtmlBridge: function() { - var self = this; - - // Emulate methods on jPlayer's DOM element. - $.each( $.jPlayer.emulateMethods.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = function(arg) { - self[name](arg); - }; - - }); - - // Bubble jPlayer events to its DOM element. - $.each($.jPlayer.event, function(eventName,eventType) { - var nativeEvent = true; - $.each( $.jPlayer.reservedEvent.split(/\s+/g), function(i, name) { - if(name === eventName) { - nativeEvent = false; - return false; - } - }); - if(nativeEvent) { - self.element.bind(eventType + ".jPlayer.jPlayerHtml", function() { // With .jPlayer & .jPlayerHtml namespaces. - self._emulateHtmlUpdate(); - var domEvent = document.createEvent("Event"); - domEvent.initEvent(eventName, false, true); - self.internal.domNode.dispatchEvent(domEvent); - }); - } - // The error event would require a special case - }); - - // IE9 has a readyState property on all elements. The document should have it, but all (except media) elements inherit it in IE9. This conflicts with Popcorn, which polls the readyState. - }, - _emulateHtmlUpdate: function() { - var self = this; - - $.each( $.jPlayer.emulateStatus.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.status[name]; - }); - $.each( $.jPlayer.emulateOptions.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.options[name]; - }); - }, - _destroyHtmlBridge: function() { - var self = this; - - // Bridge event handlers are also removed by destroy() through .jPlayer namespace. - this.element.unbind(".jPlayerHtml"); // Remove all event handlers created by the jPlayer bridge. So you can change the emulateHtml option. - - // Remove the methods and properties - var emulated = $.jPlayer.emulateMethods + " " + $.jPlayer.emulateStatus + " " + $.jPlayer.emulateOptions; - $.each( emulated.split(/\s+/g), function(i, name) { - delete self.internal.domNode[name]; - }); - } - }; - - $.jPlayer.error = { - FLASH: "e_flash", - FLASH_DISABLED: "e_flash_disabled", - NO_SOLUTION: "e_no_solution", - NO_SUPPORT: "e_no_support", - URL: "e_url", - URL_NOT_SET: "e_url_not_set", - VERSION: "e_version" - }; - - $.jPlayer.errorMsg = { - FLASH: "jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ", // Used in: _flashError() - FLASH_DISABLED: "jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ", // Used in: _flashError() - NO_SOLUTION: "No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", // Used in: _init() - NO_SUPPORT: "It is not possible to play any media format provided in setMedia() on this browser using your current options.", // Used in: setMedia() - URL: "Media URL could not be loaded.", // Used in: jPlayerFlashEvent() and _addHtmlEventListeners() - URL_NOT_SET: "Attempt to issue media playback commands, while no media url is set.", // Used in: load(), play(), pause(), stop() and playHead() - VERSION: "jPlayer " + $.jPlayer.prototype.version.script + " needs Jplayer.swf version " + $.jPlayer.prototype.version.needFlash + " but found " // Used in: jPlayerReady() - }; - - $.jPlayer.errorHint = { - FLASH: "Check your swfPath option and that Jplayer.swf is there.", - FLASH_DISABLED: "Check that you have not display:none; the jPlayer entity or any ancestor.", - NO_SOLUTION: "Review the jPlayer options: support and supplied.", - NO_SUPPORT: "Video or audio formats defined in the supplied option are missing.", - URL: "Check media URL is valid.", - URL_NOT_SET: "Use setMedia() to set the media URL.", - VERSION: "Update jPlayer files." - }; - - $.jPlayer.warning = { - CSS_SELECTOR_COUNT: "e_css_selector_count", - CSS_SELECTOR_METHOD: "e_css_selector_method", - CSS_SELECTOR_STRING: "e_css_selector_string", - OPTION_KEY: "e_option_key" - }; - - $.jPlayer.warningMsg = { - CSS_SELECTOR_COUNT: "The number of css selectors found did not equal one: ", - CSS_SELECTOR_METHOD: "The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.", - CSS_SELECTOR_STRING: "The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.", - OPTION_KEY: "The option requested in jPlayer('option') is undefined." - }; - - $.jPlayer.warningHint = { - CSS_SELECTOR_COUNT: "Check your css selector and the ancestor.", - CSS_SELECTOR_METHOD: "Check your method name.", - CSS_SELECTOR_STRING: "Check your css selector is a string.", - OPTION_KEY: "Check your option name." - }; -})); diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.min.js b/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.min.js deleted file mode 100644 index 99f64d7..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! jPlayer 2.9.2 for jQuery ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b("object"==typeof exports?require("jquery"):a.jQuery?a.jQuery:a.Zepto)}(this,function(a,b){a.fn.jPlayer=function(c){var d="jPlayer",e="string"==typeof c,f=Array.prototype.slice.call(arguments,1),g=this;return c=!e&&f.length?a.extend.apply(null,[!0,c].concat(f)):c,e&&"_"===c.charAt(0)?g:(this.each(e?function(){var e=a(this).data(d),h=e&&a.isFunction(e[c])?e[c].apply(e,f):e;return h!==e&&h!==b?(g=h,!1):void 0}:function(){var b=a(this).data(d);b?b.option(c||{}):a(this).data(d,new a.jPlayer(c,this))}),g)},a.jPlayer=function(b,c){if(arguments.length){this.element=a(c),this.options=a.extend(!0,{},this.options,b);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()}),this._init()}},"function"!=typeof a.fn.stop&&(a.fn.stop=function(){}),a.jPlayer.emulateMethods="load play pause",a.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",a.jPlayer.emulateOptions="muted volume",a.jPlayer.reservedEvent="ready flashreset resize repeat error warning",a.jPlayer.event={},a.each(["ready","setmedia","flashreset","resize","repeat","click","error","warning","loadstart","progress","suspend","abort","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"],function(){a.jPlayer.event[this]="jPlayer_"+this}),a.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"],a.jPlayer.pause=function(){a.jPlayer.prototype.destroyRemoved(),a.each(a.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})},a.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var c=function(){this.init()};c.prototype={init:function(){this.options={timeFormat:a.jPlayer.timeFormat}},time:function(a){a=a&&"number"==typeof a?a:0;var b=new Date(1e3*a),c=b.getUTCHours(),d=this.options.timeFormat.showHour?b.getUTCMinutes():b.getUTCMinutes()+60*c,e=this.options.timeFormat.showMin?b.getUTCSeconds():b.getUTCSeconds()+60*d,f=this.options.timeFormat.padHour&&10>c?"0"+c:c,g=this.options.timeFormat.padMin&&10>d?"0"+d:d,h=this.options.timeFormat.padSec&&10>e?"0"+e:e,i="";return i+=this.options.timeFormat.showHour?f+this.options.timeFormat.sepHour:"",i+=this.options.timeFormat.showMin?g+this.options.timeFormat.sepMin:"",i+=this.options.timeFormat.showSec?h+this.options.timeFormat.sepSec:""}};var d=new c;a.jPlayer.convertTime=function(a){return d.time(a)},a.jPlayer.uaBrowser=function(a){var b=a.toLowerCase(),c=/(webkit)[ \/]([\w.]+)/,d=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/,g=c.exec(b)||d.exec(b)||e.exec(b)||b.indexOf("compatible")<0&&f.exec(b)||[];return{browser:g[1]||"",version:g[2]||"0"}},a.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),c=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/,d=/(ipad|playbook)/,e=/(android)/,f=/(mobile)/,g=c.exec(b)||[],h=d.exec(b)||!f.exec(b)&&e.exec(b)||[];return g[1]&&(g[1]=g[1].replace(/\s/g,"_")),{platform:g[1]||"",tablet:h[1]||""}},a.jPlayer.browser={},a.jPlayer.platform={};var e=a.jPlayer.uaBrowser(navigator.userAgent);e.browser&&(a.jPlayer.browser[e.browser]=!0,a.jPlayer.browser.version=e.version);var f=a.jPlayer.uaPlatform(navigator.userAgent);f.platform&&(a.jPlayer.platform[f.platform]=!0,a.jPlayer.platform.mobile=!f.tablet,a.jPlayer.platform.tablet=!!f.tablet),a.jPlayer.getDocMode=function(){var b;return a.jPlayer.browser.msie&&(document.documentMode?b=document.documentMode:(b=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(b=7))),b},a.jPlayer.browser.documentMode=a.jPlayer.getDocMode(),a.jPlayer.nativeFeatures={init:function(){var a,b,c,d=document,e=d.createElement("video"),f={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange","fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""],ms:["","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError"]},g=["w3c","moz","webkit","webkitVideo","ms"];for(this.fullscreen=a={support:{w3c:!!d[f.w3c[0]],moz:!!d[f.moz[0]],webkit:"function"==typeof d[f.webkit[3]],webkitVideo:"function"==typeof e[f.webkitVideo[2]],ms:"function"==typeof e[f.ms[2]]},used:{}},b=0,c=g.length;c>b;b++){var h=g[b];if(a.support[h]){a.spec=h,a.used[h]=!0;break}}if(a.spec){var i=f[a.spec];a.api={fullscreenEnabled:!0,fullscreenElement:function(a){return a=a?a:d,a[i[1]]},requestFullscreen:function(a){return a[i[2]]()},exitFullscreen:function(a){return a=a?a:d,a[i[3]]()}},a.event={fullscreenchange:i[4],fullscreenerror:i[5]}}else a.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},a.event={}}},a.jPlayer.nativeFeatures.init(),a.jPlayer.focus=null,a.jPlayer.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var g=function(b){var c,d=a.jPlayer.focus;d&&(a.each(a.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(a,d){return b.target.nodeName.toUpperCase()===d.toUpperCase()?(c=!0,!1):void 0}),c||a.each(d.options.keyBindings,function(c,e){return e&&a.isFunction(e.fn)&&("number"==typeof e.key&&b.which===e.key||"string"==typeof e.key&&b.key===e.key)?(b.preventDefault(),e.fn(d),!1):void 0}))};a.jPlayer.keys=function(b){var c="keydown.jPlayer";a(document.documentElement).unbind(c),b&&a(document.documentElement).bind(c,g)},a.jPlayer.keys(!0),a.jPlayer.prototype={count:0,version:{script:"2.9.2",needFlash:"2.9.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",auroraFormats:"wav",preload:"metadata",volume:.8,muted:!1,remainingDuration:!1,toggleDuration:!1,captureDuration:!0,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",title:".jp-title",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},stateClass:{playing:"jp-state-playing",seeking:"jp-state-seeking",muted:"jp-state-muted",looped:"jp-state-looped",fullScreen:"jp-state-full-screen",noVolume:"jp-state-no-volume"},useStateClassSkin:!1,autoBlur:!0,smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1e3},loop:!1,repeat:function(b){b.jPlayer.options.loop?a(this).unbind(".jPlayerRepeat").bind(a.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){a(this).jPlayer("play")}):a(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,android_phone:/(?=.*android)(?!.*chrome)(?=.*mobile)/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:!1,audioFullScreen:!1,keyBindings:{play:{key:80,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:70,fn:function(a){(a.status.video||a.options.audioFullScreen)&&a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:77,fn:function(a){a._muted(!a.options.muted)}},volumeUp:{key:190,fn:function(a){a.volume(a.options.volume+.1)}},volumeDown:{key:188,fn:function(a){a.volume(a.options.volume-.1)}},loop:{key:76,fn:function(a){a._loop(!a.options.loop)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,aurora:!0,flash:!0},format:{mp3:{codec:"audio/mpeg",flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var c=this;if(this.element.empty(),this.status=a.extend({},this.status),this.internal=a.extend({},this.internal),this.options.timeFormat=a.extend({},a.jPlayer.timeFormat,this.options.timeFormat),this.internal.cmdsIgnored=a.jPlayer.platform.ipad||a.jPlayer.platform.iphone||a.jPlayer.platform.ipod,this.internal.domNode=this.element.get(0),this.options.keyEnabled&&!a.jPlayer.focus&&(a.jPlayer.focus=this),this.androidFix={setMedia:!1,play:!1,pause:!1,time:0/0},a.jPlayer.platform.android&&(this.options.preload="auto"!==this.options.preload?"metadata":"auto"),this.formats=[],this.solutions=[],this.require={},this.htmlElement={},this.html={},this.html.audio={},this.html.video={},this.aurora={},this.aurora.formats=[],this.aurora.properties=[],this.flash={},this.css={},this.css.cs={},this.css.jq={},this.ancestorJq=[],this.options.volume=this._limitValue(this.options.volume,0,1),a.each(this.options.supplied.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.formats.push(e)}}),a.each(this.options.solution.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.solution[e]){var f=!1;a.each(c.solutions,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.solutions.push(e)}}),a.each(this.options.auroraFormats.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.aurora.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.aurora.formats.push(e)}}),this.internal.instance="jp_"+this.count,this.instances[this.internal.instance]=this.element,this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count),this.internal.self=a.extend({},{id:this.element.attr("id"),jq:this.element}),this.internal.audio=a.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:b}),this.internal.video=a.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:b}),this.internal.flash=a.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:b,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"jquery.jplayer.swf":"")}),this.internal.poster=a.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:b}),a.each(a.jPlayer.event,function(a,d){c.options[a]!==b&&(c.element.bind(d+".jPlayer",c.options[a]),c.options[a]=b)}),this.require.audio=!1,this.require.video=!1,a.each(this.formats,function(a,b){c.require[c.format[b].media]=!0}),this.options=this.require.video?a.extend(!0,{},this.optionsVideo,this.options):a.extend(!0,{},this.optionsAudio,this.options),this._setSize(),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow),this.status.noVolume=this._uaBlocklist(this.options.noVolume),a.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners(),this._restrictNativeVideoControls(),this.htmlElement.poster=document.createElement("img"),this.htmlElement.poster.id=this.internal.poster.id,this.htmlElement.poster.onload=function(){(!c.status.video||c.status.waitForPlay)&&c.internal.poster.jq.show()},this.element.append(this.htmlElement.poster),this.internal.poster.jq=a("#"+this.internal.poster.id),this.internal.poster.jq.css({width:this.status.width,height:this.status.height}),this.internal.poster.jq.hide(),this.internal.poster.jq.bind("click.jPlayer",function(){c._trigger(a.jPlayer.event.click)}),this.html.audio.available=!1,this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),this.htmlElement.audio.id=this.internal.audio.id,this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)),this.html.video.available=!1,this.require.video&&(this.htmlElement.video=document.createElement("video"),this.htmlElement.video.id=this.internal.video.id,this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)),this.flash.available=this._checkForFlash(10.1),this.html.canPlay={},this.aurora.canPlay={},this.flash.canPlay={},a.each(this.formats,function(b,d){c.html.canPlay[d]=c.html[c.format[d].media].available&&""!==c.htmlElement[c.format[d].media].canPlayType(c.format[d].codec),c.aurora.canPlay[d]=a.inArray(d,c.aurora.formats)>-1,c.flash.canPlay[d]=c.format[d].flashCanPlay&&c.flash.available}),this.html.desired=!1,this.aurora.desired=!1,this.flash.desired=!1,a.each(this.solutions,function(b,d){if(0===b)c[d].desired=!0;else{var e=!1,f=!1;a.each(c.formats,function(a,b){c[c.solutions[0]].canPlay[b]&&("video"===c.format[b].media?f=!0:e=!0)}),c[d].desired=c.require.audio&&!e||c.require.video&&!f}}),this.html.support={},this.aurora.support={},this.flash.support={},a.each(this.formats,function(a,b){c.html.support[b]=c.html.canPlay[b]&&c.html.desired,c.aurora.support[b]=c.aurora.canPlay[b]&&c.aurora.desired,c.flash.support[b]=c.flash.canPlay[b]&&c.flash.desired}),this.html.used=!1,this.aurora.used=!1,this.flash.used=!1,a.each(this.solutions,function(b,d){a.each(c.formats,function(a,b){return c[d].support[b]?(c[d].used=!0,!1):void 0})}),this._resetActive(),this._resetGate(),this._cssSelectorAncestor(this.options.cssSelectorAncestor),this.html.used||this.aurora.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:a.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SOLUTION,hint:a.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show()),this.flash.used){var d,e="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(a.jPlayer.browser.msie&&(Number(a.jPlayer.browser.version)<9||a.jPlayer.browser.documentMode<9)){var f='',g=['','','','',''];d=document.createElement(f);for(var h=0;h0&&(d.internal.cmdsIgnored=!1),d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress))},!1),b.addEventListener("loadeddata",function(){c.gate&&(d.androidFix.setMedia=!1,d.androidFix.play&&(d.androidFix.play=!1,d.play(d.androidFix.time)),d.androidFix.pause&&(d.androidFix.pause=!1,d.pause(d.androidFix.time)),d._trigger(a.jPlayer.event.loadeddata))},!1),b.addEventListener("timeupdate",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.timeupdate))},!1),b.addEventListener("durationchange",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.addEventListener("play",function(){c.gate&&(d._updateButtons(!0),d._html_checkWaitForPlay(),d._trigger(a.jPlayer.event.play))},!1),b.addEventListener("playing",function(){c.gate&&(d._updateButtons(!0),d._seeked(),d._trigger(a.jPlayer.event.playing))},!1),b.addEventListener("pause",function(){c.gate&&(d._updateButtons(!1),d._trigger(a.jPlayer.event.pause))},!1),b.addEventListener("waiting",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.waiting))},!1),b.addEventListener("seeking",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.seeking))},!1),b.addEventListener("seeked",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.seeked))},!1),b.addEventListener("volumechange",function(){c.gate&&(d.options.volume=b.volume,d.options.muted=b.muted,d._updateMute(),d._updateVolume(),d._trigger(a.jPlayer.event.volumechange))},!1),b.addEventListener("ratechange",function(){c.gate&&(d.options.defaultPlaybackRate=b.defaultPlaybackRate,d.options.playbackRate=b.playbackRate,d._updatePlaybackRate(),d._trigger(a.jPlayer.event.ratechange))},!1),b.addEventListener("suspend",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.suspend))},!1),b.addEventListener("ended",function(){c.gate&&(a.jPlayer.browser.webkit||(d.htmlElement.media.currentTime=0),d.htmlElement.media.pause(),d._updateButtons(!1),d._getHtmlStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.addEventListener("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(clearTimeout(d.internal.htmlDlyCmdId),d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1),a.each(a.jPlayer.htmlEvent,function(e,f){b.addEventListener(this,function(){c.gate&&d._trigger(a.jPlayer.event[f])},!1)})},_addAuroraEventListeners:function(b,c){var d=this;b.volume=100*this.options.volume,b.on("progress",function(){c.gate&&(d.internal.cmdsIgnored&&this.readyState>0&&(d.internal.cmdsIgnored=!1),d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress),b.duration>0&&d._trigger(a.jPlayer.event.timeupdate))},!1),b.on("ready",function(){c.gate&&d._trigger(a.jPlayer.event.loadeddata)},!1),b.on("duration",function(){c.gate&&(d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.on("end",function(){c.gate&&(d._updateButtons(!1),d._getAuroraStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.on("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1)},_getHtmlStatus:function(a,b){var c=0,d=0,e=0,f=0;isFinite(a.duration)&&(this.status.duration=a.duration),c=a.currentTime,d=this.status.duration>0?100*c/this.status.duration:0,"object"==typeof a.seekable&&a.seekable.length>0?(e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=a.readyState,this.status.networkState=a.networkState,this.status.playbackRate=a.playbackRate,this.status.ended=a.ended},_getAuroraStatus:function(a,b){var c=0,d=0,e=0,f=0;this.status.duration=a.duration/1e3,c=a.currentTime/1e3,d=this.status.duration>0?100*c/this.status.duration:0,a.buffered>0?(e=this.status.duration>0?a.buffered*this.status.duration/this.status.duration:100,f=this.status.duration>0?c/(a.buffered*this.status.duration):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_resetStatus:function(){this.status=a.extend({},this.status,a.jPlayer.prototype.status)},_trigger:function(b,c,d){var e=a.Event(b);e.jPlayer={},e.jPlayer.version=a.extend({},this.version),e.jPlayer.options=a.extend(!0,{},this.options),e.jPlayer.status=a.extend(!0,{},this.status),e.jPlayer.html=a.extend(!0,{},this.html),e.jPlayer.aurora=a.extend(!0,{},this.aurora),e.jPlayer.flash=a.extend(!0,{},this.flash),c&&(e.jPlayer.error=a.extend({},c)),d&&(e.jPlayer.warning=a.extend({},d)),this.element.trigger(e)},jPlayerFlashEvent:function(b,c){if(b===a.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media),this.volumeWorker(this.options.volume),d>0&&(e?this.pause(d):this.play(d))}this._trigger(a.jPlayer.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:a.jPlayer.error.VERSION,context:this.version.flash,message:a.jPlayer.errorMsg.VERSION+this.version.flash,hint:a.jPlayer.errorHint.VERSION}),this._trigger(a.jPlayer.event.repeat),this._trigger(b);if(this.flash.gate)switch(b){case a.jPlayer.event.progress:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.timeupdate:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.play:this._seeked(),this._updateButtons(!0),this._trigger(b);break;case a.jPlayer.event.pause:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.ended:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.click:this._trigger(b);break;case a.jPlayer.event.error:this.status.waitForLoad=!0,this.status.waitForPlay=!0,this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"}),this._validString(this.status.media.poster)&&this.internal.poster.jq.show(),this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show(),this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media),this._updateButtons(!1),this._error({type:a.jPlayer.error.URL,context:c.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL});break;case a.jPlayer.event.seeking:this._seeking(),this._trigger(b);break;case a.jPlayer.event.seeked:this._seeked(),this._trigger(b);break;case a.jPlayer.event.ready:break;default:this._trigger(b)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent,this.status.currentPercentRelative=a.currentPercentRelative,this.status.currentPercentAbsolute=a.currentPercentAbsolute,this.status.currentTime=a.currentTime,this.status.duration=a.duration,this.status.remaining=a.duration-a.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_updateButtons:function(a){a===b?a=!this.status.paused:this.status.paused=!a,a?this.addStateClass("playing"):this.removeStateClass("playing"),!this.status.noFullWindow&&this.options.fullWindow?this.addStateClass("fullScreen"):this.removeStateClass("fullScreen"),this.options.loop?this.addStateClass("looped"):this.removeStateClass("looped"),this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide())),this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&&(this.status.noFullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide())),this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%"),this.css.jq.playBar.length&&(this.options.smoothPlayBar?this.css.jq.playBar.stop().animate({width:this.status.currentPercentAbsolute+"%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%"));var a="";this.css.jq.currentTime.length&&(a=this._convertTime(this.status.currentTime),a!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)));var b="",c=this.status.duration,d=this.status.remaining;this.css.jq.duration.length&&("string"==typeof this.status.media.duration?b=this.status.media.duration:("number"==typeof this.status.media.duration&&(c=this.status.media.duration,d=c-this.status.currentTime),b=this.options.remainingDuration?(d>0?"-":"")+this._convertTime(d):this._convertTime(c)),b!==this.css.jq.duration.text()&&this.css.jq.duration.text(b))},_convertTime:c.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg"),this.addStateClass("seeking")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg"),this.removeStateClass("seeking")},_resetGate:function(){this.html.audio.gate=!1,this.html.video.gate=!1,this.aurora.gate=!1,this.flash.gate=!1},_resetActive:function(){this.html.active=!1,this.aurora.active=!1,this.flash.active=!1},_escapeHtml:function(a){return a.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")},_qualifyURL:function(a){var b=document.createElement("div"); -return b.innerHTML='x',b.firstChild.href},_absoluteMediaUrls:function(b){var c=this;return a.each(b,function(a,d){d&&c.format[a]&&"data:"!==d.substr(0,5)&&(b[a]=c._qualifyURL(d))}),b},addStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[a])},removeStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[a])},setMedia:function(b){var c=this,d=!1,e=this.status.media.poster!==b.poster;this._resetMedia(),this._resetGate(),this._resetActive(),this.androidFix.setMedia=!1,this.androidFix.play=!1,this.androidFix.pause=!1,b=this._absoluteMediaUrls(b),a.each(this.formats,function(e,f){var g="video"===c.format[f].media;return a.each(c.solutions,function(e,h){if(c[h].support[f]&&c._validString(b[f])){var i="html"===h,j="aurora"===h;return g?(i?(c.html.video.gate=!0,c._html_setVideo(b),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show(),c.status.video=!0):(i?(c.html.audio.gate=!0,c._html_setAudio(b),c.html.active=!0,a.jPlayer.platform.android&&(c.androidFix.setMedia=!0)):j?(c.aurora.gate=!0,c._aurora_setAudio(b),c.aurora.active=!0):(c.flash.gate=!0,c._flash_setAudio(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1),d=!0,!1}}),d?!1:void 0}),d?(this.status.nativeVideoControls&&this.html.video.gate||this._validString(b.poster)&&(e?this.htmlElement.poster.src=b.poster:this.internal.poster.jq.show()),"string"==typeof b.title&&(this.css.jq.title.length&&this.css.jq.title.html(b.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",b.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",b.title)),this.status.srcSet=!0,this.status.media=a.extend({},b),this._updateButtons(!1),this._updateInterface(),this._trigger(a.jPlayer.event.setmedia)):this._error({type:a.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SUPPORT,hint:a.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus(),this._updateButtons(!1),this._updateInterface(),this._seeked(),this.internal.poster.jq.hide(),clearTimeout(this.internal.htmlDlyCmdId),this.html.active?this._html_resetMedia():this.aurora.active?this._aurora_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia(),this.html.active?this._html_clearMedia():this.aurora.active?this._aurora_clearMedia():this.flash.active&&this._flash_clearMedia(),this._resetGate(),this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.aurora.active?this._aurora_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(a.jPlayer.focus=this)},play:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&!this.status.paused?this.pause(a):(a="number"==typeof a?a:0/0,this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.aurora.active?this._aurora_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play"))},videoPlay:function(){this.play()},pause:function(a){a="number"==typeof a?a:0/0,this.status.srcSet?this.html.active?this._html_pause(a):this.aurora.active?this._aurora_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(b,c){var d=this,e="function"==typeof c,f=Array.prototype.slice.call(arguments);"string"==typeof b&&(e&&f.splice(1,1),a.jPlayer.prototype.destroyRemoved(),a.each(this.instances,function(){d.element!==this&&(!e||c.call(this.data("jPlayer"),d))&&this.jPlayer.apply(this,f)}))},pauseOthers:function(a){this.tellOthers("pause",function(){return this.status.srcSet},a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.aurora.active?this._aurora_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100),this.status.srcSet?this.html.active?this._html_playHead(a):this.aurora.active?this._aurora_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a),this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},a)},mutedWorker:function(b){this.options.muted=b,this.html.used&&this._html_setProperty("muted",b),this.aurora.used&&this._aurora_mute(b),this.flash.used&&this._flash_mute(b),this.html.video.gate||this.html.audio.gate||(this._updateMute(b),this._updateVolume(this.options.volume),this._trigger(a.jPlayer.event.volumechange))},mute:function(a){var c="object"==typeof a;c&&this.options.useStateClassSkin&&this.options.muted?this._muted(!1):(a=a===b?!0:!!a,this._muted(a))},unmute:function(a){a=a===b?!0:!!a,this._muted(!a)},_updateMute:function(a){a===b&&(a=this.options.muted),a?this.addStateClass("muted"):this.removeStateClass("muted"),this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a),this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(b){b=this._limitValue(b,0,1),this.options.volume=b,this.html.used&&this._html_setProperty("volume",b),this.aurora.used&&this._aurora_volume(b),this.flash.used&&this._flash_volume(b),this.html.video.gate||this.html.audio.gate||(this._updateVolume(b),this._trigger(a.jPlayer.event.volumechange))},volumeBar:function(b){if(this.css.jq.volumeBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=c.height()-b.pageY+d.top,h=c.height();this.volume(this.options.verticalVolume?g/h:e/f)}this.options.muted&&this._muted(!1)},_updateVolume:function(a){a===b&&(a=this.options.volume),a=this.options.muted?0:a,this.status.noVolume?(this.addStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(),this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.removeStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1),this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(b){var c=this;this.options.cssSelectorAncestor=b,this._removeUiClass(),this.ancestorJq=b?a(b):[],b&&1!==this.ancestorJq.length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT}),this._addUiClass(),a.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)}),this._updateInterface(),this._updateButtons(),this._updateAutohide(),this._updateVolume(),this._updateMute()},_cssSelector:function(b,c){var d=this;if("string"==typeof c)if(a.jPlayer.prototype.options.cssSelector[b]){if(this.css.jq[b]&&this.css.jq[b].length&&this.css.jq[b].unbind(".jPlayer"),this.options.cssSelector[b]=c,this.css.cs[b]=this.options.cssSelectorAncestor+" "+c,this.css.jq[b]=c?a(this.css.cs[b]):[],this.css.jq[b].length&&this[b]){var e=function(c){c.preventDefault(),d[b](c),d.options.autoBlur?a(this).blur():a(this).focus()};this.css.jq[b].bind("click.jPlayer",e)}c&&1!==this.css.jq[b].length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[b],message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[b].length+" found for "+b+" method.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_METHOD,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:a.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:a.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:a.jPlayer.warningHint.CSS_SELECTOR_STRING})},duration:function(a){this.options.toggleDuration&&(this.options.captureDuration&&a.stopPropagation(),this._setOption("remainingDuration",!this.options.remainingDuration))},seekBar:function(b){if(this.css.jq.seekBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=100*e/f;this.playHead(g)}},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(b){if(this.css.jq.playbackRateBar.length){var c,d,e=a(b.currentTarget),f=e.offset(),g=b.pageX-f.left,h=e.width(),i=e.height()-b.pageY+f.top,j=e.height();c=this.options.verticalPlaybackRate?i/j:g/h,d=c*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate,this.playbackRate(d)}},_updatePlaybackRate:function(){var a=this.options.playbackRate,b=(a-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*b+"%"))):(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(a){var b="object"==typeof a;this._loop(b&&this.options.useStateClassSkin&&this.options.loop?!1:!0)},repeatOff:function(){this._loop(!1)},_loop:function(b){this.options.loop!==b&&(this.options.loop=b,this._updateButtons(),this._trigger(a.jPlayer.event.repeat))},option:function(c,d){var e=c;if(0===arguments.length)return a.extend(!0,{},this.options);if("string"==typeof c){var f=c.split(".");if(d===b){for(var g=a.extend(!0,{},this.options),h=0;h0||Math.floor(d)>0):e=!0,a.internal.mouse={x:b.pageX,y:b.pageY},e&&a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId),a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),delete this.internal.mouse,this.element.unbind(c),this.css.jq.gui.unbind(c),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||!this.options.fullWindow&&this.options.autohide.restored?(this.element.bind(d,e),this.css.jq.gui.bind(d,e),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&this.options.fullScreen?this._setOption("fullScreen",!1):this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var b=this,c=a.jPlayer.nativeFeatures.fullscreen;c.api.fullscreenEnabled&&c.event.fullscreenchange&&("function"!=typeof this.internal.fullscreenchangeHandler&&(this.internal.fullscreenchangeHandler=function(){b._fullscreenchange()}),document.addEventListener(c.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var b=a.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(b.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!a.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&this._setOption("fullScreen",!1)},_requestFullscreen:function(){var b=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.requestFullscreen(b)},_exitFullscreen:function(){var b,c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.exitFullscreen(b)},_html_initMedia:function(b){var c=a(this.htmlElement.media).empty();a.each(b.track||[],function(a,b){var d=document.createElement("track");d.setAttribute("kind",b.kind?b.kind:""),d.setAttribute("src",b.src?b.src:""),d.setAttribute("srclang",b.srclang?b.srclang:""),d.setAttribute("label",b.label?b.label:""),b.def&&d.setAttribute("default",b.def),c.append(d)}),this.htmlElement.media.src=this.status.src,"none"!==this.options.preload&&this._html_load(),this._trigger(a.jPlayer.event.timeupdate)},_html_setFormat:function(b){var c=this;a.each(this.formats,function(a,d){return c.html.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0})},_html_setAudio:function(a){this._html_setFormat(a),this.htmlElement.media=this.htmlElement.audio,this._html_initMedia(a)},_html_setVideo:function(a){this._html_setFormat(a),this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(a.poster)?a.poster:""),this.htmlElement.media=this.htmlElement.video,this._html_initMedia(a)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==this.internal.video.id||this.status.nativeVideoControls||this.internal.video.jq.css({width:"0px",height:"0px"}),this.htmlElement.media.pause())},_html_clearMedia:function(){this.htmlElement.media&&(this.htmlElement.media.src="about:blank",this.htmlElement.media.load())},_html_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.htmlElement.media.load()),clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.pause=!1,this._html_load(),this.androidFix.setMedia)this.androidFix.play=!0,this.androidFix.time=a;else if(isNaN(a))c.play();else{this.internal.cmdsIgnored&&c.play();try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a,c.play()}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},250))}}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.play=!1,a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId),c.pause(),this.androidFix.setMedia)this.androidFix.pause=!0,this.androidFix.time=a;else if(!isNaN(a))try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},250))}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this,c=this.htmlElement.media;this._html_load();try{if("object"==typeof c.seekable&&c.seekable.length>0)c.currentTime=a*c.seekable.end(c.seekable.length-1)/100;else{if(!(c.duration>0)||isNaN(c.duration))throw"e";c.currentTime=a*c.duration/100}}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},250))}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})))},_html_setProperty:function(a,b){this.html.audio.available&&(this.htmlElement.audio[a]=b),this.html.video.available&&(this.htmlElement.video[a]=b)},_aurora_setAudio:function(b){var c=this;a.each(this.formats,function(a,d){return c.aurora.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0}),this.aurora.player=new AV.Player.fromURL(this.status.src),this._addAuroraEventListeners(this.aurora.player,this.aurora),"auto"===this.options.preload&&(this._aurora_load(),this.status.waitForLoad=!1)},_aurora_resetMedia:function(){this.aurora.player&&this.aurora.player.stop()},_aurora_clearMedia:function(){},_aurora_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.aurora.player.preload())},_aurora_play:function(b){this.status.waitForLoad||isNaN(b)||this.aurora.player.seek(b),this.aurora.player.playing||this.aurora.player.play(),this.status.waitForLoad=!1,this._aurora_checkWaitForPlay(),this._updateButtons(!0),this._trigger(a.jPlayer.event.play)},_aurora_pause:function(b){isNaN(b)||this.aurora.player.seek(1e3*b),this.aurora.player.pause(),b>0&&this._aurora_checkWaitForPlay(),this._updateButtons(!1),this._trigger(a.jPlayer.event.pause)},_aurora_playHead:function(a){this.aurora.player.duration>0&&this.aurora.player.seek(a*this.aurora.player.duration/100),this.status.waitForLoad||this._aurora_checkWaitForPlay()},_aurora_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1)},_aurora_volume:function(a){this.aurora.player.volume=100*a},_aurora_mute:function(a){a?(this.aurora.properties.lastvolume=this.aurora.player.volume,this.aurora.player.volume=0):this.aurora.player.volume=this.aurora.properties.lastvolume,this.aurora.properties.muted=a},_flash_setAudio:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4a":case"fla":c._getMovie().fl_setAudio_m4a(b[d]);break;case"mp3":c._getMovie().fl_setAudio_mp3(b[d]);break;case"rtmpa":c._getMovie().fl_setAudio_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_setVideo:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4v":case"flv":c._getMovie().fl_setVideo_m4v(b[d]);break;case"rtmpv":c._getMovie().fl_setVideo_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"}),this._flash_pause(0/0)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}a>0&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height})))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var a,b=0;if(window.ActiveXObject)try{if(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var c=a.GetVariable("$version");c&&(c=c.split(" ")[1].split(","),b=parseInt(c[0],10)+"."+parseInt(c[1],10))}}catch(d){}else navigator.plugins&&navigator.mimeTypes.length>0&&(a=navigator.plugins["Shockwave Flash"],a&&(b=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")));return 1*b},_checkForFlash:function(a){var b=!1;return this._getFlashPluginVersion()>=a&&(b=!0),b},_validString:function(a){return a&&"string"==typeof a},_limitValue:function(a,b,c){return b>a?b:a>c?c:a},_urlNotSetError:function(b){this._error({type:a.jPlayer.error.URL_NOT_SET,context:b,message:a.jPlayer.errorMsg.URL_NOT_SET,hint:a.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(b){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH",this._error({type:a.jPlayer.error[c],context:this.internal.flash.swf,message:a.jPlayer.errorMsg[c]+b.message,hint:a.jPlayer.errorHint[c]}),this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(b){this._trigger(a.jPlayer.event.error,b),this.options.errorAlerts&&this._alert("Error!"+(b.message?"\n"+b.message:"")+(b.hint?"\n"+b.hint:"")+"\nContext: "+b.context)},_warning:function(c){this._trigger(a.jPlayer.event.warning,b,c),this.options.warningAlerts&&this._alert("Warning!"+(c.message?"\n"+c.message:"")+(c.hint?"\n"+c.hint:"")+"\nContext: "+c.context)},_alert:function(a){var b="jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(b):alert(b)},_emulateHtmlBridge:function(){var b=this;a.each(a.jPlayer.emulateMethods.split(/\s+/g),function(a,c){b.internal.domNode[c]=function(a){b[c](a)}}),a.each(a.jPlayer.event,function(c,d){var e=!0;a.each(a.jPlayer.reservedEvent.split(/\s+/g),function(a,b){return b===c?(e=!1,!1):void 0}),e&&b.element.bind(d+".jPlayer.jPlayerHtml",function(){b._emulateHtmlUpdate();var a=document.createEvent("Event");a.initEvent(c,!1,!0),b.internal.domNode.dispatchEvent(a)})})},_emulateHtmlUpdate:function(){var b=this;a.each(a.jPlayer.emulateStatus.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.status[c]}),a.each(a.jPlayer.emulateOptions.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.options[c]})},_destroyHtmlBridge:function(){var b=this;this.element.unbind(".jPlayerHtml");var c=a.jPlayer.emulateMethods+" "+a.jPlayer.emulateStatus+" "+a.jPlayer.emulateOptions;a.each(c.split(/\s+/g),function(a,c){delete b.internal.domNode[c]})}},a.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"},a.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+a.jPlayer.prototype.version.script+" needs Jplayer.swf version "+a.jPlayer.prototype.version.needFlash+" but found "},a.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."},a.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"},a.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."},a.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}}); \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.swf b/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.swf deleted file mode 100644 index 340f7f9..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/jplayer/jquery.jplayer.swf and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jquery.jplayer/Jplayer.swf b/libraries/filemanager-9.12.1/js/jPlayer/jquery.jplayer/Jplayer.swf deleted file mode 100644 index 85c0ba3..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/jquery.jplayer/Jplayer.swf and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/jquery.jplayer/jquery.jplayer.js b/libraries/filemanager-9.12.1/js/jPlayer/jquery.jplayer/jquery.jplayer.js deleted file mode 100644 index d52aca0..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/jquery.jplayer/jquery.jplayer.js +++ /dev/null @@ -1,2840 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2013 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Version: 2.4.0 - * Date: 5th June 2013 - */ - -/* Code verified using http://www.jshint.com/ */ -/*jshint asi:false, bitwise:false, boss:false, browser:true, curly:true, debug:false, eqeqeq:true, eqnull:false, evil:false, forin:false, immed:false, jquery:true, laxbreak:false, newcap:true, noarg:true, noempty:true, nonew:true, onevar:false, passfail:false, plusplus:false, regexp:false, undef:true, sub:false, strict:false, white:false, smarttabs:true */ -/*global define:false, ActiveXObject:false, alert:false */ - -/* Support for Zepto 1.0 compiled with optional data module. - * For AMD support, you will need to manually switch the 2 lines in the code below. - * Search terms: "jQuery Switch" and "Zepto Switch" - */ - -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], factory); // jQuery Switch - // define(['zepto'], factory); // Zepto Switch - } else { - // Browser globals - if(root.jQuery) { // Use jQuery if available - factory(root.jQuery); - } else { // Otherwise, use Zepto - factory(root.Zepto); - } - } -}(this, function ($, undefined) { - - // Adapted from jquery.ui.widget.js (1.8.7): $.widget.bridge - Tweaked $.data(this,XYZ) to $(this).data(XYZ) for Zepto - $.fn.jPlayer = function( options ) { - var name = "jPlayer"; - var isMethodCall = typeof options === "string", - args = Array.prototype.slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.extend.apply( null, [ true, options ].concat(args) ) : - options; - - // prevent calls to internal methods - if ( isMethodCall && options.charAt( 0 ) === "_" ) { - return returnValue; - } - - if ( isMethodCall ) { - this.each(function() { - var instance = $(this).data( name ), - methodValue = instance && $.isFunction( instance[options] ) ? - instance[ options ].apply( instance, args ) : - instance; - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $(this).data( name ); - if ( instance ) { - // instance.option( options || {} )._init(); // Orig jquery.ui.widget.js code: Not recommend for jPlayer. ie., Applying new options to an existing instance (via the jPlayer constructor) and performing the _init(). The _init() is what concerns me. It would leave a lot of event handlers acting on jPlayer instance and the interface. - instance.option( options || {} ); // The new constructor only changes the options. Changing options only has basic support atm. - } else { - $(this).data( name, new $.jPlayer( options, this ) ); - } - }); - } - - return returnValue; - }; - - $.jPlayer = function( options, element ) { - // allow instantiation without initializing for simple inheritance - if ( arguments.length ) { - this.element = $(element); - this.options = $.extend(true, {}, - this.options, - options - ); - var self = this; - this.element.bind( "remove.jPlayer", function() { - self.destroy(); - }); - this._init(); - } - }; - // End of: (Adapted from jquery.ui.widget.js (1.8.7)) - - // Zepto is missing one of the animation methods. - if(typeof $.fn.stop !== 'function') { - $.fn.stop = function() {}; - } - - // Emulated HTML5 methods and properties - $.jPlayer.emulateMethods = "load play pause"; - $.jPlayer.emulateStatus = "src readyState networkState currentTime duration paused ended playbackRate"; - $.jPlayer.emulateOptions = "muted volume"; - - // Reserved event names generated by jPlayer that are not part of the HTML5 Media element spec - $.jPlayer.reservedEvent = "ready flashreset resize repeat error warning"; - - // Events generated by jPlayer - $.jPlayer.event = {}; - $.each( - [ - 'ready', - 'flashreset', // Similar to the ready event if the Flash solution is set to display:none and then shown again or if it's reloaded for another reason by the browser. For example, using CSS position:fixed on Firefox for the full screen feature. - 'resize', // Occurs when the size changes through a full/restore screen operation or if the size/sizeFull options are changed. - 'repeat', // Occurs when the repeat status changes. Usually through clicks on the repeat button of the interface. - 'click', // Occurs when the user clicks on one of the following: poster image, html video, flash video. - 'error', // Event error code in event.jPlayer.error.type. See $.jPlayer.error - 'warning', // Event warning code in event.jPlayer.warning.type. See $.jPlayer.warning - - // Other events match HTML5 spec. - 'loadstart', - 'progress', - 'suspend', - 'abort', - 'emptied', - 'stalled', - 'play', - 'pause', - 'loadedmetadata', - 'loadeddata', - 'waiting', - 'playing', - 'canplay', - 'canplaythrough', - 'seeking', - 'seeked', - 'timeupdate', - 'ended', - 'ratechange', - 'durationchange', - 'volumechange' - ], - function() { - $.jPlayer.event[ this ] = 'jPlayer_' + this; - } - ); - - $.jPlayer.htmlEvent = [ // These HTML events are bubbled through to the jPlayer event, without any internal action. - "loadstart", - // "progress", // jPlayer uses internally before bubbling. - // "suspend", // jPlayer uses internally before bubbling. - "abort", - // "error", // jPlayer uses internally before bubbling. - "emptied", - "stalled", - // "play", // jPlayer uses internally before bubbling. - // "pause", // jPlayer uses internally before bubbling. - "loadedmetadata", - "loadeddata", - // "waiting", // jPlayer uses internally before bubbling. - // "playing", // jPlayer uses internally before bubbling. - "canplay", - "canplaythrough", - // "seeking", // jPlayer uses internally before bubbling. - // "seeked", // jPlayer uses internally before bubbling. - // "timeupdate", // jPlayer uses internally before bubbling. - // "ended", // jPlayer uses internally before bubbling. - "ratechange" - // "durationchange" // jPlayer uses internally before bubbling. - // "volumechange" // jPlayer uses internally before bubbling. - ]; - - $.jPlayer.pause = function() { - $.each($.jPlayer.prototype.instances, function(i, element) { - if(element.data("jPlayer").status.srcSet) { // Check that media is set otherwise would cause error event. - element.jPlayer("pause"); - } - }); - }; - - // Default for jPlayer option.timeFormat - $.jPlayer.timeFormat = { - showHour: false, - showMin: true, - showSec: true, - padHour: false, - padMin: true, - padSec: true, - sepHour: ":", - sepMin: ":", - sepSec: "" - }; - var ConvertTime = function() { - this.init(); - }; - ConvertTime.prototype = { - init: function() { - this.options = { - timeFormat: $.jPlayer.timeFormat - }; - }, - time: function(s) { // function used on jPlayer.prototype._convertTime to enable per instance options. - s = (s && typeof s === 'number') ? s : 0; - - var myTime = new Date(s * 1000), - hour = myTime.getUTCHours(), - min = this.options.timeFormat.showHour ? myTime.getUTCMinutes() : myTime.getUTCMinutes() + hour * 60, - sec = this.options.timeFormat.showMin ? myTime.getUTCSeconds() : myTime.getUTCSeconds() + min * 60, - strHour = (this.options.timeFormat.padHour && hour < 10) ? "0" + hour : hour, - strMin = (this.options.timeFormat.padMin && min < 10) ? "0" + min : min, - strSec = (this.options.timeFormat.padSec && sec < 10) ? "0" + sec : sec, - strTime = ""; - - strTime += this.options.timeFormat.showHour ? strHour + this.options.timeFormat.sepHour : ""; - strTime += this.options.timeFormat.showMin ? strMin + this.options.timeFormat.sepMin : ""; - strTime += this.options.timeFormat.showSec ? strSec + this.options.timeFormat.sepSec : ""; - - return strTime; - } - }; - var myConvertTime = new ConvertTime(); - $.jPlayer.convertTime = function(s) { - return myConvertTime.time(s); - }; - - // Adapting jQuery 1.4.4 code for jQuery.browser. Required since jQuery 1.3.2 does not detect Chrome as webkit. - $.jPlayer.uaBrowser = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rwebkit = /(webkit)[ \/]([\w.]+)/; - var ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/; - var rmsie = /(msie) ([\w.]+)/; - var rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/; - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }; - - // Platform sniffer for detecting mobile devices - $.jPlayer.uaPlatform = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rplatform = /(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/; - var rtablet = /(ipad|playbook)/; - var randroid = /(android)/; - var rmobile = /(mobile)/; - - var platform = rplatform.exec( ua ) || []; - var tablet = rtablet.exec( ua ) || - !rmobile.exec( ua ) && randroid.exec( ua ) || - []; - - if(platform[1]) { - platform[1] = platform[1].replace(/\s/g, "_"); // Change whitespace to underscore. Enables dot notation. - } - - return { platform: platform[1] || "", tablet: tablet[1] || "" }; - }; - - $.jPlayer.browser = { - }; - $.jPlayer.platform = { - }; - - var browserMatch = $.jPlayer.uaBrowser(navigator.userAgent); - if ( browserMatch.browser ) { - $.jPlayer.browser[ browserMatch.browser ] = true; - $.jPlayer.browser.version = browserMatch.version; - } - var platformMatch = $.jPlayer.uaPlatform(navigator.userAgent); - if ( platformMatch.platform ) { - $.jPlayer.platform[ platformMatch.platform ] = true; - $.jPlayer.platform.mobile = !platformMatch.tablet; - $.jPlayer.platform.tablet = !!platformMatch.tablet; - } - - // Internet Explorer (IE) Browser Document Mode Sniffer. Based on code at: - // http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx#GetMode - $.jPlayer.getDocMode = function() { - var docMode; - if ($.jPlayer.browser.msie) { - if (document.documentMode) { // IE8 or later - docMode = document.documentMode; - } else { // IE 5-7 - docMode = 5; // Assume quirks mode unless proven otherwise - if (document.compatMode) { - if (document.compatMode === "CSS1Compat") { - docMode = 7; // standards mode - } - } - } - } - return docMode; - }; - $.jPlayer.browser.documentMode = $.jPlayer.getDocMode(); - - $.jPlayer.nativeFeatures = { - init: function() { - - /* Fullscreen function naming influenced by W3C naming. - * No support for: Mozilla Proposal: https://wiki.mozilla.org/Gecko:FullScreenAPI - */ - - var d = document, - v = d.createElement('video'), - spec = { - // http://www.w3.org/TR/fullscreen/ - w3c: [ - 'fullscreenEnabled', - 'fullscreenElement', - 'requestFullscreen', - 'exitFullscreen', - 'fullscreenchange', - 'fullscreenerror' - ], - // https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode - moz: [ - 'mozFullScreenEnabled', - 'mozFullScreenElement', - 'mozRequestFullScreen', - 'mozCancelFullScreen', - 'mozfullscreenchange', - 'mozfullscreenerror' - ], - // http://developer.apple.com/library/safari/#documentation/WebKit/Reference/ElementClassRef/Element/Element.html - // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html - webkit: [ - '', - 'webkitCurrentFullScreenElement', - 'webkitRequestFullScreen', - 'webkitCancelFullScreen', - 'webkitfullscreenchange', - '' - ], - // http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html - webkitVideo: [ - 'webkitSupportsFullscreen', - 'webkitDisplayingFullscreen', - 'webkitEnterFullscreen', - 'webkitExitFullscreen', - '', - '' - ] - }, - specOrder = [ - 'w3c', - 'moz', - 'webkit', - 'webkitVideo' - ], - fs, i, il; - - this.fullscreen = fs = { - support: { - w3c: !!d[spec.w3c[0]], - moz: !!d[spec.moz[0]], - webkit: typeof d[spec.webkit[3]] === 'function', - webkitVideo: typeof v[spec.webkitVideo[2]] === 'function' - }, - used: {} - }; - - // Store the name of the spec being used and as a handy boolean. - for(i = 0, il = specOrder.length; i < il; i++) { - var n = specOrder[i]; - if(fs.support[n]) { - fs.spec = n; - fs.used[n] = true; - break; - } - } - - if(fs.spec) { - var s = spec[fs.spec]; - fs.api = { - fullscreenEnabled: true, - fullscreenElement: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[1]]; - }, - requestFullscreen: function(elem) { - return elem[s[2]](); - }, - exitFullscreen: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[3]](); - } - }; - fs.event = { - fullscreenchange: s[4], - fullscreenerror: s[5] - }; - } else { - fs.api = { - fullscreenEnabled: false, - fullscreenElement: function() { - return null; - }, - requestFullscreen: function() {}, - exitFullscreen: function() {} - }; - fs.event = {}; - } - } - }; - $.jPlayer.nativeFeatures.init(); - - // The keyboard control system. - - // The current jPlayer instance in focus. - $.jPlayer.focus = null; - - // The list of element node names to ignore with key controls. - $.jPlayer.keyIgnoreElementNames = "INPUT TEXTAREA"; - - // The function that deals with key presses. - var keyBindings = function(event) { - - var f = $.jPlayer.focus, - ignoreKey; - - // A jPlayer instance must be in focus. ie., keyEnabled and the last one played. - if(f) { - // What generated the key press? - $.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) { - // The strings should already be uppercase. - if(event.target.nodeName.toUpperCase() === name.toUpperCase()) { - ignoreKey = true; - return false; // exit each. - } - }); - if(!ignoreKey) { - // See if the key pressed matches any of the bindings. - $.each(f.options.keyBindings, function(action, binding) { - // The binding could be a null when the default has been disabled. ie., 1st clause in if() - if(binding && event.which === binding.key && $.isFunction(binding.fn)) { - event.preventDefault(); // Key being used by jPlayer, so prevent default operation. - binding.fn(f); - return false; // exit each. - } - }); - } - } - }; - - $.jPlayer.keys = function(en) { - var event = "keydown.jPlayer"; - // Remove any binding, just in case enabled more than once. - $(document.documentElement).unbind(event); - if(en) { - $(document.documentElement).bind(event, keyBindings); - } - }; - - // Enable the global key control handler ready for any jPlayer instance with the keyEnabled option enabled. - $.jPlayer.keys(true); - - $.jPlayer.prototype = { - count: 0, // Static Variable: Change it via prototype. - version: { // Static Object - script: "2.4.0", - needFlash: "2.4.0", - flash: "unknown" - }, - options: { // Instanced in $.jPlayer() constructor - swfPath: "js", // Path to Jplayer.swf. Can be relative, absolute or server root relative. - solution: "html, flash", // Valid solutions: html, flash. Order defines priority. 1st is highest, - supplied: "mp3", // Defines which formats jPlayer will try and support and the priority by the order. 1st is highest, - preload: 'metadata', // HTML5 Spec values: none, metadata, auto. - volume: 0.8, // The volume. Number 0 to 1. - muted: false, - wmode: "opaque", // Valid wmode: window, transparent, opaque, direct, gpu. - backgroundColor: "#000000", // To define the jPlayer div and Flash background color. - cssSelectorAncestor: "#jp_container_1", - cssSelector: { // * denotes properties that should only be required when video media type required. _cssSelector() would require changes to enable splitting these into Audio and Video defaults. - videoPlay: ".jp-video-play", // * - play: ".jp-play", - pause: ".jp-pause", - stop: ".jp-stop", - seekBar: ".jp-seek-bar", - playBar: ".jp-play-bar", - mute: ".jp-mute", - unmute: ".jp-unmute", - volumeBar: ".jp-volume-bar", - volumeBarValue: ".jp-volume-bar-value", - volumeMax: ".jp-volume-max", - currentTime: ".jp-current-time", - duration: ".jp-duration", - fullScreen: ".jp-full-screen", // * - restoreScreen: ".jp-restore-screen", // * - repeat: ".jp-repeat", - repeatOff: ".jp-repeat-off", - gui: ".jp-gui", // The interface used with autohide feature. - noSolution: ".jp-no-solution" // For error feedback when jPlayer cannot find a solution. - }, - smoothPlayBar: false, // Smooths the play bar transitions, which affects clicks and short media with big changes per second. - fullScreen: false, // Native Full Screen - fullWindow: false, - autohide: { - restored: false, // Controls the interface autohide feature. - full: true, // Controls the interface autohide feature. - fadeIn: 200, // Milliseconds. The period of the fadeIn anim. - fadeOut: 600, // Milliseconds. The period of the fadeOut anim. - hold: 1000 // Milliseconds. The period of the pause before autohide beings. - }, - loop: false, - repeat: function(event) { // The default jPlayer repeat event handler - if(event.jPlayer.options.loop) { - $(this).unbind(".jPlayerRepeat").bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() { - $(this).jPlayer("play"); - }); - } else { - $(this).unbind(".jPlayerRepeat"); - } - }, - nativeVideoControls: { - // Works well on standard browsers. - // Phone and tablet browsers can have problems with the controls disappearing. - }, - noFullWindow: { - msie: /msie [0-6]\./, - ipad: /ipad.*?os [0-4]\./, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android [0-3]\.(?!.*?mobile)/, - android_phone: /android.*?mobile/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/ - }, - noVolume: { - ipad: /ipad/, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android(?!.*?mobile)/, - android_phone: /android.*?mobile/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/, - playbook: /playbook/ - }, - timeFormat: { - // Specific time format for this instance. The supported options are defined in $.jPlayer.timeFormat - // For the undefined options we use the default from $.jPlayer.timeFormat - }, - keyEnabled: false, // Enables keyboard controls. - audioFullScreen: false, // Enables keyboard controls to enter full screen with audio media. - keyBindings: { // The key control object, defining the key codes and the functions to execute. - // The parameter, f = $.jPlayer.focus, will be checked truethy before attempting to call any of these functions. - // Properties may be added to this object, in key/fn pairs, to enable other key controls. EG, for the playlist add-on. - play: { - key: 32, // space - fn: function(f) { - if(f.status.paused) { - f.play(); - } else { - f.pause(); - } - } - }, - fullScreen: { - key: 13, // enter - fn: function(f) { - if(f.status.video || f.options.audioFullScreen) { - f._setOption("fullScreen", !f.options.fullScreen); - } - } - }, - muted: { - key: 8, // backspace - fn: function(f) { - f._muted(!f.options.muted); - } - }, - volumeUp: { - key: 38, // UP - fn: function(f) { - f.volume(f.options.volume + 0.1); - } - }, - volumeDown: { - key: 40, // DOWN - fn: function(f) { - f.volume(f.options.volume - 0.1); - } - } - }, - verticalVolume: false, // Calculate volume from the bottom of the volume bar. Default is from the left. Also volume affects either width or height. - // globalVolume: false, // Not implemented: Set to make volume changes affect all jPlayer instances - // globalMute: false, // Not implemented: Set to make mute changes affect all jPlayer instances - idPrefix: "jp", // Prefix for the ids of html elements created by jPlayer. For flash, this must not include characters: . - + * / \ - noConflict: "jQuery", - emulateHtml: false, // Emulates the HTML5 Media element on the jPlayer element. - errorAlerts: false, - warningAlerts: false - }, - optionsAudio: { - size: { - width: "0px", - height: "0px", - cssClass: "" - }, - sizeFull: { - width: "0px", - height: "0px", - cssClass: "" - } - }, - optionsVideo: { - size: { - width: "480px", - height: "270px", - cssClass: "jp-video-270p" - }, - sizeFull: { - width: "100%", - height: "100%", - cssClass: "jp-video-full" - } - }, - instances: {}, // Static Object - status: { // Instanced in _init() - src: "", - media: {}, - paused: true, - format: {}, - formatType: "", - waitForPlay: true, // Same as waitForLoad except in case where preloading. - waitForLoad: true, - srcSet: false, - video: false, // True if playing a video - seekPercent: 0, - currentPercentRelative: 0, - currentPercentAbsolute: 0, - currentTime: 0, - duration: 0, - videoWidth: 0, // Intrinsic width of the video in pixels. - videoHeight: 0, // Intrinsic height of the video in pixels. - readyState: 0, - networkState: 0, - playbackRate: 1, - ended: 0 - -/* Persistant status properties created dynamically at _init(): - width - height - cssClass - nativeVideoControls - noFullWindow - noVolume -*/ - }, - - internal: { // Instanced in _init() - ready: false - // instance: undefined - // domNode: undefined - // htmlDlyCmdId: undefined - // autohideId: undefined - // cmdsIgnored - }, - solution: { // Static Object: Defines the solutions built in jPlayer. - html: true, - flash: true - }, - // 'MPEG-4 support' : canPlayType('video/mp4; codecs="mp4v.20.8"') - format: { // Static Object - mp3: { - codec: 'audio/mpeg; codecs="mp3"', - flashCanPlay: true, - media: 'audio' - }, - m4a: { // AAC / MP4 - codec: 'audio/mp4; codecs="mp4a.40.2"', - flashCanPlay: true, - media: 'audio' - }, - oga: { // OGG - codec: 'audio/ogg; codecs="vorbis"', - flashCanPlay: false, - media: 'audio' - }, - wav: { // PCM - codec: 'audio/wav; codecs="1"', - flashCanPlay: false, - media: 'audio' - }, - webma: { // WEBM - codec: 'audio/webm; codecs="vorbis"', - flashCanPlay: false, - media: 'audio' - }, - fla: { // FLV / F4A - codec: 'audio/x-flv', - flashCanPlay: true, - media: 'audio' - }, - rtmpa: { // RTMP AUDIO - codec: 'audio/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'audio' - }, - m4v: { // H.264 / MP4 - codec: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: true, - media: 'video' - }, - ogv: { // OGG - codec: 'video/ogg; codecs="theora, vorbis"', - flashCanPlay: false, - media: 'video' - }, - webmv: { // WEBM - codec: 'video/webm; codecs="vorbis, vp8"', - flashCanPlay: false, - media: 'video' - }, - flv: { // FLV / F4V - codec: 'video/x-flv', - flashCanPlay: true, - media: 'video' - }, - rtmpv: { // RTMP VIDEO - codec: 'video/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'video' - } - }, - _init: function() { - var self = this; - - this.element.empty(); - - this.status = $.extend({}, this.status); // Copy static to unique instance. - this.internal = $.extend({}, this.internal); // Copy static to unique instance. - - // Initialize the time format - this.options.timeFormat = $.extend({}, $.jPlayer.timeFormat, this.options.timeFormat); - - // On iOS, assume commands will be ignored before user initiates them. - this.internal.cmdsIgnored = $.jPlayer.platform.ipad || $.jPlayer.platform.iphone || $.jPlayer.platform.ipod; - - this.internal.domNode = this.element.get(0); - - // Add key bindings focus to 1st jPlayer instanced with key control enabled. - if(this.options.keyEnabled && !$.jPlayer.focus) { - $.jPlayer.focus = this; - } - - this.formats = []; // Array based on supplied string option. Order defines priority. - this.solutions = []; // Array based on solution string option. Order defines priority. - this.require = {}; // Which media types are required: video, audio. - - this.htmlElement = {}; // DOM elements created by jPlayer - this.html = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - this.html.audio = {}; - this.html.video = {}; - this.flash = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - - this.css = {}; - this.css.cs = {}; // Holds the css selector strings - this.css.jq = {}; // Holds jQuery selectors. ie., $(css.cs.method) - - this.ancestorJq = []; // Holds jQuery selector of cssSelectorAncestor. Init would use $() instead of [], but it is only 1.4+ - - this.options.volume = this._limitValue(this.options.volume, 0, 1); // Limit volume value's bounds. - - // Create the formats array, with prority based on the order of the supplied formats string - $.each(this.options.supplied.toLowerCase().split(","), function(index1, value1) { - var format = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.format[format]) { // Check format is valid. - var dupFound = false; - $.each(self.formats, function(index2, value2) { // Check for duplicates - if(format === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.formats.push(format); - } - } - }); - - // Create the solutions array, with prority based on the order of the solution string - $.each(this.options.solution.toLowerCase().split(","), function(index1, value1) { - var solution = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.solution[solution]) { // Check solution is valid. - var dupFound = false; - $.each(self.solutions, function(index2, value2) { // Check for duplicates - if(solution === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.solutions.push(solution); - } - } - }); - - this.internal.instance = "jp_" + this.count; - this.instances[this.internal.instance] = this.element; - - // Check the jPlayer div has an id and create one if required. Important for Flash to know the unique id for comms. - if(!this.element.attr("id")) { - this.element.attr("id", this.options.idPrefix + "_jplayer_" + this.count); - } - - this.internal.self = $.extend({}, { - id: this.element.attr("id"), - jq: this.element - }); - this.internal.audio = $.extend({}, { - id: this.options.idPrefix + "_audio_" + this.count, - jq: undefined - }); - this.internal.video = $.extend({}, { - id: this.options.idPrefix + "_video_" + this.count, - jq: undefined - }); - this.internal.flash = $.extend({}, { - id: this.options.idPrefix + "_flash_" + this.count, - jq: undefined, - swf: this.options.swfPath + (this.options.swfPath.toLowerCase().slice(-4) !== ".swf" ? (this.options.swfPath && this.options.swfPath.slice(-1) !== "/" ? "/" : "") + "Jplayer.swf" : "") - }); - this.internal.poster = $.extend({}, { - id: this.options.idPrefix + "_poster_" + this.count, - jq: undefined - }); - - // Register listeners defined in the constructor - $.each($.jPlayer.event, function(eventName,eventType) { - if(self.options[eventName] !== undefined) { - self.element.bind(eventType + ".jPlayer", self.options[eventName]); // With .jPlayer namespace. - self.options[eventName] = undefined; // Destroy the handler pointer copy on the options. Reason, events can be added/removed in other ways so this could be obsolete and misleading. - } - }); - - // Determine if we require solutions for audio, video or both media types. - this.require.audio = false; - this.require.video = false; - $.each(this.formats, function(priority, format) { - self.require[self.format[format].media] = true; - }); - - // Now required types are known, finish the options default settings. - if(this.require.video) { - this.options = $.extend(true, {}, - this.optionsVideo, - this.options - ); - } else { - this.options = $.extend(true, {}, - this.optionsAudio, - this.options - ); - } - this._setSize(); // update status and jPlayer element size - - // Determine the status for Blocklisted options. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - - // Create event handlers if native fullscreen is supported - if($.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled) { - this._fullscreenAddEventListeners(); - } - - // The native controls are only for video and are disabled when audio is also used. - this._restrictNativeVideoControls(); - - // Create the poster image. - this.htmlElement.poster = document.createElement('img'); - this.htmlElement.poster.id = this.internal.poster.id; - this.htmlElement.poster.onload = function() { // Note that this did not work on Firefox 3.6: poster.addEventListener("onload", function() {}, false); Did not investigate x-browser. - if(!self.status.video || self.status.waitForPlay) { - self.internal.poster.jq.show(); - } - }; - this.element.append(this.htmlElement.poster); - this.internal.poster.jq = $("#" + this.internal.poster.id); - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - this.internal.poster.jq.hide(); - this.internal.poster.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - - // Generate the required media elements - this.html.audio.available = false; - if(this.require.audio) { // If a supplied format is audio - this.htmlElement.audio = document.createElement('audio'); - this.htmlElement.audio.id = this.internal.audio.id; - this.html.audio.available = !!this.htmlElement.audio.canPlayType && this._testCanPlayType(this.htmlElement.audio); // Test is for IE9 on Win Server 2008. - } - this.html.video.available = false; - if(this.require.video) { // If a supplied format is video - this.htmlElement.video = document.createElement('video'); - this.htmlElement.video.id = this.internal.video.id; - this.html.video.available = !!this.htmlElement.video.canPlayType && this._testCanPlayType(this.htmlElement.video); // Test is for IE9 on Win Server 2008. - } - - this.flash.available = this._checkForFlash(10.1); - - this.html.canPlay = {}; - this.flash.canPlay = {}; - $.each(this.formats, function(priority, format) { - self.html.canPlay[format] = self.html[self.format[format].media].available && "" !== self.htmlElement[self.format[format].media].canPlayType(self.format[format].codec); - self.flash.canPlay[format] = self.format[format].flashCanPlay && self.flash.available; - }); - this.html.desired = false; - this.flash.desired = false; - $.each(this.solutions, function(solutionPriority, solution) { - if(solutionPriority === 0) { - self[solution].desired = true; - } else { - var audioCanPlay = false; - var videoCanPlay = false; - $.each(self.formats, function(formatPriority, format) { - if(self[self.solutions[0]].canPlay[format]) { // The other solution can play - if(self.format[format].media === 'video') { - videoCanPlay = true; - } else { - audioCanPlay = true; - } - } - }); - self[solution].desired = (self.require.audio && !audioCanPlay) || (self.require.video && !videoCanPlay); - } - }); - // This is what jPlayer will support, based on solution and supplied. - this.html.support = {}; - this.flash.support = {}; - $.each(this.formats, function(priority, format) { - self.html.support[format] = self.html.canPlay[format] && self.html.desired; - self.flash.support[format] = self.flash.canPlay[format] && self.flash.desired; - }); - // If jPlayer is supporting any format in a solution, then the solution is used. - this.html.used = false; - this.flash.used = false; - $.each(this.solutions, function(solutionPriority, solution) { - $.each(self.formats, function(formatPriority, format) { - if(self[solution].support[format]) { - self[solution].used = true; - return false; - } - }); - }); - - // Init solution active state and the event gates to false. - this._resetActive(); - this._resetGate(); - - // Set up the css selectors for the control and feedback entities. - this._cssSelectorAncestor(this.options.cssSelectorAncestor); - - // If neither html nor flash are being used by this browser, then media playback is not possible. Trigger an error event. - if(!(this.html.used || this.flash.used)) { - this._error( { - type: $.jPlayer.error.NO_SOLUTION, - context: "{solution:'" + this.options.solution + "', supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SOLUTION, - hint: $.jPlayer.errorHint.NO_SOLUTION - }); - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.show(); - } - } else { - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.hide(); - } - } - - // Add the flash solution if it is being used. - if(this.flash.used) { - var htmlObj, - flashVars = 'jQuery=' + encodeURI(this.options.noConflict) + '&id=' + encodeURI(this.internal.self.id) + '&vol=' + this.options.volume + '&muted=' + this.options.muted; - - // Code influenced by SWFObject 2.2: http://code.google.com/p/swfobject/ - // Non IE browsers have an initial Flash size of 1 by 1 otherwise the wmode affected the Flash ready event. - - if($.jPlayer.browser.msie && (Number($.jPlayer.browser.version) < 9 || $.jPlayer.browser.documentMode < 9)) { - var objStr = ''; - - var paramStr = [ - '', - '', - '', - '', - '' - ]; - - htmlObj = document.createElement(objStr); - for(var i=0; i < paramStr.length; i++) { - htmlObj.appendChild(document.createElement(paramStr[i])); - } - } else { - var createParam = function(el, n, v) { - var p = document.createElement("param"); - p.setAttribute("name", n); - p.setAttribute("value", v); - el.appendChild(p); - }; - - htmlObj = document.createElement("object"); - htmlObj.setAttribute("id", this.internal.flash.id); - htmlObj.setAttribute("name", this.internal.flash.id); - htmlObj.setAttribute("data", this.internal.flash.swf); - htmlObj.setAttribute("type", "application/x-shockwave-flash"); - htmlObj.setAttribute("width", "1"); // Non-zero - htmlObj.setAttribute("height", "1"); // Non-zero - htmlObj.setAttribute("tabindex", "-1"); - createParam(htmlObj, "flashvars", flashVars); - createParam(htmlObj, "allowscriptaccess", "always"); - createParam(htmlObj, "bgcolor", this.options.backgroundColor); - createParam(htmlObj, "wmode", this.options.wmode); - } - - this.element.append(htmlObj); - this.internal.flash.jq = $(htmlObj); - } - - // Add the HTML solution if being used. - if(this.html.used) { - - // The HTML Audio handlers - if(this.html.audio.available) { - this._addHtmlEventListeners(this.htmlElement.audio, this.html.audio); - this.element.append(this.htmlElement.audio); - this.internal.audio.jq = $("#" + this.internal.audio.id); - } - - // The HTML Video handlers - if(this.html.video.available) { - this._addHtmlEventListeners(this.htmlElement.video, this.html.video); - this.element.append(this.htmlElement.video); - this.internal.video.jq = $("#" + this.internal.video.id); - if(this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); // Using size 0x0 since a .hide() causes issues in iOS - } - this.internal.video.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - } - } - - // Create the bridge that emulates the HTML Media element on the jPlayer DIV - if( this.options.emulateHtml ) { - this._emulateHtmlBridge(); - } - - if(this.html.used && !this.flash.used) { // If only HTML, then emulate flash ready() call after 100ms. - setTimeout( function() { - self.internal.ready = true; - self.version.flash = "n/a"; - self._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - self._trigger($.jPlayer.event.ready); - }, 100); - } - - // Initialize the interface components with the options. - this._updateNativeVideoControls(); - // The other controls are now setup in _cssSelectorAncestor() - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - - $.jPlayer.prototype.count++; // Change static variable via prototype. - }, - destroy: function() { - // MJP: The background change remains. Would need to store the original to restore it correctly. - // MJP: The jPlayer element's size change remains. - - // Clear the media to reset the GUI and stop any downloads. Streams on some browsers had persited. (Chrome) - this.clearMedia(); - // Remove the size/sizeFull cssClass from the cssSelectorAncestor - this._removeUiClass(); - // Remove the times from the GUI - if(this.css.jq.currentTime.length) { - this.css.jq.currentTime.text(""); - } - if(this.css.jq.duration.length) { - this.css.jq.duration.text(""); - } - // Remove any bindings from the interface controls. - $.each(this.css.jq, function(fn, jq) { - // Check selector is valid before trying to execute method. - if(jq.length) { - jq.unbind(".jPlayer"); - } - }); - // Remove the click handlers for $.jPlayer.event.click - this.internal.poster.jq.unbind(".jPlayer"); - if(this.internal.video.jq) { - this.internal.video.jq.unbind(".jPlayer"); - } - // Remove the fullscreen event handlers - this._fullscreenRemoveEventListeners(); - // Remove key bindings - if(this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - // Destroy the HTML bridge. - if(this.options.emulateHtml) { - this._destroyHtmlBridge(); - } - this.element.removeData("jPlayer"); // Remove jPlayer data - this.element.unbind(".jPlayer"); // Remove all event handlers created by the jPlayer constructor - this.element.empty(); // Remove the inserted child elements - - delete this.instances[this.internal.instance]; // Clear the instance on the static instance object - }, - enable: function() { // Plan to implement - // options.disabled = false - }, - disable: function () { // Plan to implement - // options.disabled = true - }, - _testCanPlayType: function(elem) { - // IE9 on Win Server 2008 did not implement canPlayType(), but it has the property. - try { - elem.canPlayType(this.format.mp3.codec); // The type is irrelevant. - return true; - } catch(err) { - return false; - } - }, - _uaBlocklist: function(list) { - // list : object with properties that are all regular expressions. Property names are irrelevant. - // Returns true if the user agent is matched in list. - var ua = navigator.userAgent.toLowerCase(), - block = false; - - $.each(list, function(p, re) { - if(re && re.test(ua)) { - block = true; - return false; // exit $.each. - } - }); - return block; - }, - _restrictNativeVideoControls: function() { - // Fallback to noFullWindow when nativeVideoControls is true and audio media is being used. Affects when both media types are used. - if(this.require.audio) { - if(this.status.nativeVideoControls) { - this.status.nativeVideoControls = false; - this.status.noFullWindow = true; - } - } - }, - _updateNativeVideoControls: function() { - if(this.html.video.available && this.html.used) { - // Turn the HTML Video controls on/off - this.htmlElement.video.controls = this.status.nativeVideoControls; - // Show/hide the jPlayer GUI. - this._updateAutohide(); - // For when option changed. The poster image is not updated, as it is dealt with in setMedia(). Acceptable degradation since seriously doubt these options will change on the fly. Can again review later. - if(this.status.nativeVideoControls && this.require.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else if(this.status.waitForPlay && this.status.video) { - this.internal.poster.jq.show(); - this.internal.video.jq.css({'width': '0px', 'height': '0px'}); - } - } - }, - _addHtmlEventListeners: function(mediaElement, entity) { - var self = this; - mediaElement.preload = this.options.preload; - mediaElement.muted = this.options.muted; - mediaElement.volume = this.options.volume; - - // Create the event listeners - // Only want the active entity to affect jPlayer and bubble events. - // Using entity.gate so that object is referenced and gate property always current - - mediaElement.addEventListener("progress", function() { - if(entity.gate) { - if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command - self.internal.cmdsIgnored = false; - } - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.progress); - } - }, false); - mediaElement.addEventListener("timeupdate", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.timeupdate); - } - }, false); - mediaElement.addEventListener("durationchange", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.durationchange); - } - }, false); - mediaElement.addEventListener("play", function() { - if(entity.gate) { - self._updateButtons(true); - self._html_checkWaitForPlay(); // So the native controls update this variable and puts the hidden interface in the correct state. Affects toggling native controls. - self._trigger($.jPlayer.event.play); - } - }, false); - mediaElement.addEventListener("playing", function() { - if(entity.gate) { - self._updateButtons(true); - self._seeked(); - self._trigger($.jPlayer.event.playing); - } - }, false); - mediaElement.addEventListener("pause", function() { - if(entity.gate) { - self._updateButtons(false); - self._trigger($.jPlayer.event.pause); - } - }, false); - mediaElement.addEventListener("waiting", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.waiting); - } - }, false); - mediaElement.addEventListener("seeking", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.seeking); - } - }, false); - mediaElement.addEventListener("seeked", function() { - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.seeked); - } - }, false); - mediaElement.addEventListener("volumechange", function() { - if(entity.gate) { - // Read the values back from the element as the Blackberry PlayBook shares the volume with the physical buttons master volume control. - // However, when tested 6th July 2011, those buttons do not generate an event. The physical play/pause button does though. - self.options.volume = mediaElement.volume; - self.options.muted = mediaElement.muted; - self._updateMute(); - self._updateVolume(); - self._trigger($.jPlayer.event.volumechange); - } - }, false); - mediaElement.addEventListener("suspend", function() { // Seems to be the only way of capturing that the iOS4 browser did not actually play the media from the page code. ie., It needs a user gesture. - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.suspend); - } - }, false); - mediaElement.addEventListener("ended", function() { - if(entity.gate) { - // Order of the next few commands are important. Change the time and then pause. - // Solves a bug in Firefox, where issuing pause 1st causes the media to play from the start. ie., The pause is ignored. - if(!$.jPlayer.browser.webkit) { // Chrome crashes if you do this in conjunction with a setMedia command in an ended event handler. ie., The playlist demo. - self.htmlElement.media.currentTime = 0; // Safari does not care about this command. ie., It works with or without this line. (Both Safari and Chrome are Webkit.) - } - self.htmlElement.media.pause(); // Pause otherwise a click on the progress bar will play from that point, when it shouldn't, since it stopped playback. - self._updateButtons(false); - self._getHtmlStatus(mediaElement, true); // With override true. Otherwise Chrome leaves progress at full. - self._updateInterface(); - self._trigger($.jPlayer.event.ended); - } - }, false); - mediaElement.addEventListener("error", function() { - if(entity.gate) { - self._updateButtons(false); - self._seeked(); - if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event. - clearTimeout(self.internal.htmlDlyCmdId); // Clears any delayed commands used in the HTML solution. - self.status.waitForLoad = true; // Allows the load operation to try again. - self.status.waitForPlay = true; // Reset since a play was captured. - if(self.status.video && !self.status.nativeVideoControls) { - self.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) { - self.internal.poster.jq.show(); - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self._error( { - type: $.jPlayer.error.URL, - context: self.status.src, // this.src shows absolute urls. Want context to show the url given. - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - } - } - }, false); - // Create all the other event listeners that bubble up to a jPlayer event from html, without being used by jPlayer. - $.each($.jPlayer.htmlEvent, function(i, eventType) { - mediaElement.addEventListener(this, function() { - if(entity.gate) { - self._trigger($.jPlayer.event[eventType]); - } - }, false); - }); - }, - _getHtmlStatus: function(media, override) { - var ct = 0, cpa = 0, sp = 0, cpr = 0; - - // Fixes the duration bug in iOS, where the durationchange event occurs when media.duration is not always correct. - // Fixes the initial duration bug in BB OS7, where the media.duration is infinity and displays as NaN:NaN due to Date() using inifity. - if(isFinite(media.duration)) { - this.status.duration = media.duration; - } - - ct = media.currentTime; - cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0; - if((typeof media.seekable === "object") && (media.seekable.length > 0)) { - sp = (this.status.duration > 0) ? 100 * media.seekable.end(media.seekable.length-1) / this.status.duration : 100; - cpr = (this.status.duration > 0) ? 100 * media.currentTime / media.seekable.end(media.seekable.length-1) : 0; // Duration conditional for iOS duration bug. ie., seekable.end is a NaN in that case. - } else { - sp = 100; - cpr = cpa; - } - - if(override) { - ct = 0; - cpr = 0; - cpa = 0; - } - - this.status.seekPercent = sp; - this.status.currentPercentRelative = cpr; - this.status.currentPercentAbsolute = cpa; - this.status.currentTime = ct; - - this.status.videoWidth = media.videoWidth; - this.status.videoHeight = media.videoHeight; - - this.status.readyState = media.readyState; - this.status.networkState = media.networkState; - this.status.playbackRate = media.playbackRate; - this.status.ended = media.ended; - }, - _resetStatus: function() { - this.status = $.extend({}, this.status, $.jPlayer.prototype.status); // Maintains the status properties that persist through a reset. - }, - _trigger: function(eventType, error, warning) { // eventType always valid as called using $.jPlayer.event.eventType - var event = $.Event(eventType); - event.jPlayer = {}; - event.jPlayer.version = $.extend({}, this.version); - event.jPlayer.options = $.extend(true, {}, this.options); // Deep copy - event.jPlayer.status = $.extend(true, {}, this.status); // Deep copy - event.jPlayer.html = $.extend(true, {}, this.html); // Deep copy - event.jPlayer.flash = $.extend(true, {}, this.flash); // Deep copy - if(error) { - event.jPlayer.error = $.extend({}, error); - } - if(warning) { - event.jPlayer.warning = $.extend({}, warning); - } - this.element.trigger(event); - }, - jPlayerFlashEvent: function(eventType, status) { // Called from Flash - if(eventType === $.jPlayer.event.ready) { - if(!this.internal.ready) { - this.internal.ready = true; - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Once Flash generates the ready event, minimise to zero as it is not affected by wmode anymore. - - this.version.flash = status.version; - if(this.version.needFlash !== this.version.flash) { - this._error( { - type: $.jPlayer.error.VERSION, - context: this.version.flash, - message: $.jPlayer.errorMsg.VERSION + this.version.flash, - hint: $.jPlayer.errorHint.VERSION - }); - } - this._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - this._trigger(eventType); - } else { - // This condition occurs if the Flash is hidden and then shown again. - // Firefox also reloads the Flash if the CSS position changes. position:fixed is used for full screen. - - // Only do this if the Flash is the solution being used at the moment. Affects Media players where both solution may be being used. - if(this.flash.gate) { - - // Send the current status to the Flash now that it is ready (available) again. - if(this.status.srcSet) { - - // Need to read original status before issuing the setMedia command. - var currentTime = this.status.currentTime, - paused = this.status.paused; - - this.setMedia(this.status.media); - if(currentTime > 0) { - if(paused) { - this.pause(currentTime); - } else { - this.play(currentTime); - } - } - } - this._trigger($.jPlayer.event.flashreset); - } - } - } - if(this.flash.gate) { - switch(eventType) { - case $.jPlayer.event.progress: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.timeupdate: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.play: - this._seeked(); - this._updateButtons(true); - this._trigger(eventType); - break; - case $.jPlayer.event.pause: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.ended: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.click: - this._trigger(eventType); // This could be dealt with by the default - break; - case $.jPlayer.event.error: - this.status.waitForLoad = true; // Allows the load operation to try again. - this.status.waitForPlay = true; // Reset since a play was captured. - if(this.status.video) { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); - } - if(this._validString(this.status.media.poster)) { - this.internal.poster.jq.show(); - } - if(this.css.jq.videoPlay.length && this.status.video) { - this.css.jq.videoPlay.show(); - } - if(this.status.video) { // Set up for another try. Execute before error event. - this._flash_setVideo(this.status.media); - } else { - this._flash_setAudio(this.status.media); - } - this._updateButtons(false); - this._error( { - type: $.jPlayer.error.URL, - context:status.src, - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - break; - case $.jPlayer.event.seeking: - this._seeking(); - this._trigger(eventType); - break; - case $.jPlayer.event.seeked: - this._seeked(); - this._trigger(eventType); - break; - case $.jPlayer.event.ready: - // The ready event is handled outside the switch statement. - // Captured here otherwise 2 ready events would be generated if the ready event handler used setMedia. - break; - default: - this._trigger(eventType); - } - } - return false; - }, - _getFlashStatus: function(status) { - this.status.seekPercent = status.seekPercent; - this.status.currentPercentRelative = status.currentPercentRelative; - this.status.currentPercentAbsolute = status.currentPercentAbsolute; - this.status.currentTime = status.currentTime; - this.status.duration = status.duration; - - this.status.videoWidth = status.videoWidth; - this.status.videoHeight = status.videoHeight; - - // The Flash does not generate this information in this release - this.status.readyState = 4; // status.readyState; - this.status.networkState = 0; // status.networkState; - this.status.playbackRate = 1; // status.playbackRate; - this.status.ended = false; // status.ended; - }, - _updateButtons: function(playing) { - if(playing === undefined) { - playing = !this.status.paused; - } else { - this.status.paused = !playing; - } - if(this.css.jq.play.length && this.css.jq.pause.length) { - if(playing) { - this.css.jq.play.hide(); - this.css.jq.pause.show(); - } else { - this.css.jq.play.show(); - this.css.jq.pause.hide(); - } - } - if(this.css.jq.restoreScreen.length && this.css.jq.fullScreen.length) { - if(this.status.noFullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.hide(); - } else if(this.options.fullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.show(); - } else { - this.css.jq.fullScreen.show(); - this.css.jq.restoreScreen.hide(); - } - } - if(this.css.jq.repeat.length && this.css.jq.repeatOff.length) { - if(this.options.loop) { - this.css.jq.repeat.hide(); - this.css.jq.repeatOff.show(); - } else { - this.css.jq.repeat.show(); - this.css.jq.repeatOff.hide(); - } - } - }, - _updateInterface: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.width(this.status.seekPercent+"%"); - } - if(this.css.jq.playBar.length) { - if(this.options.smoothPlayBar) { - this.css.jq.playBar.stop().animate({ - width: this.status.currentPercentAbsolute+"%" - }, 250, "linear"); - } else { - this.css.jq.playBar.width(this.status.currentPercentRelative+"%"); - } - } - if(this.css.jq.currentTime.length) { - this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)); - } - if(this.css.jq.duration.length) { - this.css.jq.duration.text(this._convertTime(this.status.duration)); - } - }, - _convertTime: ConvertTime.prototype.time, - _seeking: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.addClass("jp-seeking-bg"); - } - }, - _seeked: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.removeClass("jp-seeking-bg"); - } - }, - _resetGate: function() { - this.html.audio.gate = false; - this.html.video.gate = false; - this.flash.gate = false; - }, - _resetActive: function() { - this.html.active = false; - this.flash.active = false; - }, - setMedia: function(media) { - - /* media[format] = String: URL of format. Must contain all of the supplied option's video or audio formats. - * media.poster = String: Video poster URL. - * media.subtitles = String: * NOT IMPLEMENTED * URL of subtitles SRT file - * media.chapters = String: * NOT IMPLEMENTED * URL of chapters SRT file - * media.stream = Boolean: * NOT IMPLEMENTED * Designating actual media streams. ie., "false/undefined" for files. Plan to refresh the flash every so often. - */ - - var self = this, - supported = false, - posterChanged = this.status.media.poster !== media.poster; // Compare before reset. Important for OSX Safari as this.htmlElement.poster.src is absolute, even if original poster URL was relative. - - this._resetMedia(); - this._resetGate(); - this._resetActive(); - - $.each(this.formats, function(formatPriority, format) { - var isVideo = self.format[format].media === 'video'; - $.each(self.solutions, function(solutionPriority, solution) { - if(self[solution].support[format] && self._validString(media[format])) { // Format supported in solution and url given for format. - var isHtml = solution === 'html'; - - if(isVideo) { - if(isHtml) { - self.html.video.gate = true; - self._html_setVideo(media); - self.html.active = true; - } else { - self.flash.gate = true; - self._flash_setVideo(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self.status.video = true; - } else { - if(isHtml) { - self.html.audio.gate = true; - self._html_setAudio(media); - self.html.active = true; - } else { - self.flash.gate = true; - self._flash_setAudio(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.hide(); - } - self.status.video = false; - } - - supported = true; - return false; // Exit $.each - } - }); - if(supported) { - return false; // Exit $.each - } - }); - - if(supported) { - if(!(this.status.nativeVideoControls && this.html.video.gate)) { - // Set poster IMG if native video controls are not being used - // Note: With IE the IMG onload event occurs immediately when cached. - // Note: Poster hidden by default in _resetMedia() - if(this._validString(media.poster)) { - if(posterChanged) { // Since some browsers do not generate img onload event. - this.htmlElement.poster.src = media.poster; - } else { - this.internal.poster.jq.show(); - } - } - } - this.status.srcSet = true; - this.status.media = $.extend({}, media); - this._updateButtons(false); - this._updateInterface(); - } else { // jPlayer cannot support any formats provided in this browser - // Send an error event - this._error( { - type: $.jPlayer.error.NO_SUPPORT, - context: "{supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SUPPORT, - hint: $.jPlayer.errorHint.NO_SUPPORT - }); - } - }, - _resetMedia: function() { - this._resetStatus(); - this._updateButtons(false); - this._updateInterface(); - this._seeked(); - this.internal.poster.jq.hide(); - - clearTimeout(this.internal.htmlDlyCmdId); - - if(this.html.active) { - this._html_resetMedia(); - } else if(this.flash.active) { - this._flash_resetMedia(); - } - }, - clearMedia: function() { - this._resetMedia(); - - if(this.html.active) { - this._html_clearMedia(); - } else if(this.flash.active) { - this._flash_clearMedia(); - } - - this._resetGate(); - this._resetActive(); - }, - load: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_load(); - } else if(this.flash.active) { - this._flash_load(); - } - } else { - this._urlNotSetError("load"); - } - }, - focus: function() { - if(this.options.keyEnabled) { - $.jPlayer.focus = this; - } - }, - play: function(time) { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - this.focus(); - if(this.html.active) { - this._html_play(time); - } else if(this.flash.active) { - this._flash_play(time); - } - } else { - this._urlNotSetError("play"); - } - }, - videoPlay: function() { // Handles clicks on the play button over the video poster - this.play(); - }, - pause: function(time) { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(time); - } else if(this.flash.active) { - this._flash_pause(time); - } - } else { - this._urlNotSetError("pause"); - } - }, - pauseOthers: function() { - var self = this; - $.each(this.instances, function(i, element) { - if(self.element !== element) { // Do not this instance. - if(element.data("jPlayer").status.srcSet) { // Check that media is set otherwise would cause error event. - element.jPlayer("pause"); - } - } - }); - }, - stop: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(0); - } else if(this.flash.active) { - this._flash_pause(0); - } - } else { - this._urlNotSetError("stop"); - } - }, - playHead: function(p) { - p = this._limitValue(p, 0, 100); - if(this.status.srcSet) { - if(this.html.active) { - this._html_playHead(p); - } else if(this.flash.active) { - this._flash_playHead(p); - } - } else { - this._urlNotSetError("playHead"); - } - }, - _muted: function(muted) { - this.options.muted = muted; - if(this.html.used) { - this._html_mute(muted); - } - if(this.flash.used) { - this._flash_mute(muted); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateMute(muted); - this._updateVolume(this.options.volume); - this._trigger($.jPlayer.event.volumechange); - } - }, - mute: function(mute) { // mute is either: undefined (true), an event object (true) or a boolean (muted). - mute = mute === undefined ? true : !!mute; - this._muted(mute); - }, - unmute: function(unmute) { // unmute is either: undefined (true), an event object (true) or a boolean (!muted). - unmute = unmute === undefined ? true : !!unmute; - this._muted(!unmute); - }, - _updateMute: function(mute) { - if(mute === undefined) { - mute = this.options.muted; - } - if(this.css.jq.mute.length && this.css.jq.unmute.length) { - if(this.status.noVolume) { - this.css.jq.mute.hide(); - this.css.jq.unmute.hide(); - } else if(mute) { - this.css.jq.mute.hide(); - this.css.jq.unmute.show(); - } else { - this.css.jq.mute.show(); - this.css.jq.unmute.hide(); - } - } - }, - volume: function(v) { - v = this._limitValue(v, 0, 1); - this.options.volume = v; - - if(this.html.used) { - this._html_volume(v); - } - if(this.flash.used) { - this._flash_volume(v); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateVolume(v); - this._trigger($.jPlayer.event.volumechange); - } - }, - volumeBar: function(e) { // Handles clicks on the volumeBar - if(this.css.jq.volumeBar.length) { - // Using $(e.currentTarget) to enable multiple volume bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - y = $bar.height() - e.pageY + offset.top, - h = $bar.height(); - if(this.options.verticalVolume) { - this.volume(y/h); - } else { - this.volume(x/w); - } - } - if(this.options.muted) { - this._muted(false); - } - }, - volumeBarValue: function() { // Handles clicks on the volumeBarValue - // The volumeBar handles this event as the event propagates up the DOM. - }, - _updateVolume: function(v) { - if(v === undefined) { - v = this.options.volume; - } - v = this.options.muted ? 0 : v; - - if(this.status.noVolume) { - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.hide(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.hide(); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.hide(); - } - } else { - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.show(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.show(); - this.css.jq.volumeBarValue[this.options.verticalVolume ? "height" : "width"]((v*100)+"%"); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.show(); - } - } - }, - volumeMax: function() { // Handles clicks on the volume max - this.volume(1); - if(this.options.muted) { - this._muted(false); - } - }, - _cssSelectorAncestor: function(ancestor) { - var self = this; - this.options.cssSelectorAncestor = ancestor; - this._removeUiClass(); - this.ancestorJq = ancestor ? $(ancestor) : []; // Would use $() instead of [], but it is only 1.4+ - if(ancestor && this.ancestorJq.length !== 1) { // So empty strings do not generate the warning. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: ancestor, - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.ancestorJq.length + " found for cssSelectorAncestor.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - this._addUiClass(); - $.each(this.options.cssSelector, function(fn, cssSel) { - self._cssSelector(fn, cssSel); - }); - - // Set the GUI to the current state. - this._updateInterface(); - this._updateButtons(); - this._updateAutohide(); - this._updateVolume(); - this._updateMute(); - }, - _cssSelector: function(fn, cssSel) { - var self = this; - if(typeof cssSel === 'string') { - if($.jPlayer.prototype.options.cssSelector[fn]) { - if(this.css.jq[fn] && this.css.jq[fn].length) { - this.css.jq[fn].unbind(".jPlayer"); - } - this.options.cssSelector[fn] = cssSel; - this.css.cs[fn] = this.options.cssSelectorAncestor + " " + cssSel; - - if(cssSel) { // Checks for empty string - this.css.jq[fn] = $(this.css.cs[fn]); - } else { - this.css.jq[fn] = []; // To comply with the css.jq[fn].length check before its use. As of jQuery 1.4 could have used $() for an empty set. - } - - if(this.css.jq[fn].length) { - var handler = function(e) { - e.preventDefault(); - self[fn](e); - $(this).blur(); - }; - this.css.jq[fn].bind("click.jPlayer", handler); // Using jPlayer namespace - } - - if(cssSel && this.css.jq[fn].length !== 1) { // So empty strings do not generate the warning. ie., they just remove the old one. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: this.css.cs[fn], - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.css.jq[fn].length + " found for " + fn + " method.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_METHOD, - context: fn, - message: $.jPlayer.warningMsg.CSS_SELECTOR_METHOD, - hint: $.jPlayer.warningHint.CSS_SELECTOR_METHOD - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_STRING, - context: cssSel, - message: $.jPlayer.warningMsg.CSS_SELECTOR_STRING, - hint: $.jPlayer.warningHint.CSS_SELECTOR_STRING - }); - } - }, - seekBar: function(e) { // Handles clicks on the seekBar - if(this.css.jq.seekBar.length) { - // Using $(e.currentTarget) to enable multiple seek bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - p = 100 * x / w; - this.playHead(p); - } - }, - playBar: function() { // Handles clicks on the playBar - // The seekBar handles this event as the event propagates up the DOM. - }, - repeat: function() { // Handle clicks on the repeat button - this._loop(true); - }, - repeatOff: function() { // Handle clicks on the repeatOff button - this._loop(false); - }, - _loop: function(loop) { - if(this.options.loop !== loop) { - this.options.loop = loop; - this._updateButtons(); - this._trigger($.jPlayer.event.repeat); - } - }, - - // Plan to review the cssSelector method to cope with missing associated functions accordingly. - - currentTime: function() { // Handles clicks on the text - // Added to avoid errors using cssSelector system for the text - }, - duration: function() { // Handles clicks on the text - // Added to avoid errors using cssSelector system for the text - }, - gui: function() { // Handles clicks on the gui - // Added to avoid errors using cssSelector system for the gui - }, - noSolution: function() { // Handles clicks on the error message - // Added to avoid errors using cssSelector system for no-solution - }, - - // Options code adapted from ui.widget.js (1.8.7). Made changes so the key can use dot notation. To match previous getData solution in jPlayer 1. - option: function(key, value) { - var options = key; - - // Enables use: options(). Returns a copy of options object - if ( arguments.length === 0 ) { - return $.extend( true, {}, this.options ); - } - - if(typeof key === "string") { - var keys = key.split("."); - - // Enables use: options("someOption") Returns a copy of the option. Supports dot notation. - if(value === undefined) { - - var opt = $.extend(true, {}, this.options); - for(var i = 0; i < keys.length; i++) { - if(opt[keys[i]] !== undefined) { - opt = opt[keys[i]]; - } else { - this._warning( { - type: $.jPlayer.warning.OPTION_KEY, - context: key, - message: $.jPlayer.warningMsg.OPTION_KEY, - hint: $.jPlayer.warningHint.OPTION_KEY - }); - return undefined; - } - } - return opt; - } - - // Enables use: options("someOptionObject", someObject}). Creates: {someOptionObject:someObject} - // Enables use: options("someOption", someValue). Creates: {someOption:someValue} - // Enables use: options("someOptionObject.someOption", someValue). Creates: {someOptionObject:{someOption:someValue}} - - options = {}; - var opts = options; - - for(var j = 0; j < keys.length; j++) { - if(j < keys.length - 1) { - opts[keys[j]] = {}; - opts = opts[keys[j]]; - } else { - opts[keys[j]] = value; - } - } - } - - // Otherwise enables use: options(optionObject). Uses original object (the key) - - this._setOptions(options); - - return this; - }, - _setOptions: function(options) { - var self = this; - $.each(options, function(key, value) { // This supports the 2 level depth that the options of jPlayer has. Would review if we ever need more depth. - self._setOption(key, value); - }); - - return this; - }, - _setOption: function(key, value) { - var self = this; - - // The ability to set options is limited at this time. - - switch(key) { - case "volume" : - this.volume(value); - break; - case "muted" : - this._muted(value); - break; - case "cssSelectorAncestor" : - this._cssSelectorAncestor(value); // Set and refresh all associations for the new ancestor. - break; - case "cssSelector" : - $.each(value, function(fn, cssSel) { - self._cssSelector(fn, cssSel); // NB: The option is set inside this function, after further validity checks. - }); - break; - case "fullScreen" : - if(this.options[key] !== value) { // if changed - var wkv = $.jPlayer.nativeFeatures.fullscreen.used.webkitVideo; - if(!wkv || wkv && !this.status.waitForPlay) { - if(!wkv) { // No sensible way to unset option on these devices. - this.options[key] = value; - } - if(value) { - this._requestFullscreen(); - } else { - this._exitFullscreen(); - } - if(!wkv) { - this._setOption("fullWindow", value); - } - } - } - break; - case "fullWindow" : - if(this.options[key] !== value) { // if changed - this._removeUiClass(); - this.options[key] = value; - this._refreshSize(); - } - break; - case "size" : - if(!this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "sizeFull" : - if(this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "autohide" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._updateAutohide(); - break; - case "loop" : - this._loop(value); - break; - case "nativeVideoControls" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this._restrictNativeVideoControls(); - this._updateNativeVideoControls(); - break; - case "noFullWindow" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); // Need to check again as noFullWindow can depend on this flag and the restrict() can override it. - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this._restrictNativeVideoControls(); - this._updateButtons(); - break; - case "noVolume" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - this._updateVolume(); - this._updateMute(); - break; - case "emulateHtml" : - if(this.options[key] !== value) { // To avoid multiple event handlers being created, if true already. - this.options[key] = value; - if(value) { - this._emulateHtmlBridge(); - } else { - this._destroyHtmlBridge(); - } - } - break; - case "timeFormat" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - break; - case "keyEnabled" : - this.options[key] = value; - if(!value && this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - break; - case "keyBindings" : - this.options[key] = $.extend(true, {}, this.options[key], value); // store a merged DEEP copy of it, incase not all properties changed. - break; - case "audioFullScreen" : - this.options[key] = value; - break; - } - - return this; - }, - // End of: (Options code adapted from ui.widget.js) - - _refreshSize: function() { - this._setSize(); // update status and jPlayer element size - this._addUiClass(); // update the ui class - this._updateSize(); // update internal sizes - this._updateButtons(); - this._updateAutohide(); - this._trigger($.jPlayer.event.resize); - }, - _setSize: function() { - // Determine the current size from the options - if(this.options.fullWindow) { - this.status.width = this.options.sizeFull.width; - this.status.height = this.options.sizeFull.height; - this.status.cssClass = this.options.sizeFull.cssClass; - } else { - this.status.width = this.options.size.width; - this.status.height = this.options.size.height; - this.status.cssClass = this.options.size.cssClass; - } - - // Set the size of the jPlayer area. - this.element.css({'width': this.status.width, 'height': this.status.height}); - }, - _addUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.addClass(this.status.cssClass); - } - }, - _removeUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.removeClass(this.status.cssClass); - } - }, - _updateSize: function() { - // The poster uses show/hide so can simply resize it. - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - - // Video html or flash resized if necessary at this time, or if native video controls being used. - if(!this.status.waitForPlay && this.html.active && this.status.video || this.html.video.available && this.html.used && this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - else if(!this.status.waitForPlay && this.flash.active && this.status.video) { - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - }, - _updateAutohide: function() { - var self = this, - event = "mousemove.jPlayer", - namespace = ".jPlayerAutohide", - eventType = event + namespace, - handler = function() { - self.css.jq.gui.fadeIn(self.options.autohide.fadeIn, function() { - clearTimeout(self.internal.autohideId); - self.internal.autohideId = setTimeout( function() { - self.css.jq.gui.fadeOut(self.options.autohide.fadeOut); - }, self.options.autohide.hold); - }); - }; - - if(this.css.jq.gui.length) { - - // End animations first so that its callback is executed now. - // Otherwise an in progress fadeIn animation still has the callback to fadeOut again. - this.css.jq.gui.stop(true, true); - - // Removes the fadeOut operation from the fadeIn callback. - clearTimeout(this.internal.autohideId); - - this.element.unbind(namespace); - this.css.jq.gui.unbind(namespace); - - if(!this.status.nativeVideoControls) { - if(this.options.fullWindow && this.options.autohide.full || !this.options.fullWindow && this.options.autohide.restored) { - this.element.bind(eventType, handler); - this.css.jq.gui.bind(eventType, handler); - this.css.jq.gui.hide(); - } else { - this.css.jq.gui.show(); - } - } else { - this.css.jq.gui.hide(); - } - } - }, - fullScreen: function() { - this._setOption("fullScreen", true); - }, - restoreScreen: function() { - this._setOption("fullScreen", false); - }, - _fullscreenAddEventListeners: function() { - var self = this, - fs = $.jPlayer.nativeFeatures.fullscreen; - - if(fs.api.fullscreenEnabled) { - if(fs.event.fullscreenchange) { - // Create the event handler function and store it for removal. - if(typeof this.internal.fullscreenchangeHandler !== 'function') { - this.internal.fullscreenchangeHandler = function() { - self._fullscreenchange(); - }; - } - document.addEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - // No point creating handler for fullscreenerror. - // Either logic avoids fullscreen occurring (w3c/moz), or their is no event on the browser (webkit). - } - }, - _fullscreenRemoveEventListeners: function() { - var fs = $.jPlayer.nativeFeatures.fullscreen; - if(this.internal.fullscreenchangeHandler) { - document.addEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - }, - _fullscreenchange: function() { - // If nothing is fullscreen, then we cannot be in fullscreen mode. - if(this.options.fullScreen && !$.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()) { - this._setOption("fullScreen", false); - } - }, - _requestFullscreen: function() { - // Either the container or the jPlayer div - var e = this.ancestorJq.length ? this.ancestorJq[0] : this.element[0], - fs = $.jPlayer.nativeFeatures.fullscreen; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.requestFullscreen(e); - } - }, - _exitFullscreen: function() { - - var fs = $.jPlayer.nativeFeatures.fullscreen, - e; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.exitFullscreen(e); - } - }, - _html_initMedia: function(media) { - // Remove any existing track elements - var $media = $(this.htmlElement.media).empty(); - - // Create any track elements given with the media, as an Array of track Objects. - $.each(media.track || [], function(i,v) { - var track = document.createElement('track'); - track.setAttribute("kind", v.kind ? v.kind : ""); - track.setAttribute("src", v.src ? v.src : ""); - track.setAttribute("srclang", v.srclang ? v.srclang : ""); - track.setAttribute("label", v.label ? v.label : ""); - if(v.def) { - track.setAttribute("default", v.def); - } - $media.append(track); - }); - - this.htmlElement.media.src = this.status.src; - - if(this.options.preload !== 'none') { - this._html_load(); // See function for comments - } - this._trigger($.jPlayer.event.timeupdate); // The flash generates this event for its solution. - }, - _html_setFormat: function(media) { - var self = this; - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.html.support[format] && media[format]) { - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - }, - _html_setAudio: function(media) { - this._html_setFormat(media); - this.htmlElement.media = this.htmlElement.audio; - this._html_initMedia(media); - }, - _html_setVideo: function(media) { - this._html_setFormat(media); - if(this.status.nativeVideoControls) { - this.htmlElement.video.poster = this._validString(media.poster) ? media.poster : ""; - } - this.htmlElement.media = this.htmlElement.video; - this._html_initMedia(media); - }, - _html_resetMedia: function() { - if(this.htmlElement.media) { - if(this.htmlElement.media.id === this.internal.video.id && !this.status.nativeVideoControls) { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - this.htmlElement.media.pause(); - } - }, - _html_clearMedia: function() { - if(this.htmlElement.media) { - this.htmlElement.media.src = "about:blank"; - // The following load() is only required for Firefox 3.6 (PowerMacs). - // Recent HTMl5 browsers only require the src change. Due to changes in W3C spec and load() effect. - this.htmlElement.media.load(); // Stops an old, "in progress" download from continuing the download. Triggers the loadstart, error and emptied events, due to the empty src. Also an abort event if a download was in progress. - } - }, - _html_load: function() { - // This function remains to allow the early HTML5 browsers to work, such as Firefox 3.6 - // A change in the W3C spec for the media.load() command means that this is no longer necessary. - // This command should be removed and actually causes minor undesirable effects on some browsers. Such as loading the whole file and not only the metadata. - if(this.status.waitForLoad) { - this.status.waitForLoad = false; - this.htmlElement.media.load(); - } - clearTimeout(this.internal.htmlDlyCmdId); - }, - _html_play: function(time) { - var self = this, - media = this.htmlElement.media; - - this._html_load(); // Loads if required and clears any delayed commands. - - if(!isNaN(time)) { - - // Attempt to play it, since iOS has been ignoring commands - if(this.internal.cmdsIgnored) { - media.play(); - } - - try { - // !media.seekable is for old HTML5 browsers, like Firefox 3.6. - // Checking seekable.length is important for iOS6 to work with setMedia().play(time) - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - media.play(); - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.play(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } else { - media.play(); - } - this._html_checkWaitForPlay(); - }, - _html_pause: function(time) { - var self = this, - media = this.htmlElement.media; - - if(time > 0) { // We do not want the stop() command, which does pause(0), causing a load operation. - this._html_load(); // Loads if required and clears any delayed commands. - } else { - clearTimeout(this.internal.htmlDlyCmdId); - } - - // Order of these commands is important for Safari (Win) and IE9. Pause then change currentTime. - media.pause(); - - if(!isNaN(time)) { - try { - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.pause(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this._html_checkWaitForPlay(); - } - }, - _html_playHead: function(percent) { - var self = this, - media = this.htmlElement.media; - - this._html_load(); // Loads if required and clears any delayed commands. - - try { - if(typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = percent * media.seekable.end(media.seekable.length-1) / 100; - } else if(media.duration > 0 && !isNaN(media.duration)) { - media.currentTime = percent * media.duration / 100; - } else { - throw "e"; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.playHead(percent); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - if(!this.status.waitForLoad) { - this._html_checkWaitForPlay(); - } - }, - _html_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _html_volume: function(v) { - if(this.html.audio.available) { - this.htmlElement.audio.volume = v; - } - if(this.html.video.available) { - this.htmlElement.video.volume = v; - } - }, - _html_mute: function(m) { - if(this.html.audio.available) { - this.htmlElement.audio.muted = m; - } - if(this.html.video.available) { - this.htmlElement.video.muted = m; - } - }, - _flash_setAudio: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4a" : - case "fla" : - self._getMovie().fl_setAudio_m4a(media[format]); - break; - case "mp3" : - self._getMovie().fl_setAudio_mp3(media[format]); - break; - case "rtmpa": - self._getMovie().fl_setAudio_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_setVideo: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4v" : - case "flv" : - self._getMovie().fl_setVideo_m4v(media[format]); - break; - case "rtmpv": - self._getMovie().fl_setVideo_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_resetMedia: function() { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Must do via CSS as setting attr() to zero causes a jQuery error in IE. - this._flash_pause(NaN); - }, - _flash_clearMedia: function() { - try { - this._getMovie().fl_clearMedia(); - } catch(err) { this._flashError(err); } - }, - _flash_load: function() { - try { - this._getMovie().fl_load(); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - }, - _flash_play: function(time) { - try { - this._getMovie().fl_play(time); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - }, - _flash_pause: function(time) { - try { - this._getMovie().fl_pause(time); - } catch(err) { this._flashError(err); } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - } - }, - _flash_playHead: function(p) { - try { - this._getMovie().fl_play_head(p); - } catch(err) { this._flashError(err); } - if(!this.status.waitForLoad) { - this._flash_checkWaitForPlay(); - } - }, - _flash_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _flash_volume: function(v) { - try { - this._getMovie().fl_volume(v); - } catch(err) { this._flashError(err); } - }, - _flash_mute: function(m) { - try { - this._getMovie().fl_mute(m); - } catch(err) { this._flashError(err); } - }, - _getMovie: function() { - return document[this.internal.flash.id]; - }, - _getFlashPluginVersion: function() { - - // _getFlashPluginVersion() code influenced by: - // - FlashReplace 1.01: http://code.google.com/p/flashreplace/ - // - SWFObject 2.2: http://code.google.com/p/swfobject/ - - var version = 0, - flash; - if(window.ActiveXObject) { - try { - flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - if (flash) { // flash will return null when ActiveX is disabled - var v = flash.GetVariable("$version"); - if(v) { - v = v.split(" ")[1].split(","); - version = parseInt(v[0], 10) + "." + parseInt(v[1], 10); - } - } - } catch(e) {} - } - else if(navigator.plugins && navigator.mimeTypes.length > 0) { - flash = navigator.plugins["Shockwave Flash"]; - if(flash) { - version = navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/, "$1"); - } - } - return version * 1; // Converts to a number - }, - _checkForFlash: function (version) { - var flashOk = false; - if(this._getFlashPluginVersion() >= version) { - flashOk = true; - } - return flashOk; - }, - _validString: function(url) { - return (url && typeof url === "string"); // Empty strings return false - }, - _limitValue: function(value, min, max) { - return (value < min) ? min : ((value > max) ? max : value); - }, - _urlNotSetError: function(context) { - this._error( { - type: $.jPlayer.error.URL_NOT_SET, - context: context, - message: $.jPlayer.errorMsg.URL_NOT_SET, - hint: $.jPlayer.errorHint.URL_NOT_SET - }); - }, - _flashError: function(error) { - var errorType; - if(!this.internal.ready) { - errorType = "FLASH"; - } else { - errorType = "FLASH_DISABLED"; - } - this._error( { - type: $.jPlayer.error[errorType], - context: this.internal.flash.swf, - message: $.jPlayer.errorMsg[errorType] + error.message, - hint: $.jPlayer.errorHint[errorType] - }); - // Allow the audio player to recover if display:none and then shown again, or with position:fixed on Firefox. - // This really only affects audio in a media player, as an audio player could easily move the jPlayer element away from such issues. - this.internal.flash.jq.css({'width':'1px', 'height':'1px'}); - }, - _error: function(error) { - this._trigger($.jPlayer.event.error, error); - if(this.options.errorAlerts) { - this._alert("Error!" + (error.message ? "\n\n" + error.message : "") + (error.hint ? "\n\n" + error.hint : "") + "\n\nContext: " + error.context); - } - }, - _warning: function(warning) { - this._trigger($.jPlayer.event.warning, undefined, warning); - if(this.options.warningAlerts) { - this._alert("Warning!" + (warning.message ? "\n\n" + warning.message : "") + (warning.hint ? "\n\n" + warning.hint : "") + "\n\nContext: " + warning.context); - } - }, - _alert: function(message) { - alert("jPlayer " + this.version.script + " : id='" + this.internal.self.id +"' : " + message); - }, - _emulateHtmlBridge: function() { - var self = this; - - // Emulate methods on jPlayer's DOM element. - $.each( $.jPlayer.emulateMethods.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = function(arg) { - self[name](arg); - }; - - }); - - // Bubble jPlayer events to its DOM element. - $.each($.jPlayer.event, function(eventName,eventType) { - var nativeEvent = true; - $.each( $.jPlayer.reservedEvent.split(/\s+/g), function(i, name) { - if(name === eventName) { - nativeEvent = false; - return false; - } - }); - if(nativeEvent) { - self.element.bind(eventType + ".jPlayer.jPlayerHtml", function() { // With .jPlayer & .jPlayerHtml namespaces. - self._emulateHtmlUpdate(); - var domEvent = document.createEvent("Event"); - domEvent.initEvent(eventName, false, true); - self.internal.domNode.dispatchEvent(domEvent); - }); - } - // The error event would require a special case - }); - - // IE9 has a readyState property on all elements. The document should have it, but all (except media) elements inherit it in IE9. This conflicts with Popcorn, which polls the readyState. - }, - _emulateHtmlUpdate: function() { - var self = this; - - $.each( $.jPlayer.emulateStatus.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.status[name]; - }); - $.each( $.jPlayer.emulateOptions.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.options[name]; - }); - }, - _destroyHtmlBridge: function() { - var self = this; - - // Bridge event handlers are also removed by destroy() through .jPlayer namespace. - this.element.unbind(".jPlayerHtml"); // Remove all event handlers created by the jPlayer bridge. So you can change the emulateHtml option. - - // Remove the methods and properties - var emulated = $.jPlayer.emulateMethods + " " + $.jPlayer.emulateStatus + " " + $.jPlayer.emulateOptions; - $.each( emulated.split(/\s+/g), function(i, name) { - delete self.internal.domNode[name]; - }); - } - }; - - $.jPlayer.error = { - FLASH: "e_flash", - FLASH_DISABLED: "e_flash_disabled", - NO_SOLUTION: "e_no_solution", - NO_SUPPORT: "e_no_support", - URL: "e_url", - URL_NOT_SET: "e_url_not_set", - VERSION: "e_version" - }; - - $.jPlayer.errorMsg = { - FLASH: "jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ", // Used in: _flashError() - FLASH_DISABLED: "jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ", // Used in: _flashError() - NO_SOLUTION: "No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", // Used in: _init() - NO_SUPPORT: "It is not possible to play any media format provided in setMedia() on this browser using your current options.", // Used in: setMedia() - URL: "Media URL could not be loaded.", // Used in: jPlayerFlashEvent() and _addHtmlEventListeners() - URL_NOT_SET: "Attempt to issue media playback commands, while no media url is set.", // Used in: load(), play(), pause(), stop() and playHead() - VERSION: "jPlayer " + $.jPlayer.prototype.version.script + " needs Jplayer.swf version " + $.jPlayer.prototype.version.needFlash + " but found " // Used in: jPlayerReady() - }; - - $.jPlayer.errorHint = { - FLASH: "Check your swfPath option and that Jplayer.swf is there.", - FLASH_DISABLED: "Check that you have not display:none; the jPlayer entity or any ancestor.", - NO_SOLUTION: "Review the jPlayer options: support and supplied.", - NO_SUPPORT: "Video or audio formats defined in the supplied option are missing.", - URL: "Check media URL is valid.", - URL_NOT_SET: "Use setMedia() to set the media URL.", - VERSION: "Update jPlayer files." - }; - - $.jPlayer.warning = { - CSS_SELECTOR_COUNT: "e_css_selector_count", - CSS_SELECTOR_METHOD: "e_css_selector_method", - CSS_SELECTOR_STRING: "e_css_selector_string", - OPTION_KEY: "e_option_key" - }; - - $.jPlayer.warningMsg = { - CSS_SELECTOR_COUNT: "The number of css selectors found did not equal one: ", - CSS_SELECTOR_METHOD: "The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.", - CSS_SELECTOR_STRING: "The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.", - OPTION_KEY: "The option requested in jPlayer('option') is undefined." - }; - - $.jPlayer.warningHint = { - CSS_SELECTOR_COUNT: "Check your css selector and the ancestor.", - CSS_SELECTOR_METHOD: "Check your method name.", - CSS_SELECTOR_STRING: "Check your css selector is a string.", - OPTION_KEY: "Check your option name." - }; -})); diff --git a/libraries/filemanager-9.12.1/js/jPlayer/package.json b/libraries/filemanager-9.12.1/js/jPlayer/package.json deleted file mode 100644 index 70656c2..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "jplayer", - "version": "2.4.0", - "description": "The jQuery HTML5 Audio / Video Library", - "homepage": "http://www.jplayer.org/", - "keywords": [ - "audio", - "video" - ], - "dependencies": { - "jquery": ">1.7.0" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/MIT" - } - ], - "repositories": [ - { - "type": "git", - "url": "https://github.com/happyworm/jPlayer.git" - } - ], - "github": "http://github.com/happyworm/jPlayer", - "main": "jquery.jplayer/jquery.jplayer.js" -} diff --git a/libraries/filemanager-9.12.1/js/jPlayer/popcorn/popcorn.jplayer.js b/libraries/filemanager-9.12.1/js/jPlayer/popcorn/popcorn.jplayer.js deleted file mode 100644 index 8eff0da..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/popcorn/popcorn.jplayer.js +++ /dev/null @@ -1,579 +0,0 @@ -/* - * jPlayer Player Plugin for Popcorn JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2012 - 2014 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Version: 1.1.6 - * Date: 27th November 2014 - * - * For Popcorn Version: 1.3 - * For jPlayer Version: 2.9.0 - * Requires: jQuery 1.7+ - * Note: jQuery dependancy cannot be removed since jPlayer 2 is a jQuery plugin. Use of jQuery will be kept to a minimum. - */ - -(function(Popcorn) { - - var JQUERY_SCRIPT = '//code.jquery.com/jquery-1.11.1.min.js', // Used if jQuery not already present. - JPLAYER_SCRIPT = '//code.jplayer.org/2.9.0/jplayer/jquery.jplayer.min.js', // Used if jPlayer not already present. - JPLAYER_SWFPATH = '//code.jplayer.org/2.9.0/jplayer/jquery.jplayer.swf', // Used if not specified in jPlayer options via SRC Object. - SOLUTION = 'html,flash', // The default solution option. - DEBUG = false, // Decided to leave the debugging option and console output in for the time being. Overhead is trivial. - jQueryDownloading = false, // Flag to stop multiple instances from each pulling in jQuery, thus corrupting it. - jPlayerDownloading = false, // Flag to stop multiple instances from each pulling in jPlayer, thus corrupting it. - format = { // Duplicate of jPlayer 2.5.0 object, to avoid always requiring jQuery and jPlayer to be loaded before performing the _canPlayType() test. - mp3: { - codec: 'audio/mpeg', - flashCanPlay: true, - media: 'audio' - }, - m4a: { // AAC / MP4 - codec: 'audio/mp4; codecs="mp4a.40.2"', - flashCanPlay: true, - media: 'audio' - }, - m3u8a: { // AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="mp4a.40.2"', - flashCanPlay: false, - media: 'audio' - }, - m3ua: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'audio' - }, - oga: { // OGG - codec: 'audio/ogg; codecs="vorbis, opus"', - flashCanPlay: false, - media: 'audio' - }, - flac: { // FLAC - codec: 'audio/x-flac', - flashCanPlay: false, - media: 'audio' - }, - wav: { // PCM - codec: 'audio/wav; codecs="1"', - flashCanPlay: false, - media: 'audio' - }, - webma: { // WEBM - codec: 'audio/webm; codecs="vorbis"', - flashCanPlay: false, - media: 'audio' - }, - fla: { // FLV / F4A - codec: 'audio/x-flv', - flashCanPlay: true, - media: 'audio' - }, - rtmpa: { // RTMP AUDIO - codec: 'audio/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'audio' - }, - m4v: { // H.264 / MP4 - codec: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: true, - media: 'video' - }, - m3u8v: { // H.264 / AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: false, - media: 'video' - }, - m3uv: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'video' - }, - ogv: { // OGG - codec: 'video/ogg; codecs="theora, vorbis"', - flashCanPlay: false, - media: 'video' - }, - webmv: { // WEBM - codec: 'video/webm; codecs="vorbis, vp8"', - flashCanPlay: false, - media: 'video' - }, - flv: { // FLV / F4V - codec: 'video/x-flv', - flashCanPlay: true, - media: 'video' - }, - rtmpv: { // RTMP VIDEO - codec: 'video/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'video' - } - }, - isObject = function(val) { // Basic check for Object - if(val && typeof val === 'object' && val.hasOwnProperty) { - return true; - } else { - return false; - } - }, - getMediaType = function(url) { // Function to gleam the media type from the URL - var mediaType = false; - if(/\.mp3$/i.test(url)) { - mediaType = 'mp3'; - } else if(/\.mp4$/i.test(url) || /\.m4v$/i.test(url)) { - mediaType = 'm4v'; - } else if(/\.m4a$/i.test(url)) { - mediaType = 'm4a'; - } else if(/\.ogg$/i.test(url) || /\.oga$/i.test(url)) { - mediaType = 'oga'; - } else if(/\.ogv$/i.test(url)) { - mediaType = 'ogv'; - } else if(/\.webm$/i.test(url)) { - mediaType = 'webmv'; - } - return mediaType; - }, - getSupplied = function(url) { // Function to generate a supplied option from an src object. ie., When supplied not specified. - var supplied = '', - separator = ''; - if(isObject(url)) { - // Generate supplied option from object's properties. Non-format properties would be ignored by jPlayer. Order is unpredictable. - for(var prop in url) { - if(url.hasOwnProperty(prop)) { - supplied += separator + prop; - separator = ','; - } - } - } - if(DEBUG) console.log('getSupplied(): Generated: supplied = "' + supplied + '"'); - return supplied; - }; - - Popcorn.player( 'jplayer', { - _canPlayType: function( containerType, url ) { - // url : Either a String or an Object structured similar a jPlayer media object. ie., As used by setMedia in jPlayer. - // The url object may also contain a solution and supplied property. - - // Define the src object structure here! - - var cType = containerType.toLowerCase(), - srcObj = { - media:{}, - options:{} - }, - rVal = false, // Only a boolean false means it is not supported. - mediaType; - - if(cType !== 'video' && cType !== 'audio') { - - if(typeof url === 'string') { - // Check it starts with http, so the URL is absolute... Well, it is not a perfect check. - if(/^http.*/i.test(url)) { - mediaType = getMediaType(url); - if(mediaType) { - srcObj.media[mediaType] = url; - srcObj.options.solution = SOLUTION; - srcObj.options.supplied = mediaType; - } - } - } else { - srcObj = url; // Assume the url is an src object. - } - - // Check for Object and appropriate minimum data structure. - if(isObject(srcObj) && isObject(srcObj.media)) { - - if(!isObject(srcObj.options)) { - srcObj.options = {}; - } - - if(!srcObj.options.solution) { - srcObj.options.solution = SOLUTION; - } - - if(!srcObj.options.supplied) { - srcObj.options.supplied = getSupplied(srcObj.media); - } - - // Figure out how jPlayer will play it. - // This may not work properly when both audio and video is supplied. ie., A media player. But it should return truethy and jPlayer can figure it out. - - var solution = srcObj.options.solution.toLowerCase().split(","), // Create the solution array, with prority based on the order of the solution string. - supplied = srcObj.options.supplied.toLowerCase().split(","); // Create the supplied formats array, with prority based on the order of the supplied formats string. - - for(var sol = 0; sol < solution.length; sol++) { - - var solutionType = solution[sol].replace(/^\s+|\s+$/g, ""), //trim - checkingHtml = solutionType === 'html', - checkingFlash = solutionType === 'flash', - mediaElem; - - for(var fmt = 0; fmt < supplied.length; fmt++) { - mediaType = supplied[fmt].replace(/^\s+|\s+$/g, ""); //trim - if(format[mediaType]) { // Check format is valid. - - // Create an HTML5 media element for the type of media. - if(!mediaElem && checkingHtml) { - mediaElem = document.createElement(format[mediaType].media); - } - // See if the HTML5 media element can play the MIME / Codec type. - // Flash also returns the object if the format is playable, so it is truethy, but that html property is false. - // This assumes Flash is available, but that should be dealt with by jPlayer if that happens. - var htmlCanPlay = !!(mediaElem && mediaElem.canPlayType && mediaElem.canPlayType(format[mediaType].codec)), - htmlWillPlay = htmlCanPlay && checkingHtml, - flashWillPlay = format[mediaType].flashCanPlay && checkingFlash; - // The first one found will match what jPlayer uses. - if(htmlWillPlay || flashWillPlay) { - rVal = { - html: htmlWillPlay, - type: mediaType - }; - sol = solution.length; // Exit solution loop - fmt = supplied.length; // Exit supplied loop - } - } - } - } - } - } - return rVal; - }, - // _setup: function( options ) { // Warning: options is deprecated. - _setup: function() { - var media = this, - myPlayer, // The jQuery selector of the jPlayer element. Usually a
    - jPlayerObj, // The jPlayer data instance. For performance and DRY code. - mediaType = 'unknown', - jpMedia = {}, - jpOptions = {}, - ready = false, // Used during init to override the annoying duration dependance in the track event padding during Popcorn's isReady(). ie., We is ready after loadeddata and duration can then be set real value at leisure. - duration = 0, // For the durationchange event with both HTML5 and Flash solutions. Used with 'ready' to keep control during the Popcorn isReady() via loadeddata event. (Duration=0 is bad.) - durationchangeId = null, // A timeout ID used with delayed durationchange event. (Because of the duration=NaN fudge to avoid Popcorn track event corruption.) - canplaythrough = false, - error = null, // The MediaError object. - - dispatchDurationChange = function() { - if(ready) { - if(DEBUG) console.log('Dispatched event : durationchange : ' + duration); - media.dispatchEvent('durationchange'); - } else { - if(DEBUG) console.log('DELAYED EVENT (!ready) : durationchange : ' + duration); - clearTimeout(durationchangeId); // Stop multiple triggers causing multiple timeouts running in parallel. - durationchangeId = setTimeout(dispatchDurationChange, 250); - } - }, - - jPlayerFlashEventsPatch = function() { - - /* Events already supported by jPlayer Flash: - * loadstart - * loadedmetadata (M4A, M4V) - * progress - * play - * pause - * seeking - * seeked - * timeupdate - * ended - * volumechange - * error <- See the custom handler in jPlayerInit() - */ - - /* Events patched: - * loadeddata - * durationchange - * canplaythrough - * playing - */ - - /* Events NOT patched: - * suspend - * abort - * emptied - * stalled - * loadedmetadata (MP3) - * waiting - * canplay - * ratechange - */ - - // Triggering patched events through the jPlayer Object so the events are homogeneous. ie., The contain the event.jPlayer data structure. - - var checkDuration = function(event) { - if(event.jPlayer.status.duration !== duration) { - duration = event.jPlayer.status.duration; - dispatchDurationChange(); - } - }, - - checkCanPlayThrough = function(event) { - if(!canplaythrough && event.jPlayer.status.seekPercent === 100) { - canplaythrough = true; - setTimeout(function() { - if(DEBUG) console.log('Trigger : canplaythrough'); - jPlayerObj._trigger($.jPlayer.event.canplaythrough); - }, 0); - } - }; - - myPlayer.bind($.jPlayer.event.loadstart, function() { - setTimeout(function() { - if(DEBUG) console.log('Trigger : loadeddata'); - jPlayerObj._trigger($.jPlayer.event.loadeddata); - }, 0); - }) - .bind($.jPlayer.event.progress, function(event) { - checkDuration(event); - checkCanPlayThrough(event); - }) - .bind($.jPlayer.event.timeupdate, function(event) { - checkDuration(event); - checkCanPlayThrough(event); - }) - .bind($.jPlayer.event.play, function() { - setTimeout(function() { - if(DEBUG) console.log('Trigger : playing'); - jPlayerObj._trigger($.jPlayer.event.playing); - }, 0); - }); - - if(DEBUG) console.log('Created CUSTOM event handlers for FLASH'); - }, - - jPlayerInit = function() { - (function($) { - - myPlayer = $('#' + media.id); - - if(typeof media.src === 'string') { - mediaType = getMediaType(media.src); - jpMedia[mediaType] = media.src; - jpOptions.supplied = mediaType; - jpOptions.solution = SOLUTION; - } else if(isObject(media.src)) { - jpMedia = isObject(media.src.media) ? media.src.media : {}; - jpOptions = isObject(media.src.options) ? media.src.options : {}; - jpOptions.solution = jpOptions.solution || SOLUTION; - jpOptions.supplied = jpOptions.supplied || getSupplied(media.src.media); - } - - // Allow the swfPath to be set to local server. ie., If the jPlayer Plugin is local and already on the page, then you can also use the local SWF. - jpOptions.swfPath = jpOptions.swfPath || JPLAYER_SWFPATH; - - myPlayer.bind($.jPlayer.event.ready, function(event) { - if(event.jPlayer.flash.used) { - jPlayerFlashEventsPatch(); - } - // Set the media andd load it, so that the Flash solution behaves similar to HTML5 solution. - // This also allows the loadstart event to be used to know jPlayer is ready. - $(this).jPlayer('setMedia', jpMedia).jPlayer('load'); - }); - - // Do not auto-bubble the reserved events, nor the loadeddata and durationchange event, since the duration must be carefully handled when loadeddata event occurs. - // See the duration property code for more details. (Ranting.) - - var reservedEvents = $.jPlayer.reservedEvent + ' loadeddata durationchange', - reservedEvent = reservedEvents.split(/\s+/g); - - // Generate event handlers for all the standard HTML5 media events. (Except durationchange) - - var bindEvent = function(name) { - myPlayer.bind($.jPlayer.event[name], function(event) { - if(DEBUG) console.log('Dispatched event: ' + name + (event && event.jPlayer ? ' (' + event.jPlayer.status.currentTime + 's)' : '')); // Must be after dispatch for some reason on Firefox/Opera - media.dispatchEvent(name); - }); - if(DEBUG) console.log('Created event handler for: ' + name); - }; - - for(var eventName in $.jPlayer.event) { - if($.jPlayer.event.hasOwnProperty(eventName)) { - var nativeEvent = true; - for(var iRes in reservedEvent) { - if(reservedEvent.hasOwnProperty(iRes)) { - if(reservedEvent[iRes] === eventName) { - nativeEvent = false; - break; - } - } - } - if(nativeEvent) { - bindEvent(eventName); - } else { - if(DEBUG) console.log('Skipped auto event handler creation for: ' + eventName); - } - } - } - - myPlayer.bind($.jPlayer.event.loadeddata, function(event) { - if(DEBUG) console.log('Dispatched event: loadeddata' + (event && event.jPlayer ? ' (' + event.jPlayer.status.currentTime + 's)' : '')); - media.dispatchEvent('loadeddata'); - ready = true; - }); - if(DEBUG) console.log('Created CUSTOM event handler for: loadeddata'); - - myPlayer.bind($.jPlayer.event.durationchange, function(event) { - duration = event.jPlayer.status.duration; - dispatchDurationChange(); - }); - if(DEBUG) console.log('Created CUSTOM event handler for: durationchange'); - - // The error event is a special case. Plus jPlayer error event assumes it is a broken URL. (It could also be a decoder error... Or aborted or a Network error.) - myPlayer.bind($.jPlayer.event.error, function(event) { - // Not sure how to handle the error situation. Popcorn does not appear to have the error or error.code property documented here: http://popcornjs.org/popcorn-docs/media-methods/ - // If any error event happens, then something has gone pear shaped. - - error = event.jPlayer.error; // Saving object pointer, not a copy of the object. Possible garbage collection issue... But the player is dead anyway, so don't care. - - if(error.type === $.jPlayer.error.URL) { - error.code = 4; // MEDIA_ERR_SRC_NOT_SUPPORTED since jPlayer makes this assumption. It is the most common error, then the decode error. Never seen either of the other 2 error types occur. - } else { - error.code = 0; // It was a jPlayer error, not an HTML5 media error. - } - - if(DEBUG) console.log('Dispatched event: error'); - if(DEBUG) console.dir(error); - media.dispatchEvent('error'); - }); - if(DEBUG) console.log('Created CUSTOM event handler for: error'); - - Popcorn.player.defineProperty( media, 'error', { - set: function() { - // Read-only property - return error; - }, - get: function() { - return error; - } - }); - - Popcorn.player.defineProperty( media, 'currentTime', { - set: function( val ) { - if(jPlayerObj.status.paused) { - myPlayer.jPlayer('pause', val); - } else { - myPlayer.jPlayer('play', val); - } - return val; - }, - get: function() { - return jPlayerObj.status.currentTime; - } - }); - - /* The joy of duration and the loadeddata event isReady() handler - * The duration is assumed to be a NaN or a valid duration. - * jPlayer uses zero instead of a NaN and this screws up the Popcorn track event start/end arrays padding. - * This line here: - * videoDurationPlus = duration != duration ? Number.MAX_VALUE : duration + 1; - * Not sure why it is not simply: - * videoDurationPlus = Number.MAX_VALUE; // Who cares if the padding is close to the real duration? - * So if you trigger loadeddata before the duration is correct, the track event padding is screwed up. (It pads the start, not the end... Well, duration+1 = 0+1 = 1s) - * That line makes the MP3 Flash fallback difficult to setup. The whole MP3 will need to load before the duration is known. - * Planning on using a NaN for duration until a >0 value is found... Except with MP3, where seekPercent must be 100% before setting the duration. - * Why not just use a NaN during init... And then correct the duration later? - */ - - Popcorn.player.defineProperty( media, 'duration', { - set: function() { - // Read-only property - if(ready) { - return duration; - } else { - return NaN; - } - }, - get: function() { - if(ready) { - return duration; // Popcorn has initialized, we can now use duration zero or whatever without fear. - } else { - return NaN; // Keep the duration a NaN until after loadeddata event has occurred. Otherwise Popcorn track event padding is corrupted. - } - } - }); - - Popcorn.player.defineProperty( media, 'muted', { - set: function( val ) { - myPlayer.jPlayer('mute', val); - return jPlayerObj.options.muted; - }, - get: function() { - return jPlayerObj.options.muted; - } - }); - - Popcorn.player.defineProperty( media, 'volume', { - set: function( val ) { - myPlayer.jPlayer('volume', val); - return jPlayerObj.options.volume; - }, - get: function() { - return jPlayerObj.options.volume; - } - }); - - Popcorn.player.defineProperty( media, 'paused', { - set: function() { - // Read-only property - return jPlayerObj.status.paused; - }, - get: function() { - return jPlayerObj.status.paused; - } - }); - - media.play = function() { - myPlayer.jPlayer('play'); - }; - media.pause = function() { - myPlayer.jPlayer('pause'); - }; - - myPlayer.jPlayer(jpOptions); // Instance jPlayer. Note that the options should not have a ready event defined... Kill it by default? - jPlayerObj = myPlayer.data('jPlayer'); - - }(jQuery)); - }, - - jPlayerCheck = function() { - if (!jQuery.jPlayer) { - if (!jPlayerDownloading) { - jPlayerDownloading = true; - Popcorn.getScript(JPLAYER_SCRIPT, function() { - jPlayerDownloading = false; - jPlayerInit(); - }); - } else { - setTimeout(jPlayerCheck, 250); - } - } else { - jPlayerInit(); - } - }, - - jQueryCheck = function() { - if (!window.jQuery) { - if (!jQueryDownloading) { - jQueryDownloading = true; - Popcorn.getScript(JQUERY_SCRIPT, function() { - jQueryDownloading = false; - jPlayerCheck(); - }); - } else { - setTimeout(jQueryCheck, 250); - } - } else { - jPlayerCheck(); - } - }; - - jQueryCheck(); - }, - _teardown: function() { - jQuery('#' + this.id).jPlayer('destroy'); - } - }); - -}(Popcorn)); \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/popcorn/popcorn.jplayer.min.js b/libraries/filemanager-9.12.1/js/jPlayer/popcorn/popcorn.jplayer.min.js deleted file mode 100644 index 9b69a13..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/popcorn/popcorn.jplayer.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! Popcorn Player for jPlayer 2.9.2 ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ -!function(a){var b="//code.jquery.com/jquery-1.11.1.min.js",c="//code.jplayer.org/2.9.0/jplayer/jquery.jplayer.min.js",d="//code.jplayer.org/2.9.0/jplayer/jquery.jplayer.swf",e="html,flash",f=!1,g=!1,h=!1,i={mp3:{codec:"audio/mpeg",flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},j=function(a){return a&&"object"==typeof a&&a.hasOwnProperty?!0:!1},k=function(a){var b=!1;return/\.mp3$/i.test(a)?b="mp3":/\.mp4$/i.test(a)||/\.m4v$/i.test(a)?b="m4v":/\.m4a$/i.test(a)?b="m4a":/\.ogg$/i.test(a)||/\.oga$/i.test(a)?b="oga":/\.ogv$/i.test(a)?b="ogv":/\.webm$/i.test(a)&&(b="webmv"),b},l=function(a){var b="",c="";if(j(a))for(var d in a)a.hasOwnProperty(d)&&(b+=c+d,c=",");return f&&console.log('getSupplied(): Generated: supplied = "'+b+'"'),b};a.player("jplayer",{_canPlayType:function(a,b){var c,d=a.toLowerCase(),f={media:{},options:{}},g=!1;if("video"!==d&&"audio"!==d&&("string"==typeof b?/^http.*/i.test(b)&&(c=k(b),c&&(f.media[c]=b,f.options.solution=e,f.options.supplied=c)):f=b,j(f)&&j(f.media))){j(f.options)||(f.options={}),f.options.solution||(f.options.solution=e),f.options.supplied||(f.options.supplied=l(f.media));for(var h=f.options.solution.toLowerCase().split(","),m=f.options.supplied.toLowerCase().split(","),n=0;n
    - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.audio.single.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.audio.single.html deleted file mode 100644 index 3b3341f..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.audio.single.html +++ /dev/null @@ -1,37 +0,0 @@ - - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.audio.stream.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.audio.stream.html deleted file mode 100644 index efeb504..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.audio.stream.html +++ /dev/null @@ -1,24 +0,0 @@ - - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.video.playlist.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.video.playlist.html deleted file mode 100644 index 7ffc474..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.video.playlist.html +++ /dev/null @@ -1,52 +0,0 @@ - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.video.single.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.video.single.html deleted file mode 100644 index c9a16f8..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/mustache/jplayer.blue.monday.video.single.html +++ /dev/null @@ -1,43 +0,0 @@ - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/skin.handlebars b/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/skin.handlebars deleted file mode 100644 index b8ec557..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/blue.monday/skin.handlebars +++ /dev/null @@ -1,40 +0,0 @@ - - \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/css/jplayer.pink.flag.css b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/css/jplayer.pink.flag.css deleted file mode 100644 index 8703b18..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/css/jplayer.pink.flag.css +++ /dev/null @@ -1,572 +0,0 @@ -/*! Pink Flag Skin for jPlayer 2.9.2 ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */ - -/* - * Skin for jPlayer Plugin (jQuery JavaScript Library) - * http://www.jplayer.org - * - * Skin Name: Pink Flag - * - * Copyright (c) 2012 - 2014 Happyworm Ltd - * Licensed under the MIT license. - * - http://www.opensource.org/licenses/mit-license.php - * - * Author: Silvia Benvenuti - * Skin Version: 2.1 (jPlayer 2.8.0) - * Date: 13th November 2014 - */ -.jp-audio *:focus, -.jp-audio-stream *:focus, -.jp-video *:focus { - /* Disable the browser focus highlighting. */ - outline: none; } - -.jp-audio button::-moz-focus-inner, -.jp-audio-stream button::-moz-focus-inner, -.jp-video button::-moz-focus-inner { - /* Disable the browser CSS3 focus highlighting. */ - border: 0; } - -.jp-audio, -.jp-audio-stream, -.jp-video { - font-size: 16px; - font-family: Verdana, Arial, sans-serif; - line-height: 1.6; - color: #fff; - border-top: 1px solid #554461; - border-left: 1px solid #554461; - border-right: 1px solid #180a1f; - border-bottom: 1px solid #180a1f; - background-color: #3a2a45; } - -.jp-audio { - width: 201px; - padding: 20px; } - -.jp-audio-stream { - width: 101px; - padding: 20px 20px 10px 20px; } - -.jp-video-270p { - width: 480px; } - -.jp-video-360p { - width: 640px; } - -.jp-video-full { - /* Rules for IE6 (full-screen) */ - width: 480px; - height: 270px; - /* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */ - position: static !important; - position: relative; } - -/* The z-index rule is defined in this manner to enable Popcorn plugins that add overlays to video area. EG. Subtitles. */ -.jp-video-full div div { - z-index: 1000; } - -.jp-video-full .jp-jplayer { - top: 0; - left: 0; - position: fixed !important; - position: relative; - /* Rules for IE6 (full-screen) */ - overflow: hidden; } - -.jp-video-full .jp-gui { - position: fixed !important; - position: static; - /* Rules for IE6 (full-screen) */ - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1001; - /* 1 layer above the others. */ } - -.jp-video-full .jp-interface { - position: absolute !important; - position: relative; - /* Rules for IE6 (full-screen) */ - bottom: 0; - left: 0; } - -.jp-interface { - position: relative; - width: 100%; - background-color: #3a2a45; - /* Required for the full screen */ } - -/* @group CONTROLS */ -.jp-video .jp-controls-holder { - clear: both; - width: 440px; - margin: 0 auto 10px auto; - position: relative; - overflow: hidden; } - -.jp-audio .jp-controls-holder { - height: 80px; } - -.jp-audio-stream .jp-controls-holder { - height: 50px; } - -.jp-controls { - background: url("../image/jplayer.pink.flag.jpg") 0 0 no-repeat; - padding: 1px 0 2px 1px; - overflow: hidden; - width: 201px; - height: 34px; } - -.jp-audio .jp-controls, -.jp-audio-stream .jp-controls { - margin: 0 auto; } - -.jp-audio-stream .jp-controls { - width: 100px; } - -.jp-video .jp-controls { - margin: 0 0 0 115px; - float: left; - display: inline; - /* need this to fix IE6 double margin */ } - -.jp-controls button { - display: block; - float: left; - overflow: hidden; - text-indent: -9999px; - height: 34px; - margin: 0 1px 2px 0; - padding: 0; - border: none; - cursor: pointer; } - -/* @group single player controls */ -.jp-type-single .jp-controls button { - width: 99px; } - -.jp-type-single .jp-play { - background: url("../image/jplayer.pink.flag.jpg") 0px -40px no-repeat; } - -.jp-type-single .jp-play:focus { - background: url("../image/jplayer.pink.flag.jpg") -100px -40px no-repeat; } - -.jp-state-playing .jp-type-single .jp-play { - background: url("../image/jplayer.pink.flag.jpg") 0px -120px no-repeat; } - -.jp-state-playing .jp-type-single .jp-play:focus { - background: url("../image/jplayer.pink.flag.jpg") -100px -120px no-repeat; } - -/* The right border is normally in the ul background image. */ -.jp-audio-stream .jp-play, -.jp-audio-stream .jp-pause { - border-right: 1px solid #180920; } - -.jp-type-single .jp-stop { - background: url("../image/jplayer.pink.flag.jpg") 0px -80px no-repeat; } - -.jp-type-single .jp-stop:focus { - background: url("../image/jplayer.pink.flag.jpg") -100px -80px no-repeat; } - -/* @end */ -/* @group playlist player controls */ -.jp-type-playlist .jp-controls button { - width: 49px; } - -.jp-type-playlist .jp-play { - background: url("../image/jplayer.pink.flag.jpg") -24px -40px no-repeat; } - -.jp-type-playlist .jp-play:focus { - background: url("../image/jplayer.pink.flag.jpg") -124px -40px no-repeat; } - -.jp-state-playing div.jp-type-playlist .jp-play { - background: url("../image/jplayer.pink.flag.jpg") -24px -120px no-repeat; } - -.jp-state-playing div.jp-type-playlist .jp-play:focus { - background: url("../image/jplayer.pink.flag.jpg") -124px -120px no-repeat; } - -.jp-type-playlist .jp-stop { - background: url("../image/jplayer.pink.flag.jpg") -24px -80px no-repeat; } - -.jp-type-playlist .jp-stop:focus { - background: url("../image/jplayer.pink.flag.jpg") -124px -80px no-repeat; } - -.jp-type-playlist .jp-previous { - background: url("../image/jplayer.pink.flag.jpg") -24px -200px no-repeat; } - -.jp-type-playlist .jp-previous:focus { - background: url("../image/jplayer.pink.flag.jpg") -124px -200px no-repeat; } - -.jp-type-playlist .jp-next { - background: url("../image/jplayer.pink.flag.jpg") -24px -160px no-repeat; } - -.jp-type-playlist .jp-next:focus { - background: url("../image/jplayer.pink.flag.jpg") -124px -160px no-repeat; } - -/* @end */ -/* @group TOGGLES */ -.jp-toggles { - padding: 0; - margin: 0 auto; - overflow: hidden; } - -.jp-audio .jp-toggles { - width: 55px; } - -.jp-audio .jp-type-single .jp-toggles { - width: 25px; } - -.jp-video .jp-toggles { - float: left; - width: 105px; - margin: 10px 0 0 15px; } - -.jp-toggles button { - display: block; - float: left; - width: 25px; - height: 18px; - text-indent: -9999px; - line-height: 100%; - /* need this for IE6 */ - border: none; - cursor: pointer; } - -.jp-full-screen { - background: url("../image/jplayer.pink.flag.jpg") 0 -420px no-repeat; - margin-left: 15px; } - -.jp-full-screen:focus { - background: url("../image/jplayer.pink.flag.jpg") -30px -420px no-repeat; } - -.jp-state-full-screen .jp-full-screen { - background: url("../image/jplayer.pink.flag.jpg") -60px -420px no-repeat; } - -.jp-state-full-screen .jp-full-screen:focus { - background: url("../image/jplayer.pink.flag.jpg") -90px -420px no-repeat; } - -.jp-repeat { - background: url("../image/jplayer.pink.flag.jpg") 0 -440px no-repeat; - margin-left: 0; } - -.jp-repeat:focus { - background: url("../image/jplayer.pink.flag.jpg") -30px -440px no-repeat; } - -.jp-state-looped .jp-repeat { - background: url("../image/jplayer.pink.flag.jpg") -60px -440px no-repeat; } - -.jp-state-looped .jp-repeat:focus { - background: url("../image/jplayer.pink.flag.jpg") -90px -440px no-repeat; } - -.jp-shuffle { - background: url("../image/jplayer.pink.flag.jpg") 0 -460px no-repeat; - margin-left: 15px; } - -.jp-shuffle:focus { - background: url("../image/jplayer.pink.flag.jpg") -30px -460px no-repeat; } - -.jp-state-shuffled .jp-shuffle { - background: url("../image/jplayer.pink.flag.jpg") -60px -460px no-repeat; } - -.jp-state-shuffled .jp-shuffle:focus { - background: url("../image/jplayer.pink.flag.jpg") -90px -460px no-repeat; } - -.jp-audio .jp-shuffle { - margin-left: 5px; } - -/* @end */ -/* @group progress bar */ -/* The seeking class is added/removed inside jPlayer */ -div.jp-seeking-bg { - background: url("../image/jplayer.pink.flag.seeking.gif"); } - -.jp-progress { - background: url("../image/jplayer.pink.flag.jpg") 0px -240px no-repeat; - width: 197px; - height: 13px; - padding: 0 2px 2px 2px; - margin-bottom: 4px; - overflow: hidden; } - -div.jp-video .jp-progress { - border-top: 1px solid #180a1f; - border-bottom: 1px solid #554560; - width: 100%; - background-image: none; - padding: 0; } - -.jp-seek-bar { - background: url("../image/jplayer.pink.flag.jpg") 0px -260px repeat-x; - width: 0px; - height: 100%; - overflow: hidden; - cursor: pointer; } - -.jp-play-bar { - background: url("../image/jplayer.pink.flag.jpg") 0px -280px repeat-x; - width: 0px; - height: 100%; - overflow: hidden; } - -/* @end */ -/* @group volume controls */ -.jp-state-no-volume .jp-volume-controls { - display: none; } - -.jp-audio .jp-volume-controls, -.jp-audio-stream .jp-volume-controls { - height: 30px; } - -.jp-volume-controls button { - position: absolute; - display: block; - overflow: hidden; - text-indent: -9999px; - margin: 0; - padding: 0; - width: 16px; - height: 11px; - border: none; - cursor: pointer; } - -.jp-audio .jp-volume-controls .jp-mute, -.jp-audio-stream .jp-volume-controls .jp-mute { - top: -6px; - left: 0; } - -.jp-audio .jp-volume-controls .jp-volume-max, -.jp-audio-stream .jp-volume-controls .jp-volume-max { - top: -6px; - right: 0; } - -.jp-video .jp-volume-controls .jp-mute, -.jp-video .jp-volume-controls .jp-unmute { - left: 0; - top: 14px; } - -.jp-video .jp-volume-controls .jp-volume-max { - left: 84px; - top: 14px; } - -.jp-volume-controls .jp-mute { - background: url("../image/jplayer.pink.flag.jpg") 0px -330px no-repeat; } - -.jp-volume-controls .jp-mute:focus { - background: url("../image/jplayer.pink.flag.jpg") -25px -330px no-repeat; } - -.jp-state-muted .jp-volume-controls .jp-mute { - background: url("../image/jplayer.pink.flag.jpg") -60px -330px no-repeat; } - -.jp-state-muted .jp-volume-controls .jp-mute:focus { - background: url("../image/jplayer.pink.flag.jpg") -85px -330px no-repeat; } - -.jp-volume-controls .jp-volume-max { - background: url("../image/jplayer.pink.flag.jpg") 0px -350px no-repeat; } - -.jp-volume-controls .jp-volume-max:focus { - background: url("../image/jplayer.pink.flag.jpg") -25px -350px no-repeat; } - -.jp-volume-bar { - background: url("../image/jplayer.pink.flag.jpg") 0px -300px repeat-x; - position: absolute; - width: 197px; - height: 4px; - padding: 2px 2px 1px 2px; - overflow: hidden; - cursor: pointer; } - -.jp-audio .jp-interface .jp-volume-bar, -.jp-audio-stream .jp-interface .jp-volume-bar { - top: 10px; - left: 0; } - -.jp-audio-stream .jp-interface .jp-volume-bar { - width: 97px; - border-right: 1px solid #180920; - padding-right: 1px; } - -.jp-video .jp-volume-bar { - top: 0; - left: 0; - width: 95px; - border-right: 1px solid #180920; - padding-right: 1px; - margin-top: 30px; } - -.jp-volume-bar-value { - background: url("../image/jplayer.pink.flag.jpg") 0px -320px repeat-x; - height: 4px; } - -/* @end */ -/* @group current time and duration */ -.jp-current-time, .jp-duration { - width: 70px; - font-size: .5em; - color: #8c7a99; } - -.jp-current-time { - float: left; - cursor: default; } - -.jp-duration { - float: right; - text-align: right; - cursor: pointer; } - -.jp-video .jp-current-time { - padding-left: 20px; } - -.jp-video .jp-duration { - padding-right: 20px; } - -/* @end */ -/* @group playlist */ -.jp-details { - font-size: .7em; - margin: 0; - padding: 0; } - -.jp-details .jp-title { - padding: 0; - margin: 0; - overflow: hidden; - text-align: center; - cursor: default; } - -.jp-video .jp-details { - margin: 0 90px 10px; } - -.jp-playlist ul { - list-style-type: none; - font-size: .7em; - margin: 0; - padding: 0; } - -.jp-video .jp-playlist ul { - margin: 0 20px; } - -.jp-playlist li { - position: relative; - padding: 2px 0; - border-top: 1px solid #554461; - border-bottom: 1px solid #180a1f; - overflow: hidden; } - -/* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */ -div.jp-type-playlist div.jp-playlist li:first-child { - border-top: none; - padding-top: 3px; } - -div.jp-type-playlist div.jp-playlist li:last-child { - border-bottom: none; - padding-bottom: 3px; } - -div.jp-type-playlist div.jp-playlist a { - color: #fff; - text-decoration: none; } - -div.jp-type-playlist div.jp-playlist a:hover { - color: #e892e9; } - -div.jp-type-playlist div.jp-playlist li.jp-playlist-current { - background-color: #26102e; - margin: 0 -20px; - padding: 2px 20px; - border-top: 1px solid #26102e; - border-bottom: 1px solid #26102e; } - -div.jp-type-playlist div.jp-playlist li.jp-playlist-current a { - color: #e892e9; } - -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove { - float: right; - display: inline; - text-align: right; - margin-left: 10px; - font-weight: bold; - color: #8C7A99; } - -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover { - color: #E892E9; } - -div.jp-type-playlist div.jp-playlist span.jp-free-media { - float: right; - display: inline; - text-align: right; - color: #8C7A99; } - -div.jp-type-playlist div.jp-playlist span.jp-free-media a { - color: #8C7A99; } - -div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover { - color: #E892E9; } - -span.jp-artist { - font-size: .8em; - color: #8C7A99; } - -/* @end */ -.jp-video .jp-video-play { - width: 100%; - overflow: hidden; - /* Important for nested negative margins to work in modern browsers */ } - -.jp-video-270p .jp-video-play { - margin-top: -270px; - height: 270px; } - -.jp-video-360p .jp-video-play { - margin-top: -360px; - height: 360px; } - -.jp-video-full .jp-video-play { - height: 100%; } - -.jp-video-play-icon { - position: relative; - display: block; - width: 112px; - height: 100px; - margin-left: -56px; - margin-top: -50px; - left: 50%; - top: 50%; - border: none; - cursor: pointer; - background: url("../image/jplayer.pink.flag.video.play.png") 0 0 no-repeat; - text-indent: -9999px; } - -.jp-video-play-icon:focus { - background: url("../image/jplayer.pink.flag.video.play.png") 0 -100px no-repeat; } - -.jp-jplayer audio, -.jp-jplayer { - width: 0px; - height: 0px; } - -.jp-jplayer { - background-color: #000000; } - -/* @group NO SOLUTION error feedback */ -.jp-no-solution { - padding: 5px; - font-size: .8em; - background-color: #3a2a45; - border-top: 2px solid #554461; - border-left: 2px solid #554461; - border-right: 2px solid #180a1f; - border-bottom: 2px solid #180a1f; - color: #FFF; - display: none; } - -.jp-no-solution a { - color: #FFF; } - -.jp-no-solution span { - font-size: 1em; - display: block; - text-align: center; - font-weight: bold; } - -/* @end */ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/css/jplayer.pink.flag.min.css b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/css/jplayer.pink.flag.min.css deleted file mode 100644 index 7e0f6de..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/css/jplayer.pink.flag.min.css +++ /dev/null @@ -1 +0,0 @@ -/*! Pink Flag Skin for jPlayer 2.9.2 ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */.jp-audio :focus,.jp-audio-stream :focus,.jp-video :focus{outline:0}.jp-audio button::-moz-focus-inner,.jp-audio-stream button::-moz-focus-inner,.jp-video button::-moz-focus-inner{border:0}.jp-audio,.jp-audio-stream,.jp-video{font-size:16px;font-family:Verdana,Arial,sans-serif;line-height:1.6;color:#fff;border-top:1px solid #554461;border-left:1px solid #554461;border-right:1px solid #180a1f;border-bottom:1px solid #180a1f;background-color:#3a2a45}.jp-audio{width:201px;padding:20px}.jp-audio-stream{width:101px;padding:20px 20px 10px}.jp-video-270p{width:480px}.jp-video-360p{width:640px}.jp-video-full{width:480px;height:270px;position:static!important;position:relative}.jp-video-full div div{z-index:1000}.jp-video-full .jp-jplayer{top:0;left:0;position:fixed!important;position:relative;overflow:hidden}.jp-video-full .jp-gui{position:fixed!important;position:static;top:0;left:0;width:100%;height:100%;z-index:1001}.jp-video-full .jp-interface{position:absolute!important;position:relative;bottom:0;left:0}.jp-interface{position:relative;width:100%;background-color:#3a2a45}.jp-video .jp-controls-holder{clear:both;width:440px;margin:0 auto 10px;position:relative;overflow:hidden}.jp-audio .jp-controls-holder{height:80px}.jp-audio-stream .jp-controls-holder{height:50px}.jp-controls{background:url(../image/jplayer.pink.flag.jpg) no-repeat;padding:1px 0 2px 1px;overflow:hidden;width:201px;height:34px}.jp-audio .jp-controls,.jp-audio-stream .jp-controls{margin:0 auto}.jp-audio-stream .jp-controls{width:100px}.jp-video .jp-controls{margin:0 0 0 115px;float:left;display:inline}.jp-controls button{display:block;float:left;overflow:hidden;text-indent:-9999px;height:34px;margin:0 1px 2px 0;padding:0;border:none;cursor:pointer}.jp-type-single .jp-controls button{width:99px}.jp-type-single .jp-play{background:url(../image/jplayer.pink.flag.jpg) 0 -40px no-repeat}.jp-type-single .jp-play:focus{background:url(../image/jplayer.pink.flag.jpg) -100px -40px no-repeat}.jp-state-playing .jp-type-single .jp-play{background:url(../image/jplayer.pink.flag.jpg) 0 -120px no-repeat}.jp-state-playing .jp-type-single .jp-play:focus{background:url(../image/jplayer.pink.flag.jpg) -100px -120px no-repeat}.jp-audio-stream .jp-pause,.jp-audio-stream .jp-play{border-right:1px solid #180920}.jp-type-single .jp-stop{background:url(../image/jplayer.pink.flag.jpg) 0 -80px no-repeat}.jp-type-single .jp-stop:focus{background:url(../image/jplayer.pink.flag.jpg) -100px -80px no-repeat}.jp-type-playlist .jp-controls button{width:49px}.jp-type-playlist .jp-play{background:url(../image/jplayer.pink.flag.jpg) -24px -40px no-repeat}.jp-type-playlist .jp-play:focus{background:url(../image/jplayer.pink.flag.jpg) -124px -40px no-repeat}.jp-state-playing div.jp-type-playlist .jp-play{background:url(../image/jplayer.pink.flag.jpg) -24px -120px no-repeat}.jp-state-playing div.jp-type-playlist .jp-play:focus{background:url(../image/jplayer.pink.flag.jpg) -124px -120px no-repeat}.jp-type-playlist .jp-stop{background:url(../image/jplayer.pink.flag.jpg) -24px -80px no-repeat}.jp-type-playlist .jp-stop:focus{background:url(../image/jplayer.pink.flag.jpg) -124px -80px no-repeat}.jp-type-playlist .jp-previous{background:url(../image/jplayer.pink.flag.jpg) -24px -200px no-repeat}.jp-type-playlist .jp-previous:focus{background:url(../image/jplayer.pink.flag.jpg) -124px -200px no-repeat}.jp-type-playlist .jp-next{background:url(../image/jplayer.pink.flag.jpg) -24px -160px no-repeat}.jp-type-playlist .jp-next:focus{background:url(../image/jplayer.pink.flag.jpg) -124px -160px no-repeat}.jp-toggles{padding:0;margin:0 auto;overflow:hidden}.jp-audio .jp-toggles{width:55px}.jp-audio .jp-type-single .jp-toggles{width:25px}.jp-video .jp-toggles{float:left;width:105px;margin:10px 0 0 15px}.jp-toggles button{display:block;float:left;width:25px;height:18px;text-indent:-9999px;line-height:100%;border:none;cursor:pointer}.jp-full-screen{background:url(../image/jplayer.pink.flag.jpg) 0 -420px no-repeat;margin-left:15px}.jp-full-screen:focus{background:url(../image/jplayer.pink.flag.jpg) -30px -420px no-repeat}.jp-state-full-screen .jp-full-screen{background:url(../image/jplayer.pink.flag.jpg) -60px -420px no-repeat}.jp-state-full-screen .jp-full-screen:focus{background:url(../image/jplayer.pink.flag.jpg) -90px -420px no-repeat}.jp-repeat{background:url(../image/jplayer.pink.flag.jpg) 0 -440px no-repeat;margin-left:0}.jp-repeat:focus{background:url(../image/jplayer.pink.flag.jpg) -30px -440px no-repeat}.jp-state-looped .jp-repeat{background:url(../image/jplayer.pink.flag.jpg) -60px -440px no-repeat}.jp-state-looped .jp-repeat:focus{background:url(../image/jplayer.pink.flag.jpg) -90px -440px no-repeat}.jp-shuffle{background:url(../image/jplayer.pink.flag.jpg) 0 -460px no-repeat;margin-left:15px}.jp-shuffle:focus{background:url(../image/jplayer.pink.flag.jpg) -30px -460px no-repeat}.jp-state-shuffled .jp-shuffle{background:url(../image/jplayer.pink.flag.jpg) -60px -460px no-repeat}.jp-state-shuffled .jp-shuffle:focus{background:url(../image/jplayer.pink.flag.jpg) -90px -460px no-repeat}.jp-audio .jp-shuffle{margin-left:5px}div.jp-seeking-bg{background:url(../image/jplayer.pink.flag.seeking.gif)}.jp-progress{background:url(../image/jplayer.pink.flag.jpg) 0 -240px no-repeat;width:197px;height:13px;padding:0 2px 2px;margin-bottom:4px;overflow:hidden}div.jp-video .jp-progress{border-top:1px solid #180a1f;border-bottom:1px solid #554560;width:100%;background-image:none;padding:0}.jp-seek-bar{background:url(../image/jplayer.pink.flag.jpg) 0 -260px repeat-x;width:0;height:100%;overflow:hidden;cursor:pointer}.jp-play-bar{background:url(../image/jplayer.pink.flag.jpg) 0 -280px repeat-x;width:0;height:100%;overflow:hidden}.jp-state-no-volume .jp-volume-controls{display:none}.jp-audio .jp-volume-controls,.jp-audio-stream .jp-volume-controls{height:30px}.jp-volume-controls button{position:absolute;display:block;overflow:hidden;text-indent:-9999px;margin:0;padding:0;width:16px;height:11px;border:none;cursor:pointer}.jp-audio .jp-volume-controls .jp-mute,.jp-audio-stream .jp-volume-controls .jp-mute{top:-6px;left:0}.jp-audio .jp-volume-controls .jp-volume-max,.jp-audio-stream .jp-volume-controls .jp-volume-max{top:-6px;right:0}.jp-video .jp-volume-controls .jp-mute,.jp-video .jp-volume-controls .jp-unmute{left:0;top:14px}.jp-video .jp-volume-controls .jp-volume-max{left:84px;top:14px}.jp-volume-controls .jp-mute{background:url(../image/jplayer.pink.flag.jpg) 0 -330px no-repeat}.jp-volume-controls .jp-mute:focus{background:url(../image/jplayer.pink.flag.jpg) -25px -330px no-repeat}.jp-state-muted .jp-volume-controls .jp-mute{background:url(../image/jplayer.pink.flag.jpg) -60px -330px no-repeat}.jp-state-muted .jp-volume-controls .jp-mute:focus{background:url(../image/jplayer.pink.flag.jpg) -85px -330px no-repeat}.jp-volume-controls .jp-volume-max{background:url(../image/jplayer.pink.flag.jpg) 0 -350px no-repeat}.jp-volume-controls .jp-volume-max:focus{background:url(../image/jplayer.pink.flag.jpg) -25px -350px no-repeat}.jp-volume-bar{background:url(../image/jplayer.pink.flag.jpg) 0 -300px repeat-x;position:absolute;width:197px;height:4px;padding:2px 2px 1px;overflow:hidden;cursor:pointer}.jp-audio .jp-interface .jp-volume-bar,.jp-audio-stream .jp-interface .jp-volume-bar{top:10px;left:0}.jp-audio-stream .jp-interface .jp-volume-bar{width:97px;border-right:1px solid #180920;padding-right:1px}.jp-video .jp-volume-bar{top:0;left:0;width:95px;border-right:1px solid #180920;padding-right:1px;margin-top:30px}.jp-volume-bar-value{background:url(../image/jplayer.pink.flag.jpg) 0 -320px repeat-x;height:4px}.jp-current-time,.jp-duration{width:70px;font-size:.5em;color:#8c7a99}.jp-current-time{float:left;cursor:default}.jp-duration{float:right;text-align:right;cursor:pointer}.jp-video .jp-current-time{padding-left:20px}.jp-video .jp-duration{padding-right:20px}.jp-details{font-size:.7em;margin:0;padding:0}.jp-details .jp-title{padding:0;margin:0;overflow:hidden;text-align:center;cursor:default}.jp-video .jp-details{margin:0 90px 10px}.jp-playlist ul{list-style-type:none;font-size:.7em;margin:0;padding:0}.jp-video .jp-playlist ul{margin:0 20px}.jp-playlist li{position:relative;padding:2px 0;border-top:1px solid #554461;border-bottom:1px solid #180a1f;overflow:hidden}div.jp-type-playlist div.jp-playlist li:first-child{border-top:none;padding-top:3px}div.jp-type-playlist div.jp-playlist li:last-child{border-bottom:none;padding-bottom:3px}div.jp-type-playlist div.jp-playlist a{color:#fff;text-decoration:none}div.jp-type-playlist div.jp-playlist a:hover{color:#e892e9}div.jp-type-playlist div.jp-playlist li.jp-playlist-current{background-color:#26102e;margin:0 -20px;padding:2px 20px;border-top:1px solid #26102e;border-bottom:1px solid #26102e}div.jp-type-playlist div.jp-playlist li.jp-playlist-current a{color:#e892e9}div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove{float:right;display:inline;text-align:right;margin-left:10px;font-weight:700;color:#8C7A99}div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover{color:#E892E9}div.jp-type-playlist div.jp-playlist span.jp-free-media{float:right;display:inline;text-align:right;color:#8C7A99}div.jp-type-playlist div.jp-playlist span.jp-free-media a{color:#8C7A99}div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{color:#E892E9}span.jp-artist{font-size:.8em;color:#8C7A99}.jp-video .jp-video-play{width:100%;overflow:hidden}.jp-video-270p .jp-video-play{margin-top:-270px;height:270px}.jp-video-360p .jp-video-play{margin-top:-360px;height:360px}.jp-video-full .jp-video-play{height:100%}.jp-video-play-icon{position:relative;display:block;width:112px;height:100px;margin-left:-56px;margin-top:-50px;left:50%;top:50%;border:none;cursor:pointer;background:url(../image/jplayer.pink.flag.video.play.png) no-repeat;text-indent:-9999px}.jp-video-play-icon:focus{background:url(../image/jplayer.pink.flag.video.play.png) 0 -100px no-repeat}.jp-jplayer,.jp-jplayer audio{width:0;height:0}.jp-jplayer{background-color:#000}.jp-no-solution{padding:5px;font-size:.8em;background-color:#3a2a45;border-top:2px solid #554461;border-left:2px solid #554461;border-right:2px solid #180a1f;border-bottom:2px solid #180a1f;color:#FFF;display:none}.jp-no-solution a{color:#FFF}.jp-no-solution span{font-size:1em;display:block;text-align:center;font-weight:700} \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.jpg b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.jpg deleted file mode 100644 index 0c084e2..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.seeking.gif b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.seeking.gif deleted file mode 100644 index 754ceb1..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.seeking.gif and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.video.play.png b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.video.play.png deleted file mode 100644 index 8e97df0..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/image/jplayer.pink.flag.video.play.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.playlist.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.playlist.html deleted file mode 100644 index f64d5f9..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.playlist.html +++ /dev/null @@ -1,42 +0,0 @@ - - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.single.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.single.html deleted file mode 100644 index 83662d7..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.single.html +++ /dev/null @@ -1,37 +0,0 @@ - - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.stream.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.stream.html deleted file mode 100644 index f16c74f..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.audio.stream.html +++ /dev/null @@ -1,24 +0,0 @@ - - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.video.playlist.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.video.playlist.html deleted file mode 100644 index 1cd16ca..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.video.playlist.html +++ /dev/null @@ -1,52 +0,0 @@ - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.video.single.html b/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.video.single.html deleted file mode 100644 index 519c147..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin/pink.flag/mustache/jplayer.pink.flag.video.single.html +++ /dev/null @@ -1,43 +0,0 @@ - diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.css b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.css deleted file mode 100644 index 1a5da65..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.css +++ /dev/null @@ -1,640 +0,0 @@ -/* - * Skin for jPlayer Plugin (jQuery JavaScript Library) - * http://www.jplayer.org - * - * Skin Name: Blue Monday - * - * Copyright (c) 2010-2012 Happyworm Ltd - * Dual licensed under the MIT and GPL licenses. - * - http://www.opensource.org/licenses/mit-license.php - * - http://www.gnu.org/copyleft/gpl.html - * - * Author: Silvia Benvenuti - * Skin Version: 4.3 (jPlayer 2.2.0) - * Date: 19th November 2012 - */ - -div.jp-audio, -div.jp-audio-stream, -div.jp-video { - - /* Edit the font-size to counteract inherited font sizing. - * Eg. 1.25em = 1 / 0.8em - */ - - font-size:1.25em; /* 1.25em for testing in site pages */ /* No parent CSS that can effect the size in the demos ZIP */ - - font-family:Verdana, Arial, sans-serif; - line-height:1.6; - color: #666; - border:1px solid #009be3; - background-color:#eee; -} -div.jp-audio { - width:420px; -} -div.jp-audio-stream { - width:182px; -} -div.jp-video-270p { - width:480px; -} -div.jp-video-360p { - width:640px; -} -div.jp-video-full { - /* Rules for IE6 (full-screen) */ - width:480px; - height:270px; - /* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */ - position:static !important; position:relative; -} - -/* The z-index rule is defined in this manner to enable Popcorn plugins that add overlays to video area. EG. Subtitles. */ -div.jp-video-full div div { - z-index:1000; -} - -div.jp-video-full div.jp-jplayer { - top: 0; - left: 0; - position: fixed !important; position: relative; /* Rules for IE6 (full-screen) */ - overflow: hidden; -} - -div.jp-video-full div.jp-gui { - position: fixed !important; position: static; /* Rules for IE6 (full-screen) */ - top: 0; - left: 0; - width:100%; - height:100%; - z-index:1001; /* 1 layer above the others. */ -} - -div.jp-video-full div.jp-interface { - position: absolute !important; position: relative; /* Rules for IE6 (full-screen) */ - bottom: 0; - left: 0; -} - -div.jp-interface { - position: relative; - background-color:#eee; - width:100%; -} - -div.jp-audio div.jp-type-single div.jp-interface { - height:80px; -} -div.jp-audio div.jp-type-playlist div.jp-interface { - height:80px; -} - -div.jp-audio-stream div.jp-type-single div.jp-interface { - height:80px; -} - -div.jp-video div.jp-interface { - border-top:1px solid #009be3; -} - -/* @group CONTROLS */ - -div.jp-controls-holder { - clear: both; - width:440px; - margin:0 auto; - position: relative; - overflow:hidden; - top:-8px; /* This negative value depends on the size of the text in jp-currentTime and jp-duration */ -} - -div.jp-interface ul.jp-controls { - list-style-type:none; - margin:0; - padding: 0; - overflow:hidden; -} - -div.jp-audio ul.jp-controls { - width: 380px; - padding:20px 20px 0 20px; -} - -div.jp-audio-stream ul.jp-controls { - width: 142px; - padding:20px 20px 0 20px; -} - -div.jp-video div.jp-type-single ul.jp-controls { - width: 78px; - margin-left: 200px; -} - -div.jp-video div.jp-type-playlist ul.jp-controls { - width: 134px; - margin-left: 172px; -} -div.jp-video ul.jp-controls, -div.jp-interface ul.jp-controls li { - display:inline; - float: left; -} - -div.jp-interface ul.jp-controls a { - display:block; - overflow:hidden; - text-indent:-9999px; -} -a.jp-play, -a.jp-pause { - width:40px; - height:40px; -} - -a.jp-play { - background: url("jplayer.blue.monday.jpg") 0 0 no-repeat; -} -a.jp-play:hover { - background: url("jplayer.blue.monday.jpg") -41px 0 no-repeat; -} -a.jp-pause { - background: url("jplayer.blue.monday.jpg") 0 -42px no-repeat; - display: none; -} -a.jp-pause:hover { - background: url("jplayer.blue.monday.jpg") -41px -42px no-repeat; -} - -a.jp-stop, a.jp-previous, a.jp-next { - width:28px; - height:28px; - margin-top:6px; -} - -a.jp-stop { - background: url("jplayer.blue.monday.jpg") 0 -83px no-repeat; - margin-left:10px; -} - -a.jp-stop:hover { - background: url("jplayer.blue.monday.jpg") -29px -83px no-repeat; -} - -a.jp-previous { - background: url("jplayer.blue.monday.jpg") 0 -112px no-repeat; -} -a.jp-previous:hover { - background: url("jplayer.blue.monday.jpg") -29px -112px no-repeat; -} - -a.jp-next { - background: url("jplayer.blue.monday.jpg") 0 -141px no-repeat; -} -a.jp-next:hover { - background: url("jplayer.blue.monday.jpg") -29px -141px no-repeat; -} - -/* @end */ - -/* @group progress bar */ - -div.jp-progress { - overflow:hidden; - background-color: #ddd; -} -div.jp-audio div.jp-progress { - position: absolute; - top:32px; - height:15px; -} -div.jp-audio div.jp-type-single div.jp-progress { - left:110px; - width:186px; -} -div.jp-audio div.jp-type-playlist div.jp-progress { - left:166px; - width:130px; -} -div.jp-video div.jp-progress { - top:0px; - left:0px; - width:100%; - height:10px; -} -div.jp-seek-bar { - background: url("jplayer.blue.monday.jpg") 0 -202px repeat-x; - width:0px; - height:100%; - cursor: pointer; -} -div.jp-play-bar { - background: url("jplayer.blue.monday.jpg") 0 -218px repeat-x ; - width:0px; - height:100%; -} - -/* The seeking class is added/removed inside jPlayer */ -div.jp-seeking-bg { - background: url("jplayer.blue.monday.seeking.gif"); -} - -/* @end */ - -/* @group volume controls */ - - -a.jp-mute, -a.jp-unmute, -a.jp-volume-max { - width:18px; - height:15px; - margin-top:12px; -} - -div.jp-audio div.jp-type-single a.jp-mute, -div.jp-audio div.jp-type-single a.jp-unmute { - margin-left: 210px; -} -div.jp-audio div.jp-type-playlist a.jp-mute, -div.jp-audio div.jp-type-playlist a.jp-unmute { - margin-left: 154px; -} - -div.jp-audio-stream div.jp-type-single a.jp-mute, -div.jp-audio-stream div.jp-type-single a.jp-unmute { - margin-left:10px; -} - -div.jp-audio a.jp-volume-max, -div.jp-audio-stream a.jp-volume-max { - margin-left: 56px; -} - -div.jp-video a.jp-mute, -div.jp-video a.jp-unmute, -div.jp-video a.jp-volume-max { - position: absolute; - top:12px; - margin-top:0; -} - -div.jp-video a.jp-mute, -div.jp-video a.jp-unmute { - left: 50px; -} - -div.jp-video a.jp-volume-max { - left: 134px; -} - -a.jp-mute { - background: url("jplayer.blue.monday.jpg") 0 -170px no-repeat; -} -a.jp-mute:hover { - background: url("jplayer.blue.monday.jpg") -19px -170px no-repeat; -} -a.jp-unmute { - background: url("jplayer.blue.monday.jpg") -60px -170px no-repeat; - display: none; -} -a.jp-unmute:hover { - background: url("jplayer.blue.monday.jpg") -79px -170px no-repeat; -} -a.jp-volume-max { - background: url("jplayer.blue.monday.jpg") 0 -186px no-repeat; -} -a.jp-volume-max:hover { - background: url("jplayer.blue.monday.jpg") -19px -186px no-repeat; -} - -div.jp-volume-bar { - position: absolute; - overflow:hidden; - background: url("jplayer.blue.monday.jpg") 0 -250px repeat-x; - width:46px; - height:5px; - cursor: pointer; -} -div.jp-audio div.jp-volume-bar { - top:37px; - left:330px; -} -div.jp-audio-stream div.jp-volume-bar { - top:37px; - left:92px; -} -div.jp-video div.jp-volume-bar { - top:17px; - left:72px; -} -div.jp-volume-bar-value { - background: url("jplayer.blue.monday.jpg") 0 -256px repeat-x; - width:0px; - height:5px; -} - -/* @end */ - -/* @group current time and duration */ - -div.jp-audio div.jp-time-holder { - position:absolute; - top:50px; -} -div.jp-audio div.jp-type-single div.jp-time-holder { - left:110px; - width:186px; -} -div.jp-audio div.jp-type-playlist div.jp-time-holder { - left:166px; - width:130px; -} - -div.jp-current-time, -div.jp-duration { - width:60px; - font-size:.64em; - font-style:oblique; -} -div.jp-current-time { - float: left; - display:inline; -} -div.jp-duration { - float: right; - display:inline; - text-align: right; -} - -div.jp-video div.jp-current-time { - margin-left:20px; -} -div.jp-video div.jp-duration { - margin-right:20px; -} - -/* @end */ - -/* @group playlist */ - -div.jp-title { - font-weight:bold; - text-align:center; -} - -div.jp-title, -div.jp-playlist { - width:100%; - background-color:#ccc; - border-top:1px solid #009be3; -} -div.jp-type-single div.jp-title, -div.jp-type-playlist div.jp-title, -div.jp-type-single div.jp-playlist { - border-top:none; -} -div.jp-title ul, -div.jp-playlist ul { - list-style-type:none; - margin:0; - padding:0 20px; - font-size:.72em; -} - -div.jp-title li { - padding:5px 0; - font-weight:bold; -} -div.jp-playlist li { - padding:5px 0 4px 20px; - border-bottom:1px solid #eee; -} - -div.jp-playlist li div { - display:inline; -} - -/* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */ - -div.jp-type-playlist div.jp-playlist li:last-child { - padding:5px 0 5px 20px; - border-bottom:none; -} -div.jp-type-playlist div.jp-playlist li.jp-playlist-current { - list-style-type:square; - list-style-position:inside; - padding-left:7px; -} -div.jp-type-playlist div.jp-playlist a { - color: #333; - text-decoration: none; -} -div.jp-type-playlist div.jp-playlist a:hover { - color:#0d88c1; -} -div.jp-type-playlist div.jp-playlist a.jp-playlist-current { - color:#0d88c1; -} - -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove { - float:right; - display:inline; - text-align:right; - margin-right:10px; - font-weight:bold; - color:#666; -} -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover { - color:#0d88c1; -} -div.jp-type-playlist div.jp-playlist span.jp-free-media { - float:right; - display:inline; - text-align:right; - margin-right:10px; -} -div.jp-type-playlist div.jp-playlist span.jp-free-media a{ - color:#666; -} -div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{ - color:#0d88c1; -} -span.jp-artist { - font-size:.8em; - color:#666; -} - -/* @end */ - -div.jp-video-play { - width:100%; - overflow:hidden; /* Important for nested negative margins to work in modern browsers */ - cursor:pointer; - background-color:rgba(0,0,0,0); /* Makes IE9 work with the active area over the whole video area. IE6/7/8 only have the button as active area. */ -} -div.jp-video-270p div.jp-video-play { - margin-top:-270px; - height:270px; -} -div.jp-video-360p div.jp-video-play { - margin-top:-360px; - height:360px; -} -div.jp-video-full div.jp-video-play { - height:100%; -} -a.jp-video-play-icon { - position:relative; - display:block; - width: 112px; - height: 100px; - - margin-left:-56px; - margin-top:-50px; - left:50%; - top:50%; - - background: url("jplayer.blue.monday.video.play.png") 0 0 no-repeat; - text-indent:-9999px; -} -div.jp-video-play:hover a.jp-video-play-icon { - background: url("jplayer.blue.monday.video.play.png") 0 -100px no-repeat; -} - - - - - -div.jp-jplayer audio, -div.jp-jplayer { - width:0px; - height:0px; -} - -div.jp-jplayer { - background-color: #000000; -} - - - - - -/* @group TOGGLES */ - -/* The audio toggles are nested inside jp-time-holder */ - -ul.jp-toggles { - list-style-type:none; - padding:0; - margin:0 auto; - overflow:hidden; -} - -div.jp-audio .jp-type-single ul.jp-toggles { - width:25px; -} -div.jp-audio .jp-type-playlist ul.jp-toggles { - width:55px; - margin: 0; - position: absolute; - left: 325px; - top: 50px; -} - -div.jp-video ul.jp-toggles { - margin-top:10px; - width:100px; -} - -ul.jp-toggles li { - display:block; - float:right; -} - -ul.jp-toggles li a { - display:block; - width:25px; - height:18px; - text-indent:-9999px; - line-height:100%; /* need this for IE6 */ -} - -a.jp-full-screen { - background: url("jplayer.blue.monday.jpg") 0 -310px no-repeat; - margin-left: 20px; -} - -a.jp-full-screen:hover { - background: url("jplayer.blue.monday.jpg") -30px -310px no-repeat; -} - -a.jp-restore-screen { - background: url("jplayer.blue.monday.jpg") -60px -310px no-repeat; - margin-left: 20px; -} - -a.jp-restore-screen:hover { - background: url("jplayer.blue.monday.jpg") -90px -310px no-repeat; -} - -a.jp-repeat { - background: url("jplayer.blue.monday.jpg") 0 -290px no-repeat; -} - -a.jp-repeat:hover { - background: url("jplayer.blue.monday.jpg") -30px -290px no-repeat; -} - -a.jp-repeat-off { - background: url("jplayer.blue.monday.jpg") -60px -290px no-repeat; -} - -a.jp-repeat-off:hover { - background: url("jplayer.blue.monday.jpg") -90px -290px no-repeat; -} - -a.jp-shuffle { - background: url("jplayer.blue.monday.jpg") 0 -270px no-repeat; - margin-left: 5px; -} - -a.jp-shuffle:hover { - background: url("jplayer.blue.monday.jpg") -30px -270px no-repeat; -} - -a.jp-shuffle-off { - background: url("jplayer.blue.monday.jpg") -60px -270px no-repeat; - margin-left: 5px; -} - -a.jp-shuffle-off:hover { - background: url("jplayer.blue.monday.jpg") -90px -270px no-repeat; -} - - -/* @end */ - -/* @group NO SOLUTION error feedback */ - -.jp-no-solution { - padding:5px; - font-size:.8em; - background-color:#eee; - border:2px solid #009be3; - color:#000; - display:none; -} - -.jp-no-solution a { - color:#000; -} - -.jp-no-solution span { - font-size:1em; - display:block; - text-align:center; - font-weight:bold; -} - -/* @end */ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.jpg b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.jpg deleted file mode 100644 index adab53f..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.seeking.gif b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.seeking.gif deleted file mode 100644 index dbd2105..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.seeking.gif and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.video.play.png b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.video.play.png deleted file mode 100644 index 8e97df0..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/jplayer.blue.monday.video.play.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/skin.handlebars b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/skin.handlebars deleted file mode 100644 index b8ec557..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/blue.monday/skin.handlebars +++ /dev/null @@ -1,40 +0,0 @@ - - \ No newline at end of file diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.css b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.css deleted file mode 100644 index bafe3ff..0000000 --- a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.css +++ /dev/null @@ -1,670 +0,0 @@ -/* - * Skin for jPlayer Plugin (jQuery JavaScript Library) - * http://www.jplayer.org - * - * Skin Name: Pink Flag - * - * Copyright (c) 2012 Happyworm Ltd - * Dual licensed under the MIT and GPL licenses. - * - http://www.opensource.org/licenses/mit-license.php - * - http://www.gnu.org/copyleft/gpl.html - * - * Author: Silvia Benvenuti - * Skin Version: 1.2 (jPlayer 2.2.0) - * Date: 22nd October 2012 - */ - -div.jp-audio, -div.jp-audio-stream, -div.jp-video { - - /* Edit the font-size to counteract inherited font sizing. - * Eg. 1.25em = 1 / 0.8em - */ - - font-size:1.25em; /* 1.25em for testing in site pages */ /* No parent CSS that can effect the size in the demos ZIP */ - - font-family:Verdana, Arial, sans-serif; - line-height:1.6; - color: #fff; - border-top:1px solid #554461; - border-left:1px solid #554461; - border-right:1px solid #180a1f; - border-bottom:1px solid #180a1f; - background-color:#3a2a45; -} -div.jp-audio { - width:201px; - padding:20px; -} - -div.jp-audio-stream { - width:101px; - padding:20px 20px 10px 20px; -} - -div.jp-video-270p { - width:480px; -} -div.jp-video-360p { - width:640px; -} -div.jp-video-full { - /* Rules for IE6 (full-screen) */ - width:480px; - height:270px; - /* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */ - position:static !important; position:relative; -} - -/* The z-index rule is defined in this manner to enable Popcorn plugins that add overlays to video area. EG. Subtitles. */ -div.jp-video-full div div { - z-index:1000; -} - -div.jp-video-full div.jp-jplayer { - top: 0; - left: 0; - position: fixed !important; position: relative; /* Rules for IE6 (full-screen) */ - overflow: hidden; -} - -div.jp-video-full div.jp-gui { - position: fixed !important; position: static; /* Rules for IE6 (full-screen) */ - top: 0; - left: 0; - width:100%; - height:100%; - z-index:1001; /* 1 layer above the others. */ -} -div.jp-video-full div.jp-interface { - position: absolute !important; position: relative; /* Rules for IE6 (full-screen) */ - bottom: 0; - left: 0; -} - -div.jp-interface { - position: relative; - width:100%; - background-color:#3a2a45; /* Required for the full screen */ -} - - -div.jp-audio .jp-interface { - height: 80px; - padding-top:30px; -} - -div.jp-audio-stream .jp-interface { - height: 50px; - padding-top:30px; -} - -/* @group CONTROLS */ - -div.jp-controls-holder { - clear: both; - width:440px; - margin:0 auto 10px auto; - position: relative; - overflow:hidden; -} - -div.jp-interface ul.jp-controls { - background: url("jplayer.pink.flag.jpg") 0 0 no-repeat; - list-style-type:none; - padding: 1px 0 2px 1px; - overflow:hidden; - width: 201px; - height: 34px; -} - -div.jp-audio ul.jp-controls, -div.jp-audio-stream ul.jp-controls { - margin:0 auto; -} - -div.jp-audio-stream ul.jp-controls { - width: 100px; -} - -div.jp-video ul.jp-controls { - margin:0 0 0 115px; - float:left; - display:inline; /* need this to fix IE6 double margin */ -} - -div.jp-interface ul.jp-controls li { - display:inline; - float: left; -} -div.jp-interface ul.jp-controls a { - display:block; - overflow:hidden; - text-indent:-9999px; - height: 34px; - margin: 0 1px 2px 0; - padding: 0; -} - - -/* @group single player controls */ - -div.jp-type-single .jp-controls li a{ - width: 99px; -} - -div.jp-type-single .jp-play { - background: url("jplayer.pink.flag.jpg") 0px -40px no-repeat; -} - -div.jp-type-single .jp-play:hover { - background: url("jplayer.pink.flag.jpg") -100px -40px no-repeat; -} - -div.jp-type-single .jp-pause { - background: url("jplayer.pink.flag.jpg") 0px -120px no-repeat; -} - -div.jp-type-single .jp-pause:hover { - background: url("jplayer.pink.flag.jpg") -100px -120px no-repeat; -} - -/* The right border is normally in the ul background image. */ -div.jp-audio-stream .jp-play, -div.jp-audio-stream .jp-pause { - border-right:1px solid #180920; -} - -div.jp-type-single .jp-stop { - background: url("jplayer.pink.flag.jpg") 0px -80px no-repeat; -} - -div.jp-type-single .jp-stop:hover { - background: url("jplayer.pink.flag.jpg") -100px -80px no-repeat; -} - -/* @end */ - -/* @group playlist player controls */ - -div.jp-type-playlist .jp-controls li a{ - width: 49px; -} - -div.jp-type-playlist .jp-play { - background: url("jplayer.pink.flag.jpg") -24px -40px no-repeat; -} - -div.jp-type-playlist .jp-play:hover { - background: url("jplayer.pink.flag.jpg") -124px -40px no-repeat; -} - -div.jp-type-playlist .jp-pause { - background: url("jplayer.pink.flag.jpg") -24px -120px no-repeat; -} - -div.jp-type-playlist .jp-pause:hover { - background: url("jplayer.pink.flag.jpg") -124px -120px no-repeat; -} - -div.jp-type-playlist .jp-stop { - background: url("jplayer.pink.flag.jpg") -24px -80px no-repeat; -} - -div.jp-type-playlist .jp-stop:hover { - background: url("jplayer.pink.flag.jpg") -124px -80px no-repeat; -} - -div.jp-type-playlist .jp-previous { - background: url("jplayer.pink.flag.jpg") -24px -200px no-repeat; -} - -div.jp-type-playlist .jp-previous:hover { - background: url("jplayer.pink.flag.jpg") -124px -200px no-repeat; -} - -div.jp-type-playlist .jp-next { - background: url("jplayer.pink.flag.jpg") -24px -160px no-repeat; -} - -div.jp-type-playlist .jp-next:hover { - background: url("jplayer.pink.flag.jpg") -124px -160px no-repeat; -} - -/* @end */ - -/* @end */ - - - - -/* @group TOGGLES */ - -ul.jp-toggles { - list-style-type:none; - padding:0; - margin:0 auto; - overflow:hidden; -} - -div.jp-audio ul.jp-toggles { - width:55px; -} - -div.jp-audio .jp-type-single ul.jp-toggles { - width:25px; -} - -div.jp-video ul.jp-toggles { - width:100px; - margin-top: 10px; -} - -ul.jp-toggles li{ - display:block; - float:right; -} - -ul.jp-toggles li a{ - display:block; - width:25px; - height:18px; - text-indent:-9999px; - line-height:100%; /* need this for IE6 */ -} - -.jp-full-screen { - background: url("jplayer.pink.flag.jpg") 0 -420px no-repeat; - margin-left: 20px; -} - -.jp-full-screen:hover { - background: url("jplayer.pink.flag.jpg") -30px -420px no-repeat; -} - -.jp-restore-screen { - background: url("jplayer.pink.flag.jpg") -60px -420px no-repeat; - margin-left: 20px; -} - -.jp-restore-screen:hover { - background: url("jplayer.pink.flag.jpg") -90px -420px no-repeat; -} - -.jp-repeat { - background: url("jplayer.pink.flag.jpg") 0 -440px no-repeat; -} - -.jp-repeat:hover { - background: url("jplayer.pink.flag.jpg") -30px -440px no-repeat; -} - -.jp-repeat-off { - background: url("jplayer.pink.flag.jpg") -60px -440px no-repeat; -} - -.jp-repeat-off:hover { - background: url("jplayer.pink.flag.jpg") -90px -440px no-repeat; -} - -.jp-shuffle { - background: url("jplayer.pink.flag.jpg") 0 -460px no-repeat; - margin-left: 5px; -} - -.jp-shuffle:hover { - background: url("jplayer.pink.flag.jpg") -30px -460px no-repeat; -} - -.jp-shuffle-off { - background: url("jplayer.pink.flag.jpg") -60px -460px no-repeat; - margin-left: 5px; -} - -.jp-shuffle-off:hover { - background: url("jplayer.pink.flag.jpg") -90px -460px no-repeat; -} - - -/* @end */ - -/* @group progress bar */ - -/* The seeking class is added/removed inside jPlayer */ -div.jp-seeking-bg { - background: url("jplayer.pink.flag.seeking.gif"); -} - -.jp-progress { - background: url("jplayer.pink.flag.jpg") 0px -240px no-repeat; - width: 197px; - height: 13px; - padding: 0 2px 2px 2px; - margin-bottom: 4px; - overflow:hidden; -} - -div.jp-video .jp-progress { - border-top:1px solid #180a1f; - border-bottom: 1px solid #554560; - width:100%; - background-image: none; - padding: 0; -} - -.jp-seek-bar { - background: url("jplayer.pink.flag.jpg") 0px -260px repeat-x; - width:0px; - height: 100%; - overflow:hidden; - cursor:pointer; -} - -.jp-play-bar { - background: url("jplayer.pink.flag.jpg") 0px -280px repeat-x; - width:0px; - height: 100%; - overflow:hidden; -} - - -/* @end */ - -/* @group volume controls */ - -div.jp-interface ul.jp-controls a.jp-mute, -div.jp-interface ul.jp-controls a.jp-unmute, -div.jp-interface ul.jp-controls a.jp-volume-max { - background: url("jplayer.pink.flag.jpg") 0px -330px no-repeat; - position: absolute; - width: 16px; - height: 11px; -} - -div.jp-audio ul.jp-controls a.jp-mute, -div.jp-audio ul.jp-controls a.jp-unmute, -div.jp-audio-stream ul.jp-controls a.jp-mute, -div.jp-audio-stream ul.jp-controls a.jp-unmute { - top:-6px; - left: 0; -} - -div.jp-audio ul.jp-controls a.jp-volume-max, -div.jp-audio-stream ul.jp-controls a.jp-volume-max { - top:-6px; - right: 0; -} - - -div.jp-video ul.jp-controls a.jp-mute, -div.jp-video ul.jp-controls a.jp-unmute { - left: 0; - top:14px; -} - -div.jp-video ul.jp-controls a.jp-volume-max { - left: 84px; - top:14px; -} - -div.jp-interface ul.jp-controls a.jp-mute:hover { - background: url("jplayer.pink.flag.jpg") -25px -330px no-repeat; -} - -div.jp-interface ul.jp-controls a.jp-unmute { - background: url("jplayer.pink.flag.jpg") -60px -330px no-repeat; -} - -div.jp-interface ul.jp-controls a.jp-unmute:hover { - background: url("jplayer.pink.flag.jpg") -85px -330px no-repeat; -} - -div.jp-interface ul.jp-controls a.jp-volume-max { - background: url("jplayer.pink.flag.jpg") 0px -350px no-repeat; -} - -div.jp-interface ul.jp-controls a.jp-volume-max:hover { - background: url("jplayer.pink.flag.jpg") -25px -350px no-repeat; -} - -.jp-volume-bar { - background: url("jplayer.pink.flag.jpg") 0px -300px repeat-x; - position: absolute; - width: 197px; - height: 4px; - padding: 2px 2px 1px 2px; - overflow: hidden; -} - -.jp-volume-bar:hover { - cursor: pointer; -} - - -div.jp-audio .jp-interface .jp-volume-bar, -div.jp-audio-stream .jp-interface .jp-volume-bar { - top:10px; - left: 0; -} - -div.jp-audio-stream .jp-interface .jp-volume-bar { - width: 97px; - border-right:1px solid #180920; - padding-right:1px; -} - -div.jp-video .jp-volume-bar { - top: 0; - left: 0; - width:95px; - border-right:1px solid #180920; - padding-right:1px; - margin-top: 30px; -} - -.jp-volume-bar-value { - background: url("jplayer.pink.flag.jpg") 0px -320px repeat-x; - height: 4px; -} - -/* @end */ - -/* @group current time and duration */ - -.jp-current-time, .jp-duration { - width:70px; - font-size:.5em; - color: #8c7a99; -} - -.jp-current-time { - float: left; -} - -.jp-duration { - float: right; - text-align:right; -} - -.jp-video .jp-current-time { - padding-left:20px; -} - -.jp-video .jp-duration { - padding-right:20px; -} - -/* @end */ - -/* @group playlist */ - -.jp-title ul, -.jp-playlist ul { - list-style-type:none; - font-size:.7em; - margin: 0; - padding: 0; -} - -.jp-video .jp-title ul { - margin: 0 20px 10px; -} - -.jp-video .jp-playlist ul { - margin: 0 20px; -} - -.jp-title li, -.jp-playlist li { - position: relative; - padding: 2px 0; - border-top:1px solid #554461; - border-bottom:1px solid #180a1f; - overflow: hidden; -} - -.jp-title li{ - border-bottom:none; - border-top:none; - padding:0; - text-align:center; -} - -/* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */ - -div.jp-type-playlist div.jp-playlist li:first-child { - border-top:none; - padding-top:3px; -} - -div.jp-type-playlist div.jp-playlist li:last-child { - border-bottom:none; - padding-bottom:3px; -} - -div.jp-type-playlist div.jp-playlist a { - color: #fff; - text-decoration:none; -} - -div.jp-type-playlist div.jp-playlist a:hover { - color: #e892e9; -} - -div.jp-type-playlist div.jp-playlist li.jp-playlist-current { - background-color: #26102e; - margin: 0 -20px; - padding: 2px 20px; - border-top: 1px solid #26102e; - border-bottom: 1px solid #26102e; -} - -div.jp-type-playlist div.jp-playlist li.jp-playlist-current a{ - color: #e892e9; -} - -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove { - float:right; - display:inline; - text-align:right; - margin-left:10px; - font-weight:bold; - color:#8C7A99; -} -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover { - color:#E892E9; -} - -div.jp-type-playlist div.jp-playlist span.jp-free-media { - float: right; - display:inline; - text-align:right; - color:#8C7A99; -} - -div.jp-type-playlist div.jp-playlist span.jp-free-media a{ - color:#8C7A99; -} - -div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{ - color:#E892E9; -} -span.jp-artist { - font-size:.8em; - color:#8C7A99; -} - -/* @end */ - - -div.jp-video div.jp-video-play { - width:100%; - overflow:hidden; /* Important for nested negative margins to work in modern browsers */ - cursor:pointer; -} -div.jp-video-270p div.jp-video-play { - margin-top:-270px; - height:270px; -} -div.jp-video-360p div.jp-video-play { - margin-top:-360px; - height:360px; -} -div.jp-video-full div.jp-video-play { - height:100%; -} -a.jp-video-play-icon { - position:relative; - display:block; - width: 112px; - height: 100px; - - margin-left:-56px; - margin-top:-50px; - left:50%; - top:50%; - - background: url("jplayer.pink.flag.video.play.png") 0 0 no-repeat; - text-indent:-9999px; -} -div.jp-video-play:hover a.jp-video-play-icon { - background: url("jplayer.pink.flag.video.play.png") 0 -100px no-repeat; -} - - -div.jp-jplayer audio, -div.jp-jplayer { - width:0px; - height:0px; -} - -div.jp-jplayer { - background-color: #000000; -} - -/* @group NO SOLUTION error feedback */ - -.jp-no-solution { - padding:5px; - font-size:.8em; - background-color:#3a2a45; - border-top:2px solid #554461; - border-left:2px solid #554461; - border-right:2px solid #180a1f; - border-bottom:2px solid #180a1f; - color:#FFF; - display:none; -} - -.jp-no-solution a { - color:#FFF; -} - -.jp-no-solution span { - font-size:1em; - display:block; - text-align:center; - font-weight:bold; -} -/* @end */ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.jpg b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.jpg deleted file mode 100644 index 0c084e2..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.jpg and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.seeking.gif b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.seeking.gif deleted file mode 100644 index 754ceb1..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.seeking.gif and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.video.play.png b/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.video.play.png deleted file mode 100644 index 8e97df0..0000000 Binary files a/libraries/filemanager-9.12.1/js/jPlayer/skin_ol/pink.flag/jplayer.pink.flag.video.play.png and /dev/null differ diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-angular.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-angular.js deleted file mode 100644 index 1c20552..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-angular.js +++ /dev/null @@ -1,437 +0,0 @@ -/* - * jQuery File Upload AngularJS Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, angular, require */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - 'angular', - './jquery.fileupload-image', - './jquery.fileupload-audio', - './jquery.fileupload-video', - './jquery.fileupload-validate' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('angular'), - require('./jquery.fileupload-image'), - require('./jquery.fileupload-audio'), - require('./jquery.fileupload-video'), - require('./jquery.fileupload-validate') - ); - } else { - factory(); - } -}(function () { - 'use strict'; - - angular.module('blueimp.fileupload', []) - - // The fileUpload service provides configuration options - // for the fileUpload directive and default handlers for - // File Upload events: - .provider('fileUpload', function () { - var scopeEvalAsync = function (expression) { - var scope = angular.element(this) - .fileupload('option', 'scope'); - // Schedule a new $digest cycle if not already inside of one - // and evaluate the given expression: - scope.$evalAsync(expression); - }, - addFileMethods = function (scope, data) { - var files = data.files, - file = files[0]; - angular.forEach(files, function (file, index) { - file._index = index; - file.$state = function () { - return data.state(); - }; - file.$processing = function () { - return data.processing(); - }; - file.$progress = function () { - return data.progress(); - }; - file.$response = function () { - return data.response(); - }; - }); - file.$submit = function () { - if (!file.error) { - return data.submit(); - } - }; - file.$cancel = function () { - return data.abort(); - }; - }, - $config; - $config = this.defaults = { - handleResponse: function (e, data) { - var files = data.result && data.result.files; - if (files) { - data.scope.replace(data.files, files); - } else if (data.errorThrown || - data.textStatus === 'error') { - data.files[0].error = data.errorThrown || - data.textStatus; - } - }, - add: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var scope = data.scope, - filesCopy = []; - angular.forEach(data.files, function (file) { - filesCopy.push(file); - }); - scope.$parent.$applyAsync(function () { - addFileMethods(scope, data); - var method = scope.option('prependFiles') ? - 'unshift' : 'push'; - Array.prototype[method].apply(scope.queue, data.files); - }); - data.process(function () { - return scope.process(data); - }).always(function () { - scope.$parent.$applyAsync(function () { - addFileMethods(scope, data); - scope.replace(filesCopy, data.files); - }); - }).then(function () { - if ((scope.option('autoUpload') || - data.autoUpload) && - data.autoUpload !== false) { - data.submit(); - } - }); - }, - done: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var that = this; - data.scope.$apply(function () { - data.handleResponse.call(that, e, data); - }); - }, - fail: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var that = this, - scope = data.scope; - if (data.errorThrown === 'abort') { - scope.clear(data.files); - return; - } - scope.$apply(function () { - data.handleResponse.call(that, e, data); - }); - }, - stop: scopeEvalAsync, - processstart: scopeEvalAsync, - processstop: scopeEvalAsync, - getNumberOfFiles: function () { - var scope = this.scope; - return scope.queue.length - scope.processing(); - }, - dataType: 'json', - autoUpload: false - }; - this.$get = [ - function () { - return { - defaults: $config - }; - } - ]; - }) - - // Format byte numbers to readable presentations: - .provider('formatFileSizeFilter', function () { - var $config = { - // Byte units following the IEC format - // http://en.wikipedia.org/wiki/Kilobyte - units: [ - {size: 1000000000, suffix: ' GB'}, - {size: 1000000, suffix: ' MB'}, - {size: 1000, suffix: ' KB'} - ] - }; - this.defaults = $config; - this.$get = function () { - return function (bytes) { - if (!angular.isNumber(bytes)) { - return ''; - } - var unit = true, - i = 0, - prefix, - suffix; - while (unit) { - unit = $config.units[i]; - prefix = unit.prefix || ''; - suffix = unit.suffix || ''; - if (i === $config.units.length - 1 || bytes >= unit.size) { - return prefix + (bytes / unit.size).toFixed(2) + suffix; - } - i += 1; - } - }; - }; - }) - - // The FileUploadController initializes the fileupload widget and - // provides scope methods to control the File Upload functionality: - .controller('FileUploadController', [ - '$scope', '$element', '$attrs', '$window', 'fileUpload','$q', - function ($scope, $element, $attrs, $window, fileUpload, $q) { - var uploadMethods = { - progress: function () { - return $element.fileupload('progress'); - }, - active: function () { - return $element.fileupload('active'); - }, - option: function (option, data) { - if (arguments.length === 1) { - return $element.fileupload('option', option); - } - $element.fileupload('option', option, data); - }, - add: function (data) { - return $element.fileupload('add', data); - }, - send: function (data) { - return $element.fileupload('send', data); - }, - process: function (data) { - return $element.fileupload('process', data); - }, - processing: function (data) { - return $element.fileupload('processing', data); - } - }; - $scope.disabled = !$window.jQuery.support.fileInput; - $scope.queue = $scope.queue || []; - $scope.clear = function (files) { - var queue = this.queue, - i = queue.length, - file = files, - length = 1; - if (angular.isArray(files)) { - file = files[0]; - length = files.length; - } - while (i) { - i -= 1; - if (queue[i] === file) { - return queue.splice(i, length); - } - } - }; - $scope.replace = function (oldFiles, newFiles) { - var queue = this.queue, - file = oldFiles[0], - i, - j; - for (i = 0; i < queue.length; i += 1) { - if (queue[i] === file) { - for (j = 0; j < newFiles.length; j += 1) { - queue[i + j] = newFiles[j]; - } - return; - } - } - }; - $scope.applyOnQueue = function (method) { - var list = this.queue.slice(0), - i, - file, - promises = []; - for (i = 0; i < list.length; i += 1) { - file = list[i]; - if (file[method]) { - promises.push(file[method]()); - } - } - return $q.all(promises); - }; - $scope.submit = function () { - return this.applyOnQueue('$submit'); - }; - $scope.cancel = function () { - return this.applyOnQueue('$cancel'); - }; - // Add upload methods to the scope: - angular.extend($scope, uploadMethods); - // The fileupload widget will initialize with - // the options provided via "data-"-parameters, - // as well as those given via options object: - $element.fileupload(angular.extend( - {scope: $scope}, - fileUpload.defaults - )).on('fileuploadadd', function (e, data) { - data.scope = $scope; - }).on('fileuploadfail', function (e, data) { - if (data.errorThrown === 'abort') { - return; - } - if (data.dataType && - data.dataType.indexOf('json') === data.dataType.length - 4) { - try { - data.result = angular.fromJson(data.jqXHR.responseText); - } catch (ignore) {} - } - }).on([ - 'fileuploadadd', - 'fileuploadsubmit', - 'fileuploadsend', - 'fileuploaddone', - 'fileuploadfail', - 'fileuploadalways', - 'fileuploadprogress', - 'fileuploadprogressall', - 'fileuploadstart', - 'fileuploadstop', - 'fileuploadchange', - 'fileuploadpaste', - 'fileuploaddrop', - 'fileuploaddragover', - 'fileuploadchunksend', - 'fileuploadchunkdone', - 'fileuploadchunkfail', - 'fileuploadchunkalways', - 'fileuploadprocessstart', - 'fileuploadprocess', - 'fileuploadprocessdone', - 'fileuploadprocessfail', - 'fileuploadprocessalways', - 'fileuploadprocessstop' - ].join(' '), function (e, data) { - $scope.$parent.$applyAsync(function () { - if ($scope.$emit(e.type, data).defaultPrevented) { - e.preventDefault(); - } - }); - }).on('remove', function () { - // Remove upload methods from the scope, - // when the widget is removed: - var method; - for (method in uploadMethods) { - if (uploadMethods.hasOwnProperty(method)) { - delete $scope[method]; - } - } - }); - // Observe option changes: - $scope.$watch( - $attrs.fileUpload, - function (newOptions) { - if (newOptions) { - $element.fileupload('option', newOptions); - } - } - ); - } - ]) - - // Provide File Upload progress feedback: - .controller('FileUploadProgressController', [ - '$scope', '$attrs', '$parse', - function ($scope, $attrs, $parse) { - var fn = $parse($attrs.fileUploadProgress), - update = function () { - var progress = fn($scope); - if (!progress || !progress.total) { - return; - } - $scope.num = Math.floor( - progress.loaded / progress.total * 100 - ); - }; - update(); - $scope.$watch( - $attrs.fileUploadProgress + '.loaded', - function (newValue, oldValue) { - if (newValue !== oldValue) { - update(); - } - } - ); - } - ]) - - // Display File Upload previews: - .controller('FileUploadPreviewController', [ - '$scope', '$element', '$attrs', - function ($scope, $element, $attrs) { - $scope.$watch( - $attrs.fileUploadPreview + '.preview', - function (preview) { - $element.empty(); - if (preview) { - $element.append(preview); - } - } - ); - } - ]) - - .directive('fileUpload', function () { - return { - controller: 'FileUploadController', - scope: true - }; - }) - - .directive('fileUploadProgress', function () { - return { - controller: 'FileUploadProgressController', - scope: true - }; - }) - - .directive('fileUploadPreview', function () { - return { - controller: 'FileUploadPreviewController' - }; - }) - - // Enhance the HTML5 download attribute to - // allow drag&drop of files to the desktop: - .directive('download', function () { - return function (scope, elm) { - elm.on('dragstart', function (e) { - try { - e.originalEvent.dataTransfer.setData( - 'DownloadURL', - [ - 'application/octet-stream', - elm.prop('download'), - elm.prop('href') - ].join(':') - ); - } catch (ignore) {} - }); - }; - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-audio.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-audio.js deleted file mode 100644 index a253776..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-audio.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - * jQuery File Upload Audio Preview Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, require, window, document */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - 'load-image', - './jquery.fileupload-process' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('blueimp-load-image/js/load-image'), - require('./jquery.fileupload-process') - ); - } else { - // Browser globals: - factory( - window.jQuery, - window.loadImage - ); - } -}(function ($, loadImage) { - 'use strict'; - - // Prepend to the default processQueue: - $.blueimp.fileupload.prototype.options.processQueue.unshift( - { - action: 'loadAudio', - // Use the action as prefix for the "@" options: - prefix: true, - fileTypes: '@', - maxFileSize: '@', - disabled: '@disableAudioPreview' - }, - { - action: 'setAudio', - name: '@audioPreviewName', - disabled: '@disableAudioPreview' - } - ); - - // The File Upload Audio Preview plugin extends the fileupload widget - // with audio preview functionality: - $.widget('blueimp.fileupload', $.blueimp.fileupload, { - - options: { - // The regular expression for the types of audio files to load, - // matched against the file type: - loadAudioFileTypes: /^audio\/.*$/ - }, - - _audioElement: document.createElement('audio'), - - processActions: { - - // Loads the audio file given via data.files and data.index - // as audio element if the browser supports playing it. - // Accepts the options fileTypes (regular expression) - // and maxFileSize (integer) to limit the files to load: - loadAudio: function (data, options) { - if (options.disabled) { - return data; - } - var file = data.files[data.index], - url, - audio; - if (this._audioElement.canPlayType && - this._audioElement.canPlayType(file.type) && - ($.type(options.maxFileSize) !== 'number' || - file.size <= options.maxFileSize) && - (!options.fileTypes || - options.fileTypes.test(file.type))) { - url = loadImage.createObjectURL(file); - if (url) { - audio = this._audioElement.cloneNode(false); - audio.src = url; - audio.controls = true; - data.audio = audio; - return data; - } - } - return data; - }, - - // Sets the audio element as a property of the file object: - setAudio: function (data, options) { - if (data.audio && !options.disabled) { - data.files[data.index][options.name || 'preview'] = data.audio; - } - return data; - } - - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-image.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-image.js deleted file mode 100644 index 7e066a6..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-image.js +++ /dev/null @@ -1,326 +0,0 @@ -/* - * jQuery File Upload Image Preview & Resize Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, require, window, Blob */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - 'load-image', - 'load-image-meta', - 'load-image-scale', - 'load-image-exif', - 'canvas-to-blob', - './jquery.fileupload-process' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('blueimp-load-image/js/load-image'), - require('blueimp-load-image/js/load-image-meta'), - require('blueimp-load-image/js/load-image-scale'), - require('blueimp-load-image/js/load-image-exif'), - require('blueimp-canvas-to-blob'), - require('./jquery.fileupload-process') - ); - } else { - // Browser globals: - factory( - window.jQuery, - window.loadImage - ); - } -}(function ($, loadImage) { - 'use strict'; - - // Prepend to the default processQueue: - $.blueimp.fileupload.prototype.options.processQueue.unshift( - { - action: 'loadImageMetaData', - disableImageHead: '@', - disableExif: '@', - disableExifThumbnail: '@', - disableExifSub: '@', - disableExifGps: '@', - disabled: '@disableImageMetaDataLoad' - }, - { - action: 'loadImage', - // Use the action as prefix for the "@" options: - prefix: true, - fileTypes: '@', - maxFileSize: '@', - noRevoke: '@', - disabled: '@disableImageLoad' - }, - { - action: 'resizeImage', - // Use "image" as prefix for the "@" options: - prefix: 'image', - maxWidth: '@', - maxHeight: '@', - minWidth: '@', - minHeight: '@', - crop: '@', - orientation: '@', - forceResize: '@', - disabled: '@disableImageResize' - }, - { - action: 'saveImage', - quality: '@imageQuality', - type: '@imageType', - disabled: '@disableImageResize' - }, - { - action: 'saveImageMetaData', - disabled: '@disableImageMetaDataSave' - }, - { - action: 'resizeImage', - // Use "preview" as prefix for the "@" options: - prefix: 'preview', - maxWidth: '@', - maxHeight: '@', - minWidth: '@', - minHeight: '@', - crop: '@', - orientation: '@', - thumbnail: '@', - canvas: '@', - disabled: '@disableImagePreview' - }, - { - action: 'setImage', - name: '@imagePreviewName', - disabled: '@disableImagePreview' - }, - { - action: 'deleteImageReferences', - disabled: '@disableImageReferencesDeletion' - } - ); - - // The File Upload Resize plugin extends the fileupload widget - // with image resize functionality: - $.widget('blueimp.fileupload', $.blueimp.fileupload, { - - options: { - // The regular expression for the types of images to load: - // matched against the file type: - loadImageFileTypes: /^image\/(gif|jpeg|png|svg\+xml)$/, - // The maximum file size of images to load: - loadImageMaxFileSize: 10000000, // 10MB - // The maximum width of resized images: - imageMaxWidth: 1920, - // The maximum height of resized images: - imageMaxHeight: 1080, - // Defines the image orientation (1-8) or takes the orientation - // value from Exif data if set to true: - imageOrientation: false, - // Define if resized images should be cropped or only scaled: - imageCrop: false, - // Disable the resize image functionality by default: - disableImageResize: true, - // The maximum width of the preview images: - previewMaxWidth: 50, - // The maximum height of the preview images: - previewMaxHeight: 50, - // Defines the preview orientation (1-8) or takes the orientation - // value from Exif data if set to true: - previewOrientation: true, - // Create the preview using the Exif data thumbnail: - previewThumbnail: true, - // Define if preview images should be cropped or only scaled: - previewCrop: false, - // Define if preview images should be resized as canvas elements: - previewCanvas: true - }, - - processActions: { - - // Loads the image given via data.files and data.index - // as img element, if the browser supports the File API. - // Accepts the options fileTypes (regular expression) - // and maxFileSize (integer) to limit the files to load: - loadImage: function (data, options) { - if (options.disabled) { - return data; - } - var that = this, - file = data.files[data.index], - dfd = $.Deferred(); - if (($.type(options.maxFileSize) === 'number' && - file.size > options.maxFileSize) || - (options.fileTypes && - !options.fileTypes.test(file.type)) || - !loadImage( - file, - function (img) { - if (img.src) { - data.img = img; - } - dfd.resolveWith(that, [data]); - }, - options - )) { - return data; - } - return dfd.promise(); - }, - - // Resizes the image given as data.canvas or data.img - // and updates data.canvas or data.img with the resized image. - // Also stores the resized image as preview property. - // Accepts the options maxWidth, maxHeight, minWidth, - // minHeight, canvas and crop: - resizeImage: function (data, options) { - if (options.disabled || !(data.canvas || data.img)) { - return data; - } - options = $.extend({canvas: true}, options); - var that = this, - dfd = $.Deferred(), - img = (options.canvas && data.canvas) || data.img, - resolve = function (newImg) { - if (newImg && (newImg.width !== img.width || - newImg.height !== img.height || - options.forceResize)) { - data[newImg.getContext ? 'canvas' : 'img'] = newImg; - } - data.preview = newImg; - dfd.resolveWith(that, [data]); - }, - thumbnail; - if (data.exif) { - if (options.orientation === true) { - options.orientation = data.exif.get('Orientation'); - } - if (options.thumbnail) { - thumbnail = data.exif.get('Thumbnail'); - if (thumbnail) { - loadImage(thumbnail, resolve, options); - return dfd.promise(); - } - } - // Prevent orienting the same image twice: - if (data.orientation) { - delete options.orientation; - } else { - data.orientation = options.orientation; - } - } - if (img) { - resolve(loadImage.scale(img, options)); - return dfd.promise(); - } - return data; - }, - - // Saves the processed image given as data.canvas - // inplace at data.index of data.files: - saveImage: function (data, options) { - if (!data.canvas || options.disabled) { - return data; - } - var that = this, - file = data.files[data.index], - dfd = $.Deferred(); - if (data.canvas.toBlob) { - data.canvas.toBlob( - function (blob) { - if (!blob.name) { - if (file.type === blob.type) { - blob.name = file.name; - } else if (file.name) { - blob.name = file.name.replace( - /\.\w+$/, - '.' + blob.type.substr(6) - ); - } - } - // Don't restore invalid meta data: - if (file.type !== blob.type) { - delete data.imageHead; - } - // Store the created blob at the position - // of the original file in the files list: - data.files[data.index] = blob; - dfd.resolveWith(that, [data]); - }, - options.type || file.type, - options.quality - ); - } else { - return data; - } - return dfd.promise(); - }, - - loadImageMetaData: function (data, options) { - if (options.disabled) { - return data; - } - var that = this, - dfd = $.Deferred(); - loadImage.parseMetaData(data.files[data.index], function (result) { - $.extend(data, result); - dfd.resolveWith(that, [data]); - }, options); - return dfd.promise(); - }, - - saveImageMetaData: function (data, options) { - if (!(data.imageHead && data.canvas && - data.canvas.toBlob && !options.disabled)) { - return data; - } - var file = data.files[data.index], - blob = new Blob([ - data.imageHead, - // Resized images always have a head size of 20 bytes, - // including the JPEG marker and a minimal JFIF header: - this._blobSlice.call(file, 20) - ], {type: file.type}); - blob.name = file.name; - data.files[data.index] = blob; - return data; - }, - - // Sets the resized version of the image as a property of the - // file object, must be called after "saveImage": - setImage: function (data, options) { - if (data.preview && !options.disabled) { - data.files[data.index][options.name || 'preview'] = data.preview; - } - return data; - }, - - deleteImageReferences: function (data, options) { - if (!options.disabled) { - delete data.img; - delete data.canvas; - delete data.preview; - delete data.imageHead; - } - return data; - } - - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-jquery-ui.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-jquery-ui.js deleted file mode 100644 index 7b136b3..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-jquery-ui.js +++ /dev/null @@ -1,161 +0,0 @@ -/* - * jQuery File Upload jQuery UI Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, require, window */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - './jquery.fileupload-ui' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('./jquery.fileupload-ui') - ); - } else { - // Browser globals: - factory(window.jQuery); - } -}(function ($) { - 'use strict'; - - $.widget('blueimp.fileupload', $.blueimp.fileupload, { - - options: { - processdone: function (e, data) { - data.context.find('.start').button('enable'); - }, - progress: function (e, data) { - if (data.context) { - data.context.find('.progress').progressbar( - 'option', - 'value', - parseInt(data.loaded / data.total * 100, 10) - ); - } - }, - progressall: function (e, data) { - var $this = $(this); - $this.find('.fileupload-progress') - .find('.progress').progressbar( - 'option', - 'value', - parseInt(data.loaded / data.total * 100, 10) - ).end() - .find('.progress-extended').each(function () { - $(this).html( - ($this.data('blueimp-fileupload') || - $this.data('fileupload')) - ._renderExtendedProgress(data) - ); - }); - } - }, - - _renderUpload: function (func, files) { - var node = this._super(func, files), - showIconText = $(window).width() > 480; - node.find('.progress').empty().progressbar(); - node.find('.start').button({ - icons: {primary: 'ui-icon-circle-arrow-e'}, - text: showIconText - }); - node.find('.cancel').button({ - icons: {primary: 'ui-icon-cancel'}, - text: showIconText - }); - if (node.hasClass('fade')) { - node.hide(); - } - return node; - }, - - _renderDownload: function (func, files) { - var node = this._super(func, files), - showIconText = $(window).width() > 480; - node.find('.delete').button({ - icons: {primary: 'ui-icon-trash'}, - text: showIconText - }); - if (node.hasClass('fade')) { - node.hide(); - } - return node; - }, - - _startHandler: function (e) { - $(e.currentTarget).button('disable'); - this._super(e); - }, - - _transition: function (node) { - var deferred = $.Deferred(); - if (node.hasClass('fade')) { - node.fadeToggle( - this.options.transitionDuration, - this.options.transitionEasing, - function () { - deferred.resolveWith(node); - } - ); - } else { - deferred.resolveWith(node); - } - return deferred; - }, - - _create: function () { - this._super(); - this.element - .find('.fileupload-buttonbar') - .find('.fileinput-button').each(function () { - var input = $(this).find('input:file').detach(); - $(this) - .button({icons: {primary: 'ui-icon-plusthick'}}) - .append(input); - }) - .end().find('.start') - .button({icons: {primary: 'ui-icon-circle-arrow-e'}}) - .end().find('.cancel') - .button({icons: {primary: 'ui-icon-cancel'}}) - .end().find('.delete') - .button({icons: {primary: 'ui-icon-trash'}}) - .end().find('.progress').progressbar(); - }, - - _destroy: function () { - this.element - .find('.fileupload-buttonbar') - .find('.fileinput-button').each(function () { - var input = $(this).find('input:file').detach(); - $(this) - .button('destroy') - .append(input); - }) - .end().find('.start') - .button('destroy') - .end().find('.cancel') - .button('destroy') - .end().find('.delete') - .button('destroy') - .end().find('.progress').progressbar('destroy'); - this._super(); - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-process.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-process.js deleted file mode 100644 index 638f0d2..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-process.js +++ /dev/null @@ -1,178 +0,0 @@ -/* - * jQuery File Upload Processing Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2012, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, require, window */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - './jquery.fileupload' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('./jquery.fileupload') - ); - } else { - // Browser globals: - factory( - window.jQuery - ); - } -}(function ($) { - 'use strict'; - - var originalAdd = $.blueimp.fileupload.prototype.options.add; - - // The File Upload Processing plugin extends the fileupload widget - // with file processing functionality: - $.widget('blueimp.fileupload', $.blueimp.fileupload, { - - options: { - // The list of processing actions: - processQueue: [ - /* - { - action: 'log', - type: 'debug' - } - */ - ], - add: function (e, data) { - var $this = $(this); - data.process(function () { - return $this.fileupload('process', data); - }); - originalAdd.call(this, e, data); - } - }, - - processActions: { - /* - log: function (data, options) { - console[options.type]( - 'Processing "' + data.files[data.index].name + '"' - ); - } - */ - }, - - _processFile: function (data, originalData) { - var that = this, - dfd = $.Deferred().resolveWith(that, [data]), - chain = dfd.promise(); - this._trigger('process', null, data); - $.each(data.processQueue, function (i, settings) { - var func = function (data) { - if (originalData.errorThrown) { - return $.Deferred() - .rejectWith(that, [originalData]).promise(); - } - return that.processActions[settings.action].call( - that, - data, - settings - ); - }; - chain = chain.then(func, settings.always && func); - }); - chain - .done(function () { - that._trigger('processdone', null, data); - that._trigger('processalways', null, data); - }) - .fail(function () { - that._trigger('processfail', null, data); - that._trigger('processalways', null, data); - }); - return chain; - }, - - // Replaces the settings of each processQueue item that - // are strings starting with an "@", using the remaining - // substring as key for the option map, - // e.g. "@autoUpload" is replaced with options.autoUpload: - _transformProcessQueue: function (options) { - var processQueue = []; - $.each(options.processQueue, function () { - var settings = {}, - action = this.action, - prefix = this.prefix === true ? action : this.prefix; - $.each(this, function (key, value) { - if ($.type(value) === 'string' && - value.charAt(0) === '@') { - settings[key] = options[ - value.slice(1) || (prefix ? prefix + - key.charAt(0).toUpperCase() + key.slice(1) : key) - ]; - } else { - settings[key] = value; - } - - }); - processQueue.push(settings); - }); - options.processQueue = processQueue; - }, - - // Returns the number of files currently in the processsing queue: - processing: function () { - return this._processing; - }, - - // Processes the files given as files property of the data parameter, - // returns a Promise object that allows to bind callbacks: - process: function (data) { - var that = this, - options = $.extend({}, this.options, data); - if (options.processQueue && options.processQueue.length) { - this._transformProcessQueue(options); - if (this._processing === 0) { - this._trigger('processstart'); - } - $.each(data.files, function (index) { - var opts = index ? $.extend({}, options) : options, - func = function () { - if (data.errorThrown) { - return $.Deferred() - .rejectWith(that, [data]).promise(); - } - return that._processFile(opts, data); - }; - opts.index = index; - that._processing += 1; - that._processingQueue = that._processingQueue.then(func, func) - .always(function () { - that._processing -= 1; - if (that._processing === 0) { - that._trigger('processstop'); - } - }); - }); - } - return this._processingQueue; - }, - - _create: function () { - this._super(); - this._processing = 0; - this._processingQueue = $.Deferred().resolveWith(this) - .promise(); - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-ui.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-ui.js deleted file mode 100644 index 5058084..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-ui.js +++ /dev/null @@ -1,714 +0,0 @@ -/* - * jQuery File Upload User Interface Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2010, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, require, window */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - 'blueimp-tmpl', - './jquery.fileupload-image', - './jquery.fileupload-audio', - './jquery.fileupload-video', - './jquery.fileupload-validate' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('blueimp-tmpl'), - require('./jquery.fileupload-image'), - require('./jquery.fileupload-audio'), - require('./jquery.fileupload-video'), - require('./jquery.fileupload-validate') - ); - } else { - // Browser globals: - factory( - window.jQuery, - window.tmpl - ); - } -}(function ($, tmpl) { - 'use strict'; - - $.blueimp.fileupload.prototype._specialOptions.push( - 'filesContainer', - 'uploadTemplateId', - 'downloadTemplateId' - ); - - // The UI version extends the file upload widget - // and adds complete user interface interaction: - $.widget('blueimp.fileupload', $.blueimp.fileupload, { - - options: { - // By default, files added to the widget are uploaded as soon - // as the user clicks on the start buttons. To enable automatic - // uploads, set the following option to true: - autoUpload: false, - // The ID of the upload template: - uploadTemplateId: 'template-upload', - // The ID of the download template: - downloadTemplateId: 'template-download', - // The container for the list of files. If undefined, it is set to - // an element with class "files" inside of the widget element: - filesContainer: undefined, - // By default, files are appended to the files container. - // Set the following option to true, to prepend files instead: - prependFiles: false, - // The expected data type of the upload response, sets the dataType - // option of the $.ajax upload requests: - dataType: 'json', - - // Error and info messages: - messages: { - unknownError: 'Unknown error' - }, - - // Function returning the current number of files, - // used by the maxNumberOfFiles validation: - getNumberOfFiles: function () { - return this.filesContainer.children() - .not('.processing').length; - }, - - // Callback to retrieve the list of files from the server response: - getFilesFromResponse: function (data) { - if (data.result && $.isArray(data.result.files)) { - return data.result.files; - } - return []; - }, - - // The add callback is invoked as soon as files are added to the fileupload - // widget (via file input selection, drag & drop or add API call). - // See the basic file upload widget for more information: - add: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var $this = $(this), - that = $this.data('blueimp-fileupload') || - $this.data('fileupload'), - options = that.options; - data.context = that._renderUpload(data.files) - .data('data', data) - .addClass('processing'); - options.filesContainer[ - options.prependFiles ? 'prepend' : 'append' - ](data.context); - that._forceReflow(data.context); - that._transition(data.context); - data.process(function () { - return $this.fileupload('process', data); - }).always(function () { - data.context.each(function (index) { - $(this).find('.size').text( - that._formatFileSize(data.files[index].size) - ); - }).removeClass('processing'); - that._renderPreviews(data); - }).done(function () { - data.context.find('.start').prop('disabled', false); - if ((that._trigger('added', e, data) !== false) && - (options.autoUpload || data.autoUpload) && - data.autoUpload !== false) { - data.submit(); - } - }).fail(function () { - if (data.files.error) { - data.context.each(function (index) { - var error = data.files[index].error; - if (error) { - $(this).find('.error').text(error); - } - }); - } - }); - }, - // Callback for the start of each file upload request: - send: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var that = $(this).data('blueimp-fileupload') || - $(this).data('fileupload'); - if (data.context && data.dataType && - data.dataType.substr(0, 6) === 'iframe') { - // Iframe Transport does not support progress events. - // In lack of an indeterminate progress bar, we set - // the progress to 100%, showing the full animated bar: - data.context - .find('.progress').addClass( - !$.support.transition && 'progress-animated' - ) - .attr('aria-valuenow', 100) - .children().first().css( - 'width', - '100%' - ); - } - return that._trigger('sent', e, data); - }, - // Callback for successful uploads: - done: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var that = $(this).data('blueimp-fileupload') || - $(this).data('fileupload'), - getFilesFromResponse = data.getFilesFromResponse || - that.options.getFilesFromResponse, - files = getFilesFromResponse(data), - template, - deferred; - if (data.context) { - data.context.each(function (index) { - var file = files[index] || - {error: 'Empty file upload result'}; - deferred = that._addFinishedDeferreds(); - that._transition($(this)).done( - function () { - var node = $(this); - template = that._renderDownload([file]) - .replaceAll(node); - that._forceReflow(template); - that._transition(template).done( - function () { - data.context = $(this); - that._trigger('completed', e, data); - that._trigger('finished', e, data); - deferred.resolve(); - } - ); - } - ); - }); - } else { - template = that._renderDownload(files)[ - that.options.prependFiles ? 'prependTo' : 'appendTo' - ](that.options.filesContainer); - that._forceReflow(template); - deferred = that._addFinishedDeferreds(); - that._transition(template).done( - function () { - data.context = $(this); - that._trigger('completed', e, data); - that._trigger('finished', e, data); - deferred.resolve(); - } - ); - } - }, - // Callback for failed (abort or error) uploads: - fail: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var that = $(this).data('blueimp-fileupload') || - $(this).data('fileupload'), - template, - deferred; - if (data.context) { - data.context.each(function (index) { - if (data.errorThrown !== 'abort') { - var file = data.files[index]; - file.error = file.error || data.errorThrown || - data.i18n('unknownError'); - deferred = that._addFinishedDeferreds(); - that._transition($(this)).done( - function () { - var node = $(this); - template = that._renderDownload([file]) - .replaceAll(node); - that._forceReflow(template); - that._transition(template).done( - function () { - data.context = $(this); - that._trigger('failed', e, data); - that._trigger('finished', e, data); - deferred.resolve(); - } - ); - } - ); - } else { - deferred = that._addFinishedDeferreds(); - that._transition($(this)).done( - function () { - $(this).remove(); - that._trigger('failed', e, data); - that._trigger('finished', e, data); - deferred.resolve(); - } - ); - } - }); - } else if (data.errorThrown !== 'abort') { - data.context = that._renderUpload(data.files)[ - that.options.prependFiles ? 'prependTo' : 'appendTo' - ](that.options.filesContainer) - .data('data', data); - that._forceReflow(data.context); - deferred = that._addFinishedDeferreds(); - that._transition(data.context).done( - function () { - data.context = $(this); - that._trigger('failed', e, data); - that._trigger('finished', e, data); - deferred.resolve(); - } - ); - } else { - that._trigger('failed', e, data); - that._trigger('finished', e, data); - that._addFinishedDeferreds().resolve(); - } - }, - // Callback for upload progress events: - progress: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var progress = Math.floor(data.loaded / data.total * 100); - if (data.context) { - data.context.each(function () { - $(this).find('.progress') - .attr('aria-valuenow', progress) - .children().first().css( - 'width', - progress + '%' - ); - }); - } - }, - // Callback for global upload progress events: - progressall: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var $this = $(this), - progress = Math.floor(data.loaded / data.total * 100), - globalProgressNode = $this.find('.fileupload-progress'), - extendedProgressNode = globalProgressNode - .find('.progress-extended'); - if (extendedProgressNode.length) { - extendedProgressNode.html( - ($this.data('blueimp-fileupload') || $this.data('fileupload')) - ._renderExtendedProgress(data) - ); - } - globalProgressNode - .find('.progress') - .attr('aria-valuenow', progress) - .children().first().css( - 'width', - progress + '%' - ); - }, - // Callback for uploads start, equivalent to the global ajaxStart event: - start: function (e) { - if (e.isDefaultPrevented()) { - return false; - } - var that = $(this).data('blueimp-fileupload') || - $(this).data('fileupload'); - that._resetFinishedDeferreds(); - that._transition($(this).find('.fileupload-progress')).done( - function () { - that._trigger('started', e); - } - ); - }, - // Callback for uploads stop, equivalent to the global ajaxStop event: - stop: function (e) { - if (e.isDefaultPrevented()) { - return false; - } - var that = $(this).data('blueimp-fileupload') || - $(this).data('fileupload'), - deferred = that._addFinishedDeferreds(); - $.when.apply($, that._getFinishedDeferreds()) - .done(function () { - that._trigger('stopped', e); - }); - that._transition($(this).find('.fileupload-progress')).done( - function () { - $(this).find('.progress') - .attr('aria-valuenow', '0') - .children().first().css('width', '0%'); - $(this).find('.progress-extended').html(' '); - deferred.resolve(); - } - ); - }, - processstart: function (e) { - if (e.isDefaultPrevented()) { - return false; - } - $(this).addClass('fileupload-processing'); - }, - processstop: function (e) { - if (e.isDefaultPrevented()) { - return false; - } - $(this).removeClass('fileupload-processing'); - }, - // Callback for file deletion: - destroy: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - var that = $(this).data('blueimp-fileupload') || - $(this).data('fileupload'), - removeNode = function () { - that._transition(data.context).done( - function () { - $(this).remove(); - that._trigger('destroyed', e, data); - } - ); - }; - if (data.url) { - data.dataType = data.dataType || that.options.dataType; - $.ajax(data).done(removeNode).fail(function () { - that._trigger('destroyfailed', e, data); - }); - } else { - removeNode(); - } - } - }, - - _resetFinishedDeferreds: function () { - this._finishedUploads = []; - }, - - _addFinishedDeferreds: function (deferred) { - if (!deferred) { - deferred = $.Deferred(); - } - this._finishedUploads.push(deferred); - return deferred; - }, - - _getFinishedDeferreds: function () { - return this._finishedUploads; - }, - - // Link handler, that allows to download files - // by drag & drop of the links to the desktop: - _enableDragToDesktop: function () { - var link = $(this), - url = link.prop('href'), - name = link.prop('download'), - type = 'application/octet-stream'; - link.bind('dragstart', function (e) { - try { - e.originalEvent.dataTransfer.setData( - 'DownloadURL', - [type, name, url].join(':') - ); - } catch (ignore) {} - }); - }, - - _formatFileSize: function (bytes) { - if (typeof bytes !== 'number') { - return ''; - } - if (bytes >= 1000000000) { - return (bytes / 1000000000).toFixed(2) + ' GB'; - } - if (bytes >= 1000000) { - return (bytes / 1000000).toFixed(2) + ' MB'; - } - return (bytes / 1000).toFixed(2) + ' KB'; - }, - - _formatBitrate: function (bits) { - if (typeof bits !== 'number') { - return ''; - } - if (bits >= 1000000000) { - return (bits / 1000000000).toFixed(2) + ' Gbit/s'; - } - if (bits >= 1000000) { - return (bits / 1000000).toFixed(2) + ' Mbit/s'; - } - if (bits >= 1000) { - return (bits / 1000).toFixed(2) + ' kbit/s'; - } - return bits.toFixed(2) + ' bit/s'; - }, - - _formatTime: function (seconds) { - var date = new Date(seconds * 1000), - days = Math.floor(seconds / 86400); - days = days ? days + 'd ' : ''; - return days + - ('0' + date.getUTCHours()).slice(-2) + ':' + - ('0' + date.getUTCMinutes()).slice(-2) + ':' + - ('0' + date.getUTCSeconds()).slice(-2); - }, - - _formatPercentage: function (floatValue) { - return (floatValue * 100).toFixed(2) + ' %'; - }, - - _renderExtendedProgress: function (data) { - return this._formatBitrate(data.bitrate) + ' | ' + - this._formatTime( - (data.total - data.loaded) * 8 / data.bitrate - ) + ' | ' + - this._formatPercentage( - data.loaded / data.total - ) + ' | ' + - this._formatFileSize(data.loaded) + ' / ' + - this._formatFileSize(data.total); - }, - - _renderTemplate: function (func, files) { - if (!func) { - return $(); - } - var result = func({ - files: files, - formatFileSize: this._formatFileSize, - options: this.options - }); - if (result instanceof $) { - return result; - } - return $(this.options.templatesContainer).html(result).children(); - }, - - _renderPreviews: function (data) { - data.context.find('.preview').each(function (index, elm) { - $(elm).append(data.files[index].preview); - }); - }, - - _renderUpload: function (files) { - return this._renderTemplate( - this.options.uploadTemplate, - files - ); - }, - - _renderDownload: function (files) { - return this._renderTemplate( - this.options.downloadTemplate, - files - ).find('a[download]').each(this._enableDragToDesktop).end(); - }, - - _startHandler: function (e) { - e.preventDefault(); - var button = $(e.currentTarget), - template = button.closest('.template-upload'), - data = template.data('data'); - button.prop('disabled', true); - if (data && data.submit) { - data.submit(); - } - }, - - _cancelHandler: function (e) { - e.preventDefault(); - var template = $(e.currentTarget) - .closest('.template-upload,.template-download'), - data = template.data('data') || {}; - data.context = data.context || template; - if (data.abort) { - data.abort(); - } else { - data.errorThrown = 'abort'; - this._trigger('fail', e, data); - } - }, - - _deleteHandler: function (e) { - e.preventDefault(); - var button = $(e.currentTarget); - this._trigger('destroy', e, $.extend({ - context: button.closest('.template-download'), - type: 'DELETE' - }, button.data())); - }, - - _forceReflow: function (node) { - return $.support.transition && node.length && - node[0].offsetWidth; - }, - - _transition: function (node) { - var dfd = $.Deferred(); - if ($.support.transition && node.hasClass('fade') && node.is(':visible')) { - node.bind( - $.support.transition.end, - function (e) { - // Make sure we don't respond to other transitions events - // in the container element, e.g. from button elements: - if (e.target === node[0]) { - node.unbind($.support.transition.end); - dfd.resolveWith(node); - } - } - ).toggleClass('in'); - } else { - node.toggleClass('in'); - dfd.resolveWith(node); - } - return dfd; - }, - - _initButtonBarEventHandlers: function () { - var fileUploadButtonBar = this.element.find('.fileupload-buttonbar'), - filesList = this.options.filesContainer; - this._on(fileUploadButtonBar.find('.start'), { - click: function (e) { - e.preventDefault(); - filesList.find('.start').click(); - } - }); - this._on(fileUploadButtonBar.find('.cancel'), { - click: function (e) { - e.preventDefault(); - filesList.find('.cancel').click(); - } - }); - this._on(fileUploadButtonBar.find('.delete'), { - click: function (e) { - e.preventDefault(); - filesList.find('.toggle:checked') - .closest('.template-download') - .find('.delete').click(); - fileUploadButtonBar.find('.toggle') - .prop('checked', false); - } - }); - this._on(fileUploadButtonBar.find('.toggle'), { - change: function (e) { - filesList.find('.toggle').prop( - 'checked', - $(e.currentTarget).is(':checked') - ); - } - }); - }, - - _destroyButtonBarEventHandlers: function () { - this._off( - this.element.find('.fileupload-buttonbar') - .find('.start, .cancel, .delete'), - 'click' - ); - this._off( - this.element.find('.fileupload-buttonbar .toggle'), - 'change.' - ); - }, - - _initEventHandlers: function () { - this._super(); - this._on(this.options.filesContainer, { - 'click .start': this._startHandler, - 'click .cancel': this._cancelHandler, - 'click .delete': this._deleteHandler - }); - this._initButtonBarEventHandlers(); - }, - - _destroyEventHandlers: function () { - this._destroyButtonBarEventHandlers(); - this._off(this.options.filesContainer, 'click'); - this._super(); - }, - - _enableFileInputButton: function () { - this.element.find('.fileinput-button input') - .prop('disabled', false) - .parent().removeClass('disabled'); - }, - - _disableFileInputButton: function () { - this.element.find('.fileinput-button input') - .prop('disabled', true) - .parent().addClass('disabled'); - }, - - _initTemplates: function () { - var options = this.options; - options.templatesContainer = this.document[0].createElement( - options.filesContainer.prop('nodeName') - ); - if (tmpl) { - if (options.uploadTemplateId) { - options.uploadTemplate = tmpl(options.uploadTemplateId); - } - if (options.downloadTemplateId) { - options.downloadTemplate = tmpl(options.downloadTemplateId); - } - } - }, - - _initFilesContainer: function () { - var options = this.options; - if (options.filesContainer === undefined) { - options.filesContainer = this.element.find('.files'); - } else if (!(options.filesContainer instanceof $)) { - options.filesContainer = $(options.filesContainer); - } - }, - - _initSpecialOptions: function () { - this._super(); - this._initFilesContainer(); - this._initTemplates(); - }, - - _create: function () { - this._super(); - this._resetFinishedDeferreds(); - if (!$.support.fileInput) { - this._disableFileInputButton(); - } - }, - - enable: function () { - var wasDisabled = false; - if (this.options.disabled) { - wasDisabled = true; - } - this._super(); - if (wasDisabled) { - this.element.find('input, button').prop('disabled', false); - this._enableFileInputButton(); - } - }, - - disable: function () { - if (!this.options.disabled) { - this.element.find('input, button').prop('disabled', true); - this._disableFileInputButton(); - } - this._super(); - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-validate.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-validate.js deleted file mode 100644 index eebeb37..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-validate.js +++ /dev/null @@ -1,125 +0,0 @@ -/* - * jQuery File Upload Validation Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* global define, require, window */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - './jquery.fileupload-process' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('./jquery.fileupload-process') - ); - } else { - // Browser globals: - factory( - window.jQuery - ); - } -}(function ($) { - 'use strict'; - - // Append to the default processQueue: - $.blueimp.fileupload.prototype.options.processQueue.push( - { - action: 'validate', - // Always trigger this action, - // even if the previous action was rejected: - always: true, - // Options taken from the global options map: - acceptFileTypes: '@', - maxFileSize: '@', - minFileSize: '@', - maxNumberOfFiles: '@', - disabled: '@disableValidation' - } - ); - - // The File Upload Validation plugin extends the fileupload widget - // with file validation functionality: - $.widget('blueimp.fileupload', $.blueimp.fileupload, { - - options: { - /* - // The regular expression for allowed file types, matches - // against either file type or file name: - acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, - // The maximum allowed file size in bytes: - maxFileSize: 10000000, // 10 MB - // The minimum allowed file size in bytes: - minFileSize: undefined, // No minimal file size - // The limit of files to be uploaded: - maxNumberOfFiles: 10, - */ - - // Function returning the current number of files, - // has to be overriden for maxNumberOfFiles validation: - getNumberOfFiles: $.noop, - - // Error and info messages: - messages: { - maxNumberOfFiles: 'Maximum number of files exceeded', - acceptFileTypes: 'File type not allowed', - maxFileSize: 'File is too large', - minFileSize: 'File is too small' - } - }, - - processActions: { - - validate: function (data, options) { - if (options.disabled) { - return data; - } - var dfd = $.Deferred(), - settings = this.options, - file = data.files[data.index], - fileSize; - if (options.minFileSize || options.maxFileSize) { - fileSize = file.size; - } - if ($.type(options.maxNumberOfFiles) === 'number' && - (settings.getNumberOfFiles() || 0) + data.files.length > - options.maxNumberOfFiles) { - file.error = settings.i18n('maxNumberOfFiles'); - } else if (options.acceptFileTypes && - !(options.acceptFileTypes.test(file.type) || - options.acceptFileTypes.test(file.name))) { - file.error = settings.i18n('acceptFileTypes'); - } else if (fileSize > options.maxFileSize) { - file.error = settings.i18n('maxFileSize'); - } else if ($.type(fileSize) === 'number' && - fileSize < options.minFileSize) { - file.error = settings.i18n('minFileSize'); - } else { - delete file.error; - } - if (file.error || data.files.error) { - data.files.error = true; - dfd.rejectWith(this, [data]); - } else { - dfd.resolveWith(this, [data]); - } - return dfd.promise(); - } - - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload-video.js b/libraries/filemanager-9.12.1/js/jquery.fileupload-video.js deleted file mode 100644 index aedcec2..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload-video.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - * jQuery File Upload Video Preview Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, require, window, document */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - 'load-image', - './jquery.fileupload-process' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('blueimp-load-image/js/load-image'), - require('./jquery.fileupload-process') - ); - } else { - // Browser globals: - factory( - window.jQuery, - window.loadImage - ); - } -}(function ($, loadImage) { - 'use strict'; - - // Prepend to the default processQueue: - $.blueimp.fileupload.prototype.options.processQueue.unshift( - { - action: 'loadVideo', - // Use the action as prefix for the "@" options: - prefix: true, - fileTypes: '@', - maxFileSize: '@', - disabled: '@disableVideoPreview' - }, - { - action: 'setVideo', - name: '@videoPreviewName', - disabled: '@disableVideoPreview' - } - ); - - // The File Upload Video Preview plugin extends the fileupload widget - // with video preview functionality: - $.widget('blueimp.fileupload', $.blueimp.fileupload, { - - options: { - // The regular expression for the types of video files to load, - // matched against the file type: - loadVideoFileTypes: /^video\/.*$/ - }, - - _videoElement: document.createElement('video'), - - processActions: { - - // Loads the video file given via data.files and data.index - // as video element if the browser supports playing it. - // Accepts the options fileTypes (regular expression) - // and maxFileSize (integer) to limit the files to load: - loadVideo: function (data, options) { - if (options.disabled) { - return data; - } - var file = data.files[data.index], - url, - video; - if (this._videoElement.canPlayType && - this._videoElement.canPlayType(file.type) && - ($.type(options.maxFileSize) !== 'number' || - file.size <= options.maxFileSize) && - (!options.fileTypes || - options.fileTypes.test(file.type))) { - url = loadImage.createObjectURL(file); - if (url) { - video = this._videoElement.cloneNode(false); - video.src = url; - video.controls = true; - data.video = video; - return data; - } - } - return data; - }, - - // Sets the video element as a property of the file object: - setVideo: function (data, options) { - if (data.video && !options.disabled) { - data.files[data.index][options.name || 'preview'] = data.video; - } - return data; - } - - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.fileupload.js b/libraries/filemanager-9.12.1/js/jquery.fileupload.js deleted file mode 100644 index f20bc6d..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.fileupload.js +++ /dev/null @@ -1,1482 +0,0 @@ -/* - * jQuery File Upload Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2010, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* jshint nomen:false */ -/* global define, require, window, document, location, Blob, FormData */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define([ - 'jquery', - 'jquery-ui/ui/widget' - ], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory( - require('jquery'), - require('./vendor/jquery.ui.widget') - ); - } else { - // Browser globals: - factory(window.jQuery); - } -}(function ($) { - 'use strict'; - - // Detect file input support, based on - // http://viljamis.com/blog/2012/file-upload-support-on-mobile/ - $.support.fileInput = !(new RegExp( - // Handle devices which give false positives for the feature detection: - '(Android (1\\.[0156]|2\\.[01]))' + - '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' + - '|(w(eb)?OSBrowser)|(webOS)' + - '|(Kindle/(1\\.0|2\\.[05]|3\\.0))' - ).test(window.navigator.userAgent) || - // Feature detection for all other devices: - $('').prop('disabled')); - - // The FileReader API is not actually used, but works as feature detection, - // as some Safari versions (5?) support XHR file uploads via the FormData API, - // but not non-multipart XHR file uploads. - // window.XMLHttpRequestUpload is not available on IE10, so we check for - // window.ProgressEvent instead to detect XHR2 file upload capability: - $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader); - $.support.xhrFormDataFileUpload = !!window.FormData; - - // Detect support for Blob slicing (required for chunked uploads): - $.support.blobSlice = window.Blob && (Blob.prototype.slice || - Blob.prototype.webkitSlice || Blob.prototype.mozSlice); - - // Helper function to create drag handlers for dragover/dragenter/dragleave: - function getDragHandler(type) { - var isDragOver = type === 'dragover'; - return function (e) { - e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; - var dataTransfer = e.dataTransfer; - if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 && - this._trigger( - type, - $.Event(type, {delegatedEvent: e}) - ) !== false) { - e.preventDefault(); - if (isDragOver) { - dataTransfer.dropEffect = 'copy'; - } - } - }; - } - - // The fileupload widget listens for change events on file input fields defined - // via fileInput setting and paste or drop events of the given dropZone. - // In addition to the default jQuery Widget methods, the fileupload widget - // exposes the "add" and "send" methods, to add or directly send files using - // the fileupload API. - // By default, files added via file input selection, paste, drag & drop or - // "add" method are uploaded immediately, but it is possible to override - // the "add" callback option to queue file uploads. - $.widget('blueimp.fileupload', { - - options: { - // The drop target element(s), by the default the complete document. - // Set to null to disable drag & drop support: - dropZone: $(document), - // The paste target element(s), by the default undefined. - // Set to a DOM node or jQuery object to enable file pasting: - pasteZone: undefined, - // The file input field(s), that are listened to for change events. - // If undefined, it is set to the file input fields inside - // of the widget element on plugin initialization. - // Set to null to disable the change listener. - fileInput: undefined, - // By default, the file input field is replaced with a clone after - // each input field change event. This is required for iframe transport - // queues and allows change events to be fired for the same file - // selection, but can be disabled by setting the following option to false: - replaceFileInput: true, - // The parameter name for the file form data (the request argument name). - // If undefined or empty, the name property of the file input field is - // used, or "files[]" if the file input name property is also empty, - // can be a string or an array of strings: - paramName: undefined, - // By default, each file of a selection is uploaded using an individual - // request for XHR type uploads. Set to false to upload file - // selections in one request each: - singleFileUploads: true, - // To limit the number of files uploaded with one XHR request, - // set the following option to an integer greater than 0: - limitMultiFileUploads: undefined, - // The following option limits the number of files uploaded with one - // XHR request to keep the request size under or equal to the defined - // limit in bytes: - limitMultiFileUploadSize: undefined, - // Multipart file uploads add a number of bytes to each uploaded file, - // therefore the following option adds an overhead for each file used - // in the limitMultiFileUploadSize configuration: - limitMultiFileUploadSizeOverhead: 512, - // Set the following option to true to issue all file upload requests - // in a sequential order: - sequentialUploads: false, - // To limit the number of concurrent uploads, - // set the following option to an integer greater than 0: - limitConcurrentUploads: undefined, - // Set the following option to true to force iframe transport uploads: - forceIframeTransport: false, - // Set the following option to the location of a redirect url on the - // origin server, for cross-domain iframe transport uploads: - redirect: undefined, - // The parameter name for the redirect url, sent as part of the form - // data and set to 'redirect' if this option is empty: - redirectParamName: undefined, - // Set the following option to the location of a postMessage window, - // to enable postMessage transport uploads: - postMessage: undefined, - // By default, XHR file uploads are sent as multipart/form-data. - // The iframe transport is always using multipart/form-data. - // Set to false to enable non-multipart XHR uploads: - multipart: true, - // To upload large files in smaller chunks, set the following option - // to a preferred maximum chunk size. If set to 0, null or undefined, - // or the browser does not support the required Blob API, files will - // be uploaded as a whole. - maxChunkSize: undefined, - // When a non-multipart upload or a chunked multipart upload has been - // aborted, this option can be used to resume the upload by setting - // it to the size of the already uploaded bytes. This option is most - // useful when modifying the options object inside of the "add" or - // "send" callbacks, as the options are cloned for each file upload. - uploadedBytes: undefined, - // By default, failed (abort or error) file uploads are removed from the - // global progress calculation. Set the following option to false to - // prevent recalculating the global progress data: - recalculateProgress: true, - // Interval in milliseconds to calculate and trigger progress events: - progressInterval: 100, - // Interval in milliseconds to calculate progress bitrate: - bitrateInterval: 500, - // By default, uploads are started automatically when adding files: - autoUpload: true, - - // Error and info messages: - messages: { - uploadedBytes: 'Uploaded bytes exceed file size' - }, - - // Translation function, gets the message key to be translated - // and an object with context specific data as arguments: - i18n: function (message, context) { - message = this.messages[message] || message.toString(); - if (context) { - $.each(context, function (key, value) { - message = message.replace('{' + key + '}', value); - }); - } - return message; - }, - - // Additional form data to be sent along with the file uploads can be set - // using this option, which accepts an array of objects with name and - // value properties, a function returning such an array, a FormData - // object (for XHR file uploads), or a simple object. - // The form of the first fileInput is given as parameter to the function: - formData: function (form) { - return form.serializeArray(); - }, - - // The add callback is invoked as soon as files are added to the fileupload - // widget (via file input selection, drag & drop, paste or add API call). - // If the singleFileUploads option is enabled, this callback will be - // called once for each file in the selection for XHR file uploads, else - // once for each file selection. - // - // The upload starts when the submit method is invoked on the data parameter. - // The data object contains a files property holding the added files - // and allows you to override plugin options as well as define ajax settings. - // - // Listeners for this callback can also be bound the following way: - // .bind('fileuploadadd', func); - // - // data.submit() returns a Promise object and allows to attach additional - // handlers using jQuery's Deferred callbacks: - // data.submit().done(func).fail(func).always(func); - add: function (e, data) { - if (e.isDefaultPrevented()) { - return false; - } - if (data.autoUpload || (data.autoUpload !== false && - $(this).fileupload('option', 'autoUpload'))) { - data.process().done(function () { - data.submit(); - }); - } - }, - - // Other callbacks: - - // Callback for the submit event of each file upload: - // submit: function (e, data) {}, // .bind('fileuploadsubmit', func); - - // Callback for the start of each file upload request: - // send: function (e, data) {}, // .bind('fileuploadsend', func); - - // Callback for successful uploads: - // done: function (e, data) {}, // .bind('fileuploaddone', func); - - // Callback for failed (abort or error) uploads: - // fail: function (e, data) {}, // .bind('fileuploadfail', func); - - // Callback for completed (success, abort or error) requests: - // always: function (e, data) {}, // .bind('fileuploadalways', func); - - // Callback for upload progress events: - // progress: function (e, data) {}, // .bind('fileuploadprogress', func); - - // Callback for global upload progress events: - // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func); - - // Callback for uploads start, equivalent to the global ajaxStart event: - // start: function (e) {}, // .bind('fileuploadstart', func); - - // Callback for uploads stop, equivalent to the global ajaxStop event: - // stop: function (e) {}, // .bind('fileuploadstop', func); - - // Callback for change events of the fileInput(s): - // change: function (e, data) {}, // .bind('fileuploadchange', func); - - // Callback for paste events to the pasteZone(s): - // paste: function (e, data) {}, // .bind('fileuploadpaste', func); - - // Callback for drop events of the dropZone(s): - // drop: function (e, data) {}, // .bind('fileuploaddrop', func); - - // Callback for dragover events of the dropZone(s): - // dragover: function (e) {}, // .bind('fileuploaddragover', func); - - // Callback for the start of each chunk upload request: - // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func); - - // Callback for successful chunk uploads: - // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func); - - // Callback for failed (abort or error) chunk uploads: - // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func); - - // Callback for completed (success, abort or error) chunk upload requests: - // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func); - - // The plugin options are used as settings object for the ajax calls. - // The following are jQuery ajax settings required for the file uploads: - processData: false, - contentType: false, - cache: false, - timeout: 0 - }, - - // A list of options that require reinitializing event listeners and/or - // special initialization code: - _specialOptions: [ - 'fileInput', - 'dropZone', - 'pasteZone', - 'multipart', - 'forceIframeTransport' - ], - - _blobSlice: $.support.blobSlice && function () { - var slice = this.slice || this.webkitSlice || this.mozSlice; - return slice.apply(this, arguments); - }, - - _BitrateTimer: function () { - this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime()); - this.loaded = 0; - this.bitrate = 0; - this.getBitrate = function (now, loaded, interval) { - var timeDiff = now - this.timestamp; - if (!this.bitrate || !interval || timeDiff > interval) { - this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8; - this.loaded = loaded; - this.timestamp = now; - } - return this.bitrate; - }; - }, - - _isXHRUpload: function (options) { - return !options.forceIframeTransport && - ((!options.multipart && $.support.xhrFileUpload) || - $.support.xhrFormDataFileUpload); - }, - - _getFormData: function (options) { - var formData; - if ($.type(options.formData) === 'function') { - return options.formData(options.form); - } - if ($.isArray(options.formData)) { - return options.formData; - } - if ($.type(options.formData) === 'object') { - formData = []; - $.each(options.formData, function (name, value) { - formData.push({name: name, value: value}); - }); - return formData; - } - return []; - }, - - _getTotal: function (files) { - var total = 0; - $.each(files, function (index, file) { - total += file.size || 1; - }); - return total; - }, - - _initProgressObject: function (obj) { - var progress = { - loaded: 0, - total: 0, - bitrate: 0 - }; - if (obj._progress) { - $.extend(obj._progress, progress); - } else { - obj._progress = progress; - } - }, - - _initResponseObject: function (obj) { - var prop; - if (obj._response) { - for (prop in obj._response) { - if (obj._response.hasOwnProperty(prop)) { - delete obj._response[prop]; - } - } - } else { - obj._response = {}; - } - }, - - _onProgress: function (e, data) { - if (e.lengthComputable) { - var now = ((Date.now) ? Date.now() : (new Date()).getTime()), - loaded; - if (data._time && data.progressInterval && - (now - data._time < data.progressInterval) && - e.loaded !== e.total) { - return; - } - data._time = now; - loaded = Math.floor( - e.loaded / e.total * (data.chunkSize || data._progress.total) - ) + (data.uploadedBytes || 0); - // Add the difference from the previously loaded state - // to the global loaded counter: - this._progress.loaded += (loaded - data._progress.loaded); - this._progress.bitrate = this._bitrateTimer.getBitrate( - now, - this._progress.loaded, - data.bitrateInterval - ); - data._progress.loaded = data.loaded = loaded; - data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate( - now, - loaded, - data.bitrateInterval - ); - // Trigger a custom progress event with a total data property set - // to the file size(s) of the current upload and a loaded data - // property calculated accordingly: - this._trigger( - 'progress', - $.Event('progress', {delegatedEvent: e}), - data - ); - // Trigger a global progress event for all current file uploads, - // including ajax calls queued for sequential file uploads: - this._trigger( - 'progressall', - $.Event('progressall', {delegatedEvent: e}), - this._progress - ); - } - }, - - _initProgressListener: function (options) { - var that = this, - xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); - // Accesss to the native XHR object is required to add event listeners - // for the upload progress event: - if (xhr.upload) { - $(xhr.upload).bind('progress', function (e) { - var oe = e.originalEvent; - // Make sure the progress event properties get copied over: - e.lengthComputable = oe.lengthComputable; - e.loaded = oe.loaded; - e.total = oe.total; - that._onProgress(e, options); - }); - options.xhr = function () { - return xhr; - }; - } - }, - - _isInstanceOf: function (type, obj) { - // Cross-frame instanceof check - return Object.prototype.toString.call(obj) === '[object ' + type + ']'; - }, - - _initXHRData: function (options) { - var that = this, - formData, - file = options.files[0], - // Ignore non-multipart setting if not supported: - multipart = options.multipart || !$.support.xhrFileUpload, - paramName = $.type(options.paramName) === 'array' ? - options.paramName[0] : options.paramName; - options.headers = $.extend({}, options.headers); - if (options.contentRange) { - options.headers['Content-Range'] = options.contentRange; - } - if (!multipart || options.blob || !this._isInstanceOf('File', file)) { - options.headers['Content-Disposition'] = 'attachment; filename="' + - encodeURI(file.name) + '"'; - } - if (!multipart) { - options.contentType = file.type || 'application/octet-stream'; - options.data = options.blob || file; - } else if ($.support.xhrFormDataFileUpload) { - if (options.postMessage) { - // window.postMessage does not allow sending FormData - // objects, so we just add the File/Blob objects to - // the formData array and let the postMessage window - // create the FormData object out of this array: - formData = this._getFormData(options); - if (options.blob) { - formData.push({ - name: paramName, - value: options.blob - }); - } else { - $.each(options.files, function (index, file) { - formData.push({ - name: ($.type(options.paramName) === 'array' && - options.paramName[index]) || paramName, - value: file - }); - }); - } - } else { - if (that._isInstanceOf('FormData', options.formData)) { - formData = options.formData; - } else { - formData = new FormData(); - $.each(this._getFormData(options), function (index, field) { - formData.append(field.name, field.value); - }); - } - if (options.blob) { - formData.append(paramName, options.blob, file.name); - } else { - $.each(options.files, function (index, file) { - // This check allows the tests to run with - // dummy objects: - if (that._isInstanceOf('File', file) || - that._isInstanceOf('Blob', file)) { - formData.append( - ($.type(options.paramName) === 'array' && - options.paramName[index]) || paramName, - file, - file.uploadName || file.name - ); - } - }); - } - } - options.data = formData; - } - // Blob reference is not needed anymore, free memory: - options.blob = null; - }, - - _initIframeSettings: function (options) { - var targetHost = $('').prop('href', options.url).prop('host'); - // Setting the dataType to iframe enables the iframe transport: - options.dataType = 'iframe ' + (options.dataType || ''); - // The iframe transport accepts a serialized array as form data: - options.formData = this._getFormData(options); - // Add redirect url to form data on cross-domain uploads: - if (options.redirect && targetHost && targetHost !== location.host) { - options.formData.push({ - name: options.redirectParamName || 'redirect', - value: options.redirect - }); - } - }, - - _initDataSettings: function (options) { - if (this._isXHRUpload(options)) { - if (!this._chunkedUpload(options, true)) { - if (!options.data) { - this._initXHRData(options); - } - this._initProgressListener(options); - } - if (options.postMessage) { - // Setting the dataType to postmessage enables the - // postMessage transport: - options.dataType = 'postmessage ' + (options.dataType || ''); - } - } else { - this._initIframeSettings(options); - } - }, - - _getParamName: function (options) { - var fileInput = $(options.fileInput), - paramName = options.paramName; - if (!paramName) { - paramName = []; - fileInput.each(function () { - var input = $(this), - name = input.prop('name') || 'files[]', - i = (input.prop('files') || [1]).length; - while (i) { - paramName.push(name); - i -= 1; - } - }); - if (!paramName.length) { - paramName = [fileInput.prop('name') || 'files[]']; - } - } else if (!$.isArray(paramName)) { - paramName = [paramName]; - } - return paramName; - }, - - _initFormSettings: function (options) { - // Retrieve missing options from the input field and the - // associated form, if available: - if (!options.form || !options.form.length) { - options.form = $(options.fileInput.prop('form')); - // If the given file input doesn't have an associated form, - // use the default widget file input's form: - if (!options.form.length) { - options.form = $(this.options.fileInput.prop('form')); - } - } - options.paramName = this._getParamName(options); - if (!options.url) { - options.url = options.form.prop('action') || location.href; - } - // The HTTP request method must be "POST" or "PUT": - options.type = (options.type || - ($.type(options.form.prop('method')) === 'string' && - options.form.prop('method')) || '' - ).toUpperCase(); - if (options.type !== 'POST' && options.type !== 'PUT' && - options.type !== 'PATCH') { - options.type = 'POST'; - } - if (!options.formAcceptCharset) { - options.formAcceptCharset = options.form.attr('accept-charset'); - } - }, - - _getAJAXSettings: function (data) { - var options = $.extend({}, this.options, data); - this._initFormSettings(options); - this._initDataSettings(options); - return options; - }, - - // jQuery 1.6 doesn't provide .state(), - // while jQuery 1.8+ removed .isRejected() and .isResolved(): - _getDeferredState: function (deferred) { - if (deferred.state) { - return deferred.state(); - } - if (deferred.isResolved()) { - return 'resolved'; - } - if (deferred.isRejected()) { - return 'rejected'; - } - return 'pending'; - }, - - // Maps jqXHR callbacks to the equivalent - // methods of the given Promise object: - _enhancePromise: function (promise) { - promise.success = promise.done; - promise.error = promise.fail; - promise.complete = promise.always; - return promise; - }, - - // Creates and returns a Promise object enhanced with - // the jqXHR methods abort, success, error and complete: - _getXHRPromise: function (resolveOrReject, context, args) { - var dfd = $.Deferred(), - promise = dfd.promise(); - context = context || this.options.context || promise; - if (resolveOrReject === true) { - dfd.resolveWith(context, args); - } else if (resolveOrReject === false) { - dfd.rejectWith(context, args); - } - promise.abort = dfd.promise; - return this._enhancePromise(promise); - }, - - // Adds convenience methods to the data callback argument: - _addConvenienceMethods: function (e, data) { - var that = this, - getPromise = function (args) { - return $.Deferred().resolveWith(that, args).promise(); - }; - data.process = function (resolveFunc, rejectFunc) { - if (resolveFunc || rejectFunc) { - data._processQueue = this._processQueue = - (this._processQueue || getPromise([this])).then( - function () { - if (data.errorThrown) { - return $.Deferred() - .rejectWith(that, [data]).promise(); - } - return getPromise(arguments); - } - ).then(resolveFunc, rejectFunc); - } - return this._processQueue || getPromise([this]); - }; - data.submit = function () { - if (this.state() !== 'pending') { - data.jqXHR = this.jqXHR = - (that._trigger( - 'submit', - $.Event('submit', {delegatedEvent: e}), - this - ) !== false) && that._onSend(e, this); - } - return this.jqXHR || that._getXHRPromise(); - }; - data.abort = function () { - if (this.jqXHR) { - return this.jqXHR.abort(); - } - this.errorThrown = 'abort'; - that._trigger('fail', null, this); - return that._getXHRPromise(false); - }; - data.state = function () { - if (this.jqXHR) { - return that._getDeferredState(this.jqXHR); - } - if (this._processQueue) { - return that._getDeferredState(this._processQueue); - } - }; - data.processing = function () { - return !this.jqXHR && this._processQueue && that - ._getDeferredState(this._processQueue) === 'pending'; - }; - data.progress = function () { - return this._progress; - }; - data.response = function () { - return this._response; - }; - }, - - // Parses the Range header from the server response - // and returns the uploaded bytes: - _getUploadedBytes: function (jqXHR) { - var range = jqXHR.getResponseHeader('Range'), - parts = range && range.split('-'), - upperBytesPos = parts && parts.length > 1 && - parseInt(parts[1], 10); - return upperBytesPos && upperBytesPos + 1; - }, - - // Uploads a file in multiple, sequential requests - // by splitting the file up in multiple blob chunks. - // If the second parameter is true, only tests if the file - // should be uploaded in chunks, but does not invoke any - // upload requests: - _chunkedUpload: function (options, testOnly) { - options.uploadedBytes = options.uploadedBytes || 0; - var that = this, - file = options.files[0], - fs = file.size, - ub = options.uploadedBytes, - mcs = options.maxChunkSize || fs, - slice = this._blobSlice, - dfd = $.Deferred(), - promise = dfd.promise(), - jqXHR, - upload; - if (!(this._isXHRUpload(options) && slice && (ub || ($.type(mcs) === 'function' ? mcs(options) : mcs) < fs)) || - options.data) { - return false; - } - if (testOnly) { - return true; - } - if (ub >= fs) { - file.error = options.i18n('uploadedBytes'); - return this._getXHRPromise( - false, - options.context, - [null, 'error', file.error] - ); - } - // The chunk upload method: - upload = function () { - // Clone the options object for each chunk upload: - var o = $.extend({}, options), - currentLoaded = o._progress.loaded; - o.blob = slice.call( - file, - ub, - ub + ($.type(mcs) === 'function' ? mcs(o) : mcs), - file.type - ); - // Store the current chunk size, as the blob itself - // will be dereferenced after data processing: - o.chunkSize = o.blob.size; - // Expose the chunk bytes position range: - o.contentRange = 'bytes ' + ub + '-' + - (ub + o.chunkSize - 1) + '/' + fs; - // Process the upload data (the blob and potential form data): - that._initXHRData(o); - // Add progress listeners for this chunk upload: - that._initProgressListener(o); - jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) || - that._getXHRPromise(false, o.context)) - .done(function (result, textStatus, jqXHR) { - ub = that._getUploadedBytes(jqXHR) || - (ub + o.chunkSize); - // Create a progress event if no final progress event - // with loaded equaling total has been triggered - // for this chunk: - if (currentLoaded + o.chunkSize - o._progress.loaded) { - that._onProgress($.Event('progress', { - lengthComputable: true, - loaded: ub - o.uploadedBytes, - total: ub - o.uploadedBytes - }), o); - } - options.uploadedBytes = o.uploadedBytes = ub; - o.result = result; - o.textStatus = textStatus; - o.jqXHR = jqXHR; - that._trigger('chunkdone', null, o); - that._trigger('chunkalways', null, o); - if (ub < fs) { - // File upload not yet complete, - // continue with the next chunk: - upload(); - } else { - dfd.resolveWith( - o.context, - [result, textStatus, jqXHR] - ); - } - }) - .fail(function (jqXHR, textStatus, errorThrown) { - o.jqXHR = jqXHR; - o.textStatus = textStatus; - o.errorThrown = errorThrown; - that._trigger('chunkfail', null, o); - that._trigger('chunkalways', null, o); - dfd.rejectWith( - o.context, - [jqXHR, textStatus, errorThrown] - ); - }); - }; - this._enhancePromise(promise); - promise.abort = function () { - return jqXHR.abort(); - }; - upload(); - return promise; - }, - - _beforeSend: function (e, data) { - if (this._active === 0) { - // the start callback is triggered when an upload starts - // and no other uploads are currently running, - // equivalent to the global ajaxStart event: - this._trigger('start'); - // Set timer for global bitrate progress calculation: - this._bitrateTimer = new this._BitrateTimer(); - // Reset the global progress values: - this._progress.loaded = this._progress.total = 0; - this._progress.bitrate = 0; - } - // Make sure the container objects for the .response() and - // .progress() methods on the data object are available - // and reset to their initial state: - this._initResponseObject(data); - this._initProgressObject(data); - data._progress.loaded = data.loaded = data.uploadedBytes || 0; - data._progress.total = data.total = this._getTotal(data.files) || 1; - data._progress.bitrate = data.bitrate = 0; - this._active += 1; - // Initialize the global progress values: - this._progress.loaded += data.loaded; - this._progress.total += data.total; - }, - - _onDone: function (result, textStatus, jqXHR, options) { - var total = options._progress.total, - response = options._response; - if (options._progress.loaded < total) { - // Create a progress event if no final progress event - // with loaded equaling total has been triggered: - this._onProgress($.Event('progress', { - lengthComputable: true, - loaded: total, - total: total - }), options); - } - response.result = options.result = result; - response.textStatus = options.textStatus = textStatus; - response.jqXHR = options.jqXHR = jqXHR; - this._trigger('done', null, options); - }, - - _onFail: function (jqXHR, textStatus, errorThrown, options) { - var response = options._response; - if (options.recalculateProgress) { - // Remove the failed (error or abort) file upload from - // the global progress calculation: - this._progress.loaded -= options._progress.loaded; - this._progress.total -= options._progress.total; - } - response.jqXHR = options.jqXHR = jqXHR; - response.textStatus = options.textStatus = textStatus; - response.errorThrown = options.errorThrown = errorThrown; - this._trigger('fail', null, options); - }, - - _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) { - // jqXHRorResult, textStatus and jqXHRorError are added to the - // options object via done and fail callbacks - this._trigger('always', null, options); - }, - - _onSend: function (e, data) { - if (!data.submit) { - this._addConvenienceMethods(e, data); - } - var that = this, - jqXHR, - aborted, - slot, - pipe, - options = that._getAJAXSettings(data), - send = function () { - that._sending += 1; - // Set timer for bitrate progress calculation: - options._bitrateTimer = new that._BitrateTimer(); - jqXHR = jqXHR || ( - ((aborted || that._trigger( - 'send', - $.Event('send', {delegatedEvent: e}), - options - ) === false) && - that._getXHRPromise(false, options.context, aborted)) || - that._chunkedUpload(options) || $.ajax(options) - ).done(function (result, textStatus, jqXHR) { - that._onDone(result, textStatus, jqXHR, options); - }).fail(function (jqXHR, textStatus, errorThrown) { - that._onFail(jqXHR, textStatus, errorThrown, options); - }).always(function (jqXHRorResult, textStatus, jqXHRorError) { - that._onAlways( - jqXHRorResult, - textStatus, - jqXHRorError, - options - ); - that._sending -= 1; - that._active -= 1; - if (options.limitConcurrentUploads && - options.limitConcurrentUploads > that._sending) { - // Start the next queued upload, - // that has not been aborted: - var nextSlot = that._slots.shift(); - while (nextSlot) { - if (that._getDeferredState(nextSlot) === 'pending') { - nextSlot.resolve(); - break; - } - nextSlot = that._slots.shift(); - } - } - if (that._active === 0) { - // The stop callback is triggered when all uploads have - // been completed, equivalent to the global ajaxStop event: - that._trigger('stop'); - } - }); - return jqXHR; - }; - this._beforeSend(e, options); - if (this.options.sequentialUploads || - (this.options.limitConcurrentUploads && - this.options.limitConcurrentUploads <= this._sending)) { - if (this.options.limitConcurrentUploads > 1) { - slot = $.Deferred(); - this._slots.push(slot); - pipe = slot.then(send); - } else { - this._sequence = this._sequence.then(send, send); - pipe = this._sequence; - } - // Return the piped Promise object, enhanced with an abort method, - // which is delegated to the jqXHR object of the current upload, - // and jqXHR callbacks mapped to the equivalent Promise methods: - pipe.abort = function () { - aborted = [undefined, 'abort', 'abort']; - if (!jqXHR) { - if (slot) { - slot.rejectWith(options.context, aborted); - } - return send(); - } - return jqXHR.abort(); - }; - return this._enhancePromise(pipe); - } - return send(); - }, - - _onAdd: function (e, data) { - var that = this, - result = true, - options = $.extend({}, this.options, data), - files = data.files, - filesLength = files.length, - limit = options.limitMultiFileUploads, - limitSize = options.limitMultiFileUploadSize, - overhead = options.limitMultiFileUploadSizeOverhead, - batchSize = 0, - paramName = this._getParamName(options), - paramNameSet, - paramNameSlice, - fileSet, - i, - j = 0; - if (!filesLength) { - return false; - } - if (limitSize && files[0].size === undefined) { - limitSize = undefined; - } - if (!(options.singleFileUploads || limit || limitSize) || - !this._isXHRUpload(options)) { - fileSet = [files]; - paramNameSet = [paramName]; - } else if (!(options.singleFileUploads || limitSize) && limit) { - fileSet = []; - paramNameSet = []; - for (i = 0; i < filesLength; i += limit) { - fileSet.push(files.slice(i, i + limit)); - paramNameSlice = paramName.slice(i, i + limit); - if (!paramNameSlice.length) { - paramNameSlice = paramName; - } - paramNameSet.push(paramNameSlice); - } - } else if (!options.singleFileUploads && limitSize) { - fileSet = []; - paramNameSet = []; - for (i = 0; i < filesLength; i = i + 1) { - batchSize += files[i].size + overhead; - if (i + 1 === filesLength || - ((batchSize + files[i + 1].size + overhead) > limitSize) || - (limit && i + 1 - j >= limit)) { - fileSet.push(files.slice(j, i + 1)); - paramNameSlice = paramName.slice(j, i + 1); - if (!paramNameSlice.length) { - paramNameSlice = paramName; - } - paramNameSet.push(paramNameSlice); - j = i + 1; - batchSize = 0; - } - } - } else { - paramNameSet = paramName; - } - data.originalFiles = files; - $.each(fileSet || files, function (index, element) { - var newData = $.extend({}, data); - newData.files = fileSet ? element : [element]; - newData.paramName = paramNameSet[index]; - that._initResponseObject(newData); - that._initProgressObject(newData); - that._addConvenienceMethods(e, newData); - result = that._trigger( - 'add', - $.Event('add', {delegatedEvent: e}), - newData - ); - return result; - }); - return result; - }, - - _replaceFileInput: function (data) { - var input = data.fileInput, - inputClone = input.clone(true), - restoreFocus = input.is(document.activeElement); - // Add a reference for the new cloned file input to the data argument: - data.fileInputClone = inputClone; - $('
    ').append(inputClone)[0].reset(); - // Detaching allows to insert the fileInput on another form - // without loosing the file input value: - input.after(inputClone).detach(); - // If the fileInput had focus before it was detached, - // restore focus to the inputClone. - if (restoreFocus) { - inputClone.focus(); - } - // Avoid memory leaks with the detached file input: - $.cleanData(input.unbind('remove')); - // Replace the original file input element in the fileInput - // elements set with the clone, which has been copied including - // event handlers: - this.options.fileInput = this.options.fileInput.map(function (i, el) { - if (el === input[0]) { - return inputClone[0]; - } - return el; - }); - // If the widget has been initialized on the file input itself, - // override this.element with the file input clone: - if (input[0] === this.element[0]) { - this.element = inputClone; - } - }, - - _handleFileTreeEntry: function (entry, path) { - var that = this, - dfd = $.Deferred(), - entries = [], - dirReader, - errorHandler = function (e) { - if (e && !e.entry) { - e.entry = entry; - } - // Since $.when returns immediately if one - // Deferred is rejected, we use resolve instead. - // This allows valid files and invalid items - // to be returned together in one set: - dfd.resolve([e]); - }, - successHandler = function (entries) { - that._handleFileTreeEntries( - entries, - path + entry.name + '/' - ).done(function (files) { - dfd.resolve(files); - }).fail(errorHandler); - }, - readEntries = function () { - dirReader.readEntries(function (results) { - if (!results.length) { - successHandler(entries); - } else { - entries = entries.concat(results); - readEntries(); - } - }, errorHandler); - }; - path = path || ''; - if (entry.isFile) { - if (entry._file) { - // Workaround for Chrome bug #149735 - entry._file.relativePath = path; - dfd.resolve(entry._file); - } else { - entry.file(function (file) { - file.relativePath = path; - dfd.resolve(file); - }, errorHandler); - } - } else if (entry.isDirectory) { - dirReader = entry.createReader(); - readEntries(); - } else { - // Return an empy list for file system items - // other than files or directories: - dfd.resolve([]); - } - return dfd.promise(); - }, - - _handleFileTreeEntries: function (entries, path) { - var that = this; - return $.when.apply( - $, - $.map(entries, function (entry) { - return that._handleFileTreeEntry(entry, path); - }) - ).then(function () { - return Array.prototype.concat.apply( - [], - arguments - ); - }); - }, - - _getDroppedFiles: function (dataTransfer) { - dataTransfer = dataTransfer || {}; - var items = dataTransfer.items; - if (items && items.length && (items[0].webkitGetAsEntry || - items[0].getAsEntry)) { - return this._handleFileTreeEntries( - $.map(items, function (item) { - var entry; - if (item.webkitGetAsEntry) { - entry = item.webkitGetAsEntry(); - if (entry) { - // Workaround for Chrome bug #149735: - entry._file = item.getAsFile(); - } - return entry; - } - return item.getAsEntry(); - }) - ); - } - return $.Deferred().resolve( - $.makeArray(dataTransfer.files) - ).promise(); - }, - - _getSingleFileInputFiles: function (fileInput) { - fileInput = $(fileInput); - var entries = fileInput.prop('webkitEntries') || - fileInput.prop('entries'), - files, - value; - if (entries && entries.length) { - return this._handleFileTreeEntries(entries); - } - files = $.makeArray(fileInput.prop('files')); - if (!files.length) { - value = fileInput.prop('value'); - if (!value) { - return $.Deferred().resolve([]).promise(); - } - // If the files property is not available, the browser does not - // support the File API and we add a pseudo File object with - // the input value as name with path information removed: - files = [{name: value.replace(/^.*\\/, '')}]; - } else if (files[0].name === undefined && files[0].fileName) { - // File normalization for Safari 4 and Firefox 3: - $.each(files, function (index, file) { - file.name = file.fileName; - file.size = file.fileSize; - }); - } - return $.Deferred().resolve(files).promise(); - }, - - _getFileInputFiles: function (fileInput) { - if (!(fileInput instanceof $) || fileInput.length === 1) { - return this._getSingleFileInputFiles(fileInput); - } - return $.when.apply( - $, - $.map(fileInput, this._getSingleFileInputFiles) - ).then(function () { - return Array.prototype.concat.apply( - [], - arguments - ); - }); - }, - - _onChange: function (e) { - var that = this, - data = { - fileInput: $(e.target), - form: $(e.target.form) - }; - this._getFileInputFiles(data.fileInput).always(function (files) { - data.files = files; - if (that.options.replaceFileInput) { - that._replaceFileInput(data); - } - if (that._trigger( - 'change', - $.Event('change', {delegatedEvent: e}), - data - ) !== false) { - that._onAdd(e, data); - } - }); - }, - - _onPaste: function (e) { - var items = e.originalEvent && e.originalEvent.clipboardData && - e.originalEvent.clipboardData.items, - data = {files: []}; - if (items && items.length) { - $.each(items, function (index, item) { - var file = item.getAsFile && item.getAsFile(); - if (file) { - data.files.push(file); - } - }); - if (this._trigger( - 'paste', - $.Event('paste', {delegatedEvent: e}), - data - ) !== false) { - this._onAdd(e, data); - } - } - }, - - _onDrop: function (e) { - e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; - var that = this, - dataTransfer = e.dataTransfer, - data = {}; - if (dataTransfer && dataTransfer.files && dataTransfer.files.length) { - e.preventDefault(); - this._getDroppedFiles(dataTransfer).always(function (files) { - data.files = files; - if (that._trigger( - 'drop', - $.Event('drop', {delegatedEvent: e}), - data - ) !== false) { - that._onAdd(e, data); - } - }); - } - }, - - _onDragOver: getDragHandler('dragover'), - - _onDragEnter: getDragHandler('dragenter'), - - _onDragLeave: getDragHandler('dragleave'), - - _initEventHandlers: function () { - if (this._isXHRUpload(this.options)) { - this._on(this.options.dropZone, { - dragover: this._onDragOver, - drop: this._onDrop, - // event.preventDefault() on dragenter is required for IE10+: - dragenter: this._onDragEnter, - // dragleave is not required, but added for completeness: - dragleave: this._onDragLeave - }); - this._on(this.options.pasteZone, { - paste: this._onPaste - }); - } - if ($.support.fileInput) { - this._on(this.options.fileInput, { - change: this._onChange - }); - } - }, - - _destroyEventHandlers: function () { - this._off(this.options.dropZone, 'dragenter dragleave dragover drop'); - this._off(this.options.pasteZone, 'paste'); - this._off(this.options.fileInput, 'change'); - }, - - _destroy: function () { - this._destroyEventHandlers(); - }, - - _setOption: function (key, value) { - var reinit = $.inArray(key, this._specialOptions) !== -1; - if (reinit) { - this._destroyEventHandlers(); - } - this._super(key, value); - if (reinit) { - this._initSpecialOptions(); - this._initEventHandlers(); - } - }, - - _initSpecialOptions: function () { - var options = this.options; - if (options.fileInput === undefined) { - options.fileInput = this.element.is('input[type="file"]') ? - this.element : this.element.find('input[type="file"]'); - } else if (!(options.fileInput instanceof $)) { - options.fileInput = $(options.fileInput); - } - if (!(options.dropZone instanceof $)) { - options.dropZone = $(options.dropZone); - } - if (!(options.pasteZone instanceof $)) { - options.pasteZone = $(options.pasteZone); - } - }, - - _getRegExp: function (str) { - var parts = str.split('/'), - modifiers = parts.pop(); - parts.shift(); - return new RegExp(parts.join('/'), modifiers); - }, - - _isRegExpOption: function (key, value) { - return key !== 'url' && $.type(value) === 'string' && - /^\/.*\/[igm]{0,3}$/.test(value); - }, - - _initDataAttributes: function () { - var that = this, - options = this.options, - data = this.element.data(); - // Initialize options set via HTML5 data-attributes: - $.each( - this.element[0].attributes, - function (index, attr) { - var key = attr.name.toLowerCase(), - value; - if (/^data-/.test(key)) { - // Convert hyphen-ated key to camelCase: - key = key.slice(5).replace(/-[a-z]/g, function (str) { - return str.charAt(1).toUpperCase(); - }); - value = data[key]; - if (that._isRegExpOption(key, value)) { - value = that._getRegExp(value); - } - options[key] = value; - } - } - ); - }, - - _create: function () { - this._initDataAttributes(); - this._initSpecialOptions(); - this._slots = []; - this._sequence = this._getXHRPromise(true); - this._sending = this._active = 0; - this._initProgressObject(this); - this._initEventHandlers(); - }, - - // This method is exposed to the widget API and allows to query - // the number of active uploads: - active: function () { - return this._active; - }, - - // This method is exposed to the widget API and allows to query - // the widget upload progress. - // It returns an object with loaded, total and bitrate properties - // for the running uploads: - progress: function () { - return this._progress; - }, - - // This method is exposed to the widget API and allows adding files - // using the fileupload API. The data parameter accepts an object which - // must have a files property and can contain additional options: - // .fileupload('add', {files: filesList}); - add: function (data) { - var that = this; - if (!data || this.options.disabled) { - return; - } - if (data.fileInput && !data.files) { - this._getFileInputFiles(data.fileInput).always(function (files) { - data.files = files; - that._onAdd(null, data); - }); - } else { - data.files = $.makeArray(data.files); - this._onAdd(null, data); - } - }, - - // This method is exposed to the widget API and allows sending files - // using the fileupload API. The data parameter accepts an object which - // must have a files or fileInput property and can contain additional options: - // .fileupload('send', {files: filesList}); - // The method returns a Promise object for the file upload call. - send: function (data) { - if (data && !this.options.disabled) { - if (data.fileInput && !data.files) { - var that = this, - dfd = $.Deferred(), - promise = dfd.promise(), - jqXHR, - aborted; - promise.abort = function () { - aborted = true; - if (jqXHR) { - return jqXHR.abort(); - } - dfd.reject(null, 'abort', 'abort'); - return promise; - }; - this._getFileInputFiles(data.fileInput).always( - function (files) { - if (aborted) { - return; - } - if (!files.length) { - dfd.reject(); - return; - } - data.files = files; - jqXHR = that._onSend(null, data); - jqXHR.then( - function (result, textStatus, jqXHR) { - dfd.resolve(result, textStatus, jqXHR); - }, - function (jqXHR, textStatus, errorThrown) { - dfd.reject(jqXHR, textStatus, errorThrown); - } - ); - } - ); - return this._enhancePromise(promise); - } - data.files = $.makeArray(data.files); - if (data.files.length) { - return this._onSend(null, data); - } - } - return this._getXHRPromise(false, data && data.context); - } - - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/jquery.iframe-transport.js b/libraries/filemanager-9.12.1/js/jquery.iframe-transport.js deleted file mode 100644 index 8d25c46..0000000 --- a/libraries/filemanager-9.12.1/js/jquery.iframe-transport.js +++ /dev/null @@ -1,224 +0,0 @@ -/* - * jQuery Iframe Transport Plugin - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - */ - -/* global define, require, window, document, JSON */ - -;(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - // Register as an anonymous AMD module: - define(['jquery'], factory); - } else if (typeof exports === 'object') { - // Node/CommonJS: - factory(require('jquery')); - } else { - // Browser globals: - factory(window.jQuery); - } -}(function ($) { - 'use strict'; - - // Helper variable to create unique names for the transport iframes: - var counter = 0, - jsonAPI = $, - jsonParse = 'parseJSON'; - - if ('JSON' in window && 'parse' in JSON) { - jsonAPI = JSON; - jsonParse = 'parse'; - } - - // The iframe transport accepts four additional options: - // options.fileInput: a jQuery collection of file input fields - // options.paramName: the parameter name for the file form data, - // overrides the name property of the file input field(s), - // can be a string or an array of strings. - // options.formData: an array of objects with name and value properties, - // equivalent to the return data of .serializeArray(), e.g.: - // [{name: 'a', value: 1}, {name: 'b', value: 2}] - // options.initialIframeSrc: the URL of the initial iframe src, - // by default set to "javascript:false;" - $.ajaxTransport('iframe', function (options) { - if (options.async) { - // javascript:false as initial iframe src - // prevents warning popups on HTTPS in IE6: - /*jshint scripturl: true */ - var initialIframeSrc = options.initialIframeSrc || 'javascript:false;', - /*jshint scripturl: false */ - form, - iframe, - addParamChar; - return { - send: function (_, completeCallback) { - form = $('
    '); - form.attr('accept-charset', options.formAcceptCharset); - addParamChar = /\?/.test(options.url) ? '&' : '?'; - // XDomainRequest only supports GET and POST: - if (options.type === 'DELETE') { - options.url = options.url + addParamChar + '_method=DELETE'; - options.type = 'POST'; - } else if (options.type === 'PUT') { - options.url = options.url + addParamChar + '_method=PUT'; - options.type = 'POST'; - } else if (options.type === 'PATCH') { - options.url = options.url + addParamChar + '_method=PATCH'; - options.type = 'POST'; - } - // IE versions below IE8 cannot set the name property of - // elements that have already been added to the DOM, - // so we set the name along with the iframe HTML markup: - counter += 1; - iframe = $( - '' - ).bind('load', function () { - var fileInputClones, - paramNames = $.isArray(options.paramName) ? - options.paramName : [options.paramName]; - iframe - .unbind('load') - .bind('load', function () { - var response; - // Wrap in a try/catch block to catch exceptions thrown - // when trying to access cross-domain iframe contents: - try { - response = iframe.contents(); - // Google Chrome and Firefox do not throw an - // exception when calling iframe.contents() on - // cross-domain requests, so we unify the response: - if (!response.length || !response[0].firstChild) { - throw new Error(); - } - } catch (e) { - response = undefined; - } - // The complete callback returns the - // iframe content document as response object: - completeCallback( - 200, - 'success', - {'iframe': response} - ); - // Fix for IE endless progress bar activity bug - // (happens on form submits to iframe targets): - $('') - .appendTo(form); - window.setTimeout(function () { - // Removing the form in a setTimeout call - // allows Chrome's developer tools to display - // the response result - form.remove(); - }, 0); - }); - form - .prop('target', iframe.prop('name')) - .prop('action', options.url) - .prop('method', options.type); - if (options.formData) { - $.each(options.formData, function (index, field) { - $('') - .prop('name', field.name) - .val(field.value) - .appendTo(form); - }); - } - if (options.fileInput && options.fileInput.length && - options.type === 'POST') { - fileInputClones = options.fileInput.clone(); - // Insert a clone for each file input field: - options.fileInput.after(function (index) { - return fileInputClones[index]; - }); - if (options.paramName) { - options.fileInput.each(function (index) { - $(this).prop( - 'name', - paramNames[index] || options.paramName - ); - }); - } - // Appending the file input fields to the hidden form - // removes them from their original location: - form - .append(options.fileInput) - .prop('enctype', 'multipart/form-data') - // enctype must be set as encoding for IE: - .prop('encoding', 'multipart/form-data'); - // Remove the HTML5 form attribute from the input(s): - options.fileInput.removeAttr('form'); - } - form.submit(); - // Insert the file input fields at their original location - // by replacing the clones with the originals: - if (fileInputClones && fileInputClones.length) { - options.fileInput.each(function (index, input) { - var clone = $(fileInputClones[index]); - // Restore the original name and form properties: - $(input) - .prop('name', clone.prop('name')) - .attr('form', clone.attr('form')); - clone.replaceWith(input); - }); - } - }); - form.append(iframe).appendTo(document.body); - }, - abort: function () { - if (iframe) { - // javascript:false as iframe src aborts the request - // and prevents warning popups on HTTPS in IE6. - // concat is used to avoid the "Script URL" JSLint error: - iframe - .unbind('load') - .prop('src', initialIframeSrc); - } - if (form) { - form.remove(); - } - } - }; - } - }); - - // The iframe transport returns the iframe content document as response. - // The following adds converters from iframe to text, json, html, xml - // and script. - // Please note that the Content-Type for JSON responses has to be text/plain - // or text/html, if the browser doesn't include application/json in the - // Accept header, else IE will show a download dialog. - // The Content-Type for XML responses on the other hand has to be always - // application/xml or text/xml, so IE properly parses the XML response. - // See also - // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation - $.ajaxSetup({ - converters: { - 'iframe text': function (iframe) { - return iframe && $(iframe[0].body).text(); - }, - 'iframe json': function (iframe) { - return iframe && jsonAPI[jsonParse]($(iframe[0].body).text()); - }, - 'iframe html': function (iframe) { - return iframe && $(iframe[0].body).html(); - }, - 'iframe xml': function (iframe) { - var xmlDoc = iframe && iframe[0]; - return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc : - $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) || - $(xmlDoc.body).html()); - }, - 'iframe script': function (iframe) { - return iframe && $.globalEval($(iframe[0].body).text()); - } - } - }); - -})); diff --git a/libraries/filemanager-9.12.1/js/modernizr.custom.js b/libraries/filemanager-9.12.1/js/modernizr.custom.js deleted file mode 100644 index 2ec5cd3..0000000 --- a/libraries/filemanager-9.12.1/js/modernizr.custom.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Modernizr 2.7.1 (Custom Build) | MIT & BSD - * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load - */ -;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}function I(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},y=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e}),r.flexbox=function(){return H("flexWrap")},r.flexboxlegacy=function(){return H("boxDirection")},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){return!!a.openDatabase},r.indexedDB=function(){return!!H("indexedDB",a)},r.hashchange=function(){return y("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},r.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},r.rgba=function(){return B("background-color:rgba(150,255,150,.5)"),E(j.backgroundColor,"rgba")},r.hsla=function(){return B("background-color:hsla(120,40%,100%,.5)"),E(j.backgroundColor,"rgba")||E(j.backgroundColor,"hsla")},r.multiplebgs=function(){return B("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},r.backgroundsize=function(){return H("backgroundSize")},r.borderimage=function(){return H("borderImage")},r.borderradius=function(){return H("borderRadius")},r.boxshadow=function(){return H("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){return C("opacity:.55"),/^0.55$/.test(j.opacity)},r.cssanimations=function(){return H("animationName")},r.csscolumns=function(){return H("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return B((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),E(j.backgroundImage,"gradient")},r.cssreflections=function(){return H("boxReflect")},r.csstransforms=function(){return!!H("transform")},r.csstransforms3d=function(){var a=!!H("perspective");return a&&"webkitPerspective"in g.style&&x("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},r.csstransitions=function(){return H("transition")},r.fontface=function(){var a;return x('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},r.generatedcontent=function(){var a;return x(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},r.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},r.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache};for(var J in r)A(r,J)&&(w=J.toLowerCase(),e[w]=r[J](),u.push((e[w]?"":"no-")+w));return e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=y,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=x,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f= scrollHeight - offsetBottom) ? - 'bottom' : offsetTop != null && scrollTop <= offsetTop ? - 'top' : false - - if (this.affixed === affix) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? position.top - scrollTop : null - - this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) - } - - - /* AFFIX PLUGIN DEFINITION - * ======================= */ - - var old = $.fn.affix - - $.fn.affix = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('affix') - , options = typeof option == 'object' && option - if (!data) $this.data('affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.affix.Constructor = Affix - - $.fn.affix.defaults = { - offset: 0 - } - - - /* AFFIX NO CONFLICT - * ================= */ - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - /* AFFIX DATA-API - * ============== */ - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - , data = $spy.data() - - data.offset = data.offset || {} - - data.offsetBottom && (data.offset.bottom = data.offsetBottom) - data.offsetTop && (data.offset.top = data.offsetTop) - - $spy.affix(data) - }) - }) - - -}(window.jQuery); -/* ============================================================ - * bootstrap-dropdown.js v2.3.1 - * http://twitter.github.com/bootstrap/javascript.html#dropdowns - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* DROPDOWN CLASS DEFINITION - * ========================= */ - - var toggle = '[data-toggle=dropdown]' - , Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } - - Dropdown.prototype = { - - constructor: Dropdown - - , toggle: function (e) { - var $this = $(this) - , $parent - , isActive - - if ($this.is('.disabled, :disabled')) return - - $parent = getParent($this) - - isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - $parent.toggleClass('open') - } - - $this.focus() - - return false - } - - , keydown: function (e) { - var $this - , $items - , $active - , $parent - , isActive - , index - - if (!/(38|40|27)/.test(e.keyCode)) return - - $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - $parent = getParent($this) - - isActive = $parent.hasClass('open') - - if (!isActive || (isActive && e.keyCode == 27)) { - if (e.which == 27) $parent.find(toggle).focus() - return $this.click() - } - - $items = $('[role=menu] li:not(.divider):visible a', $parent) - - if (!$items.length) return - - index = $items.index($items.filter(':focus')) - - if (e.keyCode == 38 && index > 0) index-- // up - if (e.keyCode == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 - - $items - .eq(index) - .focus() - } - - } - - function clearMenus() { - $(toggle).each(function () { - getParent($(this)).removeClass('open') - }) - } - - function getParent($this) { - var selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = selector && $(selector) - - if (!$parent || !$parent.length) $parent = $this.parent() - - return $parent - } - - - /* DROPDOWN PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.dropdown - - $.fn.dropdown = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('dropdown') - if (!data) $this.data('dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.dropdown.Constructor = Dropdown - - - /* DROPDOWN NO CONFLICT - * ==================== */ - - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } - - - /* APPLY TO STANDARD DROPDOWN ELEMENTS - * =================================== */ - - $(document) - .on('click.dropdown.data-api', clearMenus) - .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.dropdown-menu', function (e) { e.stopPropagation() }) - .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) - .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) - -}(window.jQuery); - -/* ========================================================== - * bootstrap-alert.js v2.3.1 - * http://twitter.github.com/bootstrap/javascript.html#alerts - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* ALERT CLASS DEFINITION - * ====================== */ - - var dismiss = '[data-dismiss="alert"]' - , Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - - e && e.preventDefault() - - $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - - $parent.trigger(e = $.Event('close')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent - .trigger('closed') - .remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : - removeElement() - } - - - /* ALERT PLUGIN DEFINITION - * ======================= */ - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('alert') - if (!data) $this.data('alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - /* ALERT NO CONFLICT - * ================= */ - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - /* ALERT DATA-API - * ============== */ - - $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) - -}(window.jQuery); -/* ============================================================ - * bootstrap-button.js v2.3.1 - * http://twitter.github.com/bootstrap/javascript.html#buttons - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* BUTTON PUBLIC CLASS DEFINITION - * ============================== */ - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.button.defaults, options) - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - , $el = this.$element - , data = $el.data() - , val = $el.is('input') ? 'val' : 'html' - - state = state + 'Text' - data.resetText || $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) - }, 0) - } - - Button.prototype.toggle = function () { - var $parent = this.$element.closest('[data-toggle="buttons-radio"]') - - $parent && $parent - .find('.active') - .removeClass('active') - - this.$element.toggleClass('active') - } - - - /* BUTTON PLUGIN DEFINITION - * ======================== */ - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('button') - , options = typeof option == 'object' && option - if (!data) $this.data('button', (data = new Button(this, options))) - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.defaults = { - loadingText: 'loading...' - } - - $.fn.button.Constructor = Button - - - /* BUTTON NO CONFLICT - * ================== */ - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - /* BUTTON DATA-API - * =============== */ - - $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) - -}(window.jQuery); -/* ============================================================= - * bootstrap-collapse.js v2.3.1 - * http://twitter.github.com/bootstrap/javascript.html#collapse - * ============================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* COLLAPSE PUBLIC CLASS DEFINITION - * ================================ */ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.collapse.defaults, options) - - if (this.options.parent) { - this.$parent = $(this.options.parent) - } - - this.options.toggle && this.toggle() - } - - Collapse.prototype = { - - constructor: Collapse - - , dimension: function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - , show: function () { - var dimension - , scroll - , actives - , hasData - - if (this.transitioning || this.$element.hasClass('in')) return - - dimension = this.dimension() - scroll = $.camelCase(['scroll', dimension].join('-')) - actives = this.$parent && this.$parent.find('> .accordion-group > .in') - - if (actives && actives.length) { - hasData = actives.data('collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('collapse', null) - } - - this.$element[dimension](0) - this.transition('addClass', $.Event('show'), 'shown') - $.support.transition && this.$element[dimension](this.$element[0][scroll]) - } - - , hide: function () { - var dimension - if (this.transitioning || !this.$element.hasClass('in')) return - dimension = this.dimension() - this.reset(this.$element[dimension]()) - this.transition('removeClass', $.Event('hide'), 'hidden') - this.$element[dimension](0) - } - - , reset: function (size) { - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - [dimension](size || 'auto') - [0].offsetWidth - - this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') - - return this - } - - , transition: function (method, startEvent, completeEvent) { - var that = this - , complete = function () { - if (startEvent.type == 'show') that.reset() - that.transitioning = 0 - that.$element.trigger(completeEvent) - } - - this.$element.trigger(startEvent) - - if (startEvent.isDefaultPrevented()) return - - this.transitioning = 1 - - this.$element[method]('in') - - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : - complete() - } - - , toggle: function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - } - - - /* COLLAPSE PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.collapse - - $.fn.collapse = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('collapse') - , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) - if (!data) $this.data('collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.defaults = { - toggle: true - } - - $.fn.collapse.Constructor = Collapse - - - /* COLLAPSE NO CONFLICT - * ==================== */ - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - /* COLLAPSE DATA-API - * ================= */ - - $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) - -}(window.jQuery); -/* ========================================================= - * bootstrap-modal.js v2.3.1 - * http://twitter.github.com/bootstrap/javascript.html#modals - * ========================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* MODAL CLASS DEFINITION - * ====================== */ - - var Modal = function (element, options) { - this.options = options - this.$element = $(element) - .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) - this.options.remote && this.$element.find('.modal-body').load(this.options.remote) - } - - Modal.prototype = { - - constructor: Modal - - , toggle: function () { - return this[!this.isShown ? 'show' : 'hide']() - } - - , show: function () { - var that = this - , e = $.Event('show') - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - this.isShown = true - - this.escape() - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(document.body) //don't move modals dom position - } - - that.$element.show() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element - .addClass('in') - .attr('aria-hidden', false) - - that.enforceFocus() - - transition ? - that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : - that.$element.focus().trigger('shown') - - }) - } - - , hide: function (e) { - e && e.preventDefault() - - var that = this - - e = $.Event('hide') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - - $(document).off('focusin.modal') - - this.$element - .removeClass('in') - .attr('aria-hidden', true) - - $.support.transition && this.$element.hasClass('fade') ? - this.hideWithTransition() : - this.hideModal() - } - - , enforceFocus: function () { - var that = this - $(document).on('focusin.modal', function (e) { - if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { - that.$element.focus() - } - }) - } - - , escape: function () { - var that = this - if (this.isShown && this.options.keyboard) { - this.$element.on('keyup.dismiss.modal', function ( e ) { - e.which == 27 && that.hide() - }) - } else if (!this.isShown) { - this.$element.off('keyup.dismiss.modal') - } - } - - , hideWithTransition: function () { - var that = this - , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) - that.hideModal() - }, 500) - - this.$element.one($.support.transition.end, function () { - clearTimeout(timeout) - that.hideModal() - }) - } - - , hideModal: function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.removeBackdrop() - that.$element.trigger('hidden') - }) - } - - , removeBackdrop: function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } - - , backdrop: function (callback) { - var that = this - , animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $('