Version Description
- Add "Do not replace email domain" option in advanced settings
- Add "ai1wm_exclude_content_from_export" WordPress hook on export
- Add HTML5 uploader
Download this release
Release Info
| Developer | bangelov |
| Plugin | |
| Version | 5.44 |
| Comparing to | |
| See all releases | |
Code changes from version 5.43 to 5.44
- all-in-one-wp-migration.php +4 -1
- constants.php +1 -6
- lib/exception/class-ai1wm-not-accessible-exception.php → exceptions.php +10 -0
- functions.php +71 -0
- lib/controller/class-ai1wm-import-controller.php +7 -1
- lib/controller/class-ai1wm-main-controller.php +6 -18
- lib/exception/class-ai1wm-archive-exception.php +0 -26
- lib/exception/class-ai1wm-backups-exception.php +0 -26
- lib/exception/class-ai1wm-export-exception.php +0 -26
- lib/exception/class-ai1wm-http-exception.php +0 -26
- lib/exception/class-ai1wm-import-exception.php +0 -26
- lib/exception/class-ai1wm-not-found-exception.php +0 -26
- lib/exception/class-ai1wm-not-readable-exception.php +0 -26
- lib/exception/class-ai1wm-not-writable-exception.php +0 -26
- lib/exception/class-ai1wm-storage-exception.php +0 -26
- lib/model/class-ai1wm-streams.php +1 -0
- lib/model/export/class-ai1wm-export-config.php +5 -0
- lib/model/export/class-ai1wm-export-enumerate.php +15 -2
- lib/model/import/class-ai1wm-import-database.php +20 -12
- lib/model/import/class-ai1wm-import-upload.php +68 -38
- lib/view/assets/css/import.min.css +1 -1
- lib/view/assets/javascript/backups.min.js +994 -1
- lib/view/assets/javascript/export.min.js +1049 -1
- lib/view/assets/javascript/import.min.js +2863 -1
- lib/view/assets/javascript/updater.min.js +108 -1
- lib/view/export/advanced-settings.php +10 -0
- lib/view/export/index.php +1 -0
- lib/view/import/button-file.php +4 -1
- lib/view/import/import-buttons.php +1 -1
- loader.php +0 -40
- readme.txt +6 -1
all-in-one-wp-migration.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
|
| 6 |
* Author: ServMask
|
| 7 |
* Author URI: https://servmask.com/
|
| 8 |
-
* Version: 5.
|
| 9 |
* Text Domain: all-in-one-wp-migration
|
| 10 |
* Domain Path: /languages
|
| 11 |
* Network: True
|
|
@@ -69,6 +69,9 @@ require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'deprecated.php';
|
|
| 69 |
// Include functions
|
| 70 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'functions.php';
|
| 71 |
|
|
|
|
|
|
|
|
|
|
| 72 |
// Include loader
|
| 73 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'loader.php';
|
| 74 |
|
| 5 |
* Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
|
| 6 |
* Author: ServMask
|
| 7 |
* Author URI: https://servmask.com/
|
| 8 |
+
* Version: 5.44
|
| 9 |
* Text Domain: all-in-one-wp-migration
|
| 10 |
* Domain Path: /languages
|
| 11 |
* Network: True
|
| 69 |
// Include functions
|
| 70 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'functions.php';
|
| 71 |
|
| 72 |
+
// Include exceptions
|
| 73 |
+
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'exceptions.php';
|
| 74 |
+
|
| 75 |
// Include loader
|
| 76 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'loader.php';
|
| 77 |
|
constants.php
CHANGED
|
@@ -39,7 +39,7 @@ if ( function_exists( 'gethostname' ) && in_array( gethostname(), $local ) ) {
|
|
| 39 |
// ==================
|
| 40 |
// = Plugin Version =
|
| 41 |
// ==================
|
| 42 |
-
define( 'AI1WM_VERSION', '5.
|
| 43 |
|
| 44 |
// ===============
|
| 45 |
// = Plugin Name =
|
|
@@ -101,11 +101,6 @@ define( 'AI1WM_TEMPLATES_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'view' );
|
|
| 101 |
// ===================
|
| 102 |
define( 'BANDAR_TEMPLATES_PATH', AI1WM_TEMPLATES_PATH );
|
| 103 |
|
| 104 |
-
// ==================
|
| 105 |
-
// = Exception Path =
|
| 106 |
-
// ==================
|
| 107 |
-
define( 'AI1WM_EXCEPTION_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'exception' );
|
| 108 |
-
|
| 109 |
// ===============
|
| 110 |
// = Vendor Path =
|
| 111 |
// ===============
|
| 39 |
// ==================
|
| 40 |
// = Plugin Version =
|
| 41 |
// ==================
|
| 42 |
+
define( 'AI1WM_VERSION', '5.44' );
|
| 43 |
|
| 44 |
// ===============
|
| 45 |
// = Plugin Name =
|
| 101 |
// ===================
|
| 102 |
define( 'BANDAR_TEMPLATES_PATH', AI1WM_TEMPLATES_PATH );
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
// ===============
|
| 105 |
// = Vendor Path =
|
| 106 |
// ===============
|
lib/exception/class-ai1wm-not-accessible-exception.php → exceptions.php
RENAMED
|
@@ -23,4 +23,14 @@
|
|
| 23 |
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
*/
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
class Ai1wm_Not_Accesible_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
*/
|
| 25 |
|
| 26 |
+
class Ai1wm_Archive_Exception extends Exception {}
|
| 27 |
+
class Ai1wm_Backups_Exception extends Exception {}
|
| 28 |
+
class Ai1wm_Export_Exception extends Exception {}
|
| 29 |
+
class Ai1wm_Http_Exception extends Exception {}
|
| 30 |
+
class Ai1wm_Import_Exception extends Exception {}
|
| 31 |
+
class Ai1wm_Import_Retry_Exception extends Exception {}
|
| 32 |
class Ai1wm_Not_Accesible_Exception extends Exception {}
|
| 33 |
+
class Ai1wm_Not_Found_Exception extends Exception {}
|
| 34 |
+
class Ai1wm_Not_Readable_Exception extends Exception {}
|
| 35 |
+
class Ai1wm_Not_Writable_Exception extends Exception {}
|
| 36 |
+
class Ai1wm_Storage_Exception extends Exception {}
|
functions.php
CHANGED
|
@@ -670,3 +670,74 @@ function ai1wm_urlencode( $value ) {
|
|
| 670 |
function ai1wm_urldecode( $value ) {
|
| 671 |
return is_array( $value ) ? array_map( 'ai1wm_urldecode', $value ) : urldecode( stripslashes( $value ) );
|
| 672 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 670 |
function ai1wm_urldecode( $value ) {
|
| 671 |
return is_array( $value ) ? array_map( 'ai1wm_urldecode', $value ) : urldecode( stripslashes( $value ) );
|
| 672 |
}
|
| 673 |
+
|
| 674 |
+
/**
|
| 675 |
+
* Opens a file in specified mode
|
| 676 |
+
*
|
| 677 |
+
* @param string $file Path to the file to open
|
| 678 |
+
* @param string $mode Mode in which to open the file
|
| 679 |
+
* @return resource
|
| 680 |
+
* @throws Exception
|
| 681 |
+
*/
|
| 682 |
+
function ai1wm_open( $file, $mode ) {
|
| 683 |
+
$file_handle = fopen( $file, $mode );
|
| 684 |
+
|
| 685 |
+
if ( false === $file_handle ) {
|
| 686 |
+
throw new Exception( sprintf( __( 'Unable to open %s with mode %s', AI1WM_PLUGIN_NAME ), $file, $mode ) );
|
| 687 |
+
}
|
| 688 |
+
return $file_handle;
|
| 689 |
+
}
|
| 690 |
+
|
| 691 |
+
/**
|
| 692 |
+
* Write contents to a file
|
| 693 |
+
*
|
| 694 |
+
* @param resource $handle File handle to write to
|
| 695 |
+
* @param string $content Contents to write to the file
|
| 696 |
+
* @param string $file Filename that contents shall be written to
|
| 697 |
+
* @return int
|
| 698 |
+
* @throws Exception
|
| 699 |
+
*/
|
| 700 |
+
function ai1wm_write( $handle, $content, $file ) {
|
| 701 |
+
$write_result = fwrite( $handle, $content );
|
| 702 |
+
|
| 703 |
+
if ( false === $write_result ) {
|
| 704 |
+
throw new Exception( sprintf( __( 'Unable to write to %s.', AI1WM_PLUGIN_NAME ), $file ) );
|
| 705 |
+
}
|
| 706 |
+
return $write_result;
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
/**
|
| 710 |
+
* Closes a file handle
|
| 711 |
+
*
|
| 712 |
+
* @param resource $handle File handle to close
|
| 713 |
+
* @return bool
|
| 714 |
+
*/
|
| 715 |
+
function ai1wm_close( $handle ) {
|
| 716 |
+
return @fclose( $handle );
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
/**
|
| 720 |
+
* Deletes a file
|
| 721 |
+
*
|
| 722 |
+
* @param string $file Path to file to delete
|
| 723 |
+
* @return bool
|
| 724 |
+
*/
|
| 725 |
+
function ai1wm_unlink( $file ) {
|
| 726 |
+
return @unlink( $file );
|
| 727 |
+
}
|
| 728 |
+
|
| 729 |
+
/**
|
| 730 |
+
* Copies one file's contents to another
|
| 731 |
+
*
|
| 732 |
+
* @param string $source_file File to copy the contents from
|
| 733 |
+
* @param string $destination_file File to copy the contents to
|
| 734 |
+
*/
|
| 735 |
+
function ai1wm_copy( $source_file, $destination_file ) {
|
| 736 |
+
$source_handle = ai1wm_open( $source_file, 'rb' );
|
| 737 |
+
$destination_handle = ai1wm_open( $destination_file, 'ab' );
|
| 738 |
+
while ( $buffer = fread( $source_handle, 4096 ) ) {
|
| 739 |
+
ai1wm_write( $destination_handle, $buffer, $destination_file );
|
| 740 |
+
}
|
| 741 |
+
ai1wm_close( $source_handle );
|
| 742 |
+
ai1wm_close( $destination_handle );
|
| 743 |
+
}
|
lib/controller/class-ai1wm-import-controller.php
CHANGED
|
@@ -68,7 +68,13 @@ class Ai1wm_Import_Controller {
|
|
| 68 |
foreach ( $hooks as $hook ) {
|
| 69 |
try {
|
| 70 |
$params = call_user_func_array( $hook['function'], array( $params ) );
|
| 71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
Ai1wm_Status::error( $e->getMessage(), __( 'Unable to import', AI1WM_PLUGIN_NAME ) );
|
| 73 |
exit;
|
| 74 |
}
|
| 68 |
foreach ( $hooks as $hook ) {
|
| 69 |
try {
|
| 70 |
$params = call_user_func_array( $hook['function'], array( $params ) );
|
| 71 |
+
}
|
| 72 |
+
catch ( Ai1wm_Import_Retry_Exception $exception ) {
|
| 73 |
+
status_header( $exception->getCode() );
|
| 74 |
+
wp_send_json_error( array( 'message' => $exception->getMessage() ) );
|
| 75 |
+
exit;
|
| 76 |
+
}
|
| 77 |
+
catch ( Exception $e ) {
|
| 78 |
Ai1wm_Status::error( $e->getMessage(), __( 'Unable to import', AI1WM_PLUGIN_NAME ) );
|
| 79 |
exit;
|
| 80 |
}
|
lib/controller/class-ai1wm-main-controller.php
CHANGED
|
@@ -430,33 +430,21 @@ class Ai1wm_Main_Controller {
|
|
| 430 |
wp_enqueue_script(
|
| 431 |
'ai1wm-js-import',
|
| 432 |
Ai1wm_Template::asset_link( 'javascript/import.min.js' ),
|
| 433 |
-
array( '
|
| 434 |
);
|
| 435 |
wp_enqueue_style(
|
| 436 |
'ai1wm-css-import',
|
| 437 |
Ai1wm_Template::asset_link( 'css/import.min.css' )
|
| 438 |
);
|
| 439 |
wp_localize_script( 'ai1wm-js-import', 'ai1wm_uploader', array(
|
| 440 |
-
'
|
| 441 |
-
'
|
| 442 |
-
'
|
| 443 |
-
'
|
| 444 |
-
'file_data_name' => 'upload-file',
|
| 445 |
-
'chunk_size' => apply_filters( 'ai1wm_max_chunk_size', AI1WM_MAX_CHUNK_SIZE ),
|
| 446 |
-
'max_retries' => apply_filters( 'ai1wm_max_chunk_retries', AI1WM_MAX_CHUNK_RETRIES ),
|
| 447 |
-
'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
|
| 448 |
-
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
| 449 |
-
'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
|
| 450 |
-
'multiple_queues' => false,
|
| 451 |
-
'multi_selection' => false,
|
| 452 |
-
'urlstream_upload' => true,
|
| 453 |
-
'unique_names' => true,
|
| 454 |
-
'multipart' => true,
|
| 455 |
-
'multipart_params' => array(
|
| 456 |
'priority' => 5,
|
| 457 |
'secret_key' => get_option( AI1WM_SECRET_KEY ),
|
| 458 |
),
|
| 459 |
-
'filters'
|
| 460 |
'ai1wm_archive_extension' => array( 'wpress', 'bin' ),
|
| 461 |
'ai1wm_archive_size' => apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ),
|
| 462 |
),
|
| 430 |
wp_enqueue_script(
|
| 431 |
'ai1wm-js-import',
|
| 432 |
Ai1wm_Template::asset_link( 'javascript/import.min.js' ),
|
| 433 |
+
array( 'jquery' )
|
| 434 |
);
|
| 435 |
wp_enqueue_style(
|
| 436 |
'ai1wm-css-import',
|
| 437 |
Ai1wm_Template::asset_link( 'css/import.min.css' )
|
| 438 |
);
|
| 439 |
wp_localize_script( 'ai1wm-js-import', 'ai1wm_uploader', array(
|
| 440 |
+
'chunk_size' => apply_filters( 'ai1wm_max_chunk_size', AI1WM_MAX_CHUNK_SIZE ),
|
| 441 |
+
'max_retries' => apply_filters( 'ai1wm_max_chunk_retries', AI1WM_MAX_CHUNK_RETRIES ),
|
| 442 |
+
'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
|
| 443 |
+
'params' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 444 |
'priority' => 5,
|
| 445 |
'secret_key' => get_option( AI1WM_SECRET_KEY ),
|
| 446 |
),
|
| 447 |
+
'filters' => array(
|
| 448 |
'ai1wm_archive_extension' => array( 'wpress', 'bin' ),
|
| 449 |
'ai1wm_archive_size' => apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ),
|
| 450 |
),
|
lib/exception/class-ai1wm-archive-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Archive_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-backups-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Backups_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-export-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Export_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-http-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Http_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-import-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Import_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-not-found-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Not_Found_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-not-readable-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Not_Readable_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-not-writable-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Not_Writable_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/exception/class-ai1wm-storage-exception.php
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Copyright (C) 2014-2016 ServMask Inc.
|
| 4 |
-
*
|
| 5 |
-
* This program is free software: you can redistribute it and/or modify
|
| 6 |
-
* it under the terms of the GNU General Public License as published by
|
| 7 |
-
* the Free Software Foundation, either version 3 of the License, or
|
| 8 |
-
* (at your option) any later version.
|
| 9 |
-
*
|
| 10 |
-
* This program is distributed in the hope that it will be useful,
|
| 11 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
-
* GNU General Public License for more details.
|
| 14 |
-
*
|
| 15 |
-
* You should have received a copy of the GNU General Public License
|
| 16 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 17 |
-
*
|
| 18 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 19 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 20 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 21 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 22 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 23 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 24 |
-
*/
|
| 25 |
-
|
| 26 |
-
class Ai1wm_Storage_Exception extends Exception {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/model/class-ai1wm-streams.php
CHANGED
|
@@ -117,6 +117,7 @@ class WP_Http_Ai1wm {
|
|
| 117 |
$context = stream_context_create( array(
|
| 118 |
'ssl' => array(
|
| 119 |
'verify_peer' => $ssl_verify,
|
|
|
|
| 120 |
//'CN_match' => $arrURL['host'], // This is handled by self::verify_ssl_certificate()
|
| 121 |
'capture_peer_cert' => $ssl_verify,
|
| 122 |
'SNI_enabled' => true,
|
| 117 |
$context = stream_context_create( array(
|
| 118 |
'ssl' => array(
|
| 119 |
'verify_peer' => $ssl_verify,
|
| 120 |
+
'verify_peer_name' => $ssl_verify,
|
| 121 |
//'CN_match' => $arrURL['host'], // This is handled by self::verify_ssl_certificate()
|
| 122 |
'capture_peer_cert' => $ssl_verify,
|
| 123 |
'SNI_enabled' => true,
|
lib/model/export/class-ai1wm-export-config.php
CHANGED
|
@@ -60,6 +60,11 @@ class Ai1wm_Export_Config {
|
|
| 60 |
// Set WordPress Version and Content
|
| 61 |
$config->WordPress = (object) array( 'Version' => $wp_version, 'Content' => WP_CONTENT_DIR );
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
// Save package.json file
|
| 64 |
$handle = fopen( ai1wm_package_path( $params ), 'w' );
|
| 65 |
fwrite( $handle, json_encode( $config ) );
|
| 60 |
// Set WordPress Version and Content
|
| 61 |
$config->WordPress = (object) array( 'Version' => $wp_version, 'Content' => WP_CONTENT_DIR );
|
| 62 |
|
| 63 |
+
// Set No Replace Email
|
| 64 |
+
if ( isset( $params['options']['no_email_replace'] ) ) {
|
| 65 |
+
$config->NoEmailReplace = true;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
// Save package.json file
|
| 69 |
$handle = fopen( ai1wm_package_path( $params ), 'w' );
|
| 70 |
fwrite( $handle, json_encode( $config ) );
|
lib/model/export/class-ai1wm-export-enumerate.php
CHANGED
|
@@ -47,12 +47,25 @@ class Ai1wm_Export_Enumerate {
|
|
| 47 |
if ( isset( $params['options']['no_plugins'] ) ) {
|
| 48 |
$exclude_filters = array_merge( $exclude_filters, array( 'plugins', 'mu-plugins' ) );
|
| 49 |
} else {
|
| 50 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
}
|
| 52 |
|
| 53 |
// Exclude media
|
| 54 |
if ( isset( $params['options']['no_media'] ) ) {
|
| 55 |
$exclude_filters[] = 'uploads';
|
|
|
|
| 56 |
}
|
| 57 |
|
| 58 |
// Get total files
|
|
@@ -78,7 +91,7 @@ class Ai1wm_Export_Enumerate {
|
|
| 78 |
$iterator = new Ai1wm_Recursive_Directory_Iterator( WP_CONTENT_DIR );
|
| 79 |
|
| 80 |
// Exclude uploads, plugins or themes
|
| 81 |
-
$iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, $exclude_filters );
|
| 82 |
|
| 83 |
// Recursively iterate over content directory
|
| 84 |
$iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
|
| 47 |
if ( isset( $params['options']['no_plugins'] ) ) {
|
| 48 |
$exclude_filters = array_merge( $exclude_filters, array( 'plugins', 'mu-plugins' ) );
|
| 49 |
} else {
|
| 50 |
+
$inactive_plugins = array();
|
| 51 |
+
|
| 52 |
+
// Exclude inactive plugins
|
| 53 |
+
if ( isset( $params['options']['no_inactive_plugins'] ) ) {
|
| 54 |
+
foreach ( get_plugins() as $basename => $plugin ) {
|
| 55 |
+
if ( is_plugin_inactive( $basename ) ) {
|
| 56 |
+
$inactive_plugins[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( $basename );
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
// Set exclude filters
|
| 62 |
+
$exclude_filters = array_merge( $exclude_filters, ai1wm_plugin_filters( $inactive_plugins ) );
|
| 63 |
}
|
| 64 |
|
| 65 |
// Exclude media
|
| 66 |
if ( isset( $params['options']['no_media'] ) ) {
|
| 67 |
$exclude_filters[] = 'uploads';
|
| 68 |
+
$exclude_filters[] = 'blogs.dir';
|
| 69 |
}
|
| 70 |
|
| 71 |
// Get total files
|
| 91 |
$iterator = new Ai1wm_Recursive_Directory_Iterator( WP_CONTENT_DIR );
|
| 92 |
|
| 93 |
// Exclude uploads, plugins or themes
|
| 94 |
+
$iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_content_from_export', $exclude_filters ) );
|
| 95 |
|
| 96 |
// Recursively iterate over content directory
|
| 97 |
$iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
|
lib/model/import/class-ai1wm-import-database.php
CHANGED
|
@@ -167,9 +167,11 @@ class Ai1wm_Import_Database {
|
|
| 167 |
}
|
| 168 |
|
| 169 |
// Add email
|
| 170 |
-
if ( !
|
| 171 |
-
|
| 172 |
-
|
|
|
|
|
|
|
| 173 |
}
|
| 174 |
}
|
| 175 |
|
|
@@ -206,9 +208,11 @@ class Ai1wm_Import_Database {
|
|
| 206 |
}
|
| 207 |
|
| 208 |
// Add email
|
| 209 |
-
if ( !
|
| 210 |
-
|
| 211 |
-
|
|
|
|
|
|
|
| 212 |
}
|
| 213 |
}
|
| 214 |
}
|
|
@@ -266,9 +270,11 @@ class Ai1wm_Import_Database {
|
|
| 266 |
}
|
| 267 |
|
| 268 |
// Add email
|
| 269 |
-
if ( !
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
| 272 |
}
|
| 273 |
}
|
| 274 |
}
|
|
@@ -326,9 +332,11 @@ class Ai1wm_Import_Database {
|
|
| 326 |
}
|
| 327 |
|
| 328 |
// Add email
|
| 329 |
-
if ( !
|
| 330 |
-
|
| 331 |
-
|
|
|
|
|
|
|
| 332 |
}
|
| 333 |
}
|
| 334 |
}
|
| 167 |
}
|
| 168 |
|
| 169 |
// Add email
|
| 170 |
+
if ( ! isset( $config->NoEmailReplace ) ) {
|
| 171 |
+
if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
|
| 172 |
+
$old_values[] = sprintf( "@%s", $old_domain );
|
| 173 |
+
$new_values[] = sprintf( "@%s", $new_domain );
|
| 174 |
+
}
|
| 175 |
}
|
| 176 |
}
|
| 177 |
|
| 208 |
}
|
| 209 |
|
| 210 |
// Add email
|
| 211 |
+
if ( ! isset( $config->NoEmailReplace ) ) {
|
| 212 |
+
if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
|
| 213 |
+
$old_values[] = sprintf( "@%s", $old_domain );
|
| 214 |
+
$new_values[] = sprintf( "@%s", $new_domain );
|
| 215 |
+
}
|
| 216 |
}
|
| 217 |
}
|
| 218 |
}
|
| 270 |
}
|
| 271 |
|
| 272 |
// Add email
|
| 273 |
+
if ( ! isset( $config->NoEmailReplace ) ) {
|
| 274 |
+
if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
|
| 275 |
+
$old_values[] = sprintf( "@%s", $old_domain );
|
| 276 |
+
$new_values[] = sprintf( "@%s", $new_domain );
|
| 277 |
+
}
|
| 278 |
}
|
| 279 |
}
|
| 280 |
}
|
| 332 |
}
|
| 333 |
|
| 334 |
// Add email
|
| 335 |
+
if ( ! isset( $config->NoEmailReplace ) ) {
|
| 336 |
+
if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
|
| 337 |
+
$old_values[] = sprintf( "@%s", $old_domain );
|
| 338 |
+
$new_values[] = sprintf( "@%s", $new_domain );
|
| 339 |
+
}
|
| 340 |
}
|
| 341 |
}
|
| 342 |
}
|
lib/model/import/class-ai1wm-import-upload.php
CHANGED
|
@@ -25,54 +25,84 @@
|
|
| 25 |
|
| 26 |
class Ai1wm_Import_Upload {
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
}
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
}
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
| 75 |
-
|
| 76 |
exit;
|
| 77 |
}
|
| 78 |
}
|
| 25 |
|
| 26 |
class Ai1wm_Import_Upload {
|
| 27 |
|
| 28 |
+
private static function validate() {
|
| 29 |
+
if ( ! array_key_exists( 'upload-file', $_FILES ) || ! is_array( $_FILES['upload-file'] ) ) {
|
| 30 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 31 |
+
__( 'Missing upload file.', AI1WM_PLUGIN_NAME ),
|
| 32 |
+
400
|
| 33 |
+
);
|
| 34 |
}
|
| 35 |
|
| 36 |
+
if ( ! array_key_exists( 'error', $_FILES['upload-file'] ) ) {
|
| 37 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 38 |
+
__( 'Missing error key in upload file.', AI1WM_PLUGIN_NAME ),
|
| 39 |
+
400
|
| 40 |
+
);
|
| 41 |
}
|
| 42 |
|
| 43 |
+
if ( ! array_key_exists( 'tmp_name', $_FILES['upload-file'] ) ) {
|
| 44 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 45 |
+
__( 'Missing tmp_name in upload file.', AI1WM_PLUGIN_NAME ),
|
| 46 |
+
400
|
| 47 |
+
);
|
| 48 |
}
|
| 49 |
+
}
|
| 50 |
|
| 51 |
+
public static function execute( $params ) {
|
| 52 |
+
self::validate();
|
| 53 |
|
| 54 |
+
$error = $_FILES['upload-file']['error'];
|
| 55 |
+
$upload = $_FILES['upload-file']['tmp_name'];
|
| 56 |
+
$archive = ai1wm_archive_path( $params );
|
| 57 |
|
| 58 |
+
switch ( $error ) {
|
| 59 |
+
case UPLOAD_ERR_OK:
|
| 60 |
+
try {
|
| 61 |
+
ai1wm_copy( $upload, $archive );
|
| 62 |
+
ai1wm_unlink( $upload );
|
| 63 |
+
} catch ( Exception $exception ) {
|
| 64 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 65 |
+
sprintf(
|
| 66 |
+
__( 'Unable to upload the file because %s', AI1WM_PLUGIN_NAME ),
|
| 67 |
+
$exception->getMessage()
|
| 68 |
+
),
|
| 69 |
+
400
|
| 70 |
+
);
|
| 71 |
}
|
| 72 |
+
break;
|
| 73 |
+
case UPLOAD_ERR_INI_SIZE:
|
| 74 |
+
case UPLOAD_ERR_FORM_SIZE:
|
| 75 |
+
case UPLOAD_ERR_PARTIAL:
|
| 76 |
+
case UPLOAD_ERR_NO_FILE:
|
| 77 |
+
// File is too large, reduce the size and try again
|
| 78 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 79 |
+
__( 'The file is too large, retrying with smaller size.', AI1WM_PLUGIN_NAME ),
|
| 80 |
+
413
|
| 81 |
+
);
|
| 82 |
+
case UPLOAD_ERR_NO_TMP_DIR:
|
| 83 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 84 |
+
__( 'Missing a temporary folder.', AI1WM_PLUGIN_NAME ),
|
| 85 |
+
400
|
| 86 |
+
);
|
| 87 |
+
case UPLOAD_ERR_CANT_WRITE:
|
| 88 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 89 |
+
__( 'Failed to write file to disk.', AI1WM_PLUGIN_NAME ),
|
| 90 |
+
400
|
| 91 |
+
);
|
| 92 |
+
case UPLOAD_ERR_EXTENSION:
|
| 93 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 94 |
+
__( 'A PHP extension stopped the file upload.', AI1WM_PLUGIN_NAME ),
|
| 95 |
+
400
|
| 96 |
+
);
|
| 97 |
+
default:
|
| 98 |
+
throw new Ai1wm_Import_Retry_Exception(
|
| 99 |
+
sprintf(
|
| 100 |
+
__( 'Unrecognized error %s during upload.', AI1WM_PLUGIN_NAME ),
|
| 101 |
+
$error
|
| 102 |
+
),
|
| 103 |
+
400
|
| 104 |
+
);
|
| 105 |
}
|
|
|
|
| 106 |
exit;
|
| 107 |
}
|
| 108 |
}
|
lib/view/assets/css/import.min.css
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
@charset "UTF-8";.ai1wm-divider{-ms-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border:none;height:0;background-color:transparent;font-size:14px;font-weight:700;text-align:center;text-transform:uppercase;color:rgba(0,0,0,.8);position:relative;top:0%;left:0%;margin:1rem 2.5rem;height:auto;padding:0;line-height:1}.ai1wm-divider:before,.ai1wm-divider:after{position:absolute;content:" ";z-index:3;width:50%;top:50%;height:0%;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.8)}.ai1wm-divider:before{left:0%;margin-left:-2.5rem}.ai1wm-divider:after{left:auto;right:0%;margin-right:-2.5rem}@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}[class^="ai1wm-icon-"],[class*=" ai1wm-icon-"]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-down{display:inline-block;position:relative;-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg);margin-left:.5em!important}.ai1wm-icon-chevron-down:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-alone{margin:0!important}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:before,.ai1wm-row:after{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message,.ai1wm-right .ai1wm-http-authentication{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{margin:0;padding:0;float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-row,.ai1wm-right{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:before,.ai1wm-container:after{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 #fff;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-replace-row .ai1wm-field-inline{float:left;width:100%}.ai1wm-replace-row .ai1wm-field-inline input{width:100%;font-weight:400;font-size:.8rem;padding:0 10px;height:2.3rem;line-height:2.3rem;margin-bottom:4px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type="text"],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#EFEFEF;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#F2F8F0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#F1D7D7;color:#A95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#D95C5C;border:2px solid #D95C5C;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#D95C5C}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block}.ai1wm-button-group.ai1wm-button-export{width:147px}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:180px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import{width:158px}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:6px 25px 1px 26px;height:22px;line-height:22px;text-decoration:none;color:#27ae60;text-align:left}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{-webkit-transform:translate(11px,-1px);transform:translate(11px,-1px);position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{display:inline-block;width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third,.ai1wm-line-second{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-gray{border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-green{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-green-small{border:2px solid #6eb649;background-color:transparent;color:#6eb649;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue{border:2px solid #00aff0;background-color:transparent;color:#00aff0;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;background-color:transparent;color:#e74c3c;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-alone{border-radius:50px!important;padding:5px 8px!important}.ai1wm-button-blue[disabled="disabled"],.ai1wm-button-green[disabled="disabled"],.ai1wm-button-red[disabled="disabled"],.ai1wm-button-green-small[disabled="disabled"]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled="disabled"]:hover{color:#00aff0}.ai1wm-button-red[disabled="disabled"]:hover{color:#e74c3c}.ai1wm-button-green[disabled="disabled"]:hover{color:#27ae60}.ai1wm-button-blue[disabled="disabled"]:hover,.ai1wm-button-green[disabled="disabled"]:hover,.ai1wm-button-red[disabled="disabled"]:hover,.ai1wm-button-green-small[disabled="disabled"]:hover{background:0 0}.ai1wm-button-gray i,.ai1wm-button-green i,.ai1wm-button-blue i,.ai1wm-button-red i{margin-left:-.5em;margin-right:.2em}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type="radio"].ai1wm-flat-radio-button{display:none}input[type="radio"].ai1wm-flat-radio-button+a i,input[type="radio"].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type="radio"].ai1wm-flat-radio-button:checked+a i,input[type="radio"].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:before,.ai1wm-clear:after{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-list-expanded{display:block!important}.ai1wm-field-inline input{border-radius:5px}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #D6D6D6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-feedback-cancel:active{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:none;color:#333;text-deciration:none}.ai1wm-feedback-types>li>a>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url("../img/logo-128x128.png");background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url("../img/logo-32x32.png")}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 0}.ai1wm-modal-container section p .ai1wm-modal-sites input{width:90%}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-growl-info{position:fixed;z-index:200000;top:0;margin-top:16px;right:16px;width:200px;padding:16px;background:#f1c40f;border:1px solid #e67e22;border-radius:5px;color:#111}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over .ai1wm-drag-drop-area{border-color:#83b4d8}.ai1wm-import-form{position:relative}#ai1wm-import-init{position:absolute;top:10px;left:10%;width:80%;text-align:center}#ai1wm-import-init>p{font-size:18px;color:#9e9e9e}#ai1wm-import-init>p>i{font-size:46px}.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-percent{position:absolute;width:50px;left:50%;-webkit-transform:translate(-24px,0);transform:translate(-24px,0);font-size:.5em;background:0 0}
|
| 1 |
+
@charset "UTF-8";.ai1wm-divider{-ms-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border:none;height:0;background-color:transparent;font-size:14px;font-weight:700;text-align:center;text-transform:uppercase;color:rgba(0,0,0,.8);position:relative;top:0%;left:0%;margin:1rem 2.5rem;height:auto;padding:0;line-height:1}.ai1wm-divider:before,.ai1wm-divider:after{position:absolute;content:" ";z-index:3;width:50%;top:50%;height:0%;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.8)}.ai1wm-divider:before{left:0%;margin-left:-2.5rem}.ai1wm-divider:after{left:auto;right:0%;margin-right:-2.5rem}@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}[class^="ai1wm-icon-"],[class*=" ai1wm-icon-"]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-down{display:inline-block;position:relative;-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg);margin-left:.5em!important}.ai1wm-icon-chevron-down:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-alone{margin:0!important}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:before,.ai1wm-row:after{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message,.ai1wm-right .ai1wm-http-authentication{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{margin:0;padding:0;float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-row,.ai1wm-right{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:before,.ai1wm-container:after{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 #fff;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-replace-row .ai1wm-field-inline{float:left;width:100%}.ai1wm-replace-row .ai1wm-field-inline input{width:100%;font-weight:400;font-size:.8rem;padding:0 10px;height:2.3rem;line-height:2.3rem;margin-bottom:4px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type="text"],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#EFEFEF;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#F2F8F0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#F1D7D7;color:#A95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#D95C5C;border:2px solid #D95C5C;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#D95C5C}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block}.ai1wm-button-group.ai1wm-button-export{width:147px}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:180px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import{width:158px}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:6px 25px 1px 26px;height:22px;line-height:22px;text-decoration:none;color:#27ae60;text-align:left}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{-webkit-transform:translate(11px,-1px);transform:translate(11px,-1px);position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{display:inline-block;width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third,.ai1wm-line-second{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-gray{border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-green{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-green-small{border:2px solid #6eb649;background-color:transparent;color:#6eb649;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue{border:2px solid #00aff0;background-color:transparent;color:#00aff0;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;background-color:transparent;color:#e74c3c;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-alone{border-radius:50px!important;padding:5px 8px!important}.ai1wm-button-blue[disabled="disabled"],.ai1wm-button-green[disabled="disabled"],.ai1wm-button-red[disabled="disabled"],.ai1wm-button-green-small[disabled="disabled"]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled="disabled"]:hover{color:#00aff0}.ai1wm-button-red[disabled="disabled"]:hover{color:#e74c3c}.ai1wm-button-green[disabled="disabled"]:hover{color:#27ae60}.ai1wm-button-blue[disabled="disabled"]:hover,.ai1wm-button-green[disabled="disabled"]:hover,.ai1wm-button-red[disabled="disabled"]:hover,.ai1wm-button-green-small[disabled="disabled"]:hover{background:0 0}.ai1wm-button-gray i,.ai1wm-button-green i,.ai1wm-button-blue i,.ai1wm-button-red i{margin-left:-.5em;margin-right:.2em}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type="radio"].ai1wm-flat-radio-button{display:none}input[type="radio"].ai1wm-flat-radio-button+a i,input[type="radio"].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type="radio"].ai1wm-flat-radio-button:checked+a i,input[type="radio"].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:before,.ai1wm-clear:after{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-list-expanded{display:block!important}.ai1wm-field-inline input{border-radius:5px}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #D6D6D6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-feedback-cancel:active{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:none;color:#333;text-deciration:none}.ai1wm-feedback-types>li>a>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url("../img/logo-128x128.png");background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url("../img/logo-32x32.png")}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 0}.ai1wm-modal-container section p .ai1wm-modal-sites input{width:90%}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-growl-info{position:fixed;z-index:200000;top:0;margin-top:16px;right:16px;width:200px;padding:16px;background:#f1c40f;border:1px solid #e67e22;border-radius:5px;color:#111}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable input{display:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file>input{position:absolute;-webkit-transform:translate(-51px,-6px);transform:translate(-51px,-6px);width:158px;height:29px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0}#ai1wm-import-file>input::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}.ai1wm-import-form{position:relative}#ai1wm-import-init{position:absolute;top:10px;left:10%;width:80%;text-align:center}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all}.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-percent{position:absolute;width:50px;left:50%;-webkit-transform:translate(-24px,0);transform:translate(-24px,0);font-size:.5em;background:0 0}
|
lib/view/assets/javascript/backups.min.js
CHANGED
|
@@ -1 +1,994 @@
|
|
| 1 |
-
!function e(a,t,i){function o(s,r){if(!t[s]){if(!a[s]){var p="function"==typeof require&&require;if(!r&&p)return p(s,!0);if(n)return n(s,!0);throw new Error("Cannot find module '"+s+"'")}var c=t[s]={exports:{}};a[s][0].call(c.exports,function(e){var t=a[s][1][e];return o(t?t:e)},c,c.exports,e,a,t,i)}return t[s].exports}for(var n="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e){var a=(e("./servmask/report"),e("./servmask/feedback"),e("./servmask/util")),t=e("./import/import");jQuery(document).ready(function(e){"use strict";e(".ai1wm-backup-actions > a").hover(function(){e(this).addClass("ai1wm-button-on")},function(){e(this).removeClass("ai1wm-button-on")}),e(".ai1wm-backup-delete").click(function(a){var t=e(this);confirm("Are you sure you want to delete this file?")&&e.ajax({type:"POST",url:ai1wm_backups.ajax.url,data:{archive:t.data("archive")},success:function(a){var i=a.errors;0===i.length&&(t.closest("tr").remove(),0===e(".ai1wm-backups tbody tr").length&&(e(".ai1wm-backups").addClass("ai1wm-hide"),e(".ai1wm-backups-empty").removeClass("ai1wm-hide")))},dataType:"json"}),a.preventDefault()});var i=new t;e(".ai1wm-backup-restore").click(function(t){var o=a.random(12),n=e(this).data("archive");i.setParams([{name:"storage",value:o},{name:"archive",value:n},{name:"backups",value:1}]),i.start(),t.preventDefault()})})},{"./import/import":2,"./servmask/feedback":4,"./servmask/report":5,"./servmask/util":6}],2:[function(e,a){var t=e("../servmask/util"),i=e("./modal"),o=jQuery,n=function(){var e=this;this.params=[],this.modal=new i,this.modal.onConfirm=function(a){e.onConfirm(a)},this.modal.onBlogs=function(a){e.onBlogs(a)},this.modal.onStop=function(a){e.onStop(a)}};n.prototype.setParams=function(e){this.params=t.list(e)},n.prototype.start=function(e){var a=this;o(window).bind("beforeunload",function(){return"You are about to stop importing your website, are you sure?"}),this.stop=!1,this.setStatus({type:"info",message:"Preparing to import..."});var i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){a.getStatus()}).fail(function(){a.setStatus({type:"error",message:"Unable to start the import. Refresh the page and try again"})})},n.prototype.confirm=function(e){var a=this,i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:150});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){a.getStatus(ai1wm_import.status.php)}).fail(function(){a.setStatus({type:"error",message:"Unable to confirm the import. Refresh the page and try again"})})},n.prototype.blogs=function(e){var a=this,i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:150});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){a.getStatus(ai1wm_import.status.php)}).fail(function(){a.setStatus({type:"error",message:"Unable to prepare blogs the import. Refresh the page and try again"})})},n.prototype.clean=function(e){var a=this;this.stop=!0;var i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:400});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){o(window).unbind("beforeunload")}).fail(function(){a.setStatus({type:"error",message:"Unable to clean the import. Refresh the page and try again"})})},n.prototype.getStatus=function(e,a){var t=this,a=a||0;this.stop||o.ajax({cache:!1,url:e,dataType:"json"}).done(function(i){if(i)switch(t.setStatus(i),i.type){case"done":case"error":return o(window).unbind("beforeunload"),void 0;case"confirm":case"blogs":return}setTimeout(function(){t.getStatus(e,a)},3e3)}).fail(function(){a++,a>=6?t.setStatus({type:"error",message:"Unable to retrieve status of the import. Is your server running?"}):a>=3?t.getStatus(ai1wm_import.status.js,a):t.getStatus(ai1wm_import.status.php,a)})},n.prototype.setStatus=function(e){this.modal.render(e)},n.prototype.onConfirm=function(e){this.confirm(e)},n.prototype.onBlogs=function(e){this.blogs(e)},n.prototype.onStop=function(e){this.clean(e)},a.exports=n},{"../servmask/util":6,"./modal":3}],3:[function(e,a){var t=jQuery,i=function(){var e=this;this.error=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t("<span></span>").addClass("ai1wm-title-red").text("Unable to import"),c=t('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.progress=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=(t("<p></p>"),t("<div></div>")),r=t('<span class="ai1wm-progress-bar"></span>'),p=t('<span class="ai1wm-progress-bar-meter"></span>').width(a.percent+"%"),c=t('<span class="ai1wm-progress-bar-percent">0%</span>').text(a.percent+"%"),m=t('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on("click",function(){t(this).attr("disabled","disabled"),e.onStop(),e.modal.hide(),e.overlay.hide()});r.append(p).append(c),s.append(m),n.append(r),o.append(n),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.confirm=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t('<span class="ai1wm-icon-notification"></span>'),c=t('<button class="ai1wm-button-green">Continue</button>').on("click",function(){t(this).attr("disabled","disabled"),e.onConfirm()});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.blogs=function(a){var i=t("<form></form>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t("<span></span>").addClass("ai1wm-title-grey").text("Update subsite name"),c=t('<button class="ai1wm-button-green">Continue</button>').on("click",function(){t(this).attr("disabled","disabled"),e.onBlogs(t(this).closest("form").serializeArray())});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.info=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t('<span class="ai1wm-loader"></span>'),c=t('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr("disabled","disabled");r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.done=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t("<span></span>").addClass("ai1wm-title-green").text(a.title),c=t('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.overlay=t('<div class="ai1wm-overlay"></div>'),this.modal=t('<div class="ai1wm-modal-container"></div>'),t("body").append(this.overlay).append(this.modal)};i.prototype.render=function(e){switch(e.type){case"error":this.error(e);break;case"confirm":this.confirm(e);break;case"blogs":this.blogs(e);break;case"progress":this.progress(e);break;case"info":this.info(e);break;case"done":this.done(e)}},a.exports=i},{}],4:[function(){jQuery(document).ready(function(e){"use strict";e(".ai1wm-feedback-type").attr("checked",!1),e("#ai1wm-feedback-type-link-1").click(function(a){var t=e("#ai1wm-feedback-type-1");t.is(":checked")?(t.attr("checked",!1),a.preventDefault()):t.attr("checked",!0)}),e("#ai1wm-feedback-type-2").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-3").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","Leave plugin developers any feedback here"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-type-3").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-2").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","How may we help you?"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-cancel").click(function(a){e(".ai1wm-feedback-form").fadeOut(function(){e(".ai1wm-feedback-type").attr("checked",!1).closest("li").show()}),a.preventDefault()}),e("#ai1wm-feedback-submit").click(function(){var a=e(".ai1wm-feedback-type:checked").val(),t=e(".ai1wm-feedback-email").val(),i=e(".ai1wm-feedback-message").val(),o=e(".ai1wm-feedback-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_feedback.ajax.url,data:{"ai1wm-type":a,"ai1wm-email":t,"ai1wm-message":i,"ai1wm-terms":+o},success:function(a){var t=a.errors;if(t.length>0){e(".ai1wm-feedback .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(t,function(e,a){i.append("<p>"+a+"</p>")}),e(".ai1wm-feedback").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your feedback!</p>");e(".ai1wm-feedback").html(o)}},dataType:"json",async:!1})})})},{}],5:[function(){jQuery(document).ready(function(e){"use strict";e("#ai1wm-report-problem-button").click(function(a){e(this).next(".ai1wm-report-problem-dialog").toggleClass("ai1wm-report-active"),a.preventDefault()}),e("#ai1wm-report-cancel").click(function(a){e(this).closest(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active"),a.preventDefault()}),e("#ai1wm-report-submit").click(function(){var a=e(".ai1wm-report-email").val(),t=e(".ai1wm-report-message").val(),i=e(".ai1wm-report-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_report.ajax.url,data:{"ai1wm-email":a,"ai1wm-message":t,"ai1wm-terms":+i},success:function(a){var t=a.errors;if(t.length>0){e(".ai1wm-report-problem-dialog .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(t,function(e,a){i.append("<p>"+a+"</p>")}),e(".ai1wm-report-problem-dialog").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your request!</p>");e(".ai1wm-report-problem-dialog").html(o),setTimeout(function(){e(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active")},2e3)}},dataType:"json",async:!1})})})},{}],6:[function(e,a){var t=jQuery;a.exports={random:function(e){for(var a="",t="abcdefghijklmnopqrstuvwxyz0123456789",i=0;e>i;i++)a+=t.charAt(Math.floor(Math.random()*t.length));return a},form:function(e){return t(e).serializeArray()},ucfirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},list:function(e){if(t.isPlainObject(e)){var a=[],i=decodeURIComponent(t.param(e)).split("&");return t.each(i,function(e,t){var i=t.split("=");a.push({name:i[0],value:i[1]})}),a}return e}}},{}]},{},[1]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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| 1 |
+
/******/ (function(modules) { // webpackBootstrap
|
| 2 |
+
/******/ // The module cache
|
| 3 |
+
/******/ var installedModules = {};
|
| 4 |
+
|
| 5 |
+
/******/ // The require function
|
| 6 |
+
/******/ function __webpack_require__(moduleId) {
|
| 7 |
+
|
| 8 |
+
/******/ // Check if module is in cache
|
| 9 |
+
/******/ if(installedModules[moduleId])
|
| 10 |
+
/******/ return installedModules[moduleId].exports;
|
| 11 |
+
|
| 12 |
+
/******/ // Create a new module (and put it into the cache)
|
| 13 |
+
/******/ var module = installedModules[moduleId] = {
|
| 14 |
+
/******/ exports: {},
|
| 15 |
+
/******/ id: moduleId,
|
| 16 |
+
/******/ loaded: false
|
| 17 |
+
/******/ };
|
| 18 |
+
|
| 19 |
+
/******/ // Execute the module function
|
| 20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
| 21 |
+
|
| 22 |
+
/******/ // Flag the module as loaded
|
| 23 |
+
/******/ module.loaded = true;
|
| 24 |
+
|
| 25 |
+
/******/ // Return the exports of the module
|
| 26 |
+
/******/ return module.exports;
|
| 27 |
+
/******/ }
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
| 31 |
+
/******/ __webpack_require__.m = modules;
|
| 32 |
+
|
| 33 |
+
/******/ // expose the module cache
|
| 34 |
+
/******/ __webpack_require__.c = installedModules;
|
| 35 |
+
|
| 36 |
+
/******/ // __webpack_public_path__
|
| 37 |
+
/******/ __webpack_require__.p = "";
|
| 38 |
+
|
| 39 |
+
/******/ // Load entry module and return exports
|
| 40 |
+
/******/ return __webpack_require__(0);
|
| 41 |
+
/******/ })
|
| 42 |
+
/************************************************************************/
|
| 43 |
+
/******/ ([
|
| 44 |
+
/* 0 */
|
| 45 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 46 |
+
|
| 47 |
+
'use strict';
|
| 48 |
+
|
| 49 |
+
/**
|
| 50 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 51 |
+
*
|
| 52 |
+
* This program is free software: you can redistribute it and/or modify
|
| 53 |
+
* it under the terms of the GNU General Public License as published by
|
| 54 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 55 |
+
* (at your option) any later version.
|
| 56 |
+
*
|
| 57 |
+
* This program is distributed in the hope that it will be useful,
|
| 58 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 59 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 60 |
+
* GNU General Public License for more details.
|
| 61 |
+
*
|
| 62 |
+
* You should have received a copy of the GNU General Public License
|
| 63 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 64 |
+
*
|
| 65 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 66 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 67 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 68 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 69 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 70 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 71 |
+
*/
|
| 72 |
+
|
| 73 |
+
var Report = __webpack_require__(1),
|
| 74 |
+
Feedback = __webpack_require__(2),
|
| 75 |
+
Util = __webpack_require__(3),
|
| 76 |
+
Import = __webpack_require__(4);
|
| 77 |
+
|
| 78 |
+
jQuery(document).ready(function ($) {
|
| 79 |
+
'use strict';
|
| 80 |
+
|
| 81 |
+
$('.ai1wm-backup-actions > a').hover(function () {
|
| 82 |
+
$(this).addClass('ai1wm-button-on');
|
| 83 |
+
}, function () {
|
| 84 |
+
$(this).removeClass('ai1wm-button-on');
|
| 85 |
+
});
|
| 86 |
+
|
| 87 |
+
// Delete file
|
| 88 |
+
$('.ai1wm-backup-delete').click(function (e) {
|
| 89 |
+
var self = $(this);
|
| 90 |
+
|
| 91 |
+
// Delete file
|
| 92 |
+
if (confirm('Are you sure you want to delete this file?')) {
|
| 93 |
+
$.ajax({
|
| 94 |
+
type: 'POST',
|
| 95 |
+
url: ai1wm_backups.ajax.url,
|
| 96 |
+
data: { 'archive': self.data('archive') },
|
| 97 |
+
success: function success(result) {
|
| 98 |
+
var errors = result.errors;
|
| 99 |
+
if (errors.length === 0) {
|
| 100 |
+
self.closest('tr').remove();
|
| 101 |
+
if ($('.ai1wm-backups tbody tr').length === 0) {
|
| 102 |
+
$('.ai1wm-backups').addClass('ai1wm-hide');
|
| 103 |
+
$('.ai1wm-backups-empty').removeClass('ai1wm-hide');
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
},
|
| 107 |
+
dataType: 'json'
|
| 108 |
+
});
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
e.preventDefault();
|
| 112 |
+
});
|
| 113 |
+
|
| 114 |
+
var model = new Import();
|
| 115 |
+
|
| 116 |
+
// Restore from file
|
| 117 |
+
$('.ai1wm-backup-restore').click(function (e) {
|
| 118 |
+
var storage = Util.random(12);
|
| 119 |
+
var archive = $(this).data('archive');
|
| 120 |
+
|
| 121 |
+
// Set global params
|
| 122 |
+
model.setParams([{ name: 'storage', value: storage }, { name: 'archive', value: archive }, { name: 'backups', value: 1 }]);
|
| 123 |
+
|
| 124 |
+
// Start import
|
| 125 |
+
model.start();
|
| 126 |
+
|
| 127 |
+
e.preventDefault();
|
| 128 |
+
});
|
| 129 |
+
});
|
| 130 |
+
|
| 131 |
+
/***/ },
|
| 132 |
+
/* 1 */
|
| 133 |
+
/***/ function(module, exports) {
|
| 134 |
+
|
| 135 |
+
'use strict';
|
| 136 |
+
|
| 137 |
+
/**
|
| 138 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 139 |
+
*
|
| 140 |
+
* This program is free software: you can redistribute it and/or modify
|
| 141 |
+
* it under the terms of the GNU General Public License as published by
|
| 142 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 143 |
+
* (at your option) any later version.
|
| 144 |
+
*
|
| 145 |
+
* This program is distributed in the hope that it will be useful,
|
| 146 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 147 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 148 |
+
* GNU General Public License for more details.
|
| 149 |
+
*
|
| 150 |
+
* You should have received a copy of the GNU General Public License
|
| 151 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 152 |
+
*
|
| 153 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 154 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 155 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 156 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 157 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 158 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 159 |
+
*/
|
| 160 |
+
|
| 161 |
+
jQuery(document).ready(function ($) {
|
| 162 |
+
'use strict';
|
| 163 |
+
|
| 164 |
+
$('#ai1wm-report-problem-button').click(function (e) {
|
| 165 |
+
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
| 166 |
+
|
| 167 |
+
e.preventDefault();
|
| 168 |
+
});
|
| 169 |
+
|
| 170 |
+
$('#ai1wm-report-cancel').click(function (e) {
|
| 171 |
+
$(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
| 172 |
+
|
| 173 |
+
e.preventDefault();
|
| 174 |
+
});
|
| 175 |
+
|
| 176 |
+
$('#ai1wm-report-submit').click(function () {
|
| 177 |
+
var email = $('.ai1wm-report-email').val();
|
| 178 |
+
var message = $('.ai1wm-report-message').val();
|
| 179 |
+
var terms = $('.ai1wm-report-terms').is(':checked');
|
| 180 |
+
|
| 181 |
+
$.ajax({
|
| 182 |
+
type: 'POST',
|
| 183 |
+
url: ai1wm_report.ajax.url,
|
| 184 |
+
data: { 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
|
| 185 |
+
success: function success(data) {
|
| 186 |
+
var errors = data.errors;
|
| 187 |
+
if (errors.length > 0) {
|
| 188 |
+
// Reset previous messages
|
| 189 |
+
$('.ai1wm-report-problem-dialog .ai1wm-message').remove();
|
| 190 |
+
|
| 191 |
+
var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
| 192 |
+
$.each(errors, function (key, value) {
|
| 193 |
+
content.append('<p>' + value + '</p>');
|
| 194 |
+
});
|
| 195 |
+
|
| 196 |
+
$('.ai1wm-report-problem-dialog').prepend(content);
|
| 197 |
+
} else {
|
| 198 |
+
var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
|
| 199 |
+
$('.ai1wm-report-problem-dialog').html(_content);
|
| 200 |
+
|
| 201 |
+
// Hide message
|
| 202 |
+
setTimeout(function () {
|
| 203 |
+
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
| 204 |
+
}, 2000);
|
| 205 |
+
}
|
| 206 |
+
},
|
| 207 |
+
dataType: 'json',
|
| 208 |
+
async: false
|
| 209 |
+
});
|
| 210 |
+
});
|
| 211 |
+
});
|
| 212 |
+
|
| 213 |
+
/***/ },
|
| 214 |
+
/* 2 */
|
| 215 |
+
/***/ function(module, exports) {
|
| 216 |
+
|
| 217 |
+
'use strict';
|
| 218 |
+
|
| 219 |
+
/**
|
| 220 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 221 |
+
*
|
| 222 |
+
* This program is free software: you can redistribute it and/or modify
|
| 223 |
+
* it under the terms of the GNU General Public License as published by
|
| 224 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 225 |
+
* (at your option) any later version.
|
| 226 |
+
*
|
| 227 |
+
* This program is distributed in the hope that it will be useful,
|
| 228 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 229 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 230 |
+
* GNU General Public License for more details.
|
| 231 |
+
*
|
| 232 |
+
* You should have received a copy of the GNU General Public License
|
| 233 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 234 |
+
*
|
| 235 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 236 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 237 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 238 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 239 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 240 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 241 |
+
*/
|
| 242 |
+
|
| 243 |
+
jQuery(document).ready(function ($) {
|
| 244 |
+
'use strict';
|
| 245 |
+
|
| 246 |
+
// Reset feedback form
|
| 247 |
+
|
| 248 |
+
$('.ai1wm-feedback-type').attr('checked', false);
|
| 249 |
+
|
| 250 |
+
// Review
|
| 251 |
+
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
| 252 |
+
var radio = $('#ai1wm-feedback-type-1');
|
| 253 |
+
if (radio.is(':checked')) {
|
| 254 |
+
radio.attr('checked', false);
|
| 255 |
+
e.preventDefault();
|
| 256 |
+
} else {
|
| 257 |
+
radio.attr('checked', true);
|
| 258 |
+
}
|
| 259 |
+
});
|
| 260 |
+
|
| 261 |
+
// Improvement
|
| 262 |
+
$('#ai1wm-feedback-type-2').click(function () {
|
| 263 |
+
// Hide other options
|
| 264 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
| 265 |
+
|
| 266 |
+
// change placeholder message
|
| 267 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
|
| 268 |
+
|
| 269 |
+
// Show feedback form
|
| 270 |
+
$('.ai1wm-feedback-form').fadeIn();
|
| 271 |
+
});
|
| 272 |
+
|
| 273 |
+
// Help
|
| 274 |
+
$('#ai1wm-feedback-type-3').click(function () {
|
| 275 |
+
// Hide other options
|
| 276 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
| 277 |
+
|
| 278 |
+
// change placeholder message
|
| 279 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
|
| 280 |
+
|
| 281 |
+
// Show feedback form
|
| 282 |
+
$('.ai1wm-feedback-form').fadeIn();
|
| 283 |
+
});
|
| 284 |
+
|
| 285 |
+
// Cancel feedback form
|
| 286 |
+
$('#ai1wm-feedback-cancel').click(function (e) {
|
| 287 |
+
$('.ai1wm-feedback-form').fadeOut(function () {
|
| 288 |
+
$('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
|
| 289 |
+
});
|
| 290 |
+
e.preventDefault();
|
| 291 |
+
});
|
| 292 |
+
|
| 293 |
+
// Send feedback form
|
| 294 |
+
$('#ai1wm-feedback-submit').click(function () {
|
| 295 |
+
var type = $('.ai1wm-feedback-type:checked').val();
|
| 296 |
+
var email = $('.ai1wm-feedback-email').val();
|
| 297 |
+
var message = $('.ai1wm-feedback-message').val();
|
| 298 |
+
var terms = $('.ai1wm-feedback-terms').is(':checked');
|
| 299 |
+
|
| 300 |
+
$.ajax({
|
| 301 |
+
type: 'POST',
|
| 302 |
+
url: ai1wm_feedback.ajax.url,
|
| 303 |
+
data: { 'ai1wm-type': type, 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
|
| 304 |
+
success: function success(data) {
|
| 305 |
+
var errors = data.errors;
|
| 306 |
+
if (errors.length > 0) {
|
| 307 |
+
// Reset previous messages
|
| 308 |
+
$('.ai1wm-feedback .ai1wm-message').remove();
|
| 309 |
+
|
| 310 |
+
var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
| 311 |
+
$.each(errors, function (key, value) {
|
| 312 |
+
content.append('<p>' + value + '</p>');
|
| 313 |
+
});
|
| 314 |
+
|
| 315 |
+
$('.ai1wm-feedback').prepend(content);
|
| 316 |
+
} else {
|
| 317 |
+
var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
| 318 |
+
$('.ai1wm-feedback').html(_content);
|
| 319 |
+
}
|
| 320 |
+
},
|
| 321 |
+
dataType: 'json',
|
| 322 |
+
async: false
|
| 323 |
+
});
|
| 324 |
+
});
|
| 325 |
+
});
|
| 326 |
+
|
| 327 |
+
/***/ },
|
| 328 |
+
/* 3 */
|
| 329 |
+
/***/ function(module, exports) {
|
| 330 |
+
|
| 331 |
+
'use strict';
|
| 332 |
+
|
| 333 |
+
/**
|
| 334 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 335 |
+
*
|
| 336 |
+
* This program is free software: you can redistribute it and/or modify
|
| 337 |
+
* it under the terms of the GNU General Public License as published by
|
| 338 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 339 |
+
* (at your option) any later version.
|
| 340 |
+
*
|
| 341 |
+
* This program is distributed in the hope that it will be useful,
|
| 342 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 343 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 344 |
+
* GNU General Public License for more details.
|
| 345 |
+
*
|
| 346 |
+
* You should have received a copy of the GNU General Public License
|
| 347 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 348 |
+
*
|
| 349 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 350 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 351 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 352 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 353 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 354 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 355 |
+
*/
|
| 356 |
+
|
| 357 |
+
var $ = jQuery;
|
| 358 |
+
|
| 359 |
+
module.exports = {
|
| 360 |
+
random: function random(len) {
|
| 361 |
+
var text = '';
|
| 362 |
+
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
| 363 |
+
|
| 364 |
+
for (var i = 0; i < len; i++) {
|
| 365 |
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
return text;
|
| 369 |
+
},
|
| 370 |
+
form: function form(id) {
|
| 371 |
+
return $(id).serializeArray();
|
| 372 |
+
},
|
| 373 |
+
ucfirst: function ucfirst(text) {
|
| 374 |
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
| 375 |
+
},
|
| 376 |
+
list: function list(input) {
|
| 377 |
+
// Convert object to list
|
| 378 |
+
if ($.isPlainObject(input)) {
|
| 379 |
+
var result = [];
|
| 380 |
+
var params = decodeURIComponent($.param(input)).split('&');
|
| 381 |
+
|
| 382 |
+
// Loop over params
|
| 383 |
+
$.each(params, function (index, item) {
|
| 384 |
+
var value = item.split('=');
|
| 385 |
+
|
| 386 |
+
// Add item
|
| 387 |
+
result.push({ name: value[0], value: value[1] });
|
| 388 |
+
});
|
| 389 |
+
|
| 390 |
+
return result;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
return input;
|
| 394 |
+
}
|
| 395 |
+
};
|
| 396 |
+
|
| 397 |
+
/***/ },
|
| 398 |
+
/* 4 */
|
| 399 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 400 |
+
|
| 401 |
+
'use strict';
|
| 402 |
+
|
| 403 |
+
/**
|
| 404 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 405 |
+
*
|
| 406 |
+
* This program is free software: you can redistribute it and/or modify
|
| 407 |
+
* it under the terms of the GNU General Public License as published by
|
| 408 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 409 |
+
* (at your option) any later version.
|
| 410 |
+
*
|
| 411 |
+
* This program is distributed in the hope that it will be useful,
|
| 412 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 413 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 414 |
+
* GNU General Public License for more details.
|
| 415 |
+
*
|
| 416 |
+
* You should have received a copy of the GNU General Public License
|
| 417 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 418 |
+
*
|
| 419 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 420 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 421 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 422 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 423 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 424 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 425 |
+
*/
|
| 426 |
+
|
| 427 |
+
var Util = __webpack_require__(3),
|
| 428 |
+
Modal = __webpack_require__(5),
|
| 429 |
+
$ = jQuery;
|
| 430 |
+
|
| 431 |
+
var Import = function Import() {
|
| 432 |
+
var self = this;
|
| 433 |
+
|
| 434 |
+
// Set params
|
| 435 |
+
this.params = [];
|
| 436 |
+
|
| 437 |
+
// Set modal
|
| 438 |
+
this.modal = new Modal();
|
| 439 |
+
|
| 440 |
+
// Set confirm listener
|
| 441 |
+
this.modal.onConfirm = function (options) {
|
| 442 |
+
self.onConfirm(options);
|
| 443 |
+
};
|
| 444 |
+
|
| 445 |
+
// Set blogs listener
|
| 446 |
+
this.modal.onBlogs = function (options) {
|
| 447 |
+
self.onBlogs(options);
|
| 448 |
+
};
|
| 449 |
+
|
| 450 |
+
// Set stop listener
|
| 451 |
+
this.modal.onStop = function (options) {
|
| 452 |
+
self.onStop(options);
|
| 453 |
+
};
|
| 454 |
+
};
|
| 455 |
+
|
| 456 |
+
Import.prototype.setParams = function (params) {
|
| 457 |
+
this.params = Util.list(params);
|
| 458 |
+
};
|
| 459 |
+
|
| 460 |
+
Import.prototype.start = function (options) {
|
| 461 |
+
var self = this;
|
| 462 |
+
|
| 463 |
+
// Initializing beforeunload event
|
| 464 |
+
$(window).bind('beforeunload', function () {
|
| 465 |
+
return 'You are about to stop importing your website, are you sure?';
|
| 466 |
+
});
|
| 467 |
+
|
| 468 |
+
// Set stop
|
| 469 |
+
this.stop = false;
|
| 470 |
+
|
| 471 |
+
// Set initial status
|
| 472 |
+
this.setStatus({ type: 'info', message: 'Preparing to import...' });
|
| 473 |
+
|
| 474 |
+
// Set params
|
| 475 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
|
| 476 |
+
|
| 477 |
+
// Set additional params
|
| 478 |
+
if (options) {
|
| 479 |
+
params = params.concat(Util.list(options));
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
// Import
|
| 483 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 484 |
+
self.getStatus();
|
| 485 |
+
}).fail(function () {
|
| 486 |
+
self.setStatus({
|
| 487 |
+
type: 'error',
|
| 488 |
+
message: 'Unable to start the import. Refresh the page and try again'
|
| 489 |
+
});
|
| 490 |
+
});
|
| 491 |
+
};
|
| 492 |
+
|
| 493 |
+
Import.prototype.confirm = function (options) {
|
| 494 |
+
var self = this;
|
| 495 |
+
|
| 496 |
+
// Set params
|
| 497 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
| 498 |
+
|
| 499 |
+
// Set additional params
|
| 500 |
+
if (options) {
|
| 501 |
+
params = params.concat(Util.list(options));
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
// Confirm
|
| 505 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 506 |
+
self.getStatus(ai1wm_import.status.php);
|
| 507 |
+
}).fail(function () {
|
| 508 |
+
self.setStatus({
|
| 509 |
+
type: 'error',
|
| 510 |
+
message: 'Unable to confirm the import. Refresh the page and try again'
|
| 511 |
+
});
|
| 512 |
+
});
|
| 513 |
+
};
|
| 514 |
+
|
| 515 |
+
Import.prototype.blogs = function (options) {
|
| 516 |
+
var self = this;
|
| 517 |
+
|
| 518 |
+
// Set params
|
| 519 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
| 520 |
+
|
| 521 |
+
// Set additional params
|
| 522 |
+
if (options) {
|
| 523 |
+
params = params.concat(Util.list(options));
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
// Blogs
|
| 527 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 528 |
+
self.getStatus(ai1wm_import.status.php);
|
| 529 |
+
}).fail(function () {
|
| 530 |
+
self.setStatus({
|
| 531 |
+
type: 'error',
|
| 532 |
+
message: 'Unable to prepare blogs the import. Refresh the page and try again'
|
| 533 |
+
});
|
| 534 |
+
});
|
| 535 |
+
};
|
| 536 |
+
|
| 537 |
+
Import.prototype.clean = function (options) {
|
| 538 |
+
var self = this;
|
| 539 |
+
|
| 540 |
+
// Set stop
|
| 541 |
+
this.stop = true;
|
| 542 |
+
|
| 543 |
+
// Set params
|
| 544 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
|
| 545 |
+
|
| 546 |
+
// Set additional params
|
| 547 |
+
if (options) {
|
| 548 |
+
params = params.concat(Util.list(options));
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
// Clean
|
| 552 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 553 |
+
// Unbinding the beforeunload event when we stop importing
|
| 554 |
+
$(window).unbind('beforeunload');
|
| 555 |
+
}).fail(function () {
|
| 556 |
+
self.setStatus({
|
| 557 |
+
type: 'error',
|
| 558 |
+
message: 'Unable to clean the import. Refresh the page and try again'
|
| 559 |
+
});
|
| 560 |
+
});
|
| 561 |
+
};
|
| 562 |
+
|
| 563 |
+
Import.prototype.getStatus = function (url, retry) {
|
| 564 |
+
var self = this,
|
| 565 |
+
retry = retry || 0;
|
| 566 |
+
|
| 567 |
+
// Stop getting status
|
| 568 |
+
if (this.stop) {
|
| 569 |
+
return;
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
$.ajax({
|
| 573 |
+
cache: false,
|
| 574 |
+
url: url,
|
| 575 |
+
dataType: 'json'
|
| 576 |
+
}).done(function (params) {
|
| 577 |
+
if (params) {
|
| 578 |
+
self.setStatus(params);
|
| 579 |
+
|
| 580 |
+
// Next status
|
| 581 |
+
switch (params.type) {
|
| 582 |
+
case 'done':
|
| 583 |
+
case 'error':
|
| 584 |
+
// Unbinding the beforeunload event when any case is performed
|
| 585 |
+
$(window).unbind('beforeunload');
|
| 586 |
+
return;
|
| 587 |
+
|
| 588 |
+
case 'confirm':
|
| 589 |
+
case 'blogs':
|
| 590 |
+
return;
|
| 591 |
+
}
|
| 592 |
+
}
|
| 593 |
+
|
| 594 |
+
// Import is not done yet, let's check status in 3 seconds
|
| 595 |
+
setTimeout(function () {
|
| 596 |
+
self.getStatus(url, retry);
|
| 597 |
+
}, 3000);
|
| 598 |
+
}).fail(function () {
|
| 599 |
+
retry++;
|
| 600 |
+
|
| 601 |
+
// Retry 6 times
|
| 602 |
+
if (retry >= 6) {
|
| 603 |
+
self.setStatus({
|
| 604 |
+
type: 'error',
|
| 605 |
+
message: 'Unable to retrieve status of the import. Is your server running?'
|
| 606 |
+
});
|
| 607 |
+
} else if (retry >= 3) {
|
| 608 |
+
self.getStatus(ai1wm_import.status.js, retry);
|
| 609 |
+
} else {
|
| 610 |
+
self.getStatus(ai1wm_import.status.php, retry);
|
| 611 |
+
}
|
| 612 |
+
});;
|
| 613 |
+
};
|
| 614 |
+
|
| 615 |
+
Import.prototype.setStatus = function (params) {
|
| 616 |
+
this.modal.render(params);
|
| 617 |
+
};
|
| 618 |
+
|
| 619 |
+
Import.prototype.onConfirm = function (options) {
|
| 620 |
+
this.confirm(options);
|
| 621 |
+
};
|
| 622 |
+
|
| 623 |
+
Import.prototype.onBlogs = function (options) {
|
| 624 |
+
this.blogs(options);
|
| 625 |
+
};
|
| 626 |
+
|
| 627 |
+
Import.prototype.onStop = function (options) {
|
| 628 |
+
this.clean(options);
|
| 629 |
+
};
|
| 630 |
+
|
| 631 |
+
module.exports = Import;
|
| 632 |
+
|
| 633 |
+
/***/ },
|
| 634 |
+
/* 5 */
|
| 635 |
+
/***/ function(module, exports) {
|
| 636 |
+
|
| 637 |
+
'use strict';
|
| 638 |
+
|
| 639 |
+
/**
|
| 640 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 641 |
+
*
|
| 642 |
+
* This program is free software: you can redistribute it and/or modify
|
| 643 |
+
* it under the terms of the GNU General Public License as published by
|
| 644 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 645 |
+
* (at your option) any later version.
|
| 646 |
+
*
|
| 647 |
+
* This program is distributed in the hope that it will be useful,
|
| 648 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 649 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 650 |
+
* GNU General Public License for more details.
|
| 651 |
+
*
|
| 652 |
+
* You should have received a copy of the GNU General Public License
|
| 653 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 654 |
+
*
|
| 655 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 656 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 657 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 658 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 659 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 660 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 661 |
+
*/
|
| 662 |
+
|
| 663 |
+
var $ = jQuery;
|
| 664 |
+
|
| 665 |
+
var Modal = function Modal() {
|
| 666 |
+
var self = this;
|
| 667 |
+
this.view = null;
|
| 668 |
+
|
| 669 |
+
// Error Modal
|
| 670 |
+
this.error = function (params) {
|
| 671 |
+
|
| 672 |
+
// Create the modal container
|
| 673 |
+
var container = $('<div></div>');
|
| 674 |
+
|
| 675 |
+
// Create section to hold title, message and action
|
| 676 |
+
var section = $('<section></section>');
|
| 677 |
+
|
| 678 |
+
// Create header to hold title
|
| 679 |
+
var header = $('<h1></h1>');
|
| 680 |
+
|
| 681 |
+
// Create paragraph to hold mesage
|
| 682 |
+
var message = $('<p></p>').html(params.message);
|
| 683 |
+
|
| 684 |
+
// Create action section
|
| 685 |
+
var action = $('<div></div>');
|
| 686 |
+
|
| 687 |
+
// Create title
|
| 688 |
+
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to import');
|
| 689 |
+
|
| 690 |
+
// Create close button
|
| 691 |
+
var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 692 |
+
self.modal.hide();
|
| 693 |
+
self.overlay.hide();
|
| 694 |
+
});
|
| 695 |
+
|
| 696 |
+
// Append close button
|
| 697 |
+
action.append(closeButton);
|
| 698 |
+
|
| 699 |
+
// Append title to section
|
| 700 |
+
header.append(title);
|
| 701 |
+
|
| 702 |
+
// Append header and message to section
|
| 703 |
+
section.append(header).append(message);
|
| 704 |
+
|
| 705 |
+
// Append section and action to container
|
| 706 |
+
container.append(section).append(action);
|
| 707 |
+
|
| 708 |
+
// Render modal
|
| 709 |
+
self.modal.html(container).show();
|
| 710 |
+
self.overlay.show();
|
| 711 |
+
};
|
| 712 |
+
|
| 713 |
+
// Progress Modal
|
| 714 |
+
this.progress = function (params) {
|
| 715 |
+
if (this.view === 'progress') {
|
| 716 |
+
// Update progressBarMeter
|
| 717 |
+
this.progress.progressBarMeter.width(params.percent + '%');
|
| 718 |
+
|
| 719 |
+
// Update progressBarPercent
|
| 720 |
+
this.progress.progressBarPercent.text(params.percent + '%');
|
| 721 |
+
} else {
|
| 722 |
+
|
| 723 |
+
// Create the modal container
|
| 724 |
+
var container = $('<div></div>');
|
| 725 |
+
|
| 726 |
+
// Create section to hold title, message and action
|
| 727 |
+
var section = $('<section></section>');
|
| 728 |
+
|
| 729 |
+
// Create header to hold progress bar
|
| 730 |
+
var header = $('<h1></h1>');
|
| 731 |
+
|
| 732 |
+
// Create paragraph to hold mesage
|
| 733 |
+
var message = $('<p></p>');
|
| 734 |
+
|
| 735 |
+
// Create action section
|
| 736 |
+
var action = $('<div></div>');
|
| 737 |
+
|
| 738 |
+
// Create progressBar
|
| 739 |
+
var progressBar = $('<span class="ai1wm-progress-bar"></span>');
|
| 740 |
+
|
| 741 |
+
// Create progressBarMeter
|
| 742 |
+
this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
|
| 743 |
+
|
| 744 |
+
// Create progressBarPercent
|
| 745 |
+
this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
|
| 746 |
+
|
| 747 |
+
// Create stop import
|
| 748 |
+
var stopButton = $('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
|
| 749 |
+
$(this).attr('disabled', 'disabled');
|
| 750 |
+
self.onStop();
|
| 751 |
+
self.modal.hide();
|
| 752 |
+
self.overlay.hide();
|
| 753 |
+
});
|
| 754 |
+
|
| 755 |
+
// Append progress meter and progress percent
|
| 756 |
+
progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
|
| 757 |
+
|
| 758 |
+
// Append stop button
|
| 759 |
+
action.append(stopButton);
|
| 760 |
+
|
| 761 |
+
// Append progress bar to section
|
| 762 |
+
header.append(progressBar);
|
| 763 |
+
|
| 764 |
+
// Append header to section
|
| 765 |
+
section.append(header);
|
| 766 |
+
|
| 767 |
+
// Append section and action to container
|
| 768 |
+
container.append(section).append(action);
|
| 769 |
+
|
| 770 |
+
// Render modal
|
| 771 |
+
self.modal.html(container).show();
|
| 772 |
+
self.overlay.show();
|
| 773 |
+
}
|
| 774 |
+
};
|
| 775 |
+
|
| 776 |
+
// Confirm Modal
|
| 777 |
+
this.confirm = function (params) {
|
| 778 |
+
|
| 779 |
+
// Create the modal container
|
| 780 |
+
var container = $('<div></div>');
|
| 781 |
+
|
| 782 |
+
// Create section to hold title, message and action
|
| 783 |
+
var section = $('<section></section>');
|
| 784 |
+
|
| 785 |
+
// Create header to hold warning
|
| 786 |
+
var header = $('<h1></h1>');
|
| 787 |
+
|
| 788 |
+
// Create paragraph to hold mesage
|
| 789 |
+
var message = $('<p></p>').html(params.message);
|
| 790 |
+
|
| 791 |
+
// Create action section
|
| 792 |
+
var action = $('<div></div>');
|
| 793 |
+
|
| 794 |
+
// Create warning
|
| 795 |
+
var warning = $('<span class="ai1wm-icon-notification"></span>');
|
| 796 |
+
|
| 797 |
+
// Create confirm button
|
| 798 |
+
var confirmButton = $('<button class="ai1wm-button-green">Continue</button>').on('click', function () {
|
| 799 |
+
$(this).attr('disabled', 'disabled');
|
| 800 |
+
self.onConfirm();
|
| 801 |
+
});
|
| 802 |
+
|
| 803 |
+
// Append confirm button
|
| 804 |
+
action.append(confirmButton);
|
| 805 |
+
|
| 806 |
+
// Append warning to section
|
| 807 |
+
header.append(warning);
|
| 808 |
+
|
| 809 |
+
// Append header and message to section
|
| 810 |
+
section.append(header).append(message);
|
| 811 |
+
|
| 812 |
+
// Append section and action to container
|
| 813 |
+
container.append(section).append(action);
|
| 814 |
+
|
| 815 |
+
// Render modal
|
| 816 |
+
self.modal.html(container).show();
|
| 817 |
+
self.overlay.show();
|
| 818 |
+
};
|
| 819 |
+
|
| 820 |
+
// Blogs Modal
|
| 821 |
+
this.blogs = function (params) {
|
| 822 |
+
|
| 823 |
+
// Create the modal container
|
| 824 |
+
var container = $('<form></form>');
|
| 825 |
+
|
| 826 |
+
// Create section to hold title, message and action
|
| 827 |
+
var section = $('<section></section>');
|
| 828 |
+
|
| 829 |
+
// Create header to hold title
|
| 830 |
+
var header = $('<h1></h1>');
|
| 831 |
+
|
| 832 |
+
// Create paragraph to hold mesage
|
| 833 |
+
var message = $('<p></p>').html(params.message);
|
| 834 |
+
|
| 835 |
+
// Create action section
|
| 836 |
+
var action = $('<div></div>');
|
| 837 |
+
|
| 838 |
+
// Create title
|
| 839 |
+
var title = $('<span></span>').addClass('ai1wm-title-grey').text('Update subsite name');
|
| 840 |
+
|
| 841 |
+
// Create continue button
|
| 842 |
+
var continueButton = $('<button class="ai1wm-button-green">Continue</button>').on('click', function () {
|
| 843 |
+
$(this).attr('disabled', 'disabled');
|
| 844 |
+
self.onBlogs($(this).closest('form').serializeArray());
|
| 845 |
+
});
|
| 846 |
+
|
| 847 |
+
// Append continue button
|
| 848 |
+
action.append(continueButton);
|
| 849 |
+
|
| 850 |
+
// Append title to section
|
| 851 |
+
header.append(title);
|
| 852 |
+
|
| 853 |
+
// Append header and message to section
|
| 854 |
+
section.append(header).append(message);
|
| 855 |
+
|
| 856 |
+
// Append section and action to container
|
| 857 |
+
container.append(section).append(action);
|
| 858 |
+
|
| 859 |
+
// Render modal
|
| 860 |
+
self.modal.html(container).show();
|
| 861 |
+
self.overlay.show();
|
| 862 |
+
};
|
| 863 |
+
|
| 864 |
+
// Info Modal
|
| 865 |
+
this.info = function (params) {
|
| 866 |
+
|
| 867 |
+
// Create the modal container
|
| 868 |
+
var container = $('<div></div>');
|
| 869 |
+
|
| 870 |
+
// Create section to hold title, message and action
|
| 871 |
+
var section = $('<section></section>');
|
| 872 |
+
|
| 873 |
+
// Create header to hold loader
|
| 874 |
+
var header = $('<h1></h1>');
|
| 875 |
+
|
| 876 |
+
// Create paragraph to hold mesage
|
| 877 |
+
var message = $('<p></p>').html(params.message);
|
| 878 |
+
|
| 879 |
+
// Create action section
|
| 880 |
+
var action = $('<div></div>');
|
| 881 |
+
|
| 882 |
+
// Create loader
|
| 883 |
+
var loader = $('<span class="ai1wm-loader"></span>');
|
| 884 |
+
|
| 885 |
+
// Create stop import
|
| 886 |
+
var stopButton = $('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr('disabled', 'disabled');
|
| 887 |
+
|
| 888 |
+
// Append stop button
|
| 889 |
+
action.append(stopButton);
|
| 890 |
+
|
| 891 |
+
// Append loader to header
|
| 892 |
+
header.append(loader);
|
| 893 |
+
|
| 894 |
+
// Append header and message to section
|
| 895 |
+
section.append(header).append(message);
|
| 896 |
+
|
| 897 |
+
// Append section and action to container
|
| 898 |
+
container.append(section).append(action);
|
| 899 |
+
|
| 900 |
+
// Render modal
|
| 901 |
+
self.modal.html(container).show();
|
| 902 |
+
self.overlay.show();
|
| 903 |
+
};
|
| 904 |
+
|
| 905 |
+
// Done Modal
|
| 906 |
+
this.done = function (params) {
|
| 907 |
+
|
| 908 |
+
// Create the modal container
|
| 909 |
+
var container = $('<div></div>');
|
| 910 |
+
|
| 911 |
+
// Create section to hold title, message and action
|
| 912 |
+
var section = $('<section></section>');
|
| 913 |
+
|
| 914 |
+
// Create header to hold title
|
| 915 |
+
var header = $('<h1></h1>');
|
| 916 |
+
|
| 917 |
+
// Create paragraph to hold mesage
|
| 918 |
+
var message = $('<p></p>').html(params.message);
|
| 919 |
+
|
| 920 |
+
// Create action section
|
| 921 |
+
var action = $('<div></div>');
|
| 922 |
+
|
| 923 |
+
// Create title
|
| 924 |
+
var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
|
| 925 |
+
|
| 926 |
+
// Create close button
|
| 927 |
+
var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 928 |
+
self.modal.hide();
|
| 929 |
+
self.overlay.hide();
|
| 930 |
+
});
|
| 931 |
+
|
| 932 |
+
// Append close button
|
| 933 |
+
action.append(closeButton);
|
| 934 |
+
|
| 935 |
+
// Append title to section
|
| 936 |
+
header.append(title);
|
| 937 |
+
|
| 938 |
+
// Append header and message to section
|
| 939 |
+
section.append(header).append(message);
|
| 940 |
+
|
| 941 |
+
// Append section and action to container
|
| 942 |
+
container.append(section).append(action);
|
| 943 |
+
|
| 944 |
+
// Render modal
|
| 945 |
+
self.modal.html(container).show();
|
| 946 |
+
self.overlay.show();
|
| 947 |
+
};
|
| 948 |
+
|
| 949 |
+
// Create the overlay
|
| 950 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
| 951 |
+
|
| 952 |
+
// Create the modal container
|
| 953 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
| 954 |
+
|
| 955 |
+
$('body').append(this.overlay) // Append overlay to body
|
| 956 |
+
.append(this.modal); // Append modal to body
|
| 957 |
+
};
|
| 958 |
+
|
| 959 |
+
Modal.prototype.render = function (params) {
|
| 960 |
+
|
| 961 |
+
// Show modal
|
| 962 |
+
switch (params.type) {
|
| 963 |
+
case 'error':
|
| 964 |
+
this.error(params);
|
| 965 |
+
break;
|
| 966 |
+
|
| 967 |
+
case 'confirm':
|
| 968 |
+
this.confirm(params);
|
| 969 |
+
break;
|
| 970 |
+
|
| 971 |
+
case 'blogs':
|
| 972 |
+
this.blogs(params);
|
| 973 |
+
break;
|
| 974 |
+
|
| 975 |
+
case 'progress':
|
| 976 |
+
this.progress(params);
|
| 977 |
+
break;
|
| 978 |
+
|
| 979 |
+
case 'info':
|
| 980 |
+
this.info(params);
|
| 981 |
+
break;
|
| 982 |
+
|
| 983 |
+
case 'done':
|
| 984 |
+
this.done(params);
|
| 985 |
+
break;
|
| 986 |
+
}
|
| 987 |
+
|
| 988 |
+
this.view = params.type;
|
| 989 |
+
};
|
| 990 |
+
|
| 991 |
+
module.exports = Modal;
|
| 992 |
+
|
| 993 |
+
/***/ }
|
| 994 |
+
/******/ ]);
|
lib/view/assets/javascript/export.min.js
CHANGED
|
@@ -1 +1,1049 @@
|
|
| 1 |
-
!function e(t,a,i){function o(r,s){if(!a[r]){if(!t[r]){var c="function"==typeof require&&require;if(!s&&c)return c(r,!0);if(n)return n(r,!0);throw new Error("Cannot find module '"+r+"'")}var p=a[r]={exports:{}};t[r][0].call(p.exports,function(e){var a=t[r][1][e];return o(a?a:e)},p,p.exports,e,t,a,i)}return a[r].exports}for(var n="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(e,t){var a=e("../servmask/util"),i=e("./modal"),o=jQuery,n=function(){var e=this;this.params=[],this.modal=new i,this.modal.onStop=function(t){e.onStop(t)}};n.prototype.setParams=function(e){this.params=a.list(e)},n.prototype.start=function(e){var t=this;o(window).bind("beforeunload",function(){return"You are about to stop exporting your website, are you sure?"}),this.stop=!1,this.setStatus({type:"info",message:"Preparing to export..."});var i=this.params.concat({name:"secret_key",value:ai1wm_export.secret_key});e&&(i=i.concat(a.list(e))),o.post(ai1wm_export.ajax.url,i).done(function(){t.getStatus(ai1wm_export.status.php)}).fail(function(){t.setStatus({type:"error",message:"Unable to start the export. Refresh the page and try again"})})},n.prototype.clean=function(e){var t=this;this.stop=!0;var i=this.params.concat({name:"secret_key",value:ai1wm_export.secret_key}).concat({name:"priority",value:300});e&&(i=i.concat(a.list(e))),o.post(ai1wm_export.ajax.url,i).done(function(){o(window).unbind("beforeunload")}).fail(function(){t.setStatus({type:"error",message:"Unable to clean the export. Refresh the page and try again"})})},n.prototype.getStatus=function(e,t){var a=this,t=t||0;this.stop||o.ajax({cache:!1,url:e,dataType:"json"}).done(function(i){if(i)switch(a.setStatus(i),i.type){case"done":case"error":case"download":return o(window).unbind("beforeunload"),void 0}setTimeout(function(){a.getStatus(e,t)},3e3)}).fail(function(){t++,t>=6?a.setStatus({type:"error",message:"Unable to retrieve status of the export. Is your server running?"}):t>=3?a.getStatus(ai1wm_export.status.js,t):a.getStatus(ai1wm_export.status.php,t)})},n.prototype.setStatus=function(e){this.modal.render(e)},n.prototype.onStop=function(e){this.clean(e)},t.exports=n},{"../servmask/util":10,"./modal":2}],2:[function(e,t){var a=jQuery,i=function(){var e=this;this.error=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=a("<h1></h1>"),r=a("<p></p>").html(t.message),s=a("<div></div>"),c=a("<span></span>").addClass("ai1wm-title-red").text("Unable to export"),p=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});s.append(p),n.append(c),o.append(n).append(r),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.info=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=a("<h1></h1>"),r=a("<p></p>").html(t.message),s=a("<div></div>"),c=a('<span class="ai1wm-loader"></span>'),p=a('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop export</button>').on("click",function(){a(this).attr("disabled","disabled"),e.onStop(),e.modal.hide(),e.overlay.hide()});s.append(p),n.append(c),o.append(n).append(r),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.done=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=a("<h1></h1>"),r=a("<p></p>").html(t.message),s=a("<div></div>"),c=a("<span></span>").addClass("ai1wm-title-green").text(t.title),p=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});s.append(p),n.append(c),o.append(n).append(r),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.download=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=(a("<h1></h1>"),a("<p></p>").html(t.message)),r=a("<div></div>"),s=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});r.append(s),o.append(n),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.overlay=a('<div class="ai1wm-overlay"></div>'),this.modal=a('<div class="ai1wm-modal-container"></div>'),a("body").append(this.overlay).append(this.modal)};i.prototype.render=function(e){switch(e.type){case"error":this.error(e);break;case"info":this.info(e);break;case"done":this.done(e);break;case"download":this.download(e)}},t.exports=i},{}],3:[function(e){(function(t){var a=(e("./jquery/query"),e("./jquery/find_replace"),e("./servmask/report"),e("./servmask/feedback"),e("./servmask/util")),i=(e("./servmask/deprecated"),e("./export/export"));jQuery(document).ready(function(e){"use strict";var t=new i;e("#ai1wm-export-file").click(function(e){var i=a.random(12),o=a.form("#ai1wm-export-form").concat({name:"storage",value:i});t.setParams(o),t.start(),e.preventDefault()}),e(".ai1wm-accordion > .ai1wm-title").click(function(){e(this).parent().toggleClass("ai1wm-active")}),e("#ai1wm-add-new-replace-button").ai1wm_find_replace(),e(".ai1wm-expandable > p:first, .ai1wm-expandable > h4:first, .ai1wm-expandable > div.ai1wm-button-main").on("click",function(){e(this).parent().toggleClass("ai1wm-open")}),e(".ai1wm-collapsable").ai1wm_query()}),t.Ai1wm={Util:a,Export:i}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./export/export":1,"./jquery/find_replace":4,"./jquery/query":5,"./servmask/deprecated":6,"./servmask/feedback":8,"./servmask/report":9,"./servmask/util":10}],4:[function(){!function(e){e.fn.ai1wm_find_replace=function(){return e(this).click(function(t){t.preventDefault();var a=e("#ai1wm-queries > li:first").clone();a.find("input").val(""),a.find(".ai1wm-query-find-text").html("<text>"),a.find(".ai1wm-query-replace-text").html("<another-text>"),e("#ai1wm-queries > li").removeClass("ai1wm-open"),e(a).addClass("ai1wm-open"),e("#ai1wm-queries").append(a),e(a).ai1wm_query(),e(a).find("p:first").on("click",function(){e(this).parent().toggleClass("ai1wm-open")})}),this}}(jQuery)},{}],5:[function(){!function(e){e.fn.ai1wm_query=function(){var t=e(this).find("input.ai1wm-query-find-input"),a=e(this).find("input.ai1wm-query-replace-input"),i=e(this).find("small.ai1wm-query-find-text"),o=e(this).find("small.ai1wm-query-replace-text");return t.on("change paste input keypress keydown keyup",function(){var t=e(this).val().length>0?e(this).val():"<text>";i.text(t)}),a.on("change paste input keypress keydown keyup",function(){var t=e(this).val().length>0?e(this).val():"<another-text>";o.text(t)}),this}}(jQuery)},{}],6:[function(e){var t=(e("./util"),e("./dialog")),a={s3:"Amazon S3 Extension",url:"URL Extension",ftp:"FTP Extension",gdrive:"Google Drive Extension",dropbox:"Dropbox Extension"};window.Ai1wmExportController=function(e){this._export={},this._provider=e},window.Ai1wmExportController.prototype.start=function(){new t("<strong>All in One WP Migration</strong> is not compatible with current version of <strong>"+a[this._provider]+'</strong>. Please contact <a href="mailto:support@servmask.com">support@servmask.com</a> for more details.')},window.Ai1wmImportController=function(e){this._import={},this._provider=e},window.Ai1wmImportController.prototype.init=function(){},window.Ai1wmImportController.prototype.download=function(){new t("<strong>All in One WP Migration</strong> is not compatible with current version of <strong>"+a[this._provider]+'</strong>. Please contact <a href="mailto:support@servmask.com">support@servmask.com</a> for more details.')}},{"./dialog":7,"./util":10}],7:[function(e,t){var a=jQuery,i=function(e){var t=this;this.overlay=a('<div class="ai1wm-overlay"></div>'),this.container=a("<div></div>"),this.modal=a('<div class="ai1wm-modal-container"></div>'),this.section=a("<section></section>"),this.message=a("<p></p>").addClass("ai1wm-dialog-message").html(e),this.action=a("<div></div>"),this.closeButton=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){t.modal.hide(),t.overlay.hide()}),this.action.append(this.closeButton),this.section.append(this.message),this.container.append(this.section).append(this.action),this.modal.html(this.container).show(),this.overlay.show(),a("body").append(this.overlay).append(this.modal)};t.exports=i},{}],8:[function(){jQuery(document).ready(function(e){"use strict";e(".ai1wm-feedback-type").attr("checked",!1),e("#ai1wm-feedback-type-link-1").click(function(t){var a=e("#ai1wm-feedback-type-1");a.is(":checked")?(a.attr("checked",!1),t.preventDefault()):a.attr("checked",!0)}),e("#ai1wm-feedback-type-2").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-3").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","Leave plugin developers any feedback here"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-type-3").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-2").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","How may we help you?"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-cancel").click(function(t){e(".ai1wm-feedback-form").fadeOut(function(){e(".ai1wm-feedback-type").attr("checked",!1).closest("li").show()}),t.preventDefault()}),e("#ai1wm-feedback-submit").click(function(){var t=e(".ai1wm-feedback-type:checked").val(),a=e(".ai1wm-feedback-email").val(),i=e(".ai1wm-feedback-message").val(),o=e(".ai1wm-feedback-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_feedback.ajax.url,data:{"ai1wm-type":t,"ai1wm-email":a,"ai1wm-message":i,"ai1wm-terms":+o},success:function(t){var a=t.errors;if(a.length>0){e(".ai1wm-feedback .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(a,function(e,t){i.append("<p>"+t+"</p>")}),e(".ai1wm-feedback").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your feedback!</p>");e(".ai1wm-feedback").html(o)}},dataType:"json",async:!1})})})},{}],9:[function(){jQuery(document).ready(function(e){"use strict";e("#ai1wm-report-problem-button").click(function(t){e(this).next(".ai1wm-report-problem-dialog").toggleClass("ai1wm-report-active"),t.preventDefault()}),e("#ai1wm-report-cancel").click(function(t){e(this).closest(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active"),t.preventDefault()}),e("#ai1wm-report-submit").click(function(){var t=e(".ai1wm-report-email").val(),a=e(".ai1wm-report-message").val(),i=e(".ai1wm-report-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_report.ajax.url,data:{"ai1wm-email":t,"ai1wm-message":a,"ai1wm-terms":+i},success:function(t){var a=t.errors;if(a.length>0){e(".ai1wm-report-problem-dialog .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(a,function(e,t){i.append("<p>"+t+"</p>")}),e(".ai1wm-report-problem-dialog").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your request!</p>");e(".ai1wm-report-problem-dialog").html(o),setTimeout(function(){e(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active")},2e3)}},dataType:"json",async:!1})})})},{}],10:[function(e,t){var a=jQuery;t.exports={random:function(e){for(var t="",a="abcdefghijklmnopqrstuvwxyz0123456789",i=0;e>i;i++)t+=a.charAt(Math.floor(Math.random()*a.length));return t},form:function(e){return a(e).serializeArray()},ucfirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},list:function(e){if(a.isPlainObject(e)){var t=[],i=decodeURIComponent(a.param(e)).split("&");return a.each(i,function(e,a){var i=a.split("=");t.push({name:i[0],value:i[1]})}),t}return e}}},{}]},{},[3]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******/ (function(modules) { // webpackBootstrap
|
| 2 |
+
/******/ // The module cache
|
| 3 |
+
/******/ var installedModules = {};
|
| 4 |
+
|
| 5 |
+
/******/ // The require function
|
| 6 |
+
/******/ function __webpack_require__(moduleId) {
|
| 7 |
+
|
| 8 |
+
/******/ // Check if module is in cache
|
| 9 |
+
/******/ if(installedModules[moduleId])
|
| 10 |
+
/******/ return installedModules[moduleId].exports;
|
| 11 |
+
|
| 12 |
+
/******/ // Create a new module (and put it into the cache)
|
| 13 |
+
/******/ var module = installedModules[moduleId] = {
|
| 14 |
+
/******/ exports: {},
|
| 15 |
+
/******/ id: moduleId,
|
| 16 |
+
/******/ loaded: false
|
| 17 |
+
/******/ };
|
| 18 |
+
|
| 19 |
+
/******/ // Execute the module function
|
| 20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
| 21 |
+
|
| 22 |
+
/******/ // Flag the module as loaded
|
| 23 |
+
/******/ module.loaded = true;
|
| 24 |
+
|
| 25 |
+
/******/ // Return the exports of the module
|
| 26 |
+
/******/ return module.exports;
|
| 27 |
+
/******/ }
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
| 31 |
+
/******/ __webpack_require__.m = modules;
|
| 32 |
+
|
| 33 |
+
/******/ // expose the module cache
|
| 34 |
+
/******/ __webpack_require__.c = installedModules;
|
| 35 |
+
|
| 36 |
+
/******/ // __webpack_public_path__
|
| 37 |
+
/******/ __webpack_require__.p = "";
|
| 38 |
+
|
| 39 |
+
/******/ // Load entry module and return exports
|
| 40 |
+
/******/ return __webpack_require__(0);
|
| 41 |
+
/******/ })
|
| 42 |
+
/************************************************************************/
|
| 43 |
+
/******/ ([
|
| 44 |
+
/* 0 */
|
| 45 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 46 |
+
|
| 47 |
+
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
|
| 48 |
+
|
| 49 |
+
/**
|
| 50 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 51 |
+
*
|
| 52 |
+
* This program is free software: you can redistribute it and/or modify
|
| 53 |
+
* it under the terms of the GNU General Public License as published by
|
| 54 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 55 |
+
* (at your option) any later version.
|
| 56 |
+
*
|
| 57 |
+
* This program is distributed in the hope that it will be useful,
|
| 58 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 59 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 60 |
+
* GNU General Public License for more details.
|
| 61 |
+
*
|
| 62 |
+
* You should have received a copy of the GNU General Public License
|
| 63 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 64 |
+
*
|
| 65 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 66 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 67 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 68 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 69 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 70 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 71 |
+
*/
|
| 72 |
+
|
| 73 |
+
var Query = __webpack_require__(6),
|
| 74 |
+
FindReplace = __webpack_require__(7),
|
| 75 |
+
Report = __webpack_require__(1),
|
| 76 |
+
Feedback = __webpack_require__(2),
|
| 77 |
+
Util = __webpack_require__(3),
|
| 78 |
+
Deprecated = __webpack_require__(8),
|
| 79 |
+
Export = __webpack_require__(10);
|
| 80 |
+
|
| 81 |
+
jQuery(document).ready(function ($) {
|
| 82 |
+
'use strict';
|
| 83 |
+
|
| 84 |
+
var model = new Export();
|
| 85 |
+
|
| 86 |
+
// Export to file
|
| 87 |
+
$('#ai1wm-export-file').click(function (e) {
|
| 88 |
+
var storage = Util.random(12);
|
| 89 |
+
var options = Util.form('#ai1wm-export-form').concat({ name: 'storage', value: storage });
|
| 90 |
+
|
| 91 |
+
// Set global params
|
| 92 |
+
model.setParams(options);
|
| 93 |
+
|
| 94 |
+
// Start export
|
| 95 |
+
model.start();
|
| 96 |
+
|
| 97 |
+
e.preventDefault();
|
| 98 |
+
});
|
| 99 |
+
|
| 100 |
+
$('.ai1wm-accordion > .ai1wm-title').click(function () {
|
| 101 |
+
$(this).parent().toggleClass('ai1wm-active');
|
| 102 |
+
});
|
| 103 |
+
|
| 104 |
+
$('#ai1wm-add-new-replace-button').ai1wm_find_replace();
|
| 105 |
+
|
| 106 |
+
$('.ai1wm-expandable > p:first, .ai1wm-expandable > h4:first, .ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
|
| 107 |
+
$(this).parent().toggleClass('ai1wm-open');
|
| 108 |
+
});
|
| 109 |
+
|
| 110 |
+
$('.ai1wm-collapsable').ai1wm_query();
|
| 111 |
+
});
|
| 112 |
+
|
| 113 |
+
global.Ai1wm = { Util: Util, Export: Export };
|
| 114 |
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 115 |
+
|
| 116 |
+
/***/ },
|
| 117 |
+
/* 1 */
|
| 118 |
+
/***/ function(module, exports) {
|
| 119 |
+
|
| 120 |
+
'use strict';
|
| 121 |
+
|
| 122 |
+
/**
|
| 123 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 124 |
+
*
|
| 125 |
+
* This program is free software: you can redistribute it and/or modify
|
| 126 |
+
* it under the terms of the GNU General Public License as published by
|
| 127 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 128 |
+
* (at your option) any later version.
|
| 129 |
+
*
|
| 130 |
+
* This program is distributed in the hope that it will be useful,
|
| 131 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 132 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 133 |
+
* GNU General Public License for more details.
|
| 134 |
+
*
|
| 135 |
+
* You should have received a copy of the GNU General Public License
|
| 136 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 137 |
+
*
|
| 138 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 139 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 140 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 141 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 142 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 143 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 144 |
+
*/
|
| 145 |
+
|
| 146 |
+
jQuery(document).ready(function ($) {
|
| 147 |
+
'use strict';
|
| 148 |
+
|
| 149 |
+
$('#ai1wm-report-problem-button').click(function (e) {
|
| 150 |
+
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
| 151 |
+
|
| 152 |
+
e.preventDefault();
|
| 153 |
+
});
|
| 154 |
+
|
| 155 |
+
$('#ai1wm-report-cancel').click(function (e) {
|
| 156 |
+
$(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
| 157 |
+
|
| 158 |
+
e.preventDefault();
|
| 159 |
+
});
|
| 160 |
+
|
| 161 |
+
$('#ai1wm-report-submit').click(function () {
|
| 162 |
+
var email = $('.ai1wm-report-email').val();
|
| 163 |
+
var message = $('.ai1wm-report-message').val();
|
| 164 |
+
var terms = $('.ai1wm-report-terms').is(':checked');
|
| 165 |
+
|
| 166 |
+
$.ajax({
|
| 167 |
+
type: 'POST',
|
| 168 |
+
url: ai1wm_report.ajax.url,
|
| 169 |
+
data: { 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
|
| 170 |
+
success: function success(data) {
|
| 171 |
+
var errors = data.errors;
|
| 172 |
+
if (errors.length > 0) {
|
| 173 |
+
// Reset previous messages
|
| 174 |
+
$('.ai1wm-report-problem-dialog .ai1wm-message').remove();
|
| 175 |
+
|
| 176 |
+
var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
| 177 |
+
$.each(errors, function (key, value) {
|
| 178 |
+
content.append('<p>' + value + '</p>');
|
| 179 |
+
});
|
| 180 |
+
|
| 181 |
+
$('.ai1wm-report-problem-dialog').prepend(content);
|
| 182 |
+
} else {
|
| 183 |
+
var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
|
| 184 |
+
$('.ai1wm-report-problem-dialog').html(_content);
|
| 185 |
+
|
| 186 |
+
// Hide message
|
| 187 |
+
setTimeout(function () {
|
| 188 |
+
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
| 189 |
+
}, 2000);
|
| 190 |
+
}
|
| 191 |
+
},
|
| 192 |
+
dataType: 'json',
|
| 193 |
+
async: false
|
| 194 |
+
});
|
| 195 |
+
});
|
| 196 |
+
});
|
| 197 |
+
|
| 198 |
+
/***/ },
|
| 199 |
+
/* 2 */
|
| 200 |
+
/***/ function(module, exports) {
|
| 201 |
+
|
| 202 |
+
'use strict';
|
| 203 |
+
|
| 204 |
+
/**
|
| 205 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 206 |
+
*
|
| 207 |
+
* This program is free software: you can redistribute it and/or modify
|
| 208 |
+
* it under the terms of the GNU General Public License as published by
|
| 209 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 210 |
+
* (at your option) any later version.
|
| 211 |
+
*
|
| 212 |
+
* This program is distributed in the hope that it will be useful,
|
| 213 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 214 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 215 |
+
* GNU General Public License for more details.
|
| 216 |
+
*
|
| 217 |
+
* You should have received a copy of the GNU General Public License
|
| 218 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 219 |
+
*
|
| 220 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 221 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 222 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 223 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 224 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 225 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 226 |
+
*/
|
| 227 |
+
|
| 228 |
+
jQuery(document).ready(function ($) {
|
| 229 |
+
'use strict';
|
| 230 |
+
|
| 231 |
+
// Reset feedback form
|
| 232 |
+
|
| 233 |
+
$('.ai1wm-feedback-type').attr('checked', false);
|
| 234 |
+
|
| 235 |
+
// Review
|
| 236 |
+
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
| 237 |
+
var radio = $('#ai1wm-feedback-type-1');
|
| 238 |
+
if (radio.is(':checked')) {
|
| 239 |
+
radio.attr('checked', false);
|
| 240 |
+
e.preventDefault();
|
| 241 |
+
} else {
|
| 242 |
+
radio.attr('checked', true);
|
| 243 |
+
}
|
| 244 |
+
});
|
| 245 |
+
|
| 246 |
+
// Improvement
|
| 247 |
+
$('#ai1wm-feedback-type-2').click(function () {
|
| 248 |
+
// Hide other options
|
| 249 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
| 250 |
+
|
| 251 |
+
// change placeholder message
|
| 252 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
|
| 253 |
+
|
| 254 |
+
// Show feedback form
|
| 255 |
+
$('.ai1wm-feedback-form').fadeIn();
|
| 256 |
+
});
|
| 257 |
+
|
| 258 |
+
// Help
|
| 259 |
+
$('#ai1wm-feedback-type-3').click(function () {
|
| 260 |
+
// Hide other options
|
| 261 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
| 262 |
+
|
| 263 |
+
// change placeholder message
|
| 264 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
|
| 265 |
+
|
| 266 |
+
// Show feedback form
|
| 267 |
+
$('.ai1wm-feedback-form').fadeIn();
|
| 268 |
+
});
|
| 269 |
+
|
| 270 |
+
// Cancel feedback form
|
| 271 |
+
$('#ai1wm-feedback-cancel').click(function (e) {
|
| 272 |
+
$('.ai1wm-feedback-form').fadeOut(function () {
|
| 273 |
+
$('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
|
| 274 |
+
});
|
| 275 |
+
e.preventDefault();
|
| 276 |
+
});
|
| 277 |
+
|
| 278 |
+
// Send feedback form
|
| 279 |
+
$('#ai1wm-feedback-submit').click(function () {
|
| 280 |
+
var type = $('.ai1wm-feedback-type:checked').val();
|
| 281 |
+
var email = $('.ai1wm-feedback-email').val();
|
| 282 |
+
var message = $('.ai1wm-feedback-message').val();
|
| 283 |
+
var terms = $('.ai1wm-feedback-terms').is(':checked');
|
| 284 |
+
|
| 285 |
+
$.ajax({
|
| 286 |
+
type: 'POST',
|
| 287 |
+
url: ai1wm_feedback.ajax.url,
|
| 288 |
+
data: { 'ai1wm-type': type, 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
|
| 289 |
+
success: function success(data) {
|
| 290 |
+
var errors = data.errors;
|
| 291 |
+
if (errors.length > 0) {
|
| 292 |
+
// Reset previous messages
|
| 293 |
+
$('.ai1wm-feedback .ai1wm-message').remove();
|
| 294 |
+
|
| 295 |
+
var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
| 296 |
+
$.each(errors, function (key, value) {
|
| 297 |
+
content.append('<p>' + value + '</p>');
|
| 298 |
+
});
|
| 299 |
+
|
| 300 |
+
$('.ai1wm-feedback').prepend(content);
|
| 301 |
+
} else {
|
| 302 |
+
var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
| 303 |
+
$('.ai1wm-feedback').html(_content);
|
| 304 |
+
}
|
| 305 |
+
},
|
| 306 |
+
dataType: 'json',
|
| 307 |
+
async: false
|
| 308 |
+
});
|
| 309 |
+
});
|
| 310 |
+
});
|
| 311 |
+
|
| 312 |
+
/***/ },
|
| 313 |
+
/* 3 */
|
| 314 |
+
/***/ function(module, exports) {
|
| 315 |
+
|
| 316 |
+
'use strict';
|
| 317 |
+
|
| 318 |
+
/**
|
| 319 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 320 |
+
*
|
| 321 |
+
* This program is free software: you can redistribute it and/or modify
|
| 322 |
+
* it under the terms of the GNU General Public License as published by
|
| 323 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 324 |
+
* (at your option) any later version.
|
| 325 |
+
*
|
| 326 |
+
* This program is distributed in the hope that it will be useful,
|
| 327 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 328 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 329 |
+
* GNU General Public License for more details.
|
| 330 |
+
*
|
| 331 |
+
* You should have received a copy of the GNU General Public License
|
| 332 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 333 |
+
*
|
| 334 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 335 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 336 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 337 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 338 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 339 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 340 |
+
*/
|
| 341 |
+
|
| 342 |
+
var $ = jQuery;
|
| 343 |
+
|
| 344 |
+
module.exports = {
|
| 345 |
+
random: function random(len) {
|
| 346 |
+
var text = '';
|
| 347 |
+
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
| 348 |
+
|
| 349 |
+
for (var i = 0; i < len; i++) {
|
| 350 |
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
return text;
|
| 354 |
+
},
|
| 355 |
+
form: function form(id) {
|
| 356 |
+
return $(id).serializeArray();
|
| 357 |
+
},
|
| 358 |
+
ucfirst: function ucfirst(text) {
|
| 359 |
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
| 360 |
+
},
|
| 361 |
+
list: function list(input) {
|
| 362 |
+
// Convert object to list
|
| 363 |
+
if ($.isPlainObject(input)) {
|
| 364 |
+
var result = [];
|
| 365 |
+
var params = decodeURIComponent($.param(input)).split('&');
|
| 366 |
+
|
| 367 |
+
// Loop over params
|
| 368 |
+
$.each(params, function (index, item) {
|
| 369 |
+
var value = item.split('=');
|
| 370 |
+
|
| 371 |
+
// Add item
|
| 372 |
+
result.push({ name: value[0], value: value[1] });
|
| 373 |
+
});
|
| 374 |
+
|
| 375 |
+
return result;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
return input;
|
| 379 |
+
}
|
| 380 |
+
};
|
| 381 |
+
|
| 382 |
+
/***/ },
|
| 383 |
+
/* 4 */,
|
| 384 |
+
/* 5 */,
|
| 385 |
+
/* 6 */
|
| 386 |
+
/***/ function(module, exports) {
|
| 387 |
+
|
| 388 |
+
'use strict';
|
| 389 |
+
|
| 390 |
+
/**
|
| 391 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 392 |
+
*
|
| 393 |
+
* This program is free software: you can redistribute it and/or modify
|
| 394 |
+
* it under the terms of the GNU General Public License as published by
|
| 395 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 396 |
+
* (at your option) any later version.
|
| 397 |
+
*
|
| 398 |
+
* This program is distributed in the hope that it will be useful,
|
| 399 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 400 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 401 |
+
* GNU General Public License for more details.
|
| 402 |
+
*
|
| 403 |
+
* You should have received a copy of the GNU General Public License
|
| 404 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 405 |
+
*
|
| 406 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 407 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 408 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 409 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 410 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 411 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 412 |
+
*/
|
| 413 |
+
|
| 414 |
+
;(function ($) {
|
| 415 |
+
|
| 416 |
+
$.fn.ai1wm_query = function () {
|
| 417 |
+
var findInput = $(this).find('input.ai1wm-query-find-input'),
|
| 418 |
+
replaceInput = $(this).find('input.ai1wm-query-replace-input'),
|
| 419 |
+
findText = $(this).find('small.ai1wm-query-find-text'),
|
| 420 |
+
replaceText = $(this).find('small.ai1wm-query-replace-text');
|
| 421 |
+
|
| 422 |
+
findInput.on('change paste input keypress keydown keyup', function () {
|
| 423 |
+
var _inputValue = $(this).val().length > 0 ? $(this).val() : '<text>';
|
| 424 |
+
findText.text(_inputValue);
|
| 425 |
+
});
|
| 426 |
+
|
| 427 |
+
replaceInput.on('change paste input keypress keydown keyup', function () {
|
| 428 |
+
var _inputValue = $(this).val().length > 0 ? $(this).val() : '<another-text>';
|
| 429 |
+
replaceText.text(_inputValue);
|
| 430 |
+
});
|
| 431 |
+
return this;
|
| 432 |
+
};
|
| 433 |
+
})(jQuery);
|
| 434 |
+
|
| 435 |
+
/***/ },
|
| 436 |
+
/* 7 */
|
| 437 |
+
/***/ function(module, exports) {
|
| 438 |
+
|
| 439 |
+
'use strict';
|
| 440 |
+
|
| 441 |
+
/**
|
| 442 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 443 |
+
*
|
| 444 |
+
* This program is free software: you can redistribute it and/or modify
|
| 445 |
+
* it under the terms of the GNU General Public License as published by
|
| 446 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 447 |
+
* (at your option) any later version.
|
| 448 |
+
*
|
| 449 |
+
* This program is distributed in the hope that it will be useful,
|
| 450 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 451 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 452 |
+
* GNU General Public License for more details.
|
| 453 |
+
*
|
| 454 |
+
* You should have received a copy of the GNU General Public License
|
| 455 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 456 |
+
*
|
| 457 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 458 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 459 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 460 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 461 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 462 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 463 |
+
*/
|
| 464 |
+
|
| 465 |
+
;(function ($) {
|
| 466 |
+
|
| 467 |
+
$.fn.ai1wm_find_replace = function () {
|
| 468 |
+
$(this).click(function (e) {
|
| 469 |
+
e.preventDefault();
|
| 470 |
+
|
| 471 |
+
var row = $('#ai1wm-queries > li:first').clone();
|
| 472 |
+
|
| 473 |
+
// Reset input values
|
| 474 |
+
row.find('input').val('');
|
| 475 |
+
|
| 476 |
+
// Reset ai1wm-query-find-text
|
| 477 |
+
row.find('.ai1wm-query-find-text').html('<text>');
|
| 478 |
+
|
| 479 |
+
// Reset ai1wm-query-replace-text
|
| 480 |
+
row.find('.ai1wm-query-replace-text').html('<another-text>');
|
| 481 |
+
|
| 482 |
+
$('#ai1wm-queries > li').removeClass('ai1wm-open');
|
| 483 |
+
|
| 484 |
+
$(row).addClass('ai1wm-open');
|
| 485 |
+
|
| 486 |
+
// Add new replace fields
|
| 487 |
+
$('#ai1wm-queries').append(row);
|
| 488 |
+
$(row).ai1wm_query();
|
| 489 |
+
$(row).find('p:first').on('click', function () {
|
| 490 |
+
$(this).parent().toggleClass('ai1wm-open');
|
| 491 |
+
});
|
| 492 |
+
});
|
| 493 |
+
|
| 494 |
+
return this;
|
| 495 |
+
};
|
| 496 |
+
})(jQuery);
|
| 497 |
+
|
| 498 |
+
/***/ },
|
| 499 |
+
/* 8 */
|
| 500 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 501 |
+
|
| 502 |
+
'use strict';
|
| 503 |
+
|
| 504 |
+
/**
|
| 505 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 506 |
+
*
|
| 507 |
+
* This program is free software: you can redistribute it and/or modify
|
| 508 |
+
* it under the terms of the GNU General Public License as published by
|
| 509 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 510 |
+
* (at your option) any later version.
|
| 511 |
+
*
|
| 512 |
+
* This program is distributed in the hope that it will be useful,
|
| 513 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 514 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 515 |
+
* GNU General Public License for more details.
|
| 516 |
+
*
|
| 517 |
+
* You should have received a copy of the GNU General Public License
|
| 518 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 519 |
+
*
|
| 520 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 521 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 522 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 523 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 524 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 525 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 526 |
+
*/
|
| 527 |
+
|
| 528 |
+
var Util = __webpack_require__(3),
|
| 529 |
+
Dialog = __webpack_require__(9);
|
| 530 |
+
|
| 531 |
+
var Extensions = {
|
| 532 |
+
's3': 'Amazon S3 Extension',
|
| 533 |
+
'url': 'URL Extension',
|
| 534 |
+
'ftp': 'FTP Extension',
|
| 535 |
+
'gdrive': 'Google Drive Extension',
|
| 536 |
+
'dropbox': 'Dropbox Extension'
|
| 537 |
+
};
|
| 538 |
+
|
| 539 |
+
window.Ai1wmExportController = function (provider) {
|
| 540 |
+
this._export = {};
|
| 541 |
+
this._provider = provider;
|
| 542 |
+
};
|
| 543 |
+
|
| 544 |
+
window.Ai1wmExportController.prototype.start = function () {
|
| 545 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
| 546 |
+
};
|
| 547 |
+
|
| 548 |
+
window.Ai1wmImportController = function (provider) {
|
| 549 |
+
this._import = {};
|
| 550 |
+
this._provider = provider;
|
| 551 |
+
};
|
| 552 |
+
|
| 553 |
+
window.Ai1wmImportController.prototype.init = function () {};
|
| 554 |
+
|
| 555 |
+
window.Ai1wmImportController.prototype.download = function () {
|
| 556 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
| 557 |
+
};
|
| 558 |
+
|
| 559 |
+
/***/ },
|
| 560 |
+
/* 9 */
|
| 561 |
+
/***/ function(module, exports) {
|
| 562 |
+
|
| 563 |
+
'use strict';
|
| 564 |
+
|
| 565 |
+
/**
|
| 566 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 567 |
+
*
|
| 568 |
+
* This program is free software: you can redistribute it and/or modify
|
| 569 |
+
* it under the terms of the GNU General Public License as published by
|
| 570 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 571 |
+
* (at your option) any later version.
|
| 572 |
+
*
|
| 573 |
+
* This program is distributed in the hope that it will be useful,
|
| 574 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 575 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 576 |
+
* GNU General Public License for more details.
|
| 577 |
+
*
|
| 578 |
+
* You should have received a copy of the GNU General Public License
|
| 579 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 580 |
+
*
|
| 581 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 582 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 583 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 584 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 585 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 586 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 587 |
+
*/
|
| 588 |
+
|
| 589 |
+
var $ = jQuery;
|
| 590 |
+
|
| 591 |
+
var Dialog = function Dialog(text) {
|
| 592 |
+
var self = this;
|
| 593 |
+
|
| 594 |
+
// Create the overlay
|
| 595 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
| 596 |
+
|
| 597 |
+
// Create the modal container
|
| 598 |
+
this.container = $('<div></div>');
|
| 599 |
+
|
| 600 |
+
// Create the modal container
|
| 601 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
| 602 |
+
|
| 603 |
+
// Create section to hold title, message and action
|
| 604 |
+
this.section = $('<section></section>');
|
| 605 |
+
|
| 606 |
+
// Create paragraph to hold mesage
|
| 607 |
+
this.message = $('<p></p>').addClass('ai1wm-dialog-message').html(text);
|
| 608 |
+
|
| 609 |
+
// Create action section
|
| 610 |
+
this.action = $('<div></div>');
|
| 611 |
+
|
| 612 |
+
// Create close button
|
| 613 |
+
this.closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 614 |
+
self.modal.hide();
|
| 615 |
+
self.overlay.hide();
|
| 616 |
+
});
|
| 617 |
+
|
| 618 |
+
// Append close button
|
| 619 |
+
this.action.append(this.closeButton);
|
| 620 |
+
|
| 621 |
+
// Append message to section
|
| 622 |
+
this.section.append(this.message);
|
| 623 |
+
|
| 624 |
+
// Append section and action to container
|
| 625 |
+
this.container.append(this.section).append(this.action);
|
| 626 |
+
|
| 627 |
+
// Render modal
|
| 628 |
+
this.modal.html(this.container).show();
|
| 629 |
+
this.overlay.show();
|
| 630 |
+
|
| 631 |
+
$('body').append(this.overlay).append(this.modal);
|
| 632 |
+
};
|
| 633 |
+
|
| 634 |
+
module.exports = Dialog;
|
| 635 |
+
|
| 636 |
+
/***/ },
|
| 637 |
+
/* 10 */
|
| 638 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 639 |
+
|
| 640 |
+
'use strict';
|
| 641 |
+
|
| 642 |
+
/**
|
| 643 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 644 |
+
*
|
| 645 |
+
* This program is free software: you can redistribute it and/or modify
|
| 646 |
+
* it under the terms of the GNU General Public License as published by
|
| 647 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 648 |
+
* (at your option) any later version.
|
| 649 |
+
*
|
| 650 |
+
* This program is distributed in the hope that it will be useful,
|
| 651 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 652 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 653 |
+
* GNU General Public License for more details.
|
| 654 |
+
*
|
| 655 |
+
* You should have received a copy of the GNU General Public License
|
| 656 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 657 |
+
*
|
| 658 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 659 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 660 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 661 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 662 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 663 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 664 |
+
*/
|
| 665 |
+
|
| 666 |
+
var Util = __webpack_require__(3),
|
| 667 |
+
Modal = __webpack_require__(11),
|
| 668 |
+
$ = jQuery;
|
| 669 |
+
|
| 670 |
+
var Export = function Export() {
|
| 671 |
+
var self = this;
|
| 672 |
+
|
| 673 |
+
// Set params
|
| 674 |
+
this.params = [];
|
| 675 |
+
|
| 676 |
+
// Set modal
|
| 677 |
+
this.modal = new Modal();
|
| 678 |
+
|
| 679 |
+
// Set stop listener
|
| 680 |
+
this.modal.onStop = function (options) {
|
| 681 |
+
self.onStop(options);
|
| 682 |
+
};
|
| 683 |
+
};
|
| 684 |
+
|
| 685 |
+
Export.prototype.setParams = function (params) {
|
| 686 |
+
this.params = Util.list(params);
|
| 687 |
+
};
|
| 688 |
+
|
| 689 |
+
Export.prototype.start = function (options) {
|
| 690 |
+
var self = this;
|
| 691 |
+
|
| 692 |
+
// Initializing beforeunload event
|
| 693 |
+
$(window).bind('beforeunload', function () {
|
| 694 |
+
return 'You are about to stop exporting your website, are you sure?';
|
| 695 |
+
});
|
| 696 |
+
|
| 697 |
+
// Set stop
|
| 698 |
+
this.stop = false;
|
| 699 |
+
|
| 700 |
+
// Set initial status
|
| 701 |
+
this.setStatus({ type: 'info', message: 'Preparing to export...' });
|
| 702 |
+
|
| 703 |
+
// Set params
|
| 704 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key });
|
| 705 |
+
|
| 706 |
+
// Set additional params
|
| 707 |
+
if (options) {
|
| 708 |
+
params = params.concat(Util.list(options));
|
| 709 |
+
}
|
| 710 |
+
|
| 711 |
+
// Export
|
| 712 |
+
$.post(ai1wm_export.ajax.url, params).done(function () {
|
| 713 |
+
self.getStatus(ai1wm_export.status.php);
|
| 714 |
+
}).fail(function () {
|
| 715 |
+
self.setStatus({
|
| 716 |
+
type: 'error',
|
| 717 |
+
message: 'Unable to start the export. Refresh the page and try again'
|
| 718 |
+
});
|
| 719 |
+
});
|
| 720 |
+
};
|
| 721 |
+
|
| 722 |
+
Export.prototype.clean = function (options) {
|
| 723 |
+
var self = this;
|
| 724 |
+
|
| 725 |
+
// Set stop
|
| 726 |
+
this.stop = true;
|
| 727 |
+
|
| 728 |
+
// Set params
|
| 729 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key }).concat({ name: 'priority', value: 300 });
|
| 730 |
+
|
| 731 |
+
// Set additional params
|
| 732 |
+
if (options) {
|
| 733 |
+
params = params.concat(Util.list(options));
|
| 734 |
+
}
|
| 735 |
+
|
| 736 |
+
// Clean
|
| 737 |
+
$.post(ai1wm_export.ajax.url, params).done(function () {
|
| 738 |
+
// Unbinding the beforeunload event when we stop exporting
|
| 739 |
+
$(window).unbind('beforeunload');
|
| 740 |
+
}).fail(function () {
|
| 741 |
+
self.setStatus({
|
| 742 |
+
type: 'error',
|
| 743 |
+
message: 'Unable to clean the export. Refresh the page and try again'
|
| 744 |
+
});
|
| 745 |
+
});
|
| 746 |
+
};
|
| 747 |
+
|
| 748 |
+
Export.prototype.getStatus = function (url, retry) {
|
| 749 |
+
var self = this,
|
| 750 |
+
retry = retry || 0;
|
| 751 |
+
|
| 752 |
+
// Stop getting status
|
| 753 |
+
if (this.stop) {
|
| 754 |
+
return;
|
| 755 |
+
}
|
| 756 |
+
|
| 757 |
+
$.ajax({
|
| 758 |
+
cache: false,
|
| 759 |
+
url: url,
|
| 760 |
+
dataType: 'json'
|
| 761 |
+
}).done(function (params) {
|
| 762 |
+
if (params) {
|
| 763 |
+
self.setStatus(params);
|
| 764 |
+
|
| 765 |
+
// Next status
|
| 766 |
+
switch (params.type) {
|
| 767 |
+
case 'done':
|
| 768 |
+
case 'error':
|
| 769 |
+
case 'download':
|
| 770 |
+
// Unbinding beforeunload event when any case is performed
|
| 771 |
+
$(window).unbind('beforeunload');
|
| 772 |
+
return;
|
| 773 |
+
}
|
| 774 |
+
}
|
| 775 |
+
|
| 776 |
+
// Export is not done yet, let's check status in 3 seconds
|
| 777 |
+
setTimeout(function () {
|
| 778 |
+
self.getStatus(url, retry);
|
| 779 |
+
}, 3000);
|
| 780 |
+
}).fail(function () {
|
| 781 |
+
retry++;
|
| 782 |
+
|
| 783 |
+
// Retry 6 times
|
| 784 |
+
if (retry >= 6) {
|
| 785 |
+
self.setStatus({
|
| 786 |
+
type: 'error',
|
| 787 |
+
message: 'Unable to retrieve status of the export. Is your server running?'
|
| 788 |
+
});
|
| 789 |
+
} else if (retry >= 3) {
|
| 790 |
+
self.getStatus(ai1wm_export.status.js, retry);
|
| 791 |
+
} else {
|
| 792 |
+
self.getStatus(ai1wm_export.status.php, retry);
|
| 793 |
+
}
|
| 794 |
+
});
|
| 795 |
+
};
|
| 796 |
+
|
| 797 |
+
Export.prototype.setStatus = function (params) {
|
| 798 |
+
this.modal.render(params);
|
| 799 |
+
};
|
| 800 |
+
|
| 801 |
+
Export.prototype.onStop = function (options) {
|
| 802 |
+
this.clean(options);
|
| 803 |
+
};
|
| 804 |
+
|
| 805 |
+
module.exports = Export;
|
| 806 |
+
|
| 807 |
+
/***/ },
|
| 808 |
+
/* 11 */
|
| 809 |
+
/***/ function(module, exports) {
|
| 810 |
+
|
| 811 |
+
'use strict';
|
| 812 |
+
|
| 813 |
+
/**
|
| 814 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 815 |
+
*
|
| 816 |
+
* This program is free software: you can redistribute it and/or modify
|
| 817 |
+
* it under the terms of the GNU General Public License as published by
|
| 818 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 819 |
+
* (at your option) any later version.
|
| 820 |
+
*
|
| 821 |
+
* This program is distributed in the hope that it will be useful,
|
| 822 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 823 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 824 |
+
* GNU General Public License for more details.
|
| 825 |
+
*
|
| 826 |
+
* You should have received a copy of the GNU General Public License
|
| 827 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 828 |
+
*
|
| 829 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 830 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 831 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 832 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 833 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 834 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 835 |
+
*/
|
| 836 |
+
|
| 837 |
+
var $ = jQuery;
|
| 838 |
+
|
| 839 |
+
var Modal = function Modal() {
|
| 840 |
+
var self = this;
|
| 841 |
+
|
| 842 |
+
// Error Modal
|
| 843 |
+
this.error = function (params) {
|
| 844 |
+
|
| 845 |
+
// Create the modal container
|
| 846 |
+
var container = $('<div></div>');
|
| 847 |
+
|
| 848 |
+
// Create section to hold title, message and action
|
| 849 |
+
var section = $('<section></section>');
|
| 850 |
+
|
| 851 |
+
// Create header to hold title
|
| 852 |
+
var header = $('<h1></h1>');
|
| 853 |
+
|
| 854 |
+
// Create paragraph to hold mesage
|
| 855 |
+
var message = $('<p></p>').html(params.message);
|
| 856 |
+
|
| 857 |
+
// Create action section
|
| 858 |
+
var action = $('<div></div>');
|
| 859 |
+
|
| 860 |
+
// Create title
|
| 861 |
+
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to export');
|
| 862 |
+
|
| 863 |
+
// Create close button
|
| 864 |
+
var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 865 |
+
self.modal.hide();
|
| 866 |
+
self.overlay.hide();
|
| 867 |
+
});
|
| 868 |
+
|
| 869 |
+
// Append close button
|
| 870 |
+
action.append(closeButton);
|
| 871 |
+
|
| 872 |
+
// Append title to section
|
| 873 |
+
header.append(title);
|
| 874 |
+
|
| 875 |
+
// Append header and message to section
|
| 876 |
+
section.append(header).append(message);
|
| 877 |
+
|
| 878 |
+
// Append section and action to container
|
| 879 |
+
container.append(section).append(action);
|
| 880 |
+
|
| 881 |
+
// Render modal
|
| 882 |
+
self.modal.html(container).show();
|
| 883 |
+
self.overlay.show();
|
| 884 |
+
};
|
| 885 |
+
|
| 886 |
+
// Info Modal
|
| 887 |
+
this.info = function (params) {
|
| 888 |
+
|
| 889 |
+
// Create the modal container
|
| 890 |
+
var container = $('<div></div>');
|
| 891 |
+
|
| 892 |
+
// Create section to hold title, message and action
|
| 893 |
+
var section = $('<section></section>');
|
| 894 |
+
|
| 895 |
+
// Create header to hold loader
|
| 896 |
+
var header = $('<h1></h1>');
|
| 897 |
+
|
| 898 |
+
// Create paragraph to hold mesage
|
| 899 |
+
var message = $('<p></p>').html(params.message);
|
| 900 |
+
|
| 901 |
+
// Create action section
|
| 902 |
+
var action = $('<div></div>');
|
| 903 |
+
|
| 904 |
+
// Create loader
|
| 905 |
+
var loader = $('<span class="ai1wm-loader"></span>');
|
| 906 |
+
|
| 907 |
+
// Create stop export
|
| 908 |
+
var stopButton = $('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop export</button>').on('click', function () {
|
| 909 |
+
$(this).attr('disabled', 'disabled');
|
| 910 |
+
self.onStop();
|
| 911 |
+
self.modal.hide();
|
| 912 |
+
self.overlay.hide();
|
| 913 |
+
});
|
| 914 |
+
|
| 915 |
+
// Append stop button
|
| 916 |
+
action.append(stopButton);
|
| 917 |
+
|
| 918 |
+
// Append loader to header
|
| 919 |
+
header.append(loader);
|
| 920 |
+
|
| 921 |
+
// Append header and message to section
|
| 922 |
+
section.append(header).append(message);
|
| 923 |
+
|
| 924 |
+
// Append section and action to container
|
| 925 |
+
container.append(section).append(action);
|
| 926 |
+
|
| 927 |
+
// Render modal
|
| 928 |
+
self.modal.html(container).show();
|
| 929 |
+
self.overlay.show();
|
| 930 |
+
};
|
| 931 |
+
|
| 932 |
+
// Done Modal
|
| 933 |
+
this.done = function (params) {
|
| 934 |
+
|
| 935 |
+
// Create the modal container
|
| 936 |
+
var container = $('<div></div>');
|
| 937 |
+
|
| 938 |
+
// Create section to hold title, message and action
|
| 939 |
+
var section = $('<section></section>');
|
| 940 |
+
|
| 941 |
+
// Create header to hold title
|
| 942 |
+
var header = $('<h1></h1>');
|
| 943 |
+
|
| 944 |
+
// Create paragraph to hold mesage
|
| 945 |
+
var message = $('<p></p>').html(params.message);
|
| 946 |
+
|
| 947 |
+
// Create action section
|
| 948 |
+
var action = $('<div></div>');
|
| 949 |
+
|
| 950 |
+
// Create title
|
| 951 |
+
var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
|
| 952 |
+
|
| 953 |
+
// Create close button
|
| 954 |
+
var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 955 |
+
self.modal.hide();
|
| 956 |
+
self.overlay.hide();
|
| 957 |
+
});
|
| 958 |
+
|
| 959 |
+
// Append close button
|
| 960 |
+
action.append(closeButton);
|
| 961 |
+
|
| 962 |
+
// Append title to section
|
| 963 |
+
header.append(title);
|
| 964 |
+
|
| 965 |
+
// Append header and message to section
|
| 966 |
+
section.append(header).append(message);
|
| 967 |
+
|
| 968 |
+
// Append section and action to container
|
| 969 |
+
container.append(section).append(action);
|
| 970 |
+
|
| 971 |
+
// Render modal
|
| 972 |
+
self.modal.html(container).show();
|
| 973 |
+
self.overlay.show();
|
| 974 |
+
};
|
| 975 |
+
|
| 976 |
+
// Download Modal
|
| 977 |
+
this.download = function (params) {
|
| 978 |
+
|
| 979 |
+
// Create the modal container
|
| 980 |
+
var container = $('<div></div>');
|
| 981 |
+
|
| 982 |
+
// Create section to hold title, message and action
|
| 983 |
+
var section = $('<section></section>');
|
| 984 |
+
|
| 985 |
+
// Create header to hold title
|
| 986 |
+
var header = $('<h1></h1>');
|
| 987 |
+
|
| 988 |
+
// Create paragraph to hold mesage
|
| 989 |
+
var message = $('<p></p>').html(params.message);
|
| 990 |
+
|
| 991 |
+
// Create action section
|
| 992 |
+
var action = $('<div></div>');
|
| 993 |
+
|
| 994 |
+
// Create close button
|
| 995 |
+
var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 996 |
+
self.modal.hide();
|
| 997 |
+
self.overlay.hide();
|
| 998 |
+
});
|
| 999 |
+
|
| 1000 |
+
// Append close button
|
| 1001 |
+
action.append(closeButton);
|
| 1002 |
+
|
| 1003 |
+
// Append message to section
|
| 1004 |
+
section.append(message);
|
| 1005 |
+
|
| 1006 |
+
// Append section and action to container
|
| 1007 |
+
container.append(section).append(action);
|
| 1008 |
+
|
| 1009 |
+
// Render modal
|
| 1010 |
+
self.modal.html(container).show();
|
| 1011 |
+
self.overlay.show();
|
| 1012 |
+
};
|
| 1013 |
+
|
| 1014 |
+
// Create the overlay
|
| 1015 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
| 1016 |
+
|
| 1017 |
+
// Create the modal container
|
| 1018 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
| 1019 |
+
|
| 1020 |
+
$('body').append(this.overlay) // Append overlay to body
|
| 1021 |
+
.append(this.modal); // Append modal to body
|
| 1022 |
+
};
|
| 1023 |
+
|
| 1024 |
+
Modal.prototype.render = function (params) {
|
| 1025 |
+
|
| 1026 |
+
// Show modal
|
| 1027 |
+
switch (params.type) {
|
| 1028 |
+
case 'error':
|
| 1029 |
+
this.error(params);
|
| 1030 |
+
break;
|
| 1031 |
+
|
| 1032 |
+
case 'info':
|
| 1033 |
+
this.info(params);
|
| 1034 |
+
break;
|
| 1035 |
+
|
| 1036 |
+
case 'done':
|
| 1037 |
+
this.done(params);
|
| 1038 |
+
break;
|
| 1039 |
+
|
| 1040 |
+
case 'download':
|
| 1041 |
+
this.download(params);
|
| 1042 |
+
break;
|
| 1043 |
+
}
|
| 1044 |
+
};
|
| 1045 |
+
|
| 1046 |
+
module.exports = Modal;
|
| 1047 |
+
|
| 1048 |
+
/***/ }
|
| 1049 |
+
/******/ ]);
|
lib/view/assets/javascript/import.min.js
CHANGED
|
@@ -1 +1,2863 @@
|
|
| 1 |
-
!function e(t,a,o){function i(n,s){if(!a[n]){if(!t[n]){var p="function"==typeof require&&require;if(!s&&p)return p(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var d=a[n]={exports:{}};t[n][0].call(d.exports,function(e){var a=t[n][1][e];return i(a?a:e)},d,d.exports,e,t,a,o)}return a[n].exports}for(var r="function"==typeof require&&require,n=0;n<o.length;n++)i(o[n]);return i}({1:[function(e){var t=(e("./servmask/report"),e("./servmask/feedback"),e("./servmask/deprecated"),e("./import/uploader"));jQuery(document).ready(function(e){"use strict";var a=new t;a.init(),e(".ai1wm-expandable > div.ai1wm-button-main").on("click",function(){e(this).parent().toggleClass("ai1wm-open")})})},{"./import/uploader":4,"./servmask/deprecated":5,"./servmask/feedback":7,"./servmask/report":8}],2:[function(e,t){var a=e("../servmask/util"),o=e("./modal"),i=jQuery,r=function(){var e=this;this.params=[],this.modal=new o,this.modal.onConfirm=function(t){e.onConfirm(t)},this.modal.onBlogs=function(t){e.onBlogs(t)},this.modal.onStop=function(t){e.onStop(t)}};r.prototype.setParams=function(e){this.params=a.list(e)},r.prototype.start=function(e){var t=this;i(window).bind("beforeunload",function(){return"You are about to stop importing your website, are you sure?"}),this.stop=!1,this.setStatus({type:"info",message:"Preparing to import..."});var o=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key});e&&(o=o.concat(a.list(e))),i.post(ai1wm_import.ajax.url,o).done(function(){t.getStatus()}).fail(function(){t.setStatus({type:"error",message:"Unable to start the import. Refresh the page and try again"})})},r.prototype.confirm=function(e){var t=this,o=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:150});e&&(o=o.concat(a.list(e))),i.post(ai1wm_import.ajax.url,o).done(function(){t.getStatus(ai1wm_import.status.php)}).fail(function(){t.setStatus({type:"error",message:"Unable to confirm the import. Refresh the page and try again"})})},r.prototype.blogs=function(e){var t=this,o=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:150});e&&(o=o.concat(a.list(e))),i.post(ai1wm_import.ajax.url,o).done(function(){t.getStatus(ai1wm_import.status.php)}).fail(function(){t.setStatus({type:"error",message:"Unable to prepare blogs the import. Refresh the page and try again"})})},r.prototype.clean=function(e){var t=this;this.stop=!0;var o=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:400});e&&(o=o.concat(a.list(e))),i.post(ai1wm_import.ajax.url,o).done(function(){i(window).unbind("beforeunload")}).fail(function(){t.setStatus({type:"error",message:"Unable to clean the import. Refresh the page and try again"})})},r.prototype.getStatus=function(e,t){var a=this,t=t||0;this.stop||i.ajax({cache:!1,url:e,dataType:"json"}).done(function(o){if(o)switch(a.setStatus(o),o.type){case"done":case"error":return i(window).unbind("beforeunload"),void 0;case"confirm":case"blogs":return}setTimeout(function(){a.getStatus(e,t)},3e3)}).fail(function(){t++,t>=6?a.setStatus({type:"error",message:"Unable to retrieve status of the import. Is your server running?"}):t>=3?a.getStatus(ai1wm_import.status.js,t):a.getStatus(ai1wm_import.status.php,t)})},r.prototype.setStatus=function(e){this.modal.render(e)},r.prototype.onConfirm=function(e){this.confirm(e)},r.prototype.onBlogs=function(e){this.blogs(e)},r.prototype.onStop=function(e){this.clean(e)},t.exports=r},{"../servmask/util":9,"./modal":3}],3:[function(e,t){var a=jQuery,o=function(){var e=this;this.error=function(t){var o=a("<div></div>"),i=a("<section></section>"),r=a("<h1></h1>"),n=a("<p></p>").html(t.message),s=a("<div></div>"),p=a("<span></span>").addClass("ai1wm-title-red").text("Unable to import"),d=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});s.append(d),r.append(p),i.append(r).append(n),o.append(i).append(s),e.modal.html(o).show(),e.overlay.show()},this.progress=function(t){var o=a("<div></div>"),i=a("<section></section>"),r=a("<h1></h1>"),n=(a("<p></p>"),a("<div></div>")),s=a('<span class="ai1wm-progress-bar"></span>'),p=a('<span class="ai1wm-progress-bar-meter"></span>').width(t.percent+"%"),d=a('<span class="ai1wm-progress-bar-percent">0%</span>').text(t.percent+"%"),c=a('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on("click",function(){a(this).attr("disabled","disabled"),e.onStop(),e.modal.hide(),e.overlay.hide()});s.append(p).append(d),n.append(c),r.append(s),i.append(r),o.append(i).append(n),e.modal.html(o).show(),e.overlay.show()},this.confirm=function(t){var o=a("<div></div>"),i=a("<section></section>"),r=a("<h1></h1>"),n=a("<p></p>").html(t.message),s=a("<div></div>"),p=a('<span class="ai1wm-icon-notification"></span>'),d=a('<button class="ai1wm-button-green">Continue</button>').on("click",function(){a(this).attr("disabled","disabled"),e.onConfirm()});s.append(d),r.append(p),i.append(r).append(n),o.append(i).append(s),e.modal.html(o).show(),e.overlay.show()},this.blogs=function(t){var o=a("<form></form>"),i=a("<section></section>"),r=a("<h1></h1>"),n=a("<p></p>").html(t.message),s=a("<div></div>"),p=a("<span></span>").addClass("ai1wm-title-grey").text("Update subsite name"),d=a('<button class="ai1wm-button-green">Continue</button>').on("click",function(){a(this).attr("disabled","disabled"),e.onBlogs(a(this).closest("form").serializeArray())});s.append(d),r.append(p),i.append(r).append(n),o.append(i).append(s),e.modal.html(o).show(),e.overlay.show()},this.info=function(t){var o=a("<div></div>"),i=a("<section></section>"),r=a("<h1></h1>"),n=a("<p></p>").html(t.message),s=a("<div></div>"),p=a('<span class="ai1wm-loader"></span>'),d=a('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr("disabled","disabled");s.append(d),r.append(p),i.append(r).append(n),o.append(i).append(s),e.modal.html(o).show(),e.overlay.show()},this.done=function(t){var o=a("<div></div>"),i=a("<section></section>"),r=a("<h1></h1>"),n=a("<p></p>").html(t.message),s=a("<div></div>"),p=a("<span></span>").addClass("ai1wm-title-green").text(t.title),d=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});s.append(d),r.append(p),i.append(r).append(n),o.append(i).append(s),e.modal.html(o).show(),e.overlay.show()},this.overlay=a('<div class="ai1wm-overlay"></div>'),this.modal=a('<div class="ai1wm-modal-container"></div>'),a("body").append(this.overlay).append(this.modal)};o.prototype.render=function(e){switch(e.type){case"error":this.error(e);break;case"confirm":this.confirm(e);break;case"blogs":this.blogs(e);break;case"progress":this.progress(e);break;case"info":this.info(e);break;case"done":this.done(e)}},t.exports=o},{}],4:[function(e,t){(function(a){var o=e("../servmask/util"),i=e("./import"),r=jQuery,n=function(){this.uploader=new plupload.Uploader(ai1wm_uploader)};n.prototype.init=function(){this.uploader.init(),this.uploader.bind("Init",this.onInit),this.uploader.bind("FilesAdded",this.onFilesAdded),this.uploader.bind("BeforeUpload",this.onBeforeUpload),this.uploader.bind("UploadProgress",this.onUploadProgress),this.uploader.bind("FileUploaded",this.onFileUploaded),this.uploader.bind("Error",this.onError),plupload.addFileFilter("ai1wm_archive_size",function(e,t,a){e=parseInt(e,10),t.size=t.hasOwnProperty("size")?parseInt(t.size,10):0,0===e||t.size<=e?a(!0):(this.trigger("Error",{code:plupload.FILE_SIZE_ERROR,message:ai1wm_import.oversize}),a(!1))}),plupload.addFileFilter("ai1wm_archive_extension",function(e,t,a){var o=t.name.substr((~-t.name.lastIndexOf(".")>>>0)+2);r.inArray(o,e)>-1?a(!0):(this.trigger("Error",{code:plupload.FILE_EXTENSION_ERROR,message:ai1wm_import.invalid_extension}),a(!1))})},n.prototype.onInit=function(e){var t=r("#ai1wm-plupload-upload-ui");e.features.dragdrop&&!r(document.body).hasClass("mobile")?r("#ai1wm-drag-drop-area").bind("dragover.wp-uploader",function(){t.addClass("ai1wm-drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){t.removeClass("ai1wm-drag-over")}):r("#ai1wm-drag-drop-area").unbind(".wp-uploader"),"html4"==e.runtime&&r(".upload-flash-bypass").hide(),this.model=new i},n.prototype.onFilesAdded=function(e){e.refresh(),e.start(),r(window).bind("beforeunload",function(){return"You are about to stop importing your website, are you sure?"})},n.prototype.onBeforeUpload=function(e,t){var a=this;this.storage=o.random(12),this.archive=t.name,r.extend(e.settings.multipart_params,{storage:this.storage,archive:this.archive}),a.model.setParams([{name:"storage",value:this.storage},{name:"archive",value:this.archive}]),this.model.onStop=function(){e.stop(),e.splice(),a.model.clean()},this.model.setStatus({type:"progress",percent:1})},n.prototype.onUploadProgress=function(e,t){this.model.setStatus({type:"progress",percent:t.percent})},n.prototype.onFileUploaded=function(){this.model.start()},n.prototype.onError=function(e,t){this.model.setStatus({type:"error",message:t.message})},t.exports=n,a.Ai1wm={Util:o,Import:i}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../servmask/util":9,"./import":2}],5:[function(e){var t=(e("./util"),e("./dialog")),a={s3:"Amazon S3 Extension",url:"URL Extension",ftp:"FTP Extension",gdrive:"Google Drive Extension",dropbox:"Dropbox Extension"};window.Ai1wmExportController=function(e){this._export={},this._provider=e},window.Ai1wmExportController.prototype.start=function(){new t("<strong>All in One WP Migration</strong> is not compatible with current version of <strong>"+a[this._provider]+'</strong>. Please contact <a href="mailto:support@servmask.com">support@servmask.com</a> for more details.')},window.Ai1wmImportController=function(e){this._import={},this._provider=e},window.Ai1wmImportController.prototype.init=function(){},window.Ai1wmImportController.prototype.download=function(){new t("<strong>All in One WP Migration</strong> is not compatible with current version of <strong>"+a[this._provider]+'</strong>. Please contact <a href="mailto:support@servmask.com">support@servmask.com</a> for more details.')}},{"./dialog":6,"./util":9}],6:[function(e,t){var a=jQuery,o=function(e){var t=this;this.overlay=a('<div class="ai1wm-overlay"></div>'),this.container=a("<div></div>"),this.modal=a('<div class="ai1wm-modal-container"></div>'),this.section=a("<section></section>"),this.message=a("<p></p>").addClass("ai1wm-dialog-message").html(e),this.action=a("<div></div>"),this.closeButton=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){t.modal.hide(),t.overlay.hide()}),this.action.append(this.closeButton),this.section.append(this.message),this.container.append(this.section).append(this.action),this.modal.html(this.container).show(),this.overlay.show(),a("body").append(this.overlay).append(this.modal)};t.exports=o},{}],7:[function(){jQuery(document).ready(function(e){"use strict";e(".ai1wm-feedback-type").attr("checked",!1),e("#ai1wm-feedback-type-link-1").click(function(t){var a=e("#ai1wm-feedback-type-1");a.is(":checked")?(a.attr("checked",!1),t.preventDefault()):a.attr("checked",!0)}),e("#ai1wm-feedback-type-2").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-3").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","Leave plugin developers any feedback here"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-type-3").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-2").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","How may we help you?"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-cancel").click(function(t){e(".ai1wm-feedback-form").fadeOut(function(){e(".ai1wm-feedback-type").attr("checked",!1).closest("li").show()}),t.preventDefault()}),e("#ai1wm-feedback-submit").click(function(){var t=e(".ai1wm-feedback-type:checked").val(),a=e(".ai1wm-feedback-email").val(),o=e(".ai1wm-feedback-message").val(),i=e(".ai1wm-feedback-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_feedback.ajax.url,data:{"ai1wm-type":t,"ai1wm-email":a,"ai1wm-message":o,"ai1wm-terms":+i},success:function(t){var a=t.errors;if(a.length>0){e(".ai1wm-feedback .ai1wm-message").remove();var o=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(a,function(e,t){o.append("<p>"+t+"</p>")}),e(".ai1wm-feedback").prepend(o)}else{var i=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your feedback!</p>");e(".ai1wm-feedback").html(i)}},dataType:"json",async:!1})})})},{}],8:[function(){jQuery(document).ready(function(e){"use strict";e("#ai1wm-report-problem-button").click(function(t){e(this).next(".ai1wm-report-problem-dialog").toggleClass("ai1wm-report-active"),t.preventDefault()}),e("#ai1wm-report-cancel").click(function(t){e(this).closest(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active"),t.preventDefault()}),e("#ai1wm-report-submit").click(function(){var t=e(".ai1wm-report-email").val(),a=e(".ai1wm-report-message").val(),o=e(".ai1wm-report-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_report.ajax.url,data:{"ai1wm-email":t,"ai1wm-message":a,"ai1wm-terms":+o},success:function(t){var a=t.errors;if(a.length>0){e(".ai1wm-report-problem-dialog .ai1wm-message").remove();var o=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(a,function(e,t){o.append("<p>"+t+"</p>")}),e(".ai1wm-report-problem-dialog").prepend(o)}else{var i=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your request!</p>");e(".ai1wm-report-problem-dialog").html(i),setTimeout(function(){e(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active")},2e3)}},dataType:"json",async:!1})})})},{}],9:[function(e,t){var a=jQuery;t.exports={random:function(e){for(var t="",a="abcdefghijklmnopqrstuvwxyz0123456789",o=0;e>o;o++)t+=a.charAt(Math.floor(Math.random()*a.length));return t},form:function(e){return a(e).serializeArray()},ucfirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},list:function(e){if(a.isPlainObject(e)){var t=[],o=decodeURIComponent(a.param(e)).split("&");return a.each(o,function(e,a){var o=a.split("=");t.push({name:o[0],value:o[1]})}),t}return e}}},{}]},{},[1]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******/ (function(modules) { // webpackBootstrap
|
| 2 |
+
/******/ // The module cache
|
| 3 |
+
/******/ var installedModules = {};
|
| 4 |
+
|
| 5 |
+
/******/ // The require function
|
| 6 |
+
/******/ function __webpack_require__(moduleId) {
|
| 7 |
+
|
| 8 |
+
/******/ // Check if module is in cache
|
| 9 |
+
/******/ if(installedModules[moduleId])
|
| 10 |
+
/******/ return installedModules[moduleId].exports;
|
| 11 |
+
|
| 12 |
+
/******/ // Create a new module (and put it into the cache)
|
| 13 |
+
/******/ var module = installedModules[moduleId] = {
|
| 14 |
+
/******/ exports: {},
|
| 15 |
+
/******/ id: moduleId,
|
| 16 |
+
/******/ loaded: false
|
| 17 |
+
/******/ };
|
| 18 |
+
|
| 19 |
+
/******/ // Execute the module function
|
| 20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
| 21 |
+
|
| 22 |
+
/******/ // Flag the module as loaded
|
| 23 |
+
/******/ module.loaded = true;
|
| 24 |
+
|
| 25 |
+
/******/ // Return the exports of the module
|
| 26 |
+
/******/ return module.exports;
|
| 27 |
+
/******/ }
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
| 31 |
+
/******/ __webpack_require__.m = modules;
|
| 32 |
+
|
| 33 |
+
/******/ // expose the module cache
|
| 34 |
+
/******/ __webpack_require__.c = installedModules;
|
| 35 |
+
|
| 36 |
+
/******/ // __webpack_public_path__
|
| 37 |
+
/******/ __webpack_require__.p = "";
|
| 38 |
+
|
| 39 |
+
/******/ // Load entry module and return exports
|
| 40 |
+
/******/ return __webpack_require__(0);
|
| 41 |
+
/******/ })
|
| 42 |
+
/************************************************************************/
|
| 43 |
+
/******/ ([
|
| 44 |
+
/* 0 */
|
| 45 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 46 |
+
|
| 47 |
+
'use strict';
|
| 48 |
+
|
| 49 |
+
/**
|
| 50 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 51 |
+
*
|
| 52 |
+
* This program is free software: you can redistribute it and/or modify
|
| 53 |
+
* it under the terms of the GNU General Public License as published by
|
| 54 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 55 |
+
* (at your option) any later version.
|
| 56 |
+
*
|
| 57 |
+
* This program is distributed in the hope that it will be useful,
|
| 58 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 59 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 60 |
+
* GNU General Public License for more details.
|
| 61 |
+
*
|
| 62 |
+
* You should have received a copy of the GNU General Public License
|
| 63 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 64 |
+
*
|
| 65 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 66 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 67 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 68 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 69 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 70 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 71 |
+
*/
|
| 72 |
+
|
| 73 |
+
var Report = __webpack_require__(1),
|
| 74 |
+
Feedback = __webpack_require__(2),
|
| 75 |
+
Deprecated = __webpack_require__(8),
|
| 76 |
+
FileUploader = __webpack_require__(12);
|
| 77 |
+
|
| 78 |
+
jQuery(document).ready(function ($) {
|
| 79 |
+
'use strict';
|
| 80 |
+
|
| 81 |
+
var uploader = new FileUploader();
|
| 82 |
+
uploader.init();
|
| 83 |
+
|
| 84 |
+
// Expands/Collapses Import from
|
| 85 |
+
$('.ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
|
| 86 |
+
$(this).parent().toggleClass('ai1wm-open');
|
| 87 |
+
});
|
| 88 |
+
});
|
| 89 |
+
|
| 90 |
+
/***/ },
|
| 91 |
+
/* 1 */
|
| 92 |
+
/***/ function(module, exports) {
|
| 93 |
+
|
| 94 |
+
'use strict';
|
| 95 |
+
|
| 96 |
+
/**
|
| 97 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 98 |
+
*
|
| 99 |
+
* This program is free software: you can redistribute it and/or modify
|
| 100 |
+
* it under the terms of the GNU General Public License as published by
|
| 101 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 102 |
+
* (at your option) any later version.
|
| 103 |
+
*
|
| 104 |
+
* This program is distributed in the hope that it will be useful,
|
| 105 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 106 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 107 |
+
* GNU General Public License for more details.
|
| 108 |
+
*
|
| 109 |
+
* You should have received a copy of the GNU General Public License
|
| 110 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 111 |
+
*
|
| 112 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 113 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 114 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 115 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 116 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 117 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 118 |
+
*/
|
| 119 |
+
|
| 120 |
+
jQuery(document).ready(function ($) {
|
| 121 |
+
'use strict';
|
| 122 |
+
|
| 123 |
+
$('#ai1wm-report-problem-button').click(function (e) {
|
| 124 |
+
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
| 125 |
+
|
| 126 |
+
e.preventDefault();
|
| 127 |
+
});
|
| 128 |
+
|
| 129 |
+
$('#ai1wm-report-cancel').click(function (e) {
|
| 130 |
+
$(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
| 131 |
+
|
| 132 |
+
e.preventDefault();
|
| 133 |
+
});
|
| 134 |
+
|
| 135 |
+
$('#ai1wm-report-submit').click(function () {
|
| 136 |
+
var email = $('.ai1wm-report-email').val();
|
| 137 |
+
var message = $('.ai1wm-report-message').val();
|
| 138 |
+
var terms = $('.ai1wm-report-terms').is(':checked');
|
| 139 |
+
|
| 140 |
+
$.ajax({
|
| 141 |
+
type: 'POST',
|
| 142 |
+
url: ai1wm_report.ajax.url,
|
| 143 |
+
data: { 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
|
| 144 |
+
success: function success(data) {
|
| 145 |
+
var errors = data.errors;
|
| 146 |
+
if (errors.length > 0) {
|
| 147 |
+
// Reset previous messages
|
| 148 |
+
$('.ai1wm-report-problem-dialog .ai1wm-message').remove();
|
| 149 |
+
|
| 150 |
+
var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
| 151 |
+
$.each(errors, function (key, value) {
|
| 152 |
+
content.append('<p>' + value + '</p>');
|
| 153 |
+
});
|
| 154 |
+
|
| 155 |
+
$('.ai1wm-report-problem-dialog').prepend(content);
|
| 156 |
+
} else {
|
| 157 |
+
var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
|
| 158 |
+
$('.ai1wm-report-problem-dialog').html(_content);
|
| 159 |
+
|
| 160 |
+
// Hide message
|
| 161 |
+
setTimeout(function () {
|
| 162 |
+
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
| 163 |
+
}, 2000);
|
| 164 |
+
}
|
| 165 |
+
},
|
| 166 |
+
dataType: 'json',
|
| 167 |
+
async: false
|
| 168 |
+
});
|
| 169 |
+
});
|
| 170 |
+
});
|
| 171 |
+
|
| 172 |
+
/***/ },
|
| 173 |
+
/* 2 */
|
| 174 |
+
/***/ function(module, exports) {
|
| 175 |
+
|
| 176 |
+
'use strict';
|
| 177 |
+
|
| 178 |
+
/**
|
| 179 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 180 |
+
*
|
| 181 |
+
* This program is free software: you can redistribute it and/or modify
|
| 182 |
+
* it under the terms of the GNU General Public License as published by
|
| 183 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 184 |
+
* (at your option) any later version.
|
| 185 |
+
*
|
| 186 |
+
* This program is distributed in the hope that it will be useful,
|
| 187 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 188 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 189 |
+
* GNU General Public License for more details.
|
| 190 |
+
*
|
| 191 |
+
* You should have received a copy of the GNU General Public License
|
| 192 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 193 |
+
*
|
| 194 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 195 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 196 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 197 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 198 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 199 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 200 |
+
*/
|
| 201 |
+
|
| 202 |
+
jQuery(document).ready(function ($) {
|
| 203 |
+
'use strict';
|
| 204 |
+
|
| 205 |
+
// Reset feedback form
|
| 206 |
+
|
| 207 |
+
$('.ai1wm-feedback-type').attr('checked', false);
|
| 208 |
+
|
| 209 |
+
// Review
|
| 210 |
+
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
| 211 |
+
var radio = $('#ai1wm-feedback-type-1');
|
| 212 |
+
if (radio.is(':checked')) {
|
| 213 |
+
radio.attr('checked', false);
|
| 214 |
+
e.preventDefault();
|
| 215 |
+
} else {
|
| 216 |
+
radio.attr('checked', true);
|
| 217 |
+
}
|
| 218 |
+
});
|
| 219 |
+
|
| 220 |
+
// Improvement
|
| 221 |
+
$('#ai1wm-feedback-type-2').click(function () {
|
| 222 |
+
// Hide other options
|
| 223 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
| 224 |
+
|
| 225 |
+
// change placeholder message
|
| 226 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
|
| 227 |
+
|
| 228 |
+
// Show feedback form
|
| 229 |
+
$('.ai1wm-feedback-form').fadeIn();
|
| 230 |
+
});
|
| 231 |
+
|
| 232 |
+
// Help
|
| 233 |
+
$('#ai1wm-feedback-type-3').click(function () {
|
| 234 |
+
// Hide other options
|
| 235 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
| 236 |
+
|
| 237 |
+
// change placeholder message
|
| 238 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
|
| 239 |
+
|
| 240 |
+
// Show feedback form
|
| 241 |
+
$('.ai1wm-feedback-form').fadeIn();
|
| 242 |
+
});
|
| 243 |
+
|
| 244 |
+
// Cancel feedback form
|
| 245 |
+
$('#ai1wm-feedback-cancel').click(function (e) {
|
| 246 |
+
$('.ai1wm-feedback-form').fadeOut(function () {
|
| 247 |
+
$('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
|
| 248 |
+
});
|
| 249 |
+
e.preventDefault();
|
| 250 |
+
});
|
| 251 |
+
|
| 252 |
+
// Send feedback form
|
| 253 |
+
$('#ai1wm-feedback-submit').click(function () {
|
| 254 |
+
var type = $('.ai1wm-feedback-type:checked').val();
|
| 255 |
+
var email = $('.ai1wm-feedback-email').val();
|
| 256 |
+
var message = $('.ai1wm-feedback-message').val();
|
| 257 |
+
var terms = $('.ai1wm-feedback-terms').is(':checked');
|
| 258 |
+
|
| 259 |
+
$.ajax({
|
| 260 |
+
type: 'POST',
|
| 261 |
+
url: ai1wm_feedback.ajax.url,
|
| 262 |
+
data: { 'ai1wm-type': type, 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
|
| 263 |
+
success: function success(data) {
|
| 264 |
+
var errors = data.errors;
|
| 265 |
+
if (errors.length > 0) {
|
| 266 |
+
// Reset previous messages
|
| 267 |
+
$('.ai1wm-feedback .ai1wm-message').remove();
|
| 268 |
+
|
| 269 |
+
var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
| 270 |
+
$.each(errors, function (key, value) {
|
| 271 |
+
content.append('<p>' + value + '</p>');
|
| 272 |
+
});
|
| 273 |
+
|
| 274 |
+
$('.ai1wm-feedback').prepend(content);
|
| 275 |
+
} else {
|
| 276 |
+
var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
| 277 |
+
$('.ai1wm-feedback').html(_content);
|
| 278 |
+
}
|
| 279 |
+
},
|
| 280 |
+
dataType: 'json',
|
| 281 |
+
async: false
|
| 282 |
+
});
|
| 283 |
+
});
|
| 284 |
+
});
|
| 285 |
+
|
| 286 |
+
/***/ },
|
| 287 |
+
/* 3 */
|
| 288 |
+
/***/ function(module, exports) {
|
| 289 |
+
|
| 290 |
+
'use strict';
|
| 291 |
+
|
| 292 |
+
/**
|
| 293 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 294 |
+
*
|
| 295 |
+
* This program is free software: you can redistribute it and/or modify
|
| 296 |
+
* it under the terms of the GNU General Public License as published by
|
| 297 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 298 |
+
* (at your option) any later version.
|
| 299 |
+
*
|
| 300 |
+
* This program is distributed in the hope that it will be useful,
|
| 301 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 302 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 303 |
+
* GNU General Public License for more details.
|
| 304 |
+
*
|
| 305 |
+
* You should have received a copy of the GNU General Public License
|
| 306 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 307 |
+
*
|
| 308 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 309 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 310 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 311 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 312 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 313 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 314 |
+
*/
|
| 315 |
+
|
| 316 |
+
var $ = jQuery;
|
| 317 |
+
|
| 318 |
+
module.exports = {
|
| 319 |
+
random: function random(len) {
|
| 320 |
+
var text = '';
|
| 321 |
+
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
| 322 |
+
|
| 323 |
+
for (var i = 0; i < len; i++) {
|
| 324 |
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
return text;
|
| 328 |
+
},
|
| 329 |
+
form: function form(id) {
|
| 330 |
+
return $(id).serializeArray();
|
| 331 |
+
},
|
| 332 |
+
ucfirst: function ucfirst(text) {
|
| 333 |
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
| 334 |
+
},
|
| 335 |
+
list: function list(input) {
|
| 336 |
+
// Convert object to list
|
| 337 |
+
if ($.isPlainObject(input)) {
|
| 338 |
+
var result = [];
|
| 339 |
+
var params = decodeURIComponent($.param(input)).split('&');
|
| 340 |
+
|
| 341 |
+
// Loop over params
|
| 342 |
+
$.each(params, function (index, item) {
|
| 343 |
+
var value = item.split('=');
|
| 344 |
+
|
| 345 |
+
// Add item
|
| 346 |
+
result.push({ name: value[0], value: value[1] });
|
| 347 |
+
});
|
| 348 |
+
|
| 349 |
+
return result;
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
return input;
|
| 353 |
+
}
|
| 354 |
+
};
|
| 355 |
+
|
| 356 |
+
/***/ },
|
| 357 |
+
/* 4 */
|
| 358 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 359 |
+
|
| 360 |
+
'use strict';
|
| 361 |
+
|
| 362 |
+
/**
|
| 363 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 364 |
+
*
|
| 365 |
+
* This program is free software: you can redistribute it and/or modify
|
| 366 |
+
* it under the terms of the GNU General Public License as published by
|
| 367 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 368 |
+
* (at your option) any later version.
|
| 369 |
+
*
|
| 370 |
+
* This program is distributed in the hope that it will be useful,
|
| 371 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 372 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 373 |
+
* GNU General Public License for more details.
|
| 374 |
+
*
|
| 375 |
+
* You should have received a copy of the GNU General Public License
|
| 376 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 377 |
+
*
|
| 378 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 379 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 380 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 381 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 382 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 383 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 384 |
+
*/
|
| 385 |
+
|
| 386 |
+
var Util = __webpack_require__(3),
|
| 387 |
+
Modal = __webpack_require__(5),
|
| 388 |
+
$ = jQuery;
|
| 389 |
+
|
| 390 |
+
var Import = function Import() {
|
| 391 |
+
var self = this;
|
| 392 |
+
|
| 393 |
+
// Set params
|
| 394 |
+
this.params = [];
|
| 395 |
+
|
| 396 |
+
// Set modal
|
| 397 |
+
this.modal = new Modal();
|
| 398 |
+
|
| 399 |
+
// Set confirm listener
|
| 400 |
+
this.modal.onConfirm = function (options) {
|
| 401 |
+
self.onConfirm(options);
|
| 402 |
+
};
|
| 403 |
+
|
| 404 |
+
// Set blogs listener
|
| 405 |
+
this.modal.onBlogs = function (options) {
|
| 406 |
+
self.onBlogs(options);
|
| 407 |
+
};
|
| 408 |
+
|
| 409 |
+
// Set stop listener
|
| 410 |
+
this.modal.onStop = function (options) {
|
| 411 |
+
self.onStop(options);
|
| 412 |
+
};
|
| 413 |
+
};
|
| 414 |
+
|
| 415 |
+
Import.prototype.setParams = function (params) {
|
| 416 |
+
this.params = Util.list(params);
|
| 417 |
+
};
|
| 418 |
+
|
| 419 |
+
Import.prototype.start = function (options) {
|
| 420 |
+
var self = this;
|
| 421 |
+
|
| 422 |
+
// Initializing beforeunload event
|
| 423 |
+
$(window).bind('beforeunload', function () {
|
| 424 |
+
return 'You are about to stop importing your website, are you sure?';
|
| 425 |
+
});
|
| 426 |
+
|
| 427 |
+
// Set stop
|
| 428 |
+
this.stop = false;
|
| 429 |
+
|
| 430 |
+
// Set initial status
|
| 431 |
+
this.setStatus({ type: 'info', message: 'Preparing to import...' });
|
| 432 |
+
|
| 433 |
+
// Set params
|
| 434 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
|
| 435 |
+
|
| 436 |
+
// Set additional params
|
| 437 |
+
if (options) {
|
| 438 |
+
params = params.concat(Util.list(options));
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
// Import
|
| 442 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 443 |
+
self.getStatus();
|
| 444 |
+
}).fail(function () {
|
| 445 |
+
self.setStatus({
|
| 446 |
+
type: 'error',
|
| 447 |
+
message: 'Unable to start the import. Refresh the page and try again'
|
| 448 |
+
});
|
| 449 |
+
});
|
| 450 |
+
};
|
| 451 |
+
|
| 452 |
+
Import.prototype.confirm = function (options) {
|
| 453 |
+
var self = this;
|
| 454 |
+
|
| 455 |
+
// Set params
|
| 456 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
| 457 |
+
|
| 458 |
+
// Set additional params
|
| 459 |
+
if (options) {
|
| 460 |
+
params = params.concat(Util.list(options));
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
// Confirm
|
| 464 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 465 |
+
self.getStatus(ai1wm_import.status.php);
|
| 466 |
+
}).fail(function () {
|
| 467 |
+
self.setStatus({
|
| 468 |
+
type: 'error',
|
| 469 |
+
message: 'Unable to confirm the import. Refresh the page and try again'
|
| 470 |
+
});
|
| 471 |
+
});
|
| 472 |
+
};
|
| 473 |
+
|
| 474 |
+
Import.prototype.blogs = function (options) {
|
| 475 |
+
var self = this;
|
| 476 |
+
|
| 477 |
+
// Set params
|
| 478 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
| 479 |
+
|
| 480 |
+
// Set additional params
|
| 481 |
+
if (options) {
|
| 482 |
+
params = params.concat(Util.list(options));
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
// Blogs
|
| 486 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 487 |
+
self.getStatus(ai1wm_import.status.php);
|
| 488 |
+
}).fail(function () {
|
| 489 |
+
self.setStatus({
|
| 490 |
+
type: 'error',
|
| 491 |
+
message: 'Unable to prepare blogs the import. Refresh the page and try again'
|
| 492 |
+
});
|
| 493 |
+
});
|
| 494 |
+
};
|
| 495 |
+
|
| 496 |
+
Import.prototype.clean = function (options) {
|
| 497 |
+
var self = this;
|
| 498 |
+
|
| 499 |
+
// Set stop
|
| 500 |
+
this.stop = true;
|
| 501 |
+
|
| 502 |
+
// Set params
|
| 503 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
|
| 504 |
+
|
| 505 |
+
// Set additional params
|
| 506 |
+
if (options) {
|
| 507 |
+
params = params.concat(Util.list(options));
|
| 508 |
+
}
|
| 509 |
+
|
| 510 |
+
// Clean
|
| 511 |
+
$.post(ai1wm_import.ajax.url, params).done(function () {
|
| 512 |
+
// Unbinding the beforeunload event when we stop importing
|
| 513 |
+
$(window).unbind('beforeunload');
|
| 514 |
+
}).fail(function () {
|
| 515 |
+
self.setStatus({
|
| 516 |
+
type: 'error',
|
| 517 |
+
message: 'Unable to clean the import. Refresh the page and try again'
|
| 518 |
+
});
|
| 519 |
+
});
|
| 520 |
+
};
|
| 521 |
+
|
| 522 |
+
Import.prototype.getStatus = function (url, retry) {
|
| 523 |
+
var self = this,
|
| 524 |
+
retry = retry || 0;
|
| 525 |
+
|
| 526 |
+
// Stop getting status
|
| 527 |
+
if (this.stop) {
|
| 528 |
+
return;
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
$.ajax({
|
| 532 |
+
cache: false,
|
| 533 |
+
url: url,
|
| 534 |
+
dataType: 'json'
|
| 535 |
+
}).done(function (params) {
|
| 536 |
+
if (params) {
|
| 537 |
+
self.setStatus(params);
|
| 538 |
+
|
| 539 |
+
// Next status
|
| 540 |
+
switch (params.type) {
|
| 541 |
+
case 'done':
|
| 542 |
+
case 'error':
|
| 543 |
+
// Unbinding the beforeunload event when any case is performed
|
| 544 |
+
$(window).unbind('beforeunload');
|
| 545 |
+
return;
|
| 546 |
+
|
| 547 |
+
case 'confirm':
|
| 548 |
+
case 'blogs':
|
| 549 |
+
return;
|
| 550 |
+
}
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
// Import is not done yet, let's check status in 3 seconds
|
| 554 |
+
setTimeout(function () {
|
| 555 |
+
self.getStatus(url, retry);
|
| 556 |
+
}, 3000);
|
| 557 |
+
}).fail(function () {
|
| 558 |
+
retry++;
|
| 559 |
+
|
| 560 |
+
// Retry 6 times
|
| 561 |
+
if (retry >= 6) {
|
| 562 |
+
self.setStatus({
|
| 563 |
+
type: 'error',
|
| 564 |
+
message: 'Unable to retrieve status of the import. Is your server running?'
|
| 565 |
+
});
|
| 566 |
+
} else if (retry >= 3) {
|
| 567 |
+
self.getStatus(ai1wm_import.status.js, retry);
|
| 568 |
+
} else {
|
| 569 |
+
self.getStatus(ai1wm_import.status.php, retry);
|
| 570 |
+
}
|
| 571 |
+
});;
|
| 572 |
+
};
|
| 573 |
+
|
| 574 |
+
Import.prototype.setStatus = function (params) {
|
| 575 |
+
this.modal.render(params);
|
| 576 |
+
};
|
| 577 |
+
|
| 578 |
+
Import.prototype.onConfirm = function (options) {
|
| 579 |
+
this.confirm(options);
|
| 580 |
+
};
|
| 581 |
+
|
| 582 |
+
Import.prototype.onBlogs = function (options) {
|
| 583 |
+
this.blogs(options);
|
| 584 |
+
};
|
| 585 |
+
|
| 586 |
+
Import.prototype.onStop = function (options) {
|
| 587 |
+
this.clean(options);
|
| 588 |
+
};
|
| 589 |
+
|
| 590 |
+
module.exports = Import;
|
| 591 |
+
|
| 592 |
+
/***/ },
|
| 593 |
+
/* 5 */
|
| 594 |
+
/***/ function(module, exports) {
|
| 595 |
+
|
| 596 |
+
'use strict';
|
| 597 |
+
|
| 598 |
+
/**
|
| 599 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 600 |
+
*
|
| 601 |
+
* This program is free software: you can redistribute it and/or modify
|
| 602 |
+
* it under the terms of the GNU General Public License as published by
|
| 603 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 604 |
+
* (at your option) any later version.
|
| 605 |
+
*
|
| 606 |
+
* This program is distributed in the hope that it will be useful,
|
| 607 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 608 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 609 |
+
* GNU General Public License for more details.
|
| 610 |
+
*
|
| 611 |
+
* You should have received a copy of the GNU General Public License
|
| 612 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 613 |
+
*
|
| 614 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 615 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 616 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 617 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 618 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 619 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 620 |
+
*/
|
| 621 |
+
|
| 622 |
+
var $ = jQuery;
|
| 623 |
+
|
| 624 |
+
var Modal = function Modal() {
|
| 625 |
+
var self = this;
|
| 626 |
+
this.view = null;
|
| 627 |
+
|
| 628 |
+
// Error Modal
|
| 629 |
+
this.error = function (params) {
|
| 630 |
+
|
| 631 |
+
// Create the modal container
|
| 632 |
+
var container = $('<div></div>');
|
| 633 |
+
|
| 634 |
+
// Create section to hold title, message and action
|
| 635 |
+
var section = $('<section></section>');
|
| 636 |
+
|
| 637 |
+
// Create header to hold title
|
| 638 |
+
var header = $('<h1></h1>');
|
| 639 |
+
|
| 640 |
+
// Create paragraph to hold mesage
|
| 641 |
+
var message = $('<p></p>').html(params.message);
|
| 642 |
+
|
| 643 |
+
// Create action section
|
| 644 |
+
var action = $('<div></div>');
|
| 645 |
+
|
| 646 |
+
// Create title
|
| 647 |
+
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to import');
|
| 648 |
+
|
| 649 |
+
// Create close button
|
| 650 |
+
var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 651 |
+
self.modal.hide();
|
| 652 |
+
self.overlay.hide();
|
| 653 |
+
});
|
| 654 |
+
|
| 655 |
+
// Append close button
|
| 656 |
+
action.append(closeButton);
|
| 657 |
+
|
| 658 |
+
// Append title to section
|
| 659 |
+
header.append(title);
|
| 660 |
+
|
| 661 |
+
// Append header and message to section
|
| 662 |
+
section.append(header).append(message);
|
| 663 |
+
|
| 664 |
+
// Append section and action to container
|
| 665 |
+
container.append(section).append(action);
|
| 666 |
+
|
| 667 |
+
// Render modal
|
| 668 |
+
self.modal.html(container).show();
|
| 669 |
+
self.overlay.show();
|
| 670 |
+
};
|
| 671 |
+
|
| 672 |
+
// Progress Modal
|
| 673 |
+
this.progress = function (params) {
|
| 674 |
+
if (this.view === 'progress') {
|
| 675 |
+
// Update progressBarMeter
|
| 676 |
+
this.progress.progressBarMeter.width(params.percent + '%');
|
| 677 |
+
|
| 678 |
+
// Update progressBarPercent
|
| 679 |
+
this.progress.progressBarPercent.text(params.percent + '%');
|
| 680 |
+
} else {
|
| 681 |
+
|
| 682 |
+
// Create the modal container
|
| 683 |
+
var container = $('<div></div>');
|
| 684 |
+
|
| 685 |
+
// Create section to hold title, message and action
|
| 686 |
+
var section = $('<section></section>');
|
| 687 |
+
|
| 688 |
+
// Create header to hold progress bar
|
| 689 |
+
var header = $('<h1></h1>');
|
| 690 |
+
|
| 691 |
+
// Create paragraph to hold mesage
|
| 692 |
+
var message = $('<p></p>');
|
| 693 |
+
|
| 694 |
+
// Create action section
|
| 695 |
+
var action = $('<div></div>');
|
| 696 |
+
|
| 697 |
+
// Create progressBar
|
| 698 |
+
var progressBar = $('<span class="ai1wm-progress-bar"></span>');
|
| 699 |
+
|
| 700 |
+
// Create progressBarMeter
|
| 701 |
+
this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
|
| 702 |
+
|
| 703 |
+
// Create progressBarPercent
|
| 704 |
+
this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
|
| 705 |
+
|
| 706 |
+
// Create stop import
|
| 707 |
+
var stopButton = $('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
|
| 708 |
+
$(this).attr('disabled', 'disabled');
|
| 709 |
+
self.onStop();
|
| 710 |
+
self.modal.hide();
|
| 711 |
+
self.overlay.hide();
|
| 712 |
+
});
|
| 713 |
+
|
| 714 |
+
// Append progress meter and progress percent
|
| 715 |
+
progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
|
| 716 |
+
|
| 717 |
+
// Append stop button
|
| 718 |
+
action.append(stopButton);
|
| 719 |
+
|
| 720 |
+
// Append progress bar to section
|
| 721 |
+
header.append(progressBar);
|
| 722 |
+
|
| 723 |
+
// Append header to section
|
| 724 |
+
section.append(header);
|
| 725 |
+
|
| 726 |
+
// Append section and action to container
|
| 727 |
+
container.append(section).append(action);
|
| 728 |
+
|
| 729 |
+
// Render modal
|
| 730 |
+
self.modal.html(container).show();
|
| 731 |
+
self.overlay.show();
|
| 732 |
+
}
|
| 733 |
+
};
|
| 734 |
+
|
| 735 |
+
// Confirm Modal
|
| 736 |
+
this.confirm = function (params) {
|
| 737 |
+
|
| 738 |
+
// Create the modal container
|
| 739 |
+
var container = $('<div></div>');
|
| 740 |
+
|
| 741 |
+
// Create section to hold title, message and action
|
| 742 |
+
var section = $('<section></section>');
|
| 743 |
+
|
| 744 |
+
// Create header to hold warning
|
| 745 |
+
var header = $('<h1></h1>');
|
| 746 |
+
|
| 747 |
+
// Create paragraph to hold mesage
|
| 748 |
+
var message = $('<p></p>').html(params.message);
|
| 749 |
+
|
| 750 |
+
// Create action section
|
| 751 |
+
var action = $('<div></div>');
|
| 752 |
+
|
| 753 |
+
// Create warning
|
| 754 |
+
var warning = $('<span class="ai1wm-icon-notification"></span>');
|
| 755 |
+
|
| 756 |
+
// Create confirm button
|
| 757 |
+
var confirmButton = $('<button class="ai1wm-button-green">Continue</button>').on('click', function () {
|
| 758 |
+
$(this).attr('disabled', 'disabled');
|
| 759 |
+
self.onConfirm();
|
| 760 |
+
});
|
| 761 |
+
|
| 762 |
+
// Append confirm button
|
| 763 |
+
action.append(confirmButton);
|
| 764 |
+
|
| 765 |
+
// Append warning to section
|
| 766 |
+
header.append(warning);
|
| 767 |
+
|
| 768 |
+
// Append header and message to section
|
| 769 |
+
section.append(header).append(message);
|
| 770 |
+
|
| 771 |
+
// Append section and action to container
|
| 772 |
+
container.append(section).append(action);
|
| 773 |
+
|
| 774 |
+
// Render modal
|
| 775 |
+
self.modal.html(container).show();
|
| 776 |
+
self.overlay.show();
|
| 777 |
+
};
|
| 778 |
+
|
| 779 |
+
// Blogs Modal
|
| 780 |
+
this.blogs = function (params) {
|
| 781 |
+
|
| 782 |
+
// Create the modal container
|
| 783 |
+
var container = $('<form></form>');
|
| 784 |
+
|
| 785 |
+
// Create section to hold title, message and action
|
| 786 |
+
var section = $('<section></section>');
|
| 787 |
+
|
| 788 |
+
// Create header to hold title
|
| 789 |
+
var header = $('<h1></h1>');
|
| 790 |
+
|
| 791 |
+
// Create paragraph to hold mesage
|
| 792 |
+
var message = $('<p></p>').html(params.message);
|
| 793 |
+
|
| 794 |
+
// Create action section
|
| 795 |
+
var action = $('<div></div>');
|
| 796 |
+
|
| 797 |
+
// Create title
|
| 798 |
+
var title = $('<span></span>').addClass('ai1wm-title-grey').text('Update subsite name');
|
| 799 |
+
|
| 800 |
+
// Create continue button
|
| 801 |
+
var continueButton = $('<button class="ai1wm-button-green">Continue</button>').on('click', function () {
|
| 802 |
+
$(this).attr('disabled', 'disabled');
|
| 803 |
+
self.onBlogs($(this).closest('form').serializeArray());
|
| 804 |
+
});
|
| 805 |
+
|
| 806 |
+
// Append continue button
|
| 807 |
+
action.append(continueButton);
|
| 808 |
+
|
| 809 |
+
// Append title to section
|
| 810 |
+
header.append(title);
|
| 811 |
+
|
| 812 |
+
// Append header and message to section
|
| 813 |
+
section.append(header).append(message);
|
| 814 |
+
|
| 815 |
+
// Append section and action to container
|
| 816 |
+
container.append(section).append(action);
|
| 817 |
+
|
| 818 |
+
// Render modal
|
| 819 |
+
self.modal.html(container).show();
|
| 820 |
+
self.overlay.show();
|
| 821 |
+
};
|
| 822 |
+
|
| 823 |
+
// Info Modal
|
| 824 |
+
this.info = function (params) {
|
| 825 |
+
|
| 826 |
+
// Create the modal container
|
| 827 |
+
var container = $('<div></div>');
|
| 828 |
+
|
| 829 |
+
// Create section to hold title, message and action
|
| 830 |
+
var section = $('<section></section>');
|
| 831 |
+
|
| 832 |
+
// Create header to hold loader
|
| 833 |
+
var header = $('<h1></h1>');
|
| 834 |
+
|
| 835 |
+
// Create paragraph to hold mesage
|
| 836 |
+
var message = $('<p></p>').html(params.message);
|
| 837 |
+
|
| 838 |
+
// Create action section
|
| 839 |
+
var action = $('<div></div>');
|
| 840 |
+
|
| 841 |
+
// Create loader
|
| 842 |
+
var loader = $('<span class="ai1wm-loader"></span>');
|
| 843 |
+
|
| 844 |
+
// Create stop import
|
| 845 |
+
var stopButton = $('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr('disabled', 'disabled');
|
| 846 |
+
|
| 847 |
+
// Append stop button
|
| 848 |
+
action.append(stopButton);
|
| 849 |
+
|
| 850 |
+
// Append loader to header
|
| 851 |
+
header.append(loader);
|
| 852 |
+
|
| 853 |
+
// Append header and message to section
|
| 854 |
+
section.append(header).append(message);
|
| 855 |
+
|
| 856 |
+
// Append section and action to container
|
| 857 |
+
container.append(section).append(action);
|
| 858 |
+
|
| 859 |
+
// Render modal
|
| 860 |
+
self.modal.html(container).show();
|
| 861 |
+
self.overlay.show();
|
| 862 |
+
};
|
| 863 |
+
|
| 864 |
+
// Done Modal
|
| 865 |
+
this.done = function (params) {
|
| 866 |
+
|
| 867 |
+
// Create the modal container
|
| 868 |
+
var container = $('<div></div>');
|
| 869 |
+
|
| 870 |
+
// Create section to hold title, message and action
|
| 871 |
+
var section = $('<section></section>');
|
| 872 |
+
|
| 873 |
+
// Create header to hold title
|
| 874 |
+
var header = $('<h1></h1>');
|
| 875 |
+
|
| 876 |
+
// Create paragraph to hold mesage
|
| 877 |
+
var message = $('<p></p>').html(params.message);
|
| 878 |
+
|
| 879 |
+
// Create action section
|
| 880 |
+
var action = $('<div></div>');
|
| 881 |
+
|
| 882 |
+
// Create title
|
| 883 |
+
var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
|
| 884 |
+
|
| 885 |
+
// Create close button
|
| 886 |
+
var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 887 |
+
self.modal.hide();
|
| 888 |
+
self.overlay.hide();
|
| 889 |
+
});
|
| 890 |
+
|
| 891 |
+
// Append close button
|
| 892 |
+
action.append(closeButton);
|
| 893 |
+
|
| 894 |
+
// Append title to section
|
| 895 |
+
header.append(title);
|
| 896 |
+
|
| 897 |
+
// Append header and message to section
|
| 898 |
+
section.append(header).append(message);
|
| 899 |
+
|
| 900 |
+
// Append section and action to container
|
| 901 |
+
container.append(section).append(action);
|
| 902 |
+
|
| 903 |
+
// Render modal
|
| 904 |
+
self.modal.html(container).show();
|
| 905 |
+
self.overlay.show();
|
| 906 |
+
};
|
| 907 |
+
|
| 908 |
+
// Create the overlay
|
| 909 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
| 910 |
+
|
| 911 |
+
// Create the modal container
|
| 912 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
| 913 |
+
|
| 914 |
+
$('body').append(this.overlay) // Append overlay to body
|
| 915 |
+
.append(this.modal); // Append modal to body
|
| 916 |
+
};
|
| 917 |
+
|
| 918 |
+
Modal.prototype.render = function (params) {
|
| 919 |
+
|
| 920 |
+
// Show modal
|
| 921 |
+
switch (params.type) {
|
| 922 |
+
case 'error':
|
| 923 |
+
this.error(params);
|
| 924 |
+
break;
|
| 925 |
+
|
| 926 |
+
case 'confirm':
|
| 927 |
+
this.confirm(params);
|
| 928 |
+
break;
|
| 929 |
+
|
| 930 |
+
case 'blogs':
|
| 931 |
+
this.blogs(params);
|
| 932 |
+
break;
|
| 933 |
+
|
| 934 |
+
case 'progress':
|
| 935 |
+
this.progress(params);
|
| 936 |
+
break;
|
| 937 |
+
|
| 938 |
+
case 'info':
|
| 939 |
+
this.info(params);
|
| 940 |
+
break;
|
| 941 |
+
|
| 942 |
+
case 'done':
|
| 943 |
+
this.done(params);
|
| 944 |
+
break;
|
| 945 |
+
}
|
| 946 |
+
|
| 947 |
+
this.view = params.type;
|
| 948 |
+
};
|
| 949 |
+
|
| 950 |
+
module.exports = Modal;
|
| 951 |
+
|
| 952 |
+
/***/ },
|
| 953 |
+
/* 6 */,
|
| 954 |
+
/* 7 */,
|
| 955 |
+
/* 8 */
|
| 956 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 957 |
+
|
| 958 |
+
'use strict';
|
| 959 |
+
|
| 960 |
+
/**
|
| 961 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 962 |
+
*
|
| 963 |
+
* This program is free software: you can redistribute it and/or modify
|
| 964 |
+
* it under the terms of the GNU General Public License as published by
|
| 965 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 966 |
+
* (at your option) any later version.
|
| 967 |
+
*
|
| 968 |
+
* This program is distributed in the hope that it will be useful,
|
| 969 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 970 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 971 |
+
* GNU General Public License for more details.
|
| 972 |
+
*
|
| 973 |
+
* You should have received a copy of the GNU General Public License
|
| 974 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 975 |
+
*
|
| 976 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 977 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 978 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 979 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 980 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 981 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 982 |
+
*/
|
| 983 |
+
|
| 984 |
+
var Util = __webpack_require__(3),
|
| 985 |
+
Dialog = __webpack_require__(9);
|
| 986 |
+
|
| 987 |
+
var Extensions = {
|
| 988 |
+
's3': 'Amazon S3 Extension',
|
| 989 |
+
'url': 'URL Extension',
|
| 990 |
+
'ftp': 'FTP Extension',
|
| 991 |
+
'gdrive': 'Google Drive Extension',
|
| 992 |
+
'dropbox': 'Dropbox Extension'
|
| 993 |
+
};
|
| 994 |
+
|
| 995 |
+
window.Ai1wmExportController = function (provider) {
|
| 996 |
+
this._export = {};
|
| 997 |
+
this._provider = provider;
|
| 998 |
+
};
|
| 999 |
+
|
| 1000 |
+
window.Ai1wmExportController.prototype.start = function () {
|
| 1001 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
| 1002 |
+
};
|
| 1003 |
+
|
| 1004 |
+
window.Ai1wmImportController = function (provider) {
|
| 1005 |
+
this._import = {};
|
| 1006 |
+
this._provider = provider;
|
| 1007 |
+
};
|
| 1008 |
+
|
| 1009 |
+
window.Ai1wmImportController.prototype.init = function () {};
|
| 1010 |
+
|
| 1011 |
+
window.Ai1wmImportController.prototype.download = function () {
|
| 1012 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
| 1013 |
+
};
|
| 1014 |
+
|
| 1015 |
+
/***/ },
|
| 1016 |
+
/* 9 */
|
| 1017 |
+
/***/ function(module, exports) {
|
| 1018 |
+
|
| 1019 |
+
'use strict';
|
| 1020 |
+
|
| 1021 |
+
/**
|
| 1022 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 1023 |
+
*
|
| 1024 |
+
* This program is free software: you can redistribute it and/or modify
|
| 1025 |
+
* it under the terms of the GNU General Public License as published by
|
| 1026 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 1027 |
+
* (at your option) any later version.
|
| 1028 |
+
*
|
| 1029 |
+
* This program is distributed in the hope that it will be useful,
|
| 1030 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 1031 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 1032 |
+
* GNU General Public License for more details.
|
| 1033 |
+
*
|
| 1034 |
+
* You should have received a copy of the GNU General Public License
|
| 1035 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 1036 |
+
*
|
| 1037 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 1038 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 1039 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 1040 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 1041 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 1042 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 1043 |
+
*/
|
| 1044 |
+
|
| 1045 |
+
var $ = jQuery;
|
| 1046 |
+
|
| 1047 |
+
var Dialog = function Dialog(text) {
|
| 1048 |
+
var self = this;
|
| 1049 |
+
|
| 1050 |
+
// Create the overlay
|
| 1051 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
| 1052 |
+
|
| 1053 |
+
// Create the modal container
|
| 1054 |
+
this.container = $('<div></div>');
|
| 1055 |
+
|
| 1056 |
+
// Create the modal container
|
| 1057 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
| 1058 |
+
|
| 1059 |
+
// Create section to hold title, message and action
|
| 1060 |
+
this.section = $('<section></section>');
|
| 1061 |
+
|
| 1062 |
+
// Create paragraph to hold mesage
|
| 1063 |
+
this.message = $('<p></p>').addClass('ai1wm-dialog-message').html(text);
|
| 1064 |
+
|
| 1065 |
+
// Create action section
|
| 1066 |
+
this.action = $('<div></div>');
|
| 1067 |
+
|
| 1068 |
+
// Create close button
|
| 1069 |
+
this.closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
|
| 1070 |
+
self.modal.hide();
|
| 1071 |
+
self.overlay.hide();
|
| 1072 |
+
});
|
| 1073 |
+
|
| 1074 |
+
// Append close button
|
| 1075 |
+
this.action.append(this.closeButton);
|
| 1076 |
+
|
| 1077 |
+
// Append message to section
|
| 1078 |
+
this.section.append(this.message);
|
| 1079 |
+
|
| 1080 |
+
// Append section and action to container
|
| 1081 |
+
this.container.append(this.section).append(this.action);
|
| 1082 |
+
|
| 1083 |
+
// Render modal
|
| 1084 |
+
this.modal.html(this.container).show();
|
| 1085 |
+
this.overlay.show();
|
| 1086 |
+
|
| 1087 |
+
$('body').append(this.overlay).append(this.modal);
|
| 1088 |
+
};
|
| 1089 |
+
|
| 1090 |
+
module.exports = Dialog;
|
| 1091 |
+
|
| 1092 |
+
/***/ },
|
| 1093 |
+
/* 10 */,
|
| 1094 |
+
/* 11 */,
|
| 1095 |
+
/* 12 */
|
| 1096 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 1097 |
+
|
| 1098 |
+
/* WEBPACK VAR INJECTION */(function(fetch, global) {'use strict';
|
| 1099 |
+
|
| 1100 |
+
/**
|
| 1101 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 1102 |
+
*
|
| 1103 |
+
* This program is free software: you can redistribute it and/or modify
|
| 1104 |
+
* it under the terms of the GNU General Public License as published by
|
| 1105 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 1106 |
+
* (at your option) any later version.
|
| 1107 |
+
*
|
| 1108 |
+
* This program is distributed in the hope that it will be useful,
|
| 1109 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 1110 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 1111 |
+
* GNU General Public License for more details.
|
| 1112 |
+
*
|
| 1113 |
+
* You should have received a copy of the GNU General Public License
|
| 1114 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 1115 |
+
*
|
| 1116 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 1117 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 1118 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 1119 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 1120 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 1121 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 1122 |
+
*/
|
| 1123 |
+
|
| 1124 |
+
var Util = __webpack_require__(3),
|
| 1125 |
+
Import = __webpack_require__(4),
|
| 1126 |
+
$ = jQuery;
|
| 1127 |
+
|
| 1128 |
+
var FileUploader = function FileUploader() {};
|
| 1129 |
+
|
| 1130 |
+
FileUploader.prototype.setDefaultValues = function () {
|
| 1131 |
+
this.model = new Import();
|
| 1132 |
+
this.stopUpload = false;
|
| 1133 |
+
this.retries = 0;
|
| 1134 |
+
};
|
| 1135 |
+
|
| 1136 |
+
FileUploader.prototype.init = function () {
|
| 1137 |
+
var _this = this;
|
| 1138 |
+
|
| 1139 |
+
var selectElement = $('#ai1wm-import-file');
|
| 1140 |
+
var dropElement = $('#ai1wm-drag-drop-area');
|
| 1141 |
+
|
| 1142 |
+
selectElement.on('change', function (event) {
|
| 1143 |
+
event.preventDefault();
|
| 1144 |
+
_this.setDefaultValues();
|
| 1145 |
+
var file = event.target.files.item(0);
|
| 1146 |
+
_this.setDefaultValues();
|
| 1147 |
+
_this.fileSize = file.size;
|
| 1148 |
+
try {
|
| 1149 |
+
_this.onFilesAdded(file);
|
| 1150 |
+
_this.onBeforeUpload(file);
|
| 1151 |
+
_this.upload(file);
|
| 1152 |
+
} catch (exception) {
|
| 1153 |
+
_this.onError(exception);
|
| 1154 |
+
}
|
| 1155 |
+
});
|
| 1156 |
+
|
| 1157 |
+
dropElement.on('dragenter', function (event) {
|
| 1158 |
+
event.preventDefault();
|
| 1159 |
+
dropElement.addClass('ai1wm-drag-over');
|
| 1160 |
+
});
|
| 1161 |
+
dropElement.on('dragover', function (event) {
|
| 1162 |
+
event.preventDefault();
|
| 1163 |
+
dropElement.addClass('ai1wm-drag-over');
|
| 1164 |
+
});
|
| 1165 |
+
dropElement.on('dragleave', function (event) {
|
| 1166 |
+
event.preventDefault();
|
| 1167 |
+
dropElement.removeClass('ai1wm-drag-over');
|
| 1168 |
+
});
|
| 1169 |
+
dropElement.on('drop', function (event) {
|
| 1170 |
+
event.preventDefault();
|
| 1171 |
+
_this.setDefaultValues();
|
| 1172 |
+
dropElement.removeClass('ai1wm-drag-over');
|
| 1173 |
+
var file = event.originalEvent.dataTransfer.files.item(0);
|
| 1174 |
+
_this.fileSize = file.size;
|
| 1175 |
+
try {
|
| 1176 |
+
_this.onFilesAdded(file);
|
| 1177 |
+
_this.onBeforeUpload(file);
|
| 1178 |
+
_this.upload(file);
|
| 1179 |
+
} catch (exception) {
|
| 1180 |
+
_this.onError(exception);
|
| 1181 |
+
}
|
| 1182 |
+
});
|
| 1183 |
+
};
|
| 1184 |
+
|
| 1185 |
+
FileUploader.prototype.upload = function (file) {
|
| 1186 |
+
var _this2 = this;
|
| 1187 |
+
|
| 1188 |
+
var chunkSize = file.size > ai1wm_uploader.chunk_size ? ai1wm_uploader.chunk_size : file.size;
|
| 1189 |
+
var formData = this.getFormData(file, chunkSize);
|
| 1190 |
+
fetch(ai1wm_uploader.url, {
|
| 1191 |
+
method: 'POST',
|
| 1192 |
+
body: formData
|
| 1193 |
+
}).then(function (response) {
|
| 1194 |
+
if (_this2.stopUpload) {
|
| 1195 |
+
return;
|
| 1196 |
+
}
|
| 1197 |
+
|
| 1198 |
+
switch (response.status) {
|
| 1199 |
+
case 413:
|
| 1200 |
+
ai1wm_uploader.chunk_size = chunkSize / 2;
|
| 1201 |
+
return _this2.upload(file);
|
| 1202 |
+
case 200:
|
| 1203 |
+
_this2.retries = 0;
|
| 1204 |
+
file = file.slice(chunkSize, file.size, 'application/octet-binary');
|
| 1205 |
+
var uploadedBytes = _this2.fileSize - file.size;
|
| 1206 |
+
var progress = uploadedBytes / _this2.fileSize * 100;
|
| 1207 |
+
_this2.onUploadProgress(progress.toFixed(2));
|
| 1208 |
+
return progress === 100 ? _this2.onFileUploaded() : _this2.upload(file);
|
| 1209 |
+
default:
|
| 1210 |
+
throw new Error(response.status);
|
| 1211 |
+
}
|
| 1212 |
+
}).catch(function (error) {
|
| 1213 |
+
var timeout = _this2.retries * 1000;
|
| 1214 |
+
if (_this2.retries > 30) {
|
| 1215 |
+
return _this2.onError(new Error('We are sorry, there seems to be a problem while uploading your file. Follow <a href="https://www.youtube.com/watch?v=mRp7qTFYKgs" target="_blank">this guide</a> to resolve it.'));
|
| 1216 |
+
}
|
| 1217 |
+
_this2.retries++;
|
| 1218 |
+
setTimeout(_this2.upload.bind(_this2, file), timeout);
|
| 1219 |
+
});
|
| 1220 |
+
};
|
| 1221 |
+
|
| 1222 |
+
FileUploader.prototype.getFormData = function (file, chunkSize) {
|
| 1223 |
+
var params = ai1wm_uploader.params;
|
| 1224 |
+
var formData = new FormData();
|
| 1225 |
+
formData.append('upload-file', file.slice(0, chunkSize, 'application/octet-binary'));
|
| 1226 |
+
|
| 1227 |
+
for (var name in params) {
|
| 1228 |
+
formData.append(name, params[name]);
|
| 1229 |
+
}
|
| 1230 |
+
|
| 1231 |
+
return formData;
|
| 1232 |
+
};
|
| 1233 |
+
|
| 1234 |
+
FileUploader.prototype.checkSize = function (file) {
|
| 1235 |
+
var size = parseInt(ai1wm_uploader.filters.ai1wm_archive_size, 10);
|
| 1236 |
+
|
| 1237 |
+
if (file.size > size && size !== 0) {
|
| 1238 |
+
throw new Error(ai1wm_import.oversize);
|
| 1239 |
+
}
|
| 1240 |
+
};
|
| 1241 |
+
|
| 1242 |
+
FileUploader.prototype.checkExtension = function (file) {
|
| 1243 |
+
var extensions = ai1wm_uploader.filters.ai1wm_archive_extension;
|
| 1244 |
+
|
| 1245 |
+
var matchExtension = extensions.some(function (extension) {
|
| 1246 |
+
return file.name.substr(-extension.length) === extension;
|
| 1247 |
+
});
|
| 1248 |
+
|
| 1249 |
+
if (!matchExtension) {
|
| 1250 |
+
throw new Error(ai1wm_import.invalid_extension);
|
| 1251 |
+
}
|
| 1252 |
+
};
|
| 1253 |
+
|
| 1254 |
+
FileUploader.prototype.onFilesAdded = function (file) {
|
| 1255 |
+
this.checkExtension(file);
|
| 1256 |
+
this.checkSize(file);
|
| 1257 |
+
|
| 1258 |
+
// Initializing beforeunload event
|
| 1259 |
+
$(window).bind('beforeunload', function () {
|
| 1260 |
+
return 'You are about to stop importing your website, are you sure?';
|
| 1261 |
+
});
|
| 1262 |
+
};
|
| 1263 |
+
|
| 1264 |
+
FileUploader.prototype.onBeforeUpload = function (file) {
|
| 1265 |
+
var self = this;
|
| 1266 |
+
|
| 1267 |
+
// Set storage and archive
|
| 1268 |
+
this.storage = Util.random(12);
|
| 1269 |
+
this.archive = file.name;
|
| 1270 |
+
|
| 1271 |
+
// Set multipart params
|
| 1272 |
+
$.extend(ai1wm_uploader.params, {
|
| 1273 |
+
storage: this.storage,
|
| 1274 |
+
archive: this.archive
|
| 1275 |
+
});
|
| 1276 |
+
|
| 1277 |
+
// Set global params
|
| 1278 |
+
self.model.setParams([{ name: 'storage', value: this.storage }, { name: 'archive', value: this.archive }]);
|
| 1279 |
+
|
| 1280 |
+
// Set stop
|
| 1281 |
+
this.model.onStop = function () {
|
| 1282 |
+
self.stopUpload = true;
|
| 1283 |
+
// Clean storage
|
| 1284 |
+
self.model.clean();
|
| 1285 |
+
};
|
| 1286 |
+
|
| 1287 |
+
// Set status
|
| 1288 |
+
this.model.setStatus({ type: 'progress', percent: '0.00' });
|
| 1289 |
+
};
|
| 1290 |
+
|
| 1291 |
+
FileUploader.prototype.onUploadProgress = function (percent) {
|
| 1292 |
+
this.model.setStatus({ type: 'progress', percent: percent });
|
| 1293 |
+
};
|
| 1294 |
+
|
| 1295 |
+
FileUploader.prototype.onFileUploaded = function () {
|
| 1296 |
+
this.model.start();
|
| 1297 |
+
};
|
| 1298 |
+
|
| 1299 |
+
FileUploader.prototype.onError = function (error) {
|
| 1300 |
+
this.model.setStatus({ type: 'error', message: error.message });
|
| 1301 |
+
};
|
| 1302 |
+
|
| 1303 |
+
module.exports = FileUploader;
|
| 1304 |
+
|
| 1305 |
+
global.Ai1wm = { Util: Util, Import: Import };
|
| 1306 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(13), (function() { return this; }())))
|
| 1307 |
+
|
| 1308 |
+
/***/ },
|
| 1309 |
+
/* 13 */
|
| 1310 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 1311 |
+
|
| 1312 |
+
/* WEBPACK VAR INJECTION */(function(Promise, global) {/*** IMPORTS FROM imports-loader ***/
|
| 1313 |
+
(function() {
|
| 1314 |
+
|
| 1315 |
+
(function(self) {
|
| 1316 |
+
'use strict';
|
| 1317 |
+
|
| 1318 |
+
if (self.fetch) {
|
| 1319 |
+
return
|
| 1320 |
+
}
|
| 1321 |
+
|
| 1322 |
+
var support = {
|
| 1323 |
+
searchParams: 'URLSearchParams' in self,
|
| 1324 |
+
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
| 1325 |
+
blob: 'FileReader' in self && 'Blob' in self && (function() {
|
| 1326 |
+
try {
|
| 1327 |
+
new Blob()
|
| 1328 |
+
return true
|
| 1329 |
+
} catch(e) {
|
| 1330 |
+
return false
|
| 1331 |
+
}
|
| 1332 |
+
})(),
|
| 1333 |
+
formData: 'FormData' in self,
|
| 1334 |
+
arrayBuffer: 'ArrayBuffer' in self
|
| 1335 |
+
}
|
| 1336 |
+
|
| 1337 |
+
function normalizeName(name) {
|
| 1338 |
+
if (typeof name !== 'string') {
|
| 1339 |
+
name = String(name)
|
| 1340 |
+
}
|
| 1341 |
+
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
| 1342 |
+
throw new TypeError('Invalid character in header field name')
|
| 1343 |
+
}
|
| 1344 |
+
return name.toLowerCase()
|
| 1345 |
+
}
|
| 1346 |
+
|
| 1347 |
+
function normalizeValue(value) {
|
| 1348 |
+
if (typeof value !== 'string') {
|
| 1349 |
+
value = String(value)
|
| 1350 |
+
}
|
| 1351 |
+
return value
|
| 1352 |
+
}
|
| 1353 |
+
|
| 1354 |
+
// Build a destructive iterator for the value list
|
| 1355 |
+
function iteratorFor(items) {
|
| 1356 |
+
var iterator = {
|
| 1357 |
+
next: function() {
|
| 1358 |
+
var value = items.shift()
|
| 1359 |
+
return {done: value === undefined, value: value}
|
| 1360 |
+
}
|
| 1361 |
+
}
|
| 1362 |
+
|
| 1363 |
+
if (support.iterable) {
|
| 1364 |
+
iterator[Symbol.iterator] = function() {
|
| 1365 |
+
return iterator
|
| 1366 |
+
}
|
| 1367 |
+
}
|
| 1368 |
+
|
| 1369 |
+
return iterator
|
| 1370 |
+
}
|
| 1371 |
+
|
| 1372 |
+
function Headers(headers) {
|
| 1373 |
+
this.map = {}
|
| 1374 |
+
|
| 1375 |
+
if (headers instanceof Headers) {
|
| 1376 |
+
headers.forEach(function(value, name) {
|
| 1377 |
+
this.append(name, value)
|
| 1378 |
+
}, this)
|
| 1379 |
+
|
| 1380 |
+
} else if (headers) {
|
| 1381 |
+
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
| 1382 |
+
this.append(name, headers[name])
|
| 1383 |
+
}, this)
|
| 1384 |
+
}
|
| 1385 |
+
}
|
| 1386 |
+
|
| 1387 |
+
Headers.prototype.append = function(name, value) {
|
| 1388 |
+
name = normalizeName(name)
|
| 1389 |
+
value = normalizeValue(value)
|
| 1390 |
+
var list = this.map[name]
|
| 1391 |
+
if (!list) {
|
| 1392 |
+
list = []
|
| 1393 |
+
this.map[name] = list
|
| 1394 |
+
}
|
| 1395 |
+
list.push(value)
|
| 1396 |
+
}
|
| 1397 |
+
|
| 1398 |
+
Headers.prototype['delete'] = function(name) {
|
| 1399 |
+
delete this.map[normalizeName(name)]
|
| 1400 |
+
}
|
| 1401 |
+
|
| 1402 |
+
Headers.prototype.get = function(name) {
|
| 1403 |
+
var values = this.map[normalizeName(name)]
|
| 1404 |
+
return values ? values[0] : null
|
| 1405 |
+
}
|
| 1406 |
+
|
| 1407 |
+
Headers.prototype.getAll = function(name) {
|
| 1408 |
+
return this.map[normalizeName(name)] || []
|
| 1409 |
+
}
|
| 1410 |
+
|
| 1411 |
+
Headers.prototype.has = function(name) {
|
| 1412 |
+
return this.map.hasOwnProperty(normalizeName(name))
|
| 1413 |
+
}
|
| 1414 |
+
|
| 1415 |
+
Headers.prototype.set = function(name, value) {
|
| 1416 |
+
this.map[normalizeName(name)] = [normalizeValue(value)]
|
| 1417 |
+
}
|
| 1418 |
+
|
| 1419 |
+
Headers.prototype.forEach = function(callback, thisArg) {
|
| 1420 |
+
Object.getOwnPropertyNames(this.map).forEach(function(name) {
|
| 1421 |
+
this.map[name].forEach(function(value) {
|
| 1422 |
+
callback.call(thisArg, value, name, this)
|
| 1423 |
+
}, this)
|
| 1424 |
+
}, this)
|
| 1425 |
+
}
|
| 1426 |
+
|
| 1427 |
+
Headers.prototype.keys = function() {
|
| 1428 |
+
var items = []
|
| 1429 |
+
this.forEach(function(value, name) { items.push(name) })
|
| 1430 |
+
return iteratorFor(items)
|
| 1431 |
+
}
|
| 1432 |
+
|
| 1433 |
+
Headers.prototype.values = function() {
|
| 1434 |
+
var items = []
|
| 1435 |
+
this.forEach(function(value) { items.push(value) })
|
| 1436 |
+
return iteratorFor(items)
|
| 1437 |
+
}
|
| 1438 |
+
|
| 1439 |
+
Headers.prototype.entries = function() {
|
| 1440 |
+
var items = []
|
| 1441 |
+
this.forEach(function(value, name) { items.push([name, value]) })
|
| 1442 |
+
return iteratorFor(items)
|
| 1443 |
+
}
|
| 1444 |
+
|
| 1445 |
+
if (support.iterable) {
|
| 1446 |
+
Headers.prototype[Symbol.iterator] = Headers.prototype.entries
|
| 1447 |
+
}
|
| 1448 |
+
|
| 1449 |
+
function consumed(body) {
|
| 1450 |
+
if (body.bodyUsed) {
|
| 1451 |
+
return Promise.reject(new TypeError('Already read'))
|
| 1452 |
+
}
|
| 1453 |
+
body.bodyUsed = true
|
| 1454 |
+
}
|
| 1455 |
+
|
| 1456 |
+
function fileReaderReady(reader) {
|
| 1457 |
+
return new Promise(function(resolve, reject) {
|
| 1458 |
+
reader.onload = function() {
|
| 1459 |
+
resolve(reader.result)
|
| 1460 |
+
}
|
| 1461 |
+
reader.onerror = function() {
|
| 1462 |
+
reject(reader.error)
|
| 1463 |
+
}
|
| 1464 |
+
})
|
| 1465 |
+
}
|
| 1466 |
+
|
| 1467 |
+
function readBlobAsArrayBuffer(blob) {
|
| 1468 |
+
var reader = new FileReader()
|
| 1469 |
+
reader.readAsArrayBuffer(blob)
|
| 1470 |
+
return fileReaderReady(reader)
|
| 1471 |
+
}
|
| 1472 |
+
|
| 1473 |
+
function readBlobAsText(blob) {
|
| 1474 |
+
var reader = new FileReader()
|
| 1475 |
+
reader.readAsText(blob)
|
| 1476 |
+
return fileReaderReady(reader)
|
| 1477 |
+
}
|
| 1478 |
+
|
| 1479 |
+
function Body() {
|
| 1480 |
+
this.bodyUsed = false
|
| 1481 |
+
|
| 1482 |
+
this._initBody = function(body) {
|
| 1483 |
+
this._bodyInit = body
|
| 1484 |
+
if (typeof body === 'string') {
|
| 1485 |
+
this._bodyText = body
|
| 1486 |
+
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
| 1487 |
+
this._bodyBlob = body
|
| 1488 |
+
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
| 1489 |
+
this._bodyFormData = body
|
| 1490 |
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
| 1491 |
+
this._bodyText = body.toString()
|
| 1492 |
+
} else if (!body) {
|
| 1493 |
+
this._bodyText = ''
|
| 1494 |
+
} else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
|
| 1495 |
+
// Only support ArrayBuffers for POST method.
|
| 1496 |
+
// Receiving ArrayBuffers happens via Blobs, instead.
|
| 1497 |
+
} else {
|
| 1498 |
+
throw new Error('unsupported BodyInit type')
|
| 1499 |
+
}
|
| 1500 |
+
|
| 1501 |
+
if (!this.headers.get('content-type')) {
|
| 1502 |
+
if (typeof body === 'string') {
|
| 1503 |
+
this.headers.set('content-type', 'text/plain;charset=UTF-8')
|
| 1504 |
+
} else if (this._bodyBlob && this._bodyBlob.type) {
|
| 1505 |
+
this.headers.set('content-type', this._bodyBlob.type)
|
| 1506 |
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
| 1507 |
+
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
|
| 1508 |
+
}
|
| 1509 |
+
}
|
| 1510 |
+
}
|
| 1511 |
+
|
| 1512 |
+
if (support.blob) {
|
| 1513 |
+
this.blob = function() {
|
| 1514 |
+
var rejected = consumed(this)
|
| 1515 |
+
if (rejected) {
|
| 1516 |
+
return rejected
|
| 1517 |
+
}
|
| 1518 |
+
|
| 1519 |
+
if (this._bodyBlob) {
|
| 1520 |
+
return Promise.resolve(this._bodyBlob)
|
| 1521 |
+
} else if (this._bodyFormData) {
|
| 1522 |
+
throw new Error('could not read FormData body as blob')
|
| 1523 |
+
} else {
|
| 1524 |
+
return Promise.resolve(new Blob([this._bodyText]))
|
| 1525 |
+
}
|
| 1526 |
+
}
|
| 1527 |
+
|
| 1528 |
+
this.arrayBuffer = function() {
|
| 1529 |
+
return this.blob().then(readBlobAsArrayBuffer)
|
| 1530 |
+
}
|
| 1531 |
+
|
| 1532 |
+
this.text = function() {
|
| 1533 |
+
var rejected = consumed(this)
|
| 1534 |
+
if (rejected) {
|
| 1535 |
+
return rejected
|
| 1536 |
+
}
|
| 1537 |
+
|
| 1538 |
+
if (this._bodyBlob) {
|
| 1539 |
+
return readBlobAsText(this._bodyBlob)
|
| 1540 |
+
} else if (this._bodyFormData) {
|
| 1541 |
+
throw new Error('could not read FormData body as text')
|
| 1542 |
+
} else {
|
| 1543 |
+
return Promise.resolve(this._bodyText)
|
| 1544 |
+
}
|
| 1545 |
+
}
|
| 1546 |
+
} else {
|
| 1547 |
+
this.text = function() {
|
| 1548 |
+
var rejected = consumed(this)
|
| 1549 |
+
return rejected ? rejected : Promise.resolve(this._bodyText)
|
| 1550 |
+
}
|
| 1551 |
+
}
|
| 1552 |
+
|
| 1553 |
+
if (support.formData) {
|
| 1554 |
+
this.formData = function() {
|
| 1555 |
+
return this.text().then(decode)
|
| 1556 |
+
}
|
| 1557 |
+
}
|
| 1558 |
+
|
| 1559 |
+
this.json = function() {
|
| 1560 |
+
return this.text().then(JSON.parse)
|
| 1561 |
+
}
|
| 1562 |
+
|
| 1563 |
+
return this
|
| 1564 |
+
}
|
| 1565 |
+
|
| 1566 |
+
// HTTP methods whose capitalization should be normalized
|
| 1567 |
+
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
|
| 1568 |
+
|
| 1569 |
+
function normalizeMethod(method) {
|
| 1570 |
+
var upcased = method.toUpperCase()
|
| 1571 |
+
return (methods.indexOf(upcased) > -1) ? upcased : method
|
| 1572 |
+
}
|
| 1573 |
+
|
| 1574 |
+
function Request(input, options) {
|
| 1575 |
+
options = options || {}
|
| 1576 |
+
var body = options.body
|
| 1577 |
+
if (Request.prototype.isPrototypeOf(input)) {
|
| 1578 |
+
if (input.bodyUsed) {
|
| 1579 |
+
throw new TypeError('Already read')
|
| 1580 |
+
}
|
| 1581 |
+
this.url = input.url
|
| 1582 |
+
this.credentials = input.credentials
|
| 1583 |
+
if (!options.headers) {
|
| 1584 |
+
this.headers = new Headers(input.headers)
|
| 1585 |
+
}
|
| 1586 |
+
this.method = input.method
|
| 1587 |
+
this.mode = input.mode
|
| 1588 |
+
if (!body) {
|
| 1589 |
+
body = input._bodyInit
|
| 1590 |
+
input.bodyUsed = true
|
| 1591 |
+
}
|
| 1592 |
+
} else {
|
| 1593 |
+
this.url = input
|
| 1594 |
+
}
|
| 1595 |
+
|
| 1596 |
+
this.credentials = options.credentials || this.credentials || 'omit'
|
| 1597 |
+
if (options.headers || !this.headers) {
|
| 1598 |
+
this.headers = new Headers(options.headers)
|
| 1599 |
+
}
|
| 1600 |
+
this.method = normalizeMethod(options.method || this.method || 'GET')
|
| 1601 |
+
this.mode = options.mode || this.mode || null
|
| 1602 |
+
this.referrer = null
|
| 1603 |
+
|
| 1604 |
+
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
| 1605 |
+
throw new TypeError('Body not allowed for GET or HEAD requests')
|
| 1606 |
+
}
|
| 1607 |
+
this._initBody(body)
|
| 1608 |
+
}
|
| 1609 |
+
|
| 1610 |
+
Request.prototype.clone = function() {
|
| 1611 |
+
return new Request(this)
|
| 1612 |
+
}
|
| 1613 |
+
|
| 1614 |
+
function decode(body) {
|
| 1615 |
+
var form = new FormData()
|
| 1616 |
+
body.trim().split('&').forEach(function(bytes) {
|
| 1617 |
+
if (bytes) {
|
| 1618 |
+
var split = bytes.split('=')
|
| 1619 |
+
var name = split.shift().replace(/\+/g, ' ')
|
| 1620 |
+
var value = split.join('=').replace(/\+/g, ' ')
|
| 1621 |
+
form.append(decodeURIComponent(name), decodeURIComponent(value))
|
| 1622 |
+
}
|
| 1623 |
+
})
|
| 1624 |
+
return form
|
| 1625 |
+
}
|
| 1626 |
+
|
| 1627 |
+
function headers(xhr) {
|
| 1628 |
+
var head = new Headers()
|
| 1629 |
+
var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
|
| 1630 |
+
pairs.forEach(function(header) {
|
| 1631 |
+
var split = header.trim().split(':')
|
| 1632 |
+
var key = split.shift().trim()
|
| 1633 |
+
var value = split.join(':').trim()
|
| 1634 |
+
head.append(key, value)
|
| 1635 |
+
})
|
| 1636 |
+
return head
|
| 1637 |
+
}
|
| 1638 |
+
|
| 1639 |
+
Body.call(Request.prototype)
|
| 1640 |
+
|
| 1641 |
+
function Response(bodyInit, options) {
|
| 1642 |
+
if (!options) {
|
| 1643 |
+
options = {}
|
| 1644 |
+
}
|
| 1645 |
+
|
| 1646 |
+
this.type = 'default'
|
| 1647 |
+
this.status = options.status
|
| 1648 |
+
this.ok = this.status >= 200 && this.status < 300
|
| 1649 |
+
this.statusText = options.statusText
|
| 1650 |
+
this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
|
| 1651 |
+
this.url = options.url || ''
|
| 1652 |
+
this._initBody(bodyInit)
|
| 1653 |
+
}
|
| 1654 |
+
|
| 1655 |
+
Body.call(Response.prototype)
|
| 1656 |
+
|
| 1657 |
+
Response.prototype.clone = function() {
|
| 1658 |
+
return new Response(this._bodyInit, {
|
| 1659 |
+
status: this.status,
|
| 1660 |
+
statusText: this.statusText,
|
| 1661 |
+
headers: new Headers(this.headers),
|
| 1662 |
+
url: this.url
|
| 1663 |
+
})
|
| 1664 |
+
}
|
| 1665 |
+
|
| 1666 |
+
Response.error = function() {
|
| 1667 |
+
var response = new Response(null, {status: 0, statusText: ''})
|
| 1668 |
+
response.type = 'error'
|
| 1669 |
+
return response
|
| 1670 |
+
}
|
| 1671 |
+
|
| 1672 |
+
var redirectStatuses = [301, 302, 303, 307, 308]
|
| 1673 |
+
|
| 1674 |
+
Response.redirect = function(url, status) {
|
| 1675 |
+
if (redirectStatuses.indexOf(status) === -1) {
|
| 1676 |
+
throw new RangeError('Invalid status code')
|
| 1677 |
+
}
|
| 1678 |
+
|
| 1679 |
+
return new Response(null, {status: status, headers: {location: url}})
|
| 1680 |
+
}
|
| 1681 |
+
|
| 1682 |
+
self.Headers = Headers
|
| 1683 |
+
self.Request = Request
|
| 1684 |
+
self.Response = Response
|
| 1685 |
+
|
| 1686 |
+
self.fetch = function(input, init) {
|
| 1687 |
+
return new Promise(function(resolve, reject) {
|
| 1688 |
+
var request
|
| 1689 |
+
if (Request.prototype.isPrototypeOf(input) && !init) {
|
| 1690 |
+
request = input
|
| 1691 |
+
} else {
|
| 1692 |
+
request = new Request(input, init)
|
| 1693 |
+
}
|
| 1694 |
+
|
| 1695 |
+
var xhr = new XMLHttpRequest()
|
| 1696 |
+
|
| 1697 |
+
function responseURL() {
|
| 1698 |
+
if ('responseURL' in xhr) {
|
| 1699 |
+
return xhr.responseURL
|
| 1700 |
+
}
|
| 1701 |
+
|
| 1702 |
+
// Avoid security warnings on getResponseHeader when not allowed by CORS
|
| 1703 |
+
if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
|
| 1704 |
+
return xhr.getResponseHeader('X-Request-URL')
|
| 1705 |
+
}
|
| 1706 |
+
|
| 1707 |
+
return
|
| 1708 |
+
}
|
| 1709 |
+
|
| 1710 |
+
xhr.onload = function() {
|
| 1711 |
+
var options = {
|
| 1712 |
+
status: xhr.status,
|
| 1713 |
+
statusText: xhr.statusText,
|
| 1714 |
+
headers: headers(xhr),
|
| 1715 |
+
url: responseURL()
|
| 1716 |
+
}
|
| 1717 |
+
var body = 'response' in xhr ? xhr.response : xhr.responseText
|
| 1718 |
+
resolve(new Response(body, options))
|
| 1719 |
+
}
|
| 1720 |
+
|
| 1721 |
+
xhr.onerror = function() {
|
| 1722 |
+
reject(new TypeError('Network request failed'))
|
| 1723 |
+
}
|
| 1724 |
+
|
| 1725 |
+
xhr.ontimeout = function() {
|
| 1726 |
+
reject(new TypeError('Network request failed'))
|
| 1727 |
+
}
|
| 1728 |
+
|
| 1729 |
+
xhr.open(request.method, request.url, true)
|
| 1730 |
+
|
| 1731 |
+
if (request.credentials === 'include') {
|
| 1732 |
+
xhr.withCredentials = true
|
| 1733 |
+
}
|
| 1734 |
+
|
| 1735 |
+
if ('responseType' in xhr && support.blob) {
|
| 1736 |
+
xhr.responseType = 'blob'
|
| 1737 |
+
}
|
| 1738 |
+
|
| 1739 |
+
request.headers.forEach(function(value, name) {
|
| 1740 |
+
xhr.setRequestHeader(name, value)
|
| 1741 |
+
})
|
| 1742 |
+
|
| 1743 |
+
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
|
| 1744 |
+
})
|
| 1745 |
+
}
|
| 1746 |
+
self.fetch.polyfill = true
|
| 1747 |
+
})(typeof self !== 'undefined' ? self : this);
|
| 1748 |
+
|
| 1749 |
+
|
| 1750 |
+
/*** EXPORTS FROM exports-loader ***/
|
| 1751 |
+
module.exports = global.fetch;
|
| 1752 |
+
}.call(global));
|
| 1753 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(14), (function() { return this; }())))
|
| 1754 |
+
|
| 1755 |
+
/***/ },
|
| 1756 |
+
/* 14 */
|
| 1757 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 1758 |
+
|
| 1759 |
+
var require;var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(process, global, module) {/*** IMPORTS FROM imports-loader ***/
|
| 1760 |
+
(function() {
|
| 1761 |
+
|
| 1762 |
+
/*!
|
| 1763 |
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
| 1764 |
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
| 1765 |
+
* @license Licensed under MIT license
|
| 1766 |
+
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
|
| 1767 |
+
* @version 3.2.1
|
| 1768 |
+
*/
|
| 1769 |
+
|
| 1770 |
+
(function() {
|
| 1771 |
+
"use strict";
|
| 1772 |
+
function lib$es6$promise$utils$$objectOrFunction(x) {
|
| 1773 |
+
return typeof x === 'function' || (typeof x === 'object' && x !== null);
|
| 1774 |
+
}
|
| 1775 |
+
|
| 1776 |
+
function lib$es6$promise$utils$$isFunction(x) {
|
| 1777 |
+
return typeof x === 'function';
|
| 1778 |
+
}
|
| 1779 |
+
|
| 1780 |
+
function lib$es6$promise$utils$$isMaybeThenable(x) {
|
| 1781 |
+
return typeof x === 'object' && x !== null;
|
| 1782 |
+
}
|
| 1783 |
+
|
| 1784 |
+
var lib$es6$promise$utils$$_isArray;
|
| 1785 |
+
if (!Array.isArray) {
|
| 1786 |
+
lib$es6$promise$utils$$_isArray = function (x) {
|
| 1787 |
+
return Object.prototype.toString.call(x) === '[object Array]';
|
| 1788 |
+
};
|
| 1789 |
+
} else {
|
| 1790 |
+
lib$es6$promise$utils$$_isArray = Array.isArray;
|
| 1791 |
+
}
|
| 1792 |
+
|
| 1793 |
+
var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray;
|
| 1794 |
+
var lib$es6$promise$asap$$len = 0;
|
| 1795 |
+
var lib$es6$promise$asap$$vertxNext;
|
| 1796 |
+
var lib$es6$promise$asap$$customSchedulerFn;
|
| 1797 |
+
|
| 1798 |
+
var lib$es6$promise$asap$$asap = function asap(callback, arg) {
|
| 1799 |
+
lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback;
|
| 1800 |
+
lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg;
|
| 1801 |
+
lib$es6$promise$asap$$len += 2;
|
| 1802 |
+
if (lib$es6$promise$asap$$len === 2) {
|
| 1803 |
+
// If len is 2, that means that we need to schedule an async flush.
|
| 1804 |
+
// If additional callbacks are queued before the queue is flushed, they
|
| 1805 |
+
// will be processed by this flush that we are scheduling.
|
| 1806 |
+
if (lib$es6$promise$asap$$customSchedulerFn) {
|
| 1807 |
+
lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush);
|
| 1808 |
+
} else {
|
| 1809 |
+
lib$es6$promise$asap$$scheduleFlush();
|
| 1810 |
+
}
|
| 1811 |
+
}
|
| 1812 |
+
}
|
| 1813 |
+
|
| 1814 |
+
function lib$es6$promise$asap$$setScheduler(scheduleFn) {
|
| 1815 |
+
lib$es6$promise$asap$$customSchedulerFn = scheduleFn;
|
| 1816 |
+
}
|
| 1817 |
+
|
| 1818 |
+
function lib$es6$promise$asap$$setAsap(asapFn) {
|
| 1819 |
+
lib$es6$promise$asap$$asap = asapFn;
|
| 1820 |
+
}
|
| 1821 |
+
|
| 1822 |
+
var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined;
|
| 1823 |
+
var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {};
|
| 1824 |
+
var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver;
|
| 1825 |
+
var lib$es6$promise$asap$$isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
|
| 1826 |
+
|
| 1827 |
+
// test for web worker but not in IE10
|
| 1828 |
+
var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
|
| 1829 |
+
typeof importScripts !== 'undefined' &&
|
| 1830 |
+
typeof MessageChannel !== 'undefined';
|
| 1831 |
+
|
| 1832 |
+
// node
|
| 1833 |
+
function lib$es6$promise$asap$$useNextTick() {
|
| 1834 |
+
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
|
| 1835 |
+
// see https://github.com/cujojs/when/issues/410 for details
|
| 1836 |
+
return function() {
|
| 1837 |
+
process.nextTick(lib$es6$promise$asap$$flush);
|
| 1838 |
+
};
|
| 1839 |
+
}
|
| 1840 |
+
|
| 1841 |
+
// vertx
|
| 1842 |
+
function lib$es6$promise$asap$$useVertxTimer() {
|
| 1843 |
+
return function() {
|
| 1844 |
+
lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush);
|
| 1845 |
+
};
|
| 1846 |
+
}
|
| 1847 |
+
|
| 1848 |
+
function lib$es6$promise$asap$$useMutationObserver() {
|
| 1849 |
+
var iterations = 0;
|
| 1850 |
+
var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush);
|
| 1851 |
+
var node = document.createTextNode('');
|
| 1852 |
+
observer.observe(node, { characterData: true });
|
| 1853 |
+
|
| 1854 |
+
return function() {
|
| 1855 |
+
node.data = (iterations = ++iterations % 2);
|
| 1856 |
+
};
|
| 1857 |
+
}
|
| 1858 |
+
|
| 1859 |
+
// web worker
|
| 1860 |
+
function lib$es6$promise$asap$$useMessageChannel() {
|
| 1861 |
+
var channel = new MessageChannel();
|
| 1862 |
+
channel.port1.onmessage = lib$es6$promise$asap$$flush;
|
| 1863 |
+
return function () {
|
| 1864 |
+
channel.port2.postMessage(0);
|
| 1865 |
+
};
|
| 1866 |
+
}
|
| 1867 |
+
|
| 1868 |
+
function lib$es6$promise$asap$$useSetTimeout() {
|
| 1869 |
+
return function() {
|
| 1870 |
+
setTimeout(lib$es6$promise$asap$$flush, 1);
|
| 1871 |
+
};
|
| 1872 |
+
}
|
| 1873 |
+
|
| 1874 |
+
var lib$es6$promise$asap$$queue = new Array(1000);
|
| 1875 |
+
function lib$es6$promise$asap$$flush() {
|
| 1876 |
+
for (var i = 0; i < lib$es6$promise$asap$$len; i+=2) {
|
| 1877 |
+
var callback = lib$es6$promise$asap$$queue[i];
|
| 1878 |
+
var arg = lib$es6$promise$asap$$queue[i+1];
|
| 1879 |
+
|
| 1880 |
+
callback(arg);
|
| 1881 |
+
|
| 1882 |
+
lib$es6$promise$asap$$queue[i] = undefined;
|
| 1883 |
+
lib$es6$promise$asap$$queue[i+1] = undefined;
|
| 1884 |
+
}
|
| 1885 |
+
|
| 1886 |
+
lib$es6$promise$asap$$len = 0;
|
| 1887 |
+
}
|
| 1888 |
+
|
| 1889 |
+
function lib$es6$promise$asap$$attemptVertx() {
|
| 1890 |
+
try {
|
| 1891 |
+
var r = require;
|
| 1892 |
+
var vertx = __webpack_require__(17);
|
| 1893 |
+
lib$es6$promise$asap$$vertxNext = vertx.runOnLoop || vertx.runOnContext;
|
| 1894 |
+
return lib$es6$promise$asap$$useVertxTimer();
|
| 1895 |
+
} catch(e) {
|
| 1896 |
+
return lib$es6$promise$asap$$useSetTimeout();
|
| 1897 |
+
}
|
| 1898 |
+
}
|
| 1899 |
+
|
| 1900 |
+
var lib$es6$promise$asap$$scheduleFlush;
|
| 1901 |
+
// Decide what async method to use to triggering processing of queued callbacks:
|
| 1902 |
+
if (lib$es6$promise$asap$$isNode) {
|
| 1903 |
+
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick();
|
| 1904 |
+
} else if (lib$es6$promise$asap$$BrowserMutationObserver) {
|
| 1905 |
+
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMutationObserver();
|
| 1906 |
+
} else if (lib$es6$promise$asap$$isWorker) {
|
| 1907 |
+
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel();
|
| 1908 |
+
} else if (lib$es6$promise$asap$$browserWindow === undefined && "function" === 'function') {
|
| 1909 |
+
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$attemptVertx();
|
| 1910 |
+
} else {
|
| 1911 |
+
lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout();
|
| 1912 |
+
}
|
| 1913 |
+
function lib$es6$promise$then$$then(onFulfillment, onRejection) {
|
| 1914 |
+
var parent = this;
|
| 1915 |
+
|
| 1916 |
+
var child = new this.constructor(lib$es6$promise$$internal$$noop);
|
| 1917 |
+
|
| 1918 |
+
if (child[lib$es6$promise$$internal$$PROMISE_ID] === undefined) {
|
| 1919 |
+
lib$es6$promise$$internal$$makePromise(child);
|
| 1920 |
+
}
|
| 1921 |
+
|
| 1922 |
+
var state = parent._state;
|
| 1923 |
+
|
| 1924 |
+
if (state) {
|
| 1925 |
+
var callback = arguments[state - 1];
|
| 1926 |
+
lib$es6$promise$asap$$asap(function(){
|
| 1927 |
+
lib$es6$promise$$internal$$invokeCallback(state, child, callback, parent._result);
|
| 1928 |
+
});
|
| 1929 |
+
} else {
|
| 1930 |
+
lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection);
|
| 1931 |
+
}
|
| 1932 |
+
|
| 1933 |
+
return child;
|
| 1934 |
+
}
|
| 1935 |
+
var lib$es6$promise$then$$default = lib$es6$promise$then$$then;
|
| 1936 |
+
function lib$es6$promise$promise$resolve$$resolve(object) {
|
| 1937 |
+
/*jshint validthis:true */
|
| 1938 |
+
var Constructor = this;
|
| 1939 |
+
|
| 1940 |
+
if (object && typeof object === 'object' && object.constructor === Constructor) {
|
| 1941 |
+
return object;
|
| 1942 |
+
}
|
| 1943 |
+
|
| 1944 |
+
var promise = new Constructor(lib$es6$promise$$internal$$noop);
|
| 1945 |
+
lib$es6$promise$$internal$$resolve(promise, object);
|
| 1946 |
+
return promise;
|
| 1947 |
+
}
|
| 1948 |
+
var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve;
|
| 1949 |
+
var lib$es6$promise$$internal$$PROMISE_ID = Math.random().toString(36).substring(16);
|
| 1950 |
+
|
| 1951 |
+
function lib$es6$promise$$internal$$noop() {}
|
| 1952 |
+
|
| 1953 |
+
var lib$es6$promise$$internal$$PENDING = void 0;
|
| 1954 |
+
var lib$es6$promise$$internal$$FULFILLED = 1;
|
| 1955 |
+
var lib$es6$promise$$internal$$REJECTED = 2;
|
| 1956 |
+
|
| 1957 |
+
var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject();
|
| 1958 |
+
|
| 1959 |
+
function lib$es6$promise$$internal$$selfFulfillment() {
|
| 1960 |
+
return new TypeError("You cannot resolve a promise with itself");
|
| 1961 |
+
}
|
| 1962 |
+
|
| 1963 |
+
function lib$es6$promise$$internal$$cannotReturnOwn() {
|
| 1964 |
+
return new TypeError('A promises callback cannot return that same promise.');
|
| 1965 |
+
}
|
| 1966 |
+
|
| 1967 |
+
function lib$es6$promise$$internal$$getThen(promise) {
|
| 1968 |
+
try {
|
| 1969 |
+
return promise.then;
|
| 1970 |
+
} catch(error) {
|
| 1971 |
+
lib$es6$promise$$internal$$GET_THEN_ERROR.error = error;
|
| 1972 |
+
return lib$es6$promise$$internal$$GET_THEN_ERROR;
|
| 1973 |
+
}
|
| 1974 |
+
}
|
| 1975 |
+
|
| 1976 |
+
function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {
|
| 1977 |
+
try {
|
| 1978 |
+
then.call(value, fulfillmentHandler, rejectionHandler);
|
| 1979 |
+
} catch(e) {
|
| 1980 |
+
return e;
|
| 1981 |
+
}
|
| 1982 |
+
}
|
| 1983 |
+
|
| 1984 |
+
function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) {
|
| 1985 |
+
lib$es6$promise$asap$$asap(function(promise) {
|
| 1986 |
+
var sealed = false;
|
| 1987 |
+
var error = lib$es6$promise$$internal$$tryThen(then, thenable, function(value) {
|
| 1988 |
+
if (sealed) { return; }
|
| 1989 |
+
sealed = true;
|
| 1990 |
+
if (thenable !== value) {
|
| 1991 |
+
lib$es6$promise$$internal$$resolve(promise, value);
|
| 1992 |
+
} else {
|
| 1993 |
+
lib$es6$promise$$internal$$fulfill(promise, value);
|
| 1994 |
+
}
|
| 1995 |
+
}, function(reason) {
|
| 1996 |
+
if (sealed) { return; }
|
| 1997 |
+
sealed = true;
|
| 1998 |
+
|
| 1999 |
+
lib$es6$promise$$internal$$reject(promise, reason);
|
| 2000 |
+
}, 'Settle: ' + (promise._label || ' unknown promise'));
|
| 2001 |
+
|
| 2002 |
+
if (!sealed && error) {
|
| 2003 |
+
sealed = true;
|
| 2004 |
+
lib$es6$promise$$internal$$reject(promise, error);
|
| 2005 |
+
}
|
| 2006 |
+
}, promise);
|
| 2007 |
+
}
|
| 2008 |
+
|
| 2009 |
+
function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) {
|
| 2010 |
+
if (thenable._state === lib$es6$promise$$internal$$FULFILLED) {
|
| 2011 |
+
lib$es6$promise$$internal$$fulfill(promise, thenable._result);
|
| 2012 |
+
} else if (thenable._state === lib$es6$promise$$internal$$REJECTED) {
|
| 2013 |
+
lib$es6$promise$$internal$$reject(promise, thenable._result);
|
| 2014 |
+
} else {
|
| 2015 |
+
lib$es6$promise$$internal$$subscribe(thenable, undefined, function(value) {
|
| 2016 |
+
lib$es6$promise$$internal$$resolve(promise, value);
|
| 2017 |
+
}, function(reason) {
|
| 2018 |
+
lib$es6$promise$$internal$$reject(promise, reason);
|
| 2019 |
+
});
|
| 2020 |
+
}
|
| 2021 |
+
}
|
| 2022 |
+
|
| 2023 |
+
function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable, then) {
|
| 2024 |
+
if (maybeThenable.constructor === promise.constructor &&
|
| 2025 |
+
then === lib$es6$promise$then$$default &&
|
| 2026 |
+
constructor.resolve === lib$es6$promise$promise$resolve$$default) {
|
| 2027 |
+
lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable);
|
| 2028 |
+
} else {
|
| 2029 |
+
if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) {
|
| 2030 |
+
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error);
|
| 2031 |
+
} else if (then === undefined) {
|
| 2032 |
+
lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
|
| 2033 |
+
} else if (lib$es6$promise$utils$$isFunction(then)) {
|
| 2034 |
+
lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then);
|
| 2035 |
+
} else {
|
| 2036 |
+
lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
|
| 2037 |
+
}
|
| 2038 |
+
}
|
| 2039 |
+
}
|
| 2040 |
+
|
| 2041 |
+
function lib$es6$promise$$internal$$resolve(promise, value) {
|
| 2042 |
+
if (promise === value) {
|
| 2043 |
+
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFulfillment());
|
| 2044 |
+
} else if (lib$es6$promise$utils$$objectOrFunction(value)) {
|
| 2045 |
+
lib$es6$promise$$internal$$handleMaybeThenable(promise, value, lib$es6$promise$$internal$$getThen(value));
|
| 2046 |
+
} else {
|
| 2047 |
+
lib$es6$promise$$internal$$fulfill(promise, value);
|
| 2048 |
+
}
|
| 2049 |
+
}
|
| 2050 |
+
|
| 2051 |
+
function lib$es6$promise$$internal$$publishRejection(promise) {
|
| 2052 |
+
if (promise._onerror) {
|
| 2053 |
+
promise._onerror(promise._result);
|
| 2054 |
+
}
|
| 2055 |
+
|
| 2056 |
+
lib$es6$promise$$internal$$publish(promise);
|
| 2057 |
+
}
|
| 2058 |
+
|
| 2059 |
+
function lib$es6$promise$$internal$$fulfill(promise, value) {
|
| 2060 |
+
if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }
|
| 2061 |
+
|
| 2062 |
+
promise._result = value;
|
| 2063 |
+
promise._state = lib$es6$promise$$internal$$FULFILLED;
|
| 2064 |
+
|
| 2065 |
+
if (promise._subscribers.length !== 0) {
|
| 2066 |
+
lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise);
|
| 2067 |
+
}
|
| 2068 |
+
}
|
| 2069 |
+
|
| 2070 |
+
function lib$es6$promise$$internal$$reject(promise, reason) {
|
| 2071 |
+
if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }
|
| 2072 |
+
promise._state = lib$es6$promise$$internal$$REJECTED;
|
| 2073 |
+
promise._result = reason;
|
| 2074 |
+
|
| 2075 |
+
lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise);
|
| 2076 |
+
}
|
| 2077 |
+
|
| 2078 |
+
function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) {
|
| 2079 |
+
var subscribers = parent._subscribers;
|
| 2080 |
+
var length = subscribers.length;
|
| 2081 |
+
|
| 2082 |
+
parent._onerror = null;
|
| 2083 |
+
|
| 2084 |
+
subscribers[length] = child;
|
| 2085 |
+
subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment;
|
| 2086 |
+
subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection;
|
| 2087 |
+
|
| 2088 |
+
if (length === 0 && parent._state) {
|
| 2089 |
+
lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent);
|
| 2090 |
+
}
|
| 2091 |
+
}
|
| 2092 |
+
|
| 2093 |
+
function lib$es6$promise$$internal$$publish(promise) {
|
| 2094 |
+
var subscribers = promise._subscribers;
|
| 2095 |
+
var settled = promise._state;
|
| 2096 |
+
|
| 2097 |
+
if (subscribers.length === 0) { return; }
|
| 2098 |
+
|
| 2099 |
+
var child, callback, detail = promise._result;
|
| 2100 |
+
|
| 2101 |
+
for (var i = 0; i < subscribers.length; i += 3) {
|
| 2102 |
+
child = subscribers[i];
|
| 2103 |
+
callback = subscribers[i + settled];
|
| 2104 |
+
|
| 2105 |
+
if (child) {
|
| 2106 |
+
lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail);
|
| 2107 |
+
} else {
|
| 2108 |
+
callback(detail);
|
| 2109 |
+
}
|
| 2110 |
+
}
|
| 2111 |
+
|
| 2112 |
+
promise._subscribers.length = 0;
|
| 2113 |
+
}
|
| 2114 |
+
|
| 2115 |
+
function lib$es6$promise$$internal$$ErrorObject() {
|
| 2116 |
+
this.error = null;
|
| 2117 |
+
}
|
| 2118 |
+
|
| 2119 |
+
var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject();
|
| 2120 |
+
|
| 2121 |
+
function lib$es6$promise$$internal$$tryCatch(callback, detail) {
|
| 2122 |
+
try {
|
| 2123 |
+
return callback(detail);
|
| 2124 |
+
} catch(e) {
|
| 2125 |
+
lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e;
|
| 2126 |
+
return lib$es6$promise$$internal$$TRY_CATCH_ERROR;
|
| 2127 |
+
}
|
| 2128 |
+
}
|
| 2129 |
+
|
| 2130 |
+
function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) {
|
| 2131 |
+
var hasCallback = lib$es6$promise$utils$$isFunction(callback),
|
| 2132 |
+
value, error, succeeded, failed;
|
| 2133 |
+
|
| 2134 |
+
if (hasCallback) {
|
| 2135 |
+
value = lib$es6$promise$$internal$$tryCatch(callback, detail);
|
| 2136 |
+
|
| 2137 |
+
if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) {
|
| 2138 |
+
failed = true;
|
| 2139 |
+
error = value.error;
|
| 2140 |
+
value = null;
|
| 2141 |
+
} else {
|
| 2142 |
+
succeeded = true;
|
| 2143 |
+
}
|
| 2144 |
+
|
| 2145 |
+
if (promise === value) {
|
| 2146 |
+
lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn());
|
| 2147 |
+
return;
|
| 2148 |
+
}
|
| 2149 |
+
|
| 2150 |
+
} else {
|
| 2151 |
+
value = detail;
|
| 2152 |
+
succeeded = true;
|
| 2153 |
+
}
|
| 2154 |
+
|
| 2155 |
+
if (promise._state !== lib$es6$promise$$internal$$PENDING) {
|
| 2156 |
+
// noop
|
| 2157 |
+
} else if (hasCallback && succeeded) {
|
| 2158 |
+
lib$es6$promise$$internal$$resolve(promise, value);
|
| 2159 |
+
} else if (failed) {
|
| 2160 |
+
lib$es6$promise$$internal$$reject(promise, error);
|
| 2161 |
+
} else if (settled === lib$es6$promise$$internal$$FULFILLED) {
|
| 2162 |
+
lib$es6$promise$$internal$$fulfill(promise, value);
|
| 2163 |
+
} else if (settled === lib$es6$promise$$internal$$REJECTED) {
|
| 2164 |
+
lib$es6$promise$$internal$$reject(promise, value);
|
| 2165 |
+
}
|
| 2166 |
+
}
|
| 2167 |
+
|
| 2168 |
+
function lib$es6$promise$$internal$$initializePromise(promise, resolver) {
|
| 2169 |
+
try {
|
| 2170 |
+
resolver(function resolvePromise(value){
|
| 2171 |
+
lib$es6$promise$$internal$$resolve(promise, value);
|
| 2172 |
+
}, function rejectPromise(reason) {
|
| 2173 |
+
lib$es6$promise$$internal$$reject(promise, reason);
|
| 2174 |
+
});
|
| 2175 |
+
} catch(e) {
|
| 2176 |
+
lib$es6$promise$$internal$$reject(promise, e);
|
| 2177 |
+
}
|
| 2178 |
+
}
|
| 2179 |
+
|
| 2180 |
+
var lib$es6$promise$$internal$$id = 0;
|
| 2181 |
+
function lib$es6$promise$$internal$$nextId() {
|
| 2182 |
+
return lib$es6$promise$$internal$$id++;
|
| 2183 |
+
}
|
| 2184 |
+
|
| 2185 |
+
function lib$es6$promise$$internal$$makePromise(promise) {
|
| 2186 |
+
promise[lib$es6$promise$$internal$$PROMISE_ID] = lib$es6$promise$$internal$$id++;
|
| 2187 |
+
promise._state = undefined;
|
| 2188 |
+
promise._result = undefined;
|
| 2189 |
+
promise._subscribers = [];
|
| 2190 |
+
}
|
| 2191 |
+
|
| 2192 |
+
function lib$es6$promise$promise$all$$all(entries) {
|
| 2193 |
+
return new lib$es6$promise$enumerator$$default(this, entries).promise;
|
| 2194 |
+
}
|
| 2195 |
+
var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all;
|
| 2196 |
+
function lib$es6$promise$promise$race$$race(entries) {
|
| 2197 |
+
/*jshint validthis:true */
|
| 2198 |
+
var Constructor = this;
|
| 2199 |
+
|
| 2200 |
+
if (!lib$es6$promise$utils$$isArray(entries)) {
|
| 2201 |
+
return new Constructor(function(resolve, reject) {
|
| 2202 |
+
reject(new TypeError('You must pass an array to race.'));
|
| 2203 |
+
});
|
| 2204 |
+
} else {
|
| 2205 |
+
return new Constructor(function(resolve, reject) {
|
| 2206 |
+
var length = entries.length;
|
| 2207 |
+
for (var i = 0; i < length; i++) {
|
| 2208 |
+
Constructor.resolve(entries[i]).then(resolve, reject);
|
| 2209 |
+
}
|
| 2210 |
+
});
|
| 2211 |
+
}
|
| 2212 |
+
}
|
| 2213 |
+
var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race;
|
| 2214 |
+
function lib$es6$promise$promise$reject$$reject(reason) {
|
| 2215 |
+
/*jshint validthis:true */
|
| 2216 |
+
var Constructor = this;
|
| 2217 |
+
var promise = new Constructor(lib$es6$promise$$internal$$noop);
|
| 2218 |
+
lib$es6$promise$$internal$$reject(promise, reason);
|
| 2219 |
+
return promise;
|
| 2220 |
+
}
|
| 2221 |
+
var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject;
|
| 2222 |
+
|
| 2223 |
+
|
| 2224 |
+
function lib$es6$promise$promise$$needsResolver() {
|
| 2225 |
+
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
| 2226 |
+
}
|
| 2227 |
+
|
| 2228 |
+
function lib$es6$promise$promise$$needsNew() {
|
| 2229 |
+
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
| 2230 |
+
}
|
| 2231 |
+
|
| 2232 |
+
var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise;
|
| 2233 |
+
/**
|
| 2234 |
+
Promise objects represent the eventual result of an asynchronous operation. The
|
| 2235 |
+
primary way of interacting with a promise is through its `then` method, which
|
| 2236 |
+
registers callbacks to receive either a promise's eventual value or the reason
|
| 2237 |
+
why the promise cannot be fulfilled.
|
| 2238 |
+
|
| 2239 |
+
Terminology
|
| 2240 |
+
-----------
|
| 2241 |
+
|
| 2242 |
+
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
|
| 2243 |
+
- `thenable` is an object or function that defines a `then` method.
|
| 2244 |
+
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
|
| 2245 |
+
- `exception` is a value that is thrown using the throw statement.
|
| 2246 |
+
- `reason` is a value that indicates why a promise was rejected.
|
| 2247 |
+
- `settled` the final resting state of a promise, fulfilled or rejected.
|
| 2248 |
+
|
| 2249 |
+
A promise can be in one of three states: pending, fulfilled, or rejected.
|
| 2250 |
+
|
| 2251 |
+
Promises that are fulfilled have a fulfillment value and are in the fulfilled
|
| 2252 |
+
state. Promises that are rejected have a rejection reason and are in the
|
| 2253 |
+
rejected state. A fulfillment value is never a thenable.
|
| 2254 |
+
|
| 2255 |
+
Promises can also be said to *resolve* a value. If this value is also a
|
| 2256 |
+
promise, then the original promise's settled state will match the value's
|
| 2257 |
+
settled state. So a promise that *resolves* a promise that rejects will
|
| 2258 |
+
itself reject, and a promise that *resolves* a promise that fulfills will
|
| 2259 |
+
itself fulfill.
|
| 2260 |
+
|
| 2261 |
+
|
| 2262 |
+
Basic Usage:
|
| 2263 |
+
------------
|
| 2264 |
+
|
| 2265 |
+
```js
|
| 2266 |
+
var promise = new Promise(function(resolve, reject) {
|
| 2267 |
+
// on success
|
| 2268 |
+
resolve(value);
|
| 2269 |
+
|
| 2270 |
+
// on failure
|
| 2271 |
+
reject(reason);
|
| 2272 |
+
});
|
| 2273 |
+
|
| 2274 |
+
promise.then(function(value) {
|
| 2275 |
+
// on fulfillment
|
| 2276 |
+
}, function(reason) {
|
| 2277 |
+
// on rejection
|
| 2278 |
+
});
|
| 2279 |
+
```
|
| 2280 |
+
|
| 2281 |
+
Advanced Usage:
|
| 2282 |
+
---------------
|
| 2283 |
+
|
| 2284 |
+
Promises shine when abstracting away asynchronous interactions such as
|
| 2285 |
+
`XMLHttpRequest`s.
|
| 2286 |
+
|
| 2287 |
+
```js
|
| 2288 |
+
function getJSON(url) {
|
| 2289 |
+
return new Promise(function(resolve, reject){
|
| 2290 |
+
var xhr = new XMLHttpRequest();
|
| 2291 |
+
|
| 2292 |
+
xhr.open('GET', url);
|
| 2293 |
+
xhr.onreadystatechange = handler;
|
| 2294 |
+
xhr.responseType = 'json';
|
| 2295 |
+
xhr.setRequestHeader('Accept', 'application/json');
|
| 2296 |
+
xhr.send();
|
| 2297 |
+
|
| 2298 |
+
function handler() {
|
| 2299 |
+
if (this.readyState === this.DONE) {
|
| 2300 |
+
if (this.status === 200) {
|
| 2301 |
+
resolve(this.response);
|
| 2302 |
+
} else {
|
| 2303 |
+
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
|
| 2304 |
+
}
|
| 2305 |
+
}
|
| 2306 |
+
};
|
| 2307 |
+
});
|
| 2308 |
+
}
|
| 2309 |
+
|
| 2310 |
+
getJSON('/posts.json').then(function(json) {
|
| 2311 |
+
// on fulfillment
|
| 2312 |
+
}, function(reason) {
|
| 2313 |
+
// on rejection
|
| 2314 |
+
});
|
| 2315 |
+
```
|
| 2316 |
+
|
| 2317 |
+
Unlike callbacks, promises are great composable primitives.
|
| 2318 |
+
|
| 2319 |
+
```js
|
| 2320 |
+
Promise.all([
|
| 2321 |
+
getJSON('/posts'),
|
| 2322 |
+
getJSON('/comments')
|
| 2323 |
+
]).then(function(values){
|
| 2324 |
+
values[0] // => postsJSON
|
| 2325 |
+
values[1] // => commentsJSON
|
| 2326 |
+
|
| 2327 |
+
return values;
|
| 2328 |
+
});
|
| 2329 |
+
```
|
| 2330 |
+
|
| 2331 |
+
@class Promise
|
| 2332 |
+
@param {function} resolver
|
| 2333 |
+
Useful for tooling.
|
| 2334 |
+
@constructor
|
| 2335 |
+
*/
|
| 2336 |
+
function lib$es6$promise$promise$$Promise(resolver) {
|
| 2337 |
+
this[lib$es6$promise$$internal$$PROMISE_ID] = lib$es6$promise$$internal$$nextId();
|
| 2338 |
+
this._result = this._state = undefined;
|
| 2339 |
+
this._subscribers = [];
|
| 2340 |
+
|
| 2341 |
+
if (lib$es6$promise$$internal$$noop !== resolver) {
|
| 2342 |
+
typeof resolver !== 'function' && lib$es6$promise$promise$$needsResolver();
|
| 2343 |
+
this instanceof lib$es6$promise$promise$$Promise ? lib$es6$promise$$internal$$initializePromise(this, resolver) : lib$es6$promise$promise$$needsNew();
|
| 2344 |
+
}
|
| 2345 |
+
}
|
| 2346 |
+
|
| 2347 |
+
lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default;
|
| 2348 |
+
lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default;
|
| 2349 |
+
lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default;
|
| 2350 |
+
lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default;
|
| 2351 |
+
lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler;
|
| 2352 |
+
lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap;
|
| 2353 |
+
lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap;
|
| 2354 |
+
|
| 2355 |
+
lib$es6$promise$promise$$Promise.prototype = {
|
| 2356 |
+
constructor: lib$es6$promise$promise$$Promise,
|
| 2357 |
+
|
| 2358 |
+
/**
|
| 2359 |
+
The primary way of interacting with a promise is through its `then` method,
|
| 2360 |
+
which registers callbacks to receive either a promise's eventual value or the
|
| 2361 |
+
reason why the promise cannot be fulfilled.
|
| 2362 |
+
|
| 2363 |
+
```js
|
| 2364 |
+
findUser().then(function(user){
|
| 2365 |
+
// user is available
|
| 2366 |
+
}, function(reason){
|
| 2367 |
+
// user is unavailable, and you are given the reason why
|
| 2368 |
+
});
|
| 2369 |
+
```
|
| 2370 |
+
|
| 2371 |
+
Chaining
|
| 2372 |
+
--------
|
| 2373 |
+
|
| 2374 |
+
The return value of `then` is itself a promise. This second, 'downstream'
|
| 2375 |
+
promise is resolved with the return value of the first promise's fulfillment
|
| 2376 |
+
or rejection handler, or rejected if the handler throws an exception.
|
| 2377 |
+
|
| 2378 |
+
```js
|
| 2379 |
+
findUser().then(function (user) {
|
| 2380 |
+
return user.name;
|
| 2381 |
+
}, function (reason) {
|
| 2382 |
+
return 'default name';
|
| 2383 |
+
}).then(function (userName) {
|
| 2384 |
+
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
| 2385 |
+
// will be `'default name'`
|
| 2386 |
+
});
|
| 2387 |
+
|
| 2388 |
+
findUser().then(function (user) {
|
| 2389 |
+
throw new Error('Found user, but still unhappy');
|
| 2390 |
+
}, function (reason) {
|
| 2391 |
+
throw new Error('`findUser` rejected and we're unhappy');
|
| 2392 |
+
}).then(function (value) {
|
| 2393 |
+
// never reached
|
| 2394 |
+
}, function (reason) {
|
| 2395 |
+
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
| 2396 |
+
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
| 2397 |
+
});
|
| 2398 |
+
```
|
| 2399 |
+
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
| 2400 |
+
|
| 2401 |
+
```js
|
| 2402 |
+
findUser().then(function (user) {
|
| 2403 |
+
throw new PedagogicalException('Upstream error');
|
| 2404 |
+
}).then(function (value) {
|
| 2405 |
+
// never reached
|
| 2406 |
+
}).then(function (value) {
|
| 2407 |
+
// never reached
|
| 2408 |
+
}, function (reason) {
|
| 2409 |
+
// The `PedgagocialException` is propagated all the way down to here
|
| 2410 |
+
});
|
| 2411 |
+
```
|
| 2412 |
+
|
| 2413 |
+
Assimilation
|
| 2414 |
+
------------
|
| 2415 |
+
|
| 2416 |
+
Sometimes the value you want to propagate to a downstream promise can only be
|
| 2417 |
+
retrieved asynchronously. This can be achieved by returning a promise in the
|
| 2418 |
+
fulfillment or rejection handler. The downstream promise will then be pending
|
| 2419 |
+
until the returned promise is settled. This is called *assimilation*.
|
| 2420 |
+
|
| 2421 |
+
```js
|
| 2422 |
+
findUser().then(function (user) {
|
| 2423 |
+
return findCommentsByAuthor(user);
|
| 2424 |
+
}).then(function (comments) {
|
| 2425 |
+
// The user's comments are now available
|
| 2426 |
+
});
|
| 2427 |
+
```
|
| 2428 |
+
|
| 2429 |
+
If the assimliated promise rejects, then the downstream promise will also reject.
|
| 2430 |
+
|
| 2431 |
+
```js
|
| 2432 |
+
findUser().then(function (user) {
|
| 2433 |
+
return findCommentsByAuthor(user);
|
| 2434 |
+
}).then(function (comments) {
|
| 2435 |
+
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
| 2436 |
+
}, function (reason) {
|
| 2437 |
+
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
| 2438 |
+
});
|
| 2439 |
+
```
|
| 2440 |
+
|
| 2441 |
+
Simple Example
|
| 2442 |
+
--------------
|
| 2443 |
+
|
| 2444 |
+
Synchronous Example
|
| 2445 |
+
|
| 2446 |
+
```javascript
|
| 2447 |
+
var result;
|
| 2448 |
+
|
| 2449 |
+
try {
|
| 2450 |
+
result = findResult();
|
| 2451 |
+
// success
|
| 2452 |
+
} catch(reason) {
|
| 2453 |
+
// failure
|
| 2454 |
+
}
|
| 2455 |
+
```
|
| 2456 |
+
|
| 2457 |
+
Errback Example
|
| 2458 |
+
|
| 2459 |
+
```js
|
| 2460 |
+
findResult(function(result, err){
|
| 2461 |
+
if (err) {
|
| 2462 |
+
// failure
|
| 2463 |
+
} else {
|
| 2464 |
+
// success
|
| 2465 |
+
}
|
| 2466 |
+
});
|
| 2467 |
+
```
|
| 2468 |
+
|
| 2469 |
+
Promise Example;
|
| 2470 |
+
|
| 2471 |
+
```javascript
|
| 2472 |
+
findResult().then(function(result){
|
| 2473 |
+
// success
|
| 2474 |
+
}, function(reason){
|
| 2475 |
+
// failure
|
| 2476 |
+
});
|
| 2477 |
+
```
|
| 2478 |
+
|
| 2479 |
+
Advanced Example
|
| 2480 |
+
--------------
|
| 2481 |
+
|
| 2482 |
+
Synchronous Example
|
| 2483 |
+
|
| 2484 |
+
```javascript
|
| 2485 |
+
var author, books;
|
| 2486 |
+
|
| 2487 |
+
try {
|
| 2488 |
+
author = findAuthor();
|
| 2489 |
+
books = findBooksByAuthor(author);
|
| 2490 |
+
// success
|
| 2491 |
+
} catch(reason) {
|
| 2492 |
+
// failure
|
| 2493 |
+
}
|
| 2494 |
+
```
|
| 2495 |
+
|
| 2496 |
+
Errback Example
|
| 2497 |
+
|
| 2498 |
+
```js
|
| 2499 |
+
|
| 2500 |
+
function foundBooks(books) {
|
| 2501 |
+
|
| 2502 |
+
}
|
| 2503 |
+
|
| 2504 |
+
function failure(reason) {
|
| 2505 |
+
|
| 2506 |
+
}
|
| 2507 |
+
|
| 2508 |
+
findAuthor(function(author, err){
|
| 2509 |
+
if (err) {
|
| 2510 |
+
failure(err);
|
| 2511 |
+
// failure
|
| 2512 |
+
} else {
|
| 2513 |
+
try {
|
| 2514 |
+
findBoooksByAuthor(author, function(books, err) {
|
| 2515 |
+
if (err) {
|
| 2516 |
+
failure(err);
|
| 2517 |
+
} else {
|
| 2518 |
+
try {
|
| 2519 |
+
foundBooks(books);
|
| 2520 |
+
} catch(reason) {
|
| 2521 |
+
failure(reason);
|
| 2522 |
+
}
|
| 2523 |
+
}
|
| 2524 |
+
});
|
| 2525 |
+
} catch(error) {
|
| 2526 |
+
failure(err);
|
| 2527 |
+
}
|
| 2528 |
+
// success
|
| 2529 |
+
}
|
| 2530 |
+
});
|
| 2531 |
+
```
|
| 2532 |
+
|
| 2533 |
+
Promise Example;
|
| 2534 |
+
|
| 2535 |
+
```javascript
|
| 2536 |
+
findAuthor().
|
| 2537 |
+
then(findBooksByAuthor).
|
| 2538 |
+
then(function(books){
|
| 2539 |
+
// found books
|
| 2540 |
+
}).catch(function(reason){
|
| 2541 |
+
// something went wrong
|
| 2542 |
+
});
|
| 2543 |
+
```
|
| 2544 |
+
|
| 2545 |
+
@method then
|
| 2546 |
+
@param {Function} onFulfilled
|
| 2547 |
+
@param {Function} onRejected
|
| 2548 |
+
Useful for tooling.
|
| 2549 |
+
@return {Promise}
|
| 2550 |
+
*/
|
| 2551 |
+
then: lib$es6$promise$then$$default,
|
| 2552 |
+
|
| 2553 |
+
/**
|
| 2554 |
+
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
| 2555 |
+
as the catch block of a try/catch statement.
|
| 2556 |
+
|
| 2557 |
+
```js
|
| 2558 |
+
function findAuthor(){
|
| 2559 |
+
throw new Error('couldn't find that author');
|
| 2560 |
+
}
|
| 2561 |
+
|
| 2562 |
+
// synchronous
|
| 2563 |
+
try {
|
| 2564 |
+
findAuthor();
|
| 2565 |
+
} catch(reason) {
|
| 2566 |
+
// something went wrong
|
| 2567 |
+
}
|
| 2568 |
+
|
| 2569 |
+
// async with promises
|
| 2570 |
+
findAuthor().catch(function(reason){
|
| 2571 |
+
// something went wrong
|
| 2572 |
+
});
|
| 2573 |
+
```
|
| 2574 |
+
|
| 2575 |
+
@method catch
|
| 2576 |
+
@param {Function} onRejection
|
| 2577 |
+
Useful for tooling.
|
| 2578 |
+
@return {Promise}
|
| 2579 |
+
*/
|
| 2580 |
+
'catch': function(onRejection) {
|
| 2581 |
+
return this.then(null, onRejection);
|
| 2582 |
+
}
|
| 2583 |
+
};
|
| 2584 |
+
var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator;
|
| 2585 |
+
function lib$es6$promise$enumerator$$Enumerator(Constructor, input) {
|
| 2586 |
+
this._instanceConstructor = Constructor;
|
| 2587 |
+
this.promise = new Constructor(lib$es6$promise$$internal$$noop);
|
| 2588 |
+
|
| 2589 |
+
if (!this.promise[lib$es6$promise$$internal$$PROMISE_ID]) {
|
| 2590 |
+
lib$es6$promise$$internal$$makePromise(this.promise);
|
| 2591 |
+
}
|
| 2592 |
+
|
| 2593 |
+
if (lib$es6$promise$utils$$isArray(input)) {
|
| 2594 |
+
this._input = input;
|
| 2595 |
+
this.length = input.length;
|
| 2596 |
+
this._remaining = input.length;
|
| 2597 |
+
|
| 2598 |
+
this._result = new Array(this.length);
|
| 2599 |
+
|
| 2600 |
+
if (this.length === 0) {
|
| 2601 |
+
lib$es6$promise$$internal$$fulfill(this.promise, this._result);
|
| 2602 |
+
} else {
|
| 2603 |
+
this.length = this.length || 0;
|
| 2604 |
+
this._enumerate();
|
| 2605 |
+
if (this._remaining === 0) {
|
| 2606 |
+
lib$es6$promise$$internal$$fulfill(this.promise, this._result);
|
| 2607 |
+
}
|
| 2608 |
+
}
|
| 2609 |
+
} else {
|
| 2610 |
+
lib$es6$promise$$internal$$reject(this.promise, lib$es6$promise$enumerator$$validationError());
|
| 2611 |
+
}
|
| 2612 |
+
}
|
| 2613 |
+
|
| 2614 |
+
function lib$es6$promise$enumerator$$validationError() {
|
| 2615 |
+
return new Error('Array Methods must be provided an Array');
|
| 2616 |
+
}
|
| 2617 |
+
|
| 2618 |
+
lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function() {
|
| 2619 |
+
var length = this.length;
|
| 2620 |
+
var input = this._input;
|
| 2621 |
+
|
| 2622 |
+
for (var i = 0; this._state === lib$es6$promise$$internal$$PENDING && i < length; i++) {
|
| 2623 |
+
this._eachEntry(input[i], i);
|
| 2624 |
+
}
|
| 2625 |
+
};
|
| 2626 |
+
|
| 2627 |
+
lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) {
|
| 2628 |
+
var c = this._instanceConstructor;
|
| 2629 |
+
var resolve = c.resolve;
|
| 2630 |
+
|
| 2631 |
+
if (resolve === lib$es6$promise$promise$resolve$$default) {
|
| 2632 |
+
var then = lib$es6$promise$$internal$$getThen(entry);
|
| 2633 |
+
|
| 2634 |
+
if (then === lib$es6$promise$then$$default &&
|
| 2635 |
+
entry._state !== lib$es6$promise$$internal$$PENDING) {
|
| 2636 |
+
this._settledAt(entry._state, i, entry._result);
|
| 2637 |
+
} else if (typeof then !== 'function') {
|
| 2638 |
+
this._remaining--;
|
| 2639 |
+
this._result[i] = entry;
|
| 2640 |
+
} else if (c === lib$es6$promise$promise$$default) {
|
| 2641 |
+
var promise = new c(lib$es6$promise$$internal$$noop);
|
| 2642 |
+
lib$es6$promise$$internal$$handleMaybeThenable(promise, entry, then);
|
| 2643 |
+
this._willSettleAt(promise, i);
|
| 2644 |
+
} else {
|
| 2645 |
+
this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
|
| 2646 |
+
}
|
| 2647 |
+
} else {
|
| 2648 |
+
this._willSettleAt(resolve(entry), i);
|
| 2649 |
+
}
|
| 2650 |
+
};
|
| 2651 |
+
|
| 2652 |
+
lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) {
|
| 2653 |
+
var promise = this.promise;
|
| 2654 |
+
|
| 2655 |
+
if (promise._state === lib$es6$promise$$internal$$PENDING) {
|
| 2656 |
+
this._remaining--;
|
| 2657 |
+
|
| 2658 |
+
if (state === lib$es6$promise$$internal$$REJECTED) {
|
| 2659 |
+
lib$es6$promise$$internal$$reject(promise, value);
|
| 2660 |
+
} else {
|
| 2661 |
+
this._result[i] = value;
|
| 2662 |
+
}
|
| 2663 |
+
}
|
| 2664 |
+
|
| 2665 |
+
if (this._remaining === 0) {
|
| 2666 |
+
lib$es6$promise$$internal$$fulfill(promise, this._result);
|
| 2667 |
+
}
|
| 2668 |
+
};
|
| 2669 |
+
|
| 2670 |
+
lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) {
|
| 2671 |
+
var enumerator = this;
|
| 2672 |
+
|
| 2673 |
+
lib$es6$promise$$internal$$subscribe(promise, undefined, function(value) {
|
| 2674 |
+
enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value);
|
| 2675 |
+
}, function(reason) {
|
| 2676 |
+
enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason);
|
| 2677 |
+
});
|
| 2678 |
+
};
|
| 2679 |
+
function lib$es6$promise$polyfill$$polyfill() {
|
| 2680 |
+
var local;
|
| 2681 |
+
|
| 2682 |
+
if (typeof global !== 'undefined') {
|
| 2683 |
+
local = global;
|
| 2684 |
+
} else if (typeof self !== 'undefined') {
|
| 2685 |
+
local = self;
|
| 2686 |
+
} else {
|
| 2687 |
+
try {
|
| 2688 |
+
local = Function('return this')();
|
| 2689 |
+
} catch (e) {
|
| 2690 |
+
throw new Error('polyfill failed because global object is unavailable in this environment');
|
| 2691 |
+
}
|
| 2692 |
+
}
|
| 2693 |
+
|
| 2694 |
+
var P = local.Promise;
|
| 2695 |
+
|
| 2696 |
+
if (P && Object.prototype.toString.call(P.resolve()) === '[object Promise]' && !P.cast) {
|
| 2697 |
+
return;
|
| 2698 |
+
}
|
| 2699 |
+
|
| 2700 |
+
local.Promise = lib$es6$promise$promise$$default;
|
| 2701 |
+
}
|
| 2702 |
+
var lib$es6$promise$polyfill$$default = lib$es6$promise$polyfill$$polyfill;
|
| 2703 |
+
|
| 2704 |
+
var lib$es6$promise$umd$$ES6Promise = {
|
| 2705 |
+
'Promise': lib$es6$promise$promise$$default,
|
| 2706 |
+
'polyfill': lib$es6$promise$polyfill$$default
|
| 2707 |
+
};
|
| 2708 |
+
|
| 2709 |
+
/* global define:true module:true window: true */
|
| 2710 |
+
if ("function" === 'function' && __webpack_require__(18)['amd']) {
|
| 2711 |
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return lib$es6$promise$umd$$ES6Promise; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 2712 |
+
} else if (typeof module !== 'undefined' && module['exports']) {
|
| 2713 |
+
module['exports'] = lib$es6$promise$umd$$ES6Promise;
|
| 2714 |
+
} else if (typeof this !== 'undefined') {
|
| 2715 |
+
this['ES6Promise'] = lib$es6$promise$umd$$ES6Promise;
|
| 2716 |
+
}
|
| 2717 |
+
|
| 2718 |
+
lib$es6$promise$polyfill$$default();
|
| 2719 |
+
}).call(this);
|
| 2720 |
+
|
| 2721 |
+
|
| 2722 |
+
|
| 2723 |
+
/*** EXPORTS FROM exports-loader ***/
|
| 2724 |
+
module.exports = global.Promise;
|
| 2725 |
+
}.call(global));
|
| 2726 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15), (function() { return this; }()), __webpack_require__(16)(module)))
|
| 2727 |
+
|
| 2728 |
+
/***/ },
|
| 2729 |
+
/* 15 */
|
| 2730 |
+
/***/ function(module, exports) {
|
| 2731 |
+
|
| 2732 |
+
// shim for using process in browser
|
| 2733 |
+
|
| 2734 |
+
var process = module.exports = {};
|
| 2735 |
+
|
| 2736 |
+
// cached from whatever global is present so that test runners that stub it don't break things.
|
| 2737 |
+
var cachedSetTimeout = setTimeout;
|
| 2738 |
+
var cachedClearTimeout = clearTimeout;
|
| 2739 |
+
|
| 2740 |
+
var queue = [];
|
| 2741 |
+
var draining = false;
|
| 2742 |
+
var currentQueue;
|
| 2743 |
+
var queueIndex = -1;
|
| 2744 |
+
|
| 2745 |
+
function cleanUpNextTick() {
|
| 2746 |
+
if (!draining || !currentQueue) {
|
| 2747 |
+
return;
|
| 2748 |
+
}
|
| 2749 |
+
draining = false;
|
| 2750 |
+
if (currentQueue.length) {
|
| 2751 |
+
queue = currentQueue.concat(queue);
|
| 2752 |
+
} else {
|
| 2753 |
+
queueIndex = -1;
|
| 2754 |
+
}
|
| 2755 |
+
if (queue.length) {
|
| 2756 |
+
drainQueue();
|
| 2757 |
+
}
|
| 2758 |
+
}
|
| 2759 |
+
|
| 2760 |
+
function drainQueue() {
|
| 2761 |
+
if (draining) {
|
| 2762 |
+
return;
|
| 2763 |
+
}
|
| 2764 |
+
var timeout = cachedSetTimeout(cleanUpNextTick);
|
| 2765 |
+
draining = true;
|
| 2766 |
+
|
| 2767 |
+
var len = queue.length;
|
| 2768 |
+
while(len) {
|
| 2769 |
+
currentQueue = queue;
|
| 2770 |
+
queue = [];
|
| 2771 |
+
while (++queueIndex < len) {
|
| 2772 |
+
if (currentQueue) {
|
| 2773 |
+
currentQueue[queueIndex].run();
|
| 2774 |
+
}
|
| 2775 |
+
}
|
| 2776 |
+
queueIndex = -1;
|
| 2777 |
+
len = queue.length;
|
| 2778 |
+
}
|
| 2779 |
+
currentQueue = null;
|
| 2780 |
+
draining = false;
|
| 2781 |
+
cachedClearTimeout(timeout);
|
| 2782 |
+
}
|
| 2783 |
+
|
| 2784 |
+
process.nextTick = function (fun) {
|
| 2785 |
+
var args = new Array(arguments.length - 1);
|
| 2786 |
+
if (arguments.length > 1) {
|
| 2787 |
+
for (var i = 1; i < arguments.length; i++) {
|
| 2788 |
+
args[i - 1] = arguments[i];
|
| 2789 |
+
}
|
| 2790 |
+
}
|
| 2791 |
+
queue.push(new Item(fun, args));
|
| 2792 |
+
if (queue.length === 1 && !draining) {
|
| 2793 |
+
cachedSetTimeout(drainQueue, 0);
|
| 2794 |
+
}
|
| 2795 |
+
};
|
| 2796 |
+
|
| 2797 |
+
// v8 likes predictible objects
|
| 2798 |
+
function Item(fun, array) {
|
| 2799 |
+
this.fun = fun;
|
| 2800 |
+
this.array = array;
|
| 2801 |
+
}
|
| 2802 |
+
Item.prototype.run = function () {
|
| 2803 |
+
this.fun.apply(null, this.array);
|
| 2804 |
+
};
|
| 2805 |
+
process.title = 'browser';
|
| 2806 |
+
process.browser = true;
|
| 2807 |
+
process.env = {};
|
| 2808 |
+
process.argv = [];
|
| 2809 |
+
process.version = ''; // empty string to avoid regexp issues
|
| 2810 |
+
process.versions = {};
|
| 2811 |
+
|
| 2812 |
+
function noop() {}
|
| 2813 |
+
|
| 2814 |
+
process.on = noop;
|
| 2815 |
+
process.addListener = noop;
|
| 2816 |
+
process.once = noop;
|
| 2817 |
+
process.off = noop;
|
| 2818 |
+
process.removeListener = noop;
|
| 2819 |
+
process.removeAllListeners = noop;
|
| 2820 |
+
process.emit = noop;
|
| 2821 |
+
|
| 2822 |
+
process.binding = function (name) {
|
| 2823 |
+
throw new Error('process.binding is not supported');
|
| 2824 |
+
};
|
| 2825 |
+
|
| 2826 |
+
process.cwd = function () { return '/' };
|
| 2827 |
+
process.chdir = function (dir) {
|
| 2828 |
+
throw new Error('process.chdir is not supported');
|
| 2829 |
+
};
|
| 2830 |
+
process.umask = function() { return 0; };
|
| 2831 |
+
|
| 2832 |
+
|
| 2833 |
+
/***/ },
|
| 2834 |
+
/* 16 */
|
| 2835 |
+
/***/ function(module, exports) {
|
| 2836 |
+
|
| 2837 |
+
module.exports = function(module) {
|
| 2838 |
+
if(!module.webpackPolyfill) {
|
| 2839 |
+
module.deprecate = function() {};
|
| 2840 |
+
module.paths = [];
|
| 2841 |
+
// module.parent = undefined by default
|
| 2842 |
+
module.children = [];
|
| 2843 |
+
module.webpackPolyfill = 1;
|
| 2844 |
+
}
|
| 2845 |
+
return module;
|
| 2846 |
+
}
|
| 2847 |
+
|
| 2848 |
+
|
| 2849 |
+
/***/ },
|
| 2850 |
+
/* 17 */
|
| 2851 |
+
/***/ function(module, exports) {
|
| 2852 |
+
|
| 2853 |
+
/* (ignored) */
|
| 2854 |
+
|
| 2855 |
+
/***/ },
|
| 2856 |
+
/* 18 */
|
| 2857 |
+
/***/ function(module, exports) {
|
| 2858 |
+
|
| 2859 |
+
module.exports = function() { throw new Error("define cannot be used indirect"); };
|
| 2860 |
+
|
| 2861 |
+
|
| 2862 |
+
/***/ }
|
| 2863 |
+
/******/ ]);
|
lib/view/assets/javascript/updater.min.js
CHANGED
|
@@ -1 +1,108 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******/ (function(modules) { // webpackBootstrap
|
| 2 |
+
/******/ // The module cache
|
| 3 |
+
/******/ var installedModules = {};
|
| 4 |
+
|
| 5 |
+
/******/ // The require function
|
| 6 |
+
/******/ function __webpack_require__(moduleId) {
|
| 7 |
+
|
| 8 |
+
/******/ // Check if module is in cache
|
| 9 |
+
/******/ if(installedModules[moduleId])
|
| 10 |
+
/******/ return installedModules[moduleId].exports;
|
| 11 |
+
|
| 12 |
+
/******/ // Create a new module (and put it into the cache)
|
| 13 |
+
/******/ var module = installedModules[moduleId] = {
|
| 14 |
+
/******/ exports: {},
|
| 15 |
+
/******/ id: moduleId,
|
| 16 |
+
/******/ loaded: false
|
| 17 |
+
/******/ };
|
| 18 |
+
|
| 19 |
+
/******/ // Execute the module function
|
| 20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
| 21 |
+
|
| 22 |
+
/******/ // Flag the module as loaded
|
| 23 |
+
/******/ module.loaded = true;
|
| 24 |
+
|
| 25 |
+
/******/ // Return the exports of the module
|
| 26 |
+
/******/ return module.exports;
|
| 27 |
+
/******/ }
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
| 31 |
+
/******/ __webpack_require__.m = modules;
|
| 32 |
+
|
| 33 |
+
/******/ // expose the module cache
|
| 34 |
+
/******/ __webpack_require__.c = installedModules;
|
| 35 |
+
|
| 36 |
+
/******/ // __webpack_public_path__
|
| 37 |
+
/******/ __webpack_require__.p = "";
|
| 38 |
+
|
| 39 |
+
/******/ // Load entry module and return exports
|
| 40 |
+
/******/ return __webpack_require__(0);
|
| 41 |
+
/******/ })
|
| 42 |
+
/************************************************************************/
|
| 43 |
+
/******/ ([
|
| 44 |
+
/* 0 */
|
| 45 |
+
/***/ function(module, exports) {
|
| 46 |
+
|
| 47 |
+
'use strict';
|
| 48 |
+
|
| 49 |
+
/**
|
| 50 |
+
* Copyright (C) 2014-2016 ServMask Inc.
|
| 51 |
+
*
|
| 52 |
+
* This program is free software: you can redistribute it and/or modify
|
| 53 |
+
* it under the terms of the GNU General Public License as published by
|
| 54 |
+
* the Free Software Foundation, either version 3 of the License, or
|
| 55 |
+
* (at your option) any later version.
|
| 56 |
+
*
|
| 57 |
+
* This program is distributed in the hope that it will be useful,
|
| 58 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 59 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 60 |
+
* GNU General Public License for more details.
|
| 61 |
+
*
|
| 62 |
+
* You should have received a copy of the GNU General Public License
|
| 63 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 64 |
+
*
|
| 65 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
| 66 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
| 67 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
| 68 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
| 69 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
| 70 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
| 71 |
+
*/
|
| 72 |
+
|
| 73 |
+
jQuery(document).ready(function ($) {
|
| 74 |
+
'use strict';
|
| 75 |
+
|
| 76 |
+
$('.ai1wm-purchase-add').click(function (e) {
|
| 77 |
+
var button = this;
|
| 78 |
+
e.preventDefault();
|
| 79 |
+
$(this).attr('disabled', true);
|
| 80 |
+
var dialog = $(this).closest('.ai1wm-modal-dialog');
|
| 81 |
+
var error = dialog.find('.ai1wm-modal-error');
|
| 82 |
+
var index = dialog.attr('id').split('-').pop();
|
| 83 |
+
var purchaseId = dialog.find('.ai1wm-purchase-id').val();
|
| 84 |
+
var updateLink = dialog.find('.ai1wm-update-link').val();
|
| 85 |
+
|
| 86 |
+
// Check Purchase ID
|
| 87 |
+
$.getJSON('https://servmask.com/purchase/' + purchaseId + '/check', function (product) {
|
| 88 |
+
$.post(ai1wm_updater.ajax.url, { 'ai1wm-uuid': product.uuid, 'ai1wm-extension': product.extension }, function () {
|
| 89 |
+
window.location.hash = '';
|
| 90 |
+
|
| 91 |
+
// Update plugin row
|
| 92 |
+
$('#ai1wm-update-section-' + index).html('<a href="' + updateLink + '">Check for updates</a>');
|
| 93 |
+
$(button).attr('disabled', false);
|
| 94 |
+
});
|
| 95 |
+
}).fail(function () {
|
| 96 |
+
$(button).attr('disabled', false);
|
| 97 |
+
error.html('Your purchase ID is invalid, please <a href="mailto:support@servmask.com">contact us</a>');
|
| 98 |
+
});
|
| 99 |
+
});
|
| 100 |
+
|
| 101 |
+
$('.ai1wm-purchase-discard').click(function (e) {
|
| 102 |
+
window.location.hash = '';
|
| 103 |
+
e.preventDefault();
|
| 104 |
+
});
|
| 105 |
+
});
|
| 106 |
+
|
| 107 |
+
/***/ }
|
| 108 |
+
/******/ ]);
|
lib/view/export/advanced-settings.php
CHANGED
|
@@ -28,6 +28,11 @@
|
|
| 28 |
</li>
|
| 29 |
|
| 30 |
<?php if ( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) === 0 ): ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
<li>
|
| 32 |
<input type="checkbox" id="ai1wm-no-cache" name="options[no_cache]" />
|
| 33 |
<label for="ai1wm-no-cache"><?php _e( 'Do <strong>not</strong> export cache (files)', AI1WM_PLUGIN_NAME ); ?></label>
|
|
@@ -39,6 +44,11 @@
|
|
| 39 |
<input type="checkbox" id="ai1wm-no-database" name="options[no_database]" />
|
| 40 |
<label for="ai1wm-no-database"><?php _e( 'Do <strong>not</strong> export database (sql)', AI1WM_PLUGIN_NAME ); ?></label>
|
| 41 |
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
</ul>
|
| 43 |
</div>
|
| 44 |
</div>
|
| 28 |
</li>
|
| 29 |
|
| 30 |
<?php if ( apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ) === 0 ): ?>
|
| 31 |
+
<li>
|
| 32 |
+
<input type="checkbox" id="ai1wm-no-inactive-plugins" name="options[no_inactive_plugins]" />
|
| 33 |
+
<label for="ai1wm-no-inactive-plugins"><?php _e( 'Do <strong>not</strong> export inactive plugins (files)', AI1WM_PLUGIN_NAME ); ?></label>
|
| 34 |
+
<small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
|
| 35 |
+
</li>
|
| 36 |
<li>
|
| 37 |
<input type="checkbox" id="ai1wm-no-cache" name="options[no_cache]" />
|
| 38 |
<label for="ai1wm-no-cache"><?php _e( 'Do <strong>not</strong> export cache (files)', AI1WM_PLUGIN_NAME ); ?></label>
|
| 44 |
<input type="checkbox" id="ai1wm-no-database" name="options[no_database]" />
|
| 45 |
<label for="ai1wm-no-database"><?php _e( 'Do <strong>not</strong> export database (sql)', AI1WM_PLUGIN_NAME ); ?></label>
|
| 46 |
</li>
|
| 47 |
+
<li>
|
| 48 |
+
<input type="checkbox" id="ai1wm-no-email-replace" name="options[no_email_replace]" />
|
| 49 |
+
<label for="ai1wm-no-email-replace"><?php _e( 'Do <strong>not</strong> replace email domain (sql)', AI1WM_PLUGIN_NAME ); ?></label>
|
| 50 |
+
<small style="color:red"><?php _e( 'new', AI1WM_PLUGIN_NAME ); ?></small>
|
| 51 |
+
</li>
|
| 52 |
</ul>
|
| 53 |
</div>
|
| 54 |
</div>
|
lib/view/export/index.php
CHANGED
|
@@ -45,6 +45,7 @@
|
|
| 45 |
<?php do_action( 'ai1wm_export_left_end' ); ?>
|
| 46 |
|
| 47 |
<input type="hidden" name="ai1wm_manual_export" value="1" />
|
|
|
|
| 48 |
</form>
|
| 49 |
</div>
|
| 50 |
</div>
|
| 45 |
<?php do_action( 'ai1wm_export_left_end' ); ?>
|
| 46 |
|
| 47 |
<input type="hidden" name="ai1wm_manual_export" value="1" />
|
| 48 |
+
|
| 49 |
</form>
|
| 50 |
</div>
|
| 51 |
</div>
|
lib/view/import/button-file.php
CHANGED
|
@@ -1 +1,4 @@
|
|
| 1 |
-
<a href="#" id="ai1wm-import-file"
|
|
|
|
|
|
|
|
|
| 1 |
+
<a href="#" id="ai1wm-import-file">
|
| 2 |
+
<?php _e( 'File', AI1WM_PLUGIN_NAME ); ?>
|
| 3 |
+
<input type="file" id="ai1wm-select-file" />
|
| 4 |
+
</a>
|
lib/view/import/import-buttons.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
|
| 4 |
<div class="ai1wm-import-form">
|
| 5 |
<form action="" method="post" enctype="multipart/form-data">
|
| 6 |
-
<div class="hide-if-no-js"
|
| 7 |
<div class="ai1wm-drag-drop-area" id="ai1wm-drag-drop-area">
|
| 8 |
<div id="ai1wm-import-init">
|
| 9 |
<p>
|
| 3 |
|
| 4 |
<div class="ai1wm-import-form">
|
| 5 |
<form action="" method="post" enctype="multipart/form-data">
|
| 6 |
+
<div class="hide-if-no-js">
|
| 7 |
<div class="ai1wm-drag-drop-area" id="ai1wm-drag-drop-area">
|
| 8 |
<div id="ai1wm-import-init">
|
| 9 |
<p>
|
loader.php
CHANGED
|
@@ -313,43 +313,3 @@ require_once AI1WM_MODEL_PATH .
|
|
| 313 |
require_once AI1WM_MODEL_PATH .
|
| 314 |
DIRECTORY_SEPARATOR .
|
| 315 |
'class-ai1wm-streams.php';
|
| 316 |
-
|
| 317 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 318 |
-
DIRECTORY_SEPARATOR .
|
| 319 |
-
'class-ai1wm-archive-exception.php';
|
| 320 |
-
|
| 321 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 322 |
-
DIRECTORY_SEPARATOR .
|
| 323 |
-
'class-ai1wm-backups-exception.php';
|
| 324 |
-
|
| 325 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 326 |
-
DIRECTORY_SEPARATOR .
|
| 327 |
-
'class-ai1wm-export-exception.php';
|
| 328 |
-
|
| 329 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 330 |
-
DIRECTORY_SEPARATOR .
|
| 331 |
-
'class-ai1wm-import-exception.php';
|
| 332 |
-
|
| 333 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 334 |
-
DIRECTORY_SEPARATOR .
|
| 335 |
-
'class-ai1wm-http-exception.php';
|
| 336 |
-
|
| 337 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 338 |
-
DIRECTORY_SEPARATOR .
|
| 339 |
-
'class-ai1wm-not-accessible-exception.php';
|
| 340 |
-
|
| 341 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 342 |
-
DIRECTORY_SEPARATOR .
|
| 343 |
-
'class-ai1wm-not-found-exception.php';
|
| 344 |
-
|
| 345 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 346 |
-
DIRECTORY_SEPARATOR .
|
| 347 |
-
'class-ai1wm-not-readable-exception.php';
|
| 348 |
-
|
| 349 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 350 |
-
DIRECTORY_SEPARATOR .
|
| 351 |
-
'class-ai1wm-not-writable-exception.php';
|
| 352 |
-
|
| 353 |
-
require_once AI1WM_EXCEPTION_PATH .
|
| 354 |
-
DIRECTORY_SEPARATOR .
|
| 355 |
-
'class-ai1wm-storage-exception.php';
|
| 313 |
require_once AI1WM_MODEL_PATH .
|
| 314 |
DIRECTORY_SEPARATOR .
|
| 315 |
'class-ai1wm-streams.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: yani.iliev, bangelov, pimjitsawang
|
|
| 3 |
Tags: db migration, migration, wordpress migration, db backup, db restore, website backup, website restore, website migration, website deploy, wordpress deploy, db backup, database export, database serialization, database find replace
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 4.5
|
| 6 |
-
Stable tag: 5.
|
| 7 |
License: GPLv2 or later
|
| 8 |
|
| 9 |
All-in-One WP Migration is the only tool that you will ever need to migrate a WordPress site.
|
|
@@ -75,6 +75,11 @@ All in One WP Plugin is the first plugin to offer true mobile experience on Word
|
|
| 75 |
3. Plugin Menu
|
| 76 |
|
| 77 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
= 5.43 =
|
| 79 |
* Fix an issue when archiving dynamic files on export
|
| 80 |
* Support custom upload path for multisites
|
| 3 |
Tags: db migration, migration, wordpress migration, db backup, db restore, website backup, website restore, website migration, website deploy, wordpress deploy, db backup, database export, database serialization, database find replace
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 4.5
|
| 6 |
+
Stable tag: 5.44
|
| 7 |
License: GPLv2 or later
|
| 8 |
|
| 9 |
All-in-One WP Migration is the only tool that you will ever need to migrate a WordPress site.
|
| 75 |
3. Plugin Menu
|
| 76 |
|
| 77 |
== Changelog ==
|
| 78 |
+
= 5.44 =
|
| 79 |
+
* Add "Do not replace email domain" option in advanced settings
|
| 80 |
+
* Add "ai1wm_exclude_content_from_export" WordPress hook on export
|
| 81 |
+
* Add HTML5 uploader
|
| 82 |
+
|
| 83 |
= 5.43 =
|
| 84 |
* Fix an issue when archiving dynamic files on export
|
| 85 |
* Support custom upload path for multisites
|
